1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3423],{52842:function(e,t,n){"use strict";n.d(t,{do:function(){return q}});var r,i,o,s=[],a="ResizeObserver loop completed with undelivered notifications.",l=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:a}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=a),window.dispatchEvent(e)};(r=i||(i={})).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},h=function(e){if(f(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e.offsetWidth,o=e.offsetHeight;return!(i||o||e.getClientRects().length)},p=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,v=/auto|scroll/,b=/^tb|vertical/,w=/msie|trident/i.test(m.navigator&&m.navigator.userAgent),x=function(e){return parseFloat(e||"0")},S=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)},k=u({devicePixelContentBoxSize:S(),borderBoxSize:S(),contentBoxSize:S(),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(h(e))return y.set(e,k),k;var n=getComputedStyle(e),r=f(e)&&e.ownerSVGElement&&e.getBBox(),i=!w&&"border-box"===n.boxSizing,o=b.test(n.writingMode||""),s=!r&&v.test(n.overflowY||""),a=!r&&v.test(n.overflowX||""),l=r?0:x(n.paddingTop),c=r?0:x(n.paddingRight),p=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),T=r?0:x(n.borderLeftWidth),C=g+c,A=l+p,R=T+E,j=m+_,P=a?e.offsetHeight-j-e.clientHeight:0,M=s?e.offsetWidth-R-e.clientWidth:0,I=r?r.width:x(n.width)-(i?C+R:0)-M,O=r?r.height:x(n.height)-(i?A+j:0)-P,$=I+C+M+R,z=O+A+P+j,L=u({devicePixelContentBoxSize:S(Math.round(I*devicePixelRatio),Math.round(O*devicePixelRatio),o),borderBoxSize:S($,z,o),contentBoxSize:S(I,O,o),contentRect:new d(g,l,I,O)});return y.set(e,L),L},_=function(e,t,n){var r=E(e,n),o=r.borderBoxSize,s=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case i.DEVICE_PIXEL_CONTENT_BOX:return a;case i.BORDER_BOX:return o;default:return s}},T=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(h(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},A=function(){var e=1/0,t=[];s.forEach(function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach(function(t){var n=new T(t.target),i=C(t.target);r.push(n),t.lastReportedSize=_(t.target,t.observedBox),i<e&&(e=i)}),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){s.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))})})},j=function(){var e=0;for(R(0);s.some(function(e){return e.activeTargets.length>0});)R(e=A());return s.some(function(e){return e.skippedTargets.length>0})&&l(),e>0},P=[],M=function(e){if(!o){var t=0,n=document.createTextNode("");
1new MutationObserver(function(){return P.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),o=function(){n.textContent="".concat(t?t--:t++)}}P.push(e),o()},I=function(e){M(function(){requestAnimationFrame(e)})},O=0,$={attributes:!0,characterData:!0,childList:!0,subtree:!0},z=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],L=function(e){return void 0===e&&(e=0),Date.now()+e},N=!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),!N){N=!0;var n=L(e);I(function(){var r=!1;try{r=j()}finally{if(N=!1,e=n-L(),!O)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,$)};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(),z.forEach(function(t){return m.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),z.forEach(function(t){return m.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),V=function(e){!O&&e>0&&D.start(),(O+=e)||D.stop()},F=function(){function e(e,t){this.target=e,this.observedBox=t||i.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}(),B=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},H=new WeakMap,U=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return -1},W=function(){function e(){}return e.connect=function(e,t){var n=new B(e,t);H.set(e,n)},e.observe=function(e,t,n){var r=H.get(e),i=0===r.observationTargets.length;0>U(r.observationTargets,t)&&(i&&s.push(r),r.observationTargets.push(new F(t,n&&n.box)),V(1),D.schedule())},e.unobserve=function(e,t){var n=H.get(e),r=U(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&s.splice(s.indexOf(n),1),n.observationTargets.splice(r,1),V(-1))},e.disconnect=function(e){var t=this,n=H.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),q=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.");W.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(!p(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");W.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(!p(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");W.unobserve(this,e)},e.prototype.disconnect=function(){W.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()},96441:function(e,t,n){"use strict";let r,i,o;var s,a,l=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,p=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of d(t))h.call(e,i)||i===n||u(e,i,{get:()=>t[i],enumerable:!(r=c(t,i))||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:()=>A,$structuralCheck:()=>O,c:()=>S,clearRenderCounterRegistry:()=>P,renderCounterRegistry:()=>j,useRenderCounter:()=>M}),e.exports=p(u({},"__esModule",{value:!0}),g);var m=(o=null!=(r=n(7653))?l(f(r)):{},p(!i&&r&&r.__esModule?o:u(o,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:v,isValidElement:b}=m,w=null!=(s=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?s:m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.memo_cache_sentinel"),S="function"==typeof(null==(a=m.__COMPILER_RUNTIME)?void 0:a.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},[])},k={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{k[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}k.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var T=[];function C(e){let t=w.ReactCurrentDispatcher.current;if(0===e){if(T.push(t),1===T.length&&(E=t),t===k)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.");_(k)}else if(1===e){let e=T.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===T.length&&(E=null),_(e)}else if(2===e)T.push(t),_(E);else if(3===e){let e=T.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 A(e){for(let t=0;t<e.length;t++)e[t]=x}function R(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var j=new Map;function P(){for(let e of j.values())e.forEach(e=>{e.count=0})}function M(e){let t=y(null);null!=t.current&&(t.current.count+=1),v(()=>{if(null==t.current){let n;let r={count:0};null==(n=j.get(e))&&(n=new Set,j.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=j.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var I=new Set;function O(e,t,n,r,i,o){function s(e,t,s,a){let l=`${r}:${o} [${i}] ${n}${s} changed from ${e} to ${t} at depth ${a}`;I.has(l)||(I.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)&&t!==n){if(typeof t!=typeof n)s(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),a=Array.isArray(n);if(null===t&&null!==n)s("null",`type ${typeof n}`,r,i);else if(null===n)s(`type ${typeof t}`,"null",r,i);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)s(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,i);else for(let[o,a]of t)n.has(o)?e(a,n.get(o),`${r}.get(${o})`,i+1):s(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i)}else s("Map instance","other value",r,i)}else if(n instanceof Map)s("other value","Map instance",r,i);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)s(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(let e of n)t.has(e)||s(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i)}else s("Set instance","other value",r,i)}else if(n instanceof Set)s("other value","Set instance",r,i);else if(o||a){if(o!==a)s(`type ${o?"array":"object"}`,`type ${a?"array":"object"}`,r,i);else if(t.length!==n.length)s(`array with length ${t.length}`,`array with length ${n.length}`,r,i);else for(let o=0;o<t.length;o++)e(t[o],n[o],`${r}[${o}]`,i+1)}else if(b(t)||b(n))b(t)!==b(n)?s(`type ${b(t)?"React element":"object"}`,`type ${b(n)?"React element":"object"}`,r,i):t.type!==n.type?s(`React element of type ${t.type}`,`React element of type ${n.type}`,r,i):e(t.props,n.props,`[props of ${r}]`,i+1);else{for(let e in n)e in t||s(`object without key ${e}`,`object with key ${e}
1`,r,i);for(let o in t)o in n?e(t[o],n[o],`${r}.${o}`,i+1):s(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&s(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&s(t,n,r,i)}}}(e,t,"",0)}},20477:function(e,t,n){"use strict";let r,i,o;var s,a,l=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,p=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of d(t))h.call(e,i)||i===n||u(e,i,{get:()=>t[i],enumerable:!(r=c(t,i))||r.enumerable});return e},g={};((e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})})(g,{$dispatcherGuard:()=>C,$makeReadOnly:()=>R,$reset:()=>A,$structuralCheck:()=>O,c:()=>S,clearRenderCounterRegistry:()=>P,renderCounterRegistry:()=>j,useRenderCounter:()=>M}),e.exports=p(u({},"__esModule",{value:!0}),g);var m=(o=null!=(r=n(7653))?l(f(r)):{},p(!i&&r&&r.__esModule?o:u(o,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:v,isValidElement:b}=m,w=null!=(s=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?s:m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.memo_cache_sentinel"),S="function"==typeof(null==(a=m.__COMPILER_RUNTIME)?void 0:a.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},[])},k={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{k[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}k.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var T=[];function C(e){let t=w.ReactCurrentDispatcher.current;if(0===e){if(T.push(t),1===T.length&&(E=t),t===k)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.");_(k)}else if(1===e){let e=T.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===T.length&&(E=null),_(e)}else if(2===e)T.push(t),_(E);else if(3===e){let e=T.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 A(e){for(let t=0;t<e.length;t++)e[t]=x}function R(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var j=new Map;function P(){for(let e of j.values())e.forEach(e=>{e.count=0})}function M(e){let t=y(null);null!=t.current&&(t.current.count+=1),v(()=>{if(null==t.current){let n;let r={count:0};null==(n=j.get(e))&&(n=new Set,j.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=j.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var I=new Set;function O(e,t,n,r,i,o){function s(e,t,s,a){let l=`${r}:${o} [${i}] ${n}${s} changed from ${e} to ${t} at depth ${a}`;I.has(l)||(I.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)&&t!==n){if(typeof t!=typeof n)s(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),a=Array.isArray(n);if(null===t&&null!==n)s("null",`type ${typeof n}`,r,i);else if(null===n)s(`type ${typeof t}`,"null",r,i);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)s(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,i);
1else for(let[o,a]of t)n.has(o)?e(a,n.get(o),`${r}.get(${o})`,i+1):s(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i)}else s("Map instance","other value",r,i)}else if(n instanceof Map)s("other value","Map instance",r,i);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)s(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(let e of n)t.has(e)||s(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i)}else s("Set instance","other value",r,i)}else if(n instanceof Set)s("other value","Set instance",r,i);else if(o||a){if(o!==a)s(`type ${o?"array":"object"}`,`type ${a?"array":"object"}`,r,i);else if(t.length!==n.length)s(`array with length ${t.length}`,`array with length ${n.length}`,r,i);else for(let o=0;o<t.length;o++)e(t[o],n[o],`${r}[${o}]`,i+1)}else if(b(t)||b(n))b(t)!==b(n)?s(`type ${b(t)?"React element":"object"}`,`type ${b(n)?"React element":"object"}`,r,i):t.type!==n.type?s(`React element of type ${t.type}`,`React element of type ${n.type}`,r,i):e(t.props,n.props,`[props of ${r}]`,i+1);else{for(let e in n)e in t||s(`object without key ${e}`,`object with key ${e}`,r,i);for(let o in t)o in n?e(t[o],n[o],`${r}.${o}`,i+1):s(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&s(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&s(t,n,r,i)}}}(e,t,"",0)}},65085:function(e,t,n){var r=n(3642).Symbol;e.exports=r},2173:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},63541:function(e){e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},12588:function(e){e.exports=function(e){return e.split("")}},49543:function(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},606:function(e,t,n){var r=n(65085),i=n(52439),o=n(5063),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},70514:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},49644:function(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},20530:function(e,t,n){var r=n(65085),i=n(2173),o=n(73509),s=n(58510),a=1/0,l=r?r.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-a?"-0":n}},53853:function(e,t,n){var r=n(49644);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},81080:function(e,t,n){var r=n(53853),i=n(56121),o=n(82920),s=n(93014);e.exports=function(e){return function(t){var n=i(t=s(t))?o(t):void 0,a=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return a[e]()+l}}},60241:function(e,t,n){var r=n(63541),i=n(66446),o=n(99184),s=RegExp("['â]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(s,"")),e,"")}}},61602:function(e,t,n){var r=n(70514)({Ã:"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},31357:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},52439:function(e,t,n){var r=n(65085),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},56121:function(e){var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},19973: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)}},5063:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3642:function(e,t,n){var r=n(31357),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},82920:function(e,t,n){var r=n(12588),i=n(56121),o=n(60391);e.exports=function(e){return i(e)?o(e):r(e)}},60391:function(e){var t="\ud800-\udfff",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\ud83c[\udffb-\udfff]",i="[^"+t+"]",o="(?:\ud83c[\udde6-\uddff]){2}",s="[\ud800-\udbff][\udc00-\udfff]",a="(?:"+n+"|"+r+")?",l="[\\ufe0e\\ufe0f]?",u="(?:\\u200d(?:"+[i,o,s].join("|")+")"+l+a+")*",c=RegExp(r+"(?="+r+")|(?:"+[i+n+"?",n,o,s,"["+t+"]"].join("|")+")"+(l+a+u),"g");e.exports=function(e){return e.match(c)||[]}},68224:function(e){var t="\ud800-\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\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",s="['â]",a="["+o+"]",l="["+r+"]",u="[^"+t+o+"\\d+"+n+r+i+"]",c="(?:\ud83c[\udde6-\uddff]){2}",d="[\ud800-\udbff][\udc00-\udfff]",f="["+i+"]",h="(?:"+l+"|"+u+")",p="(?:"+s+"(?:d|ll|m|re|s|t|ve))?",g="(?:"+s+"(?:D|LL|M|RE|S|T|VE))?",m="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",y="[\\ufe0e\\ufe0f]?",v="(?:\\u200d(?:"+["[^"+t+"]",c,d].join("|")+")"+y+m+")*",b="(?:"+["["+n+"]",c,d].join("|")+")"+(y+m+v),w=RegExp([f+"?"+l+"+"+p+"(?="+[a,f,"$"].join("|")+")","(?:"+f+"|"+u+")+"+g+"(?="+[a,f+h,"$"].join("|")+")",f+"?"+h+"+"+p,f+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",b].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},66446:function(e,t,n){var r=n(61602),i=n(93014),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
17f]/g,s=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(s,"")}},73509:function(e){var t=Array.isArray;e.exports=t},62743:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},58510:function(e,t,n){var r=n(606),i=n(62743);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},86021:function(e,t,n){var r=n(60241),i=n(51055),o=r(function(e,t,n){return e+(n?" ":"")+i(t)});e.exports=o},93014:function(e,t,n){var r=n(20530);e.exports=function(e){return null==e?"":r(e)}},51055:function(e,t,n){var r=n(81080)("toUpperCase");e.exports=r},99184:function(e,t,n){var r=n(49543),i=n(19973),o=n(93014),s=n(68224);e.exports=function(e,t,n){return(e=o(e),void 0===(t=n?void 0:t))?i(e)?s(e):r(e):e.match(t)||[]}},85618:function(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=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"),h=Symbol.for("react.lazy"),p=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 i:case s:case o:case c:case d:case p:return e;default:switch(e=e&&e.$$typeof){case l:case u:case h:case f:case a:return e;default:return t}}case r:return t}}}t.ContextConsumer=a,t.ContextProvider=l,t.Element=n,t.ForwardRef=u,t.Fragment=i,t.Lazy=h,t.Memo=f,t.Portal=r,t.Profiler=s,t.StrictMode=o,t.Suspense=c,t.SuspenseList=d,t.isContextConsumer=function(e){return m(e)===a},t.isContextProvider=function(e){return m(e)===l},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)===i},t.isLazy=function(e){return m(e)===h},t.isMemo=function(e){return m(e)===f},t.isPortal=function(e){return m(e)===r},t.isProfiler=function(e){return m(e)===s},t.isStrictMode=function(e){return m(e)===o},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===i||e===s||e===o||e===c||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===l||e.$$typeof===a||e.$$typeof===u||e.$$typeof===g||void 0!==e.getModuleId)},t.typeOf=m},74753:function(e,t,n){"use strict";e.exports=n(85618)},80029:function(e,t,n){"use strict";n.d(t,{y:function(){return c}});var r=n(33561),i=n(33957),o=n(56927),s=n(40306),a=n(45340),l=n(68255),u=n(19049),c=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var o,s=this,a=(o=e)&&o instanceof r.Lv||o&&(0,l.m)(o.next)&&(0,l.m)(o.error)&&(0,l.m)(o.complete)&&(0,i.Nn)(o)?e:new r.Hp(e,t,n);return(0,u.x)(function(){var e=s.operator,t=s.source;a.add(e?e.call(a,t):t?s._subscribe(a):s._trySubscribe(a))}),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=d(t))(function(t,i){var o=new r.Hp({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});n.subscribe(o)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.L]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,s.U)(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=d(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function d(e){var t;return null!==(t=null!=e?e:a.v.Promise)&&void 0!==t?t:Promise}},34581:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var r=n(83780),i=n(3363),o=n(20188),s=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=o.l);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return(0,r.ZT)(t,e),t.prototype.next=function(t){var n=this.isStopped,r=this._buffer,i=this._infiniteTimeWindow,o=this._timestampProvider,s=this._windowTime;!n&&(r.push(t),i||r.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,n=this._buffer,r=this._infiniteTimeWindow,i=(r?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!r){for(var o=t.now(),s=0,a=1;a<n.length&&n[a]<=o;a+=2)s=a;s&&n.splice(0,s+1)}},t}(i.x)},3363:function(e,t,n){"use strict";n.d(t,{x:function(){return u}});var r=n(83780),i=n(80029),o=n(33957),s=(0,n(57238).d)(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),a=n(42144),l=n(19049),u=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,r.ZT)(t,e),t.prototype.lift=function(e){var t=new c(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new s},t.prototype.next=function(e){var t=this;(0,l.x)(function(){var n,i;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=(0,r.XA)(t.currentObservers),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;(0,l.x)(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;(0,l.x)(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}
1,enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this.hasError,r=this.isStopped,i=this.observers;return n||r?o.Lc:(this.currentObservers=null,i.push(e),new o.w0(function(){t.currentObservers=null,(0,a.P)(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,n=this.thrownError,r=this.isStopped;t?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new i.y;return e.source=this,e},t.create=function(e,t){return new c(e,t)},t}(i.y),c=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return(0,r.ZT)(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:o.Lc},t}(u)},33561:function(e,t,n){"use strict";n.d(t,{Hp:function(){return y},Lv:function(){return h}});var r=n(83780),i=n(68255),o=n(33957),s=n(45340),a=n(43928),l=n(94780),u=c("C",void 0,void 0);function c(e,t,n){return{kind:e,value:t,error:n}}var d=n(18720),f=n(19049),h=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,(0,o.Nn)(t)&&t.add(n)):n.destination=w,n}return(0,r.ZT)(t,e),t.create=function(e,t,n){return new y(e,t,n)},t.prototype.next=function(e){this.isStopped?b(c("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?b(c("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?b(u,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(o.w0),p=Function.prototype.bind;function g(e,t){return p.call(e,t)}var m=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){v(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){v(e)}else v(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){v(e)}},e}(),y=function(e){function t(t,n,r){var o,a,l=e.call(this)||this;return(0,i.m)(t)||!t?o={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:l&&s.v.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return l.unsubscribe()},o={next:t.next&&g(t.next,a),error:t.error&&g(t.error,a),complete:t.complete&&g(t.complete,a)}):o=t,l.destination=new m(o),l}return(0,r.ZT)(t,e),t}(h);function v(e){s.v.useDeprecatedSynchronousErrorHandling?(0,f.O)(e):(0,a.h)(e)}function b(e,t){var n=s.v.onStoppedNotification;n&&d.z.setTimeout(function(){return n(e,t)})}var w={closed:!0,next:l.Z,error:function(e){throw e},complete:l.Z}},33957:function(e,t,n){"use strict";n.d(t,{Lc:function(){return l},w0:function(){return a},Nn:function(){return u}});var r=n(83780),i=n(68255),o=(0,n(57238).d)(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}),s=n(42144),a=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,n,s,a,l=this._parentage;if(l){if(this._parentage=null,Array.isArray(l))try{for(var u=(0,r.XA)(l),d=u.next();!d.done;d=u.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else l.remove(this)}var f=this.initialTeardown;
1if((0,i.m)(f))try{f()}catch(e){a=e instanceof o?e.errors:[e]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var p=(0,r.XA)(h),g=p.next();!g.done;g=p.next()){var m=g.value;try{c(m)}catch(e){a=null!=a?a:[],e instanceof o?a=(0,r.ev)((0,r.ev)([],(0,r.CR)(a)),(0,r.CR)(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(n)throw n.error}}}if(a)throw new o(a)}},t.prototype.add=function(e){var n;if(e&&e!==this){if(this.closed)c(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&(0,s.P)(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&(0,s.P)(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),l=a.EMPTY;function u(e){return e instanceof a||e&&"closed"in e&&(0,i.m)(e.remove)&&(0,i.m)(e.add)&&(0,i.m)(e.unsubscribe)}function c(e){(0,i.m)(e)?e():e.unsubscribe()}},45340:function(e,t,n){"use strict";n.d(t,{v:function(){return r}});var r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},87481:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var r=n(80029),i=n(48949);function o(e){return new r.y(function(t){(0,i.Xf)(e()).subscribe(t)})}},64541:function(e,t,n){"use strict";n.d(t,{E:function(){return r}});var r=new(n(80029)).y(function(e){return e.complete()})},388:function(e,t,n){"use strict";n.d(t,{D:function(){return b}});var r=n(48949),i=n(74621),o=n(29230);function s(e,t){return void 0===t&&(t=0),(0,o.e)(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}var a=n(80029),l=n(17669),u=n(68255),c=n(10040);function d(e,t){if(!e)throw Error("Iterable cannot be null");return new a.y(function(n){(0,c.f)(n,t,function(){var r=e[Symbol.asyncIterator]();(0,c.f)(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}var f=n(33553),h=n(12006),p=n(37506),g=n(29609),m=n(65295),y=n(6342),v=n(25504);function b(e,t){return t?function(e,t){if(null!=e){if((0,f.c)(e))return(0,r.Xf)(e).pipe(s(t),(0,i.Q)(t));if((0,p.z)(e))return new a.y(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if((0,h.t)(e))return(0,r.Xf)(e).pipe(s(t),(0,i.Q)(t));if((0,m.D)(e))return d(e,t);if((0,g.T)(e))return new a.y(function(n){var r;return(0,c.f)(n,t,function(){r=e[l.h](),(0,c.f)(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return(0,u.m)(null==r?void 0:r.return)&&r.return()}});if((0,v.L)(e))return d((0,v.Q)(e),t)}throw(0,y.z)(e)}(e,t):(0,r.Xf)(e)}},48949:function(e,t,n){"use strict";n.d(t,{Xf:function(){return g}});var r=n(83780),i=n(37506),o=n(12006),s=n(80029),a=n(33553),l=n(65295),u=n(6342),c=n(29609),d=n(25504),f=n(68255),h=n(43928),p=n(56927);function g(e){if(e instanceof s.y)return e;if(null!=e){if((0,a.c)(e))return new s.y(function(t){var n=e[p.L]();if((0,f.m)(n.subscribe))return n.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")});if((0,i.z)(e))return new s.y(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()});if((0,o.t)(e))return new s.y(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,h.h)});if((0,l.D)(e))return m(e);if((0,c.T)(e))return new s.y(function(t){var n,i;try{for(var o=(0,r.XA)(e),s=o.next();!s.done;s=o.next()){var a=s.value;if(t.next(a),t.closed)return}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}t.complete()});if((0,d.L)(e))return m((0,d.Q)(e))}throw(0,u.z)(e)}function m(e){return new s.y(function(t){(function(e,t){var n,i,o,s;return(0,r.mG)(this,void 0,void 0,function(){var a;return(0,r.Jh)(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=(0,r.KL)(e),l.label=1;case 1:return[4,n.next()];case 2:if((i=l.sent()).done)return[3,4];if(a=i.value,t.next(a),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o={error:l.sent()},[3,11];case 6:if(l.trys.push([6,,9,10]),!(i&&!i.done&&(s=n.return)))return[3,8];return[4,s.call(n)];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];
1case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}},55796:function(e,t,n){"use strict";n.d(t,{T:function(){return l}});var r=n(50866),i=n(48949),o=n(64541),s=n(56822),a=n(388);function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(0,s.yG)(e),l=(0,s._6)(e,1/0);return e.length?1===e.length?(0,i.Xf)(e[0]):(0,r.J)(l)((0,a.D)(e,n)):o.E}},41958:function(e,t,n){"use strict";n.d(t,{x:function(){return i}});var r=n(83780);function i(e,t,n,r,i){return new o(e,t,n,r,i)}var o=function(e){function t(t,n,r,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return(0,r.ZT)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),n||null===(t=this.onFinalize)||void 0===t||t.call(this)}},t}(n(33561).Lv)},10672:function(e,t,n){"use strict";n.d(t,{h:function(){return o}});var r=n(29230),i=n(41958);function o(e,t){return(0,r.e)(function(n,r){var o=0;n.subscribe((0,i.x)(r,function(n){return e.call(t,n,o++)&&r.next(n)}))})}},36637:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var r=n(29230),i=n(41958);function o(e,t){return(0,r.e)(function(n,r){var o=0;n.subscribe((0,i.x)(r,function(n){r.next(e.call(t,n,o++))}))})}},50866:function(e,t,n){"use strict";n.d(t,{J:function(){return o}});var r=n(3055),i=n(94721);function o(e){return void 0===e&&(e=1/0),(0,r.z)(i.y,e)}},3055:function(e,t,n){"use strict";n.d(t,{z:function(){return function e(t,n,l){return(void 0===l&&(l=1/0),(0,a.m)(n))?e(function(e,o){return(0,r.U)(function(t,r){return n(e,t,o,r)})((0,i.Xf)(t(e,o)))},l):("number"==typeof n&&(l=n),(0,o.e)(function(e,n){var r,o,a,u,c,d,f,h,p;return r=l,a=[],u=0,c=0,d=!1,f=function(){!d||a.length||u||n.complete()},h=function(e){return u<r?p(e):a.push(e)},p=function(e){u++;var l=!1;(0,i.Xf)(t(e,c++)).subscribe((0,s.x)(n,function(e){o?h(e):n.next(e)},function(){l=!0},void 0,function(){if(l)try{for(u--;a.length&&u<r;)!function(){var e=a.shift();p(e)}();f()}catch(e){n.error(e)}}))},e.subscribe((0,s.x)(n,h,function(){d=!0,f()})),function(){}}))}}});var r=n(36637),i=n(48949),o=n(29230),s=(n(10040),n(41958)),a=n(68255)},74621:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var r=n(10040),i=n(29230),o=n(41958);function s(e,t){return void 0===t&&(t=0),(0,i.e)(function(n,i){n.subscribe((0,o.x)(i,function(n){return(0,r.f)(i,e,function(){return i.next(n)},t)},function(){return(0,r.f)(i,e,function(){return i.complete()},t)},function(n){return(0,r.f)(i,e,function(){return i.error(n)},t)}))})}},80640:function(e,t,n){"use strict";n.d(t,{B:function(){return l}});var r=n(83780),i=n(48949),o=n(3363),s=n(33561),a=n(29230);function l(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new o.x}:t,r=e.resetOnError,l=void 0===r||r,c=e.resetOnComplete,d=void 0===c||c,f=e.resetOnRefCountZero,h=void 0===f||f;return function(e){var t,r,o,c=0,f=!1,p=!1,g=function(){null==r||r.unsubscribe(),r=void 0},m=function(){g(),t=o=void 0,f=p=!1},y=function(){var e=t;m(),null==e||e.unsubscribe()};return(0,a.e)(function(e,a){c++,p||f||g();var v=o=null!=o?o:n();a.add(function(){0!=--c||p||f||(r=u(y,h))}),v.subscribe(a),!t&&c>0&&(t=new s.Hp({next:function(e){return v.next(e)},error:function(e){p=!0,g(),r=u(m,l,e),v.error(e)},complete:function(){f=!0,g(),r=u(m,d),v.complete()}}),(0,i.Xf)(e).subscribe(t))})(e)}}function u(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!0===t){e();return}if(!1!==t){var a=new s.Hp({next:function(){a.unsubscribe(),e()}});return(0,i.Xf)(t.apply(void 0,(0,r.ev)([],(0,r.CR)(n)))).subscribe(a)}}},55713:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var r=n(34581),i=n(80640);function o(e,t,n){var o,s,a,l,u=!1;return e&&"object"==typeof e?(l=void 0===(o=e.bufferSize)?1/0:o,t=void 0===(s=e.windowTime)?1/0:s,u=void 0!==(a=e.refCount)&&a,n=e.sc
1heduler):l=null!=e?e:1/0,(0,i.B)({connector:function(){return new r.t(l,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}},65566:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(83780),i=function(e){function t(t,n){return e.call(this)||this}return(0,r.ZT)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(33957).w0),o={setInterval:function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var s=o.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,(0,r.ev)([e,t],(0,r.CR)(n))):setInterval.apply(void 0,(0,r.ev)([e,t],(0,r.CR)(n)))},clearInterval:function(e){var t=o.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},s=n(42144),a=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return(0,r.ZT)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n,r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),o.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&o.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,s.P)(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(i)},3777:function(e,t,n){"use strict";n.d(t,{v:function(){return s}});var r=n(83780),i=n(20188),o=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=i.l.now,e}(),s=function(e){function t(t,n){void 0===n&&(n=o.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,r.ZT)(t,e),t.prototype.flush=function(e){var t,n=this.actions;if(this._active){n.push(e);return}this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}},t}(o)},20188:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});var r={now:function(){return(r.delegate||Date).now()},delegate:void 0}},18720:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});var r=n(83780),i={setTimeout:function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var s=i.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,(0,r.ev)([e,t],(0,r.CR)(n))):setTimeout.apply(void 0,(0,r.ev)([e,t],(0,r.CR)(n)))},clearTimeout:function(e){var t=i.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}},17669:function(e,t,n){"use strict";n.d(t,{h:function(){return r}});var r="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},56927:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},56822:function(e,t,n){"use strict";n.d(t,{_6:function(){return l},jO:function(){return s},yG:function(){return a}});var r=n(68255),i=n(40908);function o(e){return e[e.length-1]}function s(e){return(0,r.m)(o(e))?e.pop():void 0}function a(e){return(0,i.K)(o(e))?e.pop():void 0}function l(e,t){return"number"==typeof o(e)?e.pop():t}},42144:function(e,t,n){"use strict";function r(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}n.d(t,{P:function(){return r}})},57238:function(e,t,n){"use strict";function r(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}n.d(t,{d:function(){return r}})},19049:function(e,t,n){"use strict";n.d(t,{O:function(){return s},x:function(){return o}});var r=n(45340),i=null;function o(e){if(r.v.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var n=i,o=n.errorThrown,s=n.error;if(i=null,o)throw s}}else e()}function s(e){r.v.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},10040:function(e,t,n){"use strict";function r(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}n.d(t,{f:function(){return r}})},94721:function(e,t,n){"use strict";function r(e){return e}n.d(t,{y:function(){return r}})},37506:function(e,t,n){"use strict";n.d(t,{z:function(){return r}});var r=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},65295:function(e,t,n){"use strict";n.d(t,{D:function(){return i}});var r=n(68255);function i(e){return Symbol.asyncIterator&&(0,r.m)(null==e?void 0:e[Symbol.asyncIterator])}},68255:function(e,t,n){"use strict";function r(e){return"function"==typeof e}n.d(t,{m:function(){return r}})},33553:function(e,t,n){"use strict";n.d(t,{c:function(){return o}});var r=n(56927),i=n(68255);function o(e){return(0,i.m)(e[r.L])}},29609:function(e,t,n){"use strict";n.d(t,{T:function(){return o}});var r=n(17669),i=n(68255);function o(e){return(0,i.m)(null==e?void 0:e[r.h])}},12006:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(68255);function i(e){return(0,r.m)(null==e?void 0:e.then)}},25504:function(e,t,n){"use strict";n.d(t,{L:function(){return s},Q:function(){return o}});var r=n(83780),i=n(68255);function o(e){return(0,r.FC)(this,arguments,function(){var t,n,i;return(0,r.Jh)(this,function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,(0,r.qq)(t.read())];case 3:if(i=(n=o.sent()).value,!n.done)return[3,5];return[4,(0,r.qq)(void 0)];case 4:return[2,o.sent()];case 5:return[4,(0,r.qq)(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function s(e){return(0,i.m)(null==e?void 0:e.getReader)}},40908:function(e,t,n){"use strict";n.d(t,{K:function(){return i}});var r=n(68255);function i(e){return e&&(0,r.m)(e.schedule)}},29230:function(e,t,n){"use strict";n.d(t,{e:function(){return i}});var r=n(68255);function i(e){return function(t){if((0,r.m)(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}},3339:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(83780),i=n(36637),o=Array.isArray;function s(e){return(0,i.U)(function(t){return o(t)?e.apply(void 0,(0,r.ev)([],(0,r.CR)(t))):e(t)})}},94780:function(e,t,n){"use strict";function r(){}n.d(t,{Z:function(){return r}})},40306:function(e,t,n){"use strict";n.d(t,{U:function(){return o},z:function(){return i}});var r=n(94721);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)}function o(e){return 0===e.length?r.y:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}},43928:function(e,t,n){"use strict";n.d(t,{h:function(){return o}});var r=n(45340),i=n(18720);function o(e){i.z.setTimeout(function(){var t=r.v.onUnhandledError;if(t)t(e);else throw e})}},6342:function(e,t,n){"use strict";function r(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
1d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}n.d(t,{z:function(){return r}})},5974:function(e,t,n){"use strict";n.d(t,{f6:function(){return ts},iv:function(){return td},F4:function(){return tg},zo:function(){return th},Fg:function(){return to}});var r,i=n(83780),o=n(7653),s={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,scale: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},a="-ms-",l="-moz-",u="-webkit-",c="comm",d="rule",f="decl",h="@ke
1yframes",p=Math.abs,g=String.fromCharCode,m=Object.assign;function y(e,t){return(e=t.exec(e))?e[0]:e}function v(e,t,n){return e.replace(t,n)}function b(e,t,n){return e.indexOf(t,n)}function w(e,t){return 0|e.charCodeAt(t)}function x(e,t,n){return e.slice(t,n)}function S(e){return e.length}function k(e,t){return t.push(e),e}function E(e,t){return e.filter(function(e){return!y(e,t)})}var _=1,T=1,C=0,A=0,R=0,j="";function P(e,t,n,r,i,o,s,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:_,column:T,length:s,return:"",siblings:a}}function M(e,t){return m(P("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function I(e){for(;e.root;)e=M(e.root,{children:[e]});k(e,e.siblings)}function O(){return R=A<C?w(j,A++):0,T++,10===R&&(T=1,_++),R}function $(){return w(j,A)}function z(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=A-1,n=function e(t){for(;O();)switch(R){case t:return A;case 34:case 39:34!==t&&39!==t&&e(R);break;case 40:41===t&&e(t);break;case 92:O()}return A}(91===e?e+2:40===e?e+1:e),x(j,t,n)).trim()}function N(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function D(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case f:return e.return=e.return||e.value;case c:return"";case h:return e.return=e.value+"{"+N(e.children,r)+"}";case d:if(!S(e.value=e.props.join(",")))return""}return S(n=N(e.children,r))?e.return=e.value+"{"+n+"}":""}function V(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case f:e.return=function e(t,n,r){var i;switch(i=n,45^w(t,0)?(((i<<2^w(t,0))<<2^w(t,1))<<2^w(t,2))<<2^w(t,3):0){case 5103:return u+"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 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return u+t+t;case 4855:return u+t.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+t;case 4789:return l+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return u+t+l+t+a+t+t;case 5936:switch(w(t,n+11)){case 114:return u+t+a+v(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
1case 108:return u+t+a+v(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return u+t+a+v(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return u+t+a+t+t;case 6165:return u+t+a+"flex-"+t+t;case 5187:return u+t+v(t,/(\w+).+(:[^]+)/,u+"box-$1$2"+a+"flex-$1$2")+t;case 5443:return u+t+a+"flex-item-"+v(t,/flex-|-self/g,"")+(y(t,/flex-|baseline/)?"":a+"grid-row-"+v(t,/flex-|-self/g,""))+t;case 4675:return u+t+a+"flex-line-pack"+v(t,/align-content|flex-|-self/g,"")+t;case 5548:return u+t+a+v(t,"shrink","negative")+t;case 5292:return u+t+a+v(t,"basis","preferred-size")+t;case 6060:return u+"box-"+v(t,"-grow","")+u+t+a+v(t,"grow","positive")+t;case 4554:return u+v(t,/([^-])(transform)/g,"$1"+u+"$2")+t;case 6187:return v(v(v(t,/(zoom-|grab)/,u+"$1"),/(image-set)/,u+"$1"),t,"")+t;case 5495:case 3959:return v(t,/(image-set\([^]*)/,u+"$1$`$1");case 4968:return v(v(t,/(.+:)(flex-)?(.*)/,u+"box-pack:$3"+a+"flex-pack:$3"),/space-between/,"justify")+u+t+t;case 4200:if(!y(t,/flex-|baseline/))return a+"grid-column-align"+x(t,n)+t;break;case 2592:case 3360:return a+v(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,y(e.props,/grid-\w+-end/)}))return~b(t+(r=r[n].value),"span",0)?t:a+v(t,"-start","")+t+a+"grid-row-span:"+(~b(r,"span",0)?y(r,/\d+/):+y(r,/\d+/)-+y(t,/\d+/))+";";return a+v(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return y(e.props,/grid-\w+-start/)})?t:a+v(v(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return v(t,/(.+)-inline(.+)/,u+"$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(w(t,n+1)){case 109:if(45!==w(t,n+4))break;case 102:return v(t,/(.+:)(.+)-([^]+)/,"$1"+u+"$2-$3$1"+l+(108==w(t,n+3)?"$3":"$2-$3"))+t;case 115:return~b(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,i,o,s,l){return a+n+":"+r+l+(i?a+n+"-span:"+(o?s:+s-+r)+l:"")+t});case 4949:if(121===w(t,n+6))return v(t,":",":"+u)+t;break;case 6444:switch(w(t,45===w(t,14)?18:11)){case 120:return v(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+u+(45===w(t,14)?"inline-":"")+"box$3$1"+u+"$2$3$1"+a+"$2box$3")+t;case 100:return v(t,":",":"+a)+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 N([M(e,{value:v(e.value,"@","@"+u)})],r);case d:if(e.length){var i,o;return i=n=e.props,o=function(t){switch(y(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":I(M(e,{props:[v(t,/:(read-\w+)/,":"+l+"$1")]})),I(M(e,{props:[t]})),m(e,{props:E(n,r)});break;case"::placeholder":I(M(e,{props:[v(t,/:(plac\w+)/,":"+u+"input-$1")]})),I(M(e,{props:[v(t,/:(plac\w+)/,":"+l+"$1")]})),I(M(e,{props:[v(t,/:(plac\w+)/,a+"input-$1")]})),I(M(e,{props:[t]})),m(e,{props:E(n,r)})}return""},i.map(o).join("")}}}function F(e,t,n,r,i,o,s,a,l,u,c,f){for(var h=i-1,g=0===i?o:[""],m=g.length,y=0,b=0,w=0;y<r;++y)for(var S=0,k=x(e,h+1,h=p(b=s[y])),E=e;S<m;++S)(E=(b>0?g[S]+" "+k:v(k,/&\f/g,g[S])).trim())&&(l[w++]=E);return P(e,t,n,0===i?d:a,l,u,c,f)}function B(e,t,n,r,i){return P(e,t,n,f,x(e,0,r),x(e,r+1,-1),r,i)}var H=n(68571),U=void 0!==H&&void 0!==H.env&&(H.env.REACT_APP_SC_ATTR||H.env.SC_ATTR)||"data-styled",W="active",q="data-styled-version",X="6.3.12",Y="/*!sc*/\n",G="undefined"!=typeof window&&"undefined"!=typeof document,Z=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==H&&void 0!==H.env&&void 0!==H.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==H.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==H.env.REACT_APP_SC_DISABLE_SPEEDY&&H.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==H&&void 0!==H.env&&void 0!==H.env.SC_DISABLE_SPEEDY&&""!==H.env.SC_DISABLE_SPEEDY&&"false"!==H.env.SC_DISABLE_SPEEDY&&H.env.SC_DISABLE_SPEEDY);function K(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 J=new Map,Q=new Map,ee=1,et=function(e){if(J.has(e))return J.get(e);for(;Q.has(ee);)ee++;var t=ee++;return J.set(e,t),Q.set(t,e),t},en=function(e,t){ee=t+1,J.set(e,t),Q.set(t,e)},er=Object.freeze([]),ei=Object.freeze({}),eo=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]),es=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ea=/(^-|-$)/g;function el(e){return e.replace(es,"-").replace(ea,"")}var eu=/(a)(d)/gi,ec=function(e){return String.fromCharCode(e+(e>25?39:97))};function ed(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ec(t%52)+n;return(ec(t%52)+n).replace(eu,"$1-$2")}var ef,eh=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ep=function(e){return eh(5381,e)};function eg(e){return"string"==typeof e}var em="function"==typeof Symbol&&Symbol.for,ey=em?Symbol.for("react.memo"):60115,ev=em?Symbol.for("react.forward_ref"):60112,eb={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ew={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ex={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eS=((ef={})[ev]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ef[ey]=ex,ef);function ek(e){return("type"in e&&e.type.$$typeof)===ey?ex:"$$typeof"in e?eS[e.$$typeof]:eb}var eE=Object.defineProperty,e_=Object.getOwnPropertyNames,eT=Object.getOwnPropertySymbols,eC=Object.getOwnPropertyDescriptor,eA=Object.getPrototypeOf,eR=Object.prototype;function ej(e){return"function"==typeof e}function eP(e){return"object"==typeof e&&"styledComponentId"in e}function eM(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function eI(e,t){return e.join(t||"")}function eO(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function e$(e,t){Object.defineProperty(e,"toString",{value:t})}var ez=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}return e.prototype.indexOfGroup=function(e){if(e===this._cGroup)return this._cIndex;var t=this._cIndex;if(e>this._cGroup)for(var n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw K(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var s=this.indexOfGroup(e+1),a=0,l=(o=0,t.length);o<l;o++)this.tag.insertRule(s,t[o])&&(this.groupSizes[e]++,s++,a++);a>0&&this._cGroup>e&&(this._cIndex+=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 i=n;i<r;i++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}},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),i=r+n,o=r;o<i;o++)t+=this.tag.getRule(o)+Y;return t},e}(),eL="style[".concat(U,"][").concat(q,'="').concat(X,'"]'),eN=new RegExp("^".concat(U,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),eD=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},eV=function(e){if(!e)return document;if(eD(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(eD(t))return t}return document},eF=function(e,t,n){for(var r,i=n.split(","),o=0,s=i.length;o<s;o++)(r=i[o])&&e.registerName(t,r)},eB=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(Y),i=[],o=0,s=r.length;o<s;o++){var a=r[o].trim();if(a){var l=a.match(eN);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&(en(c,u),eF(e,c,l[3]),e.getTag().insertRules(u,i)),i.length=0}else i.push(a)}}},eH=function(e){for(var t=eV(e.options.target).querySelectorAll(eL
1),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(U)!==W&&(eB(e,i),i.parentNode&&i.parentNode.removeChild(i))}},eU=function(e){var t,r=document.head,i=e||r,o=document.createElement("style"),s=(t=Array.from(i.querySelectorAll("style[".concat(U,"]"))))[t.length-1],a=void 0!==s?s.nextSibling:null;o.setAttribute(U,W),o.setAttribute(q,X);var l=n.nc;return l&&o.setAttribute("nonce",l),i.insertBefore(o,a),o},eW=function(){function e(e){this.element=eU(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){var t;if(e.sheet)return e.sheet;for(var n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets,r=0,i=n.length;r<i;r++){var o=n[r];if(o.ownerNode===e)return o}throw K(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}(),eq=function(){function e(e){this.element=eU(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}(),eX=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):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=G,eG={isServer:!G,useCSSOMInjection:!Z},eZ=function(){function e(e,t,n){void 0===e&&(e=ei),void 0===t&&(t={});var r=this;this.options=(0,i.pi)((0,i.pi)({},eG),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&G&&eY&&(eY=!1,eH(this)),e$(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",i=0;i<n;i++)(function(n){var i=Q.get(n);if(void 0!==i){var o=e.names.get(i);if(void 0!==o&&o.size){var s=t.getGroup(n);if(0!==s.length){var a=U+".g"+n+'[id="'+i+'"]',l="";o.forEach(function(e){e.length>0&&(l+=e+",")}),r+=s+a+'{content:"'+l+'"}'+Y}}}})(i);return r}(r)})}return e.registerId=function(e){return et(e)},e.prototype.rehydrate=function(){!this.server&&G&&eH(this)},e.prototype.reconstructWithOptions=function(t,n){void 0===n&&(n=!0);var r=new e((0,i.pi)((0,i.pi)({},this.options),t),this.gs,n&&this.names||void 0);return!this.server&&G&&t.target!==this.options.target&&eV(this.options.target)!==eV(t.target)&&eH(r),r},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 ez(e.isServer?new eX(n):t?new eW(n):new eq(n))))},e.prototype.hasNameForId=function(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r},e.prototype.registerName=function(e,t){et(e);var n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(et(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(et(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}();function eK(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 eJ=Symbol.for("sc-keyframes"),eQ=function(e){return null==e||!1===e||""===e},e0=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!eQ(r)&&(Array.isArray(r)&&r.isCss||ej(r)?t.push("".concat(eK(n),":"),r,";"):eO(r)?t.push.apply(t,(0,i.ev)((0,i.ev)(["".concat(n," {")],e0(r),!1),["}"],!1)):t.push("".concat(eK(n),": ").concat(null==r||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in s||n.startsWith("--")?String(r).trim():"".concat(r,"px"),";")))}return t};function e1(e,t,n,r,i){if(void 0===i&&(i=[]),"string"==typeof e)return e&&i.push(e),i;if(eQ(e))return i;if(eP(e))return i.push(".".concat(e.styledComponentId)),i;if(ej(e))return!ej(e)||e.prototype&&e.prototype.isReactComponent||!t?(i.push(e),i):e1(e(t),t,n,r,i);if("object"==typeof e&&null!==e&&eJ in e)return n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i;if(eO(e)){for(var o=e0(e),s=0;s<o.length;s++)i.push(o[s]);return i}if(!Array.isArray(e))return i.push(e.toString()),i;for(s=0;s<e.length;s++)e1(e[s],t,n,r,i);return i}function e2(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ej(n)&&!eP(n))return!1}return!0}var e5=ep(X),e3=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&e2(e),this.componentId=t,this.baseHash=eh(e5,t),this.baseStyle=n,eZ.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n
1).className:"";if(this.isStatic&&!n.hash){if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=eM(r,this.staticRulesId);else{var i=eI(e1(this.rules,e,t,n)),o=ed(eh(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,o)){var s=n(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,s)}r=eM(r,o),this.staticRulesId=o}}else{for(var a=eh(this.baseHash,n.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=eI(e1(c,e,t,n));a=eh(eh(a,String(u)),d),l+=d}}if(l){var f=ed(a>>>0);if(!t.hasNameForId(this.componentId,f)){var h=n(l,".".concat(f),void 0,this.componentId);t.insertRules(this.componentId,f,h)}r=eM(r,f)}}return{className:r,css:"undefined"==typeof window?t.getTag().getGroup(et(this.componentId)):""}},e}(),e4=/&/g;function e6(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,n=0,r=0,i=!1,o=0;o<t;o++){var s=e.charCodeAt(o);if(0!==r||i||47!==s||42!==e.charCodeAt(o+1)){if(i)42===s&&47===e.charCodeAt(o+1)&&(i=!1,o++);else if(34!==s&&39!==s||0!==o&&92===e.charCodeAt(o-1)){if(0===r){if(123===s)n++;else if(125===s&&--n<0)return!0}}else 0===r?r=s:r===s&&(r=0)}else i=!0,o++}return 0!==n||0!==r}function e8(e){var t,n,r,i,o,s,a=void 0===e?ei:e,l=a.options,u=void 0===l?ei:l,f=a.plugins,h=void 0===f?er:f,m=function(e,t,n){return n.startsWith(o)&&n.endsWith(o)&&n.replaceAll(o,"").length>0?".".concat(i):e},y=h.slice();y.push(function(e){e.type===d&&e.value.includes("&")&&(s||(s=RegExp("\\".concat(o,"\\b"),"g")),e.props[0]=e.props[0].replace(e4,o).replace(s,m))}),u.prefix&&y.push(V),y.push(D);var E=[],M=(n=(t=y.concat((r=function(e){return E.push(e)},function(e){!e.root&&(e=e.return)&&r(e)}))).length,function(e,r,i,o){for(var s="",a=0;a<n;a++)s+=t[a](e,r,i,o)||"";return s}),I=function(e,t,n,r){void 0===t&&(t=""),void 0===n&&(n=""),void 0===r&&(r="&"),i=r,o=t,s=void 0;var a,l,d,f=function(e){if(!e6(e))return e;for(var t=e.length,n="",r=0,i=0,o=0,s=!1,a=0;a<t;a++){var l=e.charCodeAt(a);if(0!==o||s||47!==l||42!==e.charCodeAt(a+1)){if(s)42===l&&47===e.charCodeAt(a+1)&&(s=!1,a++);else if(34!==l&&39!==l||0!==a&&92===e.charCodeAt(a-1)){if(0===o){if(123===l)i++;else if(125===l){if(--i<0){for(var u=a+1;u<t;){var c=e.charCodeAt(u);if(59===c||10===c)break;u++}u<t&&59===e.charCodeAt(u)&&u++,i=0,a=u-1,r=u;continue}0===i&&(n+=e.substring(r,a+1),r=a+1)}else 59===l&&0===i&&(n+=e.substring(r,a+1),r=a+1)}}else 0===o?o=l:o===l&&(o=0)}else s=!0,a++}if(r<t){var d=e.substring(r);e6(d)||(n+=d)}return n}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,n=[],r=0,i=0,o=0,s=0;i<t;){var a=e.charCodeAt(i);if(34!==a&&39!==a||0!==i&&92===e.charCodeAt(i-1)){if(0===o){if(47===a&&i+1<t&&42===e.charCodeAt(i+1)){for(i+=2;i+1<t&&(42!==e.charCodeAt(i)||47!==e.charCodeAt(i+1));)i++;i+=2}else if(40===a&&i>=3&&108==(32|e.charCodeAt(i-1))&&114==(32|e.charCodeAt(i-2))&&117==(32|e.charCodeAt(i-3)))s=1,i++;else if(s>0)41===a?s--:40===a&&s++,i++;else if(42===a&&i+1<t&&47===e.charCodeAt(i+1))i>r&&n.push(e.substring(r,i)),r=i+=2;else if(47===a&&i+1<t&&47===e.charCodeAt(i+1)){for(i>r&&n.push(e.substring(r,i));i<t&&10!==e.charCodeAt(i);)i++;r=i}else i++}else i++}else 0===o?o=a:o===a&&(o=0),i++}return 0===r?e:(r<t&&n.push(e.substring(r)),n.join(""))}(e)),h=(d=function e(t,n,r,i,o,s,a,l,u){for(var d,f=0,h=0,m=a,y=0,E=0,C=0,M=1,I=1,N=1,D=0,V="",H=o,U=s,W=i,q=V;I;)switch(C=D,D=O()){case 40:if(108!=C&&58==w(q,m-1)){-1!=b(q+=v(L(D),"&","&\f"),"&\f",p(f?l[f-1]:0))&&(N=-1);break}case 34:case 39:case 91:q+=L(D);break;case 9:case 10:case 13:case 32:q+=function(e){for(;R=$();)if(R<33)O();else break;return z(e)>2||z(R)>3?"":" "}(C);break;case 92:q+=function(e,t){for(var n;--t&&O()&&!(R<48)&&!(R>102)&&(!(R>57)||!(R<65))&&(!(R>70)||!(R<97)););return n=A+(t<6&&32==$()&&32==O()),x(j,e,n)}(A-1,7);continue;case 47:switch($()){case 42:case 47:k(P(d=function(e,t){for(;O();)if(e+R===57)break;else if(e+R===84&&47===$())break;return"/*"+x(j,t,A-1)+"*"+g(47===e?e:O())}(O(),A),n,r,c,g(R),x(d,2,-2),0,u),u),(5==z(C||1)||5==z($()||1))&&S(q)&&" "!==x(q,-1,void 0)&&(q+=" ");break;default:q+="/"}break;case 123*M:l[f++]=S(q)*N;case 125*M:case 59:case 0:switch(D){case 0:case 125:I=0;case 59+h:-1==N&&(q=v(q,/\f/g,"")),E>0&&(S(q)-m||0===M&&47===C)&&k(E>32?B(q+";",i,r,m-1,u):B(v(q," ","")+";",i,r,m-2,u),u);break;case 59:q+=";";default:if(k(W=F(q,n,r,f,h,o,l,V,H=[],U=[],m,s),s),123===D){if(0===h)e(q,n,W,W,H,s,m,l,U);else{switch(y){case 99:if(110===w(q,3))break;case 108:if(97===w(q,2))break;default:h=0;case 100:case 109:case 115:}h?e(t,W,W,i&&k(F(t,W,W,0,0,o,l,V,o,H=[],m,U),U),o,U,m,l,i?H:U):e(q,W,W,W,[""],U,0,l,U)}}}f=h=E=0,M=N=1,V=q="",m=a;break;case 58:m=1+S(q),E=C;default:if(M<1){if(123==D)--M;else if(125==D&&0==M++&&125==(R=A>0?w(j,--A):0,T--,10===R&&(T=1,_--),R))continue}switch(q+=g(D),D*M){case 38:N=h>0?1:(q+="\f",-1);break;case 44:l[f++]=(S(q)-1)*N,N=1;break;case 64:45===$()&&(q+=L(O())),y=$(),h=m=S(V=q+=function(e){for(;!z($());)O();return x(j,e,A)}(A)),D++;break;case 45:45===C&&2==S(q)&&(M=0)}}return s}("",null,null,null,[""],(l=a=n||t?"".concat(n," ").concat(t," { ").concat(f," }"):f,_=T=1,C=S(j=l),A=0,a=[]),0,[0],a),j="",d);return u.namespace&&(h=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})}(h,u.namespace)),E=[],N(h,M),E};return I.hash=h.length?h.reduce(function(e,t){return t.name||K(15),eh(e,t.name)},5381).toString():"",I}var e7=new eZ,e9=e8(),te=o.createContext({shouldForwardProp:void 0,styleSheet:e7,stylis:e9}),tt=(te.Consumer,o.createContext(void 0));function tn(){return o.useContext(te)}function tr(e){if(!o.useMemo)return e.children;var t=tn().styleSheet,n=o.useMemo(function(){var n=t;return e.sheet?n=e.sheet:e.target&&(n=n.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(n=n.reconstructWithOptions({useCSSOMInjection:!1})),n},[e.disableCSSOMInjection,e.sheet,e.target,t]),r=o.useMemo(function(){return e8({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins]),i=o.useMemo(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:n,stylis:r}},[e.shouldForwardProp,n,r]);return o.createElement(te.Provider,{value:i},o.createElement(tt.Provider,{value:r},e.children))}var ti=o.createContext(void 0);function to(){var e=o.useContext(ti);if(!e)throw K(18);return e}function ts(e){var t=o.useContext(ti),n=o.useMemo(function(){return function(e,t){if(!e)throw K(14);if(ej(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw K(8);return t?(0,i.pi)((0,i.pi)({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?o.createElement(ti.Provider,{value:n},e.children):null}ti.Consumer;var ta={};function tl(e,t,n){var r,s,a,l,u=eP(e),c=!eg(e),d=t.attrs,f=void 0===d?er:
1d,h=t.componentId,p=void 0===h?(r=t.displayName,s=t.parentComponentId,ta[a="string"!=typeof r?"sc":el(r)]=(ta[a]||0)+1,l="".concat(a,"-").concat(ed(ep(X+a+ta[a])>>>0)),s?"".concat(s,"-").concat(l):l):h,g=t.displayName,m=void 0===g?eg(e)?"styled.".concat(e):"Styled(".concat(e.displayName||e.name||"Component",")"):g,y=t.displayName&&t.componentId?"".concat(el(t.displayName),"-").concat(t.componentId):t.componentId||p,v=u&&e.attrs?e.attrs.concat(f).filter(Boolean):f,b=t.shouldForwardProp;if(u&&e.shouldForwardProp){var w=e.shouldForwardProp;if(t.shouldForwardProp){var x=t.shouldForwardProp;b=function(e,t){return w(e,t)&&x(e,t)}}else b=w}var S=new e3(n,y,u?e.componentStyle:void 0);function k(e,t){return function(e,t,n){var r,s,a=e.attrs,l=e.componentStyle,u=e.defaultProps,c=e.foldedComponentIds,d=e.styledComponentId,f=e.target,h=o.useContext(ti),p=tn(),g=e.shouldForwardProp||p.shouldForwardProp,m=(void 0===(r=u)&&(r=ei),t.theme!==r.theme&&t.theme||h||r.theme||ei),y=function(e,t,n){for(var r,o=(0,i.pi)((0,i.pi)({},t),{className:void 0,theme:n}),s=0;s<e.length;s+=1){var a=ej(r=e[s])?r(o):r;for(var l in a)"className"===l?o.className=eM(o.className,a[l]):"style"===l?o.style=(0,i.pi)((0,i.pi)({},o.style),a[l]):l in t&&void 0===t[l]||(o[l]=a[l])}return"className"in t&&"string"==typeof t.className&&(o.className=eM(o.className,t.className)),o}(a,t,m),v=y.as||f,b={};for(var w in y)void 0===y[w]||"$"===w[0]||"as"===w||"theme"===w&&y.theme===m||("forwardedAs"===w?b.as=y.forwardedAs:g&&!g(w,v)||(b[w]=y[w]));var x=(s=tn(),l.generateAndInjectStyles(y,s.styleSheet,s.stylis)).className,S=eM(c,d);return x&&(S+=" "+x),y.className&&(S+=" "+y.className),b[eg(v)&&!eo.has(v)?"class":"className"]=S,n&&(b.ref=n),(0,o.createElement)(v,b)}(E,e,t)}k.displayName=m;var E=o.forwardRef(k);return E.attrs=v,E.componentStyle=S,E.displayName=m,E.shouldForwardProp=b,E.foldedComponentIds=u?eM(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&&!eO(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(var i=0;i<n.length;i++)t[i]=e(t[i],n[i]);else if(eO(n))for(var i in n)t[i]=e(t[i],n[i]);return t})(e,t[r],!0);return e}({},e.defaultProps,t):t}}),e$(E,function(){return".".concat(E.styledComponentId)}),c&&function e(t,n,r){if("string"!=typeof n){if(eR){var i=eA(n);i&&i!==eR&&e(t,i,r)}var o=e_(n);eT&&(o=o.concat(eT(n)));for(var s=ek(t),a=ek(n),l=0;l<o.length;++l){var u=o[l];if(!(u in ew||r&&r[u]||a&&u in a||s&&u in s)){var c=eC(n,u);try{eE(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,i=t.length;r<i;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)||eO(e)?tc(e1(tu(er,(0,i.ev)([e],t,!0)))):0===t.length&&1===e.length&&"string"==typeof e[0]?e1(e):tc(e1(tu(e,t)))}var tf=function(e){return function e(t,n,r){if(void 0===r&&(r=ei),!n)throw K(1,n);var o=function(e){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return t(n,r,td.apply(void 0,(0,i.ev)([e],o,!1)))};return o.attrs=function(o){return e(t,n,(0,i.pi)((0,i.pi)({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return e(t,n,(0,i.pi)((0,i.pi)({},r),o))},o}(tl,e)},th=tf;eo.forEach(function(e){th[e]=tf(e)}),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=e2(e),eZ.registerId(this.componentId+1)}e.prototype.createStyles=function(e,t,n,r){var i=r(eI(e1(this.rules,t,n,r)),""),o=this.componentId+e;n.insertRules(o,o,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&eZ.registerId(this.componentId+e);var i=this.componentId+e;this.isStatic?n.hasNameForId(i,i)||this.createStyles(e,t,n,r):(this.removeStyles(e,n),this.createStyles(e,t,n,r))}}();var tp=function(){function e(e,t){var n=this;this[r]=!0,this.inject=function(e,t){void 0===t&&(t=e9);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,e$(this,function(){throw K(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=e9),this.name+e.hash},e}();function tg(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];
1var r=eI(td.apply(void 0,(0,i.ev)([e],t,!1)));return new tp(ed(ep(r)>>>0),r)}r=eJ,function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=n.nc,i=eI([r&&'nonce="'.concat(r,'"'),"".concat(U,'="true"'),"".concat(q,'="').concat(X,'"')].filter(Boolean)," ");return"<style ".concat(i,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw K(2);return e._emitSheetCSS()},this.getStyleElement=function(){if(e.sealed)throw K(2);var t,r=e.instance.toString();if(!r)return[];var s=((t={})[U]="",t[q]=X,t.dangerouslySetInnerHTML={__html:r},t),a=n.nc;return a&&(s.nonce=a),[o.createElement("style",(0,i.pi)({},s,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new eZ({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw K(2);return o.createElement(tr,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw K(3)}}()},14719:function(){},68571:function(e){var t,n,r,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var l=[],u=!1,c=-1;function d(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=a(d);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c<t;)r&&r[c].run();c=-1,t=l.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||u||a(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},95082:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(37401),i=n(81695),o=n(7653);function s(e){let{zIndex:t}=e,n=(0,i.useRouter)(),s=(0,o.useRef)(n),[a,l]=(0,o.useState)();(0,o.useEffect)(()=>{s.current=n},[n]),(0,o.useEffect)(()=>{let e=(0,r.e)({zIndex:t,history:{subscribe:e=>(l(()=>e),()=>l(void 0)),update:e=>{switch(e.type){case"push":return s.current.push(e.url);case"pop":return s.current.back();case"replace":return s.current.replace(e.url);default:throw Error("Unknown update type: ".concat(e.type))}}}});return()=>e()},[t]);let u=(0,i.usePathname)(),c=(0,i.useSearchParams)();return(0,o.useEffect)(()=>{a&&a({type:"push",url:"".concat(u).concat((null==c?void 0:c.size)?"?".concat(c):"")})},[a,u,c]),null}},37401:function(e,t,n){"use strict";let r;n.d(t,{a:function(){return eo},c:function(){return A},e:function(){return eu},o:function(){return H},s:function(){return T},v:function(){return m}});var i,o={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},s={0:8203,1:8204,2:8205,3:65279},a=[,,,,].fill(String.fromCodePoint(s[0])).join(""),l=Object.fromEntries(Object.entries(s).map(e=>e.reverse())),u=Object.fromEntries(Object.entries(o).map(e=>e.reverse())),c=`${Object.values(o).map(e=>`\\u{${e.toString(16)}}`).join("")}`,d=RegExp(`[${c}]{4,}`,"gu"),f=n(27573);let h=new Uint8Array(16),p=[];for(let e=0;e<256;++e)p.push((e+256).toString(16).slice(1));var g={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function m(e,t,n){if(g.randomUUID&&!t&&!e)return g.randomUUID();let i=(e=e||{}).random||(e.rng||function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(h)})();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return p[e[t+0]]+p[e[t+1]]+p[e[t+2]]+p[e[t+3]]+"-"+p[e[t+4]]+p[e[t+5]]+"-"+p[e[t+6]]+p[e[t+7]]+"-"+p[e[t+8]]+p[e[t+9]]+"-"+p[e[t+10]]+p[e[t+11]]+p[e[t+12]]+p[e[t+13]]+p[e[t+14]]+p[e[t+15]]}(i)}let y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,v=/_key\s*==\s*['"](.*)['"]/,b=/^\d*:\d*$/;function w(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function x(e){return"string"==typeof e?v.test(e.trim()):"object"==typeof e&&"_key"in e}function S(e){if("string"==typeof e&&b.test(e))return!0;
1if(!Array.isArray(e)||2!==e.length)return!1;let[t,n]=e;return!("number"!=typeof t&&""!==t||"number"!=typeof n&&""!==n)}function k(e){if(!Array.isArray(e))throw Error("Path is not an array");return e.reduce((e,t,n)=>{let r=typeof t;if("number"===r)return"".concat(e,"[").concat(t,"]");if("string"===r)return"".concat(e).concat(0===n?"":".").concat(t);if(x(t)&&t._key)return"".concat(e,'[_key=="').concat(t._key,'"]');if(Array.isArray(t)){let[n,r]=t;return"".concat(e,"[").concat(n,":").concat(r,"]")}throw Error("Unsupported path segment `".concat(JSON.stringify(t),"`"))},"")}function E(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(y);if(!t)throw Error("Invalid path string");return t.map(_)}function _(e){return w(e)?Number(e.replace(/[^\d]/g,"")):x(e)?{_key:e.match(v)[1]}:S(e)?function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e):e}var T=Object.freeze({__proto__:null,fromString:E,get:function(e,t,n){let r="string"==typeof t?E(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<r.length;e++){let t=r[e];if(w(t)){if(!Array.isArray(i))return n;i=i[t]}if(x(t)){if(!Array.isArray(i))return n;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),void 0===i)return n}return i},isIndexSegment:w,isIndexTuple:S,isKeySegment:x,reKeySegment:v,toString:k});let C="drafts.";function A(e){let{baseUrl:t,workspace:n="default",tool:r="default",id:i,type:o,path:s}=e;if(!t)throw Error("baseUrl is required");if(!s)throw Error("path is required");if(!i)throw Error("id is required");if("/"!==t&&t.endsWith("/"))throw Error("baseUrl must not end with a slash");let a="default"===n?void 0:n,l="default"===r?void 0:r,u=i.startsWith(C)?i.slice(C.length):i,c=Array.isArray(s)?k(s.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(""!==e._key)return{_key:e._key};if(-1!==e._index)return e._index;throw Error("invalid segment:".concat(JSON.stringify(e)))})):s,d=new URLSearchParams({baseUrl:t,id:u,type:o,path:c});a&&d.set("workspace",a),l&&d.set("tool",l);let f=["/"===t?"":t];a&&f.push(a);let h=["mode=presentation","id=".concat(u),"type=".concat(o),"path=".concat(encodeURIComponent(c))];return l&&h.push("tool=".concat(l)),f.push("intent","edit","".concat(h.join(";"),"?").concat(d)),f.join("/")}var R,j,P,M,I=class extends Error{issues;constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};function O(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function $(e){return{lang:e?.lang??R?.lang,message:e?.message,abortEarly:e?.abortEarly??R?.abortEarly,abortPipeEarly:e?.abortPipeEarly??R?.abortPipeEarly,skipPipe:e?.skipPipe??R?.skipPipe}}function z(e,t,n,r){var i,o,s;let a=e.message??(o=r.lang,M?.get(t)?.get(o))??("type"===e.type?(i=r.lang,P?.get(i)):null)??n?.message??(s=r.lang,j?.get(s))??r.message;return"function"==typeof a?a(r):a}function L(e,t,n){return{typed:e,output:t,issues:n}}function N(e){let t=typeof e;return"object"===t&&(t=e?Object.getPrototypeOf(e).constructor.name:"null"),"string"===t?`"${e}"`:"number"===t||"bigint"===t||"boolean"===t?`${e}`:t}function D(e,t,n,r){if(e.pipe&&!n?.skipPipe)for(let i of e.pipe){let o=i._parse(t);if(o.issues){for(let t of o.issues){let i=function(e,t,n){let r=n.received??N(n.input),i={reason:e.type,context:n.context.type,expected:n.context.expects,received:r,message:`Invalid ${n.label}: ${n.context.expects?`Expected ${n.context.expects} but r`:"R"}eceived ${r}`,input:n.input,requirement:n.context.requirement,path:n.path,lang:t?.lang,abortEarly:t?.abortEarly,abortPipeEarly:t?.abortPipeEarly,skipPipe:t?.skipPipe};return i.message=z(n.context,n.reference,t,i),i}(e,n,t);r?r.push(i):r=[i]}if(n?.abortEarly||n?.abortPipeEarly)break}else t=o.output}return L(!0,t,r)}function V(e,t,n,r,i){let o=N(n),s=i?.expected??e.expects,a={reason:i?.reason??"type",context:e.type,expected:s,received:o,message:`Invalid type: Expected ${s} but received ${o}`,input:n,path:i?.path,issues:i?.issues,lang:r?.lang,abortEarly:r?.abortEarly,abortPipeEarly:r?.abortPipeEarly,skipPipe:r?.skipPipe};return a.message=z(e,t,r,a),{typed:!1,output:n,issues:[a]}}function F(e,t,n,r){let i;let[o,s,a]=function(e,t,n){if(!e||"object"==typeof e&&!Array.isArray(e)){let[r,i]=O(t,n);return[e,r,i]}let[r,i]=O(e,t);return[void 0,r,i]}(t,n,r);return{type:"object",expects:"Object",async:!1,entries:e,rest:o,message:s,pipe:a,_parse(e,t){if(e&&"object"==typeof e){i=i??Object.entries(this.entries);let n,r=!0,o={};for(let[s,a]of i){let i=e[s],l=a._parse(i,t);if(l.issues){let o={type:"object",origin:"value",input:e,key:s,value:i};for(let e of l.issues)e.path?e.path.unshift(o):e.path=[o],n?.push(e);if(n||(n=l.issues),t?.abortEarly){r=!1;break}}l.typed||(r=!1),(void 0!==l.output||s in e)&&(o[s]=l.output)}if(this.rest&&(!t?.abortEarly||!n)){for(let i in e)if(!(i in this.entries)){let s=e[i],a=this.rest._parse(s,t);if(a.issues){let o={type:"object",origin:"value",input:e,key:i,value:s};for(let e of a.issues)e.path?e.path.unshift(o):e.path=[o],n?.push(e);if(n||(n=a.issues),t?.abortEarly){r=!1;break}}a.typed||(r=!1),o[i]=a.output}}return r?D(this,o,t,n):L(!1,o,n)}return V(this,F,e,t)}}}function B(e,t,n){let r=e._parse(t,$(n));return{typed:r.typed,success:!r.issues,data:r.output,output:r.output,error:r.issues&&new I(r.issues),issues:r.issues}}function H(e){let t="";for(let n of e)"string"!=typeof n?"number"!=typeof n?null!==n&&Array.isArray(n)?(t&&(t+=":"),t+="".concat(n.join(","),"}")):n._key&&(t&&(t+=":"),t+="".concat(n._key)):(t&&(t+=":"),t+="".concat(n)):(t&&(t+="."),t+=n);return t}let U=/^([A-Za-z]+):([0-9]+)$/,W=/^([A-Za-z]+):([0-9]+),([0-9]+)$/,q=/^([A-Za-z]+):([a-z0-9]+)$/,X=function e(t,n){let[r,i]=O(t,n);return{type:"string",expects:"string",async:!1,message:r,pipe:i,_parse(t,n){return"string"==typeof t?D(this,t,n):V(this,e,t,n)}}}([function e(t,n){return{type:"min_length",expects:`>=${t}`,async:!1,message:n,requirement:t,_parse(t){return t.length>=this.requirement?{output:t}:{issues:[{context:this,reference:e,input:t,label:"length",received:`${t.length}`}]}}}}(1)]),Y={type:"optional",expects:`${X.expects} | undefined`,async:!1,wrapped:X,default:i,_parse(e,t){if(void 0===e){let t="function"==typeof this.default?this.default():this.default;if(void 0===t)return L(!0,e);e=t}return this.wrapped._parse(e,t)}},G=F({id:X,path:X,type:Y,baseUrl:X,workspace:Y,tool:Y}),Z=F({origin:X,href:X,data:Y}),K="sanity-visual-editing";function J(e,t=!1){return d.lastIndex=0,d.test(e)?function(e,t=!1){var n;let r=function(e){let t=e.match(d);if(t)return function(e,t=!1){let n=Array.from(e);if(n.length%2==0){if(n.length%4||!e.startsWith(a))return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${u[e[2*t].codePointAt(0)]}${u[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let i=[],o=[r.join("")],s=10;for(;o.length;){let e=o.shift();try{if(i.push(JSON.parse(e)),t)break}catch(r){if(!s--)throw r;let t=+(null==(n=r.message.match(/\sposition\s(\d+)$/))?void 0:n[1]);if(!t)throw r;o.unshift(e.substring(0,t),e.substring(t))}}return i}(n,t)}
1else 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=>l[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 r&&"sanity.io"===r.origin?(t&&(r.href=null==(n=r.href)?void 0:n.replace(".alt","")),JSON.stringify(r)):""}(e,t):""}let Q=e=>e.nodeType===Node.ELEMENT_NODE,ee=e=>"IMG"===e.tagName,et=e=>"TIME"===e.tagName;function en(e){return"path"in e}function er(e){var t,n,r;let i=[];function o(e,t){let n=function(e){try{return function(e){let t=B(G,e);if(t.success)return t.output;let n=B(Z,e);if(n.success)try{let e=new URL(n.output.href,"undefined"==typeof document?"https://example.com":location.origin);return e.searchParams.size>0?function(e,t,n){let r=e._parse(t,$(void 0));if(r.issues)throw new I(r.issues);return r.output}(G,Object.fromEntries(e.searchParams.entries())):n.output}catch(e){return console.error("Failed to parse sanity node",e),n.output}}(JSON.parse(e))}catch{return function(e){var t;let n=e.split(";").reduce((e,t)=>{let[n,r]=t.split("=");if(!n||!r)return e;switch(n){case"id":e.id=r;break;case"type":e.type=r;break;case"path":e.path=T.toString(function(e){let t=[];for(let n of e.split(".")){let e=U.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=W.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=q.exec(n);i?t.push(i[1],{_key:i[2]}):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}return e},{});if(!G._parse(n,{abortEarly:!0,skipPipe:$(t)?.skipPipe}).issues)return n}(e)}}(t);if(!n)return;let r=function e(t){let{display:n}=window.getComputedStyle(t);if("inline"!==n)return t;let r=t.parentElement;return r?e(r):null}(e);r&&i.push({elements:{element:e,measureElement:r},sanity:n})}if(e)for(let s of e.childNodes){let{nodeType:e,parentElement:a,textContent:l}=s;if(Q(s)&&void 0!==(null==(t=s.dataset)?void 0:t.sanityEditTarget)){let e=er(s).map(({sanity:e})=>e);if(!e.map(e=>en(e)).every((e,t,n)=>e===n[0]))continue;let t=function(e){if(!e.length||!e.map(e=>en(e)).every((e,t,n)=>e===n[0]))return;if(!en(e[0]))return e[0];let t=e.filter(en),n=e[0],r=["projectId","dataset","id","baseUrl","workspace","tool"];for(let e=1;e<t.length;e++){let i=t[e];if(r.some(e=>i[e]!==(null==n?void 0:n[e]))){n=void 0;break}n.path=function(e,t){let n=e.split("."),r=t.split("."),i=Math.min(n.length,r.length);return n=n.slice(0,i).reverse(),r=r.slice(0,i).reverse(),n.reduce((e,t,n)=>t===r[n]?[...e,t]:[],[]).reverse().join(".")}(n.path,i.path)}return n}(e);t&&i.push({elements:{element:s,measureElement:s},sanity:t})}else if(e===Node.TEXT_NODE&&a&&l){let e=J(l);if(!e)continue;o(a,e)}else if(Q(s)){if("SCRIPT"===s.tagName||s.id===K)continue;if(null==(n=s.dataset)?void 0:n.sanity)o(s,s.dataset.sanity);else if(null==(r=s.dataset)?void 0:r.sanityEditInfo)o(s,s.dataset.sanityEditInfo);else{if(ee(s)){let e=J(s.alt,!0);if(!e)continue;o(s,e);continue}et(s)&&o(s,J(s.dateTime,!0))}i.push(...er(s))}}return i}function ei(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function eo({handler:e,overlayElement:t,preventDefault:n}){let r=!1,i=new Map,o=new WeakMap,s=new Set,a=new WeakMap,l,u,c,d=[],f=()=>d[d.length-1];function h(e,t){e.removeEventListener("click",t.click,{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 p({id:t,elements:n,handlers:r,sanity:i}){let{element:o,measureElement:s}=n;o.addEventListener("click",r.click,{capture:!0}),o.addEventListener("mousemove",r.mousemove,{once:!0,capture:!0}),o.addEventListener("mousedown",r.mousedown,{capture:!0}),l.observe(s),e({type:"element/activate",id:t,rect:ei(o),sanity:i})}function g(r){for(let c of er(r))c.elements.element instanceof HTMLElement&&!o.has(c.elements.element)&&function({elements:r,sanity:c}){let{element:h,measureElement:g}=r,y={click(t){let r=t.target;h===f()&&h.contains(r)&&(n&&(t.preventDefault(),t.stopPropagation()),e({type:"element/click",id:v,sanity:c}))},mousedown(e){e.preventDefault()},mousemove(e){y.mouseenter(e);let t=e.currentTarget;t&&(t.addEventListener("mouseenter",y.mouseenter),t.addEventListener("mouseleave",y.mouseleave))},mouseenter(){d.push(h),e({type:"element/mouseenter",id:v,rect:ei(h)})},mouseleave(n){function r(){d.pop();let t=f();if(e({type:"element/mouseleave",id:v}),t){let n=o.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:ei(t)})}}let{relatedTarget:i}=n;if(i instanceof HTMLElement&&t.contains(i)){let e=()=>{r(),i.removeEventListener("mouseleave",e)};i.addEventListener("mouseleave",e)}else r()}},v=m(),b={id:v,elements:r,sanity:c,handlers:y};s.add(h),a.set(g,h),i.set(v,h),o.set(h,b),u.observe(h),l.observe(g),e({type:"element/register",id:v,rect:ei(h),sanity:c}),p(b)}(c)}function y(t){let n=o.get(t);if(n){let{id:r,handlers:a}=n;h(t,a),l.unobserve(t),o.delete(t),s.delete(t),i.delete(r),e({type:"element/unregister",id:r})}}function v(e){if(e.filter(e=>{let n=e.target;return!(n===t||t.contains(n))&&(n instanceof HTMLElement&&(o.has(n)?er({childNodes:[n]}).length||y(n):g({childNodes:[n]})),!0)}).length)for(let e of s)e.isConnected?b(e):y(e)}function b(t){let n=o.get(t);n&&e({type:"element/updateRect",id:n.id,rect:ei(t)})}function w(e){for(let t of e){let e=t.target;if(e instanceof HTMLElement){let t=a.get(e);if(!t)return;b(t)}}}function x(t){for(let n of t){let{target:t}=n,r=t instanceof HTMLElement&&o.get(t);r&&(n.isIntersecting?p(r):function({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;h(i,r),l.unobserve(o),d=d.filter(e=>e!==i),e({type:"element/deactivate",id:t})}(r))}}function S(){d=[],e({type:"overlay/blur"})}function k(){for(let e of s)b(e)}function E(e){let{target:t}=e;if(t!==window.document&&t instanceof HTMLElement)for(let e of s)t.contains(e)&&b(e)}function _(){r||(window.addEventListener("click",S),window.addEventListener("resize",k),window.addEventListener("scroll",E,{capture:!0,passive:!0}),u=new IntersectionObserver(x,{threshold:.3}),l=new ResizeObserver(w),(c=new MutationObserver(v)).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),g(document.body),r=!0,e({type:"overlay/activate"}))}return window.document.fonts.ready.then(()=>{for(let e of s)b(e)}),_(),{activate:_,deactivate:function(){r&&(window.removeEventListener("click",S),window.removeEventListener("resize",k),window.removeEventListener("scroll",E),u.disconnect(),c.disconnect(),l.disconnect(),s.forEac
1h(e=>{y(e)}),i.clear(),s.clear(),d=[],r=!1,e({type:"overlay/deactivate"}))}}}let es=null,ea=null,el=null;function eu(e={}){el&&clearTimeout(el);let t=new AbortController;return Promise.all([Promise.resolve().then(n.t.bind(n,42291,19)),Promise.all([n.e(6271),n.e(6892)]).then(n.bind(n,61032))]).then(([n,{Overlays:r}])=>{if(t.signal.aborted)return;let{history:i,zIndex:o}=e;if(es||((es=document.createElement("div")).id=K,document.body.appendChild(es)),!ea){let{createRoot:e}="default"in n?n.default:n;ea=e(es)}ea.render((0,f.jsx)(r,{history:i,zIndex:o}))}),()=>{t.abort(),el=window.setTimeout(()=>{ea&&(ea.unmount(),ea=null),es&&(document.body.removeChild(es),es=null)},1e3)}}},75184:function(e,t,n){"use strict";n.d(t,{x7:function(){return ej},X5:function(){return e_},Me:function(){return eS},oo:function(){return eM},US:function(){return ek},RR:function(){return eC},Cp:function(){return eR},dr:function(){return eP},cv:function(){return eE},uY:function(){return eT},dp:function(){return eA}});let r=["top","right","bottom","left"],i=r.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),o=Math.min,s=Math.max,a=Math.round,l=Math.floor,u=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function f(e,t){return"function"==typeof e?e(t):e}function h(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function g(e){return"x"===e?"y":"x"}function m(e){return"y"===e?"height":"width"}let y=new Set(["top","bottom"]);function v(e){return y.has(h(e))?"y":"x"}function b(e,t,n){void 0===n&&(n=!1);let r=p(e),i=g(v(e)),o=m(i),s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=_(s)),[s,_(s)]}function w(e){return e.replace(/start|end/g,e=>d[e])}let x=["left","right"],S=["right","left"],k=["top","bottom"],E=["bottom","top"];function _(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function T(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function C(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function A(e,t,n){let r,{reference:i,floating:o}=e,s=v(t),a=g(v(t)),l=m(a),u=h(t),c="y"===s,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,y=i[l]/2-o[l]/2;switch(u){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:f};break;case"left":r={x:i.x-o.width,y:f};break;default:r={x:i.x,y:i.y}}switch(p(t)){case"start":r[a]-=y*(n&&c?-1:1);break;case"end":r[a]+=y*(n&&c?-1:1)}return r}let R=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await (null==s.isRTL?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=A(u,r,l),f=r,h={},p=0;for(let n=0;n<a.length;n++){let{name:o,fn:g}=a[n],{x:m,y:y,data:v,reset:b}=await g({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=m?m:c,d=null!=y?y:d,h={...h,[o]:{...h[o],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(u=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:c,y:d}=A(u,f,l)),n=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function j(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=f(t,e),g=T(p),m=a[h?"floating"===d?"reference":"floating":d],y=C(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v="floating"===d?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),w=await (null==o.isElement?void 0:o.isElement(b))&&await (null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},x=C(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-x.top+g.top)/w.y,bottom:(x.bottom-y.bottom+g.bottom)/w.y,left:(y.left-x.left+g.left)/w.x,right:(x.right-y.right+g.right)/w.x}}function P(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function M(e){return r.some(t=>e[t]>=0)}let I=new Set(["left","top"]);async function O(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),s=h(n),a=p(n),l="y"===v(n),u=I.has(s)?-1:1,c=o&&l?-1:1,d=f(t,e),{mainAxis:g,crossAxis:m,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}
1:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof y&&(m="end"===a?-1*y:y),l?{x:m*c,y:g*u}:{x:g*u,y:m*c}}function $(){return"undefined"!=typeof window}function z(e){return D(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function N(e){var t;return null==(t=(D(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function D(e){return!!$()&&(e instanceof Node||e instanceof L(e).Node)}function V(e){return!!$()&&(e instanceof Element||e instanceof L(e).Element)}function F(e){return!!$()&&(e instanceof HTMLElement||e instanceof L(e).HTMLElement)}function B(e){return!!$()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}let H=new Set(["inline","contents"]);function U(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=et(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!H.has(i)}let W=new Set(["table","td","th"]),q=[":popover-open",":modal"];function X(e){return q.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let Y=["transform","translate","scale","rotate","perspective"],G=["transform","translate","scale","rotate","perspective","filter"],Z=["paint","layout","strict","content"];function K(e){let t=J(),n=V(e)?et(e):e;return Y.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||G.some(e=>(n.willChange||"").includes(e))||Z.some(e=>(n.contain||"").includes(e))}function J(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let Q=new Set(["html","body","#document"]);function ee(e){return Q.has(z(e))}function et(e){return L(e).getComputedStyle(e)}function en(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if("html"===z(e))return e;let t=e.assignedSlot||e.parentNode||B(e)&&e.host||N(e);return B(t)?t.host:t}function ei(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=er(t);return ee(n)?t.ownerDocument?t.ownerDocument.body:t.body:F(n)&&U(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=L(i);if(o){let e=eo(s);return t.concat(s,s.visualViewport||[],U(i)?i:[],e&&n?ei(e):[])}return t.concat(i,ei(i,[],n))}function eo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function es(e){let t=et(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=F(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,l=a(n)!==o||a(r)!==s;return l&&(n=o,r=s),{width:n,height:r,$:l}}function ea(e){return V(e)?e:e.contextElement}function el(e){let t=ea(e);if(!F(t))return u(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=es(t),s=(o?a(n.width):n.width)/r,l=(o?a(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}let eu=u(0);function ec(e){let t=L(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eu}function ed(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),s=ea(e),a=u(1);t&&(r?V(r)&&(a=el(r)):a=el(e));let l=(void 0===(i=n)&&(i=!1),r&&(!i||r===L(s))&&i)?ec(s):u(0),c=(o.left+l.x)/a.x,d=(o.top+l.y)/a.y,f=o.width/a.x,h=o.height/a.y;if(s){let e=L(s),t=r&&V(r)?L(r):r,n=e,i=eo(n);for(;i&&r&&t!==n;){let e=el(i),t=i.getBoundingClientRect(),r=et(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,d*=e.y,f*=e.x,h*=e.y,c+=o,d+=s,i=eo(n=L(i))}}return C({width:f,height:h,x:c,y:d})}function ef(e,t){let n=en(e).scrollLeft;return t?t.left+n:ed(N(e)).left+n}function eh(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ef(e,n),y:n.top+t.scrollTop}}let ep=new Set(["absolute","fixed"]);function eg(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=L(e),r=N(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;let e=J();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}let u=ef(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-i);s<=25&&(o-=s)}else u<=25&&(o+=u);return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){let t=N(e),n=en(e),r=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=s(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+ef(e),l=-n.scrollTop;return"rtl"===et(r).direction&&(a+=s(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}(N(e));else if(V(t))r=function(e,t){let n=ed(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=F(e)?el(e):u(1),s=e.clientWidth*o.x;return{width:s,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=ec(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return C(r)}function em(e){return"static"===et(e).position}function ey(e,t){if(!F(e)||"fixed"===et(e).position)return null;if(t)return t(e);let n=e.offsetParent;return N(e)===n&&(n=n.ownerDocument.body),n}function ev(e,t){var n;let r=L(e);if(X(e))return r;if(!F(e)){let t=er(e);for(;t&&!ee(t);){if(V(t)&&!em(t))return t;t=er(t)}return r}let i=ey(e,t);for(;i&&(n=i,W.has(z(n)))&&em(i);)i=ey(i,t);
1return i&&ee(i)&&em(i)&&!K(i)?r:i||function(e){let t=er(e);for(;F(t)&&!ee(t);){if(K(t))return t;if(X(t))break;t=er(t)}return null}(e)||r}let eb=async function(e){let t=this.getOffsetParent||ev,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=F(t),i=N(t),o="fixed"===n,s=ed(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=u(0);if(r||!r&&!o){if(("body"!==z(t)||U(i))&&(a=en(t)),r){let e=ed(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=ef(i))}o&&!r&&i&&(l.x=ef(i));let c=!i||r||o?u(0):eh(i,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ew={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,s=N(r),a=!!t&&X(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=u(1),d=u(0),f=F(r);if((f||!f&&!o)&&(("body"!==z(r)||U(s))&&(l=en(r)),F(r))){let e=ed(r);c=el(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let h=!s||f||o?u(0):eh(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}},getDocumentElement:N,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[..."clippingAncestors"===n?X(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=ei(e,[],!1).filter(e=>V(e)&&"body"!==z(e)),i=null,o="fixed"===et(e).position,s=o?er(e):e;for(;V(s)&&!ee(s);){let t=et(s),n=K(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&!!i&&ep.has(i.position)||U(s)&&!n&&function e(t,n){let r=er(t);return!(r===n||!V(r)||ee(r))&&("fixed"===et(r).position||e(r,n))}(e,s))?r=r.filter(e=>e!==s):i=t,s=er(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=a[0],u=a.reduce((e,n)=>{let r=eg(t,n,i);return e.top=s(r.top,e.top),e.right=o(r.right,e.right),e.bottom=o(r.bottom,e.bottom),e.left=s(r.left,e.left),e},eg(t,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:ev,getElementRects:eb,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=es(e);return{width:t,height:n}},getScale:el,isElement:V,isRTL:function(e){return"rtl"===et(e).direction}};function ex(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eS(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:f=!1}=r,h=ea(e),p=a||u?[...h?ei(h):[],...ei(t)]:[];p.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let g=h&&d?function(e,t){let n,r=null,i=N(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function u(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),a();let f=e.getBoundingClientRect(),{left:h,top:p,width:g,height:m}=f;if(c||t(),!g||!m)return;let y=l(p),v=l(i.clientWidth-(h+g)),b={rootMargin:-y+"px "+-v+"px "+-l(i.clientHeight-(p+m))+"px "+-l(h)+"px",threshold:s(0,o(1,d))||1},w=!0;function x(t){let r=t[0].intersectionRatio;if(r!==d){if(!w)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||ex(f,e.getBoundingClientRect())||u(),w=!1}try{r=new IntersectionObserver(x,{...b,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(x,b)}r.observe(e)}(!0),a}(h,n):null,m=-1,y=null;c&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),h&&!f&&y.observe(h),y.observe(t));let v=f?ed(e):null;return f&&function t(){let r=ed(e);v&&!ex(v,r)&&n(),v=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{a&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==g||g(),null==(e=y)||e.disconnect(),y=null,f&&cancelAnimationFrame(i)}}let ek=j,eE=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:o,placement:s,middlewareData:a}=t,l=await O(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},e_=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o,s;let{rects:a,middlewareData:l,placement:u,platform:c,elements:d}=t,{crossAxis:g=!1,alignment:m,allowedPlacements:y=i,autoAlignment:v=!0,...x}=f(e,t),S=void 0!==m||y===i?((s=m||null)?[...y.filter(e=>p(e)===s),...y.filter(e=>p(e)!==s)]:y.filter(e=>h(e)===e)).filter(e=>!s||p(e)===s||!!v&&w(e)!==e):y,k=await j(t,x),E=(null==(n=l.autoPlacement)?void 0:n.index)||0,_=S[E];if(null==_)return{};let T=b(_,a,await (null==c.isRTL?void 0:c.isRTL(d.floating)));if(u!==_)return{reset:{placement:S[0]}};let C=[k[h(_)],k[T[0]],k[T[1]]],A=[...(null==(r=l.autoPlacement)?void 0:r.overflows)||[],{placement:_,overflows:C}],R=S[E+1];if(R)return{data:{index:E+1,overflows:A},reset:{placement:R}};let P=A.map(e=>{let t=p(e.placement);return[e.placement,t&&g?e.overflows.slice(0,2).reduce((e,t)=>
1e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),M=(null==(o=P.filter(e=>e[2].slice(0,p(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||P[0][0];return M!==u?{data:{index:E+1,overflows:A},reset:{placement:M}}:{}}}},eT=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=f(e,t),d={x:n,y:r},p=await j(t,c),m=v(h(i)),y=g(m),b=d[y],w=d[m];if(a){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=b+p[e],r=b-p[t];b=s(n,o(b,r))}if(l){let e="y"===m?"top":"left",t="y"===m?"bottom":"right",n=w+p[e],r=w-p[t];w=s(n,o(w,r))}let x=u.fn({...t,[y]:b,[m]:w});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[y]:a,[m]:l}}}}}},eC=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o,s;let{placement:a,middlewareData:l,rects:u,initialPlacement:c,platform:d,elements:g}=t,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:T,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:R=!0,...P}=f(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};let M=h(a),I=v(c),O=h(c)===c,$=await (null==d.isRTL?void 0:d.isRTL(g.floating)),z=T||(O||!R?[_(c)]:function(e){let t=_(e);return[w(e),t,w(t)]}(c)),L="none"!==A;!T&&L&&z.push(...function(e,t,n,r){let i=p(e),o=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?S:x;return t?x:S;case"left":case"right":return t?k:E;default:return[]}}(h(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(w)))),o}(c,R,A,$));let N=[c,...z],D=await j(t,P),V=[],F=(null==(r=l.flip)?void 0:r.overflows)||[];if(m&&V.push(D[M]),y){let e=b(a,u,$);V.push(D[e[0]],D[e[1]])}if(F=[...F,{placement:a,overflows:V}],!V.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=N[e];if(t&&(!("alignment"===y&&I!==v(t))||F.every(e=>v(e.placement)!==I||e.overflows[0]>0)))return{data:{index:e,overflows:F},reset:{placement:t}};let n=null==(o=F.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(C){case"bestFit":{let e=null==(s=F.filter(e=>{if(L){let t=v(e.placement);return t===I||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:s[0];e&&(n=e);break}case"initialPlacement":n=c}if(a!==n)return{reset:{placement:n}}}return{}}}},eA=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let i,a;let{placement:l,rects:u,platform:c,elements:d}=t,{apply:g=()=>{},...m}=f(e,t),y=await j(t,m),b=h(l),w=p(l),x="y"===v(l),{width:S,height:k}=u.floating;"top"===b||"bottom"===b?(i=b,a=w===(await (null==c.isRTL?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(a=b,i="end"===w?"top":"bottom");let E=k-y.top-y.bottom,_=S-y.left-y.right,T=o(k-y[i],E),C=o(S-y[a],_),A=!t.middlewareData.shift,R=T,P=C;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(P=_),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(R=E),A&&!w){let e=s(y.left,0),t=s(y.right,0),n=s(y.top,0),r=s(y.bottom,0);x?P=S-2*(0!==e||0!==t?e+t:s(y.left,y.right)):R=k-2*(0!==n||0!==r?n+r:s(y.top,y.bottom))}await g({...t,availableWidth:P,availableHeight:R});let M=await c.getDimensions(d.floating);return S!==M.width||k!==M.height?{reset:{rects:!0}}:{}}}},eR=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...i}=f(e,t);switch(r){case"referenceHidden":{let e=P(await j(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:M(e)}}}case"escaped":{let e=P(await j(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:M(e)}}}default:return{}}}}},ej=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:l,elements:u,middlewareData:c}=t,{element:d,padding:h=0}=f(e,t)||{};if(null==d)return{};let y=T(h),b={x:n,y:r},w=g(v(i)),x=m(w),S=await l.getDimensions(d),k="y"===w,E=k?"clientHeight":"clientWidth",_=a.reference[x]+a.reference[w]-b[w]-a.floating[x],C=b[w]-a.reference[w],A=await (null==l.getOffsetParent?void 0:l.getOffsetParent(d)),R=A?A[E]:0;R&&await (null==l.isElement?void 0:l.isElement(A))||(R=u.floating[E]||a.floating[x]);
1let j=R/2-S[x]/2-1,P=o(y[k?"top":"left"],j),M=o(y[k?"bottom":"right"],j),I=R-S[x]-M,O=R/2-S[x]/2+(_/2-C/2),$=s(P,o(O,I)),z=!c.arrow&&null!=p(i)&&O!==$&&a.reference[x]/2-(O<P?P:M)-S[x]/2<0,L=z?O<P?O-P:O-I:0;return{[w]:b[w]+L,data:{[w]:$,centerOffset:O-$-L,...z&&{alignmentOffset:L}},reset:z}}}),eP=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=f(e,t),c={x:n,y:r},d=v(i),p=g(d),m=c[p],y=c[d],b=f(a,t),w="number"==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){let e="y"===p?"height":"width",t=o.reference[p]-o.floating[e]+w.mainAxis,n=o.reference[p]+o.reference[e]-w.mainAxis;m<t?m=t:m>n&&(m=n)}if(u){var x,S;let e="y"===p?"width":"height",t=I.has(h(i)),n=o.reference[d]-o.floating[e]+(t&&(null==(x=s.offset)?void 0:x[d])||0)+(t?0:w.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(S=s.offset)?void 0:S[d])||0)-(t?w.crossAxis:0);y<n?y=n:y>r&&(y=r)}return{[p]:m,[d]:y}}}},eM=(e,t,n)=>{let r=new Map,i={platform:ew,...n},o={...i.platform,_c:r};return R(e,t,{...i,platform:o})}},24019:function(e,t,n){"use strict";n.d(t,{Cp:function(){return b},RR:function(){return m},X5:function(){return v},YF:function(){return d},cv:function(){return h},dp:function(){return y},dr:function(){return g},uY:function(){return p},x7:function(){return w}});var r=n(75184),i=n(7653),o=n(3458),s="undefined"!=typeof document?i.useLayoutEffect:function(){};function a(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!a(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!a(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function l(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u(e,t){let n=l(e);return Math.round(t*n)/n}function c(e){let t=i.useRef(e);return s(()=>{t.current=e}),t}function d(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:d=[],platform:f,elements:{reference:h,floating:p}={},transform:g=!0,whileElementsMounted:m,open:y}=e,[v,b]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,x]=i.useState(d);a(w,d)||x(d);let[S,k]=i.useState(null),[E,_]=i.useState(null),T=i.useCallback(e=>{e!==j.current&&(j.current=e,k(e))},[]),C=i.useCallback(e=>{e!==P.current&&(P.current=e,_(e))},[]),A=h||S,R=p||E,j=i.useRef(null),P=i.useRef(null),M=i.useRef(v),I=null!=m,O=c(m),$=c(f),z=c(y),L=i.useCallback(()=>{if(!j.current||!P.current)return;let e={placement:t,strategy:n,middleware:w};$.current&&(e.platform=$.current),(0,r.oo)(j.current,P.current,e).then(e=>{let t={...e,isPositioned:!1!==z.current};N.current&&!a(M.current,t)&&(M.current=t,o.flushSync(()=>{b(t)}))})},[w,t,n,$,z]);s(()=>{!1===y&&M.current.isPositioned&&(M.current.isPositioned=!1,b(e=>({...e,isPositioned:!1})))},[y]);let N=i.useRef(!1);s(()=>(N.current=!0,()=>{N.current=!1}),[]),s(()=>{if(A&&(j.current=A),R&&(P.current=R),A&&R){if(O.current)return O.current(A,R,L);L()}},[A,R,L,O,I]);let D=i.useMemo(()=>({reference:j,floating:P,setReference:T,setFloating:C}),[T,C]),V=i.useMemo(()=>({reference:A,floating:R}),[A,R]),F=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!V.floating)return e;let t=u(V.floating,v.x),r=u(V.floating,v.y);return g?{...e,transform:"translate("+t+"px, "+r+"px)",...l(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,g,V.floating,v.x,v.y]);return i.useMemo(()=>({...v,update:L,refs:D,elements:V,floatingStyles:F}),[v,L,D,V,F])}let f=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:i}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.x7)({element:n.current,padding:i}).fn(t):{}:n?(0,r.x7)({element:n,padding:i}).fn(t):{}}}),h=(e,t)=>({...(0,r.cv)(e),options:[e,t]}),p=(e,t)=>({...(0,r.uY)(e),options:[e,t]}),g=(e,t)=>({...(0,r.dr)(e),options:[e,t]}),m=(e,t)=>
1({...(0,r.RR)(e),options:[e,t]}),y=(e,t)=>({...(0,r.dp)(e),options:[e,t]}),v=(e,t)=>({...(0,r.X5)(e),options:[e,t]}),b=(e,t)=>({...(0,r.Cp)(e),options:[e,t]}),w=(e,t)=>({...f(e),options:[e,t]})},11369:function(e,t,n){"use strict";n.d(t,{$_:function(){return o},EZ:function(){return i},mE:function(){return r}});let r=["gray","blue","purple","magenta","red","orange","yellow","green","cyan"],i=["50","100","200","300","400","500","600","700","800","900","950"],o={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"}}}},95427:function(e,t,n){"use strict";n.d(t,{BA:function(){return eh},aQ:function(){return h},fi:function(){return ed}});var r=n(11369);let i={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"}}}},o={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 a(e){let t=s.get(e);if(t)return t;let n=u(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:l(e,e.button.default),ghost:l(e,e.button.ghost),bleed:l(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:c(e.input.default),invalid:c(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:l(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 l(e,t){return{default:{enabled:u(e,t.default.enabled),hovered:u(e,t.default.hovered),pressed:u(e,t.default.pressed),selected:u(e,t.default.selected),disabled:u(e,t.default.disabled)},neutral:{enabled:u(e,t.default.enabled),hovered:u(e,t.default.hovered),pressed:u(e,t.default.pressed),selected:u(e,t.default.selected),disabled:u(e,t.default.disabled)},primary:{enabled:u(e,t.primary.enabled),hovered:u(e,t.primary.hovered),pressed:u(e,t.primary.pressed),selected:u(e,t.primary.selected),disabled:u(e,t.primary.disabled)},suggest:{enabled:u(e,t.primary.enabled),hovered:u(e,t.primary.hovered),pressed:u(e,t.primary.pressed),selected:u(e,t.primary.selected),disabled:u(e,t.primary.disabled)},positive:{enabled:u(e,t.positive.enabled),hovered:u(e,t.positive.hovered),pressed:u(e,t.positive.pressed),selected:u(e,t.positive.selected),disabled:u(e,t.positive.disabled)},caution:{enabled:u(e,t.caution.enabled),hovered:u(e,t.caution.hovered),pressed:u(e,t.caution.pressed),selected:u(e,t.caution.selected),disabled:u(e,t.caution.disabled)},critical:{enabled:u(e,t.critical.enabled),hovered:u(e,t.critical.hovered),pressed:u(e,t.critical.pressed),selected:u(e,t.critical.selected),disabled:u(e,t.critical.disabled)}}}function u(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 c(e){return{enabled:d(e.enabled),disabled:d(e.disabled),readOnly:d(e.readOnly),hovered:d(e.hovered)}}function d(e){return{bg:e.bg,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let f=new WeakMap;function h(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=f.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...i.avatar,...e.sanity.avatar},button:{...i.button,...e.sanity.button},card:i.card,color:a(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...i.input,...e.sanity.input,checkbox:{...i.input.checkbox,...e.sanity.input.checkbox},radio:{...i.input.radio,...e.sanity.input.radio},switch:{...i.input.switch,...e.sanity.input.switch}},layer:e.sanity.layer??i.layer,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return f.set(e,n),n}function p(e){return 2===e._version}let g=new WeakMap;function m(e,t,n){Object.defineProperty(e,t,{get(){let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!1,configurable:!1}),r},enumerable:!0,configurable:!0})}let y=new WeakMap,v=["transparent","default","primary","positive","caution","critical"];function b(e,t){let n={};for(let r of v)m(n,r,()=>{var n;return{base:{bg:(n=t[e][r]).bg,fg:n.fg,border:n.border,focusRing:n.focusRing,shadow:n.shadow},button:n.button,card:n.selectable.default,dark:n._dark,input:{default:x(n.input.default),invalid:x(n.input.invalid)},muted:{...n.button.ghost,transparent:n.button.ghost.default},solid:{...n.button.default,transparent:n.button.default.default},selectable:n.selectable,spot:{gray:n.avatar.gray.bg,blue:n.avatar.blue.bg,purple:n.avatar.purple.bg,magenta:n.avatar.magenta.bg,red:n.avatar.red.bg,orange:n.avatar.orange.bg,yellow:n.avatar.yellow.bg,green:n.avatar.green.bg,cyan:n.avatar.cyan.bg},syntax:n.syntax}});return n}function w(e){let t=y.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,font:s,input:a,media:l,radius:u,shadow:c,space:d,style:f}=e,h={};m(h,"light",()=>b("light",i)),m(h,"dark",()=>b("dark",i));let p={_version:0,avatar:n,button:r,container:o,color:h,focusRing:a.text.focusRing,fonts:s,input:a,media:l,radius:u,shadows:c,space:d,styles:f,v2:e};return y.set(e,p),p}function x(e){return{enabled:S(e.enabled),disabled:S(e.disabled),readOnly:S(e.readOnly),hovered:S(e.hovered)}}function S(e){return{bg:e.bg,bg2:e.muted.bg,border:e.border,fg:e.fg,placeholder:e.placeholder}}let k=["multiply","screen"],E=["transparent","default","neutral","primary","suggest","positive","caution","critical"],_=["default","neutral","primary","suggest","positive","caution","critical"],T=["enabled","hovered","pressed","selected","disabled"],C=["default","ghost","bleed"],A=["default","invali
1d"],R=["enabled","hovered","readOnly","disabled"];function j(e){return r.EZ.includes(e)}function P(e){return/^\d+%$/.test(e)}function M(e){let t=e.split("/"),n=t.shift()||"",[i,o]=n.split(" ");if(j(i)){let e=t.shift()||"";return P(o)?{type:"color",tint:i,mix:Number(o.slice(0,-1))/100}:I(e)?{type:"color",tint:i,opacity:Number(e)}:{type:"color",tint:i}}if("black"===i||"white"===i){let e=t.shift()||"";return P(o)?{type:"color",key:i,mix:Number(o.slice(0,-1))/100}:I(e)?{type:"color",key:i,opacity:Number(e)}:{type:"color",key:i}}if(r.mE.includes(i)){let[e,r]=(n=t.shift()||"").split(" ");if(j(e)){let n=t.shift()||"";return P(r)?{type:"color",hue:i,tint:e,mix:Number(r.slice(0,-1))/100}:I(n)?{type:"color",hue:i,tint:e,opacity:Number(n)}:{type:"color",hue:i,tint:e}}return{type:"hue",value:i}}if(k.includes(i))return{type:"blendMode",value:i}}function I(e){return"0"===e||/^0\.[0-9]+$/.test(e)||"1"===e}[...r.mE],[...E],[..._],[...T],[...A],[...R];let O=["500","500"];function $(e,t=O){var n;let r;let{hue:i,scheme:o}=e,s=M(t["light"===o?0:1]);if(!s||"color"!==s.type)throw Error(`Invalid color token: ${t[0]}`);return n={...s,hue:s.hue||i},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 z={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 L(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}function N(...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],i=t[n];L(r)&&L(i)?e[n]=N(r,i):e[n]=i}return e}function V(e,t){let{scheme:n}=e,r={};for(let e of E)m(r,e,()=>(function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{_blend:(i?._blend||["multiply","screen"])["light"===n?0:1],_dark:"dark"===n,accent:{fg:$(o,i?.accent?.fg)},avatar:F({scheme:n},i),backdrop:$(o,i?.backdrop),badge:H(i?.badge,{scheme:n},t),bg:$(o,i?.bg),border:$(o,i?.border),button:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of C)i[e]=function(e,t){let{cardTone:n,mode:r,scheme:i}=e,o={};for(let e of _)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:i,tone:o}=e,s={};for(let e of T)s[e]=function(e,t){let{cardTone:n,mode:r,tone:i,scheme:o,state:s}=e,a=t?.color?.base?.[n],l=t?.color?.button?.[r]?.[i]?.[s],u=l?._hue||a?._hue||"gray",c=l?._blend||["screen","multiply"],d={hue:u,scheme:o};return{_blend:c["light"===o?0:1],accent:{fg:$(d,l?.accent?.fg)},avatar:F({scheme:o},l),badge:H(l?.badge,{scheme:o},t),bg:$(d,l?.bg),border:$(d,l?.border),code:{bg:$(d,l?.code?.bg),fg:$(d,l?.code?.fg)},fg:$(d,l?.fg),icon:$(d,l?.icon),muted:{bg:$(d,l?.muted?.bg),fg:$(d,l?.muted?.fg)},kbd:{bg:$(d,l?.kbd?.bg),fg:$(d,l?.kbd?.fg),border:$(d,l?.kbd?.border)},link:{fg:$(d,l?.link?.fg)},skeleton:{from:$(d,l?.skeleton?.from),to:$(d,l?.skeleton?.to)}}}({cardTone:n,mode:r,tone:o,scheme:i,state:e},t);return s}({cardTone:n,mode:r,scheme:i,tone:e},t);return o}({cardTone:r,scheme:n,mode:e},t);return i}({scheme:n,tone:r},t),code:{bg:$(o,i?.code?.bg),fg:$(o,i?.code?.fg)},fg:$(o,i?.fg),focusRing:$(o,i?.focusRing),icon:$(o,i?.icon),input:function(e,t){let{scheme:n,tone:r}=e;return{default:U({mode:"default",scheme:n,tone:r},t),invalid:U({mode:"invalid",scheme:n,tone:r},t)}}({scheme:n,tone:r},t),kbd:{bg:$(o,i?.kbd?.bg),fg:$(o,i?.kbd?.fg),border:$(o,i?.kbd?.border)},link:{fg:$(o,i?.link?.fg)},muted:{bg:$(o,i?.muted?.bg),fg:$(o,i?.muted?.fg)},selectable:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of _)i[e]=function(e,t){let{cardTone:n,scheme:r,tone:i}=e,o={};for(let e of T)o[e]=function(e,t){let{cardTone:n,scheme:r,state:i,tone:o}=e,s=t?.color?.base?.[n],a=t?.color?.selectable?.[o]?.[i],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:r};return{_blend:u["light"===r?0:1],accent:{fg:$(c,a?.accent?.fg)},avatar:F({scheme:r},a),badge:H(a?.badge,{scheme:r},t),bg:$(c,a?.bg),border:$(c,a?.border),code:{bg:$(c,a?.code?.bg),fg:$(c,a?.code?.fg)},fg:$(c,a?.fg),icon:$(c,a?.icon),muted:{bg:$(c,a?.muted?.bg),fg:$(c,a?.muted?.fg)},kbd:{bg:$(c,a?.kbd?.bg),fg:$(c,a?.kbd?.fg),border:$(c,a?.kbd?.border)},link:{fg:$(c,a?.link?.fg)},skeleton:{from:$(c,a?.skeleton?.from),to:$(c,a?.skeleton?.to)}}}({cardTone:n,tone:i,scheme:r,state:e},t);return o}({cardTone:r,scheme:n,tone:e},t);return i}({scheme:n,tone:r},t),shadow:function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{outline:$(o,i?.shadow?.outline),umbra:$(o,i?.shadow?.umbra),penumbra:$(o,i?.shadow?.penumbra),ambient:$(o,i?.shadow?.ambient)}}
1({scheme:n,tone:r},t),skeleton:{from:$(o,i?.skeleton?.from),to:$(o,i?.skeleton?.to)},syntax:function(e,t){let{scheme:n}=e,r=t?.color?.syntax,i={hue:"gray",scheme:n};return{atrule:$(i,r?.atrule),attrName:$(i,r?.attrName),attrValue:$(i,r?.attrValue),attribute:$(i,r?.attribute),boolean:$(i,r?.boolean),builtin:$(i,r?.builtin),cdata:$(i,r?.cdata),char:$(i,r?.char),class:$(i,r?.class),className:$(i,r?.className),comment:$(i,r?.comment),constant:$(i,r?.constant),deleted:$(i,r?.deleted),doctype:$(i,r?.doctype),entity:$(i,r?.entity),function:$(i,r?.function),hexcode:$(i,r?.hexcode),id:$(i,r?.id),important:$(i,r?.important),inserted:$(i,r?.inserted),keyword:$(i,r?.keyword),number:$(i,r?.number),operator:$(i,r?.operator),prolog:$(i,r?.prolog),property:$(i,r?.property),pseudoClass:$(i,r?.pseudoClass),pseudoElement:$(i,r?.pseudoElement),punctuation:$(i,r?.punctuation),regex:$(i,r?.regex),selector:$(i,r?.selector),string:$(i,r?.string),symbol:$(i,r?.symbol),tag:$(i,r?.tag),unit:$(i,r?.unit),url:$(i,r?.url),variable:$(i,r?.variable)}}({scheme:n},t)}})({scheme:n,tone:e},t));return r}function F(e,t){let{scheme:n}=e;return{gray:B({color:"gray",scheme:n},t),blue:B({color:"blue",scheme:n},t),purple:B({color:"purple",scheme:n},t),magenta:B({color:"magenta",scheme:n},t),red:B({color:"red",scheme:n},t),orange:B({color:"orange",scheme:n},t),yellow:B({color:"yellow",scheme:n},t),green:B({color:"green",scheme:n},t),cyan:B({color:"cyan",scheme:n},t)}}function B(e,t){let{color:n,scheme:r}=e,i=t?.avatar?.[n],o={hue:i?._hue||"gray",scheme:r};return{_blend:(i?._blend||["screen","multiply"])["light"===r?0:1],bg:$(o,i?.bg),fg:$(o,i?.fg)}}function H(e,t,n){let{scheme:r}=t,i={};for(let t of _)i[t]=function(e,t,n){let{scheme:r,tone:i}=t,o=e?.[i],s={hue:o?._hue||n?.color?.base?.[i]?._hue||"gray",scheme:r};return{bg:$(s,o?.bg),fg:$(s,o?.fg),dot:$(s,o?.dot),icon:$(s,o?.icon)}}(e,{scheme:r,tone:t},n);return i}function U(e,t){let{mode:n,scheme:r,tone:i}=e;return{enabled:W({mode:n,scheme:r,state:"enabled",cardTone:i},t),hovered:W({mode:n,scheme:r,state:"hovered",cardTone:i},t),readOnly:W({mode:n,scheme:r,state:"readOnly",cardTone:i},t),disabled:W({mode:n,scheme:r,state:"disabled",cardTone:i},t)}}function W(e,t){let{cardTone:n,mode:r,scheme:i,state:o}=e,s=t?.color?.base?.[n],a=t?.color?.input?.[r]?.[o],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:i};return{_blend:u["light"===i?0:1],bg:$(c,a?.bg),border:$(c,a?.border),fg:$(c,a?.fg),muted:{bg:$(c,a?.muted?.bg)},placeholder:$(c,a?.placeholder)}}let q=r.$_;function X(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function Y(e,t,n,r,i){var o;return n*(1-(o=X((i-e)/(t-e))))+r*o}function G(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=G(X(Math.round(e.r),0,255)),n=G(X(Math.round(e.g),0,255)),r=G(X(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 J=/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,i=r*(1-Math.abs(e.h/60%2-1)),o=n-r/2,s=0,a=0,l=0;return 0<=e.h&&e.h<60?(s=r,a=i,l=0):60<=e.h&&e.h<120?(s=i,a=r,l=0):120<=e.h&&e.h<180?(s=0,a=r,l=i):180<=e.h&&e.h<240?(s=0,a=i,l=r):240<=e.h&&e.h<300?(s=i,a=0,l=r):300<=e.h&&e.h<360&&(s=r,a=0,l=i),{r:Math.round((s+o)*255),g:Math.round((a+o)*255),b:Math.round((l+o)*255)}}(function(e){let t=J.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 ee=[0,255];function et(e,t){let{bg:n,blendMode:r,colorPalette:i}=t;if("white"===n)throw Error("Cannot blend with white background");let o=M(e);if(!o||"color"!==o.type)throw Error(`Invalid color token value: ${e}`);let s="";if("black"===o.key&&(s=en(i.black)),"white"===o.key&&(s=en(i.white)),o.hue&&o.tint&&(s=en(i[o.hue][o.tint])),!s)throw Error(`Invalid color token value: ${e}`);let a=s,l={blendMode:r,bg:n,black:en(i.black),white:en(i.white)};try{if(s=function(e,t){var n,r,i,o,s,a,l,u,c;let{blendMode:d}=t,f=Q(e),h=Q(t.black),p=Q(t.white),g=t.bg?Q(t.bg):"multiply"===d?p:h,m={r:[h.r,p.r],g:[h.g,p.g],b:[h.b,p.b]},y={r:X(Y(...m.r,...ee,g.r),...ee),g:X(Y(...m.g,...ee,g.g),...ee),b:X(Y(...m.b,...ee,g.b),...ee)},v={r:X(Y(...m.r,...ee,f.r),...ee),g:X(Y(...m.g,...ee,f.g),...ee),b:X(Y(...m.b,...ee,f.b),...ee)},b="multiply"===d?{r:255*(n=y.r/255,v.r/255*n),g:255*(r=y.g/255,v.g/255*r),b:255*(i=y.b/255,v.b/255*i)}:{r:255*((o=y.r/255)+(s=v.r/255)-o*s),g:255*((a=y.g/255)+(l=v.g/255)-a*l),b:255*((u=y.b/255)+(c=v.b/255)-u*c)};return K({r:X(Y(...ee,...m.r,b.r),...m.r),g:X(Y(...ee,...m.g,b.g),...m.g),b:X(Y(...ee,...m.b,b.b),...m.b)})}(s,l),n&&void 0!==o.mix){var u,c,d,f,h,p,g;let e=Z(n),t=Z(s);s=K((u=o.mix,{r:(c=e.r,d=t.r,c+(d-c)*u),g:(f=e.g,h=t.g,f+(h-f)*u),b:(p=e.b,g=t.b,p+(g-p)*u)}))}}catch(e){throw console.warn("could not blend",s,l),e}
1return"#aN"===s&&(console.warn(`invalid color token value: ${e}`),s=a),void 0!==o.opacity&&(s=function(e,t){let n=Q(e);return`rgba(${n.r},${n.g},${n.b},${t})`}(s,o.opacity)),s}function en(e){return"string"==typeof e?e:e.hex}function er(e,t){let n=ei(t.default,{colorPalette:e}),r=n.bg;if("white"===r)throw Error("Cannot blend with white background");let i={default:n};for(let n of E){if("default"===n)continue;let o="transparent"===n?{colorPalette:e}:{bg:r,colorPalette:e};m(i,n,()=>ei(t[n],o))}return i}function ei(e,t){var n,r,i,o;let{colorPalette:s,bg:a}=t,l=e._blend||"multiply",u=et(e.bg,{colorPalette:s,bg:a,blendMode:l}),c={colorPalette:s,bg:u,blendMode:l},d=(n=e.button,r={baseBg:u,blendMode:l,colorPalette:s},{default:ea(n.default,r),ghost:ea(n.ghost,r),bleed:ea(n.bleed,r)}),f=function(e,t){let n={};for(let i of _){var r;n[i]={enabled:el((r=e[i]).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:s,baseBg:u,blendMode:l}),h={outline:et(e.shadow.outline,c),umbra:et(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),penumbra:et(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),ambient:et(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}})};return{_blend:l,_dark:e._dark,accent:{fg:et(e.accent.fg,c)},avatar:eo(e.avatar,{baseBg:u,colorPalette:s,blendMode:l}),backdrop:et(e.backdrop,c),badge:es(e.badge,{baseBg:u,colorPalette:s,blendMode:l}),bg:u,border:et(e.border,c),button:d,code:{bg:et(e.code.bg,c),fg:et(e.code.fg,c)},fg:et(e.fg,c),focusRing:et(e.focusRing,c),icon:et(e.icon,c),input:(i=e.input,o={baseBg:u,colorPalette:s,blendMode:l},{default:eu(i.default,o),invalid:eu(i.invalid,o)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=et(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,fg:et(e.fg,s),border:et(e.border,s)}}(e.kbd,{baseBg:u,colorPalette:s,blendMode:l}),link:{fg:et(e.link.fg,c)},muted:{bg:et(e.muted.bg,c),fg:et(e.muted.fg,c)},shadow:h,skeleton:{from:et(e.skeleton.from,c),to:et(e.skeleton.to,c)},syntax:function(e,t){let{colorPalette:n,baseBg:r,blendMode:i}=t,o={colorPalette:n,bg:r,blendMode:i};return{atrule:et(e.atrule,o),attrName:et(e.attrName,o),attrValue:et(e.attrValue,o),attribute:et(e.attribute,o),boolean:et(e.boolean,o),builtin:et(e.builtin,o),cdata:et(e.cdata,o),char:et(e.char,o),class:et(e.class,o),className:et(e.className,o),comment:et(e.comment,o),constant:et(e.constant,o),deleted:et(e.deleted,o),doctype:et(e.doctype,o),entity:et(e.entity,o),function:et(e.function,o),hexcode:et(e.hexcode,o),id:et(e.id,o),important:et(e.important,o),inserted:et(e.inserted,o),keyword:et(e.keyword,o),number:et(e.number,o),operator:et(e.operator,o),prolog:et(e.prolog,o),property:et(e.property,o),pseudoClass:et(e.pseudoClass,o),pseudoElement:et(e.pseudoElement,o),punctuation:et(e.punctuation,o),regex:et(e.regex,o),selector:et(e.selector,o),string:et(e.string,o),symbol:et(e.symbol,o),tag:et(e.tag,o),unit:et(e.unit,o),url:et(e.url,o),variable:et(e.variable,o)}}(e.syntax,{baseBg:u,colorPalette:s,blendMode:l}),selectable:f}}function eo(e,t){let n={};for(let i of r.mE)n[i]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=et(e.bg,{bg:n,blendMode:r,colorPalette:i});return{_blend:o,bg:s,fg:et(e.fg,{bg:s,blendMode:o,colorPalette:i})}}(e[i],t);return n}function es(e,t){let n={};for(let r of _)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=et(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,dot:et(e.dot,s),fg:et(e.fg,s),icon:et(e.icon,s)}}(e[r],t);return n}function ea(e,t){let n={};for(let i of _){var r;n[i]={enabled:el((r=e[i]).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:i}=t,o=e._blend||"multiply",s=et(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:s,blendMode:o,colorPalette:i};return{_blend:o,accent:{fg:et(e.accent.fg,a)},avatar:eo(e.avatar,{baseBg:s,colorPalette:i,blendMode:o}),badge:es(e.badge,{baseBg:s,colorPalette:i,blendMode:o}),bg:s,border:et(e.border,a),code:{bg:et(e.code.bg,a),fg:et(e.code.fg,a)},fg:et(e.fg,a),icon:et(e.icon,a),link:{fg:et(e.link.fg,a)},muted:{bg:et(e.muted.bg,a),fg:et(e.muted.fg,a)},kbd:{bg:et(e.kbd.bg,a),fg:et(e.kbd.fg,a),border:et(e.kbd.border,a)},skeleton:{from:et(e.skeleton?.from,a),to:et(e.skeleton?.to,a)}}}function eu(e,t){return{enabled:ec(e.enabled,t),hovered:ec(e.hovered,t),readOnly:ec(e.readOnly,t),disabled:ec(e.disabled,t)}}function ec(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=et(e.bg,{colorPalette:i,bg:n,blendMode:r}),a={colorPalette:i,bg:s,blendMode:o};return{_blend:o,bg:s,border:et(e.border,a),fg:et(e.fg,a),muted:{bg:et(e.muted.bg,a)},placeholder:et(e.placeholder,a)}}function ed(e){let t=function(e){let t={color:function(e){let t=N(z,e);return{base:function(e){let t={};for(let n of E)t[n]=function(e,t){let n=N(e?.base?.["*"],e?.base?.[t]),i=n._hue||e?.base?.[t]?._hue||"gray";return{...n,_hue:i,avatar:r.mE.reduce((e,t)=>
1({...e,[t]:N({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:_.reduce((t,r)=>({...t,[r]:{_hue:e?.base?.[r]?._hue||i,...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 i of _)n[i]=function(e,t,n){let i={};for(let o of T)i[o]=function(e,t,n,i){let o=N(e?.button?.[n]?.["*"]?.["*"],e?.button?.[n]?.[t]?.["*"],e?.button?.[n]?.["*"]?.[i],e?.button?.[n]?.[t]?.[i]),s=o._hue||e?.base?.[t]?._hue;return{...o,_hue:s,avatar:r.mE.reduce((e,t)=>({...e,[t]:N({_hue:t},o.avatar?.["*"],o.avatar?.[t])}),{}),badge:_.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||s,...o.badge?.["*"],...o.badge?.[n]}}),{})}}(e,n,t,o);return i}(e,t,i);return n}(e,n);return t}(t),input:function(e){let t={};for(let n of A)t[n]=function(e,t){let n={};for(let r of R)n[r]=function(e,t,n){let r=N(e?.input?.["*"]?.["*"],e?.input?.[t]?.["*"],e?.input?.["*"]?.[n],e?.input?.[t]?.[n]),i=r._hue||e?.input?.[t]?._hue;return{...r,_hue:i}}(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 i of T)n[i]=function(e,t,n){let i=N(e?.selectable?.["*"]?.["*"],e?.selectable?.[t]?.["*"],e?.selectable?.["*"]?.[n],e?.selectable?.[t]?.[n]),o=i._hue||e?.base?.[t]?._hue;return{...i,_hue:o,avatar:r.mE.reduce((e,t)=>({...e,[t]:N({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:_.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||o,...i.badge?.["*"],...i.badge?.[n]}}),{})}}(e,t,i);return n}(e,n);return t}(t),syntax:t.syntax}}(e?.color)},n={};return m(n,"light",()=>V({scheme:"light"},t)),m(n,"dark",()=>V({scheme:"dark"},t)),n}(e);return w({_version:2,avatar:e?.avatar??i.avatar,button:e?.button??i.button,card:e?.card??i.card,color:function(e,t){let n=t?.palette??q,r={};return m(r,"light",()=>er(n,e.light)),m(r,"dark",()=>er(n,e.dark)),r}(t,e),container:e?.container??i.container,font:e?.font??o,input:e?.input??i.input,layer:e?.layer??i.layer,media:e?.media??i.media,radius:e?.radius??i.radius,shadow:e?.shadow??i.shadow,space:e?.space??i.space,style:e?.style??i.style})}let ef=new Map;function eh(e,t,n){var r;let o=function(e,t,n){let r=ef.get(t);if(!r)return;let i=r.get(n);if(i)return i.get(e)}(e,t,n);if(o)return o;let s=p(e)?w(e):e,l=p(e)?e:function(e){if(e.v2)return e.v2;let t=g.get(e);if(t)return t;let{avatar:n,button:r,color:o,container:s,fonts:l,input:u,layer:c,media:d,radius:f,shadows:h,space:p,styles:m}=e,y={_version:2,avatar:{...i.avatar,...n},button:{...i.button,...r},card:i.card,color:{light:{transparent:a(o.light.transparent),default:a(o.light.default),neutral:a(o.light.transparent),primary:a(o.light.primary),suggest:a(o.light.primary),positive:a(o.light.positive),caution:a(o.light.caution),critical:a(o.light.critical)},dark:{transparent:a(o.dark.transparent),default:a(o.dark.default),neutral:a(o.dark.transparent),primary:a(o.dark.primary),suggest:a(o.dark.primary),positive:a(o.dark.positive),caution:a(o.dark.caution),critical:a(o.dark.critical)}},container:s,font:l,input:{...i.input,...u,checkbox:{...i.input.checkbox,...u.checkbox},radio:{...i.input.radio,...u.radio},switch:{...i.input.switch,...u.switch}},layer:c??i.layer,media:d,radius:f,shadow:h,space:p,style:m};return g.set(e,y),y}(e),u=s.layer||i.layer,c=l.color[t]||l.color.light,d="neutral"in(r=c[n]||c.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}},f=l.layer||i.layer,{color:h,...y}=s,v={...y,layer:u,v2:{...l,_resolved:!0,color:d,layer:f}};m(v,"color",()=>{let e=s.color[t]||s.color.light;return e[n]||e.default});let b={sanity:v};return function(e,t,n,r){ef.has(t)||ef.set(t,new Map);let i=ef.get(t);i.has(n)||i.set(n,new WeakMap),i.get(n).set(e,r)}(e,t,n,b),b}},45032:function(e,t,n){"use strict";let r,i,o;n.d(t,{QB:function(){return cm}});var s,a,l,u,c,d,f,h,p,g,m,y,v,b,w=n(27573),x=n(20477),S={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let k=new Uint8Array(16),E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));var _=function(e,t,n){return!S.randomUUID||t||e?function(e,t,n){let i=(e=e||{}).random??e.rng?.()??function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(k)}();if(i.length<16)throw Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+"-"+E[e[t+4]]+E[e[t+5]]+"-"+E[e[t+6]]+E[e[t+7]]+"-"+E[e[t+8]]+E[e[t+9]]+"-"+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase()}(i)}
1(e,t,n):S.randomUUID()};let T=e=>{if("undefined"==typeof window)return;let t=function(){let e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:void 0;if(e.__xstate__)return e.__xstate__}();t&&t.register(e)};class C{constructor(e){this._process=e,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(e){let t={value:e,next:null};if(this._current){this._last.next=t,this._last=t;return}this._current=t,this._last=t,this._active&&this.flush()}flush(){for(;this._current;){let e=this._current;this._process(e.value),this._current=e.next}this._last=null}}let A="xstate.init",R="xstate.stop";function j(e,t){return{type:`xstate.done.state.${e}`,output:t}}function P(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function M(e){return{type:A,input:e}}function I(e){setTimeout(()=>{throw e})}let O="function"==typeof Symbol&&Symbol.observable||"@@observable";function $(e){if(V(e))return e;let t=[],n="";for(let r=0;r<e.length;r++){switch(e.charCodeAt(r)){case 92:n+=e[r+1],r++;continue;case 46:t.push(n),n="";continue}n+=e[r]}return t.push(n),t}function z(e){return e&&"object"==typeof e&&"machine"in e&&"value"in e?e.value:"string"!=typeof e?e:function(e){if(1===e.length)return e[0];let t={},n=t;for(let t=0;t<e.length-1;t++)if(t===e.length-2)n[e[t]]=e[t+1];else{let r=n;n={},r[e[t]]=n}return t}($(e))}function L(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let o=r[i];n[o]=t(e[o],o,e,i)}return n}function N(e){return void 0===e?[]:V(e)?e:[e]}function D(e,t,n,r){return"function"==typeof e?e({context:t,event:n,self:r}):e}function V(e){return Array.isArray(e)}function F(e){return(V(e)?e:[e]).map(e=>void 0===e||"string"==typeof e?{target:e}:e)}function B(e){if(void 0!==e&&""!==e)return N(e)}function H(e,t,n){let r="object"==typeof e,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}function U(e,t){let n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];let[,r,i]=n,o=e.getStateNodeById(i).config.invoke;return(Array.isArray(o)?o[r]:o).src}function W(e,t){if(t===e||"*"===t)return!0;if(!t.endsWith(".*"))return!1;let n=t.split("."),r=e.split(".");for(let e=0;e<n.length;e++){let t=n[e],i=r[e];if("*"===t)return e===n.length-1;if(t!==i)return!1}return!0}function q(e,t){return`${e.sessionId}.${t}`}let X=0,Y=!1,G=((s={})[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped",s),Z={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};class K{constructor(e,t){this.logic=e,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new C(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=G.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this.systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];let n={...Z,...t},{clock:r,logger:i,parent:o,syncSnapshot:s,id:a,systemId:l,inspect:u}=n;this.system=o?o.system:function(e,t){let n=new Map,r=new Map,i=new WeakMap,o=new Set,s={},{clock:a,logger:l}=t,u={schedule:(e,t,n,r,i=Math.random().toString(36).slice(2))=>{let o={source:e,target:t,event:n,delay:r,id:i,startedAt:Date.now()},l=q(e,i);c._snapshot._scheduledEvents[l]=o;let u=a.setTimeout(()=>{delete s[l],delete c._snapshot._scheduledEvents[l],c._relay(e,t,n)},r);s[l]=u},cancel:(e,t)=>{let n=q(e,t),r=s[n];delete s[n],delete c._snapshot._scheduledEvents[n],void 0!==r&&a.clearTimeout(r)},cancelAll:e=>{for(let t in c._snapshot._scheduledEvents){let n=c._snapshot._scheduledEvents[t];n.source===e&&u.cancel(e,n.id)}}},c={_snapshot:{_scheduledEvents:(t?.snapshot&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${X++}`,_register:(e,t)=>(n.set(e,t),e),_unregister:e=>{n.delete(e.sessionId);let t=i.get(e);void 0!==t&&(r.delete(t),i.delete(e))},get:e=>r.get(e),getAll:()=>Object.fromEntries(r.entries()),_set:(e,t)=>{let n=r.get(e);if(n&&n!==t)throw Error(`Actor with system ID '${e}' already exists.`);r.set(e,t),i.set(t,e)},inspect:e=>{let t=H(e);return o.add(t),{unsubscribe(){o.delete(t)}}},_sendInspectionEvent:t=>{if(!o.size)return;let n={...t,rootId:e.sessionId};
1o.forEach(e=>e.next?.(n))},_relay:(e,t,n)=>{c._sendInspectionEvent({type:"@xstate.event",sourceRef:e,actorRef:t,event:n}),t._send(n)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...c._snapshot._scheduledEvents}}),start:()=>{let e=c._snapshot._scheduledEvents;for(let t in c._snapshot._scheduledEvents={},e){let{source:n,target:r,event:i,delay:o,id:s}=e[t];u.schedule(n,r,i,o,s)}},_clock:a,_logger:l};return c}(this,{clock:r,logger:i}),u&&!o&&this.system.inspect(H(u)),this.sessionId=this.system._bookId(),this.id=a??this.sessionId,this.logger=t?.logger??this.system._logger,this.clock=t?.clock??this.system._clock,this._parent=o,this._syncSnapshot=s,this.options=n,this.src=n.src??e,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:e=>{this._deferred.push(e)},system:this.system,stopChild:e=>{if(e._parent!==this)throw Error(`Cannot stop child actor ${e.id} of ${this.id} because it is not a child`);e._stop()},emit:e=>{let t=this.eventListeners.get(e.type),n=this.eventListeners.get("*");if(t||n)for(let r of[...t?t.values():[],...n?n.values():[]])try{r(e)}catch(e){I(e)}},actionExecutor:e=>{let t=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:e.type,params:e.params}}),!e.exec)return;let t=Y;try{Y=!0,e.exec(e.info,e.params)}finally{Y=t}};this._processingStatus===G.Running?t():this._deferred.push(t)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),l&&(this.systemId=l,this.system._set(l,this)),this._initState(t?.snapshot??t?.state),l&&"active"!==this._snapshot.status&&this.system._unregister(this)}_initState(e){try{this._snapshot=e?this.logic.restoreSnapshot?this.logic.restoreSnapshot(e,this._actorScope):e:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(e){this._snapshot={status:"error",output:void 0,error:e}}}update(e,t){let n;for(this._snapshot=e;n=this._deferred.shift();)try{n()}catch(t){this._deferred.length=0,this._snapshot={...e,status:"error",error:t}}switch(this._snapshot.status){case"active":for(let t of this.observers)try{t.next?.(e)}catch(e){I(e)}break;case"done":var r;for(let t of this.observers)try{t.next?.(e)}catch(e){I(e)}this._stopProcedure(),this._complete(),this._doneEvent=(r=this.id,{type:`xstate.done.actor.${r}`,output:this._snapshot.output,actorId:r}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:t,snapshot:e})}subscribe(e,t,n){let r=H(e,t,n);if(this._processingStatus!==G.Stopped)this.observers.add(r);else switch(this._snapshot.status){case"done":try{r.complete?.()}catch(e){I(e)}break;case"error":{let e=this._snapshot.error;if(r.error)try{r.error(e)}catch(e){I(e)}else I(e)}}return{unsubscribe:()=>{this.observers.delete(r)}}}on(e,t){let n=this.eventListeners.get(e);n||(n=new Set,this.eventListeners.set(e,n));let r=t.bind(void 0);return n.add(r),{unsubscribe:()=>{n.delete(r)}}}start(){if(this._processingStatus===G.Running)return this;this._syncSnapshot&&this.subscribe({next:e=>{"active"===e.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:e})},error:()=>{}}),this.system._register(this.sessionId,this),this.systemId&&this.system._set(this.systemId,this),this._processingStatus=G.Running;let e=M(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:e}),this._snapshot.status){case"done":return this.update(this._snapshot,e),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(e){return this._snapshot={...this._snapshot,status:"error",error:e},this._error(e),this}return this.update(this._snapshot,e),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(e){let t,n;try{t=this.logic.transition(this._snapshot,e,this._actorScope)}catch(e){n={err:e}}if(n){let{err:e}=n;this._snapshot={...this._snapshot,status:"error",error:e},this._error(e);return}this.update(t,e),e.type===R&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===G.Stopped||((this.mailbox.clear(),this._processingStatus===G.NotStarted)?this._processingStatus=G.Stopped:this.mailbox.enqueue({type:R}
1)),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let e of this.observers)try{e.complete?.()}catch(e){I(e)}this.observers.clear(),this.eventListeners.clear()}_reportError(e){if(!this.observers.size){this._parent||I(e),this.eventListeners.clear();return}let t=!1;for(let n of this.observers){let r=n.error;t||=!r;try{r?.(e)}catch(e){I(e)}}this.observers.clear(),this.eventListeners.clear(),t&&I(e)}_error(e){this._stopProcedure(),this._reportError(e),this._parent&&this.system._relay(this,this._parent,P(this.id,e))}_stopProcedure(){return this._processingStatus!==G.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new C(this._process.bind(this)),this._processingStatus=G.Stopped,this.system._unregister(this)),this}_send(e){this._processingStatus!==G.Stopped&&this.mailbox.enqueue(e)}send(e){this.system._relay(void 0,this,e)}attachDevTools(){let{devTools:e}=this.options;e&&("function"==typeof e?e:T)(this)}toJSON(){return{xstate$$type:1,id:this.id}}getPersistedSnapshot(e){return this.logic.getPersistedSnapshot(this._snapshot,e)}[O](){return this}getSnapshot(){return this._snapshot}}function J(e,...[t]){return new K(e,t)}function Q(e,t,n,r,{sendId:i}){return[t,{sendId:"function"==typeof i?i(n,r):i},void 0]}function ee(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t.sendId)})}function et(e){function t(e,t){}return t.type="xstate.cancel",t.sendId=e,t.resolve=Q,t.execute=ee,t}function en(e,t,n,r,{id:i,systemId:o,src:s,input:a,syncSnapshot:l}){let u,c;let d="string"==typeof s?U(t.machine,s):s,f="function"==typeof i?i(n):i;return d&&(c="function"==typeof a?a({context:t.context,event:n.event,self:e.self}):a,u=J(d,{id:f,src:s,parent:e.self,syncSnapshot:l,systemId:o,input:c})),[eH(t,{children:{...t.children,[f]:u}}),{id:i,systemId:o,actorRef:u,src:s,input:c},void 0]}function er(e,{actorRef:t}){t&&e.defer(()=>{t._processingStatus!==G.Stopped&&t.start()})}function ei(...[e,{id:t,systemId:n,input:r,syncSnapshot:i=!1}={}]){function o(e,t){}return o.type="xstate.spawnChild",o.id=t,o.systemId=n,o.src=e,o.input=r,o.syncSnapshot=i,o.resolve=en,o.execute=er,o}function eo(e,t,n,r,{actorRef:i}){let o="function"==typeof i?i(n,r):i,s="string"==typeof o?t.children[o]:o,a=t.children;return s&&(a={...a},delete a[s.id]),[eH(t,{children:a}),s,void 0]}function es(e,t){if(t){if(!function e(t,n){let r=n.getSnapshot();if(r&&"children"in r)for(let n of Object.values(r.children))e(t,n);t.system._unregister(n)}(e,t),t._processingStatus!==G.Running){e.stopChild(t);return}e.defer(()=>{e.stopChild(t)})}}function ea(e){function t(e,t){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=eo,t.execute=es,t}function el(e,t,n,r){let{machine:i}=r,o="function"==typeof e,s=o?e:i.implementations.guards["string"==typeof e?e:e.type];if(!o&&!s)throw Error(`Guard '${"string"==typeof e?e:e.type}' is not implemented.'.`);if("function"!=typeof s)return el(s,t,n,r);let a={context:t,event:n},l=o||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:t,event:n}):e.params:void 0;return"check"in s?s.check(r,a,s):s(a,l)}let eu=e=>"atomic"===e.type||"final"===e.type;function ec(e){return Object.values(e.states).filter(e=>"history"!==e.type)}function ed(e,t){let n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function ef(e){let t=new Set(e),n=eh(t);for(let e of t)if("compound"!==e.type||n.get(e)&&n.get(e).length){if("parallel"===e.type){for(let n of ec(e))if("history"!==n.type&&!t.has(n))for(let e of ew(n))t.add(e)}}else ew(e).forEach(e=>t.add(e));for(let e of t){let n=e.parent;for(;n;)t.add(n),n=n.parent}return t}function eh(e){let t=new Map;for(let n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function ep(e,t){return function e(t,n){let r=n.get(t);if(!r)return{};if("compound"===t.type){let e=r[0];if(!e)return{};if(eu(e))return e.key}let i={};for(let t of r)i[t.key]=e(t,n);return i}(e,eh(ef(t)))}function eg(e,t){return"compound"===t.type?ec(t).some(t=>"final"===t.type&&e.has(t)):"parallel"===t.type?ec(t).every(t=>eg(e,t)):"final"===t.type}let em=e=>"#"===e[0];
1function ey(e,t,n){let r=B(n.target),i=n.reenter??!1,o=function(e,t){if(void 0!==t)return t.map(t=>{if("string"!=typeof t)return t;if(em(t))return e.machine.getStateNodeById(t);let n="."===t[0];if(n&&!e.parent)return ek(e,t.slice(1));let r=n?e.key+t:t;if(e.parent)try{return ek(e.parent,r)}catch(t){throw Error(`Invalid transition definition for state node '${e.id}': 2${t.message}`)}else throw Error(`Invalid target: "${t}" is not a valid target from the root node. Did you mean ".${t}"?`)})}(e,r),s={...n,actions:N(n.actions),guard:n.guard,target:o,source:e,reenter:i,eventType:t,toJSON:()=>({...s,source:`#${e.id}`,target:o?o.map(e=>`#${e.id}`):void 0})};return s}function ev(e){let t=B(e.config.target);return t?{target:t.map(t=>"string"==typeof t?ek(e.parent,t):t)}:e.parent.initial}function eb(e){return"history"===e.type}function ew(e){let t=ex(e);for(let n of t)for(let r of ed(n,e))t.add(r);return t}function ex(e){let t=new Set;return!function e(n){if(!t.has(n)){if(t.add(n),"compound"===n.type)e(n.initial.target[0]);else if("parallel"===n.type)for(let t of ec(n))e(t)}}(e),t}function eS(e,t){if(em(t))return e.machine.getStateNodeById(t);if(!e.states)throw Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);let n=e.states[t];if(!n)throw Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function ek(e,t){if("string"==typeof t&&em(t))try{return e.machine.getStateNodeById(t)}catch{}let n=$(t).slice(),r=e;for(;n.length;){let e=n.shift();if(!e.length)break;r=eS(r,e)}return r}function eE(e,t){if("string"==typeof t){let n=e.states[t];if(!n)throw Error(`State '${t}' does not exist on '${e.id}'`);return[e,n]}let n=Object.keys(t),r=n.map(t=>eS(e,t)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((n,r)=>{let i=eS(e,r);if(!i)return n;let o=eE(i,t[r]);return n.concat(o)},[]))}function e_(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function eT(e,t,n){let r=new Set;for(let i of e){let e=!1,o=new Set;for(let s of r)if(function(e,t){let n=new Set(e),r=new Set(t);for(let e of n)if(r.has(e))return!0;for(let e of r)if(n.has(e))return!0;return!1}(eR([i],t,n),eR([s],t,n))){if(e_(i.source,s.source))o.add(s);else{e=!0;break}}if(!e){for(let e of o)r.delete(e);r.add(i)}}return Array.from(r)}function eC(e,t){if(!e.target)return[];let n=new Set;for(let r of e.target)if(eb(r)){if(t[r.id])for(let e of t[r.id])n.add(e);else for(let e of eC(ev(r),t))n.add(e)}else n.add(r);return[...n]}function eA(e,t){let n=eC(e,t);if(!n)return;if(!e.reenter&&n.every(t=>t===e.source||e_(t,e.source)))return e.source;let r=function(e){let[t,...n]=e;for(let e of ed(t,void 0))if(n.every(t=>e_(t,e)))return e}(n.concat(e.source));return r||(e.reenter?void 0:e.source.machine.root)}function eR(e,t,n){let r=new Set;for(let i of e)if(i.target?.length){let e=eA(i,n);for(let n of(i.reenter&&i.source===e&&r.add(e),t))e_(n,e)&&r.add(n)}return[...r]}function ej(e,t,n,r,i,o){if(!e.length)return t;let s=new Set(t._nodes),a=t.historyValue,l=eT(e,s,a),u=t;i||([u,a]=function(e,t,n,r,i,o,s,a){let l,u=e,c=eR(r,i,o);for(let e of(c.sort((e,t)=>t.order-e.order),c))for(let t of function(e){return Object.keys(e.states).map(t=>e.states[t]).filter(e=>"history"===e.type)}(e)){let n;n="deep"===t.history?t=>eu(t)&&e_(t,e):t=>t.parent===e,(l??={...o})[t.id]=Array.from(i).filter(n)}for(let e of c)u=eI(u,t,n,[...e.exit,...e.invoke.map(e=>ea(e.id))],s,void 0),i.delete(e);return[u,l||o]}(u,r,n,l,s,a,o,n.actionExecutor)),u=function(e,t,n,r,i,o,s,a){let l=e,u=new Set,c=new Set;(function(e,t,n,r){for(let i of e){let e=eA(i,t);for(let o of i.target||[])!eb(o)&&(i.source!==o||i.source!==e||i.reenter)&&(r.add(o),n.add(o)),eP(o,t,n,r);for(let o of eC(i,t)){let s=ed(o,e);e?.type==="parallel"&&s.push(e),eM(r,t,n,s,!i.source.parent&&i.reenter?void 0:e)}}})(r,s,c,u),a&&c.add(e.machine.root);let d=new Set;for(let e of[...u].sort((e,t)=>e.order-t.order)){i.add(e);let r=[];for(let t of(r.push(...e.entry),e.invoke))r.push(ei(t.src,{...t,syncSnapshot:!!t.onSnapshot}));if(c.has(e)){let t=e.initial.actions;r.push(...t)}if(l=eI(l,t,n,r,o,e.invoke.map(e=>e.id)),"final"===e.type){let r=e.parent,s=r?.type==="parallel"?r:r?.parent,a=s||e;for(r?.type==="compound"&&o.push(j(r.id,void 0!==e.output?D(e.output,l.context,t,n.self):void 0));s?.type==="parallel"&&!d.has(s)&&eg(i,s);)d.add(s),o.push(j(s.id)),a=s,s=s.parent;if(s)continue;l=eH(l,{status:"done",output:function(e,t,n,r,i){if(void 0===r.output)return;let o=j(i.id,void 0!==i.output&&i.parent?D(i.output,e.context,t,n.self):void 0);return D(r.output,e.context,o,n.self)}(l,t,n,l.machine.root,a)})}}return l}(u=eI(u,r,n,l.flatMap(e=>e.actions),o,void 0),r,n,l,s,o,a,i);let c=[...s];"done"===u.status&&(u=eI(u,r,n,c.sort((e,t)=>
2t.order-e.order).flatMap(e=>e.exit),o,void 0));try{if(a===t.historyValue&&function(e,t){if(e.length!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(t._nodes,s))return u;return eH(u,{_nodes:c,historyValue:a})}catch(e){throw e}}function eP(e,t,n,r){if(eb(e)){if(t[e.id]){let i=t[e.id];for(let e of i)r.add(e),eP(e,t,n,r);for(let o of i)eM(r,t,n,ed(o,e.parent))}else{let i=ev(e);for(let o of i.target)r.add(o),i===e.parent?.initial&&n.add(e.parent),eP(o,t,n,r);for(let o of i.target)eM(r,t,n,ed(o,e.parent))}}else if("compound"===e.type){let[i]=e.initial.target;eb(i)||(r.add(i),n.add(i)),eP(i,t,n,r),eM(r,t,n,ed(i,e))}else if("parallel"===e.type)for(let i of ec(e).filter(e=>!eb(e)))[...r].some(e=>e_(e,i))||(eb(i)||(r.add(i),n.add(i)),eP(i,t,n,r))}function eM(e,t,n,r,i){for(let o of r)if((!i||e_(o,i))&&e.add(o),"parallel"===o.type)for(let r of ec(o).filter(e=>!eb(e)))[...e].some(e=>e_(e,r))||(e.add(r),eP(r,t,n,e))}function eI(e,t,n,r,i,o){let s=o?[]:void 0,a=function e(t,n,r,i,o,s){let{machine:a}=t,l=t;for(let t of i){var u;let i="function"==typeof t,c=i?t:(u="string"==typeof t?t:t.type,a.implementations.actions[u]),d={context:l.context,event:n,self:r.self,system:r.system},f=i||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:l.context,event:n}):t.params:void 0;if(!c||!("resolve"in c)){r.actionExecutor({type:"string"==typeof t?t:"object"==typeof t?t.type:t.name||"(anonymous)",info:d,params:f,exec:c});continue}let[h,p,g]=c.resolve(r,l,d,f,c,o);l=h,"retryResolve"in c&&s?.push([c,p]),"execute"in c&&r.actionExecutor({type:c.type,info:d,params:p,exec:c.execute.bind(null,r,p)}),g&&(l=e(l,n,r,g,o,s))}return l}(e,t,n,r,{internalQueue:i,deferredActorIds:o},s);return s?.forEach(([e,t])=>{e.retryResolve(n,a,t)}),a}function eO(e,t,n,r){let i=e,o=[];function s(e,t,r){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:t,snapshot:e,_transitions:r}),o.push(e)}if(t.type===R)return s(i=eH(e$(i,t,n),{status:"stopped"}),t,[]),{snapshot:i,microstates:o};let a=t;if(a.type!==A){let t=a,l=t.type.startsWith("xstate.error.actor"),u=ez(t,i);if(l&&!u.length)return s(i=eH(e,{status:"error",error:t.error}),t,[]),{snapshot:i,microstates:o};s(i=ej(u,e,n,a,!1,r),t,u)}let l=!0;for(;"active"===i.status;){let e=l?function(e,t){let n=new Set;for(let r of e._nodes.filter(eu))e:for(let i of[r].concat(ed(r,void 0)))if(i.always){for(let r of i.always)if(void 0===r.guard||el(r.guard,e.context,t,e)){n.add(r);break e}}return eT(Array.from(n),new Set(e._nodes),e.historyValue)}(i,a):[],t=e.length?i:void 0;if(!e.length){if(!r.length)break;e=ez(a=r.shift(),i)}l=(i=ej(e,i,n,a,!1,r))!==t,s(i,a,e)}return"active"!==i.status&&e$(i,a,n),{snapshot:i,microstates:o}}function e$(e,t,n){return eI(e,t,n,Object.values(e.children).map(e=>ea(e)),[],void 0)}function ez(e,t){return t.machine.getTransitionData(t,e)}let eL=function(e){return function e(t,n){let r=z(t),i=z(n);return"string"==typeof i?"string"==typeof r&&i===r:"string"==typeof r?r in i:Object.keys(r).every(t=>t in i&&e(r[t],i[t]))}(e,this.value)},eN=function(e){return this.tags.has(e)},eD=function(e){let t=this.machine.getTransitionData(this,e);return!!t?.length&&t.some(e=>void 0!==e.target||e.actions.length)},eV=function(){let{_nodes:e,tags:t,machine:n,getMeta:r,toJSON:i,can:o,hasTag:s,matches:a,...l}=this;return{...l,tags:Array.from(t)}},eF=function(){return this._nodes.reduce((e,t)=>(void 0!==t.meta&&(e[t.id]=t.meta),e),{})};function eB(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:ep(t.root,e._nodes),tags:new Set(e._nodes.flatMap(e=>e.tags)),children:e.children,historyValue:e.historyValue||{},matches:eL,hasTag:eN,can:eD,getMeta:eF,toJSON:eV}}function eH(e,t={}){return eB({...e,...t},e.machine)}function eU(e,t,n,r,{event:i,id:o,delay:s},{internalQueue:a}){let l;let u=t.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let c="function"==typeof i?i(n,r):i;if("string"==typeof s){let e=u&&u[s];l="function"==typeof e?e(n,r):e}else l="function"==typeof s?s(n,r):s;return"number"!=typeof l&&a.push(c),[t,{event:c,id:o,delay:l},void 0]}function eW(e,t){let{event:n,delay:r,id:i}=t;if("number"==typeof r){e.defer(()=>{let t=e.self;e.system.scheduler.schedule(t,t,n,r,i)});return}}function eq(e,t){function n(e,t){}return n.type="xstate.raise",n.event=e,n.id=t?.id,n.delay=t?.delay,n.resolve=eU,n.execute=eW,n}let eX=new WeakMap,eY="xstate.observable.error",eG="xstate.observable.complete";function eZ(e){return{config:e,transition:(e,t)=>{if("active"!==e.status)return e;switch(t.type){case eY:return{...e,status:"error",error:t.data,input:void 0,_subscription:void 0};case eG:return{...e,status:"done",input:void 0,_subscription:void 0};case R:return e._subscription.unsubscribe(),{...e,status:"stopped",input:void 0,_subscription:void 0};default:return e}},getInitialSnapshot:(e,t)=>
2({status:"active",output:void 0,error:void 0,context:void 0,input:t,_subscription:void 0}),start:(t,{self:n,system:r,emit:i})=>{"done"!==t.status&&(t._subscription=e({input:t.input,system:r,self:n,emit:i}).subscribe({next:e=>{n._parent&&r._relay(n,n._parent,e)},error:e=>{r._relay(n,n,{type:eY,data:e})},complete:()=>{r._relay(n,n,{type:eG})}}))},getPersistedSnapshot:({_subscription:e,...t})=>t,restoreSnapshot:e=>({...e,_subscription:void 0})}}let eK="xstate.promise.resolve",eJ="xstate.promise.reject",eQ=new WeakMap;function e0(e){return{config:e,transition:(e,t,n)=>{if("active"!==e.status)return e;switch(t.type){case eK:{let n=t.data;return{...e,status:"done",output:n,input:void 0}}case eJ:return{...e,status:"error",error:t.data,input:void 0};case R:return eQ.get(n.self)?.abort(),eQ.delete(n.self),{...e,status:"stopped",input:void 0};default:return e}},start:(t,{self:n,system:r,emit:i})=>{if("active"!==t.status)return;let o=new AbortController;eQ.set(n,o),Promise.resolve(e({input:t.input,system:r,self:n,signal:o.signal,emit:i})).then(e=>{"active"===n.getSnapshot().status&&(eQ.delete(n),r._relay(n,n,{type:eK,data:e}))},e=>{"active"===n.getSnapshot().status&&(eQ.delete(n),r._relay(n,n,{type:eJ,data:e}))})},getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,input:t}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e}}let e1=(l=void 0,{config:a=e=>void 0,transition:(e,t,n)=>({...e,context:a(e.context,t,n)}),getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,context:"function"==typeof l?l({input:t}):l}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e});function e2(e,t,n,r,{assignment:i}){if(!t.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let o={},s={context:t.context,event:n.event,spawn:function(e,{machine:t,context:n},r,i){let o=(o,s)=>{if("string"!=typeof o)return J(o,{id:s?.id,parent:e.self,syncSnapshot:s?.syncSnapshot,input:s?.input,src:o,systemId:s?.systemId});{let a=U(t,o);if(!a)throw Error(`Actor logic '${o}' not implemented in machine '${t.id}'`);let l=J(a,{id:s?.id,parent:e.self,syncSnapshot:s?.syncSnapshot,input:"function"==typeof s?.input?s.input({context:n,event:r,self:e.self}):s?.input,src:o,systemId:s?.systemId});return i[l.id]=l,l}};return(t,n)=>{let r=o(t,n);return i[r.id]=r,e.defer(()=>{r._processingStatus!==G.Stopped&&r.start()}),r}}(e,t,n.event,o),self:e.self,system:e.system},a={};if("function"==typeof i)a=i(s,r);else for(let e of Object.keys(i)){let t=i[e];a[e]="function"==typeof t?t(s,r):t}let l=Object.assign({},t.context,a);return[eH(t,{context:l,children:Object.keys(o).length?{...t.children,...o}:t.children}),void 0,void 0]}function e5(e){function t(e,t){}return t.type="xstate.assign",t.assignment=e,t.resolve=e2,t}let e3=new WeakMap;function e4(e,t,n){let r=e3.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},e3.set(e,r)),r[t]}let e6={},e8=e=>"string"==typeof e?{type:e}:"function"==typeof e?"resolve"in e?{type:e.type}:{type:e.name}:e;class e7{constructor(e,t){if(this.config=e,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=t._parent,this.key=t._key,this.machine=t._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join("."),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?L(this.config.states,(e,t)=>new e7(e,{_parent:this,_key:t,_machine:this.machine})):e6,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=!0===this.config.history?"shallow":this.config.history||
2!1,this.entry=N(this.config.entry).slice(),this.exit=N(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=N(e.tags).slice()}_initialize(){this.transitions=function(e){let t=new Map;if(e.config.on)for(let n of Object.keys(e.config.on)){if(""===n)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let r=e.config.on[n];t.set(n,F(r).map(t=>ey(e,n,t)))}if(e.config.onDone){let n=`xstate.done.state.${e.id}`;t.set(n,F(e.config.onDone).map(t=>ey(e,n,t)))}for(let n of e.invoke){if(n.onDone){let r=`xstate.done.actor.${n.id}`;t.set(r,F(n.onDone).map(t=>ey(e,r,t)))}if(n.onError){let r=`xstate.error.actor.${n.id}`;t.set(r,F(n.onError).map(t=>ey(e,r,t)))}if(n.onSnapshot){let r=`xstate.snapshot.${n.id}`;t.set(r,F(n.onSnapshot).map(t=>ey(e,r,t)))}}for(let n of e.after){let e=t.get(n.eventType);e||(e=[],t.set(n.eventType,e)),e.push(n)}return t}(this),this.config.always&&(this.always=F(this.config.always).map(e=>ey(this,"",e))),Object.keys(this.states).forEach(e=>{this.states[e]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.t
2ype,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(e8),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(e=>`#${e.id}`),source:`#${this.id}`,actions:this.initial.actions.map(e8),eventType:null})}:void 0,history:this.history,states:L(this.states,e=>e.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(e=>({...e,actions:e.actions.map(e8)})),entry:this.entry.map(e8),exit:this.exit.map(e8),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return e4(this,"invoke",()=>N(this.config.invoke).map((e,t)=>{var n,r;let{src:i,systemId:o}=e,s=e.id??(n=this.id,`${t}.${n}`),a="string"==typeof i?i:`xstate.invoke.${r=this.id,`${t}.${r}`}`;return{...e,src:a,id:s,systemId:o,toJSON(){let{onDone:t,onError:n,...r}=e;return{...r,type:"xstate.invoke",src:a,id:s}}}}))}get on(){return e4(this,"on",()=>[...this.transitions].flatMap(([e,t])=>t.map(t=>[e,t])).reduce((e,[t,n])=>(e[t]=e[t]||[],e[t].push(n),e),{}))}get after(){return e4(this,"delayedTransitions",()=>(function(e){let t=e.config.after;if(!t)return[];let n=t=>{var n;let r=(n=e.id,{type:`xstate.after.${t}.${n}`}),i=r.type;return e.entry.push(eq(r,{id:i,delay:t})),e.exit.push(et(i)),i};return Object.keys(t).flatMap(e=>{let r=t[e],i=Number.isNaN(+e)?e:+e,o=n(i);return N("string"==typeof r?{target:r}:r).map(e=>({...e,event:o,delay:i}))}).map(t=>{let{delay:n}=t;return{...ey(e,t.event,t),delay:n}})})(this))}get initial(){return e4(this,"initial",()=>(function(e,t){let n="string"==typeof t?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw Error(`Initial state node "${t}" not found on parent state node #${e.id}`);let r={source:e,actions:t&&"string"!=typeof t?N(t.actions):[],eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r})(this,this.config.initial))}next(e,t){let n;let r=t.type,i=[];for(let o of e4(this,`candidates-${r}`,()=>{var e;return e=this,e.transitions.get(r)||[...e.transitions.keys()].filter(e=>W(r,e)).sort((e,t)=>t.length-e.length).flatMap(t=>e.transitions.get(t))})){let{guard:s}=o,a=e.context,l=!1;try{l=!s||el(s,a,t,e)}catch(t){let e="string"==typeof s?s:"object"==typeof s?s.type:void 0;throw Error(`Unable to evaluate guard ${e?`'${e}' `:""}in transition for event '${r}' in state node '${this.id}': 3${t.message}`)}if(l){i.push(...o.actions),n=o;break}}return n?[n]:void 0}get events(){return e4(this,"events",()=>{let{states:e}=this,t=new Set(this.ownEvents);if(e)for(let n of Object.keys(e)){let r=e[n];if(r.states)for(let e of r.events)t.add(`${e}`)}return Array.from(t)})}get ownEvents(){return Array.from(new Set(Object.keys(Object.fromEntries(this.transitions)).filter(e=>this.transitions.get(e).some(e=>!(!e.target&&!e.actions.length&&!e.reenter)))))}}class e9{constructor(e,t){this.config=e,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=e.id||"(machine)",this.implementations={actors:t?.actors??{},actions:t?.actions??{},delays:t?.delays??{},guards:t?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new e7(e,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(e){let{actions:t,guards:n,actors:r,delays:i}=this.implementations;return new e9(this.config,{actions:{...t,...e.actions},guards:{...n,...e.guards},actors:{...r,...e.actors},delays:{...i,...e.delays}})}resolveState(e){let t=function(e,t){let n=ef(eE(e,t));return ep(e,[...n])}(this.root,e.value),n=ef(eE(this.root,t));return eB({_nodes:[...n],context:e.context||{},children:{},status:eg(n,this.root)?"done":e.status||"active",output:e.output,error:e.error,historyValue:e.historyValue},this)}transition(e,t,n){return eO(e,t,n,[]).snapshot}microstep(e,t,n){return eO(e,t,n,[]).microstates}getTransitionData(e,t){return function e(t,n,r,i){return"string"==typeof n?function(e,t,n,r){let i=eS(e,t).next(n,r);return i&&i.length?i:e.next(n,r)}(t,n,r,i):1===Object.keys(n).length?function(t,n,r,i){let o=Object.keys(n),s=e(e
3S(t,o[0]),n[o[0]],r,i);return s&&s.length?s:t.next(r,i)}(t,n,r,i):function(t,n,r,i){let o=[];for(let s of Object.keys(n)){let a=n[s];if(!a)continue;let l=e(eS(t,s),a,r,i);l&&o.push(...l)}return o.length?o:t.next(r,i)}(t,n,r,i)}(this.root,e.value,e,t)||[]}getPreInitialState(e,t,n){let{context:r}=this.config,i=eB({context:"function"!=typeof r&&r?r:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof r?eI(i,t,e,[e5(({spawn:e,event:t,self:n})=>r({spawn:e,input:t.input,self:n}))],n,void 0):i}getInitialSnapshot(e,t){let n=M(t),r=[],i=this.getPreInitialState(e,n,r),{snapshot:o}=eO(ej([{target:[...ex(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],i,e,n,!0,r),n,e,r);return o}start(e){Object.values(e.children).forEach(e=>{"active"===e.getSnapshot().status&&e.start()})}getStateNodeById(e){let t=$(e),n=t.slice(1),r=em(t[0])?t[0].slice(1):t[0],i=this.idMap.get(r);if(!i)throw Error(`Child state node '#${r}' does not exist on machine '${this.id}'`);return ek(i,n)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(e,t){return function(e,t){let{_nodes:n,tags:r,machine:i,children:o,context:s,can:a,hasTag:l,matches:u,getMeta:c,toJSON:d,...f}=e,h={};for(let e in o){let n=o[e];h[e]={snapshot:n.getPersistedSnapshot(t),src:n.src,systemId:n.systemId,syncSnapshot:n._syncSnapshot}}return{...f,context:function e(t){let n;for(let r in t){let i=t[r];if(i&&"object"==typeof i){if("sessionId"in i&&"send"in i&&"ref"in i)(n??=Array.isArray(t)?t.slice():{...t})[r]={xstate$$type:1,id:i.id};else{let o=e(i);o!==i&&((n??=Array.isArray(t)?t.slice():{...t})[r]=o)}}}return n??t}(s),children:h,historyValue:function(e){if("object"!=typeof e||null===e)return{};let t={};for(let n in e){let r=e[n];Array.isArray(r)&&(t[n]=r.map(e=>({id:e.id})))}return t}(f.historyValue)}}(e,t)}restoreSnapshot(e,t){let n={},r=e.children;Object.keys(r).forEach(e=>{let i=r[e],o=i.snapshot,s=i.src,a="string"==typeof s?U(this,s):s;if(!a)return;let l=J(a,{id:e,parent:t.self,syncSnapshot:i.syncSnapshot,snapshot:o,src:s,systemId:i.systemId});n[e]=l});let i=function(e,t){if(!t||"object"!=typeof t)return{};let n={};for(let r in t)for(let i of t[r]){let t=function(e,t){if(t instanceof e7)return t;try{return e.machine.getStateNodeById(t.id)}catch{}}(e,i);t&&(n[r]??=[],n[r].push(t))}return n}(this.root,e.historyValue),o=eB({...e,children:n,_nodes:Array.from(ef(eE(this.root,e.value))),historyValue:i},this),s=new Set;return!function e(t,n){if(!s.has(t))for(let r in s.add(t),t){let i=t[r];if(i&&"object"==typeof i){if("xstate$$type"in i&&1===i.xstate$$type){t[r]=n[i.id];continue}e(i,n)}}}(o.context,n),o}}function te(e,t,n,r,{event:i}){return[t,{event:"function"==typeof i?i(n,r):i},void 0]}function tt(e,{event:t}){e.defer(()=>e.emit(t))}function tn(e){function t(e,t){}return t.type="xstate.emit",t.event=e,t.resolve=te,t.execute=tt,t}let tr=((u={}).Parent="#_parent",u.Internal="#_internal",u);function ti(e,t,n,r,{to:i,event:o,id:s,delay:a},l){let u,c;let d=t.machine.implementations.delays;if("string"==typeof o)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${o}" }) instead`);let f="function"==typeof o?o(n,r):o;if("string"==typeof a){let e=d&&d[a];u="function"==typeof e?e(n,r):e}else u="function"==typeof a?a(n,r):a;let h="function"==typeof i?i(n,r):i;if("string"==typeof h){if(!(c=h===tr.Parent?e.self._parent:h===tr.Internal?e.self:h.startsWith("#_")?t.children[h.slice(2)]:l.deferredActorIds?.includes(h)?h:t.children[h]))throw Error(`Unable to send event to actor '${h}' from machine '${t.machine.id}'.`)}else c=h||e.self;return[t,{to:c,targetId:"string"==typeof h?h:void 0,event:f,id:s,delay:u},void 0]}function to(e,t,n){"string"==typeof n.to&&(n.to=t.children[n.to])}function ts(e,t){e.defer(()=>{let{to:n,event:r,delay:i,id:o}=t;if("number"==typeof i){e.system.scheduler.schedule(e.self,n,r,i,o);return}e.system._relay(e.self,n,"xstate.error"===r.type?P(e.self.id,r.data):r)})}function ta(e,t,n){function r(e,t){}return r.type="xstate.sendTo",r.to=e,r.event=t,r.id=n?.id,r.delay=n?.delay,r.resolve=ti,r.retryResolve=to,r.execute=ts,r}function tl(e,t){return ta(tr.Parent,e,t)}
3function tu(e,t,n,r,{collect:i}){let o=[],s=function(e){o.push(e)};return s.assign=(...e)=>{o.push(e5(...e))},s.cancel=(...e)=>{o.push(et(...e))},s.raise=(...e)=>{o.push(eq(...e))},s.sendTo=(...e)=>{o.push(ta(...e))},s.sendParent=(...e)=>{o.push(tl(...e))},s.spawnChild=(...e)=>{o.push(ei(...e))},s.stopChild=(...e)=>{o.push(ea(...e))},s.emit=(...e)=>{o.push(tn(...e))},i({context:n.context,event:n.event,enqueue:s,check:e=>el(e,t.context,n.event,t),self:e.self,system:e.system},r),[t,void 0,o]}function tc(e){function t(e,t){}return t.type="xstate.enqueueActions",t.collect=e,t.resolve=tu,t}function td(e,t,n,r,{value:i,label:o}){return[t,{value:"function"==typeof i?i(n,r):i,label:o},void 0]}function tf({logger:e},{value:t,label:n}){n?e(n,t):e(t)}function th(e=({context:e,event:t})=>({context:e,event:t}),t){function n(e,t){}return n.type="xstate.log",n.value=e,n.label=t,n.resolve=td,n.execute=tf,n}function tp(e,t){let n=N(t);if(!n.some(t=>W(e.type,t))){let t=1===n.length?`type matching "${n[0]}"`:`one of types matching "${n.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(e)} to have ${t}`)}}function tg({schemas:e,actors:t,actions:n,guards:r,delays:i}){return{assign:e5,sendTo:ta,raise:eq,log:th,cancel:et,stopChild:ea,enqueueActions:tc,emit:tn,spawnChild:ei,createStateConfig:e=>e,createAction:e=>e,createMachine:o=>new e9({...o,schemas:e},{actors:t,actions:n,guards:r,delays:i}),extend:o=>tg({schemas:e,actors:t,actions:{...n,...o.actions},guards:{...r,...o.guards},delays:{...i,...o.delays}})}}var tm=n(87481),ty=n(83780),tv=n(48949),tb=n(80029),tw=n(3055),tx=n(37506),tS=n(68255),tk=n(3339),tE=["addListener","removeListener"],t_=["addEventListener","removeEventListener"],tT=["on","off"];function tC(e,t,n,r){if((0,tS.m)(n)&&(r=n,n=void 0),r)return tC(e,t,n).pipe((0,tk.Z)(r));var i=(0,ty.CR)((0,tS.m)(e.addEventListener)&&(0,tS.m)(e.removeEventListener)?t_.map(function(r){return function(i){return e[r](t,i,n)}}):(0,tS.m)(e.addListener)&&(0,tS.m)(e.removeListener)?tE.map(tA(e,t)):(0,tS.m)(e.on)&&(0,tS.m)(e.off)?tT.map(tA(e,t)):[],2),o=i[0],s=i[1];if(!o&&(0,tx.z)(e))return(0,tw.z)(function(e){return tC(e,t,n)})((0,tv.Xf)(e));if(!o)throw TypeError("Invalid event target");return new tb.y(function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return o(t),function(){return s(t)}})}function tA(e,t){return function(n){return function(r){return e[n](t,r)}}}var tR=n(36637),tj=n(40306),tP=n(10672),tM=n(29230),tI=n(41958),tO=n(42144),t$=n(64541);function tz(e){return e<=0?function(){return t$.E}:(0,tM.e)(function(t,n){var r=0;t.subscribe((0,tI.x)(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}var tL=n(94780);let tN=e=>({context:t})=>{let{count:n,include:r,exclude:i,responseType:o="message.received"}=e;return{count:n,domain:t.domain,from:t.connectTo,include:r?Array.isArray(r)?r:[r]:[],exclude:i?Array.isArray(i)?i:[i]:[],responseType:o,target:t.target,to:t.name}},tD=e=>t=>{let{data:n}=t;return(!e.include.length||e.include.includes(n.type))&&(!e.exclude.length||!e.exclude.includes(n.type))&&n.domain===e.domain&&n.from===e.from&&n.to===e.to&&(!e.target||t.source===e.target)},tV=e=>t=>({type:e,message:t}),tF=(0,tm.P)(()=>tC(window,"message")),tB=e=>eZ(({input:t})=>{var n,r,i,o;return tF.pipe(e?(0,tR.U)(e):(0,tj.z)(),(0,tP.h)(tD(t)),(0,tR.U)(tV(t.responseType)),t.count?(0,tj.z)((n=t.count,void 0===r&&(r=null),r=null!=r?r:n,(0,tM.e)(function(e,t){var i=[],o=0;e.subscribe((0,tI.x)(t,function(e){var s,a,l,u,c=null;o++%r==0&&i.push([]);try{for(var d=(0,ty.XA)(i),f=d.next();!f.done;f=d.next()){var h=f.value;h.push(e),n<=h.length&&(c=null!=c?c:[]).push(h)}}catch(e){s={error:e}}finally{try{f&&!f.done&&(a=d.return)&&a.call(d)}finally{if(s)throw s.error}}if(c)try{for(var p=(0,ty.XA)(c),g=p.next();!g.done;g=p.next()){var h=g.value;(0,tO.P)(i,h),t.next(h)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}},function(){var e,n;try{for(var r=(0,ty.XA)(i),o=r.next();!o.done;o=r.next()){var s=o.value;t.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}t.complete()},void 0,function(){i=null}))})),(i=e=>e,(0,tS.m)(void 0)?(0,tw.z)(i,o,1):(0,tw.z)(i,1)),tz(t.count)):(0,tj.z)())}),tH="sanity/comlink",tU="comlink/response",tW="comlink/heartbeat",tq="comlink/disconnect",tX="comlink/handshake/syn",tY="comlink/handshake/syn-ack",tG="comlink/handshake/ack",tZ=e=>t=>t.pipe(tz(1),(0,tR.U)(()=>{throw Error(e)})),tK=()=>tg({types:{},actors:{listen:eZ(({input:e})=>{let t=e.signal?tC(e.signal,"abort").pipe(tZ(`Request ${e.requestId} aborted`)):t$.E;return tC(window,"message").pipe((0,tP.h)(t=>t.data?.type===tU&&t.data?.responseTo===e.requestId&&!!t.source&&e.sources.has(t.source)),tz(e.sources.size),(0,tM.e)(function(e,n){(0,tv.Xf)(t).subscribe((0,tI.x)(n,function(){return n.complete()},tL.Z)),n.closed||e.subscribe(n)}))})},actions:{"send message":({context:e},t)=>{let{sources:n,targetOrigin:r}=e,{message:i}=t;
3n.forEach(e=>{e.postMessage(i,{targetOrigin:r})})},"on success":ta(({context:e})=>e.parentRef,({context:e,self:t})=>(e.response&&e.resolvable?.resolve(e.response),{type:"request.success",requestId:t.id,response:e.response,responseTo:e.responseTo})),"on fail":ta(({context:e})=>e.parentRef,({context:e,self:t})=>(e.suppressWarnings||console.warn(`[@sanity/comlink] Received no response to message '${e.type}' on client '${e.from}' (ID: '${e.id}').`),e.resolvable?.reject(Error("No response received")),{type:"request.failed",requestId:t.id})),"on abort":ta(({context:e})=>e.parentRef,({context:e,self:t})=>(e.resolvable?.reject(Error("Request aborted")),{type:"request.aborted",requestId:t.id}))},guards:{expectsResponse:({context:e})=>e.expectResponse},delays:{initialTimeout:0,responseTimeout:({context:e})=>e.responseTimeout??3e3}}).createMachine({context:({input:e})=>({channelId:e.channelId,data:e.data,domain:e.domain,expectResponse:e.expectResponse??!1,from:e.from,id:`msg-${_()}`,parentRef:e.parentRef,resolvable:e.resolvable,response:null,responseTimeout:e.responseTimeout,responseTo:e.responseTo,signal:e.signal,sources:e.sources instanceof Set?e.sources:new Set([e.sources]),suppressWarnings:e.suppressWarnings,targetOrigin:e.targetOrigin,to:e.to,type:e.type}),initial:"idle",on:{abort:".aborted"},states:{idle:{after:{initialTimeout:[{target:"sending"}]}},sending:{entry:{type:"send message",params:({context:e})=>{let{channelId:t,data:n,domain:r,from:i,id:o,responseTo:s,to:a,type:l}=e;return{message:{channelId:t,data:n,domain:r,from:i,id:o,to:a,type:l,responseTo:s}}}},always:[{guard:"expectsResponse",target:"awaiting"},"success"]},awaiting:{invoke:{id:"listen for response",src:"listen",input:({context:e})=>({requestId:e.id,sources:e.sources,signal:e.signal}),onError:"aborted"},after:{responseTimeout:"failed"},on:{message:{actions:e5({response:({event:e})=>e.data.data,responseTo:({event:e})=>e.data.responseTo}),target:"success"}}},failed:{type:"final",entry:"on fail"},success:{type:"final",entry:"on success"},aborted:{type:"final",entry:"on abort"}},output:({context:e,self:t})=>({requestId:t.id,response:e.response,responseTo:e.responseTo})});c=({sendBack:e,input:t})=>{let n=()=>{e(t.event)};t.immediate&&n();let r=setInterval(n,t.interval);return()=>{clearInterval(r)}},e=>e;let tJ=()=>tg({types:{},actors:{requestMachine:tK(),listen:tB()},actions:{"buffer handshake":e5({handshakeBuffer:({event:e,context:t})=>(tp(e,"message.received"),[...t.handshakeBuffer,e])}),"buffer message":tc(({enqueue:e})=>{e.assign({buffer:({event:e,context:t})=>(tp(e,"post"),[...t.buffer,{data:e.data,resolvable:e.resolvable,options:e.options}])}),e.emit(({event:e})=>(tp(e,"post"),{type:"buffer.added",message:e.data}))}),"create request":e5({requests:({context:e,event:t,self:n,spawn:r})=>{tp(t,"request");let i=(Array.isArray(t.data)?t.data:[t.data]).map(t=>r("requestMachine",{id:`req-${_()}`,input:{channelId:e.channelId,data:t.data,domain:e.domain,expectResponse:t.expectResponse,from:e.name,parentRef:n,resolvable:t.resolvable,responseTimeout:t.options?.responseTimeout,responseTo:t.responseTo,signal:t.options?.signal,sources:e.target,suppressWarnings:t.options?.suppressWarnings,targetOrigin:e.targetOrigin,to:e.connectTo,type:t.type}}));return[...e.requests,...i]}}),"emit heartbeat":tn(()=>({type:"heartbeat"})),"emit received message":tc(({enqueue:e})=>{e.emit(({event:e})=>(tp(e,"message.received"),{type:"message",message:e.message.data}))}),"emit status":tn((e,t)=>({type:"status",status:t.status})),"post message":eq(({event:e})=>(tp(e,"post"),{type:"request",data:{data:e.data.data,expectResponse:!!e.resolvable,type:e.data.type,resolvable:e.resolvable,options:e.options}})),"process pending handshakes":tc(({context:e,enqueue:t})=>{e.handshakeBuffer.forEach(e=>t.raise(e)),t.assign({handshakeBuffer:[]})}),"remove request":tc(({context:e,enqueue:t,event:n})=>{tp(n,["request.success","request.failed","request.aborted"]),ea(n.requestId),t.assign({requests:e.requests.filter(({id:e})=>e!==n.requestId)})}),"send response":eq(({event:e})=>(tp(e,["message.received","heartbeat.received"]),{type:"request",data:{type:tU,responseTo:e.message.data.id,data:void 0}})),"send handshake syn ack":eq({type:"request",data:{type:tY}}),"send pending messages":tc(({enqueue:e})=>{e.raise(({context:e})=>({type:"request",data:e.buffer.map(({data:e,resolvable:t,options:n})=>({data:e.data,type:e.type,expectResponse:!!t,resolvable:t,options:n}))})),e.emit(({context:e})=>({type:"buffer.flushed",messages:e.buffer.map(({data:e})=>e)}
3)),e.assign({buffer:[]})}),"set connection config":e5({channelId:({event:e})=>(tp(e,"handshake.syn"),e.message.data.channelId),target:({event:e})=>(tp(e,"handshake.syn"),e.message.source||void 0),targetOrigin:({event:e})=>(tp(e,"handshake.syn"),e.message.origin)})},guards:{hasSource:({context:e})=>null!==e.target}}).createMachine({id:"node",context:({input:e})=>({buffer:[],channelId:null,connectTo:e.connectTo,domain:e.domain??tH,handshakeBuffer:[],name:e.name,requests:[],target:void 0,targetOrigin:null}),invoke:{id:"listen for handshake syn",src:"listen",input:tN({include:tX,responseType:"handshake.syn"})},on:{"request.success":{actions:"remove request"},"request.failed":{actions:"remove request"},"request.aborted":{actions:"remove request"},"handshake.syn":{actions:"set connection config",target:".handshaking"}},initial:"idle",states:{idle:{entry:[{type:"emit status",params:{status:"idle"}}],on:{post:{actions:"buffer message"}}},handshaking:{guard:"hasSource",entry:["send handshake syn ack",{type:"emit status",params:{status:"handshaking"}}],invoke:[{id:"listen for handshake ack",src:"listen",input:tN({include:tG,count:1,responseType:"handshake.complete"}),onDone:"connected"},{id:"listen for disconnect",src:"listen",input:tN({include:tq,count:1,responseType:"disconnect"})},{id:"listen for messages",src:"listen",input:tN({exclude:[tq,tX,tG,tW,tU]})}],on:{request:{actions:"create request"},post:{actions:"buffer message"},"message.received":{actions:"buffer handshake"},disconnect:{target:"idle"}}},connected:{entry:["process pending handshakes","send pending messages",{type:"emit status",params:{status:"connected"}}],invoke:[{id:"listen for messages",src:"listen",input:tN({exclude:[tq,tX,tG,tW,tU]})},{id:"listen for heartbeat",src:"listen",input:tN({include:tW,responseType:"heartbeat.received"})},{id:"listen for disconnect",src:"listen",input:tN({include:tq,count:1,responseType:"disconnect"})}],on:{request:{actions:"create request"},post:{actions:"post message"},disconnect:{target:"idle"},"message.received":{actions:["send response","emit received message"]},"heartbeat.received":{actions:["send response","emit heartbeat"]}}}}}),tQ=(e,t=tJ())=>{let n;let r=J(t,{input:e}),i=new Map,o=new Map;r.on("message",({message:e})=>{let t=i.get(e.type);if(t){t.forEach(t=>t(e.data));return}let n=o.get(e.type);n?n.add(e):o.set(e.type,new Set([e]))});let s=()=>{r.stop()};return{actor:r,fetch:(e,t,n)=>{let i,o;let{responseTimeout:s=1e4,signal:a,suppressWarnings:l}=n||{},u="function"==typeof Promise.withResolvers?Promise.withResolvers():{promise:new Promise((e,t)=>{i=e,o=t}),resolve:i,reject:o};return r.send({type:"post",data:{type:e,data:t},resolvable:u,options:{responseTimeout:s,signal:a,suppressWarnings:l}}),u.promise},machine:t,on:(e,t,n)=>{let r=i.get(e)||new Set;i.has(e)||i.set(e,r),r.add(t);let s=o.get(e);if(s){let r=n?.replay??1;Array.from(s).slice(-r).forEach(({data:e})=>t(e)),o.delete(e)}return()=>{r.delete(t)}},onStatus:(e,t)=>{let i=r.on("status",r=>{n=r.status,t&&r.status!==t||e(r.status)});return n&&e(n),()=>i.unsubscribe()},post:(e,t)=>{r.send({type:"post",data:{type:e,data:t}})},start:()=>(r.start(),s),stop:s}},t0={"handshake/syn":tX,"handshake/syn-ack":tY,"handshake/ack":tG,"channel/response":tU,"channel/heartbeat":tW,"channel/disconnect":tq,"overlay/focus":"visual-editing/focus","overlay/navigate":"visual-editing/navigate","overlay/toggle":"visual-editing/toggle","presentation/toggleOverlay":"presentation/toggle-overlay"},t1={[tX]:"handshake/syn",[tY]:"handshake/syn-ack",[tG]:"handshake/ack",[tU]:"channel/response",[tW]:"channel/heartbeat",[tq]:"channel/disconnect","visual-editing/focus":"overlay/focus","visual-editing/navigate":"overlay/navigate","visual-editing/toggle":"overlay/toggle","presentation/toggle-overlay":"presentation/toggleOverlay"},t2=e=>{let{data:t}=e;return t&&"object"==typeof t&&"domain"in t&&"type"in t&&"from"in t&&"to"in t&&("sanity/channels"===t.domain&&(t.domain=tH),"overlays"===t.to&&(t.to="visual-editing"),"overlays"===t.from&&(t.from="visual-editing"),t.channelId=t.connectionId,delete t.connectionId,t.type=t0[t.type]??t.type),e},t5=e=>{let{channelId:t,...n}=e,r={...n,connectionId:t};return r.domain===tH&&(r.domain="sanity/channels"),"visual-editing"===r.to&&(r.to="overlays"),"visual-editing"===r.from&&(r.from="overlays"),r.type=t1[r.type]??r.type,"channel/response"===r.type&&r.responseTo&&!r.data&&(r.data={responseTo:r.responseTo}),("handshake/syn"===r.type||"handshake/syn-ack"===r.type||"handshake/ack"===r.type)&&(r.data={id:r.connectionId}),r},t3=({context:e},t)=>{let{sources:n,targetOrigin:r}=e,i=t5(t.message);
3n.forEach(e=>{e.postMessage(i,{targetOrigin:r})})},t4=()=>({listen:tB(t2),requestMachine:tK().provide({actions:{"send message":t3}})});function t6(){return window.self!==window.top}function t8(){return!!window.opener}var t7=n(7653),t9=n(3458);let ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/_key\s*==\s*['"](.*)['"]/,nn=/^\d*:\d*$/;function nr(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function ni(e){return"string"==typeof e?nt.test(e.trim()):"object"==typeof e&&"_key"in e}function no(e){if("string"==typeof e&&nn.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)}function ns(e){if(!Array.isArray(e))throw Error("Path is not an array");return e.reduce((e,t,n)=>{let r=typeof t;if("number"===r)return`${e}[${t}]`;if("string"===r)return`${e}${0===n?"":"."}${t}`;if(ni(t)&&t._key)return`${e}[_key=="${t._key}"]`;if(Array.isArray(t)){let[n,r]=t;return`${e}[${n}:${r}]`}throw Error(`Unsupported path segment \`${JSON.stringify(t)}\``)},"")}function na(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(ne);if(!t)throw Error("Invalid path string");return t.map(nl)}function nl(e){return nr(e)?Number(e.replace(/[^\d]/g,"")):ni(e)?{_key:e.match(nt)[1]}:no(e)?function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e):e}var nu=Object.freeze({__proto__:null,fromString:na,get:function(e,t,n){let r="string"==typeof t?na(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<r.length;e++){let t=r[e];if(nr(t)){if(!Array.isArray(i))return n;i=i[t]}if(ni(t)){if(!Array.isArray(i))return n;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),typeof i>"u")return n}return i},isIndexSegment:nr,isIndexTuple:no,isKeySegment:ni,reKeySegment:nt,toString:ns});let nc="drafts.";function nd(e){return e.startsWith(nc)}function nf(e){return e.startsWith("versions.")}function nh(e){return nf(e)?nc+np(e):nd(e)?e:nc+e}function np(e){return nf(e)?e.split(".").slice(2).join("."):nd(e)?e.slice(nc.length):e}var ng=n(31695),nm=n(5974);function ny(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):nv.test(e)?Number(e):e)}let nv=/^-?\d+$/,nb=/^[a-z_$]+/;function nw(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&&nb.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function nx(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:ny(e),op:{type:"set",value:n.set[e]}})):[],..."setIfMissing"in t?Object.keys(t.setIfMissing).map(e=>({path:ny(e),op:{type:"setIfMissing",value:t.setIfMissing[e]}})):[],..."unset"in t?t.unset.map(e=>({path:ny(e),op:{type:"unset"}})):[],..."inc"in t?Object.keys(t.inc).map(e=>({path:ny(e),op:{type:"inc",amount:t.inc[e]}})):[],..."inc"in t?Object.keys(t.dec).map(e=>({path:ny(e),op:{type:"dec",amount:t.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let t=function(e){let t=nS.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${nS.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!t)throw Error("Insert patch missing position");let n=ny(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 nS=["before","replace","after"];function nk(e){return n_(e)}function nE(e){return e.flatMap(nk)}function n_(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:[nw(t)]};if("insert"===n.type)return{insert:{[n.position]:nw([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[nw(t)]:n.value}};if("inc"===n.type)return{inc:{[nw(t)]:n.amount}};if("dec"===n.type)return{dec:{[nw(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[nw(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${nw(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>
3nw([...t,{_key:e._key}])),insert:{[n.position]:nw([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[nw(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>nw(t.concat(e)))};if("replace"===n.type)return{insert:{replace:nw(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[nw(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}function nT(e){return Array.isArray(e)?e:[e]}var nC=Object.freeze({__proto__:null,decode:function(e){return nx(e)},decodeAll:function(e){return e.map(nx)},encode:nk,encodeAll:nE,encodeMutation:n_,encodeTransaction:function(e){return{transactionId:e.id,mutations:nE(e.mutations)}}});function nA(e,t,n){return{type:"insert",referenceItem:n,position:t,items:nT(e)}}function nR(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function nj(e){return{type:"remove",referenceItem:e}}function nP(e,t){return{path:"string"==typeof e?ny(e):e,op:t}}let nM=J(e1),nI=nM,nO=new Set,n$=/_key\s*==\s*['"](.*)['"]/,nz=/^\d*:\d*$/;function nL(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function nN(e){return"string"==typeof e?n$.test(e.trim()):"object"==typeof e&&"_key"in e}let nD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nV=/_key\s*==\s*['"](.*)['"]/;function nF(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(nD);if(!t)throw Error("Invalid path string");return t.map(nB)}(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<r.length;e++){let t=r[e];if(nL(t)){if(!Array.isArray(i))return n;i=i[t]}if(nN(t)){if(!Array.isArray(i))return n;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),typeof i>"u")return n}return i}function nB(e){return nL(e)?Number(e.replace(/[^\d]/g,"")):nN(e)?{_key:e.match(nV)[1]}:!function(e){if("string"==typeof e&&nz.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 nH(){return(0,t7.useSyncExternalStore)(nq,nW,nU)}function nU(){return nM}function nW(){return nI}function nq(e){return nO.add(e),()=>nO.delete(e)}function nX(){let e;let t=(0,x.c)(2),n=nH();return t[0]!==n?(e=n===nM,t[0]=n,t[1]=e):e=t[1],!e}function nY(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function nG(e,t){let n=t6(),r=t8();if(t===nM||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let i=nh(e),o=np(e),s=t.getSnapshot().context?.documents,a=s?.[i],l=s?.[o],u=a||l;if(!u)throw Error(`Document "${e}" not found`);let c=a.getSnapshot().context?.local||l.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:a,draftId:i,getSnapshot:()=>d,publishedDoc:l,publishedId:o,get snapshot(){if(!c)throw Error(`Snapshot for document "${e}" not found`);return c}}}function nZ(){let e,t,n;let r=(0,x.c)(7),i=nH();r[0]!==i?(e=e=>({id:e,commit:()=>{let{draftDoc:t}=nG(e,i);t.send({type:"submit"})},get:t=>{let{snapshot:n}=nG(e,i);return t?nF(n,t):n},getSnapshot:function(e,t){let{getSnapshot:n}=nG(e,t);return n}(e,i),patch:async(t,n)=>{let r=nG(e,i),{draftDoc:o,draftId:s,getSnapshot:a,publishedId:l}=r,{commit:u=!0}=n||{},c=await ("function"==typeof t?t({draftId:s,publishedId:l,get snapshot(){return r.snapshot},getSnapshot:a}):t),d=await a();if(!d)throw Error(`Snapshot for document "${e}" not found`);o.send({type:"mutate",mutations:[{type:"createIfNotExists",document:{...d,_id:s}},{type:"patch",id:s,patches:nT(c)}]}),u&&("object"==typeof u&&"debounce"in u?nY(()=>o.send({type:"submit"}),u.debounce)():o.send({type:"submit"}))}}),r[0]=i,r[1]=e):e=r[1];let o=e;r[2]!==i?(t=(e,t,n)=>{let{draftDoc:r}=nG(e,i),{commit:o}=n||{},s=void 0===o||o;r.send({type:"mutate",mutations:t}),s&&("object"==typeof s&&"debounce"in s?nY(()=>r.send({type:"submit"}),s.debounce)():r.send({type:"submit"}))},r[2]=i,r[3]=t):t=r[3];let s=t;return r[4]!==o||r[5]!==s?(n={getDocument:o,mutateDocument:s},r[4]=o,r[5]=s,r[6]=n):n=r[6],n}let nK=()=>
3{if(o)return o;o=[];for(let e=0;e<256;++e)o[e]=(e+256).toString(16).slice(1);return o};function nJ(e){let t=nK();return(function(e=16){let t=new Uint8Array(e);return crypto.getRandomValues(t),t})(e).reduce((e,n)=>e+t[n],"").slice(0,e)}function nQ(e){let t,n;let r="string"==typeof e?e:e.path,i=r.lastIndexOf("."),o=r.substring(i+1,r.length);if(!o.indexOf("["))throw Error("Invalid path: not an array");let s=r.lastIndexOf("["),a=r.substring(0,s);if(o.includes("_key")){let e=o.indexOf('"')+1,r=o.indexOf('"',e);t=o.substring(e,r),n=!0}else{let e=o.indexOf("[")+1,r=o.indexOf("]",e);t=o.substring(e,r),n=!1}if(!a||!t)throw Error("Invalid path");return{path:a,key:t,hasExplicitKey:n}}async function n0(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:i}=nQ(e),o=await t.getSnapshot(),s=nF(o,r),a=nF(o,e.path),l=s.findIndex(e=>e._key===i),u=-1,c="before";if("first"===n){if(0===l)return[];u=0,c="before"}else if("last"===n){if(l===s.length-1)return[];u=-1,c="after"}else if("next"===n){if(l===s.length-1)return[];u=l,c="after"}else if("previous"===n){if(0===l)return[];u=l-1,c="before"}return[nP(r,nR(l,l+1)),nP(r,nA(a,c,u))]}var n1=n(20246);let n2=(0,n1.zGw)((0,n1.Z_8)(),(0,n1.EiV)(1)),n5=(0,n1.jtO)(n2),n3=(0,n1.Ryn)({baseUrl:n2,dataset:n5,id:n2,path:n2,projectId:n5,tool:n5,type:n5,workspace:n5,perspective:(0,n1.tvc)((0,n1.Z_8)(),"drafts")}),n4=/^([\w-]+):(0|[1-9][0-9]*)$/,n6=/^([\w-]+):([0-9]+),([0-9]+)$/,n8=/^([\w-]+):([\w-]+)$/,n7=(0,n1.zGw)((0,n1.Z_8)(),(0,n1.EiV)(1)),n9=(0,n1.Ryn)({origin:n7,href:n7,data:(0,n1.jtO)((0,n1.IMB)((0,n1.Z_8)(),(0,n1._4T)()))});function re(e){let t=(0,n1.AsG)(n3,e);if(t.success)return t.output;let n=(0,n1.AsG)(n9,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,n1.Qc3)(n3,Object.fromEntries(e.searchParams.entries())):n.output}catch(e){return console.error("Failed to parse sanity node",e),n.output}}var rt={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},rn={0:8203,1:8204,2:8205,3:65279},rr={0:String.fromCodePoint(rn[0]),1:String.fromCodePoint(rn[1]),2:String.fromCodePoint(rn[2]),3:String.fromCodePoint(rn[3])},ri=[,,,,].fill(String.fromCodePoint(rn[0])).join(""),ro=Object.fromEntries(Object.entries(rr).map(e=>[e[1],+e[0]])),rs=Object.fromEntries(Object.entries(rt).map(e=>e.reverse())),ra=`${Object.values(rt).map(e=>`\\u{${e.toString(16)}}`).join("")}`,rl=RegExp(`[${ra}]{4,}`,"gu");let ru=[];for(let e=0;e<256;++e)ru.push((e+256).toString(16).slice(1));let rc=new Uint8Array(16);var rd={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function rf(e,t,n){if(rd.randomUUID&&!e)return rd.randomUUID();let r=(e=e||{}).random??e.rng?.()??function(){if(!i){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(rc)}();if(r.length<16)throw Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(ru[e[t+0]]+ru[e[t+1]]+ru[e[t+2]]+ru[e[t+3]]+"-"+ru[e[t+4]]+ru[e[t+5]]+"-"+ru[e[t+6]]+ru[e[t+7]]+"-"+ru[e[t+8]]+ru[e[t+9]]+"-"+ru[e[t+10]]+ru[e[t+11]]+ru[e[t+12]]+ru[e[t+13]]+ru[e[t+14]]+ru[e[t+15]]).toLowerCase()}(r)}function rh(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function rp(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 rg(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function rm(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function ry(e,t,n){let r,i;let o={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})(o,rp(e,Math.min(e.w,e.h)/10,"horizontal"===n?"x":"y"))))return null;for(let s 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 i=function(e,t){let{x1:n,y1:r,x2:i,y2:o}=e,{x1:s,y1:a,x2:l,y2:u}=t;if(n===i&&r===o||s===l&&a===u)return!1;let c=(u-a)*(i-n)-(l-s)*(o-r);if(0===c)return!1;let d=((l-s)*(r-a)-(u-a)*(n-s))/c,f=((i-n)*(r-a)-(o-r)*(n-s))/c;return!(d<0)&&!(d>1)&&!(f<0)&&!(f>1)&&{x:n+d*(i-n),y:r+d*(o-r)}}(e,n[t]);if(i){let e=!1;for(let t=0;t<r.length;t++)r[t].x===i.x&&r[t].y===i.y&&(e=!0);e||r.push(i)}}return 0!==r.length&&r.sort((t,n)=>rm(t,{x:e.x1,y:e.y1})-rm(n,{x:e.x1,y:e.y1}))}(e,rp(s,Math.min(s.w,s.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?rm(o,e)<rm(o,r)&&(r=e,i=s):(r=e,i=s)}}return i||null}function rv(e,t,n){let{x:r,y:i,w:o,h:s}=e,{x:a,y:l}=n;return{x:a+(r-a)*t,y:l+(i-l)*t,w:o*t,h:s*t}}function rb(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 rw(e,t){return t.find(t=>rg(rh(t.elements.element),e))?.sanity}function rx(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:rw(t.left,e)}:null,right:t.right?{rect:t.right,sanity:rw(t.right,e)}:null}
3:{top:t.top?{rect:t.top,sanity:rw(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:rw(t.bottom,e)}:null}}function rS(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 rk(e,t,n){let r=rh(t),i=[...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 o=i.map(e=>{let t=rv(rh(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:o}}async function rE(e,t,n,r,i){return new Promise(o=>{e.addEventListener("transitionend",()=>{setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"})},2*i),o()},{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 r_(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=rb(e),r=t.min>8&&t.min+t.width<=window.innerWidth-8,i=n.min>8&&n.min+n.height<=document.body.scrollHeight-8,o=r&&i;return{x:o?t.min-8:t.min,y:o?n.min-8:n.min,w:o?t.width+16:t.width,h:o?n.height+16:n.height}}async function rT(e,t,n,r,i,o){return new Promise(s=>{if(1===new DOMMatrix(window.getComputedStyle(t).transform).a)return;let a=n-window.innerHeight,l=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*i),s()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),t.style.transform=`translateY(${Math.max(l-e,-a+l)}px) scale(1)`,o&&(document.body.style.overflow=o.body.overflow,document.body.style.height=o.body.height,document.documentElement.style.overflow=o.documentElement.overflow,document.documentElement.style.height=o.documentElement.height)})}let rC=!1,rA={y:0},rR={x:0,y:0},rj=typeof document>"u"?0:document.documentElement.scrollHeight,rP=null,rM=e=>e instanceof HTMLElement||e instanceof SVGElement,rI=e=>e&&rM(e)?e.dataset?.sanityOverlayElement?e:rI(e.parentElement):null;function rO(e){return rl.lastIndex=0,rl.test(e)}function r$(e,t=!1){return rO(e)?function(e,t=!1){try{let n=function(e){let t=e.match(rl);if(t)return function(e,t=!1){let n=Array.from(e);if(n.length%2==0){if(n.length%4||!e.startsWith(ri))return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${rs[e[2*t].codePointAt(0)]}${rs[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let i=[],o=[r.join("")],s=10;for(;o.length;){let e=o.shift();try{if(i.push(JSON.parse(e)),t)break}catch(r){if(!s--)throw r;let t=+(null==(n=r.message.match(/\sposition\s(\d+)$/))?void 0:n[1]);if(!t)throw r;o.unshift(e.substring(0,t),e.substring(t))}}return i}(n,t)}else throw Error("Encoded data has invalid length");let r=n.slice(4),i=new Uint8Array(r.length/4);for(let e=0;e<i.length;e++)i[e]=ro[r[4*e]]<<6|ro[r[4*e+1]]<<4|ro[r[4*e+2]]<<2|ro[r[4*e+3]];let o=new TextDecoder().decode(i);if(t){let e=o.indexOf("\0");return -1===e&&(e=o.length),[JSON.parse(o.slice(0,e))]}return o.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 rz=e=>e.nodeType===Node.ELEMENT_NODE,rL=e=>"IMG"===e.tagName,rN=e=>"TIME"===e.tagName,rD=e=>"SVG"===e.tagName.toUpperCase();function rV(e){return"path"in e}function rF(e){if(!e.length||!e.map(e=>rV(e)).every((e,t,n)=>e===n[0]))return;if(!rV(e[0]))return e[0];let t=e.filter(rV),n=e[0],r=["projectId","dataset","id","baseUrl","workspace","tool"];for(let e=1;e<t.length;e++){let i=t[e];if(r.some(e=>i[e]!==n?.[e])){n=void 0;break}n={...n,path:function(e,t){let n=e.split("."),r=t.split("."),i=Math.min(n.length,r.length);return n=n.slice(0,i).reverse(),r=r.slice(0,i).reverse(),n.reduce((e,t,n
3)=>t===r[n]?[...e,t]:[],[]).reverse().join(".")}(n.path,i.path)}}return n}function rB(e){let t=e.lastIndexOf(".");return e.substring(t,e.length).includes("[")}function rH(e){if(!rB(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function rU(e,t){return!!(rB(e.path)&&rB(t.path))&&rH(e.path)===rH(t.path)}function rW(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!rV(t)||!rB(t.path))return null;let i=e.getAttribute("data-sanity-drag-group"),o=[...n].reduce((e,n)=>{let o=r.get(n),s=n.getAttribute("data-sanity-drag-disable"),a=n.getAttribute("data-sanity-drag-group"),l=null!==n.getAttribute("data-sanity");return o?.sanity&&!s&&rV(o.sanity)&&rU(t,o.sanity)&&(null===i||i===a)&&l&&e.push(o),e},[]);return o.length<=1?null:o}let rq=(0,t7.createContext)(null);var rX=n(96441),rY=n(74054),rG=n(5121),rZ=n(86021),rK=n(85618);function rJ(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 rQ(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 r0="all-items",r1={gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))",alignItems:"start"};function r2(e){let t,n,r,i,o,s,a,l,u,c,d,f,h,p,g,m;let y=(0,rX.c)(54),v=void 0===e.showIcons||e.showIcons,b=void 0===e.filter||"auto"===e.filter?e.schemaTypes.length>5:e.filter;y[0]!==e.groups||y[1]!==e.labels?(t=e.groups?[{name:r0,title:e.labels["insert-menu.filter.all-items"],selected:!0},...e.groups.map(r4)]:[],y[0]=e.groups,y[1]=e.labels,y[2]=t):t=y[2],y[3]!==e.views?(n=e.views??[{name:"list"}
3],y[3]=e.views,y[4]=n):n=y[4],y[5]!==n?(r=n.map(r3),y[5]=n,y[6]=r):r=y[6],y[7]!==t||y[8]!==r?(i={query:"",groups:t,views:r},y[7]=t,y[8]=r,y[9]=i):i=y[9];let[x,S]=(0,t7.useReducer)(rQ,i);if(y[10]!==e||y[11]!==b||y[12]!==v||y[13]!==x.groups||y[14]!==x.query||y[15]!==x.views){var k,E,_;let t,n,r;let i=(k=e.schemaTypes,E=x.query,_=x.groups,k.filter(e=>(function(e,t){let n=t.find(e=>e.selected);return!n||n.name===r0||n.of?.includes(e.name)})(e,_)&&function(e,t){let n=t.trim().toLowerCase();return e.title?e.title?.toLowerCase().includes(n):e.name.includes(n)}(e,E))),p=x.views.find(r5),g=b||x.views.length>1,m=x.groups&&x.groups.length>0,T=g||m;a=rG.v2,h=0,s=rG.kC,c="column",d="fill",y[25]!==T?(t=T?{style:{borderBottom:"1px solid var(--card-border-color)"},paddingBottom:1}:{},y[25]=T,y[26]=t):t=y[26],y[27]!==e.labels||y[28]!==b||y[29]!==g||y[30]!==x.query||y[31]!==x.views?(n=g?(0,w.jsxs)(rG.kC,{flex:"none",align:"center",paddingTop:1,paddingX:1,gap:1,children:[b?(0,w.jsx)(rG.xu,{flex:1,children:(0,w.jsx)(rG.oi,{autoFocus:!0,border:!1,fontSize:1,icon:rY.W1M,onChange:e=>{S({type:"change query",query:e.target.value})},placeholder:e.labels["insert-menu.search.placeholder"],value:x.query})}):null,x.views.length>1?(0,w.jsx)(rG.xu,{flex:"none",children:(0,w.jsx)(r7,{views:x.views,onToggle:e=>{S({type:"toggle view",name:e})},labels:e.labels})}):null]}):null,y[27]=e.labels,y[28]=b,y[29]=g,y[30]=x.query,y[31]=x.views,y[32]=n):n=y[32],y[33]!==m||y[34]!==x.groups?(r=m?(0,w.jsx)(rG.xu,{paddingTop:1,paddingX:1,children:(0,w.jsx)(rG.td,{space:1,children:x.groups.map(e=>(0,w.jsx)(rG.OK,{id:`${e.name}-tab`,"aria-controls":`${e.name}-panel`,label:e.title??rZ(e.name),selected:e.selected,onClick:()=>{S({type:"select group",name:e.name})}},e.name))})}):null,y[33]=m,y[34]=x.groups,y[35]=r):r=y[35],y[36]!==t||y[37]!==n||y[38]!==r?(f=(0,w.jsxs)(rG.xu,{...t,children:[n,r]}),y[36]=t,y[37]=n,y[38]=r,y[39]=f):f=y[39],o=rG.xu,l=1,u=0===i.length?(0,w.jsx)(rG.xu,{padding:2,children:(0,w.jsx)(rG.xv,{muted:!0,size:1,children:e.labels["insert-menu.search.no-results"]})}):p?"grid"===p.name?(0,w.jsx)(rG.rj,{autoRows:"auto",flex:1,gap:1,style:r1,children:i.map(t=>(0,w.jsx)(ie,{icon:v?rJ(t):void 0,onClick:()=>{e.onSelect(t)},previewImageUrl:p.previewImageUrl?.(t.name),schemaType:t},t.name))}):(0,w.jsx)(rG.Kq,{flex:1,space:1,children:i.map(t=>(0,w.jsx)(rG.sN,{icon:v?rJ(t):void 0,onClick:()=>{e.onSelect(t)},text:t.title??rZ(t.name)},t.name))}):null,y[10]=e,y[11]=b,y[12]=v,y[13]=x.groups,y[14]=x.query,y[15]=x.views,y[16]=o,y[17]=s,y[18]=a,y[19]=l,y[20]=u,y[21]=c,y[22]=d,y[23]=f,y[24]=h}else o=y[16],s=y[17],a=y[18],l=y[19],u=y[20],c=y[21],d=y[22],f=y[23],h=y[24];return y[40]!==o||y[41]!==l||y[42]!==u?(p=(0,w.jsx)(o,{padding:l,children:u}),y[40]=o,y[41]=l,y[42]=u,y[43]=p):p=y[43],y[44]!==s||y[45]!==p||y[46]!==c||y[47]!==d||y[48]!==f?(g=(0,w.jsxs)(s,{direction:c,height:d,children:[f,p]}),y[44]=s,y[45]=p,y[46]=c,y[47]=d,y[48]=f,y[49]=g):g=y[49],y[50]!==a||y[51]!==g||y[52]!==h?(m=(0,w.jsx)(a,{padding:h,children:g}),y[50]=a,y[51]=g,y[52]=h,y[53]=m):m=y[53],m}function r5(e){return e.selected}function r3(e,t){return{...e,selected:0===t}}function r4(e){return{...e,selected:!1}}let r6={grid:rY.dd_,list:rY.AEM},r8={grid:"insert-menu.toggle-grid-view.tooltip",list:"insert-menu.toggle-list-view.tooltip"};function r7(e){let t,n,r,i;let o=(0,rX.c)(11),s=e.views.findIndex(r9),a=e.views[s+1]??e.views[0],l=e.labels[r8[a.name]];o[0]!==l?(t=(0,w.jsx)(rG.xv,{size:1,children:l}),o[0]=l,o[1]=t):t=o[1];let u=r6[a.name];return o[2]!==a.name||o[3]!==e?(n=()=>{e.onToggle(a.name)},o[2]=a.name,o[3]=e,o[4]=n):n=o[4],o[5]!==u||o[6]!==n?(r=(0,w.jsx)(rG.zx,{mode:"bleed",icon:u,onClick:n}),o[5]=u,o[6]=n,o[7]=r):r=o[7],o[8]!==t||o[9]!==r?(i=(0,w.jsx)(rG.u,{content:t,placement:"top",portal:!0,children:r}),o[8]=t,o[9]=r,o[10]=i):i=o[10],i}function r9(e){return e.selected}function ie(e){let t,n,r,i,o,s,a,l,u;let c=(0,rX.c)(19),[d,f]=(0,t7.useState)(!1),h=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]!==h?(r=(0,rK.isValidElementType)(h)?(0,w.jsx)(rG.kC,{align:"center",justify:"center",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,w.jsx)(rG.xv,{size:1,children:(0,w.jsx)(h,{})})}):null,c[2]=h,c[3]=r):r=c[3],c[4]!==d||c[5]!==e.previewImageUrl?(i=!e.previewImageUrl||d?null:(0,w.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]=i):i=c[6],c[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,w.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]=o):o=c[7],c[8]!==r||c[9]!==i?(s=(0,w.jsxs)(rG.xu,{flex:"none",style:n,children:[r,i,o]}),c[8]=r,c[9]=i,c[10]=s):s=c[10];
3let p=e.schemaType.title??e.schemaType.name;return c[11]!==p?(a=(0,w.jsx)(rG.xu,{flex:1,padding:2,children:(0,w.jsx)(rG.xv,{size:1,weight:"medium",children:p})}),c[11]=p,c[12]=a):a=c[12],c[13]!==s||c[14]!==a?(l=(0,w.jsxs)(rG.kC,{direction:"column",gap:1,padding:1,children:[s,a]}),c[13]=s,c[14]=a,c[15]=l):l=c[15],c[16]!==e.onClick||c[17]!==l?(u=(0,w.jsx)(rG.sN,{padding:0,radius:2,onClick:e.onClick,style:t,children:l}),c[16]=e.onClick,c[17]=l,c[18]=u):u=c[18],u}function it(e){if(!e)return(0,w.jsx)(rY.FMB,{});if("string"===e.type)return(0,w.jsx)(rY.Rhe,{});if("number"===e.type)return(0,w.jsx)(rY.yEv,{});let{value:t}=e;if("icon"in e&&e.icon)return(0,w.jsx)("div",{dangerouslySetInnerHTML:{__html:e.icon}});let{type:n}=t;if("string"===n)return(0,w.jsx)(rY.Rhe,{});if("boolean"===n)return(0,w.jsx)(rY.nSX,{});if("number"===n)return(0,w.jsx)(rY.yEv,{});if("array"===n||"union"===n)return(Array.isArray(t.of)?t.of:[t.of]).some(e=>"name"in e&&"block"===e.name)?(0,w.jsx)(rY.aI,{}):(0,w.jsx)(rY.DZP,{});if("object"===n){if("image"===e.name)return(0,w.jsx)(rY.XBm,{});if("block"===e.name)return(0,w.jsx)(rY.Rhe,{})}return(0,w.jsx)(rY.FMB,{})}let ir=(0,nm.iv)` 4 overflow-y: scroll; 5 overscroll-behavior: contain; 6 -ms-overflow-style: none; 7 scrollbar-width: none; 8 9 &:before { 10 content: ''; 11 display: block; 12 height: calc(100% + 1px); 13 position: absolute; 14 top: 0; 15 width: 100%; 16 z-index: -1; 17 } 18`,ii=nm.zo.div` 19 height: 100%; 20 inset: 0; 21 pointer-events: all; 22 position: fixed; 23 width: 100%; 24 display: flex; 25 justify-content: center; 26 align-items: center; 27 28 ${e=>e.$blockScroll&&ir} 29`,io=nm.zo.div` 30 background: transparent; 31 height: 100%; 32 inset: 0; 33 position: absolute; 34 width: 100%; 35`,is=e=>{let t;let n=(0,x.c)(2);return n[0]!==e?(t=(0,w.jsx)(ng.h_,{children:(0,w.jsx)(ia,{...e})}),n[0]=e,n[1]=t):t=n[1],t},ia=e=>{let t,n;let r=(0,x.c)(7),{children:i,onDismiss:o,setBoundaryElement:s,blockScroll:a}=e,l=void 0===a||a;return r[0]!==o?(t=(0,w.jsx)(io,{onMouseDownCapture:()=>{o?.()}}),r[0]=o,r[1]=t):t=r[1],r[2]!==l||r[3]!==i||r[4]!==s||r[5]!==t?(n=(0,w.jsxs)(ii,{"data-sanity-overlay-element":!0,ref:s,onClick:il,$blockScroll:l,children:[t,i]}),r[2]=l,r[3]=i,r[4]=s,r[5]=t,r[6]=n):n=r[6],n};function il(e){e.stopPropagation()}function iu(e){return{type:"log",name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}let ic={"Visual Editing Drag Sequence Completed":iu({name:"Visual Editing Drag Sequence Completed",description:"An array is successfully reordered using drag and drop.",version:1}),"Visual Editing Drag Minimap Enabled":iu({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":iu({name:"Visual Editing Context Menu Item Removed",description:"An item is removed using the Context Menu.",version:1}),"Visual Editing Context Menu Item Duplicated":iu({name:"Visual Editing Context Menu Item Duplicated",description:"An item is duplicated using the Context Menu.",version:1}),"Visual Editing Context Menu Item Moved":iu({name:"Visual Editing Context Menu Item Moved",description:"An item is moved using the Context Menu.",version:1}),"Visual Editing Context Menu Item Inserted":iu({name:"Visual Editing Context Menu Item Inserted",description:"An item is inserted using the Context Menu.",version:1}),"Visual Editing Insert Menu Item Inserted":iu({name:"Visual Editing Insert Menu Item Inserted",description:"An item is inserted using the Insert Menu.",version:1}),"Visual Editing Overlay Clicked":iu({name:"Visual Editing Overlay Clicked",description:"An Overlay is clicked.",version:1})},id=(0,t7.createContext)(void 0);function ih(){let e=(0,t7.useContext)(id);if(!e)throw Error("Telemetry context is missing");return e}let ip={"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"},ig=e=>{let t,n,r,i;let o=(0,x.c)(11),{node:s,onSelect:a}=e;o[0]!==s.options?.insertMenu?(t=s.options?.insertMenu||{},o[0]=s.options?.insertMenu,o[1]=t):t=o[1];let l=t;o[2]!==l.views?(n=l.views?.map(im),o[2]=l.views,o[3]=n):n=o[3];let u=n;
35return o[4]!==s.of?(r=s.of.map(iy),o[4]=s.of,o[5]=r):r=o[5],o[6]!==l||o[7]!==a||o[8]!==r||o[9]!==u?(i=(0,w.jsx)(r2,{...l,labels:ip,schemaTypes:r,onSelect:a,views:u}),o[6]=l,o[7]=a,o[8]=r,o[9]=u,o[10]=i):i=o[10],i};function im(e){return"grid"===e.name?{...e,previewImageUrl:t=>e.previewImageUrls?.[t]}:e}function iy(e){return{...e,icon:it(e)}}let iv=e=>{let t,n,r,i,o;let s=(0,x.c)(10);return s[0]!==e?({children:t,style:r,...n}=e,s[0]=e,s[1]=t,s[2]=n,s[3]=r):(t=s[1],n=s[2],r=s[3]),s[4]!==r?(i={...r,pointerEvents:"all"},s[4]=r,s[5]=i):i=s[5],s[6]!==t||s[7]!==n||s[8]!==i?(o=(0,w.jsx)("div",{style:i,"data-sanity-overlay-element":!0,...n,children:t}),s[6]=t,s[7]=n,s[8]=i,s[9]=o):o=s[9],o};var ib=n(37057),iw=n(53528);function ix(e){if(!(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex")||((0,ng.bg)(e)?!!e.href&&"ignore"!==e.rel:(0,ng.LL)(e)?"hidden"!==e.type&&"file"!==e.type&&!e.disabled:!!((0,ng.fe)(e)||(0,ng.RV)(e)||(0,ng.ZH)(e))&&!e.disabled)))return!1;try{e.focus()}catch{}return document.activeElement===e}function iS(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if((0,ng.Re)(n)&&(ix(n)||iS(n)))return!0}return!1}n(98882);let ik=nm.zo.div.withConfig({displayName:"StyledAutocomplete",componentId:"sc-1igauft-0"})`line-height:0;`,iE=(0,nm.zo)(ng.xu).withConfig({displayName:"ListBox",componentId:"sc-1igauft-1"})`& > ul{list-style:none;padding:0;margin:0;}`,i_=(0,nm.F4)` 36 from { 37 transform: rotate(0deg); 38 } 39 40 to { 41 transform: rotate(360deg); 42 } 43`,iT=(0,nm.zo)(rY.L4p).withConfig({displayName:"AnimatedSpinnerIcon",componentId:"sc-1igauft-2"})`animation:${i_} 500ms linear infinite;`;function iC(e){let t,n,r;let i=(0,x.c)(11),{children:o,id:s,onSelect:a,selected:l,value:u}=e;i[0]!==a||i[1]!==u?(t=()=>{setTimeout(()=>{a(u)},0)},i[0]=a,i[1]=u,i[2]=t):t=i[2];let c=t;i[3]!==c?(n=e=>{"Enter"!==e.key||(0,ng.Rm)(e.currentTarget)||c()},i[3]=c,i[4]=n):n=i[4];let d=n;return i[5]!==o||i[6]!==c||i[7]!==d||i[8]!==s||i[9]!==l?(r=(0,w.jsx)("li",{"aria-selected":l,"data-ui":"AutocompleteOption",id:s,role:"option",onClick:c,onKeyDown:d,children:o}),i[5]=o,i[6]=c,i[7]=d,i[8]=s,i[9]=l,i[10]=r):r=i[10],r}function iA(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 iR=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],ij=["bottom-start","top-start"],iP=(e,t)=>t?t.value:e,iM=(e,t)=>t.value.toLowerCase().indexOf(e.toLowerCase())>-1;function iI({renderPopover:e,content:t,hidden:n,inputElement:r,onMouseEnter:i,onMouseLeave:o,resultsPopoverElementRef:s}){return e({content:t,hidden:n,inputElement:r,onMouseEnter:i,onMouseLeave:o},s)}function iO(e){return 0===e?0:1===e||2===e?1:e-2}function i$(e){return Math.max(e-1,0)}(0,t7.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,d,f,h,p,g,m,y,v,b,S,k,E,_,T,C,A,R,j,P,M,I,O,$,z,L,N,D,V,F,B,H,U,W,q,X,Y,G,Z,K,J,Q,ee,et,en,er,ei,eo,es,ea,el,eu,ec,ed,ef,eh;let ep=(0,x.c)(181);ep[0]!==e?({border:_,customValidity:n,disabled:r,filterOption:i,fontSize:T,icon:o,id:s,listBox:C,loading:a,onBlur:l,onChange:u,onFocus:c,onQueryChange:d,onSelect:f,openButton:h,openOnFocus:p,options:g,padding:A,popover:R,prefix:m,radius:j,readOnly:y,relatedElements:v,renderOption:b,renderPopover:S,renderValue:P,suffix:E,value:M,...k}=e,ep[0]=e,ep[1]=n,ep[2]=r,ep[3]=i,ep[4]=o,ep[5]=s,ep[6]=a,ep[7]=l,ep[8]=u,ep[9]=c,ep[10]=d,ep[11]=f,ep[12]=h,ep[13]=p,ep[14]=g,ep[15]=m,ep[16]=y,ep[17]=v,ep[18]=b,ep[19]=S,ep[20]=k,ep[21]=E,ep[22]=_,ep[23]=T,ep[24]=C,ep[25]=A,ep[26]=R,ep[27]=j,ep[28]=P,ep[29]=M):(n=ep[1],r=ep[2],i=ep[3],o=ep[4],s=ep[5],a=ep[6],l=ep[7],u=ep[8],c=ep[9],d=ep[10],f=ep[11],h=ep[12],p=ep[13],g=ep[14],m=ep[15],y=ep[16],v=ep[17],b=ep[18],S=ep[19],k=ep[20],E=ep[21],_=ep[22],T=ep[23],C=ep[24],A=ep[25],R=ep[26],j=ep[27],P=ep[28],M=ep[29]);let eg=void 0===_||_,em=void 0===T?2:T,ey=void 0===C?ng.bT:C,ev=void 0===A?3:A,eb=void 0===R?ng.bT:R,ew=void 0===j?2:j,ex=void 0===P?iP:P,eS=M||null,ek=M||null;ep[30]!==eS||ep[31]!==ek?(I={activeValue:eS,focused:!1,listFocused:!1,query:null,value:ek},ep[30]=eS,ep[31]=ek,ep[32]=I):I=ep[32];let[eE,e_]=(0,t7.useReducer)(iA,I),{activeValue:eT,focused:eC,listFocused:eA,query:eR,value:ej}=eE;ep[33]!==em||ep[34]!==ev?(O=e=>{let{value:t}=e;return(0,w.jsx)(ng.Zb,{"data-as":"button",padding:ev,radius:2,tone:"inherit",children:(0,w.jsx)(ng.xv,{size:em,textOverflow:"ellipsis",children:t})})},ep[33]=em,ep[34]=ev,ep[35]=O):O=ep[35];let eP="function"==typeof b?b:O,eM="function"==typeof i?i:iM,eI=(0,t7.useRef)(null),eO=(0,t7.useRef)(null),e$=(0,t7.useRef)(null),ez=(0,t7.useRef)(null),[eL,eN]=(0,t7.useState)(null);ep[36]===Symbol.for("react.memo_cache_sentinel")?($=e=>{(0,t7.startTransition)(()=>eN(e))},ep[36]=$):$=ep[36];let eD=$,eV=(0,t7.useRef)(!1),eF=(0,t7.useRef)(ej),eB=(0,t7.useRef)(M),eH=(0,t7.useRef)(!1);ep[37]!==eL?(z=()=>eL,L=[eL],ep[37]=eL,ep[38]=z,ep[39]=L):(z=ep[38],L=ep[39]),(0,t7.useImperativeHandle)(e$,z,L),ep[40]!==eL?(N=()=>eL,D=[eL],ep[40]=eL,ep[41]=N,ep[42]=D):(N=ep[41],D=ep[42]),(0,t7.useImperativeHandle)(t,N,D);let eU=`${s}-listbox`,eW=Array.isArray(g)?g:ng.LZ,eq=(0,ng.a5)(ev);ep[43]!==eW||ep[44]!==ej?(V=null!==ej?eW.find(e=>e.value===ej):void 0,ep[43]=eW,ep[44]=ej,ep[45]=V):V=ep[45];let eX=V;if(ep[46]!==eM||ep[47]!==eW||ep[48]!==eR){let e;ep[50]!==eM||ep[51]!==eR?(e=e=>!eR||eM(eR,e),ep[50]=eM,ep[51]=eR,ep[52]=e):e=ep[52],F=eW.filter(e),ep[46]=eM,ep[47]=eW,ep[48]=eR,ep[49]=F}else F=ep[49];let eY=F,eG=eY.length,eZ=eT?`${s}-option-${eT}`:void 0,eK=null!==eR&&a||eC&&null!==eR;ep[53]!==l||ep[54]!==d||ep[55]!==v?(B=e=>{setTimeout(()=>{if(eH.current)return;let t=(v||[]).concat(eI.current?[eI.current]:[],eO.current?[eO.current]:[]),n=!1;if(document.activeElement){for(let e of t)if(e===document.activeElement||e.contains(document.activeElement)){n=!0;break}}!1===n&&(e_({type:"root/blur"}),eH.current=!1,d&&d(null),l&&l(e))},0)},ep[53]=l,ep[54]=d,ep[55]=v,ep[56]=B):B=ep[56];let eJ=B;ep[57]===Symbol.for("react.memo_cache_sentinel")?(H=e=>{let t=ez.current,n=e.target instanceof HTMLElement?e.target:null,r=t?.contains(n)||!1;r!==eV.current&&(eV.current=r,e_({type:"root/setListFocused",listFocused:r}))},ep[57]=H):H=ep[57];let eQ=H;ep[58]!==u||ep[59]!==d||ep[60]!==f?(U=e=>{e_({type:"value/change",value:e}),eH.current=!1,f&&f(e),eF.current=e,u&&u(e),d&&d(null),e$.current?.focus()},ep[58]=u,ep[59]=d,ep[60]=f,ep[61]=U):U=ep[61];let e0=U;ep[62]!==eT||ep[63]!==eY||ep[64]!==eG||ep[65]!==d?(W=e=>{if("ArrowDown"===e.key){if(e.preventDefault(),!eG)return;let t=eY.find(e=>e.value===eT),n=t?eY.indexOf(t):-1,r=eY[(n+1)%eG];r&&e_({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("ArrowUp"===e.key){if(e.preventDefault(),!eG)return;let t=eY.find(e=>e.value===eT),n=t?eY.indexOf(t):-1,r=eY[-1===n?eG-1:(eG+n-1)%eG];r&&e_({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("Escape"===e.key){e_({type:"root/escape"}),eH.current=!1,d&&d(null),e$.current?.focus();return}let t=e.target,n=ez.current;
43if((n===t||n?.contains(t))&&!iR.includes(e.key)){e$.current?.focus();return}},ep[62]=eT,ep[63]=eY,ep[64]=eG,ep[65]=d,ep[66]=W):W=ep[66];let e1=W;ep[67]!==d?(q=e=>{let t=e.currentTarget.value;e_({type:"input/change",query:t}),d&&d(t)},ep[67]=d,ep[68]=q):q=ep[68];let e2=q;ep[69]!==eX||ep[70]!==ex||ep[71]!==ej?(X=()=>{e_({type:"root/open",query:ej?ex(ej,eX):""})},ep[69]=eX,ep[70]=ex,ep[71]=ej,ep[72]=X):X=ep[72];let e5=X;ep[73]!==e5||ep[74]!==eC||ep[75]!==c||ep[76]!==p?(Y=e=>{eC||(e_({type:"input/focus"}),c&&c(e),p&&e5())},ep[73]=e5,ep[74]=eC,ep[75]=c,ep[76]=p,ep[77]=Y):Y=ep[77];let e3=Y;ep[78]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{eH.current=!0},ep[78]=G):G=ep[78];let e4=G;ep[79]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>{eH.current=!1},ep[79]=Z):Z=ep[79];let e6=Z;ep[80]!==u||ep[81]!==d?(K=()=>{e_({type:"root/clear"}),eF.current="",u&&u(""),d&&d(null),e$.current?.focus()},ep[80]=u,ep[81]=d,ep[82]=K):K=ep[82];let e8=K;ep[83]===Symbol.for("react.memo_cache_sentinel")?(J=()=>{e_({type:"input/focus"})},ep[83]=J):J=ep[83];let e7=J;ep[84]!==M?(Q=()=>{if(M!==eB.current){eB.current=M,void 0!==M&&(e_({type:"value/change",value:M}),eF.current=M);return}M!==eF.current&&(eF.current=M||null,e_({type:"value/change",value:M||null}))},ee=[M],ep[84]=M,ep[85]=Q,ep[86]=ee):(Q=ep[85],ee=ep[86]),(0,t7.useEffect)(Q,ee),ep[87]!==eC?(et=()=>{!eC&&eF.current&&e_({type:"root/setActiveValue",value:eF.current})},en=[eC],ep[87]=eC,ep[88]=et,ep[89]=en):(et=ep[88],en=ep[89]),(0,t7.useEffect)(et,en),ep[90]!==eT||ep[91]!==eY?(er=()=>{let e=ez.current;if(!e)return;let t=eY.find(e=>e.value===eT);if(t){let n=eY.indexOf(t),r=e.childNodes[n];if(r){if(document.activeElement&&r.contains(document.activeElement))return;iS(r)}}},ei=[eT,eY],ep[90]=eT,ep[91]=eY,ep[92]=er,ep[93]=ei):(er=ep[92],ei=ep[93]),(0,t7.useEffect)(er,ei);t:{if(!a&&!r&&ej){let e;ep[94]===Symbol.for("react.memo_cache_sentinel")?(e={"aria-label":"Clear",onFocus:e7},ep[94]=e):e=ep[94],eo=e;break t}eo=void 0}let e9=eo,te=eq.map(iO),tt=eq.map(i$),tn="object"==typeof h?h:ng.bT;ep[95]!==e5||ep[96]!==tn?(es=e=>{e5(),tn.onClick&&tn.onClick(e),requestAnimationFrame(()=>e$.current?.focus())},ep[95]=e5,ep[96]=tn,ep[97]=es):es=ep[97];let tr=es;ep[98]!==r||ep[99]!==eK||ep[100]!==em||ep[101]!==tr||ep[102]!==h||ep[103]!==te||ep[104]!==tt||ep[105]!==tn||ep[106]!==y?(ea=r||y||!h?void 0:(0,w.jsx)(ng.xu,{"aria-hidden":eK,padding:te,children:(0,w.jsx)(ng.zx,{"aria-label":"Open",disabled:eK,fontSize:em,icon:rY.v4q,mode:"bleed",padding:tt,...tn,onClick:tr})}),ep[98]=r,ep[99]=eK,ep[100]=em,ep[101]=tr,ep[102]=h,ep[103]=te,ep[104]=tt,ep[105]=tn,ep[106]=y,ep[107]=ea):ea=ep[107];let ti=ea;n:{if(null===eR){if(null!==ej){let e;ep[108]!==eX||ep[109]!==ex||ep[110]!==ej?(e=ex(ej,eX),ep[108]=eX,ep[109]=ex,ep[110]=ej,ep[111]=e):e=ep[111],el=e;break n}el="";break n}el=eR}let to=el;ep[112]!==eA?(eu=e=>{"Tab"===e.key&&eA&&e$.current?.focus()},ep[112]=eA,ep[113]=eu):eu=ep[113];let ts=eu;r:{let e,t,n;if(0===eY.length){ec=null;break r}if(ep[114]!==eT||ep[115]!==eX||ep[116]!==eY||ep[117]!==e0||ep[118]!==s||ep[119]!==eA||ep[120]!==a||ep[121]!==eP){let t;ep[123]!==eT||ep[124]!==eX||ep[125]!==e0||ep[126]!==s||ep[127]!==eA||ep[128]!==a||ep[129]!==eP?(t=e=>{let t=null!==eT?e.value===eT:eX===e;return(0,w.jsx)(iC,{id:`${s}-option-${e.value}`,onSelect:e0,selected:t,value:e.value,children:(0,t7.cloneElement)(eP(e),{disabled:a,selected:t,tabIndex:eA&&t?0:-1})},e.value)},ep[123]=eT,ep[124]=eX,ep[125]=e0,ep[126]=s,ep[127]=eA,ep[128]=a,ep[129]=eP,ep[130]=t):t=ep[130],e=eY.map(t),ep[114]=eT,ep[115]=eX,ep[116]=eY,ep[117]=e0,ep[118]=s,ep[119]=eA,ep[120]=a,ep[121]=eP,ep[122]=e}else e=ep[122];ep[131]!==eU||ep[132]!==e?(t=(0,w.jsx)(ng.Kq,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:eU,ref:ez,role:"listbox",space:1,children:e}),ep[131]=eU,ep[132]=e,ep[133]=t):t=ep[133],ep[134]!==ts||ep[135]!==ey||ep[136]!==t?(n=(0,w.jsx)(iE,{"data-ui":"AutoComplete__results",onKeyDown:ts,padding:1,...ey,tabIndex:-1,children:t}),ep[134]=ts,ep[135]=ey,ep[136]=t,ep[137]=n):n=ep[137],ec=n}let ta=ec;i:{let e;if(S){let e;let t=!eK;ep[138]!==ta||ep[139]!==e4||ep[140]!==e6||ep[141]!==eL||ep[142]!==S||ep[143]!==t?(e=(0,w.jsx)(iI,{content:ta,hidden:t,inputElement:eL,onMouseEnter:e4,onMouseLeave:e6,resultsPopoverElementRef:eO,renderPopover:S}),ep[138]=ta,ep[139]=e4,ep[140]=e6,ep[141]=eL,ep[142]=S,ep[143]=t,ep[144]=e):e=ep[144],ed=e;break i}if(0===eG){ed=null;break i}ep[145]!==ta||ep[146]!==eK||ep[147]!==e4||ep[148]!==e6||ep[149]!==eL||ep[150]!==eb||ep[151]!==ew?(e=(0,w.jsx)(ng.J2,{arrow:!1,constrainSize:!0,content:ta,fallbackPlacements:ij,matchReferenceWidth:!0,onMouseEnter:e4,onMouseLeave:e6,open:eK,overflow:"auto",placement:"bottom-start",portal:!0,radius:ew,ref:eO,referenceElement:eL,...eb}),ep[145]=ta,ep[146]=eK,ep[147]=e4,ep[148]=e6,ep[149]=eL,ep[150]=eb,ep[151]=ew,ep[152]=e):e=ep[152],ed=e}let tl=ed,tu=a&&iT,tc=E||ti;return ep[153]!==eZ||ep[154]!==eg||ep[155]!==e9||ep[156]!==n||ep[157]!==r||ep[158]!==eK||ep[159]!==em||ep[160]!==e8||ep[161]!==e2||ep[162]!==e3||ep[163]!==o||ep[164]!==s||ep[165]!==to||ep[166]!==eU||ep[167]!==eq||ep[168]!==m||ep[169]!==ew||ep[170
43]!==y||ep[171]!==k||ep[172]!==tu||ep[173]!==tc?(ef=(0,w.jsx)(ng.oi,{...k,"aria-activedescendant":eZ,"aria-autocomplete":"list","aria-expanded":eK,"aria-owns":eU,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border:eg,clearButton:e9,customValidity:n,disabled:r,fontSize:em,icon:o,iconRight:tu,id:s,inputMode:"search",onChange:e2,onClear:e8,onFocus:e3,padding:eq,prefix:m,radius:ew,readOnly:y,ref:eD,role:"combobox",spellCheck:!1,suffix:tc,value:to}),ep[153]=eZ,ep[154]=eg,ep[155]=e9,ep[156]=n,ep[157]=r,ep[158]=eK,ep[159]=em,ep[160]=e8,ep[161]=e2,ep[162]=e3,ep[163]=o,ep[164]=s,ep[165]=to,ep[166]=eU,ep[167]=eq,ep[168]=m,ep[169]=ew,ep[170]=y,ep[171]=k,ep[172]=tu,ep[173]=tc,ep[174]=ef):ef=ep[174],ep[175]!==eJ||ep[176]!==eQ||ep[177]!==e1||ep[178]!==tl||ep[179]!==ef?(eh=(0,w.jsxs)(ik,{"data-ui":"Autocomplete",onBlur:eJ,onFocus:eQ,onKeyDown:e1,ref:eI,children:[ef,tl]}),ep[175]=eJ,ep[176]=eQ,ep[177]=e1,ep[178]=tl,ep[179]=ef,ep[180]=eh):eh=ep[180],eh}).displayName="ForwardRef(Autocomplete)";let iz=nm.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;`,iL=(0,nm.zo)(ng.zx).withConfig({displayName:"ExpandButton",componentId:"sc-1es8h8q-1"})`appearance:none;margin:-4px;`;(0,t7.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,d,f,h,p,g;let m=(0,x.c)(30);m[0]!==e?({children:n,gap:r,maxLength:i,separator:s,space:a,...o}=e,m[0]=e,m[1]=n,m[2]=r,m[3]=i,m[4]=o,m[5]=s,m[6]=a):(n=m[1],r=m[2],i=m[3],o=m[4],s=m[5],a=m[6]);let y=void 0===r?void 0===a?2:a:r;m[7]!==y?(l=(0,ng.a5)(y),m[7]=y,m[8]=l):l=m[8];let v=l,[b,S]=(0,t7.useState)(!1),k=(0,t7.useRef)(null),E=(0,t7.useRef)(null);m[9]===Symbol.for("react.memo_cache_sentinel")?(u=()=>S(!1),m[9]=u):u=m[9];let _=u;m[10]===Symbol.for("react.memo_cache_sentinel")?(c=()=>S(!0),m[10]=c):c=m[10];let T=c;m[11]===Symbol.for("react.memo_cache_sentinel")?(d=()=>[k.current,E.current],m[11]=d):d=m[11],(0,ng.Of)(_,d),m[12]!==n?(f=t7.Children.toArray(n).filter(t7.isValidElement),m[12]=n,m[13]=f):f=m[13];let C=f;m[14]!==i||m[15]!==b||m[16]!==C||m[17]!==v?(h={collapse:_,expand:T,expandElementRef:k,maxLength:i,open:b,popoverElementRef:E,rawItems:C,space:v},m[14]=i,m[15]=b,m[16]=C,m[17]=v,m[18]=h):h=m[18];let A=function(e){let t=(0,x.c)(28),{collapse:n,expand:r,expandElementRef:i,maxLength:o,open:s,popoverElementRef:a,rawItems:l,space:u}=e,c=l.length;if(o&&c>o){let e;let d=Math.ceil(o/2),f=Math.floor(o/2);if(t[0]!==f||t[1]!==d||t[2]!==n||t[3]!==r||t[4]!==i||t[5]!==c||t[6]!==s||t[7]!==a||t[8]!==l||t[9]!==u){let o,h,p,g;let m=l.slice(0,d-1);t[11]!==f||t[12]!==d||t[13]!==c||t[14]!==l?(o=l.slice(d-1,c-f),t[11]=f,t[12]=d,t[13]=c,t[14]=l,t[15]=o):o=t[15],t[16]!==u||t[17]!==o?(h=(0,w.jsx)(ng.Kq,{as:"ol",overflow:"auto",padding:u,gap:u,children:o}),t[16]=u,t[17]=o,t[18]=h):h=t[18];let y=s?n:r;t[19]!==i||t[20]!==s||t[21]!==y?(p=(0,w.jsx)(iL,{fontSize:1,mode:"bleed",onClick:y,padding:1,ref:i,selected:s,text:"â¦"}),t[19]=i,t[20]=s,t[21]=y,t[22]=p):p=t[22],t[23]!==s||t[24]!==a||t[25]!==h||t[26]!==p?(g=(0,w.jsx)(ng.J2,{constrainSize:!0,content:h,open:s,placement:"top",portal:!0,ref:a,children:p},"button"),t[23]=s,t[24]=a,t[25]=h,t[26]=p,t[27]=g):g=t[27],e=[...m,g,...l.slice(c-f)],t[0]=f,t[1]=d,t[2]=n,t[3]=r,t[4]=i,t[5]=c,t[6]=s,t[7]=a,t[8]=l,t[9]=u,t[10]=e}else e=t[10];return e}return l}(h);if(m[19]!==A||m[20]!==s||m[21]!==v){let e;m[23]!==s||m[24]!==v?(e=(e,t)=>(0,w.jsxs)(t7.Fragment,{children:[t>0&&(0,w.jsx)(ng.xu,{"aria-hidden":!0,as:"li",paddingX:v,children:s||(0,w.jsx)(ng.xv,{muted:!0,children:"/"})}),(0,w.jsx)(ng.xu,{as:"li",children:e})]},t),m[23]=s,m[24]=v,m[25]=e):e=m[25],p=A.map(e),m[19]=A,m[20]=s,m[21]=v,m[22]=p}else p=m[22];return m[26]!==t||m[27]!==o||m[28]!==p?(g=(0,w.jsx)(iz,{"data-ui":"Breadcrumbs",...o,ref:t,children:p}),m[26]=t,m[27]=o,m[28]=p,m[29]=g):g=m[29],g}).displayName="ForwardRef(Breadcrumbs)";let iN=(0,ng.tx)("@sanity/ui/context/dialog",{version:0});function iD(e,t,n){return!e||!t||(0,ng.dG)(e,n)||(0,ng.dG)(t,n)}let iV=(0,nm.zo)(ng.mh).withConfig({displayName:"StyledDialog",componentId:"sc-4n4xb3-0"})(ng.ZE,function({theme:e}){let{color:t}=(0,ib.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,ib.aQ)(e.theme);return(0,ng.Lt)(t,e.$position,e=>({"&&":{position:e}}))},function(e){return e.$animate?(0,nm.iv)` 44 @keyframes zoomIn { 45 from { 46 opacity: 0; 47 transform: scale(0.95); 48 } 49 to { 50 opacity: 1; 51 transform: scale(1); 52 } 53 }
54 @keyframes fadeIn { 55 from { 56 opacity: 0; 57 } 58 to { 59 opacity: 1; 60 } 61 } 62 63 animation: fadeIn 200ms ease-out; 64 // Animates the dialog card. 65 & > [data-ui='DialogCard'] { 66 animation: zoomIn 200ms ease-out; 67 } 68 `:(0,nm.iv)``}),iF=(0,nm.zo)(ng.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;`,iB=(0,nm.zo)(ng.Zb).withConfig({displayName:"DialogCardRoot",componentId:"sc-4n4xb3-2"})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`,iH=(0,nm.zo)(ng.kC).withConfig({displayName:"DialogLayout",componentId:"sc-4n4xb3-3"})`flex:1;min-height:0;width:100%;`,iU=(0,nm.zo)(ng.xu).withConfig({displayName:"DialogHeader",componentId:"sc-4n4xb3-4"})`position:relative;z-index:2;`,iW=(0,nm.zo)(ng.xu).withConfig({displayName:"DialogContent",componentId:"sc-4n4xb3-5"})`position:relative;z-index:1;overflow:auto;outline:none;`,iq=(0,nm.zo)(ng.xu).withConfig({displayName:"DialogFooter",componentId:"sc-4n4xb3-6"})`position:relative;z-index:3;`,iX=(0,t7.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,d,f,h,p,g,m,y;let v=(0,x.c)(44),{__unstable_autoFocus:b,__unstable_hideCloseButton:S,children:k,contentRef:E,footer:_,header:T,id:C,onClickOutside:A,onClose:R,portal:j,radius:P,scheme:M,shadow:I,width:O}=e,$=(0,ng.vI)(),z=j?$.elements?.[j]||null:$.element,L=(0,ng.sz)().element;v[0]!==P?(n=(0,ng.a5)(P),v[0]=P,v[1]=n):n=v[1];let N=n;v[2]!==I?(r=(0,ng.a5)(I),v[2]=I,v[3]=r):r=v[3];let D=r;v[4]!==O?(i=(0,ng.a5)(O),v[4]=O,v[5]=i):i=v[5];let V=i,F=(0,t7.useRef)(null),B=(0,t7.useRef)(null),{isTopLayer:H}=(0,ng.sJ)(),U=`${C}_label`,W=!!R&&!1===S,q=!!T||W;return v[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>F.current,v[6]=o):o=v[6],(0,t7.useImperativeHandle)(t,o),v[7]===Symbol.for("react.memo_cache_sentinel")?(s=()=>B.current,v[7]=s):s=v[7],(0,t7.useImperativeHandle)(E,s),v[8]!==b?(a=()=>{b&&F.current&&iS(F.current)},l=[b,F],v[8]=b,v[9]=a,v[10]=l):(a=v[9],l=v[10]),(0,t7.useEffect)(a,l),v[11]!==L||v[12]!==H||v[13]!==R||v[14]!==z?(u=e=>{if(!H||!R)return;let t=document.activeElement;t&&!iD(L,z,t)||"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),R())},v[11]=L,v[12]=H,v[13]=R,v[14]=z,v[15]=u):u=v[15],(0,ng.qh)(u),v[16]!==L||v[17]!==H||v[18]!==A||v[19]!==z?(c=H&&A&&(e=>{let t=e.target;t&&!iD(L,z,t)||A()}),v[16]=L,v[17]=H,v[18]=A,v[19]=z,v[20]=c):c=v[20],v[21]===Symbol.for("react.memo_cache_sentinel")?(d=()=>[F.current],v[21]=d):d=v[21],(0,ng.Of)(c,d),v[22]!==T||v[23]!==U||v[24]!==R||v[25]!==W||v[26]!==q?(f=q&&(0,w.jsx)(iU,{children:(0,w.jsxs)(ng.kC,{align:"flex-start",padding:3,children:[(0,w.jsx)(ng.xu,{flex:1,padding:2,children:T&&(0,w.jsx)(ng.xv,{id:U,size:1,weight:"semibold",children:T})}),W&&(0,w.jsx)(ng.xu,{flex:"none",children:(0,w.jsx)(ng.zx,{"aria-label":"Close dialog",disabled:!R,icon:rY.Two,mode:"bleed",onClick:R,padding:2})})]})}),v[22]=T,v[23]=U,v[24]=R,v[25]=W,v[26]=q,v[27]=f):f=v[27],v[28]!==k?(h=(0,w.jsx)(iW,{flex:1,ref:B,tabIndex:-1,children:k}),v[28]=k,v[29]=h):h=v[29],v[30]!==_?(p=_&&(0,w.jsx)(iq,{children:_}),v[30]=_,v[31]=p):p=v[31],v[32]!==f||v[33]!==h||v[34]!==p?(g=(0,w.jsxs)(iH,{direction:"column",children:[f,h,p]}),v[32]=f,v[33]=h,v[34]=p,v[35]=g):g=v[35],v[36]!==N||v[37]!==M||v[38]!==D||v[39]!==g?(m=(0,w.jsx)(iB,{radius:N,ref:F,scheme:M,shadow:D,children:g}),v[36]=N,v[37]=M,v[38]=D,v[39]=g,v[40]=m):m=v[40],v[41]!==m||v[42]!==V?(y=(0,w.jsx)(iF,{"data-ui":"DialogCard",width:V,children:m}),v[41]=m,v[42]=V,v[43]=y):y=v[43],y});iX.displayName="ForwardRef(DialogCard)",(0,t7.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,d,f,h,p,g,m,y,v,b,S,k,E,_,T,C,A,R,j,P,M,I,O,$,z;let L=(0,x.c)(70),N=(0,t7.useContext)(iN),{layer:D}=(0,ng.g9)();L[0]!==e?({__unstable_autoFocus:m,__unstable_hideCloseButton:y,cardRadius:v,cardShadow:b,children:i,contentRef:o,footer:s,header:a,id:l,onActivate:u,onClickOutside:c,onClose:d,onFocus:f,padding:S,portal:h,position:n,scheme:g,width:k,zOffset:r,animate:E,...p}=e,L[0]=e,L[1]=n,L[2]=r,L[3]=i,L[4]=o,L[5]=s,L[6]=a,L[7]=l,L[8]=u,L[9]=c,L[10]=d,L[11]=f,L[12]=h,L[13]=p,L[14]=g,L[15]=m,L[16]=y,L[17]=v,L[18]=b,L[19]=S,L[20]=k,L[21]=E):(n=L[1],r=L[2],i=L[3],o=L[4],s=L[5],a=L[6],l=L[7],u=L[8],c=L[9],d=L[10],f=L[11],h=L[12],p=L[13],g=L[14],m=L[15],y=L[16],v=L[17],b=L[18],S=L[19],k=L[20],E=L[21]);let V=void 0===m||m,F=void 0!==y&&y,B=void 0===v?4:v,H=void 0===b?3:b,U=void 0===S?3:S,W=void 0===k?0:k,q=void 0!==E&&E,X=n??(N.position||"fixed"),Y=r??(N.zOffset||D.dialog.zOffset),G=!(0,ng.Tb)()&&q,Z=(0,ng.vI)(),K=h?Z.elements?.[h]||null:Z.element,J=(0,ng.sz)().element;L[22]!==B?(_=(0,ng.a5)(B),L[22]=B,L[23]=_):_=L[23];let Q=_;L[24]!==U?(T=(0,ng.a5)(U),L[24]=U,L[25]=T):T=L[25];let ee=T;L[26]!==X?(C=(0,ng.a5)(X),L[26]=X,L[27]=C):C=L[27];let et=C;L[28]!==W?(A=(0,ng.a5)(W),L[28]=W,L[29]=A):A=L[29];let en=A;L[30]!==Y?(R=(0,ng.a5)(Y),L[30]=Y,L[31]=R):R=L[31];let er=R,ei=(0,t7.useRef)(null),eo=(0,t7.useRef)(null),es=(0,t7.useRef)(null),ea=(0,t7.useRef)(null);L[32]!==f?(j=e=>{f?.(e);let t=e.target,n=es.current;if(n&&t===ei.current){(function e(t){for(let n=t.childNodes.length-1;n>=0;n--){let r=t.childNodes[n];if((0,ng.Re)(r)&&(ix(r)||e(r)))return!0}return!1})(n);return}if(n&&t===eo.current){iS(n);return}(0,ng.Re)(e.target)&&(ea.current=e.target)},L[32]=f,L[33]=j):j=L[33];let el=j,eu=`${l}_label`,ec=(0,t7.useRef)(void 0);L[34]!==J||L[35]!==K?(P=()=>{ec.current&&clearTimeout(ec.current),ec.current=setTimeout(()=>{let e=document.activeElement;if(e&&!iD(J,K,e)){let e=ea.current;if(!e||!document.body.contains(e)){let e=es.current;e&&iS(e);return}
68e.focus()}},0)},L[34]=J,L[35]=K,L[36]=P):P=L[36];let ed=P;return L[37]===Symbol.for("react.memo_cache_sentinel")?(M=(0,w.jsx)("div",{ref:ei,tabIndex:0}),L[37]=M):M=L[37],L[38]!==V||L[39]!==Q||L[40]!==H||L[41]!==i||L[42]!==o||L[43]!==s||L[44]!==a||L[45]!==F||L[46]!==l||L[47]!==c||L[48]!==d||L[49]!==h||L[50]!==g||L[51]!==en?(I=(0,w.jsx)(iX,{__unstable_autoFocus:V,__unstable_hideCloseButton:F,contentRef:o,footer:s,header:a,id:l,onClickOutside:c,onClose:d,portal:h,radius:Q,ref:es,scheme:g,shadow:H,width:en,children:i}),L[38]=V,L[39]=Q,L[40]=H,L[41]=i,L[42]=o,L[43]=s,L[44]=a,L[45]=F,L[46]=l,L[47]=c,L[48]=d,L[49]=h,L[50]=g,L[51]=en,L[52]=I):I=L[52],L[53]===Symbol.for("react.memo_cache_sentinel")?(O=(0,w.jsx)("div",{ref:eo,tabIndex:0}),L[53]=O):O=L[53],L[54]!==G||L[55]!==el||L[56]!==ed||L[57]!==l||L[58]!==eu||L[59]!==u||L[60]!==ee||L[61]!==et||L[62]!==t||L[63]!==p||L[64]!==I||L[65]!==er?($=(0,w.jsxs)(iV,{...p,$animate:G,$padding:ee,$position:et,"aria-labelledby":eu,"aria-modal":!0,"data-ui":"Dialog",id:l,onActivate:u,onClick:ed,onFocus:el,ref:t,role:"dialog",zOffset:er,children:[M,I,O]}),L[54]=G,L[55]=el,L[56]=ed,L[57]=l,L[58]=eu,L[59]=u,L[60]=ee,L[61]=et,L[62]=t,L[63]=p,L[64]=I,L[65]=er,L[66]=$):$=L[66],L[67]!==h||L[68]!==$?(z=(0,w.jsx)(ng.h_,{__unstable_name:h,children:$}),L[67]=h,L[68]=$,L[69]=z):z=L[69],z}).displayName="ForwardRef(Dialog)";let iY=(0,t7.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,d,f,h,p,g,m,y,v,b,S,k,E,_,T;let C=(0,x.c)(62),{__unstable_disableRestoreFocusOnClose:A,boundaryElement:R,button:j,id:P,menu:M,onClose:I,onOpen:O,placement:$,popoverScheme:z,portal:L,popover:N,popoverRadius:D,preventOverflow:V}=e,F=void 0!==A&&A,B=void 0===L||L,[H,U]=(0,t7.useState)(!1),[W,q]=(0,t7.useState)(null),[X,Y]=(0,t7.useState)(null);C[0]===Symbol.for("react.memo_cache_sentinel")?(n=[],C[0]=n):n=C[0];let[G,Z]=(0,t7.useState)(n),K=(0,t7.useRef)(H);C[1]!==O||C[2]!==H?(r=()=>{O&&H&&!K.current&&O()},i=[O,H],C[1]=O,C[2]=H,C[3]=r,C[4]=i):(r=C[3],i=C[4]),(0,t7.useEffect)(r,i),C[5]!==I||C[6]!==H?(o=()=>{I&&!H&&K.current&&I()},s=[I,H],C[5]=I,C[6]=H,C[7]=o,C[8]=s):(o=C[7],s=C[8]),(0,t7.useEffect)(o,s),C[9]!==H?(a=()=>{K.current=H},l=[H],C[9]=H,C[10]=a,C[11]=l):(a=C[10],l=C[11]),(0,t7.useEffect)(a,l),C[12]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{U(iG),q(null)},C[12]=u):u=C[12];let J=u;C[13]!==H?(c=e=>{H&&e.preventDefault()},C[13]=H,C[14]=c):c=C[14];let Q=c;C[15]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{if("ArrowDown"===e.key||"Enter"===e.key||" "===e.key){e.preventDefault(),U(!0),q("first");return}if("ArrowUp"===e.key){e.preventDefault(),U(!0),q("last");return}},C[15]=d):d=C[15];let ee=d;C[16]!==X||C[17]!==G?(f=e=>{let t=e.target;if(t instanceof Node&&!(X&&(t===X||X.contains(t)))){for(let e of G)if(t===e||e.contains(t))return;U(!1)}},C[16]=X,C[17]=G,C[18]=f):f=C[18];let et=f;C[19]!==X||C[20]!==F?(h=()=>{U(!1),!F&&X&&X.focus()},C[19]=X,C[20]=F,C[21]=h):h=C[21];let en=h;C[22]!==G?(p=e=>{let t=e.relatedTarget;if(t instanceof Node){for(let e of G)if(e===t||e.contains(t))return;U(!1)}},C[22]=G,C[23]=p):p=C[23];let er=p;C[24]!==X||C[25]!==F?(g=()=>{U(!1),!F&&X&&X.focus()},C[24]=X,C[25]=F,C[26]=g):g=C[26];let ei=g;C[27]===Symbol.for("react.memo_cache_sentinel")?(m=e=>(Z(t=>t.concat([e])),()=>Z(t=>t.filter(t=>t!==e))),C[27]=m):m=C[27];let eo=m;C[28]!==X||C[29]!==er||C[30]!==ei||C[31]!==et||C[32]!==en||C[33]!==P||C[34]!==M||C[35]!==W?(y=M&&(0,t7.cloneElement)(M,{"aria-labelledby":P,onBlurCapture:er,onClickOutside:et,onEscape:en,onItemClick:ei,originElement:X,registerElement:eo,shouldFocus:W}),C[28]=X,C[29]=er,C[30]=ei,C[31]=et,C[32]=en,C[33]=P,C[34]=M,C[35]=W,C[36]=y):y=C[36];let es=y;C[37]!==j||C[38]!==Q||C[39]!==P||C[40]!==H?(v=j&&(0,t7.cloneElement)(j,{"data-ui":"MenuButton",id:P,onClick:J,onKeyDown:ee,onMouseDown:Q,"aria-haspopup":!0,"aria-expanded":H,ref:Y,selected:j.props.selected??H}),C[37]=j,C[38]=Q,C[39]=P,C[40]=H,C[41]=v):v=C[41];let ea=v;C[42]!==X?(b=()=>X,S=[X],C[42]=X,C[43]=b,C[44]=S):(b=C[43],S=C[44]),(0,t7.useImperativeHandle)(t,b,S),C[45]!==N?(k=N||{},C[45]=N,C[46]=k):k=C[46],C[47]!==R||C[48]!==$||C[49]!==D||C[50]!==z||C[51]!==B||C[52]!==V||C[53]!==k?(E={boundaryElement:R,overflow:"auto",placement:$,portal:B,preventOverflow:V,radius:D,scheme:z,...k},C[47]=R,C[48]=$,C[49]=D,C[50]=z,C[51]=B,C[52]=V,C[53]=k,C[54]=E):E=C[54];let el=E;return C[55]!==ea?(_=ea||(0,w.jsx)(w.Fragment,{}),C[55]=ea,C[56]=_):_=C[56],C[57]!==es||C[58]!==H||C[59]!==el||C[60]!==_?(T=(0,w.jsx)(ng.J2,{"data-ui":"MenuButton__popover",...el,content:es,open:H,children:_}),C[57]=es,C[58]=H,C[59]=el,C[60]=_,C[61]=T):T=C[61],T});function iG(e){return!e}iY.displayName="ForwardRef(MenuButton)";let iZ=(0,nm.F4)` 69 0% { 70 background-position: 100%; 71 } 72 100% { 73 background-position: -100%; 74 } 75`,iK=(0,nm.iv)` 76 background-image: linear-gradient( 77 to right, 78 var(--card-skeleton-color-from), 79 var(--card-skeleton-color-to), 80 var(--card-skeleton-color-from), 81 var(--card-skeleton-color-from), 82 var(--card-skeleton-color-from) 83 ); 84 background-position: 100%; 85 background-size: 200% 100%; 86 background-attachment: fixed; 87 animation-name: ${iZ}; 88 animation-timing-function: ease-in-out; 89 animation-iteration-count: infinite; 90 animation-duration: 2000ms; 91`,iJ=(0,nm.iv)` 92 opacity: ${({$visible:e})=>e?1:0}; 93 transition: opacity 200ms ease-in; 94 95 @media screen and (prefers-reduced-motion: no-preference) { 96 ${({$animated:e})=>e?iK:(0,nm.iv)` 97 background-color: var(--card-skeleton-color-from); 98 `} 99 } 100 101 @media screen and (prefers-reduced-motion: reduce) { 102 background-color: var(--card-skeleton-color-from); 103 } 104`,iQ=(0,nm.zo)(ng.xu).withConfig({displayName:"StyledSkeleton",componentId:"sc-ebtpni-0"})(ng.E5,iJ),i0=(0,t7.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u;let c=(0,x.c)(16);c[0]!==e?({animated:o,delay:n,radius:r,...i}=e,c[0]=e,c[1]=n,c[2]=r,c[3]=i,c[4]=o):(n=c[1],r=c[2],i=c[3],o=c[4]);let d=void 0!==o&&o,[f,h]=(0,t7.useState)(!n);c[5]!==n?(s=()=>
104{if(!n)return;let e=setTimeout(()=>{h(!0)},n);return()=>{clearTimeout(e)}},a=[n],c[5]=n,c[6]=s,c[7]=a):(s=c[6],a=c[7]),(0,t7.useEffect)(s,a),c[8]!==r?(l=(0,ng.a5)(r),c[8]=r,c[9]=l):l=c[9];let p=!n||f;return c[10]!==d||c[11]!==t||c[12]!==i||c[13]!==l||c[14]!==p?(u=(0,w.jsx)(iQ,{...i,$animated:d,$radius:l,$visible:p,ref:t}),c[10]=d,c[11]=t,c[12]=i,c[13]=l,c[14]=p,c[15]=u):u=c[15],u});i0.displayName="ForwardRef(Skeleton)";let i1=(0,nm.zo)(i0).withConfig({displayName:"StyledSkeleton",componentId:"sc-2p7a1v-0"})(e=>{let{$size:t,$style:n}=e,{font:r,media:i}=(0,ib.aQ)(e.theme),o=r[n];return(0,ng.Lt)(i,t,e=>{let t=o.sizes[e];return{height:t.lineHeight-t.ascenderHeight-t.descenderHeight}})});(0,t7.forwardRef)(function(e,t){let n,r,i,o;let s=(0,x.c)(9);s[0]!==e?({size:r,...n}=e,s[0]=e,s[1]=n,s[2]=r):(n=s[1],r=s[2]);let a=void 0===r?2:r;s[3]!==a?(i=(0,ng.a5)(a),s[3]=a,s[4]=i):i=s[4];let l=i;return s[5]!==l||s[6]!==t||s[7]!==n?(o=(0,w.jsx)(i1,{...n,$size:l,ref:t,$style:"text"}),s[5]=l,s[6]=t,s[7]=n,s[8]=o):o=s[8],o}).displayName="ForwardRef(TextSkeleton)",(0,t7.forwardRef)(function(e,t){let n,r,i,o;let s=(0,x.c)(9);s[0]!==e?({size:r,...n}=e,s[0]=e,s[1]=n,s[2]=r):(n=s[1],r=s[2]);let a=void 0===r?2:r;s[3]!==a?(i=(0,ng.a5)(a),s[3]=a,s[4]=i):i=s[4];let l=i;return s[5]!==l||s[6]!==t||s[7]!==n?(o=(0,w.jsx)(i1,{...n,$size:l,ref:t,$style:"label"}),s[5]=l,s[6]=t,s[7]=n,s[8]=o):o=s[8],o}).displayName="ForwardRef(LabelSkeleton)",(0,t7.forwardRef)(function(e,t){let n,r,i,o;let s=(0,x.c)(9);s[0]!==e?({size:r,...n}=e,s[0]=e,s[1]=n,s[2]=r):(n=s[1],r=s[2]);let a=void 0===r?2:r;s[3]!==a?(i=(0,ng.a5)(a),s[3]=a,s[4]=i):i=s[4];let l=i;return s[5]!==l||s[6]!==t||s[7]!==n?(o=(0,w.jsx)(i1,{...n,$size:l,ref:t,$style:"heading"}),s[5]=l,s[6]=t,s[7]=n,s[8]=o):o=s[8],o}).displayName="ForwardRef(HeadingSkeleton)",(0,t7.forwardRef)(function(e,t){let n,r,i,o;let s=(0,x.c)(9);s[0]!==e?({size:r,...n}=e,s[0]=e,s[1]=n,s[2]=r):(n=s[1],r=s[2]);let a=void 0===r?2:r;s[3]!==a?(i=(0,ng.a5)(a),s[3]=a,s[4]=i):i=s[4];let l=i;return s[5]!==l||s[6]!==t||s[7]!==n?(o=(0,w.jsx)(i1,{...n,$size:l,ref:t,$style:"code"}),s[5]=l,s[6]=t,s[7]=n,s[8]=o):o=s[8],o}).displayName="ForwardRef(CodeSkeleton)",(0,t7.forwardRef)(function(e,t){let n,r,i;let o=(0,x.c)(9);o[0]!==e?({flex:n,...r}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let s=void 0===e.tabIndex?0:e.tabIndex;return o[3]!==n||o[4]!==e.children||o[5]!==t||o[6]!==r||o[7]!==s?(i=(0,w.jsx)(ng.xu,{"data-ui":"TabPanel",...r,flex:n,ref:t,role:"tabpanel",tabIndex:s,children:e.children}),o[3]=n,o[4]=e.children,o[5]=t,o[6]=r,o[7]=s,o[8]=i):i=o[8],i}).displayName="ForwardRef(TabPanel)";let i2={error:"critical",warning:"caution",success:"positive",info:"neutral"},i5={error:"critical",warning:"caution",success:"positive",info:"neutral"},i3=(0,nm.zo)(ng.kC).withConfig({displayName:"TextBox",componentId:"sc-1rr7rxo-0"})`overflow-x:auto;`,i4=(0,nm.zo)(ng.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);}`,i6=nm.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;`,i8=(0,nm.zo)(ng.Zb).withConfig({displayName:"LoadingBarMask",componentId:"sc-1rr7rxo-3"})`position:absolute;top:0;left:-${2}px;right:-${2}px;bottom:${2}px;z-index:1;`,i7=(0,nm.zo)(ng.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,ib.aQ)(e.theme);return t.button.default[e.tone].enabled.bg}};`,i9={error:"alert",warning:"alert",success:"alert",info:"alert"},oe={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}},ot={initial:{willChange:"transform"},hidden:{opacity:0}
104,visible:{opacity:1}},on=iw.E.create(i4),or=iw.E.create(ng.kC),oi=iw.E.create(ng.xv),oo=iw.E.create(i6),os=iw.E.create(i7);function oa(e){if("treeitem"===e.getAttribute("role")&&e.focus(),"none"===e.getAttribute("role")){let t=e.firstChild;t&&t instanceof HTMLElement&&t.focus()}}(0,ng.tx)("@sanity/ui/context/toast",null),(0,nm.zo)(ng.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 ol=(0,ng.tx)("@sanity/ui/context/tree",null);(0,t7.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,d,f,h,p,g,m,y,v,b,S,k,E,_;let T=(0,x.c)(38);T[0]!==e?({children:n,gap:r,space:s,onFocus:i,...o}=e,T[0]=e,T[1]=n,T[2]=r,T[3]=i,T[4]=o,T[5]=s):(n=T[1],r=T[2],i=T[3],o=T[4],s=T[5]);let C=void 0===r?void 0===s?1:s:r,A=(0,t7.useRef)(null),[R,j]=(0,t7.useState)(null),P=(0,t7.useRef)(R);T[6]===Symbol.for("react.memo_cache_sentinel")?(a=[],T[6]=a):a=T[6];let M=a;T[7]===Symbol.for("react.memo_cache_sentinel")?(l=[],T[7]=l):l=T[7];let[I,O]=(0,t7.useState)(l);T[8]===Symbol.for("react.memo_cache_sentinel")?(u={},T[8]=u):u=T[8];let[$,z]=(0,t7.useState)(u),L=(0,t7.useRef)($);T[9]===Symbol.for("react.memo_cache_sentinel")?(c=()=>A.current,T[9]=c):c=T[9],(0,t7.useImperativeHandle)(t,c),T[10]!==R?(d=()=>{P.current=R},f=[R],T[10]=R,T[11]=d,T[12]=f):(d=T[11],f=T[12]),(0,t7.useEffect)(d,f),T[13]!==$?(h=()=>{L.current=$},p=[$],T[13]=$,T[14]=h,T[15]=p):(h=T[14],p=T[15]),(0,t7.useEffect)(h,p),T[16]===Symbol.for("react.memo_cache_sentinel")?(g=(e,t,n,r)=>(z(r=>({...r,[t]:{element:e,expanded:n}})),r&&j(e),()=>{z(e=>{let n={...e};return delete n[t],n})}),T[16]=g):g=T[16];let N=g;T[17]===Symbol.for("react.memo_cache_sentinel")?(m=(e,t)=>{z(n=>{let r=n[e];return r?{...n,[e]:{...r,expanded:t}}:n})},T[17]=m):m=T[17];let D=m,V=R||I[0]||null;T[18]!==C||T[19]!==$||T[20]!==V?(y={version:0,focusedElement:V,level:0,path:M,registerItem:N,setExpanded:D,setFocusedElement:j,gap:C,space:C,state:$},T[18]=C,T[19]=$,T[20]=V,T[21]=y):y=T[21];let F=y;T[22]!==I?(v=e=>{if(P.current){if("ArrowDown"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),i=t.slice(r),o=t.length;for(let t=1;t<o;t+=1){if(!i[t])continue;let n=i[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let o=[],s=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){s=!1;break}}if(s)return i[t]}return null}(L.current,I,P.current);t&&(oa(t),j(t));return}if("ArrowUp"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),i=t.slice(0,r),o=i.length;for(let t=o-1;t>=0;t-=1){let n=i[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let o=[],s=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){s=!1;break}}if(s)return i[t]}return null}(L.current,I,P.current);t&&(oa(t),j(t));return}if("ArrowLeft"===e.key){e.preventDefault();let t=P.current.getAttribute("data-tree-key");if(!t)return;let n=L.current[t];if(!n)return;if(n.expanded)z(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&&L.current[n];r&&(r.element.focus(),j(r.element))}return}if("ArrowRight"===e.key){e.preventDefault();let t=P.current.getAttribute("data-tree-key");if(!t)return;L.current[t]?.expanded||z(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!0}}:e});return}}},T[22]=I,T[23]=v):v=T[23];let B=v;T[24]!==i?(b=e=>{j(e.target),i?.(e)},T[24]=i,T[25]=b):b=T[25];let H=b;return T[26]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{A.current&&O(Array.from(A.current.querySelectorAll('[data-ui="TreeItem"]')))},T[26]=S):S=T[26],T[27]!==n?(k=[n],T[27]=n,T[28]=k):k=T[28],(0,t7.useEffect)(S,k),T[29]!==n||T[30]!==H||T[31]!==B||T[32]!==o||T[33]!==C?(E=(0,w.jsx)(ng.Kq,{as:"ul","data-ui":"Tree",...o,onFocus:H,onKeyDown:B,ref:A,role:"tree",gap:C,children:n}),T[29]=n,T[30]=H,T[31]=B,T[32]=o,T[33]=C,T[34]=E):E=T[34],T[35]!==F||T[36]!==E?(_=(0,w.jsx)(ol.Provider,{value:F,children:E}),T[35]=F,T[36]=E,T[37]=_):_=T[37],_}).displayName="ForwardRef(Tree)",(0,nm.zo)(ng.xu).attrs({forwardedAs:"a"}).withConfig({displayName:"TreeItemBox",componentId:"sc-iiskig-1"})(function(e){let{$level:t}=e,{space:n}=(0,ib.aQ)(e.theme);return(0,nm.iv)` 105 padding-left: ${(0,ng.hO)(n[2]*t)}; 106 107 &[data-as='a'] { 108 text-decoration: none; 109 } 110 `}),(0,nm.zo)(ng.xv).withConfig({displayName:"ToggleArrowText",componentId:"sc-iiskig-2"})`& > svg{transition:transform 100ms;}`;var ou=n(89364),oc=n(34581),od=n(3363),of=n(55796);function oh(e){let[t,n]=e;return[t,n]}function op(e,t){let n=e,r=t,i=n.length,o=r.length;if(0===i||0===o)return 0;i>o?n=n.substring(i-o):i<o&&(r=r.substring(0,i));let s=Math.min(i,o);if(n===r)return s;let a=0,l=1;for(let e=0;-1!==e;){let t=n.substring(s-l);if(-1===(e=r.indexOf(t)))break;
110l+=e,(0===e||n.substring(s-l)===r.substring(0,l))&&(a=l,l++)}return a}function og(e,t){if(!e||!t||e[0]!==t[0])return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(o,i)===t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function om(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),i=r,o=0;for(;n<i;)e.substring(e.length-i,e.length-o)===t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function oy(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343}function ov(e,t,n,r,i){let o=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),u=oC(o,s,{checkLines:!1,deadline:i}),c=oC(a,l,{checkLines:!1,deadline:i});return u.concat(c)}function ob(e,t,n){let r=e.slice(n,n+Math.floor(e.length/4)),i=-1,o="",s,a,l,u;for(;-1!==(i=t.indexOf(r,i+1));){let r=og(e.slice(n),t.slice(i)),c=om(e.slice(0,n),t.slice(0,i));o.length<c+r&&(o=t.slice(i-c,i)+t.slice(i,i+r),s=e.slice(0,n-c),a=e.slice(n+r),l=t.slice(0,i-c),u=t.slice(i+r))}return 2*o.length>=e.length?[s||"",a||"",l||"",u||"",o||""]:null}var ow=Object.defineProperty,ox=Object.getOwnPropertySymbols,oS=Object.prototype.hasOwnProperty,ok=Object.prototype.propertyIsEnumerable,oE=(e,t,n)=>t in e?ow(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o_=(e,t)=>{for(var n in t||(t={}))oS.call(t,n)&&oE(e,n,t[n]);if(ox)for(var n of ox(t))ok.call(t,n)&&oE(e,n,t[n]);return e};function oT(e,t,n){var r,i;let o;if(null===e||null===t)throw Error("Null input. (diff)");let s=oC(e,t,o_({checkLines:!0,deadline:(i=(r=n||{}).timeout||1,o=1,"u">typeof i&&(o=i<=0?Number.MAX_VALUE:i),Date.now()+1e3*o)},r));return function(e){for(let t=0;t<e.length;t++){let[n,r]=e[t];if(0===r.length)continue;let i=r[0];(function(e){let t=e.charCodeAt(0);return t>=55296&&t<=56319})(r[r.length-1])&&0===n&&oj(e,t,1),oy(i)&&0===n&&oj(e,t,-1)}for(let t=0;t<e.length;t++)0===e[t][1].length&&e.splice(t,1)}(s),s}function oC(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let o=og(r,i),s=r.substring(0,o);o=om(r=r.substring(o),i=i.substring(o));let a=r.substring(r.length-o),l=function(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let i=e.length>t.length?e:t,o=e.length>t.length?t:e,s=i.indexOf(o);if(-1!==s)return r=[[1,i.substring(0,s)],[0,o],[1,i.substring(s+o.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(1===o.length)return[[-1,e],[1,t]];let a=function(e,t,n=1){let r,i,o,s,a;if(n<=0)return null;let l=e.length>t.length?e:t,u=e.length>t.length?t:e;if(l.length<4||2*u.length<l.length)return null;let c=ob(l,u,Math.ceil(l.length/4)),d=ob(l,u,Math.ceil(l.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?(i=r[0],o=r[1],s=r[2],a=r[3]):(s=r[0],a=r[1],i=r[2],o=r[3]),[i,o,s,a,r[4]]}(e,t);if(a){let e=a[0],t=a[1],r=a[2],i=a[3],o=a[4],s=oC(e,r,n),l=oC(t,i,n);return s.concat([[0,o]],l)}return n.checkLines&&e.length>100&&t.length>100?function(e,t,n){let r=e,i=t,o=function(e,t){let n=[],r={};function i(e){let t="",i=0,s=-1,a=n.length;for(;s<e.length-1;){-1===(s=e.indexOf(` 111`,i))&&(s=e.length-1);let l=e.slice(i,s+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(a===o&&(l=e.slice(i),s=e.length),t+=String.fromCharCode(a),r[l]=a,n[a++]=l),i=s+1}return t}n[0]="";let o=4e4,s=i(e);return o=65535,{chars1:s,chars2:i(t),lineArray:n}}(r,i);r=o.chars1,i=o.chars2;let s=o.lineArray,a=oC(r,i,{checkLines:!1,deadline:n.deadline});(function(e,t){for(let n=0;n<e.length;n++){let r=e[n][1],i=[];for(let e=0;e<r.length;e++)i[e]=t[r.charCodeAt(e)];e[n][1]=i.join("")}})(a,s),(a=oP(a)).push([0,""]);let l=0,u=0,c=0,d="",f="";for(;l<a.length;){switch(a[l][0]){case 1:c++,f+=a[l][1];break;case -1:u++,d+=a[l][1];break;case 0:if(u>=1&&c>=1){a.splice(l-u-c,u+c),l=l-u-c;let e=oC(d,f,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)a.splice(l,0,e[t]);l+=e.length}c=0,u=0,d="",f="";break;default:throw Error("Unknown diff operation.")}l++}return a.pop(),a}(e,t,n):function(e,t,n){let r=e.length,i=t.length,o=Math.ceil((r+i)/2),s=2*o,a=Array(s),l=Array(s);for(let e=0;e<s;e++)a[e]=-1,l[e]=-1;a[o+1]=0,l[o+1]=0;let u=r-i,c=u%2!=0,d=0,f=0,h=0,p=0;for(let g=0;g<o&&!(Date.now()>n);g++){for(let h=-g+d;h<=g-f;h+=2){let p;let m=o+h,y=(p=h===-g||h!==g&&a[m-1]<a[m+1]?a[m+1]:a[m-1]+1)-h;for(;p<r&&y<i&&e.charAt(p)===t.charAt(y);)p++,y++;if(a[m]=p,p>r)f+=2;else if(y>i)d+=2;else if(c){let i=o+u-h;if(i>=0&&i<s&&-1!==l[i]&&p>=r-l[i])return ov(e,t,p,y,n)}}for(let d=-g+h;d<=g-p;d+=2){let f;let m=o+d,y=(f=d===-g||d!==g&&l[m-1]<l[m+1]?l[m+1]:l[m-1]+1)-d;for(;f<r&&y<i&&e.charAt(r-f-1)===t.charAt(i-y-1);)f++,y++;if(l[m]=f,f>r)p+=2;else if(y>i)h+=2;else if(!c){let i=o+u-d;if(i>=0&&i<s&&-1!==a[i]){let s=a[i],l=o+s-i;if(s>=(f=r-f))return ov(e,t,s,l,n)}}}}return[[-1,e],[1,t]]}(e,t,n.deadline)}(r=r.substring(0,r.length-o),i=i.substring(0,i.length-o),n);return s&&l.unshift([0,s]),a&&l.push([0,a]),l=oN(l)}function oA(e,t,n){return 1===n?e+t:t+e}function oR(e,t){return 1===t?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function oj(e,t,n){var r,i;let o=1===n?-1:1,s=null,a=null,l=t+n;for(;l>=0&&l<e.length&&(null===s||null===a);l+=n){let[r,i]=e[l];
111if(0!==i.length){if(1===r){null===s&&(s=l);continue}if(-1===r){null===a&&(a=l);continue}if(0===r){if(null===s&&null===a){let[r,i]=oR(e[t][1],n);e[t][1]=r,e[l][1]=oA(e[l][1],i,o);return}break}}}if(null!==s&&null!==a&&(r=s,i=a,1===n?e[r][1][e[r][1].length-1]===e[i][1][e[i][1].length-1]:e[r][1][0]===e[i][1][0])){let[r,i]=oR(e[s][1],o),[l]=oR(e[a][1],o);e[s][1]=r,e[a][1]=l,e[t][1]=oA(e[t][1],i,n);return}let[u,c]=oR(e[t][1],n);e[t][1]=u,null===s?(e.splice(l,0,[1,c]),null!==a&&a>=l&&a++):e[s][1]=oA(e[s][1],c,o),null===a?e.splice(l,0,[-1,c]):e[a][1]=oA(e[a][1],c,o)}function oP(e){let t=e.map(e=>oh(e)),n=!1,r=[],i=0,o=null,s=0,a=0,l=0,u=0,c=0;for(;s<t.length;)0===t[s][0]?(r[i++]=s,a=u,l=c,u=0,c=0,o=t[s][1]):(1===t[s][0]?u+=t[s][1].length:c+=t[s][1].length,o&&o.length<=Math.max(a,l)&&o.length<=Math.max(u,c)&&(t.splice(r[i-1],0,[-1,o]),t[r[i-1]+1][0]=1,i--,s=--i>0?r[i-1]:-1,a=0,l=0,u=0,c=0,o=null,n=!0)),s++;for(n&&(t=oN(t)),t=oL(t),s=1;s<t.length;){if(-1===t[s-1][0]&&1===t[s][0]){let e=t[s-1][1],n=t[s][1],r=op(e,n),i=op(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(s,0,[0,n.substring(0,r)]),t[s-1][1]=e.substring(0,e.length-r),t[s+1][1]=n.substring(r),s++):(i>=e.length/2||i>=n.length/2)&&(t.splice(s,0,[0,e.substring(0,i)]),t[s-1][0]=1,t[s-1][1]=n.substring(0,n.length-i),t[s+1][0]=-1,t[s+1][1]=e.substring(i),s++),s++}s++}return t}let oM=/[^a-zA-Z0-9]/,oI=/\s/,oO=/[\r\n]/,o$=/\n\r?\n$/,oz=/^\r?\n\r?\n/;function oL(e){let t=e.map(e=>oh(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(oM),o=r.match(oM),s=i&&n.match(oI),a=o&&r.match(oI),l=s&&n.match(oO),u=a&&r.match(oO),c=l&&e.match(o$),d=u&&t.match(oz);return c||d?5:l||u?4:i&&!s&&a?3:s||a?2:i||o?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],i=t[r][1],o=t[r+1][1],s=om(e,i);if(s){let t=i.substring(i.length-s);e=e.substring(0,e.length-s),i=t+i.substring(0,i.length-s),o=t+o}let a=e,l=i,u=o,c=n(e,i)+n(i,o);for(;i.charAt(0)===o.charAt(0);){e+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);let t=n(e,i)+n(i,o);t>=c&&(c=t,a=e,l=i,u=o)}t[r-1][1]!==a&&(a?t[r-1][1]=a:(t.splice(r-1,1),r--),t[r][1]=l,u?t[r+1][1]=u:(t.splice(r+1,1),r--))}r++}return t}function oN(e){let t=e.map(e=>oh(e));t.push([0,""]);let n=0,r=0,i=0,o="",s="",a;for(;n<t.length;)switch(t[n][0]){case 1:i++,s+=t[n][1],n++;break;case -1:r++,o+=t[n][1],n++;break;case 0:r+i>1?(0!==r&&0!==i&&(0!==(a=og(s,o))&&(n-r-i>0&&0===t[n-r-i-1][0]?t[n-r-i-1][1]+=s.substring(0,a):(t.splice(0,0,[0,s.substring(0,a)]),n++),s=s.substring(a),o=o.substring(a)),0!==(a=om(s,o))&&(t[n][1]=s.substring(s.length-a)+t[n][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a))),n-=r+i,t.splice(n,r+i),o.length&&(t.splice(n,0,[-1,o]),n++),s.length&&(t.splice(n,0,[1,s]),n++),n++):0!==n&&0===t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",s="";break;default:throw Error("Unknown diff operation")}""===t[t.length-1][1]&&t.pop();let l=!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),l=!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),l=!0)),n++;return l&&(t=oN(t)),t}var oD=Object.defineProperty,oV=Object.getOwnPropertySymbols,oF=Object.prototype.hasOwnProperty,oB=Object.prototype.propertyIsEnumerable,oH=(e,t,n)=>t in e?oD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oU=(e,t)=>{for(var n in t||(t={}))oF.call(t,n)&&oH(e,n,t[n]);if(oV)for(var n of oV(t))oB.call(t,n)&&oH(e,n,t[n]);return e};let oW={threshold:.5,distance:1e3};function oq(e,t,n,r={}){if(null===e||null===t||null===n)throw Error("Null input. (match())");let i=Math.max(0,Math.min(n,e.length));return e===t?0:e.length?e.substring(i,i+t.length)===t?i:function(e,t,n,r={}){if(t.length>32)throw Error("Pattern too long for this browser.");let i=oU(oU({},oW),r),o=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 s(e,r){let o=e/t.length,s=Math.abs(n-r);return i.distance?o+s/i.distance:s?1:o}let a=i.threshold,l=e.indexOf(t,n);-1!==l&&(a=Math.min(s(0,l),a),-1!==(l=e.lastIndexOf(t,n+t.length))&&(a=Math.min(s(0,l),a)));let u=1<<t.length-1;l=-1;let c,d,f=t.length+e.length,h=[];for(let r=0;r<t.length;r++){for(c=0,d=f;c<d;)s(r,n+d)<=a?c=d:f=d,d=Math.floor((f-c)/2+c);f=d;let i=Math.max(1,n-d+1),p=Math.min(n+d,e.length)+t.length,g=Array(p+2);g[p+1]=(1<<r)-1;for(let t=p;t>=i;t--){let c=o[e.charAt(t-1)];if(0===r?g[t]=(g[t+1]<<1|1)&c:g[t]=(g[t+1]<<1|1)&c|((h[t+1]|h[t])<<1|1)|h[t+1],g[t]&u){let e=s(r,t-1);if(e<=a){if(a=e,(l=t-1)>n)i=Math.max(1,2*n-l);else break}}}if(s(r+1,n)>a)break;h=g}return l}(e,t,i,r):-1}function oX(e){let t=[];for(let n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function oY(e){let t=[];for(let n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function oG(e,t){let n=0,r=0,i=0,o=0,s;for(s=0;s<e.length&&(1!==e[s][0]&&(n+=e[s][1].length),-1!==e[s][0]&&(r+=e[s][1].length),!(n>t));s++)i=n,o=r;return e.length!==s&&-1===e[s][0]?o:o+(t-i)}function oZ(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+=oK(r)}
111return t}function oK(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function oJ(e,t){return{diffs:[],start1:e,start2:t,utf8Start1:e,utf8Start2:t,length1:0,length2:0,utf8Length1:0,utf8Length2:0}}var oQ=Object.defineProperty,o0=Object.getOwnPropertySymbols,o1=Object.prototype.hasOwnProperty,o2=Object.prototype.propertyIsEnumerable,o5=(e,t,n)=>t in e?oQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o3=(e,t)=>{for(var n in t||(t={}))o1.call(t,n)&&o5(e,n,t[n]);if(o0)for(var n of o0(t))o2.call(t,n)&&o5(e,n,t[n]);return e};let o4={margin:4};function o6(e={}){return o3(o3({},o4),e)}function o8(e,t,n){if(0===t.length)return[];let r=[],i=oJ(0,0),o=0,s=0,a=0,l=0,u=0,c=e,d=e;for(let e=0;e<t.length;e++){let f=t[e],[h,p]=f,g=p.length,m=oZ(p);switch(o||0===h||(i.start1=s,i.start2=a,i.utf8Start1=l,i.utf8Start2=u),h){case 1:i.diffs[o++]=f,i.length2+=g,i.utf8Length2+=m,d=d.substring(0,a)+p+d.substring(a);break;case -1:i.length1+=g,i.utf8Length1+=m,i.diffs[o++]=f,d=d.substring(0,a)+d.substring(a+g);break;case 0:g<=2*n.margin&&o&&t.length!==e+1?(i.diffs[o++]=f,i.length1+=g,i.length2+=g,i.utf8Length1+=m,i.utf8Length2+=m):g>=2*n.margin&&o&&(o7(i,c,n),r.push(i),i=oJ(-1,-1),o=0,c=d,s=a,l=u);break;default:throw Error("Unknown diff type")}1!==h&&(s+=g,l+=m),-1!==h&&(a+=g,u+=m)}return o&&(o7(i,c,n),r.push(i)),r}function o7(e,t,n){if(0===t.length)return;let r=t.substring(e.start2,e.start2+e.length1),i=0;for(;t.indexOf(r)!==t.lastIndexOf(r)&&r.length<32-n.margin-n.margin;)i+=n.margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=n.margin;let o=e.start2-i;o>=1&&oy(t[o])&&o--;let s=t.substring(o,e.start2);s&&e.diffs.unshift([0,s]);let a=s.length,l=oZ(s),u=e.start2+e.length1+i;u<t.length&&oy(t[u])&&u++;let c=t.substring(e.start2+e.length1,u);c&&e.diffs.push([0,c]);let d=c.length,f=oZ(c);e.start1-=a,e.start2-=a,e.utf8Start1-=l,e.utf8Start2-=l,e.length1+=a+d,e.length2+=a+d,e.utf8Length1+=l+f,e.utf8Length2+=l+f}let o9=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;function se(e){return parseInt(e,10)}function st(e){let t,n,r;let{utf8Length1:i,utf8Length2:o,utf8Start1:s,utf8Start2:a,diffs:l}=e;t=0===i?`${s},0`:1===i?`${s+1}`:`${s+1},${i}`,n=0===o?`${a},0`:1===o?`${a+1}`:`${a+1},${o}`;let u=[`@@ -${t} +${n} @@ 112`];for(let e=0;e<l.length;e++){switch(l[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(l[e][1])} 113`}return u.join("").replace(/%20/g," ")}var sn="object"==typeof global&&global&&global.Object===Object&&global,sr="object"==typeof self&&self&&self.Object===Object&&self,si=sn||sr||Function("return this")(),so=si.Symbol,ss=Object.prototype,sa=ss.hasOwnProperty,sl=ss.toString,su=so?so.toStringTag:void 0,sc=function(e){var t=sa.call(e,su),n=e[su];try{e[su]=void 0;var r=!0}catch(e){}var i=sl.call(e);return r&&(t?e[su]=n:delete e[su]),i},sd=Object.prototype.toString,sf=so?so.toStringTag:void 0,sh=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":sf&&sf in Object(e)?sc(e):sd.call(e)},sp=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},sg=function(e){if(!sp(e))return!1;var t=sh(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},sm=si["__core-js_shared__"],sy=(d=/[^.]+$/.exec(sm&&sm.keys&&sm.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",sv=Function.prototype.toString,sb=function(e){if(null!=e){try{return sv.call(e)}catch(e){}try{return e+""}catch(e){}}return""},sw=/^\[object .+?Constructor\]$/,sx=Object.prototype,sS=Function.prototype.toString,sk=sx.hasOwnProperty,sE=RegExp("^"+sS.call(sk).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),s_=function(e,t){var n,r=null==e?void 0:e[t];return sp(n=r)&&(!sy||!(sy in n))&&(sg(n)?sE:sw).test(sb(n))?r:void 0},sT=function(){try{var e=s_(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),sC=function(e,t,n){"__proto__"==t&&sT?sT(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},sA=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r},sR=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),s=o.length;s--;){var a=o[++r];if(!1===t(i[a],a,i))break}return e},sj=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},sP=function(e){return null!=e&&"object"==typeof e},sM=function(e){return sP(e)&&"[object Arguments]"==sh(e)},sI=Object.prototype,sO=sI.hasOwnProperty,s$=sI.propertyIsEnumerable,sz=sM(function(){return arguments}())?sM:function(e){return sP(e)&&sO.call(e,"callee")&&!s$.call(e,"callee")},sL=Array.isArray,sN="object"==typeof exports&&exports&&!exports.nodeType&&exports,sD=sN&&"object"==typeof module&&module&&!module.nodeType&&module,sV=sD&&sD.exports===sN?si.Buffer:void 0,sF=(sV?sV.isBuffer:void 0)||function(){return!1},sB=/^(?:0|[1-9]\d*)$/,sH=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&sB.test(e))&&e>-1&&e%1==0&&e<t},sU=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},sW={};
113sW["[object Float32Array]"]=sW["[object Float64Array]"]=sW["[object Int8Array]"]=sW["[object Int16Array]"]=sW["[object Int32Array]"]=sW["[object Uint8Array]"]=sW["[object Uint8ClampedArray]"]=sW["[object Uint16Array]"]=sW["[object Uint32Array]"]=!0,sW["[object Arguments]"]=sW["[object Array]"]=sW["[object ArrayBuffer]"]=sW["[object Boolean]"]=sW["[object DataView]"]=sW["[object Date]"]=sW["[object Error]"]=sW["[object Function]"]=sW["[object Map]"]=sW["[object Number]"]=sW["[object Object]"]=sW["[object RegExp]"]=sW["[object Set]"]=sW["[object String]"]=sW["[object WeakMap]"]=!1;var sq="object"==typeof exports&&exports&&!exports.nodeType&&exports,sX=sq&&"object"==typeof module&&module&&!module.nodeType&&module,sY=sX&&sX.exports===sq&&sn.process,sG=function(){try{var e=sX&&sX.require&&sX.require("util").types;if(e)return e;return sY&&sY.binding&&sY.binding("util")}catch(e){}}(),sZ=sG&&sG.isTypedArray,sK=sZ?function(e){return sZ(e)}:function(e){return sP(e)&&sU(e.length)&&!!sW[sh(e)]},sJ=Object.prototype.hasOwnProperty,sQ=function(e,t){var n=sL(e),r=!n&&sz(e),i=!n&&!r&&sF(e),o=!n&&!r&&!i&&sK(e),s=n||r||i||o,a=s?sj(e.length,String):[],l=a.length;for(var u in e)(t||sJ.call(e,u))&&!(s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||sH(u,l)))&&a.push(u);return a},s0=Object.prototype,s1=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||s0)},s2=(f=Object.keys,h=Object,function(e){return f(h(e))}),s5=Object.prototype.hasOwnProperty,s3=function(e){if(!s1(e))return s2(e);var t=[];for(var n in Object(e))s5.call(e,n)&&"constructor"!=n&&t.push(n);return t},s4=function(e){return null!=e&&sU(e.length)&&!sg(e)},s6=function(e){return s4(e)?sQ(e):s3(e)},s8=(p=function(e,t){return e&&sR(e,t,s6)},function(e,t){if(null==e)return e;if(!s4(e))return p(e,t);for(var n=e.length,r=-1,i=Object(e);(g?r--:++r<n)&&!1!==t(i[r],r,i););return e}),s7=function(e,t){return e===t||e!=e&&t!=t},s9=function(e,t){for(var n=e.length;n--;)if(s7(e[n][0],t))return n;return -1},ae=Array.prototype.splice;function at(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])}}at.prototype.clear=function(){this.__data__=[],this.size=0},at.prototype.delete=function(e){var t=this.__data__,n=s9(t,e);return!(n<0)&&(n==t.length-1?t.pop():ae.call(t,n,1),--this.size,!0)},at.prototype.get=function(e){var t=this.__data__,n=s9(t,e);return n<0?void 0:t[n][1]},at.prototype.has=function(e){return s9(this.__data__,e)>-1},at.prototype.set=function(e,t){var n=this.__data__,r=s9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var an=s_(si,"Map"),ar=s_(Object,"create"),ai=Object.prototype.hasOwnProperty,ao=Object.prototype.hasOwnProperty;function as(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])}}as.prototype.clear=function(){this.__data__=ar?ar(null):{},this.size=0},as.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},as.prototype.get=function(e){var t=this.__data__;if(ar){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ai.call(t,e)?t[e]:void 0},as.prototype.has=function(e){var t=this.__data__;return ar?void 0!==t[e]:ao.call(t,e)},as.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ar&&void 0===t?"__lodash_hash_undefined__":t,this};var aa=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},al=function(e,t){var n=e.__data__;return aa(t)?n["string"==typeof t?"string":"hash"]:n.map};function au(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 ac(e){var t=this.__data__=new at(e);this.size=t.size}function ad(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new au;++t<n;)this.add(e[t])}au.prototype.clear=function(){this.size=0,this.__data__={hash:new as,map:new(an||at),string:new as}},au.prototype.delete=function(e){var t=al(this,e).delete(e);return this.size-=t?1:0,t},au.prototype.get=function(e){return al(this,e).get(e)},au.prototype.has=function(e){return al(this,e).has(e)},au.prototype.set=function(e,t){var n=al(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ac.prototype.clear=function(){this.__data__=new at,this.size=0},ac.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ac.prototype.get=function(e){return this.__data__.get(e)},ac.prototype.has=function(e){return this.__data__.has(e)},ac.prototype.set=function(e,t){var n=this.__data__;if(n instanceof at){var r=n.__data__;if(!an||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new au(r)}return n.set(e,t),this.size=n.size,this},ad.prototype.add=ad.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ad.prototype.has=function(e){return this.__data__.has(e)};var af=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},ah=function(e,t,n,r,i,o){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=2&n?new ad:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var p=e[d],g=t[d];if(r)var m=s?r(g,p,d,t,e,o):r(p,g,d,e,t,o);if(void 0!==m){if(m)continue;f=!1;break}
113if(h){if(!af(t,function(e,t){if(!h.has(t)&&(p===e||i(p,e,n,r,o)))return h.push(t)})){f=!1;break}}else if(!(p===g||i(p,g,n,r,o))){f=!1;break}}return o.delete(e),o.delete(t),f},ap=si.Uint8Array,ag=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},am=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},ay=so?so.prototype:void 0,av=ay?ay.valueOf:void 0,ab=function(e,t,n,r,i,o,s){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||!o(new ap(e),new ap(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return s7(+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 a=ag;case"[object Set]":var l=1&r;if(a||(a=am),e.size!=t.size&&!l)break;var u=s.get(e);if(u)return u==t;r|=2,s.set(e,t);var c=ah(a(e),a(t),r,i,o,s);return s.delete(e),c;case"[object Symbol]":if(av)return av.call(e)==av.call(t)}return!1},aw=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},ax=function(e,t,n){var r=t(e);return sL(e)?r:aw(r,n(e))},aS=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o},ak=Object.prototype.propertyIsEnumerable,aE=Object.getOwnPropertySymbols,a_=aE?function(e){return null==e?[]:aS(aE(e=Object(e)),function(t){return ak.call(e,t)})}:function(){return[]},aT=function(e){return ax(e,s6,a_)},aC=Object.prototype.hasOwnProperty,aA=function(e,t,n,r,i,o){var s=1&n,a=aT(e),l=a.length;if(l!=aT(t).length&&!s)return!1;for(var u=l;u--;){var c=a[u];if(!(s?c in t:aC.call(t,c)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var h=!0;o.set(e,t),o.set(t,e);for(var p=s;++u<l;){var g=e[c=a[u]],m=t[c];if(r)var y=s?r(m,g,c,t,e,o):r(g,m,c,e,t,o);if(!(void 0===y?g===m||i(g,m,n,r,o):y)){h=!1;break}p||(p="constructor"==c)}if(h&&!p){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(h=!1)}return o.delete(e),o.delete(t),h},aR=s_(si,"DataView"),aj=s_(si,"Promise"),aP=s_(si,"Set"),aM=s_(si,"WeakMap"),aI="[object Map]",aO="[object Promise]",a$="[object Set]",az="[object WeakMap]",aL="[object DataView]",aN=sb(aR),aD=sb(an),aV=sb(aj),aF=sb(aP),aB=sb(aM),aH=sh;(aR&&aH(new aR(new ArrayBuffer(1)))!=aL||an&&aH(new an)!=aI||aj&&aH(aj.resolve())!=aO||aP&&aH(new aP)!=a$||aM&&aH(new aM)!=az)&&(aH=function(e){var t=sh(e),n="[object Object]"==t?e.constructor:void 0,r=n?sb(n):"";if(r)switch(r){case aN:return aL;case aD:return aI;case aV:return aO;case aF:return a$;case aB:return az}return t});var aU=aH,aW="[object Arguments]",aq="[object Array]",aX="[object Object]",aY=Object.prototype.hasOwnProperty,aG=function(e,t,n,r,i,o){var s=sL(e),a=sL(t),l=s?aq:aU(e),u=a?aq:aU(t);l=l==aW?aX:l,u=u==aW?aX:u;var c=l==aX,d=u==aX,f=l==u;if(f&&sF(e)){if(!sF(t))return!1;s=!0,c=!1}if(f&&!c)return o||(o=new ac),s||sK(e)?ah(e,t,n,r,i,o):ab(e,t,l,n,r,i,o);if(!(1&n)){var h=c&&aY.call(e,"__wrapped__"),p=d&&aY.call(t,"__wrapped__");
113if(h||p){var g=h?e.value():e,m=p?t.value():t;return o||(o=new ac),i(g,m,n,r,o)}}return!!f&&(o||(o=new ac),aA(e,t,n,r,i,o))},aZ=function e(t,n,r,i,o){return t===n||(null!=t&&null!=n&&(sP(t)||sP(n))?aG(t,n,r,i,e,o):t!=t&&n!=n)},aK=function(e,t,n,r){var i=n.length,o=i,s=!r;if(null==e)return!o;for(e=Object(e);i--;){var a=n[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var l=(a=n[i])[0],u=e[l],c=a[1];if(s&&a[2]){if(void 0===u&&!(l in e))return!1}else{var d=new ac;if(r)var f=r(u,c,l,e,t,d);if(!(void 0===f?aZ(c,u,3,r,d):f))return!1}}return!0},aJ=function(e){return e==e&&!sp(e)},aQ=function(e){for(var t=s6(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,aJ(i)]}return t},a0=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},a1=function(e){var t=aQ(e);return 1==t.length&&t[0][2]?a0(t[0][0],t[0][1]):function(n){return n===e||aK(n,e,t)}},a2=function(e){return"symbol"==typeof e||sP(e)&&"[object Symbol]"==sh(e)},a5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a3=/^\w*$/,a4=function(e,t){if(sL(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||a2(e))||a3.test(e)||!a5.test(e)||null!=t&&e in Object(t)};function a6(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(a6.Cache||au),n}a6.Cache=au;var a8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a7=/\\(\\)?/g,a9=(y=(m=a6(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a8,function(e,n,r,i){t.push(r?i.replace(a7,"$1"):n||e)}),t},function(e){return 500===y.size&&y.clear(),e})).cache,m),le=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},lt=1/0,ln=so?so.prototype:void 0,lr=ln?ln.toString:void 0,li=function e(t){if("string"==typeof t)return t;if(sL(t))return le(t,e)+"";if(a2(t))return lr?lr.call(t):"";var n=t+"";return"0"==n&&1/t==-lt?"-0":n},lo=function(e,t){return sL(e)?e:a4(e,t)?[e]:a9(null==e?"":li(e))},ls=1/0,la=function(e){if("string"==typeof e||a2(e))return e;var t=e+"";return"0"==t&&1/e==-ls?"-0":t},ll=function(e,t){t=lo(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[la(t[n++])];return n&&n==r?e:void 0},lu=function(e,t,n){var r=null==e?void 0:ll(e,t);return void 0===r?n:r},lc=function(e,t){return null!=e&&t in Object(e)},ld=function(e,t,n){t=lo(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var s=la(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&sU(i)&&sH(s,i)&&(sL(e)||sz(e))},lf=function(e){return e},lh=function(e){var t;return a4(e)?(t=la(e),function(e){return null==e?void 0:e[t]}):function(t){return ll(t,e)}},lp=function(e){if("function"==typeof e)return e;if(null==e)return lf;if("object"==typeof e){var t,n;return sL(e)?(t=e[0],n=e[1],a4(t)&&aJ(n)?a0(la(t),n):function(e){var r=lu(e,t);return void 0===r&&r===n?null!=e&&ld(e,t,lc):aZ(n,r,3)}):a1(e)}return lh(e)},lg=Object.prototype.hasOwnProperty,lm=(v=function(e,t,n){lg.call(e,n)?e[n].push(t):sC(e,n,[t])},function(e,t){return(sL(e)?sA:function(e,t,n,r){return s8(e,function(e,i,o){t(r,e,n(e),o)}),r})(e,v,lp(t,2),{})});let ly=["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 lv{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=ly[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 lb(e,t,n=0){let r=n,i=0;for(i=n;r<t;i++){var o;let t=(o=e.codePointAt(i))>>
11316?4:o>>11?3:o>>7?2:1;4===t&&i++,r+=t}return i}class lw{wrap(e){return e}finalize(e){return Array.isArray(e)?e:e.data}markChanged(e){return e}objectGetKeys(e){return Object.keys(e)}objectGetField(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 i=lb(t,n),o=lb(t,r,i);e.data+=t.slice(i,o)}stringAppendValue(e,t){e.data+=t}}var lx=n(80640),lS=n(55713),lk=n(74621),lE=n(65566),l_=1,lT={};function lC(e){return e in lT&&(delete lT[e],!0)}var lA=function(e){var t=l_++;return lT[t]=!0,b||(b=Promise.resolve()),b.then(function(){return lC(t)&&e()}),t},lR=function(e){lC(e)},lj={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=lj.delegate;return((null==n?void 0:n.setImmediate)||lA).apply(void 0,(0,ty.ev)([],(0,ty.CR)(e)))},clearImmediate:function(e){var t=lj.delegate;return((null==t?void 0:t.clearImmediate)||lR)(e)},delegate:void 0},lP=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return(0,ty.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=lj.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 i,o=t.actions;null!=n&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==n&&(lj.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(lE.o),lM=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,ty.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(3777).v))(lP);function lI(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 lO=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function l$(e){return"string"==typeof e?._key}function lz(e){return"object"==typeof e&&"_key"in e&&"string"==typeof e._key}function lL(e){return"number"==typeof e||lz(e)}function lN(e,t){if(0===e.length)return t;let n=t;for(let t of e){if(lL(t)){if(!Array.isArray(n))return;if(lz(t)){n=n.find(e=>e._key===t._key);continue}n=n[t];continue}n=n[t]}return n}let lD=/^[a-z_$]+/;function lV(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:lz(e)?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&lD.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function lF(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function lB(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(lz(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 lH(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function lU(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "insert()" on non-array value');let n=lB(t,e.referenceItem);if(null===n)throw Error(`Found no matching array element to insert ${e.position}`);return 0===t.length?e.items:lH(t,"before"===e.position?n:n+1,0,e.items)}let lW=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);var lq=Object.freeze({__proto__:null,assign:function(e,t){if(!lF(t))throw TypeError('Cannot apply "assign()" on non-object value');return!function(e){for(let t in e)if(lW(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 i=function(e,t,n={}){let r=0,i=0;function o(e){for(;r<e;){let e=t.codePointAt(i);if(typeof e>"u")return i;r+=oK(e),e>65535?i+=2:i+=1}if(!n.allowExceedingIndices&&r!==e)throw Error("Failed to determine byte offset");return i}let s=[];for(let t of e)s.push({diffs:t.diffs.map(e=>oh(e)),start1:o(t.start1),start2:o(t.start2),utf8Start1:t.utf8Start1,utf8Start2:t.utf8Start2,length1:t.length1,length2:t.length2,utf8Length1:t.utf8Length1,utf8Length2:t.utf8Length2});return s}(e,r,{allowExceedingIndices:n.allowExceedingIndices}),o=n.margin||4,s=n.deleteThreshold||.4,a=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],i=r.diffs;if(0===i.length||0!==i[0][0])i.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>i[0][1].length){let e=i[0][1].length,o=t-e;i[0][1]=n.substring(e)+i[0][1],r.start1-=o,r.start2-=o,r.utf8Start1-=o,r.utf8Start2-=o,r.length1+=o,r.length2+=o,r.utf8Length1+=o,r.utf8Length2+=o}if(0===(i=(r=e[e.length-1]).diffs).length||0!==i[i.length-1][0])i.push([0,n]),r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[i.length-1][1].length){let e=t-i[i.length-1][1].length;i[i.length-1][1]+=n.substring(0,e),r.length1+=e,r.length2+=e,r.utf8Length1+=e,r.utf8Length2+=e}return n}(i,o);r=a+r+a,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 i=r.start1,o=r.start2,s="";for(;0!==r.diffs.length;){let a=oJ(i-s.length,o-s.length),l=!0;if(""!==s){let e=oZ(s);a.length1=s.length,a.utf8Length1=e,a.length2=s.length,a.utf8Length2=e,a.diffs.push([0,s])}for(;0!==r.diffs.length&&a.length1<32-t;){let e=r.diffs[0][0],n=r.diffs[0][1],s=oZ(n);if(1===e){a.length2+=n.length,a.utf8Length2+=s,o+=n.length;let e=r.diffs.shift();e&&a.diffs.push(e),l=!1}else -1===e&&1===a.diffs.length&&0===a.diffs[0][0]&&n.length>64?(a.length1+=n.length,a.utf8Length1+=s,i+=n.length,l=!1,a.diffs.push([e,n]),r.diffs.shift()):(s=oZ(n=n.substring(0,32-a.length1-t)),a.length1+=n.length,a.utf8Length1+=s,i+=n.length,0===e?(a.length2+=n.length,a.utf8Length2+=s,o+=n.length):l=!1,a.diffs.push([e,n]),n===r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(n.length))}s=(s=oY(a.diffs)).substring(s.length-t);let u=oX(r.diffs).substring(0,t),c=oZ(u);""!==u&&(a.length1+=u.length,a.length2+=u.length,a.utf8Length1+=c,a.utf8Length2+=c,0!==a.diffs.length&&0===a.diffs[a.diffs.length-1][0]?a.diffs[a.diffs.length-1][1]+=u:a.diffs.push([0,u])),l||e.splice(++n,0,a)}}}(i,o);let l=0,u=[];for(let e=0;e<i.length;e++){let t=i[e].start2+l,n=oX(i[e].diffs),o,a=-1;if(n.length>32?-1!==(o=oq(r,n.substring(0,32),t))&&(-1===(a=oq(r,n.substring(n.length-32),t+n.length-32))||o>=a)&&(o=-1):o=oq(r,n,t),-1===o)u[e]=!1,l-=i[e].length2-i[e].length1;else{let c;if(u[e]=!0,l=o-t,c=-1===a?r.substring(o,o+n.length):r.substring(o,a+32),n===c)r=r.substring(0,o)+oY(i[e].diffs)+r.substring(o+n.length);else{let t=oT(n,c,{checkLines:!1});if(n.length>32&&function(e){let t=0,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i][0],s=e[i][1];switch(o){case 1:n+=s.length;break;case -1:r+=s.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>s)u[e]=!1;else{t=oL(t);let n=0,s=0;for(let a=0;a<i[e].diffs.length;a++){let l=i[e].diffs[a];0!==l[0]&&(s=oG(t,n)),1===l[0]?r=r.substring(0,o+s)+l[1]+r.substring(o+s):-1===l[0]&&(r=r.substring(0,o+s)+r.
113substring(o+oG(t,n+l[1].length))),-1!==l[0]&&(n+=l[1].length)}}}}}return[r=r.substring(a.length,r.length-a.length),u]}(function(e){if(!e)return[];let t=[],n=e.split(` 114`),r=0;for(;r<n.length;){let e=n[r].match(o9);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=oJ(se(e[1]),se(e[3]));for(t.push(i),""===e[2]?(i.start1--,i.utf8Start1--,i.length1=1,i.utf8Length1=1):"0"===e[2]?(i.length1=0,i.utf8Length1=0):(i.start1--,i.utf8Start1--,i.utf8Length1=se(e[2]),i.length1=i.utf8Length1),""===e[4]?(i.start2--,i.utf8Start2--,i.length2=1,i.utf8Length2=1):"0"===e[4]?(i.length2=0,i.utf8Length2=0):(i.start2--,i.utf8Start2--,i.utf8Length2=se(e[4]),i.length2=i.utf8Length2),r++;r<n.length;){let e;let t=n[r],o=t.charAt(0);if("@"===o)break;if(""===o){r++;continue}try{e=decodeURI(t.slice(1))}catch(e){throw Error(`Illegal escape in parse: ${t}`)}let s=oZ(e)-e.length;if("-"===o)i.diffs.push([-1,e]),i.length1-=s;else if("+"===o)i.diffs.push([1,e]),i.length2-=s;else if(" "===o)i.diffs.push([0,e]),i.length1-=s,i.length2-=s;else throw Error(`Invalid patch mode "${o}" 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:lU,remove:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "remove()" on non-array value');let n=lB(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return lH(t,n,1,[])},replace:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "replace()" on non-array value');let n=lB(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return lH(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(!lF(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');
114if(0===e.items.length)return t;let n=[],r=[];if(e.items.forEach((e,i)=>{let o=t.findIndex(t=>t?._key===e._key);o>=0?n[o]=i:r.push(e)}),0===n.length&&0==r.length)return t;let i=[...t];for(let t of n)i[t]=e.items[n[t]];return lU({type:"insert",items:r,referenceItem:e.referenceItem,position:e.position},i)}});function lX(e,t){return e.reduce((e,t)=>lY(t,e),t)}function lY(e,t){return function e(t,n,r){if(!(t.length>0))return function(e,t){if(!(e.type in lq))throw Error(`Invalid operation type: "${e.type}"`);return lq[e.type](e,t)}(n,r);let[i,...o]=t;if(lL(i)&&Array.isArray(r))return function(t,n,r,i){let o=lB(i,t);if(null===o||-1===o)return i;let s=i[o],a=e(n,r,s);return a===s?i:lH(i,o,1,[a])}(i,o,n,r);if("string"==typeof i&&lF(r))return function(t,n,r,i){let o=i[t];if(void 0===o&&n.length>0)return i;let s=e(n,r,o);return s===o?i:{...i,[t]:s}}(i,o,n,r);throw Error(`Cannot apply operation of type "${n.type}" to path ${lV(t)} on ${typeof r} value`)}(e.path,e.op,t)}function lG(e){return"_id"in e}function lZ(e,t){return t.reduce((e,t)=>{let n=lK(e,t);if("error"===n.status)throw Error(n.message);return"noop"===n.status?e:n.after},e)}function lK(e,t){if("create"===t.type)return function(e,t){var n;if(e)return{status:"error",message:"Document already exist"};let r=lG(n=t.document)?n:{...n,_id:lO()};return{status:"created",id:r._id,after:r}}(e,t);if("createIfNotExists"===t.type)return lG(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 lG(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 lX(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 lJ(e,t,n){let r=[];for(let n of e.slice().reverse()){if(t(n))return r;r.push(n)}return r.reverse()}function lQ(e,t){return lV(e)===lV(t)}function l0(e,t){let n=e;return t.reduce((e,t)=>{let r=n;if(n=lY(t,n),"set"===t.op.type&&"string"==typeof t.op.value){let n=lN(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=oT(e,t,{checkLines:!0});return n.length>2&&(n=function(e,t=4){let n=e.map(e=>oh(e)),r=!1,i=[],o=0,s=null,a=0,l=!1,u=!1,c=!1,d=!1;for(;a<n.length;)0===n[a][0]?(n[a][1].length<t&&(c||d)?(i[o++]=a,l=c,u=d,s=n[a][1]):(o=0,s=null),c=!1,d=!1):(-1===n[a][0]?d=!0:c=!0,s&&(l&&u&&c&&d||s.length<t/2&&3===function(...e){return e.reduce((e,t)=>e+(t?1:0),0)}(l,u,c,d))&&(n.splice(i[o-1],0,[-1,s]),n[i[o-1]+1][0]=1,o--,s=null,l&&u?(c=!0,d=!0,o=0):(a=--o>0?i[o-1]:-1,c=!1,d=!1),r=!0)),a++;return r&&(n=oN(n)),n}(n=oP(n))),o8(e,n,o6(void 0))}if(e&&Array.isArray(e)&&typeof t>"u")return o8(oX(e),e,o6(void 0));if("string"==typeof e&&t&&Array.isArray(t))return o8(e,t,o6(void 0));throw Error("Unknown call format to make()")})(n,t.op.value).map(st).join("")}};return e.flatMap(e=>lQ(e.path,t.path)&&"diffMatchPatch"===e.op.type?[]:e).concat(r)}}return e.push(t),e},[])}function l1(e,t,n,r){let i=t,o=r.map(t=>{let n=t.mutations.flatMap(t=>{if(lI(t)!==e)return[];let n=i;return i=lZ(i,[t]),n&&"patch"===t.type?{type:"dmpified",mutation:{...t,dmpPatches:l0(n,t.patches),original:t.patches}}:t});return{...t,mutations:n}}),s=n;return o.map(t=>{let n=[];return t.mutations.forEach(t=>{if("dmpified"===t.type)try{s=lX(t.mutation.dmpPatches,s),n.push(t)}catch{console.warn("Failed to apply dmp patch, falling back to original");try{s=lX(t.mutation.original,s),n.push(t)}catch(t){throw Error(`Failed to apply patch for document "${e}": ${t.message}`)}}else s=lZ(s,[t])})}),[r.map(t=>({...t,mutations:t.mutations.map(t=>"patch"!==t.type||lI(t)!==e?t:{...t,patches:t.patches.map(e=>"set"!==e.op.type?e:{...e,op:{...e.op,value:lN(e.path,s)}})})})),s]}function l2(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:[lV(t)]};if("insert"===n.type)return{insert:{[n.position]:lV([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[lV(t)]:n.value}};if("inc"===n.type)return{inc:{[lV(t)]:n.amount}};if("dec"===n.type)return{dec:{[lV(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[lV(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${lV(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>
114lV([...t,{_key:e._key}])),insert:{[n.position]:lV([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[lV(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>lV(t.concat(e)))};if("replace"===n.type)return{insert:{replace:lV(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[lV(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}(e)}function l5(e){let t=e.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation","reconnect"],includeResult:!1,includePreviousRevision:!1,visibility:"transaction",effectFormat:"mendoza",includeMutations:!1}).pipe((0,lx.B)({resetOnRefCountZero:!0})),n=t.pipe((0,tP.h)(e=>"reconnect"===e.type)),r=t.pipe((0,tP.h)(e=>"welcome"===e.type)),i=t.pipe((0,tP.h)(e=>"mutation"===e.type)),o=(0,of.T)(r,n).pipe((0,lS.d)({bufferSize:1,refCount:!0})).pipe((0,tP.h)(e=>"welcome"===e.type));return(0,of.T)(o,i,n)}let l3=tg({types:{},actions:{"assign error to context":e5({error:({event:e})=>e}),"clear error from context":e5({error:void 0}),"connect to server-sent events":eq({type:"connect"}),"listen to server-sent events":ei("server-sent events",{id:"listener",input:({context:e})=>({listener:e.sharedListener||l5(e.client),id:e.id})}),"stop listening to server-sent events":ea("listener"),"buffer remote mutation events":e5({mutationEvents:({event:e,context:t})=>(tp(e,"mutation"),[...t.mutationEvents,e])}),"restore stashed changes":e5({stagedChanges:({event:e,context:t})=>(tp(e,"xstate.done.actor.submitTransactions"),t.stashedChanges),stashedChanges:[]}),"rebase fetched remote snapshot":tc(({enqueue:e})=>{e.assign(({event:e,context:t})=>{tp(e,"xstate.done.actor.getDocument");let n=t.remote,r=e.output,i=!1;for(let e of t.mutationEvents)e.effects?.apply&&(e.previousRev||"appear"===e.transition)&&(i||e.previousRev!==r?._rev||(i=!0),i&&(r=l4(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[o,s]=l1(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:s,stagedChanges:o,mutationEvents:[]}}),e.sendParent(({context:e})=>({type:"rebased.remote",id:e.id,document:e.remote}))}),"apply mendoza patch":e5(({event:e,context:t})=>{tp(e,"mutation");let n=t.remote;if(e.transactionId===n?._rev)return{};let r=l4(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[i,o]=l1(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:o,stagedChanges:i}}),"increment fetch attempts":e5({fetchRemoteSnapshotAttempts:({context:e})=>e.fetchRemoteSnapshotAttempts+1}),"reset fetch attempts":e5({fetchRemoteSnapshotAttempts:0}),"increment submit attempts":e5({submitTransactionsAttempts:({context:e})=>e.submitTransactionsAttempts+1}),"reset submit attempts":e5({submitTransactionsAttempts:0}),"stage mutation":e5({stagedChanges:({event:e,context:t})=>(tp(e,"mutate"),[...t.stagedChanges,{transaction:!1,mutations:e.mutations}])}),"stash mutation":e5({stashedChanges:({event:e,context:t})=>(tp(e,"mutate"),[...t.stashedChanges,{transaction:!1,mutations:e.mutations}])}),"rebase local snapshot":tc(({enqueue:e})=>{e.assign({local:({event:e,context:t})=>{tp(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=lI(r);if(!e)throw Error("Unable to get document id from mutation");let i=n[e]?.after||t.get(e),o=lK(i,r);if("error"===o.status)throw Error(o.message);"noop"!==o.status&&("updated"===o.status||"created"===o.status||"deleted"===o.status)&&(e in n||(n[e]={before:i,after:void 0,muts:[]}),n[e].after=o.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":tl(({context:e})=>({type:"pristine",id:e.id})),"send sync event to parent":tl(({context:e})=>({type:"sync",id:e.id,document:e.remote})),"send mutation event to parent":tl(({context:e,event:t})=>(tp(t,"mutation"),{type:"mutation",id:e.id,previousRev:t.previousRev,resultRev:t.resultRev,effects:t.effects}))},actors:{"server-sent events":eZ(({input:e})=>{let{listener:t,id:n}=e;return(0,tm.P)(()=>t).pipe((0,tP.h)(e=>"welcome"===e.type||"reconnect"===e.type||"mutation"===e.type&&e.documentId===n),(0,lk.Q)(lM))}),"fetch remote snapshot":e0(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":e0(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(l2)},{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=[];
114return 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(lm(e.mutations,lI)).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):lJ(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),l$(e)&&l$(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)&&lQ(e.path,t.path)})||e.unshift(t),e),[]).reduce((e,t)=>("setIfMissing"!==t.op.type?e.push(t):lJ(e,e=>"unset"===e.op.type).find(e=>"setIfMissing"===e.op.type&&lQ(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:l0(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 l4(e,t,n){var r;let i=(r=function(e){if(!e)return null;let{_rev:t,...n}=e;return n}(e),new lv(new lw,r,t).process());return i?Object.assign(i,{_rev:n}):null}let l6=e=>{let t=e0(async({input:t,signal:n})=>{let{id:r}=t,{snapshot:i}=await e.fetch("visual-editing/fetch-snapshot",{documentId:r},{signal:n});return i}),n=e0(async({input:t})=>{let{transactions:n}=t;for(let t of n){let n=nC.encodeTransaction(t);return e.post("visual-editing/mutate",n)}});return l3.provide({actions:{"send sync event to parent":tc(({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}})},l8=tg({types:{},actions:{"emit sync event":tn(({event:e})=>(tp(e,"sync"),e)),"emit mutation event":tn(({event:e})=>(tp(e,"mutation"),e)),"emit rebased event":tn(({event:e})=>(tp(e,["rebased.local","rebased.remote"]),e)),"emit pristine event":tn(({event:e})=>(tp(e,["pristine"]),e)),"add document actor":e5({documents:({context:e,event:t,spawn:n})=>{tp(t,"observe");let r=t.documentId;return e.documents[r]?e.documents:{...e.documents,[r]:n("documentMutatorMachine",{input
114:{id:r,client:e.client,sharedListener:e.sharedListener||l5(e.client)},id:r})}}}),"stop remote snapshot":ea(({context:e,event:t})=>(tp(t,"unobserve"),e.documents[t.documentId])),"remove remote snapshot from context":e5({documents:({context:e,event:t})=>{if(tp(t,"unobserve"),!e.documents[t.documentId])return e.documents;let{[t.documentId]:n,...r}=e.documents;return r}})},actors:{documentMutatorMachine:l3}}).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:{}}}),l7=e=>l8.provide({actors:{documentMutatorMachine:l6(e)}}),l9=e=>{let t,n,r,i;let o=(0,x.c)(8),{comlink:s,history:a}=e;return o[0]!==s||o[1]!==a?(t=()=>s?.on("presentation/navigate",e=>{a?.update(e)}),n=[s,a],o[0]=s,o[1]=a,o[2]=t,o[3]=n):(t=o[2],n=o[3]),(0,t7.useEffect)(t,n),o[4]!==s||o[5]!==a?(r=()=>{if(a)return a.subscribe(e=>{e.title=e.title||document.title,s?.post("visual-editing/navigate",e)})},i=[s,a],o[4]=s,o[5]=a,o[6]=r,o[7]=i):(r=o[6],i=o[7]),(0,t7.useEffect)(r,i),null},ue=e=>{let t,n;let r=(0,x.c)(3),{comlink:i}=e;return r[0]!==i?(t=()=>{let e=()=>{i.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=[i],r[0]=i,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,t7.useEffect)(t,n),null};function ut(e){let t=new CustomEvent("sanity/dragEnd",{detail:e,cancelable:!0});window.dispatchEvent(t)}let un=(0,t7.createContext)(null);function ur(){let e=(0,t7.useContext)(un);if(!e)throw Error("Schema context is missing");return e}function ui(e,t,n,r){if(!e.type)throw Error("Node type is missing");return()=>t.patch(()=>(function(e,t,n){let{path:r,key:i}=nQ(e);return[nP(r,nA([{_type:t,_key:nJ()}],n,{_key:i}))]})(e,n,r))}function uo(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Duplicate",icon:rY.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:i}=nQ(e);return[nP(r,nA({...nF(t,e.path),_key:nJ()},n,{_key:i}))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Duplicated"}]:[]}function us(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Remove",icon:rY.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}=nQ(e),i=nF(t,n).findIndex(e=>e._key===r);return[nP(n,nR(i,i+1))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Removed"}]:[]}async function ua(e,t=!0){let{node:n,doc:r}=e;if(!r)return[];let i=[],o=[],[s,a,l,u]=await Promise.all([n0(n,r,"previous"),n0(n,r,"next"),n0(n,r,"first"),n0(n,r,"last")]);return l.length&&o.push({type:"action",label:"To top",icon:rY.EI4,action:()=>r.patch(l),telemetryEvent:"Visual Editing Context Menu Item Moved"}),s.length&&o.push({type:"action",label:"Up",icon:rY.Hf3,action:()=>r.patch(s),telemetryEvent:"Visual Editing Context Menu Item Moved"}),a.length&&o.push({type:"action",label:"Down",icon:rY.veu,action:()=>r.patch(a),telemetryEvent:"Visual Editing Context Menu Item Moved"}),u.length&&o.push({type:"action",label:"To bottom",icon:rY.xEY,action:()=>r.patch(u),telemetryEvent:"Visual Editing Context Menu Item Moved"}),o.length&&(i.push({type:"group",label:"Move",icon:rY.fzI,items:o}),t&&i.push({type:"divider"})),i}async function ul(e){let{node:t,field:n,doc:r}=e,i=[];return i.push(...uo(e)),i.push(...us(e)),i.push(...await ua(e)),i.push({type:"action",label:"Insert before",icon:rY.ySV,action:ui(t,r,n.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i.push({type:"action",label:"Insert after",icon:rY.oty,action:ui(t,r,n.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i}let uu=e=>{let t,n,r,i,o;let s=(0,x.c)(12),{label:a,parent:l,width:u,onSelect:c,boundaryElement:d}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=["left-start","right","left","right-end","left-end","bottom","top"],s[0]=t):t=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(n=[4,4,4,4],s[1]=n):n=s[1],s[2]!==d||s[3]!==u?(r={arrow:!1,constrainSize:!0,floatingBoundary:d,padding:0,placement:"right-start",fallbackPlacements:t,preventOverflow:!0,width:u,__unstable_margins:n},s[2]=d,s[3]=u,s[4]=r):r=s[4],s[5]!==c||s[6]!==l?(i=(0,w.jsx)(ig,{node:l,onSelect:c}
114),s[5]=c,s[6]=l,s[7]=i):i=s[7],s[8]!==a||s[9]!==r||s[10]!==i?(o=(0,w.jsx)(ng.kS,{fontSize:1,icon:rY.oty,padding:2,popover:r,space:2,text:a,children:i}),s[8]=a,s[9]=r,s[10]=i,s[11]=o):o=s[11],o};async function uc(e){let{doc:t,node:n,parent:r}=e,i=[];if(i.push(...uo(e)),i.push(...us(e)),i.push(...await ua(e)),r.options?.insertMenu){let e=(r.options.insertMenu||{}).views?.some(e=>"grid"===e.name)?0:void 0;i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,w.jsx)(uu,{label:"Insert before",onSelect:e=>{ui(n,t,e.name,"before")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})}),i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,w.jsx)(uu,{label:"Insert after",onSelect:e=>{ui(n,t,e.name,"after")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})})}else i.push({type:"group",label:"Insert before",icon:rY.ySV,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",icon:it(e),label:"block"===e.name?"Paragraph":e.title||e.name,action:ui(n,t,e.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))}),i.push({type:"group",label:"Insert after",icon:rY.oty,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",label:"block"===e.name?"Paragraph":e.title||e.name,icon:it(e),action:ui(n,t,e.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))});return i}let ud=[-4,4,-4,4];function uf(e){let t;let n=(0,x.c)(27),{node:r,onDismiss:i,boundaryElement:o}=e,s=ih();n[0]!==r||n[1]!==i||n[2]!==s?(t=()=>{"action"===r.type&&(r.action?.(),i?.(),r.telemetryEvent&&s(r.telemetryEvent,null))},n[0]=r,n[1]=i,n[2]=s,n[3]=t):t=n[3];let a=t;if("divider"===r.type){let e;return n[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,w.jsx)(ng.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]!==a||n[9]!==t?(e=(0,w.jsx)(ng.sN,{fontSize:1,hotkeys:r.hotkeys,icon:r.icon,padding:2,space:2,text:r.label,disabled:t,onClick:a}),n[5]=r.hotkeys,n[6]=r.icon,n[7]=r.label,n[8]=a,n[9]=t,n[10]=e):e=n[10],e}if("group"===r.type){let e,t,s;let a=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:ud},n[11]=e):e=n[11];let l=r.label;if(n[12]!==o||n[13]!==r.items||n[14]!==i){let e;n[16]!==o||n[17]!==i?(e=(e,t)=>(0,w.jsx)(uf,{node:e,onDismiss:i,boundaryElement:o},t),n[16]=o,n[17]=i,n[18]=e):e=n[18],t=r.items.map(e),n[12]=o,n[13]=r.items,n[14]=i,n[15]=t}else t=n[15];return n[19]!==r.icon||n[20]!==r.label||n[21]!==t?(s=(0,w.jsx)(ng.kS,{fontSize:1,icon:a,padding:2,popover:e,space:2,text:l,children:t}),n[19]=r.icon,n[20]=r.label,n[21]=t,n[22]=s):s=n[22],s}if("custom"===r.type){let e;let{component:t}=r;return n[23]!==t||n[24]!==o||n[25]!==s?(e=(0,w.jsx)(t,{boundaryElement:o,sendTelemetry:s}),n[23]=t,n[24]=o,n[25]=s,n[26]=e):e=n[26],e}return null}let uh=e=>{let t,n,r,i,o,s,a,l,u,c,d,f,h,p,g;let m=(0,x.c)(43),{node:y,onDismiss:v,position:b}=e,{x:S,y:k}=b,[E,_]=(0,t7.useState)(null),{getField:T}=ur(),{getDocument:C}=nZ();m[0]!==T||m[1]!==y?(t=T(y),m[0]=T,m[1]=y,m[2]=t):t=m[2];let{field:A,parent:R}=t,j=A?.title||A?.name||"Unknown type",[P,M]=(0,t7.useState)(void 0);m[3]!==A||m[4]!==C||m[5]!==y||m[6]!==R?(n=()=>{(async()=>{let e=C(y.id);e&&M(await function(e){let{node:t,field:n,parent:r,doc:i}=e;return n?.type==="arrayItem"?ul({node:t,field:n,doc:i}):r?.type==="union"?uc({node:t,parent:r,doc:i}):Promise.resolve([])}({node:y,field:A,parent:R,doc:e}))})()},r=[A,y,R,C],m[3]=A,m[4]=C,m[5]=y,m[6]=R,m[7]=n,m[8]=r):(n=m[7],r=m[8]),(0,t7.useEffect)(n,r),m[9]!==S||m[10]!==k?(i={getBoundingClientRect:()=>({bottom:k,left:S,right:S,top:k,width:0,height:0})},m[9]=S,m[10]=k,m[11]=i):i=m[11];let I=i;m[12]!==A?(o=it(A),m[12]=A,m[13]=o):o=m[13];let O=o;m[14]===Symbol.for("react.memo_cache_sentinel")?(s={minWidth:120,maxWidth:160},m[14]=s):s=m[14],m[15]!==O||m[16]!==P?(a=(0,w.jsx)(ng.xu,{flex:"none",children:P?(0,w.jsx)(ng.xv,{size:1,children:O}):(0,w.jsx)(ng.$j,{size:1})}),m[15]=O,m[16]=P,m[17]=a):a=m[17];let $=P?j:"Loading...";m[18]!==$?(l=(0,w.jsx)(ng.Kq,{flex:1,space:2,children:(0,w.jsx)(ng.xv,{size:1,weight:"semibold",children:$})}),m[18]=$,m[19]=l):l=m[19],m[20]!==a||m[21]!==l?(u=(0,w.jsxs)(ng.kC,{gap:2,padding:2,children:[a,l]}),m[20]=a,m[21]=l,m[22]=u):u=m[22],m[23]!==E||m[24]!==P||m[25]!==v?(c=P&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(ng.R,{}),P.map((e,t)=>(0,w.jsx)(uf,{node:e,onDismiss:v,boundaryElement:E},t))]}),m[23]=E,m[24]=P,m[25]=v,m[26]=c):c=m[26],m[27]!==u||m[28]!==c?(d=(0,w.jsxs)(ng.v2,{style:s,children:[u,c]}),m[27]=u,m[28]=c,m[29]=d):d=m[29];let z=`${S}-${k}`;return m[30]!==S||m[31]!==k?(f={position:"absolute",left:S,top:k},m[30]=S,m[31]=k,m[32]=f):f=m[32],m[33]!==z||m[34]!==f?(h=(0,w.jsx)("div",{style:f},z),m[33]=z,m[34]=f,m[35]=h):h=m[35],m[36]!==I||m[37]!==d||m[38]!==h?(p=(0,w.jsx)(ng.J2,{__unstable_margins:ud,arrow:!1,open:!0,placement:"right-start",referenceElement:I,content:d,children:h}),m[36]=I,m[37]=d,m[38]=h,m[39]=p):p=m[39],m[40]!==v||m[41]!==p?(g=(0,w.jsx)(is,{setBoundaryElement:_,onDismiss:v,children:p}),m[40]=v,m[41]=p,m[42]=g):g=m[42],g},up=(0,t7.createContext)(null),ug=e=>(0,t7.isValidElement)(e),um=(0,nm.zo)(ng.Zb)` 115 background-color: var(--overlay-bg); 116 border-radius: 3px; 117 pointer-events: none; 118 position: absolute; 119 will-change: transform;
120 box-shadow: var(--overlay-box-shadow); 121 transition: none; 122 123 --overlay-bg: transparent; 124 --overlay-box-shadow: inset 0 0 0 1px transparent; 125 126 [data-overlays] & { 127 --overlay-bg: color-mix(in srgb, transparent 95%, var(--card-focus-ring-color)); 128 --overlay-box-shadow: inset 0 0 0 2px 129 color-mix(in srgb, transparent 50%, var(--card-focus-ring-color)); 130 } 131 132 [data-fading-out] & { 133 transition: 134 box-shadow 1550ms, 135 background-color 1550ms; 136 137 --overlay-bg: rgba(0, 0, 255, 0); 138 --overlay-box-shadow: inset 0 0 0 1px transparent; 139 } 140 141 &[data-focused] { 142 --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color); 143 } 144 145 &[data-hovered]:not([data-focused]) { 146 transition: none; 147 --overlay-box-shadow: inset 0 0 0 2px var(--card-focus-ring-color); 148 } 149 150 /* [data-unmounted] & { 151 --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color); 152 } */ 153 154 :link { 155 text-decoration: none; 156 } 157`,uy=(0,nm.zo)(ng.kC)` 158 bottom: 100%; 159 cursor: pointer; 160 pointer-events: none; 161 position: absolute; 162 right: 0; 163 164 [data-hovered]:not([data-menu-open]) & { 165 pointer-events: all; 166 } 167 168 [data-flipped] & { 169 bottom: auto; 170 top: 100%; 171 } 172`,uv=(0,nm.zo)(ng.kC)` 173 top: 100%; 174 cursor: pointer; 175 pointer-events: none; 176 position: absolute; 177 left: 0; 178 179 gap: 4px; 180 padding: 4px 0; 181 flex-wrap: wrap; 182 183 [data-hovered]:not([data-menu-open]) & { 184 pointer-events: all; 185 } 186 187 [data-flipped] & { 188 top: calc(100% + 2rem); 189 } 190`,ub=(0,nm.zo)(ng.kC)` 191 margin: -0.5rem; 192 193 [data-hovered]:not([data-menu-open]) & { 194 pointer-events: all; 195 } 196`,uw=(0,nm.zo)(ng.kC)` 197 bottom: 100%; 198 cursor: pointer; 199 pointer-events: none; 200 position: absolute; 201 left: 0; 202 203 [data-hovered]:not([data-menu-open]) & { 204 pointer-events: all; 205 } 206 207 [data-flipped] & { 208 bottom: auto; 209 top: 100%; 210 } 211`,ux=(0,nm.zo)(ng.Zb)` 212 cursor: pointer; 213 background-color: var(--card-focus-ring-color); 214 right: 0; 215 border-radius: 3px; 216 217 & [data-ui='Text'] { 218 color: #fff; 219 white-space: nowrap; 220 } 221`,uS=(0,nm.zo)(ng.kC)` 222 display: flex; 223 align-items: center; 224 background-color: var(--card-focus-ring-color); 225 right: 0; 226 border-radius: 3px; 227 & [data-ui='Text'], 228 & [data-sanity-icon] { 229 color: #fff; 230 white-space: nowrap; 231 } 232`,uk=nm.zo.div` 233 position: absolute; 234 inset: 0; 235 pointer-events: all; 236`,uE=e=>{let t,n,r,i,o,s,a,l,u,c,d,f,h,p,g,m,y;let v=(0,x.c)(60),{id:b,element:S,focused:k,componentResolver:E,node:_,showActions:T,draggable:C,targets:A,elementType:R,comlink:j,onActivateExclusivePlugin:P,onMenuOpenChange:M,inFrame:I}=e,{getField:O,getType:$}=ur();v[0]!==$||v[1]!==_?(t=$(_),v[0]=$,v[1]=_,v[2]=t):t=v[2];let z=t;v[3]!==_?(n="path"in _?function(e){let{id:t,type:n,path:r,baseUrl:i,tool:o,workspace:s,perspective:a}=e,[l,u]=(function(e){let{baseUrl:t,workspace:n="default",tool:r="default",id:i,type:o,path:s,projectId:a,dataset:l}=e;if(!t)throw Error("baseUrl is required");if(!s)throw Error("path is required");if(!i)throw Error("id is required");if("/"!==t&&t.endsWith("/"))throw Error("baseUrl must not end with a slash");let u="default"===n?void 0:n,c="default"===r?void 0:r,d=np(i),f=Array.isArray(s)?ns(s.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(""!==e._key)return{_key:e._key};if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)})):s,h=new URLSearchParams({baseUrl:t,id:d,type:o,path:f});if(u&&h.set("workspace",u),c&&h.set("tool",c),a&&h.set("projectId",a),l&&h.set("dataset",l),nd(i)||nf(i)){if(nf(i)){let e=function(e){if(!nf(e))return;let[t,n,...r]=e.split(".");return n}(i);h.set("perspective",e)}}else h.set("perspective","published");let p=["/"===t?"":t];u&&p.push(u);let g=["mode=presentation",`id=${d}`,`type=${o}`,`path=${encodeURIComponent(f)}`];return c&&g.push(`tool=${c}`),p.push("intent","edit",`${g.join(";")}?${h}`),p.join("/")})({baseUrl:i,workspace:s,tool:o,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}(nu.fromString(r)):[]}).split("?"),c=new URLSearchParams(u),d=a||c.get("perspective");return"drafts"===d?c.delete("perspective"):d&&c.set("perspective",d),`${l}?${c}`}(_):_.href,v[3]=_,v[4]=n):n=v[4];let L=n,N=function(){let e=(0,t7.useContext)(up);if(!e)throw Error("Preview Snapshots context is missing");return e}();t:{let e;if(!("path"in _)){r=void 0;break t}v[5]!==_||v[6]!==N?(e=N.find(e=>
236e._id===_.id)?.title,v[5]=_,v[6]=N,v[7]=e):e=v[7],r=e}let D=r;v[8]!==S||v[9]!==k||v[10]!==O||v[11]!==$?(i=function(e,t){let n=$(e),{field:r,parent:i}=O(e);if(!("id"in e)||!r||!n)return;let o=r.value.type;return{document:n,element:S,targetElement:t||S,field:r,focused:!!k,node:e,parent:i,type:o}},v[8]=S,v[9]=k,v[10]=O,v[11]=$,v[12]=i):i=v[12];let V=i;if(v[13]!==R||v[14]!==V||v[15]!==_?(o="element"===R?V(_):void 0,v[13]=R,v[14]=V,v[15]=_,v[16]=o):o=v[16],v[17]!==V||v[18]!==A){let e;v[20]!==V?(e=e=>V(e.sanity,e.element),v[20]=V,v[21]=e):e=v[21],s=A.map(e).filter(uA),v[17]=V,v[18]=A,v[19]=s}else s=v[19];v[22]!==o||v[23]!==s?(a={legacyComponentContext:o,pluginContexts:s},v[22]=o,v[23]=s,v[24]=a):a=v[24];let F=a,B=function(e,t){let n;let r=(0,x.c)(3);if(r[0]!==e||r[1]!==t){t:{if(!e){n=void 0;break t}let r=t?.(e);if(!r){n=void 0;break t}if(ug(r)){n=r;break t}n=(Array.isArray(r)?r:[r]).map(uT)}r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(F.legacyComponentContext,E),H=function(e,t){let n;let r=(0,x.c)(5);if(r[0]!==e||r[1]!==t){let i;r[3]!==t?(i=e=>{let n={id:rf(),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]=i):i=r[4],n=e.map(i),r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(F.pluginContexts,e.plugins);v[25]!==z?(l=z?.icon?(0,w.jsx)("div",{dangerouslySetInnerHTML:{__html:z.icon}}):(0,w.jsx)(rY.$lS,{}),v[25]=z,v[26]=l):l=v[26];let U=l,W=(0,t7.useId)();v[27]!==H?(u=H?.some(uR),v[27]=H,v[28]=u):u=v[28];let q=u||H?.length>1;v[29]!==b?(c=()=>{window.dispatchEvent(new CustomEvent("sanity-overlay/label-click",{detail:{id:b}}))},v[29]=b,v[30]=c):c=v[30];let X=c;return v[31]!==L||v[32]!==I||v[33]!==T?(d=T?(0,w.jsx)(uy,{gap:1,paddingY:1,children:(0,w.jsx)(uC,{inFrame:I,href:L})}):null,v[31]=L,v[32]=I,v[33]=T,v[34]=d):d=v[34],v[35]!==j||v[36]!==C||v[37]!==X||v[38]!==U||v[39]!==W||v[40]!==H||v[41]!==P||v[42]!==M||v[43]!==q||v[44]!==D?(f=(D||q)&&(0,w.jsx)(uw,{gap:1,paddingY:1,onClick:X,children:(0,w.jsxs)(uS,{gap:2,padding:2,children:[C&&(0,w.jsx)(ng.xu,{marginRight:1,children:(0,w.jsx)(ng.xv,{className:"drag-handle",size:0,children:(0,w.jsx)(rY.VVU,{})})}),(0,w.jsx)(ng.xv,{size:0,children:U}),D&&(0,w.jsx)(ng.xv,{size:1,weight:"medium",children:D}),q&&(0,w.jsx)(ng.xu,{paddingLeft:2,onClick:uj,children:(0,w.jsx)(ub,{children:(0,w.jsx)(iY,{id:W,popover:{animate:!0,placement:"bottom-start",constrainSize:!0,tone:"default"},onOpen:()=>{M?.(!0)},onClose:()=>{M?.(!1)},button:(0,w.jsx)(ng.zx,{icon:rY.zGg,tone:"primary",padding:2}),menu:(0,w.jsx)(ng.v2,{paddingY:0,children:(0,w.jsx)(iv,{children:H?.map((e,t)=>w.jsxs(t7.Fragment,{children:[w.jsxs(ng.Kq,{role:"group",paddingY:1,space:0,children:[w.jsx(ng.sN,{paddingY:2,text:w.jsx(ng.xu,{paddingY:2,children:w.jsx(ng.xv,{muted:!0,size:1,style:{textTransform:"capitalize"},children:`${e.context.document.name}: ${e.context.field?.name}`})}),onClick:()=>{e.context.node&&j?.post("visual-editing/focus",e.context.node)}}),e.exclusive.map(t=>t.component?w.jsx(ng.sN,{paddingY:2,icon:t.icon||w.jsx(rY.BWR,{}),text:w.jsx(ng.xu,{paddingY:2,children:w.jsx(ng.xv,{size:1,children:t.title||t.name})}),onClick:()=>P?.(t,e.context)},t.name):null)]}),t<H.length-1&&w.jsx(ng.R,{})]},e.id))})})})})})]})}),v[35]=j,v[36]=C,v[37]=X,v[38]=U,v[39]=W,v[40]=H,v[41]=P,v[42]=M,v[43]=q,v[44]=D,v[45]=f):f=v[45],v[46]!==H?(h=H?.map(uP),v[46]=H,v[47]=h):h=v[47],v[48]!==h?(p=(0,w.jsx)(uv,{children:h}),v[48]=h,v[49]=p):p=v[49],v[50]!==d||v[51]!==f||v[52]!==p?(g=(0,w.jsxs)(iv,{children:[d,f,p]}),v[50]=d,v[51]=f,v[52]=p,v[53]=g):g=v[53],v[54]!==B||v[55]!==F.legacyComponentContext?(m=Array.isArray(B)?B.map((e,t)=>{let{component:n,props:r}=e;return(0,w.jsx)(n,{PointerEvents:iv,...F.legacyComponentContext,...r},t)}):B,v[54]=B,v[55]=F.legacyComponentContext,v[56]=m):m=v[56],v[57]!==g||v[58]!==m?(y=(0,w.jsxs)(w.Fragment,{children:[g,m]}),v[57]=g,v[58]=m,v[59]=y):y=v[59],y},u_=(0,t7.memo)(function(e){let t,n,r,i,o,s,a,l,u,c,d,f,h;let p=(0,x.c)(39),{draggable:g,focused:m,hovered:y,rect:v,wasMaybeCollapsed:b,enableScrollIntoView:S,inFrame:k}=e,E=(0,t7.useRef)(null),_=(0,t7.useRef)(!1),T=`${v.w}px`,C=`${v.h}px`,A=`translate(${v.x}px, ${v.y}px)`;p[0]!==T||p[1]!==C||p[2]!==A?(t={width:T,height:C,transform:A},p[0]=T,p[1]=C,p[2]=A,p[3]=t):t=p[3];let R=t;p[4]!==S||p[5]!==m||p[6]!==b?(n=()=>
236{if(!_.current&&!b&&!0===m&&E.current&&S){let e=E.current;(0,ou.Z)(E.current,{behavior:t=>{0!==t.length&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},scrollMode:"if-needed",block:"center",inline:"nearest"})}_.current=!0===m},r=[m,b,S],p[4]=S,p[5]=m,p[6]=b,p[7]=n,p[8]=r):(n=p[7],r=p[8]),(0,t7.useEffect)(n,r);let[j,P]=(0,t7.useState)(!1);p[9]!==y?(i=()=>{if(!E.current||!y)return;let e=new IntersectionObserver(e=>{let[t]=e;P(t.boundingClientRect.top<0)},{threshold:1});return e.observe(E.current),()=>e.disconnect()},p[9]=y,p[10]=i):i=p[10],p[11]!==y||p[12]!==j?(o=[y,j],p[11]=y,p[12]=j,p[13]=o):o=p[13],(0,t7.useEffect)(i,o);let[M,I]=(0,t7.useState)(null);p[14]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{I(null),window.dispatchEvent(new CustomEvent("sanity-overlay/exclusive-plugin-closed"))},p[14]=s):s=p[14];let O=s;p[15]===Symbol.for("react.memo_cache_sentinel")?(a=(e,t)=>{I({plugin:e,context:t})},p[15]=a):a=p[15];let $=a,z=M?.plugin.component,[L,N]=(0,t7.useState)(!1);p[16]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{(0,t7.startTransition)(()=>N(!1))},p[16]=l):l=p[16],p[17]!==y?(u=[y],p[17]=y,p[18]=u):u=p[18],(0,t7.useEffect)(l,u),p[19]!==z||p[20]!==L?(c=L||z?(0,w.jsx)(ia,{onDismiss:O,blockScroll:L}):null,p[19]=z,p[20]=L,p[21]=c):c=p[21];let D=m?"":void 0,V=y?"":void 0,F=j?"":void 0,B=g?"":void 0,H=L?"":void 0;return p[22]!==z||p[23]!==M||p[24]!==y||p[25]!==k||p[26]!==e?(d=z?(0,w.jsx)(uk,{"data-sanity-overlay-element":!0,onClick:uM,children:(0,w.jsx)(z,{...M.context,closeExclusiveView:O})}):y?(0,w.jsx)(uE,{...e,inFrame:k,onActivateExclusivePlugin:$,onMenuOpenChange:N}):null,p[22]=z,p[23]=M,p[24]=y,p[25]=k,p[26]=e,p[27]=d):d=p[27],p[28]!==R||p[29]!==D||p[30]!==V||p[31]!==F||p[32]!==B||p[33]!==H||p[34]!==d?(f=(0,w.jsx)(um,{"data-focused":D,"data-hovered":V,"data-flipped":F,"data-draggable":B,"data-menu-open":H,ref:E,style:R,children:d}),p[28]=R,p[29]=D,p[30]=V,p[31]=F,p[32]=B,p[33]=H,p[34]=d,p[35]=f):f=p[35],p[36]!==c||p[37]!==f?(h=(0,w.jsxs)(w.Fragment,{children:[c,f]}),p[36]=c,p[37]=f,p[38]=h):h=p[38],h});function uT(e){return"object"==typeof e&&"component"in e?e:{component:e,props:{}}}let uC=(0,t7.memo)(function(e){let t,n,r;let i=(0,x.c)(8),{inFrame:o}=e,s=(0,t7.useSyncExternalStore)(uI,uO);i[0]!==e.href||i[1]!==s?(t=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,s),i[0]=e.href,i[1]=s,i[2]=t):t=i[2];let a=t,l=o?void 0:"_blank",u=o?"noopener":"noopener noreferrer";return i[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,w.jsx)(ux,{padding:2,children:(0,w.jsx)(ng.xv,{size:1,weight:"medium",children:"Open in Studio"})}),i[3]=n):n=i[3],i[4]!==a||i[5]!==l||i[6]!==u?(r=(0,w.jsx)(ng.xu,{as:"a",href:a,target:l,rel:u,children:n}),i[4]=a,i[5]=l,i[6]=u,i[7]=r):r=i[7],r});function uA(e){return void 0!==e}function uR(e){return e.exclusive.length>0}function uj(e){e.stopPropagation()}function uP(e){return(0,w.jsx)(t7.Fragment,{children:e.hud.map(t=>{let n=t.component;return n?(0,w.jsx)(n,{...e.context},t.name):null})},e.id)}function uM(e){e.stopPropagation()}function uI(e){let t=()=>e();return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}function uO(){return window.location.href}let u$=e=>{let t;let n=(0,x.c)(5),{dragGroupRect:r}=e,i=`${r.y}px`,o=`${r.x}px`,s=`${r.w-1}px`,a=`${r.h-1}px`;return n[0]!==i||n[1]!==o||n[2]!==s||n[3]!==a?(t=(0,w.jsx)("div",{style:{position:"absolute",top:i,left:o,width:s,height:a,border:"1px dashed #f0709b",pointerEvents:"none"}}),n[0]=i,n[1]=o,n[2]=s,n[3]=a,n[4]=t):t=n[4],t},uz=e=>{let t;let n=(0,x.c)(4),{dragInsertPosition:r}=e;if(null===r)return;let i=r?.left||r?.right?"horizontal":"vertical",o=0,s=0,a=0,l=0;if("horizontal"===i){let{left:e,right:t}=r;if(a=6,t&&e){let n=e.rect.x+e.rect.w,r=t.rect.x,i=.0125*Math.min(t.rect.h,e.rect.h);o=.5*n+.5*r-3,s=e.rect.y+i,l=Math.min(t.rect.h,e.rect.h)-2*i}else if(t&&!e){let e=.0125*t.rect.h;o=t.rect.x-3,s=t.rect.y+e,l=t.rect.h-2*e}else if(e&&!t){let t=.0125*e.rect.h;o=e.rect.x+e.rect.w-3,s=e.rect.y+t,l=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,i=e.rect.y,u=.0125*Math.min(e.rect.w,t.rect.w);l=6,o=n+u,s=.5*r+.5*i-3,a=Math.max(e.rect.w,t.rect.w)-2*u}else if(e&&!t){let t=.0125*e.rect.w;o=e.rect.x+t,s=e.rect.y-3,a=e.rect.w-2*t,l=6}else if(t&&!e){let e=.0125*t.rect.w;o=t.rect.x+e,s=t.rect.y+t.rect.h-3,a=t.rect.w-2*e,l=6}}let u=`${a}px`,c=`${l}px`,d=`translate(${o}px, ${s}px)`;return n[0]!==u||n[1]!==c||n[2]!==d?(t=(0,w.jsx)("div",{style:{position:"absolute",width:u,height:c,transform:d,background:"#556bfc",border:"2px s
236olid white",borderRadius:"999px",zIndex:"999999"}}),n[0]=u,n[1]=c,n[2]=d,n[3]=t):t=n[3],t},uL=nm.zo.div` 237 --drag-preview-opacity: 0.98; 238 --drag-preview-skeleton-stroke: #ffffff; 239 240 @media (prefers-color-scheme: dark) { 241 --drag-preview-skeleton-stroke: #383d51; 242 } 243 244 position: fixed; 245 display: grid; 246 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})`}; 247 width: ${({$width:e})=>`${e}px`}; 248 height: ${({$height:e})=>`${e}px`}; 249 z-index: 9999999; 250 opacity: var(--drag-preview-opacity); 251 cursor: move; 252 253 .drag-preview-content-wrapper { 254 position: relative; 255 width: 100%; 256 height: 100%; 257 container-type: inline-size; 258 } 259 260 [data-ui='card'] { 261 position: relative; 262 width: 100%; 263 height: 100%; 264 } 265 266 .drag-preview-skeleton { 267 position: absolute; 268 inset: 0; 269 270 rect { 271 stroke: var(--drag-preview-skeleton-stroke); 272 } 273 } 274 275 .drag-preview-handle { 276 position: absolute; 277 top: 4cqmin; 278 left: 4cqmin; 279 width: 6cqmin; 280 fill: var(--drag-preview-handle-fill); 281 } 282`,uN=e=>{var t,n;let r,i,o,s,a,l,u,c,d,f,h,p,g,m,y,v,b,S,k,E,_;let T=(0,x.c)(50),{skeleton:C}=e,A=Math.min(C.maxWidth,window.innerWidth/2),R=C.w>A?A/C.w:1,j=C.offsetX*R,P=C.offsetY*R,M=(0,ng.Bj)(),I=(0,ng.g9)(),O=I.radius[~~((n=(C.w-0)*((t=I.radius.length-2)-1)/1920+1)<1?1:n>t?t:n)];if(T[0]!==j||T[1]!==P||T[2]!==M||T[3]!==O||T[4]!==R||T[5]!==C.childRects||T[6]!==C.h||T[7]!==C.w){let e=C.childRects.filter(uD),t=C.childRects.filter(uV);i=uL,s=C.w,a=C.h,l=j,u=P,c=R,r=ng.Zb,p=O,g=4,m="hidden",y="transparent",v=M?"dark":"light",h="drag-preview-content-wrapper",d="drag-preview-skeleton",f=`0 0 ${C.w} ${C.h}`,o=[...e,...t],T[0]=j,T[1]=P,T[2]=M,T[3]=O,T[4]=R,T[5]=C.childRects,T[6]=C.h,T[7]=C.w,T[8]=r,T[9]=i,T[10]=o,T[11]=s,T[12]=a,T[13]=l,T[14]=u,T[15]=c,T[16]=d,T[17]=f,T[18]=h,T[19]=p,T[20]=g,T[21]=m,T[22]=y,T[23]=v}else r=T[8],i=T[9],o=T[10],s=T[11],a=T[12],l=T[13],u=T[14],c=T[15],d=T[16],f=T[17],h=T[18],p=T[19],g=T[20],m=T[21],y=T[22],v=T[23];return T[24]!==o||T[25]!==I.color?(b=o.map((e,t)=>(0,w.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:I.color.skeleton.from},t)),T[24]=o,T[25]=I.color,T[26]=b):b=T[26],T[27]!==b||T[28]!==d||T[29]!==f?(S=(0,w.jsx)("svg",{className:d,viewBox:f,children:b}),T[27]=b,T[28]=d,T[29]=f,T[30]=S):S=T[30],T[31]!==S||T[32]!==h?(k=(0,w.jsx)("div",{className:h,children:S}),T[31]=S,T[32]=h,T[33]=k):k=T[33],T[34]!==r||T[35]!==k||T[36]!==p||T[37]!==g||T[38]!==m||T[39]!==y||T[40]!==v?(E=(0,w.jsx)(r,{radius:p,shadow:g,overflow:m,tone:y,scheme:v,children:k}),T[34]=r,T[35]=k,T[36]=p,T[37]=g,T[38]=m,T[39]=y,T[40]=v,T[41]=E):E=T[41],T[42]!==i||T[43]!==s||T[44]!==a||T[45]!==l||T[46]!==u||T[47]!==c||T[48]!==E?(_=(0,w.jsx)(i,{$width:s,$height:a,$offsetX:l,$offsetY:u,$scaleFactor:c,children:E}),T[42]=i,T[43]=s,T[44]=a,T[45]=l,T[46]=u,T[47]=c,T[48]=E,T[49]=_):_=T[49],_};function uD(e){return"IMG"===e.tagName}function uV(e){return"IMG"!==e.tagName}let uF=(0,nm.zo)(ng.Zb)` 283 position: fixed; 284 bottom: 2rem; 285 left: 2rem; 286`,uB=()=>{let e,t;let n=(0,x.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,w.jsx)(uF,{padding:2,shadow:2,radius:2,style:e,children:(0,w.jsxs)(ng.kC,{align:"center",gap:2,children:[(0,w.jsx)(ng.SV,{keys:["Shift"]}),(0,w.jsx)(ng.xv,{size:1,children:"Zoom Out"}),(0,w.jsx)(rY.Qq,{})]})}),n[1]=t):t=n[1],t},uH=(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=>
286{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 uU(e,t){let{type:n}=t,{contextMenu:r,focusPath:i,perspective:o,isDragging:s,dragInsertPosition:a,dragShowMinimap:l,dragShowMinimapPrompt:u,dragSkeleton:c,dragMinimapTransition:d,dragGroupRect:f}=e,h=!1;if("presentation/focus"===n){let n=e.focusPath;n!==(i=t.data.path)&&(h=n.slice(i.length).startsWith("["))}return"presentation/perspective"===n&&(o=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&&(a=t.insertPosition),"overlay/dragStart"===n&&(s=!0),"overlay/dragUpdateSkeleton"===t.type&&(c=t.skeleton),"overlay/dragEnd"===n&&(s=!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&&(l=t.display),{...e,contextMenu:r,elements:uH(e.elements,t),dragInsertPosition:a,dragSkeleton:c,dragGroupRect:f,isDragging:s,focusPath:i,perspective:o,wasMaybeCollapsed:h,dragShowMinimap:l,dragShowMinimapPrompt:u,dragMinimapTransition:d}}let uW=function(e){let t,n,r,i,o,s,a;let l=(0,x.c)(13),{comlink:u,children:c}=e;l[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],l[0]=t):t=l[0];let[d,f]=(0,t7.useState)(t);l[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{}},l[1]=u,l[2]=n):n=l[2];let h=n;return l[3]!==u||l[4]!==h?(r=()=>{if(!u)return;let e=new AbortController,t=u.onStatus(()=>{h(e.signal)},"connected");return()=>{e.abort(),t()}},i=[u,h],l[3]=u,l[4]=h,l[5]=r,l[6]=i):(r=l[5],i=l[6]),(0,t7.useEffect)(r,i),l[7]!==u?(o=()=>u?.on("presentation/preview-snapshots",e=>{f(e.snapshots)}),s=[u],l[7]=u,l[8]=o,l[9]=s):(o=l[8],s=l[9]),(0,t7.useEffect)(o,s),l[10]!==c||l[11]!==d?(a=(0,w.jsx)(up.Provider,{value:d,children:c}),l[10]=c,l[11]=d,l[12]=a):a=l[12],a};function uq(e){return"document"===e.type}function uX(e){return"type"===e.type}let uY=function(e){let t,n,r,i,o,s,a,l,u,c,d;let f=(0,x.c)(22),{comlink:h,children:p,elements:g}=e;f[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,f[0]=t):t=f[0];let[m,y]=(0,t7.useState)(t),[v,b]=(0,t7.useState)(null);f[1]!==h?(n=()=>{if(!h)return;let e=async function(e){if(h)try{let t=await h.fetch("visual-editing/schema",void 0,{signal:e,suppressWarnings:!0});b(t.schema)}catch{}},t=new AbortController,n=h.onStatus(()=>{e(t.signal)},"connected");return()=>{t.abort(),n()}},r=[h],f[1]=h,f[2]=n,f[3]=r):(n=f[2],r=f[3]),(0,t7.useEffect)(n,r),f[4]===Symbol.for("react.memo_cache_sentinel")?(i=[],f[4]=i):i=f[4];let S=(0,t7.useRef)(i),k=(0,t7.useDeferredValue)(g);f[5]!==k?(o=k.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},[]),f[5]=k,f[6]=o):o=f[6];let E=o,_=(0,t7.useRef)(null);f[7]!==h||f[8]!==E?(s=()=>{if(!E.length||!h)return;let e=async(e,t)=>{let n=S.current;try{S.current=e;let n=await h.fetch("visual-editing/schema-union-types",{paths:e},{signal:t,suppressWarnings:!0});if(t.aborted)return;y(n.types),_.current=null}catch{}t.aborted&&(S.current=n)};E.some(e=>!S.current.find(t=>{let{id:n,path:r}=t;return n===e.id&&r===e.path}))&&(_.current?.abort(),_.current=new AbortController,e(E,_.current.signal))},a=[h,E],f[7]=h,f[8]=E,f[9]=s,f[10]=a):(s=f[9],a=f[10]),(0,t7.useEffect)(s,a),f[11]!==v?(l=(e,t)=>{if(!v||"string"!=typeof e&&(!("path"in e)||!Array.isArray(v)))return;let n="string"==typeof e?e:e.type;return v.filter("document"===(t||"document")?uq:uX).find(e=>e.name===n)},f[11]=v,f[12]=l):l=f[12];let T=l;f[13]!==T||f[14]!==m?(u=e=>{if(!("path"in e))return{field:void 0,parent:void 0};let t=T(e);if(!t)return{field:void 0,parent:void 0};let n=e.path.split(".").flatMap(uG);try{return function t(n,r,i,o){let s=void 0===o?[]:o;if(!n)return{field:void 0,parent:void 0};let[a,...l]=r;if("fields"in n){let e=n.fields[a];if(!e&&"rest"in n)return t(n.rest,r,n,s);if(!l.length)return{field:e,parent:i};if(!e)throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...s,...r].join(".")}"`);return t(e.value,l,n,[...s,a])}if("array"===n.type)return t(n.of,r,n,s);if("arrayItem"===n.type)return l.length?t(n.value,l,n,[...s,a]):{field:n,parent:i};if("union"===n.type){let r=a.startsWith("[_key==")?m?.get(e.id)?.get([s.join("."),a].filter(
286Boolean).join("")):a;return t(n.of.find(e=>"unionOption"===e.type?e.name===r:e),l,n,[...s,a])}if("unionOption"===n.type)return a?t(n.value,r,n,s):{field:n,parent:i};if("inline"===n.type)return t(T(n.name,"type").value,r,n,s);throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...s,...r].join(".")}"`)}(t,n,void 0)}catch(e){return e instanceof Error&&console.warn(e.message),{field:void 0,parent:void 0}}},f[13]=T,f[14]=m,f[15]=u):u=f[15];let C=u;f[16]!==C||f[17]!==T?(c={getField:C,getType:T},f[16]=C,f[17]=T,f[18]=c):c=f[18];let A=c;return f[19]!==p||f[20]!==A?(d=(0,w.jsx)(un.Provider,{value:A,children:p}),f[19]=p,f[20]=A,f[21]=d):d=f[21],d};function uG(e){return e.includes("[")?e.split(/(\[.+\])/,2):[e]}let uZ=(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))}})({}),uK=e=>{let t,n,r,i,o,s;let a=(0,x.c)(11),{comlink:l,children:u}=e;a[0]!==l?(t=()=>l?.on("presentation/shared-state",uJ),n=[l],a[0]=l,a[1]=t,a[2]=n):(t=a[1],n=a[2]),(0,t7.useEffect)(t,n),a[3]!==l?(r=()=>{(async function(){let e=await l?.fetch("visual-editing/shared-state",void 0,{suppressWarnings:!0});e&&uZ.setState(()=>e.state)})().catch(uQ)},i=[l],a[3]=l,a[4]=r,a[5]=i):(r=a[4],i=a[5]),(0,t7.useEffect)(r,i),a[6]!==l?(o={comlink:l,store:uZ},a[6]=l,a[7]=o):o=a[7];let c=o;return a[8]!==u||a[9]!==c?(s=(0,w.jsx)(rq.Provider,{value:c,children:u}),a[8]=u,a[9]=c,a[10]=s):s=a[10],s};function uJ(e){"value"in e?uZ.setState(t=>({...t,[e.key]:e.value})):uZ.setState(t=>Object.fromEntries(Object.entries(t).filter(t=>{let[n]=t;return n!==e.key})))}function uQ(e){console.debug(e),console.warn("[@sanity/visual-editing]: Failed to fetch shared state. Check your version of `sanity` is up-to-date")}let u0=e=>{let t,n;let r=(0,x.c)(5),{children:i,comlink:o}=e;r[0]!==o?(t=(e,t)=>{if(!o)return;let n=ic[e];if(n)o.post("visual-editing/telemetry-log",{event:n,data:t});else throw Error(`Telemetry event: ${e} does not exist`)},r[0]=o,r[1]=t):t=r[1];let s=t;return r[2]!==i||r[3]!==s?(n=(0,w.jsx)(id.Provider,{value:s,children:i}),r[2]=i,r[3]=s,r[4]=n):n=r[4],n};function u1(){}function u2(e){return e.id}function u5(e){return!!e}function u3(e){let{sanity:t}=e;return t&&"id"in t?t:null}let u4=nm.zo.div` 287 background-color: transparent; 288 direction: ltr; 289 inset: 0; 290 pointer-events: none; 291 position: absolute; 292 width: 100%; 293 height: 100%; 294 z-index: ${({$zIndex:e})=>e??"9999999"}; 295`;function u6(e){let t,n;return t=requestAnimationFrame(()=>{n=requestAnimationFrame(e)}),()=>{void 0!==t&&cancelAnimationFrame(t),void 0!==n&&cancelAnimationFrame(n)}}let u8=e=>{let t,n,r,i,o;let s=(0,x.c)(8),{documentIds:a}=e;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],s[0]=t):t=s[0];let[l,u]=(0,t7.useState)(t);s[1]!==a?(n=()=>{(0,t7.startTransition)(()=>u(e=>{let t=Array.from(new Set(a));return e.length===t.length&&e.reduce(cd,t)?.length===0?e:t}))},r=[a],s[1]=a,s[2]=n,s[3]=r):(n=s[2],r=s[3]),(0,t7.useEffect)(n,r);let c=nH();return s[4]!==c||s[5]!==l?(i=()=>{for(let e of l)c.send({type:"observe",documentId:nh(e)}),c.send({type:"observe",documentId:np(e)});return()=>{for(let e of l)c.send({type:"unobserve",documentId:nh(e)}),c.send({type:"unobserve",documentId:np(e)})}},o=[c,l],s[4]=c,s[5]=l,s[6]=i,s[7]=o):(i=s[6],o=s[7]),(0,t7.useEffect)(i,o),null},u7=e=>{let t,n,r;let i=(0,x.c)(12),{comlink:o,dispatch:s,inFrame:a,inPopUp:l,onDrag:u,overlayEnabled:c,rootElement:d}=e,{dispatchDragEndEvent:f}=function(){let e,t,n;let r=(0,x.c)(4),{getDocument:i}=nZ();return r[0]!==i?(e=()=>{let e=e=>{let{insertPosition:t,target:n,preventInsertDefault:r}=e.detail;if(r)return;let o=function(e){if(e){let{top:t,right:n,bottom:r,left:i}=e;if(i||t)return{node:(i??t).sanity,position:"after"};if(n||r)return{node:(n??r).sanity,position:"before"}}}(t);if(o){let e=i(n.id),{node:t,position:r}=o,{key:s,hasExplicitKey:a}=nQ(n),{path:l,key:u}=nQ(t);l&&u&&u!==s&&e.patch(async e=>{let{getSnapshot:t}=e,i=nF(await t(),n.path);return a?[nP(l,nj({_key:s})),nP(l,nA(i,r,{_key:u}))]:[nP(l,nj(~~s)),nP(l,nA(i,r,u>s?~~u-1:~~u))]})}};return window.addEventListener("sanity/dragEnd",e),()=>{window.removeEventListener("sanity/dragEnd",e)}},t=[i],r[0]=i,r[1]=e,r[2]=t):(e=r[1],t=r[2]),(0,t7.useEffect)(e,t),r[3]===Symbol.for("react.memo_cache_sentinel")?(n={dispatchDragEndEvent:ut},r[3]=n):n=r[3],n}(),h=ih();i[0]!==o||i[1]!==s||i[2]!==f||i[3]!==u||i[4]!==h?(t=e=>{if("element/click"===e.type){let{sanity:t}=e;o?.post("visual-editing/focus",t),h("Visual Editing Overlay Clicked",null)}else if("overlay/activate"===e.type)o?.post("visual-editing/toggle",{enabled:!0});else if("overlay/deactivate"===e.type)o?.post("visual-editing/toggle",{enabled:!1});else if("overlay/dragEnd"===e.type){let{insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}=e;f({insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}),t&&h("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)h("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")}s(e)},i[0]=o,i[1]=s,i[2]=f,i[3]=u,i[4]=h,i[5]=t):t=i[5];let p=function(e,t,n,r){let i,o;let s=(0,x.c)(7),a=(0,t7.useRef)(void 0),l=nX();return s[0]!==e||s[1]!==t||s[2]!==n||s[3]!==r||s[4]!==l?(i=()=>
295{if(e)return a.current=function({handler:e,overlayElement:t,inFrame:n,inPopUp:r,optimisticActorReady:i}){let o=!1,s=new Map,a=new WeakMap,l=new Set,u=new WeakMap,c=new WeakMap,d,f,h,p=!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 v({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;i.addEventListener("click",r.click,{capture:!0}),i.addEventListener("contextmenu",r.contextmenu,{capture:!0}),i.addEventListener("mousemove",r.mousemove,{once:!0,capture:!0}),i.addEventListener("mousedown",r.mousedown,{capture:!0}),d.observe(o),e({type:"element/activate",id:t})}function b({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;y(i,r),d.unobserve(o),g=g.filter(e=>e!==i),e({type:"element/deactivate",id:t})}function w(t){if(!(!n&&!r||!i))for(let n of g){if(t===n){let n=a.get(t)?.sanity;if(!n||!rV(n))return;if(rW(t,n,l,a)){let n=t.style.cursor;n&&c.set(t,n),e({type:"overlay/setCursor",element:t,cursor:"move"});continue}}x(n)}}function x(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 i=function(e){if("object"==typeof e&&null!==e)return re(e);try{let t=JSON.parse(e);return re(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=nu.toString(function(e){let t=[];for(let n of e.split(".")){let e=n4.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=n6.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=n8.exec(n);if(i){t.push(i[1],{_key:i[2]});continue}t.push(n)}return t}(r));break;case"base":e.baseUrl=decodeURIComponent(r);break;case"perspective":e.perspective=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,n1.is)(n3,t))return t}(e)}}(t);if(!i)return;let o=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(o)return{elements:{element:e,measureElement:o},sanity:i,reason:n,preventGrouping:r}}if(t)for(let i of t.childNodes)!function t(i,o){let s=function(t){let{nodeType:n,parentElement:i,textContent:o}=t;if(rz(t)&&t.dataset?.sanityEditTarget!==void 0){let n=rF(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&&i&&o){let e=r$(o);return e?r(i,e,"stega-text",!0):void 0}else if(rz(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&&rO(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&rO(t.textContent)));if(rL(t)){let e=r$(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if(rN(t)){let e=r$(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if(rD(t)){if(!t.ariaLabel)return;let e=r$(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(i),a=o;if(rz(i)&&i.dataset?.sanityEditGroup!==void 0&&(a={type:"group",elements:{element:i,measureElement:i},targets:[]},n.push(a)),s){let e={elements:s.elements,sanity:s.sanity,reason:s.reason};a&&!s.preventGrouping?a.targets.push(e):n.push({elements:s.elements,type:"element",targets:[e]})}if(rz(i)&&!rL(i)&&!("SCRIPT"===i.tagName||"SANITY-VISUAL-EDITING"===i.tagName))for(let e of i.childNodes)t(e,a)}(i,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:rF(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=a.get(e.elements.element);t&&"element"===t.type&&k(e.elements.element)}0===d.targets.length&&k(d.elements.element)}if(!d.commonSanity)continue;let{element:c}=d.elements;a.has(c)?function(t){let{element:n}=t.elements,r=a.get(n);r&&(a.set(n,{...r,sanity:t.commonSanity}),e({type:"element/update",elementType:r.type,id:r.id,rect:rh(n),sanity:t.commonSanity,targets:t.targets.map(e=>({sanity:e.sanity,element:e.elements.element}))}))}(d):function({type:c,elements:d,commonSanity:h,targets:y}){let{element:b,measureElement:S}=d,k={click(t){let r=t.target;if(b===m()&&b.contains(r)){n&&(t.preventDefault(),t.stopPropagation());let r=a.get(b)?.sanity;r&&!p&&e({type:"element/click",id:E,sanity:r})}},contextmenu(t){if(!("path"in h)||!n&&!r||!i||!h.path.split(".").pop()?.includes("[_key=="))return;let o=t.target;b===m()&&b.contains(o)&&((n||r)&&(t.preventDefault(),t.stopPropagation()),e({type:"element/contextmenu",id:E,position:{x:t.clientX,y:t.clientY},sanity:h}))},mousedown(t){if(t.preventDefault(),t.currentTarget!==g.at(-1)||b.getAttribute("data-sanity-drag-disable")||!n&&!r||!i)return;let o=a.get(b)?.sanity;if(!o||!rV(o)||!rB(o.path))return;let s=rW(b,h,l,a);s&&function(e){var t;let{mouseEvent:n,element:r,overlayGroup:i,handler:o,target:s,onSequenceStart:a,onSequenceEnd:l}=e;if(0!==n.button)return;window.focus();let u=i.map(e=>rh(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=u).some(e=>t.filter(t=>!rg(e,t)).some(t=>e.y===t.y))?"horizontal":"vertical"),d=r.getAttribute("data-sanity-drag-group"),f=!!r.getAttribute("data-sanity-drag-minima
295p-disable"),h=!!r.getAttribute("data-sanity-drag-prevent-default"),p=r.getAttribute("data-unstable_sanity-drag-document-height"),g=r.getAttribute("data-unstable_sanity-drag-group-height"),m=null,y=rS(n),v=document.body,{minYScaled:b,scaleFactor:w}=function(e,t){let n=t||rb(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:i}=rb(e.map(e=>rv(e,r,{x:window.innerWidth/2,y:0})));return{scaleFactor:r,minYScaled:i-100*r}}(u,g?~~g:null),x=!1,S=!1,k=!0;rC||(rP={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}},rj=p?~~p:document.documentElement.scrollHeight);let E=setInterval(()=>{u=i.map(e=>rh(e.elements.element))},150),_=()=>{w>=1||(o({type:"overlay/dragUpdateSkeleton",skeleton:rk(rR,r,w)}),o({type:"overlay/dragToggleMinimapPrompt",display:!1}),rE(v,w,b,o,150).then(()=>{setTimeout(()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:r_(u)})},300)}))},T=e=>{Math.abs(e.deltaY)>=10&&w<1&&!rC&&!S&&!f&&k&&(o({type:"overlay/dragToggleMinimapPrompt",display:!0}),S=!0),!e.shiftKey||rC||f||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),rC=!0,setTimeout(()=>{_()},50))},C=e=>{if(e.preventDefault(),rA=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(),i=new DOMPoint(e.x,e.y).matrixTransform(r);return{x:i.x,y:i.y}}(rR=rS(e)),4>Math.abs(rm(rR,y)))return;if(!x){let e=r_(u),t=rk(rR,r,1);o({type:"overlay/dragStart",flow:c}),o({type:"overlay/dragUpdateSkeleton",skeleton:t}),o({type:"overlay/dragUpdateGroupRect",groupRect:e}),x=!0,a()}o({type:"overlay/dragUpdateCursorPosition",x:rR.x,y:rR.y}),!e.shiftKey||rC||f||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),rC=!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},i={x1:e.x,y1:e.y,x2:e.x+1e8,y2:e.y};return{left:ry(r,t,n),right:ry(i,t,n)}}{let r={x1:e.x,y1:e.y,x2:e.x,y2:e.y-1e8},i={x1:e.x,y1:e.y,x2:e.x,y2:e.y+1e8};return{top:ry(r,t,n),bottom:ry(i,t,n)}}}(rR,u,c);JSON.stringify(m)!==JSON.stringify(t)&&o({type:"overlay/dragUpdateInsertPosition",insertPosition:rx(i,m=t,c)})},A=()=>{k=!1,o({type:"overlay/dragEnd",target:s,insertPosition:m?rx(i,m,c):null,dragGroup:d,flow:c,preventInsertDefault:h}),S&&o({type:"overlay/dragToggleMinimapPrompt",display:!1}),rC||(clearInterval(E),l(),I(),M()),P()},R=e=>{"Shift"===e.key&&rC&&(rC=!1,o({type:"overlay/dragUpdateSkeleton",skeleton:rk(rR,r,1/w)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{rT(rA.y,v,rj,o,150,rP)},50),o({type:"overlay/dragUpdateGroupRect",groupRect:null}),k||(clearInterval(E),P(),I(),M(),l()))},j=()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{rT(rA.y,v,rj,o,150,rP).then(()=>{rC=!1})},50),clearInterval(E),P(),I(),M(),l()},P=()=>{window.removeEventListener("mousemove",C),window.removeEventListener("wheel",T),window.removeEventListener("mouseup",A)},M=()=>{window.removeEventListener("keyup",R)},I=()=>{window.removeEventListener("blur",j)};window.addEventListener("blur",j),window.addEventListener("keyup",R),window.addEventListener("wheel",T),window.addEventListener("mousemove",C),window.addEventListener("mouseup",A)}({element:b,handler:e,mouseEvent:t,overlayGroup:s,target:o,onSequenceStart:()=>{p=!0},onSequenceEnd:()=>{setTimeout(()=>{p=!1},250)}})},mousemove(e){k.mouseenter(e);let t=e.currentTarget;t&&(t.addEventListener("mouseenter",k.mouseenter),t.addEventListener("mouseleave",k.mouseleave))},mouseenter(){document.querySelector("vercel-live-feedback")&&b.closest("[data-vercel-edit-info]")||b.closest("[data-vercel-edit-target]")||(g.push(b),e({type:"element/mouseenter",id:E,rect:rh(b)}),w(b))},mouseleave(n){function r(){g.pop();let t=m();if(e({type:"element/mouseleave",id:E}),t){w(t);let n=a.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:rh(t)})}x(b)}let{relatedTarget:i}=n,o=rI(i),s=t.contains(o);if(rM(o)&&s)return function e(t){let n=i=>{let{relatedTarget:o}=i;rI(o)?o&&rM(o)&&(t.removeEventListener("mouseleave",n),e(o)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(o);r()}},E=rf(),_={type:c,id:E,elements:d,sanity:h,handlers:k};l.add(b),u.set(S,b),s.set(E,b),a.set(b,_),f?.observe(b),e({type:"element/register",elementType:c,id:E,element:b,rect:rh(b),sanity:h,dragDisabled:!!b.getAttribute("data-sanity-drag-disable"),targets:y.map(e=>({sanity:e.sanity,element:e.elements.element}))}),o&&v(_)}(d)}}function k(t){let n=a.get(t);if(n){let{id:r,handlers:i}=n;y(t,i),d.unobserve(t),a.delete(t),l.delete(t),s.delete(r),e({type:"element/unregister",id:r})}}function E(t){let n=a.get(t);n&&e({type:"element/updateRect",id:n.id,rect:rh(t)})}function _(e){if(o)for(let t of e){let{target:e}=t,n=rM(e)&&a.get(e);n&&(t.isIntersecting?v(n):b(n))}}function T(t){let n=rI(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}g=[],e({type:"overlay/blur"})}function C(){g=[],e({type:"overlay/reset-mouse-state"})}function A(){for(let e of l)E(e)}function R(t){"Escape"===t.key&&(g=[],e({type:"overlay/blur"}))}function j(e){let{target:t}=e;if(!(t===window.document||!rM(t)))for(let e of l)t.contains(e)&&E(e)}function P(){o||(f=new IntersectionObserver(_,{threshold:.3}
295),l.forEach(e=>f.observe(e)),e({type:"overlay/activate"}),o=!0)}function M(){o&&(f?.disconnect(),l.forEach(e=>{let t=a.get(e);t&&b(t)}),e({type:"overlay/deactivate"}),o=!1)}function I(t){let{id:n}=t.detail,r=s.get(n);if(!r)return;let i=a.get(r)?.sanity;i&&e({type:"element/click",id:n,sanity:i})}return window.document.fonts.ready.then(()=>{for(let e of l)E(e)}),window.addEventListener("click",T),window.addEventListener("contextmenu",T),window.addEventListener("sanity-overlay/exclusive-plugin-closed",C),window.addEventListener("sanity-overlay/label-click",I),window.addEventListener("keydown",R),window.addEventListener("resize",A),window.addEventListener("scroll",j,{capture:!0,passive:!0}),d=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(rM(e)){let t=u.get(e);if(!t)return;E(t)}}}),(h=new MutationObserver(function(e){let n=!1;for(let r of e){let{target:e,type:i}=r,o="characterData"===i?e.parentElement:e;if(!(o===t||t.contains(o))&&(n=!0,rM(o))){let e=o.parentElement?.closest("[data-sanity-edit-group]")||null;S({childNodes:[rM(e)?e:o]})}}if(n)for(let e of l)e.isConnected||k(e),a.get(e)?.type!=="group"||e.hasAttribute("data-sanity-edit-group")||k(e)})).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),S(document.body),P(),{activate:P,deactivate:M,destroy:function(){window.removeEventListener("click",T),window.removeEventListener("contextmenu",T),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",C),window.removeEventListener("sanity-overlay/label-click",I),window.removeEventListener("keydown",R),window.removeEventListener("resize",A),window.removeEventListener("scroll",j),h.disconnect(),d.disconnect(),l.forEach(e=>{k(e)}),s.clear(),l.clear(),g=[],M()}}}({handler:t,overlayElement:e,inFrame:n,inPopUp:r,optimisticActorReady:l}),()=>{a.current?.destroy(),a.current=void 0}},o=[e,t,n,r,l],s[0]=e,s[1]=t,s[2]=n,s[3]=r,s[4]=l,s[5]=i,s[6]=o):(i=s[5],o=s[6]),(0,t7.useEffect)(i,o),a}(d,t,a,l);return i[6]!==p.current||i[7]!==c?(n=()=>{c?p.current?.activate():p.current?.deactivate()},i[6]=p.current,i[7]=c,i[8]=n):n=i[8],i[9]!==p||i[10]!==c?(r=[p,c],i[9]=p,i[10]=c,i[11]=r):r=i[11],(0,t7.useEffect)(n,r),null};function u9(e){let t,n,r,i,o,s,a,l,u,c,d,f,h,p,g,m,y,v,b,S,k,E,_;let T=(0,x.c)(77),{comlink:C,comlinkStatus:A,componentResolver:R,inFrame:j,inPopUp:P,zIndex:M}=e,I=(0,ng.Bj)();T[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},T[0]=t):t=T[0];let[O,$]=(0,t7.useReducer)(uU,t),{contextMenu:z,dragInsertPosition:L,dragShowMinimap:N,dragShowMinimapPrompt:D,dragSkeleton:V,elements:F,isDragging:B,perspective:H,wasMaybeCollapsed:U,dragMinimapTransition:W,dragGroupRect:q}=O,[X,Y]=(0,t7.useState)(null),[G,Z]=(0,t7.useState)(!0);T[1]!==C?(n=()=>{let e=[C?.on("presentation/focus",e=>{$({type:"presentation/focus",data:e})}),C?.on("presentation/blur",e=>{$({type:"presentation/blur",data:e})}),C?.on("presentation/toggle-overlay",()=>{Z(cl)})].filter(Boolean);return()=>e.forEach(ca)},r=[C],T[1]=C,T[2]=n,T[3]=r):(n=T[2],r=T[3]),(0,t7.useEffect)(n,r),function(e,t){let n,r;let i=(0,x.c)(4);i[0]!==e||i[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(u1);let r=e?.on("presentation/perspective",e=>{t({type:"presentation/perspective",data:e})});return()=>{r?.(),n.abort()}},r=[e,t],i[0]=e,i[1]=t,i[2]=n,i[3]=r):(n=i[2],r=i[3]),(0,t7.useEffect)(n,r)}(C,$),function(e,t,n){let r,i,o;let s=(0,x.c)(7),a=(0,t7.useRef)(void 0);s[0]!==e?(r=(t,n)=>{e?.post("visual-editing/documents",{documents:t,perspective:n})},s[0]=e,s[1]=r):r=s[1];let l=r;s[2]!==t||s[3]!==n||s[4]!==l?(i=()=>{let e=t.map(u3).filter(u5),r=new Set(e.map(u2));if(!a.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,a.current.nodeIds)||n!==a.current.perspective){let t=Array.from(r).map(t=>{let{type:n,projectId:r,dataset:i}=e.find(e=>e.id===t);return r&&i?{_id:t,_type:n,_projectId:r,_dataset:i}:{_id:t,_type:n}});a.current={nodeIds:r,perspective:n},l(t,n)}},o=[t,n,l],s[2]=t,s[3]=n,s[4]=l,s[5]=i,s[6]=o):(i=s[5],o=s[6]),(0,t7.useEffect)(i,o)}(C,F,H),T[4]!==X?(i=(e,t)=>{X&&(X.style.setProperty("--drag-preview-x",`${e}px`),X.style.setProperty("--drag-preview-y",`${t-window.scrollY}px`))},T[4]=X,T[5]=i):i=T[5];let K=i;T[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=!1,t=t=>{cc(t)&&e&&(e=!1,Z(co))},n=t=>{if(cc(t)){if(t.ctrlKey||t.metaKey||t.shiftKey)return;e||(e=!0,Z(ci))}["mod","\\"].every(e=>cu[e]?t[cu[e]]:t.key===e.toUpperCase())&&Z(cr)}
295,r=()=>{e&&(e=!1,Z(cn))};return window.addEventListener("click",cs),window.addEventListener("keydown",n),window.addEventListener("keyup",t),window.addEventListener("blur",r),()=>{window.removeEventListener("click",cs),window.removeEventListener("keydown",n),window.removeEventListener("keyup",t),window.removeEventListener("blur",r)}},s=[Z],T[6]=o,T[7]=s):(o=T[6],s=T[7]),(0,t7.useEffect)(o,s);let[J,Q]=(0,t7.useState)(!1),[ee,et]=(0,t7.useState)(!1),en=(0,t7.useRef)(void 0);T[8]!==G?(a=()=>{if(G)return u6(()=>{Q(!0),u6(()=>{et(!0),en.current=setTimeout(()=>{et(!1),Q(!1)},1500)})});en.current&&(clearTimeout(en.current),(0,t7.startTransition)(()=>{Q(!1),et(!1)}))},l=[G],T[8]=G,T[9]=a,T[10]=l):(a=T[9],l=T[10]),(0,t7.useEffect)(a,l),T[11]!==F?(u=F.flatMap(ct),T[11]=F,T[12]=u):u=T[12];let er=u;T[13]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{$({type:"overlay/blur"})},T[13]=c):c=T[13];let ei=c,eo=nX(),es=eo?R:void 0,[ea,el]=(0,t7.useState)(!1);!ea&&j&&"connected"===A&&el(!0);t:{let t;if(B){let e;T[14]===Symbol.for("react.memo_cache_sentinel")?(e=[],T[14]=e):e=T[14],d=e;break t}T[15]!==C||T[16]!==es||T[17]!==W||T[18]!==N||T[19]!==F||T[20]!==j||T[21]!==B||T[22]!==eo||T[23]!==e.plugins||T[24]!==ea||T[25]!==U?(t=F.filter(ce).map(t=>{let{id:n,element:r,focused:i,hovered:o,rect:s,sanity:a,dragDisabled:l,targets:u,elementType:c}=t,d=!l&&!!r.getAttribute("data-sanity")&&eo&&F.some(e=>"id"in e.sanity&&"id"in a&&rU(e.sanity,a)&&e.sanity.path!==a.path);return(0,w.jsx)(u_,{comlink:C,componentResolver:es,plugins:e.plugins,element:r,enableScrollIntoView:!B&&!W&&!N,id:n,focused:i,hovered:o,node:a,rect:s,showActions:!ea,draggable:d,isDragging:B||W,wasMaybeCollapsed:i&&U,targets:u,elementType:c,inFrame:j},n)}),T[15]=C,T[16]=es,T[17]=W,T[18]=N,T[19]=F,T[20]=j,T[21]=B,T[22]=eo,T[23]=e.plugins,T[24]=ea,T[25]=U,T[26]=t):t=T[26],d=t}let eu=d,ec=I?"dark":"light",ed=ee?"":void 0,ef=J?"":void 0;return T[27]!==er||T[28]!==H?(f=(0,w.jsx)(u8,{documentIds:er,perspective:H}),T[27]=er,T[28]=H,T[29]=f):f=T[29],T[30]!==C||T[31]!==j||T[32]!==P||T[33]!==G||T[34]!==X||T[35]!==K?(h=(0,w.jsx)(u7,{comlink:C,dispatch:$,inFrame:j,inPopUp:P,onDrag:K,overlayEnabled:G,rootElement:X}),T[30]=C,T[31]=j,T[32]=P,T[33]=G,T[34]=X,T[35]=K,T[36]=h):h=T[36],T[37]!==z?(p=z&&(0,w.jsx)(uh,{...z,onDismiss:ei}),T[37]=z,T[38]=p):p=T[38],T[39]!==q||T[40]!==L||T[41]!==W||T[42]!==D||T[43]!==B?(g=B&&!W&&(0,w.jsxs)(w.Fragment,{children:[L&&(0,w.jsx)(uz,{dragInsertPosition:L}),D&&(0,w.jsx)(uB,{}),q&&(0,w.jsx)(u$,{dragGroupRect:q})]}),T[39]=q,T[40]=L,T[41]=W,T[42]=D,T[43]=B,T[44]=g):g=T[44],T[45]!==V||T[46]!==B?(m=B&&V&&(0,w.jsx)(uN,{skeleton:V}),T[45]=V,T[46]=B,T[47]=m):m=T[47],T[48]!==eu||T[49]!==ed||T[50]!==ef||T[51]!==f||T[52]!==h||T[53]!==p||T[54]!==g||T[55]!==m||T[56]!==M?(y=(0,w.jsxs)(u4,{"data-fading-out":ed,"data-overlays":ef,ref:Y,$zIndex:M,children:[f,h,p,eu,g,m]}
295),T[48]=eu,T[49]=ed,T[50]=ef,T[51]=f,T[52]=h,T[53]=p,T[54]=g,T[55]=m,T[56]=M,T[57]=y):y=T[57],T[58]!==C||T[59]!==y?(v=(0,w.jsx)(uK,{comlink:C,children:y}),T[58]=C,T[59]=y,T[60]=v):v=T[60],T[61]!==C||T[62]!==v?(b=(0,w.jsx)(uW,{comlink:C,children:v}),T[61]=C,T[62]=v,T[63]=b):b=T[63],T[64]!==C||T[65]!==F||T[66]!==b?(S=(0,w.jsx)(uY,{comlink:C,elements:F,children:b}),T[64]=C,T[65]=F,T[66]=b,T[67]=S):S=T[67],T[68]!==X||T[69]!==S?(k=(0,w.jsx)(ng.li,{children:(0,w.jsx)(ng.Xp,{element:X,children:S})}),T[68]=X,T[69]=S,T[70]=k):k=T[70],T[71]!==ec||T[72]!==k?(E=(0,w.jsx)(ng.f6,{scheme:ec,theme:ng.Lg,tone:"transparent",children:k}),T[71]=ec,T[72]=k,T[73]=E):E=T[73],T[74]!==C||T[75]!==E?(_=(0,w.jsx)(u0,{comlink:C,children:E}),T[74]=C,T[75]=E,T[76]=_):_=T[76],_}function ce(e){return e.activated||e.focused}function ct(e){return"id"in e.sanity?[e.sanity.id]:[]}function cn(e){return!e}function cr(e){return!e}function ci(e){return!e}function co(e){return!e}function cs(e){let t=e.target;if(((0,ng.bg)(t)||(0,ng.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 ca(e){return e()}function cl(e){return!e}let cu={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function cc(e){return"Alt"===e.key}function cd(e,t){return e.filter(e=>e!==t)}let cf=e=>{let t,n;let r=(0,x.c)(4),{comlink:i,refresh:o}=e,s=(0,t7.useRef)(0),a=(0,t7.useRef)(0);return r[0]!==i||r[1]!==o?(t=()=>i.on("presentation/refresh",e=>{if("manual"===e.source){clearTimeout(s.current);let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e);let n=!1;s.current=window.setTimeout(()=>{i.post("visual-editing/refreshed",e),n=!0},3e3),t?.finally?.(()=>{n||(clearTimeout(s.current),i.post("visual-editing/refreshed",e))})}else if("mutation"===e.source){clearTimeout(a.current);let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e),a.current=window.setTimeout(()=>{let t=o(e);!1!==t&&(i.post("visual-editing/refreshing",e),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e))},1e3),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e)}}),n=[i,o],r[0]=i,r[1]=o,r[2]=t,r[3]=n):(t=r[2],n=r[3]),(0,t7.useEffect)(t,n),null};function ch(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 cp(){console.warn("[@sanity/visual-editing] Package version mismatch detected: Please update your Sanity studio to prevent potential compatibility issues.")}function cg(){}let cm=e=>{let t,n,r,i,o,s,a,l;let u=(0,x.c)(23),{components:c,plugins:d,history:f,portal:h,refresh:p,zIndex:g}=e,m=void 0===h||h,[y,v]=(0,t7.useState)(null),[b,S]=(0,t7.useState)(null);u[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{(0,t7.startTransition)(()=>{v(t6()),S(t8())})},n=[],u[0]=t,u[1]=n):(t=u[0],n=u[1]),(0,t7.useEffect)(t,n);let[k,E]=(0,t7.useState)(null);u[2]!==m?(r=()=>{if(!1===m)return;let e=document.createElement("sanity-visual-editing");return document.documentElement.appendChild(e),(0,t7.startTransition)(()=>E(e)),()=>{(0,t7.startTransition)(()=>E(null)),document.documentElement.contains(e)&&document.documentElement.removeChild(e)}},i=[m],u[2]=m,u[3]=r,u[4]=i):(r=u[3],i=u[4]),(0,t7.useEffect)(r,i);let[_,T]=function(e){let t,n,r,i,o;let s=(0,x.c)(9),a=void 0===e||e,[l,u]=(0,t7.useState)(),[c,d]=(0,t7.useState)("idle");return s[0]!==a?(t=()=>{if(!a)return;let e=tQ({name:"visual-editing",connectTo:"presentation"},tJ().provide({actors:t4()})),t=e.onStatus(()=>d("connected"),"connected");(0,t7.startTransition)(()=>u(e));let n=e.start();return()=>{t(),n(),(0,t7.startTransition)(()=>u(void 0))}},n=[a],s[0]=a,s[1]=t,s[2]=n):(t=s[1],n=s[2]),(0,t7.useEffect)(t,n),s[3]!==c?(r=()=>{if("connected"===c)return;let e=new AbortController;return window.addEventListener("message",ch,{signal:e.signal}),()=>{e.abort()}},i=[c],s[3]=c,s[4]=r,s[5]=i):(r=s[4],i=s[5]),(0,t7.useEffect)(r,i),s[6]!==l||s[7]!==c?(o=[l,c],s[6]=l,s[7]=c,s[8]=o):o=s[8],o}(!0===y||!0===b);!function(e){let t,n;let r=(0,x.c)(3);r[0]!==e?(t=()=>{if(!e)return;let t=function(e){let t=new oc.t(1),n=new od.x;return e.fetch("visual-editing/snapshot-welcome",void 0,{suppressWarnings:!0}).then(e=>{t.next(e.event)}).catch(()=>{}
295),e.on("presentation/snapshot-event",e=>{"reconnect"===e.event.type&&t.next(e.event),"mutation"===e.event.type&&n.next(e.event)}),(0,of.T)(t,n)}(e),n=J(l7(e),{input:{client:{withConfig:cg},sharedListener:t}});n.start();let r=new AbortController;return e.fetch("visual-editing/features",void 0,{signal:r.signal,suppressWarnings:!0}).then(e=>{e.features.optimistic&&function(e){for(let t of(nI=e,nO))t()}(n)}).catch(cp),()=>{n.stop(),r.abort()}},n=[e],r[0]=e,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,t7.useEffect)(t,n)}("connected"===T?_:void 0),u[5]!==_||u[6]!==T||u[7]!==c||u[8]!==y||u[9]!==b||u[10]!==d||u[11]!==g?(o=null!==y&&null!==b&&(0,w.jsx)(u9,{comlink:_,comlinkStatus:T,componentResolver:c,plugins:d,inFrame:y,inPopUp:b,zIndex:g}),u[5]=_,u[6]=T,u[7]=c,u[8]=y,u[9]=b,u[10]=d,u[11]=g,u[12]=o):o=u[12],u[13]!==_||u[14]!==f||u[15]!==p?(s=_&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(l9,{comlink:_,history:f}),(0,w.jsx)(ue,{comlink:_}),p&&(0,w.jsx)(cf,{comlink:_,refresh:p})]}),u[13]=_,u[14]=f,u[15]=p,u[16]=s):s=u[16],u[17]!==o||u[18]!==s?(a=(0,w.jsxs)(w.Fragment,{children:[o,s]}),u[17]=o,u[18]=s,u[19]=a):a=u[19];let C=a;return!1!==m&&k?(u[20]!==C||u[21]!==k?(l=(0,t9.createPortal)(C,k),u[20]=C,u[21]=k,u[22]=l):l=u[22],l):C};cm.displayName="VisualEditing"},37057:function(e,t,n){"use strict";n.d(t,{BA:function(){return eh},aQ:function(){return h},fi:function(){return ed}});var r=n(11369);let i={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}},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"}}}},o={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}
295,{ascenderHeight:8,descenderHeight:8,fontSize:21,iconSize:33,lineHeight:31,letterSpacing:0}]}},s=new WeakMap;function a(e){let t=s.get(e);if(t)return t;let n=u(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:l(e,e.button.default),ghost:l(e,e.button.ghost),bleed:l(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:c(e.input.default),invalid:c(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:l(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 l(e,t){return{default:{enabled:u(e,t.default.enabled),hovered:u(e,t.default.hovered),pressed:u(e,t.default.pressed),selected:u(e,t.default.selected),disabled:u(e,t.default.disabled)},neutral:{enabled:u(e,t.default.enabled),hovered:u(e,t.default.hovered),pressed:u(e,t.default.pressed),selected:u(e,t.default.selected),disabled:u(e,t.default.disabled)},primary:{enabled:u(e,t.primary.enabled),hovered:u(e,t.primary.hovered),pressed:u(e,t.primary.pressed),selected:u(e,t.primary.selected),disabled:u(e,t.primary.disabled)},suggest:{enabled:u(e,t.primary.enabled),hovered:u(e,t.primary.hovered),pressed:u(e,t.primary.pressed),selected:u(e,t.primary.selected),disabled:u(e,t.primary.disabled)},positive:{enabled:u(e,t.positive.enabled),hovered:u(e,t.positive.hovered),pressed:u(e,t.positive.pressed),selected:u(e,t.positive.selected),disabled:u(e,t.positive.disabled)},caution:{enabled:u(e,t.caution.enabled),hovered:u(e,t.caution.hovered),pressed:u(e,t.caution.pressed),selected:u(e,t.caution.selected),disabled:u(e,t.caution.disabled)},critical:{enabled:u(e,t.critical.enabled),hovered:u(e,t.critical.hovered),pressed:u(e,t.critical.pressed),selected:u(e,t.critical.selected),disabled:u(e,t.critical.disabled)}}}function u(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},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 c(e){return{enabled:d(e.enabled),disabled:d(e.disabled),readOnly:d(e.readOnly),hovered:d(e.hovered)}}function d(e){return{bg:e.bg,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let f=new WeakMap;function h(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=f.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...i.avatar,...e.sanity.avatar},button:{...i.button,...e.sanity.button},card:i.card,color:a(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...i.input,...e.sanity.input,checkbox:{...i.input.checkbox,...e.sanity.input.checkbox},radio:{...i.input.radio,...e.sanity.input.radio},switch:{...i.input.switch,...e.sanity.input.switch}},layer:e.sanity.layer??i.layer,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return f.set(e,n),n}function p(e){return 2===e._version}let g=new WeakMap;function m(e,t,n){Object.defineProperty(e,t,{get(){let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!1,
295configurable:!1}),r},enumerable:!0,configurable:!0})}let y=new WeakMap,v=["transparent","default","primary","positive","caution","critical"];function b(e,t){let n={};for(let r of v)m(n,r,()=>{var n;return{base:{bg:(n=t[e][r]).bg,fg:n.fg,border:n.border,focusRing:n.focusRing,shadow:n.shadow},button:n.button,card:n.selectable.default,dark:n._dark,input:{default:x(n.input.default),invalid:x(n.input.invalid)},muted:{...n.button.ghost,transparent:n.button.ghost.default},solid:{...n.button.default,transparent:n.button.default.default},selectable:n.selectable,spot:{gray:n.avatar.gray.bg,blue:n.avatar.blue.bg,purple:n.avatar.purple.bg,magenta:n.avatar.magenta.bg,red:n.avatar.red.bg,orange:n.avatar.orange.bg,yellow:n.avatar.yellow.bg,green:n.avatar.green.bg,cyan:n.avatar.cyan.bg},syntax:n.syntax}});return n}function w(e){let t=y.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,font:s,input:a,media:l,radius:u,shadow:c,space:d,style:f}=e,h={};m(h,"light",()=>b("light",i)),m(h,"dark",()=>b("dark",i));let p={_version:0,avatar:n,button:r,container:o,color:h,focusRing:a.text.focusRing,fonts:s,input:a,media:l,radius:u,shadows:c,space:d,styles:f,v2:e};return y.set(e,p),p}function x(e){return{enabled:S(e.enabled),disabled:S(e.disabled),readOnly:S(e.readOnly),hovered:S(e.hovered)}}function S(e){return{bg:e.bg,bg2:e.muted.bg,border:e.border,fg:e.fg,placeholder:e.placeholder}}let k=["multiply","screen"],E=["transparent","default","neutral","primary","suggest","positive","caution","critical"],_=["default","neutral","primary","suggest","positive","caution","critical"],T=["enabled","hovered","pressed","selected","disabled"],C=["default","ghost","bleed"],A=["default","invali
295d"],R=["enabled","hovered","readOnly","disabled"];function j(e){return r.EZ.includes(e)}function P(e){return/^\d+%$/.test(e)}function M(e){let t=e.split("/"),n=t.shift()||"",[i,o]=n.split(" ");if(j(i)){let e=t.shift()||"";return P(o)?{type:"color",tint:i,mix:Number(o.slice(0,-1))/100}:I(e)?{type:"color",tint:i,opacity:Number(e)}:{type:"color",tint:i}}if("black"===i||"white"===i){let e=t.shift()||"";return P(o)?{type:"color",key:i,mix:Number(o.slice(0,-1))/100}:I(e)?{type:"color",key:i,opacity:Number(e)}:{type:"color",key:i}}if(r.mE.includes(i)){let[e,r]=(n=t.shift()||"").split(" ");if(j(e)){let n=t.shift()||"";return P(r)?{type:"color",hue:i,tint:e,mix:Number(r.slice(0,-1))/100}:I(n)?{type:"color",hue:i,tint:e,opacity:Number(n)}:{type:"color",hue:i,tint:e}}return{type:"hue",value:i}}if(k.includes(i))return{type:"blendMode",value:i}}function I(e){return"0"===e||/^0\.[0-9]+$/.test(e)||"1"===e}[...r.mE],[...E],[..._],[...T],[...A],[...R];let O=["500","500"];function $(e,t=O){var n;let r;let{hue:i,scheme:o}=e,s=M(t["light"===o?0:1]);if(!s||"color"!==s.type)throw Error(`Invalid color token: ${t[0]}`);return n={...s,hue:s.hue||i},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 z={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"]}}
295,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
295data:["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 L(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}function N(...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],i=t[n];L(r)&&L(i)?e[n]=N(r,i):e[n]=i}return e}function V(e,t){let{scheme:n}=e,r={};for(let e of E)m(r,e,()=>(function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{_blend:(i?._blend||["multiply","screen"])["light"===n?0:1],_dark:"dark"===n,accent:{fg:$(o,i?.accent?.fg)},avatar:F({scheme:n},i),backdrop:$(o,i?.backdrop),badge:H(i?.badge,{scheme:n},t),bg:$(o,i?.bg),border:$(o,i?.border),button:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of C)i[e]=function(e,t){let{cardTone:n,mode:r,scheme:i}=e,o={};for(let e of _)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:i,tone:o}=e,s={};for(let e of T)s[e]=function(e,t){let{cardTone:n,mode:r,tone:i,scheme:o,state:s}=e,a=t?.color?.base?.[n],l=t?.color?.button?.[r]?.[i]?.[s],u=l?._hue||a?._hue||"gray",c=l?._blend||["screen","multiply"],d={hue:u,scheme:o};return{_blend:c["light"===o?0:1],accent:{fg:$(d,l?.accent?.fg)},avatar:F({scheme:o},l),badge:H(l?.badge,{scheme:o},t),bg:$(d,l?.bg),border:$(d,l?.border),code:{bg:$(d,l?.code?.bg),fg:$(d,l?.code?.fg)},fg:$(d,l?.fg),icon:$(d,l?.icon),muted:{bg:$(d,l?.muted?.bg),fg:$(d,l?.muted?.fg)},kbd:{bg:$(d,l?.kbd?.bg),fg:$(d,l?.kbd?.fg),border:$(d,l?.kbd?.border)},link:{fg:$(d,l?.link?.fg)},skeleton:{from:$(d,l?.skeleton?.from),to:$(d,l?.skeleton?.to)}}}({cardTone:n,mode:r,tone:o,scheme:i,state:e},t);return s}({cardTone:n,mode:r,scheme:i,tone:e},t);return o}({cardTone:r,scheme:n,mode:e},t);return i}({scheme:n,tone:r},t),code:{bg:$(o,i?.code?.bg),fg:$(o,i?.code?.fg)},fg:$(o,i?.fg),focusRing:$(o,i?.focusRing),icon:$(o,i?.icon),input:function(e,t){let{scheme:n,tone:r}=e;return{default:U({mode:"default",scheme:n,tone:r},t),invalid:U({mode:"invalid",scheme:n,tone:r},t)}}({scheme:n,tone:r},t),kbd:{bg:$(o,i?.kbd?.bg),fg:$(o,i?.kbd?.fg),border:$(o,i?.kbd?.border)},link:{fg:$(o,i?.link?.fg)},muted:{bg:$(o,i?.muted?.bg),fg:$(o,i?.muted?.fg)},selectable:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of _)i[e]=function(e,t){let{cardTone:n,scheme:r,tone:i}=e,o={};for(let e of T)o[e]=function(e,t){let{cardTone:n,scheme:r,state:i,tone:o}=e,s=t?.color?.base?.[n],a=t?.color?.selectable?.[o]?.[i],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:r};return{_blend:u["light"===r?0:1],accent:{fg:$(c,a?.accent?.fg)},avatar:F({scheme:r},a),badge:H(a?.badge,{scheme:r},t),bg:$(c,a?.bg),border:$(c,a?.border),code:{bg:$(c,a?.code?.bg),fg:$(c,a?.code?.fg)},fg:$(c,a?.fg),icon:$(c,a?.icon),muted:{bg:$(c,a?.muted?.bg),fg:$(c,a?.muted?.fg)},kbd:{bg:$(c,a?.kbd?.bg),fg:$(c,a?.kbd?.fg),border:$(c,a?.kbd?.border)},link:{fg:$(c,a?.link?.fg)},skeleton:{from:$(c,a?.skeleton?.from),to:$(c,a?.skeleton?.to)}}}({cardTone:n,tone:i,scheme:r,state:e},t);return o}({cardTone:r,scheme:n,tone:e},t);return i}({scheme:n,tone:r},t),shadow:function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{outline:$(o,i?.shadow?.outline),umbra:$(o,i?.shadow?.umbra),penumbra:$(o,i?.shadow?.penumbra),ambient:$(o,i?.shadow?.ambient)}}
295({scheme:n,tone:r},t),skeleton:{from:$(o,i?.skeleton?.from),to:$(o,i?.skeleton?.to)},syntax:function(e,t){let{scheme:n}=e,r=t?.color?.syntax,i={hue:"gray",scheme:n};return{atrule:$(i,r?.atrule),attrName:$(i,r?.attrName),attrValue:$(i,r?.attrValue),attribute:$(i,r?.attribute),boolean:$(i,r?.boolean),builtin:$(i,r?.builtin),cdata:$(i,r?.cdata),char:$(i,r?.char),class:$(i,r?.class),className:$(i,r?.className),comment:$(i,r?.comment),constant:$(i,r?.constant),deleted:$(i,r?.deleted),doctype:$(i,r?.doctype),entity:$(i,r?.entity),function:$(i,r?.function),hexcode:$(i,r?.hexcode),id:$(i,r?.id),important:$(i,r?.important),inserted:$(i,r?.inserted),keyword:$(i,r?.keyword),number:$(i,r?.number),operator:$(i,r?.operator),prolog:$(i,r?.prolog),property:$(i,r?.property),pseudoClass:$(i,r?.pseudoClass),pseudoElement:$(i,r?.pseudoElement),punctuation:$(i,r?.punctuation),regex:$(i,r?.regex),selector:$(i,r?.selector),string:$(i,r?.string),symbol:$(i,r?.symbol),tag:$(i,r?.tag),unit:$(i,r?.unit),url:$(i,r?.url),variable:$(i,r?.variable)}}({scheme:n},t)}})({scheme:n,tone:e},t));return r}function F(e,t){let{scheme:n}=e;return{gray:B({color:"gray",scheme:n},t),blue:B({color:"blue",scheme:n},t),purple:B({color:"purple",scheme:n},t),magenta:B({color:"magenta",scheme:n},t),red:B({color:"red",scheme:n},t),orange:B({color:"orange",scheme:n},t),yellow:B({color:"yellow",scheme:n},t),green:B({color:"green",scheme:n},t),cyan:B({color:"cyan",scheme:n},t)}}function B(e,t){let{color:n,scheme:r}=e,i=t?.avatar?.[n],o={hue:i?._hue||"gray",scheme:r};return{_blend:(i?._blend||["screen","multiply"])["light"===r?0:1],bg:$(o,i?.bg),fg:$(o,i?.fg)}}function H(e,t,n){let{scheme:r}=t,i={};for(let t of _)i[t]=function(e,t,n){let{scheme:r,tone:i}=t,o=e?.[i],s={hue:o?._hue||n?.color?.base?.[i]?._hue||"gray",scheme:r};return{bg:$(s,o?.bg),fg:$(s,o?.fg),dot:$(s,o?.dot),icon:$(s,o?.icon)}}(e,{scheme:r,tone:t},n);return i}function U(e,t){let{mode:n,scheme:r,tone:i}=e;return{enabled:W({mode:n,scheme:r,state:"enabled",cardTone:i},t),hovered:W({mode:n,scheme:r,state:"hovered",cardTone:i},t),readOnly:W({mode:n,scheme:r,state:"readOnly",cardTone:i},t),disabled:W({mode:n,scheme:r,state:"disabled",cardTone:i},t)}}function W(e,t){let{cardTone:n,mode:r,scheme:i,state:o}=e,s=t?.color?.base?.[n],a=t?.color?.input?.[r]?.[o],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:i};return{_blend:u["light"===i?0:1],bg:$(c,a?.bg),border:$(c,a?.border),fg:$(c,a?.fg),muted:{bg:$(c,a?.muted?.bg)},placeholder:$(c,a?.placeholder)}}let q=r.$_;function X(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function Y(e,t,n,r,i){var o;return n*(1-(o=X((i-e)/(t-e))))+r*o}function G(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=G(X(Math.round(e.r),0,255)),n=G(X(Math.round(e.g),0,255)),r=G(X(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 J=/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,i=r*(1-Math.abs(e.h/60%2-1)),o=n-r/2,s=0,a=0,l=0;return 0<=e.h&&e.h<60?(s=r,a=i,l=0):60<=e.h&&e.h<120?(s=i,a=r,l=0):120<=e.h&&e.h<180?(s=0,a=r,l=i):180<=e.h&&e.h<240?(s=0,a=i,l=r):240<=e.h&&e.h<300?(s=i,a=0,l=r):300<=e.h&&e.h<360&&(s=r,a=0,l=i),{r:Math.round((s+o)*255),g:Math.round((a+o)*255),b:Math.round((l+o)*255)}}(function(e){let t=J.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 ee=[0,255];function et(e,t){let{bg:n,blendMode:r,colorPalette:i}=t;if("white"===n)throw Error("Cannot blend with white background");let o=M(e);if(!o||"color"!==o.type)throw Error(`Invalid color token value: ${e}`);let s="";if("black"===o.key&&(s=en(i.black)),"white"===o.key&&(s=en(i.white)),o.hue&&o.tint&&(s=en(i[o.hue][o.tint])),!s)throw Error(`Invalid color token value: ${e}`);let a=s,l={blendMode:r,bg:n,black:en(i.black),white:en(i.white)};try{if(s=function(e,t){var n,r,i,o,s,a,l,u,c;let{blendMode:d}=t,f=Q(e),h=Q(t.black),p=Q(t.white),g=t.bg?Q(t.bg):"multiply"===d?p:h,m={r:[h.r,p.r],g:[h.g,p.g],b:[h.b,p.b]},y={r:X(Y(...m.r,...ee,g.r),...ee),g:X(Y(...m.g,...ee,g.g),...ee),b:X(Y(...m.b,...ee,g.b),...ee)},v={r:X(Y(...m.r,...ee,f.r),...ee),g:X(Y(...m.g,...ee,f.g),...ee),b:X(Y(...m.b,...ee,f.b),...ee)},b="multiply"===d?{r:255*(n=y.r/255,v.r/255*n),g:255*(r=y.g/255,v.g/255*r),b:255*(i=y.b/255,v.b/255*i)}:{r:255*((o=y.r/255)+(s=v.r/255)-o*s),g:255*((a=y.g/255)+(l=v.g/255)-a*l),b:255*((u=y.b/255)+(c=v.b/255)-u*c)};return K({r:X(Y(...ee,...m.r,b.r),...m.r),g:X(Y(...ee,...m.g,b.g),...m.g),b:X(Y(...ee,...m.b,b.b),...m.b)})}(s,l),n&&void 0!==o.mix){var u,c,d,f,h,p,g;let e=Z(n),t=Z(s);s=K((u=o.mix,{r:(c=e.r,d=t.r,c+(d-c)*u),g:(f=e.g,h=t.g,f+(h-f)*u),b:(p=e.b,g=t.b,p+(g-p)*u)}))}}catch(e){throw console.warn("could not blend",s,l),e}
295return"#aN"===s&&(console.warn(`invalid color token value: ${e}`),s=a),void 0!==o.opacity&&(s=function(e,t){let n=Q(e);return`rgba(${n.r},${n.g},${n.b},${t})`}(s,o.opacity)),s}function en(e){return"string"==typeof e?e:e.hex}function er(e,t){let n=ei(t.default,{colorPalette:e}),r=n.bg;if("white"===r)throw Error("Cannot blend with white background");let i={default:n};for(let n of E){if("default"===n)continue;let o="transparent"===n?{colorPalette:e}:{bg:r,colorPalette:e};m(i,n,()=>ei(t[n],o))}return i}function ei(e,t){var n,r,i,o;let{colorPalette:s,bg:a}=t,l=e._blend||"multiply",u=et(e.bg,{colorPalette:s,bg:a,blendMode:l}),c={colorPalette:s,bg:u,blendMode:l},d=(n=e.button,r={baseBg:u,blendMode:l,colorPalette:s},{default:ea(n.default,r),ghost:ea(n.ghost,r),bleed:ea(n.bleed,r)}),f=function(e,t){let n={};for(let i of _){var r;n[i]={enabled:el((r=e[i]).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:s,baseBg:u,blendMode:l}),h={outline:et(e.shadow.outline,c),umbra:et(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),penumbra:et(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),ambient:et(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}})};return{_blend:l,_dark:e._dark,accent:{fg:et(e.accent.fg,c)},avatar:eo(e.avatar,{baseBg:u,colorPalette:s,blendMode:l}),backdrop:et(e.backdrop,c),badge:es(e.badge,{baseBg:u,colorPalette:s,blendMode:l}),bg:u,border:et(e.border,c),button:d,code:{bg:et(e.code.bg,c),fg:et(e.code.fg,c)},fg:et(e.fg,c),focusRing:et(e.focusRing,c),icon:et(e.icon,c),input:(i=e.input,o={baseBg:u,colorPalette:s,blendMode:l},{default:eu(i.default,o),invalid:eu(i.invalid,o)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=et(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,fg:et(e.fg,s),border:et(e.border,s)}}(e.kbd,{baseBg:u,colorPalette:s,blendMode:l}),link:{fg:et(e.link.fg,c)},muted:{bg:et(e.muted.bg,c),fg:et(e.muted.fg,c)},shadow:h,skeleton:{from:et(e.skeleton.from,c),to:et(e.skeleton.to,c)},syntax:function(e,t){let{colorPalette:n,baseBg:r,blendMode:i}=t,o={colorPalette:n,bg:r,blendMode:i};return{atrule:et(e.atrule,o),attrName:et(e.attrName,o),attrValue:et(e.attrValue,o),attribute:et(e.attribute,o),boolean:et(e.boolean,o),builtin:et(e.builtin,o),cdata:et(e.cdata,o),char:et(e.char,o),class:et(e.class,o),className:et(e.className,o),comment:et(e.comment,o),constant:et(e.constant,o),deleted:et(e.deleted,o),doctype:et(e.doctype,o),entity:et(e.entity,o),function:et(e.function,o),hexcode:et(e.hexcode,o),id:et(e.id,o),important:et(e.important,o),inserted:et(e.inserted,o),keyword:et(e.keyword,o),number:et(e.number,o),operator:et(e.operator,o),prolog:et(e.prolog,o),property:et(e.property,o),pseudoClass:et(e.pseudoClass,o),pseudoElement:et(e.pseudoElement,o),punctuation:et(e.punctuation,o),regex:et(e.regex,o),selector:et(e.selector,o),string:et(e.string,o),symbol:et(e.symbol,o),tag:et(e.tag,o),unit:et(e.unit,o),url:et(e.url,o),variable:et(e.variable,o)}}(e.syntax,{baseBg:u,colorPalette:s,blendMode:l}),selectable:f}}function eo(e,t){let n={};for(let i of r.mE)n[i]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=et(e.bg,{bg:n,blendMode:r,colorPalette:i});return{_blend:o,bg:s,fg:et(e.fg,{bg:s,blendMode:o,colorPalette:i})}}(e[i],t);return n}function es(e,t){let n={};for(let r of _)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=et(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,dot:et(e.dot,s),fg:et(e.fg,s),icon:et(e.icon,s)}}(e[r],t);return n}function ea(e,t){let n={};for(let i of _){var r;n[i]={enabled:el((r=e[i]).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:i}=t,o=e._blend||"multiply",s=et(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:s,blendMode:o,colorPalette:i};return{_blend:o,accent:{fg:et(e.accent.fg,a)},avatar:eo(e.avatar,{baseBg:s,colorPalette:i,blendMode:o}),badge:es(e.badge,{baseBg:s,colorPalette:i,blendMode:o}),bg:s,border:et(e.border,a),code:{bg:et(e.code.bg,a),fg:et(e.code.fg,a)},fg:et(e.fg,a),icon:et(e.icon,a),link:{fg:et(e.link.fg,a)},muted:{bg:et(e.muted.bg,a),fg:et(e.muted.fg,a)},kbd:{bg:et(e.kbd.bg,a),fg:et(e.kbd.fg,a),border:et(e.kbd.border,a)},skeleton:{from:et(e.skeleton?.from,a),to:et(e.skeleton?.to,a)}}}function eu(e,t){return{enabled:ec(e.enabled,t),hovered:ec(e.hovered,t),readOnly:ec(e.readOnly,t),disabled:ec(e.disabled,t)}}function ec(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=et(e.bg,{colorPalette:i,bg:n,blendMode:r}),a={colorPalette:i,bg:s,blendMode:o};return{_blend:o,bg:s,border:et(e.border,a),fg:et(e.fg,a),muted:{bg:et(e.muted.bg,a)},placeholder:et(e.placeholder,a)}}function ed(e){let t=function(e){let t={color:function(e){let t=N(z,e);return{base:function(e){let t={};for(let n of E)t[n]=function(e,t){let n=N(e?.base?.["*"],e?.base?.[t]),i=n._hue||e?.base?.[t]?._hue||"gray";return{...n,_hue:i,avatar:r.mE.reduce((e,t)=>
295({...e,[t]:N({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:_.reduce((t,r)=>({...t,[r]:{_hue:e?.base?.[r]?._hue||i,...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 i of _)n[i]=function(e,t,n){let i={};for(let o of T)i[o]=function(e,t,n,i){let o=N(e?.button?.[n]?.["*"]?.["*"],e?.button?.[n]?.[t]?.["*"],e?.button?.[n]?.["*"]?.[i],e?.button?.[n]?.[t]?.[i]),s=o._hue||e?.base?.[t]?._hue;return{...o,_hue:s,avatar:r.mE.reduce((e,t)=>({...e,[t]:N({_hue:t},o.avatar?.["*"],o.avatar?.[t])}),{}),badge:_.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||s,...o.badge?.["*"],...o.badge?.[n]}}),{})}}(e,n,t,o);return i}(e,t,i);return n}(e,n);return t}(t),input:function(e){let t={};for(let n of A)t[n]=function(e,t){let n={};for(let r of R)n[r]=function(e,t,n){let r=N(e?.input?.["*"]?.["*"],e?.input?.[t]?.["*"],e?.input?.["*"]?.[n],e?.input?.[t]?.[n]),i=r._hue||e?.input?.[t]?._hue;return{...r,_hue:i}}(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 i of T)n[i]=function(e,t,n){let i=N(e?.selectable?.["*"]?.["*"],e?.selectable?.[t]?.["*"],e?.selectable?.["*"]?.[n],e?.selectable?.[t]?.[n]),o=i._hue||e?.base?.[t]?._hue;return{...i,_hue:o,avatar:r.mE.reduce((e,t)=>({...e,[t]:N({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:_.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||o,...i.badge?.["*"],...i.badge?.[n]}}),{})}}(e,t,i);return n}(e,n);return t}(t),syntax:t.syntax}}(e?.color)},n={};return m(n,"light",()=>V({scheme:"light"},t)),m(n,"dark",()=>V({scheme:"dark"},t)),n}(e);return w({_version:2,avatar:e?.avatar??i.avatar,button:e?.button??i.button,card:e?.card??i.card,color:function(e,t){let n=t?.palette??q,r={};return m(r,"light",()=>er(n,e.light)),m(r,"dark",()=>er(n,e.dark)),r}(t,e),container:e?.container??i.container,font:e?.font??o,input:e?.input??i.input,layer:e?.layer??i.layer,media:e?.media??i.media,radius:e?.radius??i.radius,shadow:e?.shadow??i.shadow,space:e?.space??i.space,style:e?.style??i.style})}let ef=new Map;function eh(e,t,n){var r;let o=function(e,t,n){let r=ef.get(t);if(!r)return;let i=r.get(n);if(i)return i.get(e)}(e,t,n);if(o)return o;let s=p(e)?w(e):e,l=p(e)?e:function(e){if(e.v2)return e.v2;let t=g.get(e);if(t)return t;let{avatar:n,button:r,color:o,container:s,fonts:l,input:u,layer:c,media:d,radius:f,shadows:h,space:p,styles:m}=e,y={_version:2,avatar:{...i.avatar,...n},button:{...i.button,...r},card:i.card,color:{light:{transparent:a(o.light.transparent),default:a(o.light.default),neutral:a(o.light.transparent),primary:a(o.light.primary),suggest:a(o.light.primary),positive:a(o.light.positive),caution:a(o.light.caution),critical:a(o.light.critical)},dark:{transparent:a(o.dark.transparent),default:a(o.dark.default),neutral:a(o.dark.transparent),primary:a(o.dark.primary),suggest:a(o.dark.primary),positive:a(o.dark.positive),caution:a(o.dark.caution),critical:a(o.dark.critical)}},container:s,font:l,input:{...i.input,...u,checkbox:{...i.input.checkbox,...u.checkbox},radio:{...i.input.radio,...u.radio},switch:{...i.input.switch,...u.switch}},layer:c??i.layer,media:d,radius:f,shadow:h,space:p,style:m};return g.set(e,y),y}(e),u=s.layer||i.layer,c=l.color[t]||l.color.light,d="neutral"in(r=c[n]||c.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}},f=l.layer||i.layer,{color:h,...y}=s,v={...y,layer:u,v2:{...l,_resolved:!0,color:d,layer:f}};m(v,"color",()=>{let e=s.color[t]||s.color.light;return e[n]||e.default});let b={sanity:v};return function(e,t,n,r){ef.has(t)||ef.set(t,new Map);let i=ef.get(t);i.has(n)||i.set(n,new WeakMap),i.get(n).set(e,r)}(e,t,n,b),b}},98882:function(e,t,n){"use strict";n.d(t,{M:function(){return b}});var r=n(27573),i=n(7653),o=n(50728),s=n(2415),a=n(98739),l=n(14),u=n(79240),c=n(11668);function d(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class f extends i.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=(0,u.R)(e)&&e.offsetHeight||0,i=this.props.sizeRef.current;i.height=t.offsetHeight||0,i.width=t.offsetWidth||0,i.top=t.offsetTop,i.left=t.offsetLeft,i.right=n-i.width-i.left,i.bottom=r-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function h(e){var t,n;let{children:o,isPresent:s,anchorX:a,anchorY:l,root:u}=e,h=(0,i.useId)(),p=(0,i.useRef)(null),g=(0,i.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:m}=(0,i.useContext)(c._),y=function(...e){return i.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=d(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():d(e[t],null)}}}}(...e),e)}(p,null!==(n=null===(t=o.props)||void 0===t?void 0:t.ref)&&void 0!==n?n:null==o?void 0:o.ref);return(0,i.useInsertionEffect)(()=>{let{width:e,height:t,top:n,left:r,right:i,bottom:o}=g.current;if(s||!p.current||!e||!t)return;p.current.dataset.motionPopId=h;let c=document.createElement("style");m&&(c.nonce=m);let d=null!=u?u:document.head;return d.appendChild(c),c.sheet&&c.sheet.insertRule('\n [data-motion-pop-id="'.concat(h,'"] {\n position: absolute !important;\n width: ').concat(e,"px !important;\n height: ").concat(t,"px !important;\n ").concat("left"===a?"left: ".concat(r):"right: ".concat(i),"px !important;\n ").concat("bottom"===l?"bottom: ".concat(o):"top: ".concat(n),"px !important;\n }\n ")),()=>{d.contains(c)&&d.removeChild(c)}},[s]),(0,r.jsx)(f,{isPresent:s,childRef:p,sizeRef:g,children:i.cloneElement(o,{ref:y})})}let p=e=>{let{children:t,initial:n,isPresent:o,onExitComplete:a,custom:u,presenceAffectsLayout:c,mode:d,anchorX:f,anchorY:p,root:m}=e,y=(0,s.h)(g),v=(0,i.useId)(),b=!0,w=(0,i.useMemo)(()=>(b=!1,{id:v,initial:n,isPresent:o,custom:u,onExitComplete:e=>
295{for(let t of(y.set(e,!0),y.values()))if(!t)return;a&&a()},register:e=>(y.set(e,!1),()=>y.delete(e))}),[o,y,a]);return c&&b&&(w={...w}),(0,i.useMemo)(()=>{y.forEach((e,t)=>y.set(t,!1))},[o]),i.useEffect(()=>{o||y.size||!a||a()},[o]),"popLayout"===d&&(t=(0,r.jsx)(h,{isPresent:o,anchorX:f,anchorY:p,root:m,children:t})),(0,r.jsx)(l.O.Provider,{value:w,children:t})};function g(){return new Map}var m=n(19235);let y=e=>e.key||"";function v(e){let t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}let b=e=>{let{children:t,custom:n,initial:l=!0,onExitComplete:u,presenceAffectsLayout:c=!0,mode:d="sync",propagate:f=!1,anchorX:h="left",anchorY:g="top",root:b}=e,[w,x]=(0,m.oO)(f),S=(0,i.useMemo)(()=>v(t),[t]),k=f&&!w?[]:S.map(y),E=(0,i.useRef)(!0),_=(0,i.useRef)(S),T=(0,s.h)(()=>new Map),C=(0,i.useRef)(new Set),[A,R]=(0,i.useState)(S),[j,P]=(0,i.useState)(S);(0,a.L)(()=>{E.current=!1,_.current=S;for(let e=0;e<j.length;e++){let t=y(j[e]);k.includes(t)?(T.delete(t),C.current.delete(t)):!0!==T.get(t)&&T.set(t,!1)}},[j,k.length,k.join("-")]);let M=[];if(S!==A){let e=[...S];for(let t=0;t<j.length;t++){let n=j[t],r=y(n);k.includes(r)||(e.splice(t,0,n),M.push(n))}return"wait"===d&&M.length&&(e=M),P(v(e)),R(S),null}let{forceRender:I}=(0,i.useContext)(o.p);return(0,r.jsx)(r.Fragment,{children:j.map(e=>{let t=y(e),i=(!f||!!w)&&(S===j||k.includes(t));return(0,r.jsx)(p,{isPresent:i,initial:(!E.current||!!l)&&void 0,custom:n,presenceAffectsLayout:c,mode:d,root:b,onExitComplete:i?void 0:()=>{if(C.current.has(t)||(C.current.add(t),!T.has(t)))return;T.set(t,!0);let e=!0;T.forEach(t=>{t||(e=!1)}),e&&(null==I||I(),P(_.current),f&&(null==x||x()),u&&u())},anchorX:h,anchorY:g,children:e},t)})})}},19235:function(e,t,n){"use strict";n.d(t,{oO:function(){return o}});var r=n(7653),i=n(14);function o(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,r.useContext)(i.O);if(null===t)return[!0,null];let{isPresent:n,onExitComplete:o,register:s}=t,a=(0,r.useId)();(0,r.useEffect)(()=>{if(e)return s(a)},[e]);let l=(0,r.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!n&&o?[!1,l]:[!0]}},50728:function(e,t,n){"use strict";n.d(t,{p:function(){return r}});let r=(0,n(7653).createContext)({})},11668:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});let r=(0,n(7653).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},14:function(e,t,n){"use strict";n.d(t,{O:function(){return r}});let r=(0,n(7653).createContext)(null)},53528:function(e,t,n){"use strict";n.d(t,{E:function(){return nC}});var r,i=n(99478),o=n(32066),s=n(7653);let a=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function l(e){if("string"!=typeof e||e.includes("-"));else if(a.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var u=n(27573),c=n(50728);let d=(0,s.createContext)({strict:!1});var f=n(11668);let h=(0,s.createContext)({});var p=n(12193),g=n(80007);function m(e){return Array.isArray(e)?e.join(" "):e}var y=n(30876),v=n(86311),b=n(86191);let w=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function x(e,t,n){for(let r in t)(0,y.i)(t[r])||(0,v.jF)(r,n)||(e[r]=t[r])}var S=n(24406),k=n(17489);let E=()=>({...w(),attrs:{}}),_=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function T(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_.has(e)}let C=e=>!T(e);try{r=require("@emotion/is-prop-valid").default,"function"==typeof r&&(C=e=>e.startsWith("on")?!T(e):r(e))}catch{}var A=n(90767);function R(e){return(0,y.i)(e)?e.get():e}var j=n(8012),P=n(72583),M=n(14),I=n(2415);let O=e=>(t,n)=>{let r=(0,s.useContext)(h),i=(0,s.useContext)(M.O),o=()=>(function(e,t,n,r){let{scrapeMotionValuesFromProps:i,createRenderState:o}=e;return{latestValues:function(e,t,n,r){let i={},o=r(e,{});for(let e in o)i[e]=R(o[e]);let{initial:s,animate:a}=e,l=(0,p.G)(e),u=(0,p.M)(e);t&&u&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let c=!!n&&!1===n.initial,d=(c=c||!1===s)?a:s;if(d&&"boolean"!=typeof d&&!(0,j.H)(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=(0,P.o)(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}
295(t,n,r,i),renderState:o()}})(e,t,r,i);return n?o():(0,I.h)(o)},$=O({scrapeMotionValuesFromProps:A.U,createRenderState:w}),z=O({scrapeMotionValuesFromProps:n(20791).U,createRenderState:E});var L=n(80226),N=n(95690);let D={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},V=!1;function F(){return!function(){if(V)return;let e={};for(let t in D)e[t]={isEnabled:e=>D[t].some(t=>!!e[t])};(0,N.v7)(e),V=!0}(),(0,N.uN)()}let B=Symbol.for("motionComponentSymbol");var H=n(96550);let U=(0,s.createContext)({});function W(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}var q=n(98739);function X(e){var t,n;let{forwardMotionProps:r=!1,type:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;o&&function(e){let t=F();for(let n in e)t[n]={...t[n],...e[n]};(0,N.v7)(t)}(o);let v=i?"svg"===i:l(e),_=v?z:$;function A(t,n){let i;let o={...(0,s.useContext)(f._),...t,layoutId:function(e){let{layoutId:t}=e,n=(0,s.useContext)(c.p).id;return n&&void 0!==t?n+"-"+t:t}(t)},{isStatic:A}=o,R=function(e){let{initial:t,animate:n}=function(e,t){if((0,p.G)(e)){let{initial:t,animate:n}=e;return{initial:!1===t||(0,g.$)(t)?t:void 0,animate:(0,g.$)(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,s.useContext)(h));return(0,s.useMemo)(()=>({initial:t,animate:n}),[m(t),m(n)])}(t),j=_(t,A);if(!A&&L.j){(0,s.useContext)(d).strict;let t=function(e){let{drag:t,layout:n}=F();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(o);i=t.MeasureLayout,R.visualElement=function(e,t,n,r,i,o){var a,l,u,c;let{visualElement:p}=(0,s.useContext)(h),g=(0,s.useContext)(d),m=(0,s.useContext)(M.O),y=(0,s.useContext)(f._).reducedMotion,v=(0,s.useRef)(null),b=(0,s.useRef)(!1);r=r||g.renderer,!v.current&&r&&(v.current=r(e,{visualState:t,parent:p,props:n,presenceContext:m,blockInitialAnimation:!!m&&!1===m.initial,reducedMotionConfig:y,isSVG:o}),b.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));let w=v.current,x=(0,s.useContext)(U);w&&!w.projection&&i&&("html"===w.type||"svg"===w.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&W(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}(v.current,n,i,x);let S=(0,s.useRef)(!1);(0,s.useInsertionEffect)(()=>{w&&S.current&&w.update(n,m)});let k=n[H.M],E=(0,s.useRef)(!!k&&!(null===(a=(l=window).MotionHandoffIsComplete)||void 0===a?void 0:a.call(l,k))&&(null===(u=(c=window).MotionHasOptimisedAnimation)||void 0===u?void 0:u.call(c,k)));return(0,q.L)(()=>{b.current=!0,w&&(S.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),E.current&&w.animationState&&w.animationState.animateChanges())}),(0,s.useEffect)(()=>{w&&(!E.current&&w.animationState&&w.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var e,t;null===(e=(t=window).MotionHandoffMarkAsComplete)||void 0===e||e.call(t,k)}),E.current=!1),w.enteringChildren=void 0)}),w}(e,j,o,a,t.ProjectionNode,v)}return(0,u.jsxs)(h.Provider,{value:R,children:[i&&R.visualElement?(0,u.jsx)(i,{visualElement:R.visualElement,...o}):null,function(e,t,n,r,i){let{latestValues:o}=r,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],u=arguments.length>6?arguments[6]:void 0,c=((null!=u?u:l(e))?function(e,t,n,r){let i=(0,s.useMemo)(()=>{let n=E();return(0,S.i)(n,t,(0,k.a)(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};x(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let n={},r=function(e,t){let n=e.style||{},r={};return x(r,n,e),Object.assign(r,function(e,t){let{transformTemplate:n}=e;return(0,s.useMemo)(()=>{let e=w();return(0,b.r)(e,t,n),Object.assign({},e.vars,e.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTa
295p||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n})(t,o,i,e),d=function(e,t,n){let r={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(C(i)||!0===n&&T(i)||!t&&!T(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,a),f=e!==s.Fragment?{...d,...c,ref:n}:{},{children:h}=t,p=(0,s.useMemo)(()=>(0,y.i)(h)?h.get():h,[h]);return(0,s.createElement)(e,{...f,children:p})}(e,t,function(e,t,n){let r=(0,s.useRef)(n);(0,s.useInsertionEffect)(()=>{r.current=n});let i=(0,s.useRef)(null);return(0,s.useCallback)(n=>{if(n){var o;null===(o=e.onMount)||void 0===o||o.call(e,n)}t&&(n?t.mount(n):t.unmount());let s=r.current;if("function"==typeof s){if(n){let e=s(n);"function"==typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):s(n)}else s&&(s.current=n)},[t])}(j,R.visualElement,n),j,A,r,v)]})}A.displayName="motion.".concat("string"==typeof e?e:"create(".concat(null!==(n=null!==(t=e.displayName)&&void 0!==t?t:e.name)&&void 0!==n?n:"",")"));let R=(0,s.forwardRef)(A);return R[B]=e,R}class Y{constructor(e){this.isMounted=!1,this.node=e}update(){}}var G=n(78037),Z=n(324);function K(e,t,n,r=0,i=1){let o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,a=(s-1)*r;return"function"==typeof n?n(o,s):1===i?o*r:a-o*r}function J(e,t,n={}){let r=(0,G.x)(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let o=r?()=>Promise.all((0,Z.w)(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,i=0,o=1,s){let a=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),a.push(J(l,t,{...s,delay:n+("function"==typeof r?0:r)+K(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}(e,t,r,o,s,a,n)}:()=>Promise.resolve(),{when:a}=i;if(!a)return Promise.all([o(),s(n.delay)]);{let[e,t]="beforeChildren"===a?[o,s]:[s,o];return e().then(()=>t())}}var Q=n(74483);let ee=Q.V.length;var et=n(68494);function en(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}let er=[...Q.e].reverse(),ei=Q.e.length;function eo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function es(){return{animate:eo(!0),whileInView:eo(),whileHover:eo(),whileTap:eo(),whileDrag:eo(),whileFocus:eo(),exit:eo()}}class ea extends Y{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>J(e,t,n)));else if("string"==typeof t)r=J(e,t,n);else{let i="function"==typeof t?(0,G.x)(e,t,n.custom):t;r=Promise.all((0,Z.w)(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=es(),r=!0,i=t=>(n,r)=>{let i=(0,G.x)(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(o){let{props:s}=e,a=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<ee;e++){let r=Q.V[e],i=t.props[r];((0,g.$)(i)||!1===i)&&(n[r]=i)}return n}(e.parent)||{},l=[],u=new Set,c={},d=1/0;for(let t=0;t<ei;t++){var f;let h=er[t],p=n[h],m=void 0!==s[h]?s[h]:a[h],y=(0,g.$)(m),v=h===o?p.isActive:null;!1===v&&(d=t);let b=m===a[h]&&m!==s[h]&&y;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),p.protectedKeys={...c},!p.isActive&&null===v||!m&&!p.prevProp||(0,j.H)(m)||"boolean"==typeof m)continue;let w=(f=p.prevProp,"string"==typeof m?m!==f:!!Array.isArray(m)&&!en(m,f)),x=w||h===o&&p.isActive&&!b&&y||t>d&&y,S=!1,k=Array.isArray(m)?m:[m],E=k.reduce(i(h),{});!1===v&&(E={});let{prevResolvedValues:_={}}=p,T={..._,...E},C=t=>{x=!0,u.has(t)&&(S=!0,u.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=E[e],n=_[e];
295if(!c.hasOwnProperty(e))((0,et.C)(t)&&(0,et.C)(n)?en(t,n):t===n)?void 0!==t&&u.has(e)?C(e):p.protectedKeys[e]=!0:null!=t?C(e):u.add(e)}p.prevProp=m,p.prevResolvedValues=E,p.isActive&&(c={...c,...E}),r&&e.blockInitialAnimation&&(x=!1);let A=b&&w,R=!A||S;x&&R&&l.push(...k.map(t=>{let n={type:h};if("string"==typeof t&&r&&!A&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=(0,G.x)(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=K(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if("boolean"!=typeof s.initial){let n=(0,G.x)(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let h=!!l.length;return r&&(!1===s.initial||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=es()}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();(0,j.H)(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let el=0;class eu extends Y{constructor(){super(...arguments),this.id=el++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}var ec=n(19676),ed=n(28665);let ef={x:!1,y:!1};function eh(e){return[e("x"),e("y")]}var ep=n(58207),eg=n(37600);function em(e){return e.max-e.min}function ey(e,t,n,r=.5){e.origin=r,e.originPoint=(0,eg.t)(t.min,t.max,e.origin),e.scale=em(n)/em(t),e.translate=(0,eg.t)(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function ev(e,t,n,r){ey(e.x,t.x,n.x,r?r.originX:void 0),ey(e.y,t.y,n.y,r?r.originY:void 0)}function eb(e,t,n){e.min=n.min+t.min,e.max=e.min+em(t)}function ew(e,t,n){e.min=t.min-n.min,e.max=e.min+em(t)}function ex(e,t,n){ew(e.x,t.x,n.x),ew(e.y,t.y,n.y)}var eS=n(4238),ek=n(37670),eE=n(30270),e_=n(4903),eT=n(94502);let eC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eA(e){return eC.has(e.tagName)||!0===e.isContentEditable}function eR(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var ej=n(11151);let eP=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function eM(e){return{point:{x:e.pageX,y:e.pageY}}}let eI=e=>t=>eP(t)&&e(t,eM(t));function eO(e,t,n,r){return eR(e,t,eI(n),r)}let e$=({current:e})=>e?e.ownerDocument.defaultView:null;var ez=n(47857),eL=n(53348);let eN=(e,t)=>Math.abs(e-t),eD=new Set(["auto","scroll"]);class eV{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=eH(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,i=(e=n.offset,t={x:0,y:0},Math.sqrt(eN(e.x,t.x)**2+eN(e.y,t.y)**2)>=this.distanceThreshold);if(!r&&!i)return;let{point:o}=n,{timestamp:s}=eS.frameData;this.history.push({...o,timestamp:s});let{onStart:a,onMove:l}=this.handlers;r||(a&&a(this.lastMoveEvent,n),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,n)},this.handlePointerMove=(e,t)=>
295{this.lastMoveEvent=e,this.lastMoveEventInfo=eF(t,this.transformPagePoint),eS.Wi.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=eH("pointercancel"===e.type?this.lastMoveEventInfo:eF(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!eP(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;let a=eF(eM(e),this.transformPagePoint),{point:l}=a,{timestamp:u}=eS.frameData;this.history=[{...l,timestamp:u}];let{onSessionStart:c}=t;c&&c(e,eH(a,this.history)),this.removeListeners=(0,ez.z)(eO(this.contextWindow,"pointermove",this.handlePointerMove),eO(this.contextWindow,"pointerup",this.handlePointerUp),eO(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(eD.has(e.overflowX)||eD.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(0!==i.x||0!==i.y)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),eS.Wi.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),(0,eS.Pn)(this.updatePoint)}}function eF(e,t){return t?{point:t(e.point)}:e}function eB(e,t){return{x:e.x-t.x,y:e.y-t.y}}function eH({point:e},t){return{point:e,delta:eB(e,eU(t)),offset:eB(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=eU(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>(0,eL.w)(.1)));)n--;if(!r)return{x:0,y:0};let o=(0,eL.X)(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};let s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(t,0)}}function eU(e){return e[e.length-1]}var eW=n(22063),eq=n(970);function eX(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function eY(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function eG(e,t,n){return{min:eZ(e,t),max:eZ(e,n)}}function eZ(e,t){return"number"==typeof e?e:e[t]||0}let eK=new WeakMap;class eJ{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=(0,ed.dO)(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let{dragSnapToOrigin:i}=this.getProps();this.panSession=new eV(e,{onSessionStart:e=>{t?(this.stopAnimation(),this.snapToCursor(eM(e).point)):this.pauseAnimation()},onStart:(e,t)=>{this.stopAnimation();let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===n||"y"===n?ef[n]?null:(ef[n]=!0,()=>{ef[n]=!1}):ef.x||ef.y?null:(ef.x=ef.y=!0,()=>{ef.x=ef.y=!1}),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eh(e=>{let t=this.getAxisMotionValue(e).get()||0;if(ep.aQ.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=em(r);t=parseFloat(t)/100*e}}}this.originPoint[e]=t}),i&&eS.Wi.postRender(()=>i(e,t)),(0,ek.K)(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>
295{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:s}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>eh(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:e$(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:s}=this.getProps();s&&eS.Wi.postRender(()=>s(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!eQ(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?(0,eg.t)(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?(0,eg.t)(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&W(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:eX(e.x,n,i),y:eX(e.y,t,r)}}(n.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:eG(e,"left","right"),y:eG(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&eh(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!W(t))return!1;let r=t.current;(0,ej.k)(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=(0,eE.z)(r,i.root,this.visualElement.getTransformPagePoint()),s={x:eY((e=i.layout.layoutBox).x,o.x),y:eY(e.y,o.y)};if(n){let e=n((0,e_.z2)(s));this.hasMutatedConstraints=!!e,e&&(s=(0,e_.i8)(e))}return s}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{};return Promise.all(eh(s=>{if(!eQ(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});let u={type:"inertia",velocity:n?e[s]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,u)})).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return(0,ek.K)(this.visualElement,e),n.start((0,eT.v)(e,n,0,t,this.visualElement,!1))}stopAnimation(){eh(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){eh(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){eh(t=>{let{drag:n}=this.getProps();if(!eQ(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.layoutBox[t],s=i.get()||0;i.set(e[t]-(0,eg.t)(n,o,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!W(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};eh(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();r[e]=function(e,t){let n=.5,r=em(e),i=em(t);return i>r?n=(0,eW.Y)(t.min,t.max-r,e.min):r>i&&(n=(0,eW.Y)(e.min,e.max-i,t.min)),(0,eq.u)(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),eh(t=>{if(!eQ(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set((0,eg.t)(i,o,r[t]))})}addListeners(){if(!this.visualElement.current)return;eK.set(this.visualElement,this);let e=this.visualElement.current,t=eO(e,"pointerdown",t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,o=i!==e&&eA(i);n&&r&&!o&&this.start(t)}),n=()=>{let{dragConstraints:e}=this.getProps();W(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),eS.Wi.read(n);let o=eR(window,"resize",()=>this.scalePositionWithinConstraints()),s=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(eh(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),t(),i(),s&&s()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function eQ(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}class e0 extends Y{constructor(e){super(e),this.removeGroupControls=ec.Z,this.removeListeners=ec.Z,this.controls=new eJ(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ec.Z}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let e1=e=>(t,n)=>{e&&eS.Wi.postRender(()=>e(t,n))};class e2 extends Y{constructor(){super(...arguments),this.removePointerDownListener=ec.Z}onPointerDown(e){this.session=new eV(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:e$(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:e1(e),onStart:e1(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&eS.Wi.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=eO(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let e5={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var e3=n(88161),e4=n(19235);let e6=!1;class e8 extends s.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),e6&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),e5.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),e6=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||eS.Wi.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),e3.g.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;e6=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function e7(e){let[t,n]=(0,e4.oO)(),r=(0,s.useContext)(c.p);return(0,u.jsx)(e8,{...e,layoutGroup:r,switchLayoutGroup:(0,s.useContext)(U),isPresent:t,safeToRemove:n})}var e9=n(9205),te=n(82801),tt=n(91451),tn=n(42792);function tr(e,t,n,r,i){return e-=t,e=(0,tn.q2)(e,1/n,r),void 0!==i&&(e=(0,tn.q2)(e,1/i,r)),e}function ti(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){if(ep.aQ.test(t)&&(t=parseFloat(t),t=(0,eg.t)(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=(0,eg.t)(o.min,o.max,r);e===o&&(a-=t),e.min=tr(e.min,t,n,a,i),e.max=tr(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}let to=["x","scaleX","originX"],ts=["y","scaleY","originY"];function ta(e,t,n,r){ti(e.x,t,to,n?n.x:void 0,r?r.x:void 0),ti(e.y,t,ts,n?n.y:void 0,r?r.y:void 0)}function tl(e,t){e.min=t.min,e.max=t.max}function tu(e,t){tl(e.x,t.x),tl(e.y,t.y)}function tc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function td(e){return 0===e.translate&&1===e.scale}function tf(e){return td(e.x)&&td(e.y)}function th(e,t){return e.min===t.min&&e.max===t.max}function tp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tg(e,t){return tp(e.x,t.x)&&tp(e.y,t.y)}function tm(e){return em(e.x)/em(e.y)}function ty(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var tv=n(7322),tb=n(38994);let tw=["TopLeft","TopRight","BottomLeft","BottomRight"],tx=tw.length,tS=e=>"string"==typeof e?parseFloat(e):e,tk=e=>"number"==typeof e||ep.px.test(e);function tE(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let t_=tC(0,.5,tb.Bn),tT=tC(.5,.95,ec.Z);
295function tC(e,t,n){return r=>r<e?0:r>t?1:n((0,eW.Y)(e,t,r))}var tA=n(74802),tR=n(13389),tj=n(36204),tP=n(28404),tM=n(86792),tI=n(72859),tO=n(1974),t$=n(36014),tz=n(12268);let tL=(e,t)=>e.depth-t.depth;class tN{constructor(){this.children=[],this.isDirty=!1}add(e){(0,tz.y4)(this.children,e),this.isDirty=!0}remove(e){(0,tz.cl)(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tL),this.isDirty=!1,this.children.forEach(e)}}class tD{constructor(){this.members=[]}add(e){(0,tz.y4)(this.members,e),e.scheduleRender()}remove(e){if((0,tz.cl)(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();let r=n.options.layoutDependency,i=e.options.layoutDependency;!(void 0!==r&&void 0!==i&&r===i)&&(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0));let{crossfade:o}=e.options;!1===o&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let tV={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},tF=["","X","Y","Z"],tB=0;function tH(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function tU({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=tB++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tM.f.value&&(tV.nodes=tV.calculatedTargetDeltas=tV.calculatedProjections=0),this.nodes.forEach(tX),this.nodes.forEach(t0),this.nodes.forEach(t1),this.nodes.forEach(tY),tM.f.addProjectionMetrics&&tM.f.addProjectionMetrics(tV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new tN)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new tI.L),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=(0,tA.v)(t)&&!(0,tR.r)(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n;let r=0,i=()=>this.root.updateBlockedByResize=!1;eS.Wi.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){let n=tt.X.now(),r=({timestamp:t})=>{let i=t-n;i>=250&&((0,eS.Pn)(r),e(i-250))};return eS.Wi.setup(r,!0),()=>(0,eS.Pn)(r)}(i,0),e5.hasAnimatedSinceResize&&(e5.hasAnimatedSinceResize=!1,this.nodes.forEac
295h(tQ)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&i&&(n||r)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let o=this.options.transition||i.getDefaultTransition()||t8,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=i.getProps(),l=!this.targetLayout||!tg(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...(0,te.e)(o,"layout"),onPlay:s,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||tQ(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),(0,eS.Pn)(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(t2),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:n}=t.options;if(!n)return;let r=(0,t$.s)(n);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",eS.Wi,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(tZ);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tK);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tJ),this.nodes.forEach(tW),this.nodes.forEach(tq)):this.nodes.forEach(tK),this.clearAllSnapshots();let e=tt.X.now();eS.frameData.delta=(0,eq.u)(0,1e3/60,e-eS.frameData.timestamp),eS.frameData.timestamp=e,eS.frameData.isProcessing=!0,eS.yL.update.process(eS.frameData),eS.yL.preRender.process(eS.frameData),eS.yL.render.process(eS.frameData),eS.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,e3.g.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tG),this.sharedNodes.forEach(t5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eS.Wi.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eS.Wi.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),!this.snapshot||em(this.snapshot.measuredBox.x)||em(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=(0,ed.dO)(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!tf(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||(0,tv.ud)(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let n=this.measurePageBox(),r=this.removeElementScroll(n);return e&&(r=this.removeTransform(r)),ne((t=r).x),ne(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return(0,ed.dO)();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(nn))){let{scroll:e}=this.root;e&&((0,tn.am)(t.x,e.offset.x),(0,tn.am)(t.y,e.offset.y))}return t}removeElementScroll(e){let t=(0,ed.dO)();if(tu(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:o}=r;r!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&tu(t,e),(0,tn.am)(t.x,i.offset.x),(0,tn.am)(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=(0,ed.dO)();tu(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(0,tn.D2)(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),(0,tv.ud)(r.latestValues)&&(0,tn.D2)(n,r.latestValues)}return(0,tv.ud)(this.latestValues)&&(0,tn.D2)(n,this.latestValues),n}removeTransform(e){let t=(0,ed.dO)();tu(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!(0,tv.ud)(n.latestValues))continue;(0,tv.Lj)(n.latestValues)&&n.updateSnapshot();let r=(0,ed.dO)();tu(r,n.measurePageBox()),ta(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return(0,tv.ud)(this.latestValues)&&ta(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eS.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
295isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=eS.frameData.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=(0,ed.dO)(),this.targetWithTransforms=(0,ed.dO)()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var s,a,l;this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,eb(s.x,a.x,l.x),eb(s.y,a.y,l.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tu(this.target,this.layout.layoutBox),(0,tn.o2)(this.target,this.targetDelta)):tu(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),tM.f.value&&tV.calculatedTargetDeltas++}}getClosestProjectingParent(){return!this.parent||(0,tv.Lj)(this.parent.latestValues)||(0,tv.D_)(this.parent.latestValues)?void 0:this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=(0,ed.dO)(),this.relativeTargetOrigin=(0,ed.dO)(),ex(this.relativeTargetOrigin,t,n),tu(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===eS.frameData.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;tu(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,s=this.treeScale.y;(0,tn.YY)(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=(0,ed.dO)());let{target:a}=e;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(tc(this.prevProjectionDelta.x,this.projectionDelta.x),tc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ev(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===s&&ty(this.projectionDelta.x,this.prevProjectionDelta.x)&&ty(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),tM.f.value&&tV.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=(0,ed.wc)(),this.projectionDelta=(0,ed.wc)(),this.projectionDeltaWithTransform=(0,ed.wc)()}setAnimationOrigin(e,t=!1){let n;let r=this.snapshot,i=r?r.latestValues:{},o={...this.latestValues},s=(0,ed.wc)();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let a=(0,ed.dO)(),l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),c=!u||u.members.length<=1,d=!!(l&&!c&&!0===this.options.crossfade&&!this.path.some(t6));this.animationProgress=0,this.mixTargetDelta=t=>{let r=t/1e3;if(t3(s.x,e.x,r),t3(s.y,e.y,r),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,f,h,p;ex(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,t4(h.x,p.x,a.x,r),t4(h.y,p.y,a.y,r),n&&(u=this.relativeTarget,f=n,th(u.x,f.x)&&th(u.y,f.y))&&(this.isProjectionDirty=!1),n||(n=(0,ed.dO)()),tu(n,this.relativeTarget)}l&&(this.animationValues=o,function(e,t,n,r,i,o){i?(e.opacity=(0,eg.t)(0,n.opacity??1,t_(r)),e.o
295pacityExit=(0,eg.t)(t.opacity??1,0,tT(r))):o&&(e.opacity=(0,eg.t)(t.opacity??1,n.opacity??1,r));for(let i=0;i<tx;i++){let o=`border${tw[i]}Radius`,s=tE(t,o),a=tE(n,o);(void 0!==s||void 0!==a)&&(s||(s=0),a||(a=0),0===s||0===a||tk(s)===tk(a)?(e[o]=Math.max((0,eg.t)(tS(s),tS(a),r),0),(ep.aQ.test(a)||ep.aQ.test(s))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=(0,eg.t)(t.rotate||0,n.rotate||0,r))}(o,i,this.latestValues,r,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&((0,eS.Pn)(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=eS.Wi.update(()=>{e5.hasAnimatedSinceResize=!0,e9.P.layout++,this.motionValue||(this.motionValue=(0,tj.BX)(0)),this.currentAnimation=(0,tO.D)(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{e9.P.layout--},onComplete:()=>{e9.P.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&nt(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||(0,ed.dO)();let t=em(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=em(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}tu(t,n),(0,tn.D2)(t,i),ev(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new tD),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&tH("z",e,r,this.animationValues);for(let t=0;t<tF.length;t++)tH(`rotate${tF[t]}`,e,r,this.animationValues),tH(`skew${tF[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=R(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none";return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=R(t?.pointerEvents)||""),this.hasProjected&&!(0,tv.ud)(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1);return}e.visibility="";let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();
295let o=function(e,t,n){let r="",i=e.x.translate/t.x,o=e.y.translate/t.y,s=n?.z||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}let a=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==a||1!==l)&&(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(o=n(i,o)),e.transform=o;let{x:s,y:a}=this.projectionDelta;for(let t in e.transformOrigin=`${100*s.origin}% ${100*a.origin}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0,tP.P){if(void 0===i[t])continue;let{correct:n,applyTo:s,isCSSVariable:a}=tP.P[t],l="none"===o?i[t]:n(i[t],r);if(s){let t=s.length;for(let n=0;n<t;n++)e[s[n]]=l}else a?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?R(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(tZ),this.root.sharedNodes.clear()}}}function tW(e){e.updateLayout()}function tq(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;"size"===i?eh(e=>{let r=o?t.measuredBox[e]:t.layoutBox[e],i=em(r);r.min=n[e].min,r.max=r.min+i}):nt(i,t.layoutBox,n)&&eh(r=>{let i=o?t.measuredBox[r]:t.layoutBox[r],s=em(n[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});let s=(0,ed.wc)();ev(s,n,t.layoutBox);let a=(0,ed.wc)();o?ev(a,e.applyTransform(r,!0),t.measuredBox):ev(a,n,t.layoutBox);let l=!tf(s),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let s=(0,ed.dO)();ex(s,t.layoutBox,i.layoutBox);let a=(0,ed.dO)();ex(a,n,o.layoutBox),tg(s,a)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function tX(e){tM.f.value&&tV.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function tY(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tG(e){e.clearSnapshot()}function tZ(e){e.clearMeasurements()}function tK(e){e.isLayoutDirty=!1}function tJ(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tQ(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function t0(e){e.resolveTargetDelta()}function t1(e){e.calcProjection()}function t2(e){e.resetSkewAndRotation()}function t5(e){e.removeLeadSnapshot()}function t3(e,t,n){e.translate=(0,eg.t)(t.translate,0,n),e.scale=(0,eg.t)(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function t4(e,t,n,r){e.min=(0,eg.t)(t.min,n.min,r),e.max=(0,eg.t)(t.max,n.max,r)}function t6(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let t8={duration:.45,ease:[.4,0,.1,1]},t7=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),t9=t7("applewebkit/")&&!t7("chrome/")?Math.round:ec.Z;function ne(e){e.min=t9(e.min),e.max=t9(e.max)}function nt(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(tm(t)-tm(n)))}function nn(e){return e!==e.root&&e.scroll?.wasRoot}let nr=tU({attachResizeListener:(e,t)=>eR(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ni={current:void 0},no=tU({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ni.current){let e=new nr({});e.mount(window),e.setOptions({layoutScroll:!0}),ni.current=e}return ni.current},resetTransform:(e,t)=>
295{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});var ns=n(73278);function na(e,t){let n=(0,ns.I)(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function nl(e){return!("touch"===e.pointerType||ef.x||ef.y)}function nu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&eS.Wi.postRender(()=>i(t,eM(t)))}class nc extends Y{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=na(e,n),s=e=>{if(!nl(e))return;let{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;let o=e=>{nl(e)&&(r(e),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,i)};return r.forEach(e=>{e.addEventListener("pointerenter",s,i)}),o}(e,(e,t)=>(nu(this.node,t,"Start"),e=>nu(this.node,e,"End"))))}unmount(){}}class nd extends Y{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=(0,ez.z)(eR(this.node.current,"focus",()=>this.onFocus()),eR(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var nf=n(79240);let nh=(e,t)=>!!t&&(e===t||nh(e,t.parentElement)),np=new WeakSet;function ng(e){return t=>{"Enter"===t.key&&e(t)}}function nm(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}let ny=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=ng(()=>{if(np.has(n))return;nm(n,"down");let e=ng(()=>{nm(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>nm(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function nv(e){return eP(e)&&!(ef.x||ef.y)}function nb(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);let i=r["onTap"+("End"===n?"":n)];i&&eS.Wi.postRender(()=>i(t,eM(t)))}class nw extends Y{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=na(e,n),s=e=>{let r=e.currentTarget;if(!nv(e))return;np.add(r);let o=t(r,e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),np.has(r)&&np.delete(r),nv(e)&&"function"==typeof o&&o(e,{success:t})},a=e=>{s(e,r===window||r===document||n.useGlobalTarget||nh(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,i),!(0,nf.R)(e)||(e.addEventListener("focus",e=>ny(e,i)),eA(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(nb(this.node,t,"Start"),(e,{success:t})=>nb(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}let nx=new WeakMap,nS=new WeakMap,nk=e=>{let t=nx.get(e.target);t&&t(e)},nE=e=>{e.forEach(nk)},n_={some:0,all:1};
295class nT extends Y{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:n_[r]};return function(e,t,n){let r=function({root:e,...t}){let n=e||document;nS.has(n)||nS.set(n,{});let r=nS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(nE,{root:e,...t})),r[i]}(t);return nx.set(e,n),r.observe(e),()=>{nx.delete(e),r.unobserve(e)}}(this.node.current,o,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}let nC=function(e,t){if("undefined"==typeof Proxy)return X;let n=new Map,r=(n,r)=>X(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,X(o,void 0,e,t)),n.get(o))})}({animation:{Feature:ea},exit:{Feature:eu},inView:{Feature:nT},tap:{Feature:nw},focus:{Feature:nd},hover:{Feature:nc},pan:{Feature:e2},drag:{Feature:e0,ProjectionNode:no,MeasureLayout:e7},layout:{ProjectionNode:no,MeasureLayout:e7}},(e,t)=>t.isSVG??l(e)?new i.e(t):new o.W(t,{allowProjection:e!==s.Fragment}))},80226:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});let r="undefined"!=typeof window},2415:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var r=n(7653);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},98739:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(7653);let i=n(80226).j?r.useLayoutEffect:r.useEffect},13918:function(e,t,n){"use strict";n.d(t,{pi:function(){return v},LZ:function(){return w}});var r="1.3.20";function i(e,t,n){return Math.max(e,Math.min(t,n))}var o=class{isRunning=!1;value=0;from=0;to=0;currentTime=0;lerp;duration;easing;onUpdate;advance(e){if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;let n=i(0,this.currentTime/this.duration,1),r=(t=n>=1)?1:this.easing(n);this.value=this.from+(this.to-this.from)*r}else if(this.lerp){var n,r,o;this.value=(n=this.value,r=this.to,(1-(o=1-Math.exp(-(60*this.lerp)*e)))*n+o*r),Math.round(this.value)===this.to&&(this.value=this.to,t=!0)}else this.value=this.to,t=!0;t&&this.stop(),this.onUpdate?.(this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:r,easing:i,onStart:o,onUpdate:s}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=r,this.easing=i,this.currentTime=0,this.isRunning=!0,o?.(),this.onUpdate=s}},s=class{width=0;height=0;scrollHeight=0;scrollWidth=0;debouncedResize;wrapperResizeObserver;contentResizeObserver;constructor(e,t,{autoResize:n=!0,debounce:r=250}={}){if(this.wrapper=e,this.content=t,n){var i;let e;this.debouncedResize=(i=this.resize,function(...t){clearTimeout(e),e=setTimeout(()=>{e=void 0,i.apply(this,t)},r)}),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)}this.resize()}destroy(){this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize)}resize=()=>{this.onWrapperResize(),this.onContentResize()};onWrapperResize=()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)};onContentResize=()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)};get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},a=class{events={};emit(e,...t){let n=this.events[e]||[];for(let e=0,r=n.length;e<r;e++)n[e]?.(...t)}on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}off(e,t){this.events[e]=this.events[e]?.filter(e=>t!==e)}destroy(){this.events={}}};let l=100/6,u={passive:!1};function c(e,t){return 1===e?l:2===e?t:1}var d=class{touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new a;constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,u),this.element.addEventListener("touchstart",this.onTouchStart,u),this.element.addEventListener("touchmove",this.onTouchMove,u),this.element.addEventListener("touchend",this.onTouchEnd,u)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize),this.element.removeEventListener("wheel",this.onWheel,u),this.element.removeEventListener("touchstart",this.onTouchStart,u),this.element.removeEventListener("touchmove",this.onTouchMove,u),this.element.removeEventListener("touchend",this.onTouchEnd,u)}onTouchStart=e=>{let{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})};onTouchMove=e=>{let{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e,r=-(t-this.touchStart.x)*this.options.touchMultiplier,i=-(n-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:r,y:i},this.emitter.emit("scroll",{deltaX:r,deltaY:i,event:e})};onTouchEnd=e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})};onWheel=e=>{let{deltaX:t,deltaY:n,deltaMode:r}=e,i=c(r,this.window.width),o=c(r,this.window.height);t*=i,n*=o,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})};onWindowResize=()=>{this.window={width:window.innerWidth,height:window.innerHeight}}};let f=e=>Math.min(1,1.001-2**(-10*e));var h=class{_isScrolling=!1;_isStopped=!1;_isLocked=!1;_preventNextNativeScrollEvent=!1;_resetVelocityTimeout=null;_rafId=null;isTouching;time=0;userData={};lastVelocity=0;velocity=0;direction=0;options;targetScroll;animatedScroll;animate=new o;emitter=new a;dimensions;virtualScroll;constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:i=!0,syncTouch:o=!1,syncTouchLerp:a=.075,touchInertiaExponent:l=1.7,duration:u,easing:c,lerp:h=.1,infinite:p=!1,orientation:g="vertical",gestureOrientation:m="horizontal"===g?"both":"vertical",touchMultiplier:y=1,wheelMultiplier:v=1,autoResize:b=!0,prevent:w,virtualScroll:x,overscroll:S=!0,autoRaf:k=!1,anchors:E=!1,autoToggle:_=!1,allowNestedScroll:T=!1,__experimental__naiveDimensions:C=!1,naiveDimensions:A=C,stopInertiaOnNavigate:R=!1}={}){window.lenisVersion=r,window.lenis||(window.lenis={}),window.lenis.version=r,"horizontal"===g&&(window.lenis.horizontal=!0),!0===o&&(window.lenis.touch=!0),e&&e!==document.documentElement||(e=window),"number"==typeof u&&"function"!=typeof c?c=f:"function"==typeof c&&"number"!=typeof u&&(u=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:i,syncTouch:o,syncTouchLerp:a,touchInertiaExponent:l,duration:u,easing:c,lerp:h,infinite:p,gestureOrientation:m,orientation:g,touchMultiplier:y,wheelMultiplier:v,autoResize:b,prevent:w,virtualScroll:x,overscroll:S,autoRaf:k,anch
295ors:E,autoToggle:_,allowNestedScroll:T,naiveDimensions:A,stopInertiaOnNavigate:R},this.dimensions=new s(e,t,{autoResize:b}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown),this.virtualScroll=new d(n,{touchMultiplier:y,wheelMultiplier:v}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd)),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}onScrollEnd=e=>{e instanceof CustomEvent||"smooth"!==this.isScrolling&&!1!==this.isScrolling||e.stopPropagation()};dispatchScrollendEvent=()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))};get overflow(){let e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}onTransitionEnd=e=>{e.propertyName.includes("overflow")&&this.checkOverflow()};setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}onClick=e=>{let t=e.composedPath().filter(e=>e instanceof HTMLAnchorElement&&e.href).map(e=>new URL(e.href)),n=new URL(window.location.href);if(this.options.anchors){let e=t.find(e=>n.host===e.host&&n.pathname===e.pathname&&e.hash);if(e){let t="object"==typeof this.options.anchors&&this.options.anchors?this.options.anchors:void 0,n=`#${e.hash.split("#")[1]}`;this.scrollTo(n,t);return}}if(this.options.stopInertiaOnNavigate&&t.some(e=>n.host===e.host&&n.pathname!==e.pathname)){this.reset();return}};onPointerDown=e=>{1===e.button&&this.reset()};onVirtualScroll=e=>{if("function"==typeof this.options.virtualScroll&&!1===this.options.virtualScroll(e))return;let{deltaX:t,deltaY:n,event:r}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:n,event:r}),r.ctrlKey||r.lenisStopPropagation)return;let i=r.type.includes("touch"),o=r.type.includes("wheel");this.isTouching="touchstart"===r.type||"touchmove"===r.type;let s=0===t&&0===n;if(this.options.syncTouch&&i&&"touchstart"===r.type&&s&&!this.isStopped&&!this.isLocked){this.reset();return}let a="vertical"===this.options.gestureOrientation&&0===n||"horizontal"===this.options.gestureOrientation&&0===t;if(s||a)return;let l=r.composedPath();l=l.slice(0,l.indexOf(this.rootElement));let u=this.options.prevent,c=Math.abs(t)>=Math.abs(n)?"horizontal":"vertical";if(l.find(e=>e instanceof HTMLElement&&("function"==typeof u&&u?.(e)||e.hasAttribute?.("data-lenis-prevent")||"vertical"===c&&e.hasAttribute?.("data-lenis-prevent-vertical")||"horizontal"===c&&e.hasAttribute?.("data-lenis-prevent-horizontal")||i&&e.hasAttribute?.("data-lenis-prevent-touch")||o&&e.hasAttribute?.("data-lenis-prevent-wheel")||this.options.allowNestedScroll&&this.hasNestedScroll(e,{deltaX:t,deltaY:n}))))return;if(this.isStopped||this.isLocked){r.cancelable&&r.preventDefault();return}if(!(this.options.syncTouch&&i||this.options.smoothWheel&&o)){this.isScrolling="native",this.animate.stop(),r.lenisStopPropagation=!0;return}let d=n;"both"===this.options.gestureOrientation?d=Math.abs(n)>Math.abs(t)?n:t:"horizontal"===this.options.gestureOrientation&&(d=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||0===this.animatedScroll&&n>0||this.animatedScroll===this.limit&&n<0))&&(r.lenisStopPropagation=!0),r.cancelable&&r.preventDefault();let f=i&&this.options.syncTouch,h=i&&"touchend"===r.type;h&&(d=Math.sign(this.velocity)*Math.abs(this.velocity)**this.options.touchInertiaExponent),this.scrollTo(this.targetScroll+d,{programmatic:!1,...f?{lerp:h?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})};resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit
295()}emit(){this.emitter.emit("scroll",this)}onNativeScroll=()=>{if(null!==this._resetVelocityTimeout&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(!1===this.isScrolling||"native"===this.isScrolling){let e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),0!==this.velocity&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}};reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}raf=e=>{let t=e-(this.time||e);this.time=e,this.animate.advance(.001*t),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))};scrollTo(e,{offset:t=0,immediate:n=!1,lock:r=!1,programmatic:o=!0,lerp:s=o?this.options.lerp:void 0,duration:a=o?this.options.duration:void 0,easing:l=o?this.options.easing:void 0,onStart:u,onComplete:c,force:d=!1,userData:h}={}){if((this.isStopped||this.isLocked)&&!d)return;let p=e,g=t;if("string"==typeof p&&["top","left","start","#"].includes(p))p=0;else if("string"==typeof p&&["bottom","right","end"].includes(p))p=this.limit;else{let e=null;if("string"==typeof p?(e=document.querySelector(p))||("#top"===p?p=0:console.warn("Lenis: Target not found",p)):p instanceof HTMLElement&&p?.nodeType&&(e=p),e){if(this.options.wrapper!==window){let e=this.rootElement.getBoundingClientRect();g-=this.isHorizontal?e.left:e.top}let t=e.getBoundingClientRect(),n=getComputedStyle(e),r=this.isHorizontal?Number.parseFloat(n.scrollMarginLeft):Number.parseFloat(n.scrollMarginTop),i=getComputedStyle(this.rootElement),o=this.isHorizontal?Number.parseFloat(i.scrollPaddingLeft):Number.parseFloat(i.scrollPaddingTop);p=(this.isHorizontal?t.left:t.top)+this.animatedScroll-(Number.isNaN(r)?0:r)-(Number.isNaN(o)?0:o)}}if("number"==typeof p){if(p+=g,p=Math.round(p),this.options.infinite){if(o){this.targetScroll=this.animatedScroll=this.scroll;let e=p-this.animatedScroll;e>this.limit/2?p-=this.limit:e<-this.limit/2&&(p+=this.limit)}}else p=i(0,p,this.limit);if(p===this.targetScroll){u?.(this),c?.(this);return}if(this.userData=h??{},n){this.animatedScroll=this.targetScroll=p,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),c?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}o||(this.targetScroll=p),"number"==typeof a&&"function"!=typeof l?l=f:"function"==typeof l&&"number"!=typeof a&&(a=1),this.animate.fromTo(this.animatedScroll,p,{duration:a,easing:l,lerp:s,onStart:()=>{r&&(this.isLocked=!0),this.isScrolling="smooth",u?.(this)},onUpdate:(e,t)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=e-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=e,this.setScroll(this.scroll),o&&(this.targetScroll=e),t||this.emit(),t&&(this.reset(),this.emit(),c?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}hasNestedScroll(e,{deltaX:t,deltaY:n}){let r,i,o,s,a,l,u,c,d,f,h,p,g,m,y,v;let b=Date.now();e._lenis||(e._lenis={});let w=e._lenis;if(b-(w.time??0)>2e3){w.time=Date.now();let t=window.getComputedStyle(e);if(w.computedStyle=t,r=["auto","overlay","scroll"].includes(t.overflowX),i=["auto","overlay","scroll"].includes(t.overflowY),a=["auto"].includes(t.overscrollBehaviorX),l=["auto"].includes(t.overscrollBehaviorY),w.hasOverflowX=r,w.hasOverflowY=i,!(r||i)
295)return!1;u=e.scrollWidth,c=e.scrollHeight,d=e.clientWidth,f=e.clientHeight,o=u>d,s=c>f,w.isScrollableX=o,w.isScrollableY=s,w.scrollWidth=u,w.scrollHeight=c,w.clientWidth=d,w.clientHeight=f,w.hasOverscrollBehaviorX=a,w.hasOverscrollBehaviorY=l}else o=w.isScrollableX,s=w.isScrollableY,r=w.hasOverflowX,i=w.hasOverflowY,u=w.scrollWidth,c=w.scrollHeight,d=w.clientWidth,f=w.clientHeight,a=w.hasOverscrollBehaviorX,l=w.hasOverscrollBehaviorY;if(!(r&&o||i&&s))return!1;let x=Math.abs(t)>=Math.abs(n)?"horizontal":"vertical";if("horizontal"===x)h=Math.round(e.scrollLeft),p=u-d,g=t,m=r,y=o,v=a;else{if("vertical"!==x)return!1;h=Math.round(e.scrollTop),p=c-f,g=n,m=i,y=s,v=l}return!v&&(h>=p||h<=0)||(g>0?h<p:h>0)&&m&&y}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return"horizontal"===this.options.orientation}get actualScroll(){let e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){var e;return this.options.infinite?(this.animatedScroll%(e=this.limit)+e)%e:this.animatedScroll}get progress(){return 0===this.limit?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return"smooth"===this.isScrolling}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),"smooth"===this.isScrolling&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}},p=n(7653),g=n(27573);let m=(0,p.createContext)(null),y=new class{set(e){for(let t of(this.state=e,this.listeners))t(this.state)}subscribe(e){return this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(t=>t!==e)}}get(){return this.state}constructor(e){this.listeners=[],this.state=e}}(null),v=(0,p.forwardRef)((e,t)=>{var n;let{children:r,root:i=!1,options:o={},autoRaf:s=!0,className:a="",...l}=e,u=(0,p.useRef)(null),c=(0,p.useRef)(null),[d,f]=(0,p.useState)(void 0);(0,p.useImperativeHandle)(t,()=>({wrapper:u.current,content:c.current,lenis:d}),[d]),(0,p.useEffect)(()=>{var e;let t=new h({...o,...u.current&&c.current&&{wrapper:u.current,content:c.current},autoRaf:null!==(e=null==o?void 0:o.autoRaf)&&void 0!==e?e:s});return f(t),()=>{t.destroy(),f(void 0)}},[s,JSON.stringify({...o,wrapper:null,content:null})]);let v=(0,p.useRef)([]),b=(0,p.useCallback)((e,t)=>{v.current.push({callback:e,priority:t}),v.current.sort((e,t)=>e.priority-t.priority)},[]),w=(0,p.useCallback)(e=>{v.current=v.current.filter(t=>t.callback!==e)},[]);return((0,p.useEffect)(()=>{if(i&&d)return y.set({lenis:d,addCallback:b,removeCallback:w}),()=>y.set(null)},[i,d,b,w]),(0,p.useEffect)(()=>{if(!d)return;let e=e=>{for(let{callback:t}of v.current)t(e)};return d.on("scroll",e),()=>{d.off("scroll",e)}},[d]),r)?(0,g.jsx)(m.Provider,{value:{lenis:d,addCallback:b,removeCallback:w},children:i&&"asChild"!==i?r:(0,g.jsx)("div",{ref:u,className:"".concat(a," ").concat(null!==(n=null==d?void 0:d.className)&&void 0!==n?n:"").trim(),...l,children:(0,g.jsx)("div",{ref:c,children:r})})}):null}),b={};function w(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=(0,p.useContext)(m),o=function(e){let[t,n]=(0,p.useState)(e.get());return(0,p.useEffect)(()=>e.subscribe(e=>n(e)),[e]),t}(y),{lenis:s,addCallback:a,removeCallback:l}=null!==(t=null!=i?i:o)&&void 0!==t?t:b;return(0,p.useEffect)(()=>
295{if(e&&a&&l&&s)return a(e,r),e(s),()=>{l(e)}},[s,a,l,r,...n,e]),s}},1974:function(e,t,n){"use strict";n.d(t,{D:function(){return s}});var r=n(94502),i=n(36204),o=n(30876);function s(e,t,n){let s=(0,o.i)(e)?e:(0,i.BX)(e);return s.start((0,r.v)("",s,t,n)),s.animation}},76890:function(e,t,n){"use strict";n.d(t,{S:function(){return g}});var r=n(970),i=n(53348),o=n(61901),s=n(51602),a=n(83645),l=n(46545);let u={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var c=n(11151);function d(e,t){return e*Math.sqrt(1-t*t)}let f=["duration","bounce"],h=["stiffness","damping","mass"];function p(e,t){return t.some(t=>void 0!==e[t])}function g(e=u.visualDuration,t=u.bounce){let n;let a="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:g,restDelta:m}=a,y=a.keyframes[0],v=a.keyframes[a.keyframes.length-1],b={done:!1,value:y},{stiffness:w,damping:x,mass:S,duration:k,velocity:E,isResolvedFromDuration:_}=function(e){let t={velocity:u.velocity,stiffness:u.stiffness,damping:u.damping,mass:u.mass,isResolvedFromDuration:!1,...e};if(!p(e,h)&&p(e,f)){if(e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),i=n*n,o=2*(0,r.u)(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:u.mass,stiffness:i,damping:o}}else{let n=function({duration:e=u.duration,bounce:t=u.bounce,velocity:n=u.velocity,mass:o=u.mass}){let s,a;(0,c.K)(e<=(0,i.w)(u.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-t;l=(0,r.u)(u.minDamping,u.maxDamping,l),e=(0,r.u)(u.minDuration,u.maxDuration,(0,i.X)(e)),l<1?(s=t=>{let r=t*l,i=r*e;return .001-(r-n)/d(t,l)*Math.exp(-i)},a=t=>{let r=t*l*e,i=Math.pow(l,2)*Math.pow(t,2)*e,o=d(Math.pow(t,2),l);return(r*n+n-i)*Math.exp(-r)*(-s(t)+.001>0?-1:1)/o}):(s=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>e*e*(n-t)*Math.exp(-t*e));let f=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(s,a,5/e);if(e=(0,i.w)(e),isNaN(f))return{stiffness:u.stiffness,damping:u.damping,duration:e};{let t=Math.pow(f,2)*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}(e);(t={...t,...n,mass:u.mass}).isResolvedFromDuration=!0}}return t}({...a,velocity:-(0,i.X)(a.velocity||0)}),T=E||0,C=x/(2*Math.sqrt(w*S)),A=v-y,R=(0,i.X)(Math.sqrt(w/S)),j=5>Math.abs(A);if(g||(g=j?u.restSpeed.granular:u.restSpeed.default),m||(m=j?u.restDelta.granular:u.restDelta.default),C<1){let e=d(R,C);n=t=>v-Math.exp(-C*R*t)*((T+C*R*A)/e*Math.sin(e*t)+A*Math.cos(e*t))}else if(1===C)n=e=>v-Math.exp(-R*e)*(A+(T+R*A)*e);else{let e=R*Math.sqrt(C*C-1);n=t=>{let n=Math.exp(-C*R*t),r=Math.min(e*t,300);return v-n*((T+C*R*A)*Math.sinh(r)+e*A*Math.cosh(r))/e}}let P={calculatedDuration:_&&k||null,next:e=>{let t=n(e);if(_)b.done=e>=k;else{let r=0===e?T:0;C<1&&(r=0===e?(0,i.w)(T):(0,l.P)(n,e,t));let o=Math.abs(r)<=g,s=Math.abs(v-t)<=m;b.done=o&&s}return b.value=b.done?v:t,b},toString:()=>{let e=Math.min((0,s.i)(P),s.E),t=(0,o.w)(t=>P.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return P}g.applyToOptions=e=>{let t=(0,a.S)(e,100,g);return e.ease=t.ease,e.duration=(0,i.w)(t.duration),e.type="keyframes",e}},51602:function(e,t,n){"use strict";n.d(t,{E:function(){return r},i:function(){return i}});let r=2e4;function i(e){let t=0,n=e.next(t);for(;!n.done&&t<r;)t+=50,n=e.next(t);return t>=r?1/0:t}},83645:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r=n(53348),i=n(51602);function o(e,t=100,n){let o=n({...e,keyframes:[0,t]}),s=Math.min((0,i.i)(o),i.E);return{type:"keyframes",ease:e=>o.next(s*e).value/t,duration:(0,r.X)(s)}}},80469:function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"applyToOptions"in e}n.d(t,{x:function(){return r}})},46545:function(e,t,n){"use strict";n.d(t,{P:function(){return i}});var r=n(91660);function i(e,t,n){let i=Math.max(t-5,0);return(0,r.R)(n-e(i),t-i)}},94502:function(e,t,n){"use strict";n.d(t,{v:function(){return eb}});var r=n(53348),i=n(48386),o=n(19676),s=n(91451),a=n(47857),l=n(970),u=n(9205),c=n(28532),d=n(4238);let f=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>d.Wi.update(t,e),stop:()=>(0,d.Pn)(t),now:()=>d.frameData.isProcessing?d.frameData.timestamp:s.X.now()}};var h=n(76890),p=n(46545);function g({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){let d,f;let g=e[0],m={done:!1,value:g},y=e=>void 0!==a&&e<a||void 0!==l&&e>l,v=e=>void 0===a?l:void 0===l?a:Math.abs(a-e)<Math.abs(l-e)?a:l,b=n*t,w=g+b,x=void 0===s?w:s(w);x!==w&&(b=x-g);let S=e=>-b*Math.exp(-e/r),k=e=>x+S(e),E=e=>{let t=S(e),n=k(e);m.done=Math.abs(t)<=u,m.value=m.done?x:n},_=e=>{y(m.value)&&(d=e,f=(0,h.S)({keyframes:[m.value,v(m.value)],velocity:(0,p.P)(k,e,m.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return(f||void 0!==d||(t=!0,E(e),_(e)),void 0!==d&&e>=d)?f.next(e-d):(t||E(e),m)}}}
295let m=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function y(e,t,n,r){if(e===t&&n===r)return o.Z;let i=t=>(function(e,t,n,r,i){let o,s;let a=0;do(o=m(s=t+(n-t)/2,r,i)-e)>0?n=s:t=s;while(Math.abs(o)>1e-7&&++a<12);return s})(t,0,1,e,n);return e=>0===e||1===e?e:m(i(e),t,r)}let v=y(.42,0,1,1),b=y(0,0,.58,1),w=y(.42,0,.58,1);var x=n(46572),S=n(11151),k=n(80941),E=n(95714);let _=y(.33,1.53,.69,.99),T=(0,E.M)(_),C=(0,k.o)(T),A=e=>(e*=2)<1?.5*T(e):.5*(2-Math.pow(2,-10*(e-1)));var R=n(38994);let j=e=>Array.isArray(e)&&"number"==typeof e[0],P={linear:o.Z,easeIn:v,easeInOut:w,easeOut:b,circIn:R.Z7,circInOut:R.X7,circOut:R.Bn,backIn:T,backInOut:C,backOut:_,anticipate:A},M=e=>"string"==typeof e,I=e=>{if(j(e)){(0,S.k)(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,r,i]=e;return y(t,n,r,i)}return M(e)?((0,S.k)(void 0!==P[e],`Invalid easing type '${e}'`,"invalid-easing-type"),P[e]):e};var O=n(64605),$=n(37314);function z({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){let i=(0,x.N)(r)?r.map(I):I(r),o={done:!1,value:t[0]},s=(n&&n.length===t.length?n:(0,$.Y)(t)).map(t=>t*e),a=(0,O.s)(s,t,{ease:Array.isArray(i)?i:t.map(()=>i||w).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}var L=n(51602);let N=e=>null!==e;function D(e,{repeat:t,repeatType:n="loop"},r,i=1){let o=e.filter(N),s=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return s&&void 0!==r?r:o[s]}let V={decay:g,inertia:g,tween:z,keyframes:z,spring:h.S};function F(e){"string"==typeof e.type&&(e.type=V[e.type])}class B{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let H=e=>e/100;class U extends B{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==s.X.now()&&this.tick(s.X.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},u.P.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;F(e);let{type:t=z,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e,{keyframes:s}=e,l=t||z;l!==z&&"number"!=typeof s[0]&&(this.mixKeyframes=(0,a.z)(H,(0,c.C)(s[0],s[1])),s=[0,100]);let u=l({...e,keyframes:s});"mirror"===i&&(this.mirroredGenerator=l({...e,keyframes:[...s].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=(0,L.i)(u));let{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=u}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:s,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let w=this.currentTime,x=n;if(d){let e=Math.min(this.currentTime,r)/s,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,d+1))%2&&("reverse"===f?(n=1-n,h&&(n-=h/s)):"mirror"===f&&(x=o)),w=(0,l.u)(0,1,n)*s}let S=b?{done:!1,value:c[0]}:x.next(w);i&&(S.value=i(S.value));let{done:k}=S;b||null===a||(k=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&k);return E&&p!==g&&(S.value=D(c,this.options,y,this.speed)),m&&m(S.value),E&&this.finish(),S}then(e,t){return this.finished.then(e,t)}get duration(){return(0,r.X)(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+(0,r.X)(e)}get time(){return(0,r.X)(this.currentTime)}set time(e){e=(0,r.w)(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(s.X.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=(0,r.X)(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=f,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(s.X.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,u.P.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}var W=n(37221);let q=e=>e.startsWith("--");var X=n(81721),Y=n(86792),G=n(8603);let Z={},K=function(e,t){let n=(0,G.X)(e);return()=>Z[t]??n()}(()=>{try{document.createElement("div").animate({opacity:0}
295,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing");var J=n(61901);let Q=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ee={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Q([0,.65,.55,1]),circOut:Q([.55,0,1,.45]),backIn:Q([.31,.01,.66,-.59]),backOut:Q([.33,1.53,.69,.99])};var et=n(80469);class en extends B{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:s,onComplete:a}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,(0,S.k)("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return(0,et.x)(e)&&K()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c){let d={[t]:n};l&&(d.offset=l);let f=function e(t,n){if(t)return"function"==typeof t?K()?(0,J.w)(t,n):"ease-out":j(t)?Q(t):Array.isArray(t)?t.map(t=>e(t,n)||ee.easeOut):ee[t]}(a,i);Array.isArray(f)&&(d.easing=f),Y.f.value&&u.P.waapi++;let h={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"};c&&(h.pseudoElement=c);let p=e.animate(d,h);return Y.f.value&&p.finished.finally(()=>{u.P.waapi--}),p}(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=D(r,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(e):q(n)?t.style.setProperty(n,e):t.style[n]=e,this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return(0,r.X)(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+(0,r.X)(e)}get time(){return(0,r.X)(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=(0,r.w)(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&(0,X.t)())?(this.animation.timeline=e,o.Z):t(this)}}let er={anticipate:A,backInOut:C,circInOut:R.X7};class ei extends en{constructor(e){"string"==typeof e.ease&&e.ease in er&&(e.ease=er[e.ease]),F(e),super(e),void 0!==e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e){t.set(e);return}let a=new U({...o,autoplay:!1}),u=Math.max(10,s.X.now()-this.startTime),c=(0,l.u)(0,10,u-10);t.setWithVelocity(a.sample(Math.max(0,u-c)).value,a.sample(u).value,c),a.stop()}}var eo=n(7336);let es=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(eo.P.test(e)||"0"===e)&&!e.startsWith("url("));function ea(e){e.duration=0,e.type="keyframes"}let el=new Set(["opacity","clipPath","filter","transform"]),eu=(0,G.X)(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ec extends B{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:
295o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=s.X.now();let f={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:c,...d},h=c?.KeyframeResolver||W.e;this.keyframeResolver=new h(a,(e,t,n)=>this.onKeyframesResolved(e,t,f,!n),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:a,type:l,velocity:u,delay:c,isHandoff:d,onUpdate:f}=n;this.resolvedAt=s.X.now(),!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],s=es(i,t),a=es(o,t);return(0,S.K)(s===a,`You are trying to animate ${t} from "${i}" to "${o}". "${s?o:i}" is not an animatable value.`,"value-not-animatable"),!!s&&!!a&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||(0,et.x)(n))&&r)}(e,a,l,u)&&((i.c.instantAnimations||!c)&&f?.(D(e,n,t)),e[0]=e[e.length-1],ea(n),n.repeat=0);let h={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},p=!d&&function(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:a,transformTemplate:l}=t.owner.getProps();return eu()&&n&&el.has(n)&&("transform"!==n||!l)&&!a&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}(h),g=h.motionValue?.owner?.current,m=p?new ei({...h,element:g}):new U(h);m.finished.then(()=>{this.notifyFinished()}).catch(o.Z),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),(0,W.m)()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}var ed=n(82801),ef=n(38752);let eh={type:"spring",stiffness:500,damping:25,restSpeed:10},ep=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),eg={type:"keyframes",duration:.8},em={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ey=(e,{keyframes:t})=>t.length>2?eg:ef.G.has(e)?e.startsWith("scale")?ep(t[1]):eh:em,ev=e=>null!==e,eb=(e,t,n,o={},s,a)=>l=>{let u=(0,ed.e)(o,e)||{},c=u.delay||o.delay||0,{elapsed:f=0}=o;f-=(0,r.w)(c);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-f,onUpdate:e=>{t.set(e),u.onUpdate&&u.onUpdate(e)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:a?void 0:s};!function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(u)&&Object.assign(h,ey(e,h)),h.duration&&(h.duration=(0,r.w)(h.duration)),h.repeatDelay&&(h.repeatDelay=(0,r.w)(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let p=!1;if(!1!==h.type&&(0!==h.duration||h.repeatDelay)||(ea(h),0!==h.delay||(p=!0)),(i.c.instantAnimations||i.c.skipAnimations)&&(p=!0,ea(h),h.delay=0),h.allowFlatten=!u.type&&!u.ease,p&&!a&&void 0!==t.get()){let e=function(e,{repeat:t,repeatType:n="loop"},r){let i=e.filter(ev),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return i[o]}(h.keyframes,u);if(void 0!==e){d.Wi.update(()=>{h.onUpdate(e),h.onComplete()});return}}return u.isSync?new U(h):new ec(h)}},324:function(e,t,n){"use strict";n.d(t,{w:function(){return f}});
295var r=n(82801),i=n(45490),o=n(36204),s=n(78037),a=n(68494),l=n(37670),u=n(36014),c=n(94502),d=n(4238);function f(e,t,{delay:n=0,transitionOverride:f,type:h}={}){let{transition:p=e.getDefaultTransition(),transitionEnd:g,...m}=t;f&&(p=f);let y=[],v=h&&e.animationState&&e.animationState.getState()[h];for(let t in m){let o=e.getValue(t,e.latestValues[t]??null),s=m[t];if(void 0===s||v&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(v,t))continue;let a={delay:n,...(0,r.e)(p||{},t)},f=o.get();if(void 0!==f&&!o.isAnimating&&!Array.isArray(s)&&s===f&&!a.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){let n=(0,u.s)(e);if(n){let e=window.MotionHandoffAnimation(n,t,d.Wi);null!==e&&(a.startTime=e,h=!0)}}(0,l.K)(e,t),o.start((0,c.v)(t,o,s,e.shouldReduceMotion&&i.z.has(t)?{type:!1}:a,e,h));let g=o.animation;g&&y.push(g)}return g&&Promise.all(y).then(()=>{d.Wi.update(()=>{g&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=(0,s.x)(e,t)||{};for(let t in i={...i,...n}){var l;let n=(l=i[t],(0,a.C)(l)?l[l.length-1]||0:l);e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,(0,o.BX)(n))}}(e,g)})}),y}},37221:function(e,t,n){"use strict";n.d(t,{e:function(){return f},m:function(){return d}});var r=n(79606),i=n(4238);let o=new Set,s=!1,a=!1,l=!1;function u(){if(a){let e=Array.from(o).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=(0,r.Ei)(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}a=!1,s=!1,o.forEach(e=>e.complete(l)),o.clear()}function c(){o.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(a=!0)})}function d(){l=!0,c(),u(),l=!1}class f{constructor(e,t,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(o.add(this),s||(s=!0,i.Wi.read(c),i.Wi.resolveKeyframes(u))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){let i=r?.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){let r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),o.delete(this)}cancel(){"scheduled"===this.state&&(o.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}},37314:function(e,t,n){"use strict";n.d(t,{Y:function(){return i}});var r=n(79706);function i(e){let t=[0];return(0,r.c)(t,e.length-1),t}},79706:function(e,t,n){"use strict";n.d(t,{c:function(){return o}});var r=n(22063),i=n(37600);function o(e,t){let n=e[e.length-1];for(let o=1;o<=t;o++){let s=(0,r.Y)(0,t,o);e.push((0,i.t)(n,1,s))}}},79606:function(e,t,n){"use strict";n.d(t,{Ei:function(){return c},lw:function(){return d},mP:function(){return a}});var r=n(98509),i=n(38752),o=n(3791),s=n(58207);let a=e=>e===o.Rx||e===s.px,l=new Set(["x","y","z"]),u=i._.filter(e=>!l.has(e));function c(e){let t=[];return u.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}let d={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>(0,r.WK)(t,"x"),y:(e,{transform:t})=>(0,r.WK)(t,"y")};d.translateX=d.x,d.translateY=d.y},96550:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});let r="data-"+(0,n(50980).D)("framerAppearId")},36014:function(e,t,n){"use strict";n.d(t,{s:function(){return i}});var r=n(96550);function i(e){return e.props[r.M]}},82801:function(e,t,n){"use strict";function r(e,t){return e?.[t]??e?.default??e}n.d(t,{e:function(){return r}})},63341:function(e,t,n){"use strict";n.d(t,{V3:function(){return l},f9:function(){return i},tm:function(){return s}});let r=e=>t=>"string"==typeof t&&t.startsWith(e),i=r("--"),o=r("var(--"),s=e=>!!o(e)&&a.test(e.split("/*")[0].trim()),a=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function l(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}},61901:function(e,t,n){"use strict";n.d(t,{w:function(){return r}});let r=(e,t,n=10)=>{let r="",i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(1e4*e(t/(i-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`}},17425:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(48386);let i=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var o=n(86792);function s(e,t){let n=!1,s=!0,a={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,u=i.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,i=!1,s=!1,a=new WeakSet,l={delta:0,timestamp:0,isProcessing:!1},u=0;
295function c(t){a.has(t)&&(d.schedule(t),e()),u++,t(l)}let d={schedule:(e,t=!1,o=!1)=>{let s=o&&i?n:r;return t&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{if(l=e,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&o.f.value&&o.f.value.frameloop[t].push(u),u=0,n.clear(),i=!1,s&&(s=!1,d.process(e))}};return d}(l,t?n:void 0),e),{}),{setup:c,read:d,resolveKeyframes:f,preUpdate:h,update:p,preRender:g,render:m,postRender:y}=u,v=()=>{let i=r.c.useManualTiming?a.timestamp:performance.now();n=!1,r.c.useManualTiming||(a.delta=s?1e3/60:Math.max(Math.min(i-a.timestamp,40),1)),a.timestamp=i,a.isProcessing=!0,c.process(a),d.process(a),f.process(a),h.process(a),p.process(a),g.process(a),m.process(a),y.process(a),a.isProcessing=!1,n&&t&&(s=!1,e(v))},b=()=>{n=!0,s=!0,a.isProcessing||e(v)};return{schedule:i.reduce((e,t)=>{let r=u[t];return e[t]=(e,t=!1,i=!1)=>(n||b(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<i.length;t++)u[i[t]].cancel(e)},state:a,steps:u}}},4238:function(e,t,n){"use strict";n.d(t,{Pn:function(){return o},Wi:function(){return i},frameData:function(){return s},yL:function(){return a}});var r=n(19676);let{schedule:i,cancel:o,state:s,steps:a}=(0,n(17425).Z)("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:r.Z,!0)},88161:function(e,t,n){"use strict";n.d(t,{g:function(){return r}});let{schedule:r,cancel:i}=(0,n(17425).Z)(queueMicrotask,!1)},91451:function(e,t,n){"use strict";let r;n.d(t,{X:function(){return a}});var i=n(48386),o=n(4238);function s(){r=void 0}let a={now:()=>(void 0===r&&a.set(o.frameData.isProcessing||i.c.useManualTiming?o.frameData.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(s)}}},4903:function(e,t,n){"use strict";function r({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function i({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function o(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}n.d(t,{d7:function(){return o},i8:function(){return r},z2:function(){return i}})},42792:function(e,t,n){"use strict";n.d(t,{D2:function(){return f},YY:function(){return u},am:function(){return c},o2:function(){return l},q2:function(){return o}});var r=n(37600),i=n(7322);function o(e,t,n){return n+t*(e-n)}function s(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function a(e,t=0,n=1,r,i){e.min=s(e.min,t,n,r,i),e.max=s(e.max,t,n,r,i)}function l(e,{x:t,y:n}){a(e.x,t.translate,t.scale,t.originPoint),a(e.y,n.translate,n.scale,n.originPoint)}function u(e,t,n,r=!1){let o,s;let a=n.length;if(a){t.x=t.y=1;for(let u=0;u<a;u++){s=(o=n[u]).projectionDelta;let{visualElement:a}=o.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&f(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,l(e,s)),r&&(0,i.ud)(o.latestValues)&&f(e,o.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}function c(e,t){e.min=e.min+t,e.max=e.max+t}function d(e,t,n,i,o=.5){let s=(0,r.t)(e.min,e.max,o);a(e,t,n,s,i)}function f(e,t){d(e.x,t.x,t.scaleX,t.scale,t.originX),d(e.y,t.y,t.scaleY,t.scale,t.originY)}},28665:function(e,t,n){"use strict";n.d(t,{dO:function(){return s},wc:function(){return i}});let r=()=>({translate:0,scale:1,origin:0,originPoint:0}),i=()=>({x:r(),y:r()}),o=()=>({min:0,max:0}),s=()=>({x:o(),y:o()})},28404:function(e,t,n){"use strict";n.d(t,{P:function(){return l}});var r=n(58207);function i(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let o={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!r.px.test(e))return e;e=parseFloat(e)}let n=i(e,t.target.x),o=i(e,t.target.y);return`${n}% ${o}%`}};var s=n(7336),a=n(37600);let l={borderRadius:{...o,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:o,borderTopRightRadius:o,borderBottomLeftRadius:o,borderBottomRightRadius:o,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=s.P.parse(e);if(r.length>5)return e;let i=s.P.createTransformer(e),o="number"!=typeof r[0]?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;r[0+o]/=l,r[1+o]/=u;let c=(0,a.t)(l,u,.5);return"number"==typeof r[2+o]&&(r[2+o]/=c),"number"==typeof r[3+o]&&(r[3+o]/=c),i(r)}}}},7322:function(e,t,n){"use strict";function r(e){return void 0===e||1===e}function i({scale:e,scaleX:t,scaleY:n}){return!r(e)||!r(t)||!r(n)}function o(e){return i(e)||s(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function s(e){var t,n;
295return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}n.d(t,{D_:function(){return s},Lj:function(){return i},ud:function(){return o}})},30270:function(e,t,n){"use strict";n.d(t,{J:function(){return o},z:function(){return s}});var r=n(4903),i=n(42792);function o(e,t){return(0,r.i8)((0,r.d7)(e.getBoundingClientRect(),t))}function s(e,t,n){let r=o(e,n),{scroll:s}=t;return s&&((0,i.am)(r.x,s.offset.x),(0,i.am)(r.y,s.offset.y)),r}},95690:function(e,t,n){"use strict";n.d(t,{l9:function(){return j},uN:function(){return R},v7:function(){return A}});var r=n(81758),i=n(51691),o=n(72859),s=n(88161),a=n(91451),l=n(36204),u=n(30876),c=n(37221),d=n(38752),f=n(7336),h=n(33883),p=n(87634),g=n(85834);let m=[...p.$,h.$,f.P],y=e=>m.find((0,g.l)(e));var v=n(7419),b=n(28665),w=n(48817),x=n(83413),S=n(12193),k=n(72583),E=n(36668),_=n(4238);let T=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],C={};function A(e){C=e}function R(){return C}class j{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=c.e,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=a.X.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,_.Wi.render(this.render,!1,!0))};let{latestValues:l,renderState:d}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=d,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=(0,S.G)(t),this.isVariantNode=(0,S.M)(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:f,...h}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in h){let t=h[e];void 0!==l[e]&&(0,u.i)(t)&&t.set(l[e])}}mount(e){this.current=e,x.R.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(E.O.current||(0,w.Ad)(),this.shouldReduceMotion=E.n.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),(0,_.Pn)(this.notifyUpdate),(0,_.Pn)(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let n;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let r=d.G.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&_.Wi.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"undefined"!=typeof window&&window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),n&&n(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in C){let t=C[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];
295t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):(0,b.dO)()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<T.length;t++){let n=T[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(let r in t){let i=t[r],o=n[r];if((0,u.i)(i))e.addValue(r,i);else if((0,u.i)(o))e.addValue(r,(0,l.BX)(i,{owner:e}));else if(o!==i){if(e.hasValue(r)){let t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,(0,l.BX)(void 0!==t?t:i,{owner:e}))}}}for(let r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=(0,l.BX)(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=n&&("string"==typeof n&&((0,r.P)(n)||(0,i.W)(n))?n=parseFloat(n):!y(n)&&f.P.test(t)&&(n=(0,v.T)(e,t)),this.setBaseTarget(e,(0,u.i)(n)?n.get():n)),(0,u.i)(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t;let{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let r=(0,k.o)(this.props,n,this.presenceContext?.custom);r&&(t=r[e])}if(n&&void 0!==t)return t;let r=this.getBaseTargetFromProps(this.props,e);return void 0===r||(0,u.i)(r)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new o.L),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){s.g.render(this.render)}}},47167:function(e,t,n){"use strict";n.d(t,{J:function(){return v}});var r=n(30876),i=n(45490),o=n(87634),s=n(11151),a=n(81758),l=n(63341);let u=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;var c=n(37221),d=n(51691),f=n(7336),h=n(7419);let p=new Set(["auto","none","0"]);var g=n(79606);class m extends c.e{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),(0,l.tm)(r))){let i=function e(t,n,r=1){(0,s.k)(r<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[i,o]=function(e){let t=u.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}(t);if(!i)return;let c=window.getComputedStyle(n).getPropertyValue(i);if(c){let e=c.trim();return(0,a.P)(e)?parseFloat(e):e}return(0,l.tm)(o)?e(o,n,r+1):o}(r,t.current);void 0!==i&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!i.z.has(n)||2!==e.length)return;let[r,c]=e,d=(0,o.C)(r),f=(0,o.C)(c);if((0,l.V3)(r)!==(0,l.V3)(c)&&g.lw[n]){this.needsMeasurement=!0;return}if(d!==f){if((0,g.mP)(d)&&(0,g.mP)(f))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else g.lw[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++){var r;(null===e[t]||("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||(0,d.W)(r)))&&n.push(t)}n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!p.has(t)&&(0,f.V)(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=(0,h.T)(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=g.lw[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,o=n[i];n[i]=g.lw[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
295h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}var y=n(95690);class v extends y.l9{constructor(){super(...arguments),this.KeyframeResolver=m}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;(0,r.i)(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}},98509:function(e,t,n){"use strict";n.d(t,{E$:function(){return c},RT:function(){return f},WK:function(){return d}});let r=e=>180*e/Math.PI,i=e=>s(r(Math.atan2(e[1],e[0]))),o={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:i,rotateZ:i,skewX:e=>r(Math.atan(e[1])),skewY:e=>r(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},s=e=>((e%=360)<0&&(e+=360),e),a=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),l=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),u={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:a,scaleY:l,scale:e=>(a(e)+l(e))/2,rotateX:e=>s(r(Math.atan2(e[6],e[5]))),rotateY:e=>s(r(Math.atan2(-e[2],e[0]))),rotateZ:i,rotate:i,skewX:e=>r(Math.atan(e[4])),skewY:e=>r(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function c(e){return e.includes("scale")?1:0}function d(e,t){let n,r;if(!e||"none"===e)return c(t);let i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(i)n=u,r=i;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=o,r=t}if(!r)return c(t);let s=n[t],a=r[1].split(",").map(h);return"function"==typeof s?s(a):a[s]}let f=(e,t)=>{let{transform:n="none"}=getComputedStyle(e);return d(n,t)};function h(e){return parseFloat(e.trim())}},50980:function(e,t,n){"use strict";function r(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}n.d(t,{D:function(){return r}})},32066:function(e,t,n){"use strict";n.d(t,{W:function(){return d}});var r=n(63341),i=n(38752),o=n(98509),s=n(30270),a=n(47167),l=n(86191),u=n(30678),c=n(90767);class d extends a.J{constructor(){super(...arguments),this.type="html",this.renderInstance=u.N}readValueFromInstance(e,t){if(i.G.has(t))return this.projection?.isProjecting?(0,o.E$)(t):(0,o.RT)(e,t);{let n=window.getComputedStyle(e),i=((0,r.f9)(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return(0,s.J)(e,t)}build(e,t,n){(0,l.r)(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return(0,c.U)(e,t,n)}}},86191:function(e,t,n){"use strict";n.d(t,{r:function(){return u}});let r=(e,t)=>t&&"number"==typeof e?t.transform(e):e;var i=n(95173),o=n(38752),s=n(63341);let a={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},l=o._.length;function u(e,t,n){let{style:u,vars:c,transformOrigin:d}=e,f=!1,h=!1;for(let e in t){let n=t[e];if(o.G.has(e)){f=!0;continue}if((0,s.f9)(e)){c[e]=n;continue}{let t=r(n,i.j[e]);e.startsWith("origin")?(h=!0,d[e]=t):u[e]=t}}if(!t.transform&&(f||n?u.transform=function(e,t,n){let s="",u=!0;for(let c=0;c<l;c++){let l=o._[c],d=e[l];if(void 0===d)continue;let f=!0;if("number"==typeof d)f=d===(l.startsWith("scale")?1:0);else{let e=parseFloat(d);f=l.startsWith("scale")?1===e:0===e}if(!f||n){let e=r(d,i.j[l]);if(!f){u=!1;let t=a[l]||l;s+=`${t}(${e}) `}n&&(t[l]=e)}}return s=s.trim(),n?s=n(t,u?"":s):u&&(s="none"),s}(t,e.transform,n):u.transform&&(u.transform="none")),h){let{originX:e="50%",originY:t="50%",originZ:n=0}=d;u.transformOrigin=`${e} ${t} ${n}`}}},30678:function(e,t,n){"use strict";function r(e,{style:t,vars:n},r,i){let o;let s=e.style;for(o in t)s[o]=t[o];for(o in i?.applyProjectionStyles(s,r),n)s.setProperty(o,n[o])}n.d(t,{N:function(){return r}})},90767:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var r=n(30876),i=n(86311);function o(e,t,n){let o=e.style,s=t?.style,a={};if(!o)return a;for(let t in o)((0,r.i)(o[t])||s&&(0,r.i)(s[t])||(0,i.jF)(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=o[t]);return a}},83413:function(e,t,n){"use strict";n.d(t,{R:function(){return r}});let r=new WeakMap},99478:function(e,t,n){"use strict";n.d(t,{e:function(){return h}});var r=n(38752),i=n(2148),o=n(28665),s=n(47167),a=n(50980),l=n(24406);let u=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var c=n(17489),d=n(30678),f=n(20791);class h extends s.J{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=o.dO}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(r.G.has(t)){let e=(0,i.A)(t);return e&&e.default||0}return t=u.has(t)?t:(0,a.D)(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return(0,f.U)(e,t,n)}
295build(e,t,n){(0,l.i)(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){for(let n in(0,d.N)(e,t,void 0,r),t.attrs)e.setAttribute(u.has(n)?n:(0,a.D)(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=(0,c.a)(e.tagName),super.mount(e)}}},24406:function(e,t,n){"use strict";n.d(t,{i:function(){return a}});var r=n(86191);let i={offset:"stroke-dashoffset",array:"stroke-dasharray"},o={offset:"strokeDashoffset",array:"strokeDasharray"},s=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function a(e,{attrX:t,attrY:n,attrScale:a,pathLength:l,pathSpacing:u=1,pathOffset:c=0,...d},f,h,p){if((0,r.r)(e,d,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:g,style:m}=e;for(let e of(g.transform&&(m.transform=g.transform,delete g.transform),(m.transform||g.transformOrigin)&&(m.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),m.transform&&(m.transformBox=p?.transformBox??"fill-box",delete g.transformBox),s))void 0!==g[e]&&(m[e]=g[e],delete g[e]);void 0!==t&&(g.x=t),void 0!==n&&(g.y=n),void 0!==a&&(g.scale=a),void 0!==l&&function(e,t,n=1,r=0,s=!0){e.pathLength=1;let a=s?i:o;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}(g,l,u,c,!1)}},17489:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});let r=e=>"string"==typeof e&&"svg"===e.toLowerCase()},20791:function(e,t,n){"use strict";n.d(t,{U:function(){return s}});var r=n(30876),i=n(38752),o=n(90767);function s(e,t,n){let s=(0,o.U)(e,t,n);for(let n in e)((0,r.i)(e[n])||(0,r.i)(t[n]))&&(s[-1!==i._.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return s}},8012:function(e,t,n){"use strict";function r(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}n.d(t,{H:function(){return r}})},12193:function(e,t,n){"use strict";n.d(t,{G:function(){return s},M:function(){return a}});var r=n(8012),i=n(80007),o=n(74483);function s(e){return(0,r.H)(e.animate)||o.V.some(t=>(0,i.$)(e[t]))}function a(e){return!!(s(e)||e.variants)}},86311:function(e,t,n){"use strict";n.d(t,{jF:function(){return o}});var r=n(38752),i=n(28404);function o(e,{layout:t,layoutId:n}){return r.G.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!i.P[e]||"opacity"===e)}},68494:function(e,t,n){"use strict";n.d(t,{C:function(){return r}});let r=e=>Array.isArray(e)},80007:function(e,t,n){"use strict";function r(e){return"string"==typeof e||Array.isArray(e)}n.d(t,{$:function(){return r}})},45490:function(e,t,n){"use strict";n.d(t,{z:function(){return r}});let r=new Set(["width","height","top","left","right","bottom",...n(38752)._])},38752:function(e,t,n){"use strict";n.d(t,{G:function(){return i},_:function(){return r}});let r=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],i=new Set(r)},48817:function(e,t,n){"use strict";n.d(t,{Ad:function(){return o}});var r=n(36668);let i="undefined"!=typeof window;function o(){if(r.O.current=!0,i){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>r.n.current=e.matches;e.addEventListener("change",t),t()}else r.n.current=!1}}},36668:function(e,t,n){"use strict";n.d(t,{O:function(){return i},n:function(){return r}});let r={current:null},i={current:!1}},78037:function(e,t,n){"use strict";n.d(t,{x:function(){return i}});var r=n(72583);function i(e,t,n){let i=e.getProps();return(0,r.o)(i,t,void 0!==n?n:i.custom,e)}},72583:function(e,t,n){"use strict";function r(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function i(e,t,n,i){if("function"==typeof t){let[o,s]=r(i);t=t(void 0!==n?n:e.custom,o,s)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[o,s]=r(i);t=t(void 0!==n?n:e.custom,o,s)}return t}n.d(t,{o:function(){return i}})},74483:function(e,t,n){"use strict";n.d(t,{V:function(){return i},e:function(){return r}});let r=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],i=["initial",...r]},9205:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});let r={layout:0,mainThread:0,waapi:0}},86792:function(e,t,n){"use strict";n.d(t,{f:function(){return r}});let r={value:null,addProjectionMetrics:null}},64605:function(e,t,n){"use strict";n.d(t,{s:function(){return c}});var r=n(48386),i=n(19676),o=n(47857),s=n(11151),a=n(22063),l=n(970),u=n(28532);function c(e,t,{clamp:n=!0,ease:c,mixer:d}={}){let f=e.length;if((0,s.k)(f===t.length,"Both input and output ranges must be the same length","range-length"),1===f)return()=>t[0];if(2===f&&t[0]===t[1])return()=>t[1];let h=e[0]===e[1];e[0]>e[f-1]&&(e=[...e].reverse(),t=[...t].reverse());let p=function(e,t,n){let s=[],a=n||r.c.mix||u.C,l=e.length-1;for(let n=0;n<l;n++){let r=a(e[n],e[n+1]);if(t){let e=Array.isArray(t)?t[n]||i.Z:t;r=(0,o.z)(e,r)}s.push(r)}return s}(t,c,d),g=p.length,m=n=>{if(h&&n<e[0])return t[0];let r=0;if(g>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=(0,a.Y)(e[r],e[r+1],n);return p[r](i)};return n?t=>m((0,l.u)(e[0],e[f-1],t)):m}},79240:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var r=n(6667);function i(e){return(0,r.K)(e)&&"offsetHeight"in e}},74802:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var r=n(6667);function i(e){return(0,r.K)(e)&&"ownerSVGElement"in e}},13389:function(e,t,n){"use strict";n.d(t,{r:function(){return i}});var r=n(74802);function i(e){return(0,r.v)(e)&&"svg"===e.tagName}},28532:function(e,t,n){"use strict";n.d(t,{C:function(){return _}});var r=n(47857),i=n(11151),o=n(63341),s=n(33883),a=n(7336),l=n(75802),u=n(94193);
295function c(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var d=n(99781);function f(e,t){return n=>n>0?t:e}var h=n(37600);let p=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},g=[l.$,d.m,u.J],m=e=>g.find(t=>t.test(e));function y(e){let t=m(e);if((0,i.K)(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===u.J&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=c(a,r,e+1/3),o=c(a,r,e),s=c(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(n)),n}let v=(e,t)=>{let n=y(e),r=y(t);if(!n||!r)return f(e,t);let i={...n};return e=>(i.red=p(n.red,r.red,e),i.green=p(n.green,r.green,e),i.blue=p(n.blue,r.blue,e),i.alpha=(0,h.t)(n.alpha,r.alpha,e),d.m.transform(i))},b=new Set(["none","hidden"]);function w(e,t){return n=>(0,h.t)(e,t,n)}function x(e){return"number"==typeof e?w:"string"==typeof e?(0,o.tm)(e)?f:s.$.test(e)?v:E:Array.isArray(e)?S:"object"==typeof e?s.$.test(e)?v:k:f}function S(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>x(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function k(e,t){let n={...e,...t},r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=x(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}let E=(e,t)=>{let n=a.P.createTransformer(t),o=(0,a.V)(e),s=(0,a.V)(t);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?b.has(e)&&!s.values.length||b.has(t)&&!o.values.length?b.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:(0,r.z)(S(function(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let o=t.types[i],s=e.indexes[o][r[o]],a=e.values[s]??0;n[i]=a,r[o]++}return n}(o,s),s.values),n):((0,i.K)(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),f(e,t))};function _(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?(0,h.t)(e,t,n):x(e)(e,t)}},37600:function(e,t,n){"use strict";n.d(t,{t:function(){return r}});let r=(e,t,n)=>e+(t-e)*n},73278:function(e,t,n){"use strict";function r(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>null!=e)}n.d(t,{I:function(){return r}})},81721:function(e,t,n){"use strict";n.d(t,{t:function(){return r}});let r=(0,n(8603).X)(()=>void 0!==window.ScrollTimeline)},36204:function(e,t,n){"use strict";n.d(t,{BX:function(){return c},S1:function(){return l}});var r=n(72859),i=n(91660),o=n(91451),s=n(4238);let a=e=>!isNaN(parseFloat(e)),l={current:void 0};class u{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=o.X.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=o.X.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=a(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new r.L);let n=this.events[e].add(t);return"change"===e?()=>{n(),s.Wi.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return l.current&&l.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=o.X.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return(0,i.R)(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function c(e,t){return new u(e,t)}},75802:function(e,t,n){"use strict";n.d(t,{$:function(){return i}});var r=n(99781);let i={test:(0,n(80603).i)("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alph
295a:i?parseInt(i,16)/255:1}},transform:r.m.transform}},94193:function(e,t,n){"use strict";n.d(t,{J:function(){return a}});var r=n(3791),i=n(58207),o=n(38599),s=n(80603);let a={test:(0,s.i)("hsl","hue"),parse:(0,s.d)("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+i.aQ.transform((0,o.N)(t))+", "+i.aQ.transform((0,o.N)(n))+", "+(0,o.N)(r.Fq.transform(s))+")"}},33883:function(e,t,n){"use strict";n.d(t,{$:function(){return s}});var r=n(75802),i=n(94193),o=n(99781);let s={test:e=>o.m.test(e)||r.$.test(e)||i.J.test(e),parse:e=>o.m.test(e)?o.m.parse(e):i.J.test(e)?i.J.parse(e):r.$.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?o.m.transform(e):i.J.transform(e),getAnimatableNone:e=>{let t=s.parse(e);return t.alpha=0,s.transform(t)}}},99781:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var r=n(970),i=n(3791),o=n(38599),s=n(80603);let a=e=>(0,r.u)(0,255,e),l={...i.Rx,transform:e=>Math.round(a(e))},u={test:(0,s.i)("rgb","red"),parse:(0,s.d)("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+l.transform(e)+", "+l.transform(t)+", "+l.transform(n)+", "+(0,o.N)(i.Fq.transform(r))+")"}},80603:function(e,t,n){"use strict";n.d(t,{i:function(){return o},d:function(){return s}});var r=n(24689);let i=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,o=(e,t)=>n=>!!("string"==typeof n&&i.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),s=(e,t,n)=>i=>{if("string"!=typeof i)return i;let[o,s,a,l]=i.match(r.K);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}}},17935:function(e,t,n){"use strict";n.d(t,{h:function(){return l}});var r=n(7336),i=n(24689);let o=new Set(["brightness","contrast","saturate","opacity"]);function s(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(i.K)||[];if(!r)return e;let s=n.replace(r,""),a=o.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+s+")"}let a=/\b([a-z-]*)\(.*?\)/gu,l={...r.P,getAnimatableNone:e=>{let t=e.match(a);return t?t.map(s).join(" "):e}}},7336:function(e,t,n){"use strict";n.d(t,{V:function(){return c},P:function(){return p}});var r=n(33883);let i=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;var o=n(24689),s=n(38599);let a="number",l="color",u=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function c(e){let t=e.toString(),n=[],i={color:[],number:[],var:[]},o=[],s=0,c=t.replace(u,e=>(r.$.test(e)?(i.color.push(s),o.push(l),n.push(r.$.parse(e))):e.startsWith("var(")?(i.var.push(s),o.push("var"),n.push(e)):(i.number.push(s),o.push(a),n.push(parseFloat(e))),++s,"${}")).split("${}");return{values:n,split:c,indexes:i,types:o}}function d(e){return c(e).values}function f(e){let{split:t,types:n}=c(e),i=t.length;return e=>{let o="";for(let u=0;u<i;u++)if(o+=t[u],void 0!==e[u]){let t=n[u];t===a?o+=(0,s.N)(e[u]):t===l?o+=r.$.transform(e[u]):o+=e[u]}return o}}let h=e=>"number"==typeof e?0:r.$.test(e)?r.$.getAnimatableNone(e):e,p={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(o.K)?.length||0)+(e.match(i)?.length||0)>0},parse:d,createTransformer:f,getAnimatableNone:function(e){let t=d(e);return f(e)(t.map(h))}}},87634:function(e,t,n){"use strict";n.d(t,{$:function(){return s},C:function(){return a}});var r=n(3791),i=n(58207),o=n(85834);let s=[r.Rx,i.px,i.aQ,i.RW,i.vw,i.vh,{test:e=>"auto"===e,parse:e=>e}],a=e=>s.find((0,o.l)(e))},2148:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(33883),i=n(17935);let o={...n(95173).j,color:r.$,backgroundColor:r.$,outlineColor:r.$,fill:r.$,stroke:r.$,borderColor:r.$,borderTopColor:r.$,borderRightColor:r.$,borderBottomColor:r.$,borderLeftColor:r.$,filter:i.h,WebkitFilter:i.h},s=e=>o[e]},95173:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var r=n(3791);let i={...r.Rx,transform:Math.round};var o=n(58207);let s={rotate:o.RW,rotateX:o.RW,rotateY:o.RW,rotateZ:o.RW,scale:r.bA,scaleX:r.bA,scaleY:r.bA,scaleZ:r.bA,skew:o.RW,skewX:o.RW,skewY:o.RW,distance:o.px,translateX:o.px,translateY:o.px,translateZ:o.px,x:o.px,y:o.px,z:o.px,perspective:o.px,transformPerspective:o.px,opacity:r.Fq,originX:o.$C,originY:o.$C,originZ:o.px},a={borderWidth:o.px,borderTopWidth:o.px,borderRightWidth:o.px,borderBottomWidth:o.px,borderLeftWidth:o.px,borderRadius:o.px,borderTopLeftRadius:o.px,borderTopRightRadius:o.px,borderBottomRightRadius:o.px,borderBottomLeftRadius:o.px,width:o.px,maxWidth:o.px,height:o.px,maxHeight:o.px,top:o.px,right:o.px,bottom:o.px,left:o.px,inset:o.px,insetBlock:o.px,insetBlockStart:o.px,insetBlockEnd:o.px,insetInline:o.px,insetInlineStart:o.px,insetInlineEnd:o.px,padding:o.px,paddingTop:o.px,paddingRight:o.px,paddingBottom:o.px,paddingLeft:o.px,paddingBlock:o.px,paddingBlockStart:o.px,paddingBlockEnd:o.px,paddingInline:o.px,paddingInlineStart:o.px,paddingInlineEnd:o.px,margin:o.px,marginTop:o.px,marginRight:o.px,marginBottom:o.px,marginLeft:o.px,marginBlock:o.px,marginBlockStart:o.px,marginBlockEnd:o.px,marginInline:o.px,marginInlineStart:o.px,marginInlineEnd:o.px,fontSize:o.px,backgroundPositionX:o.px,backgroundPositionY:o.px,...s,zIndex:i,fillOpacity:r.Fq,strokeOpacity:r.Fq,numOctaves:i}},3791:function(e,t,n){"use strict";n.d(t,{Fq:function(){return o},Rx:function(){return i},bA:function(){return s}});var r=n(970);let i={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},o={...i,transform:e=>(0,r.u)(0,1,e)},s={...i,default:1}},58207:function(e,t,n){"use strict";n.d(t,{$C:function(){return u},RW:function(){return i},aQ:function(){return o},px:function(){return s},vh:function(){return a},vw:function(){return l}});let r=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}
295),i=r("deg"),o=r("%"),s=r("px"),a=r("vh"),l=r("vw"),u={...o,parse:e=>o.parse(e)/100,transform:e=>o.transform(100*e)}},85834:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});let r=e=>t=>t.test(e)},7419:function(e,t,n){"use strict";n.d(t,{T:function(){return s}});var r=n(7336),i=n(17935),o=n(2148);function s(e,t){let n=(0,o.A)(e);return n!==i.h&&(n=r.P),n.getAnimatableNone?n.getAnimatableNone(t):void 0}},24689:function(e,t,n){"use strict";n.d(t,{K:function(){return r}});let r=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu},38599:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});let r=e=>Math.round(1e5*e)/1e5},30876:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});let r=e=>!!(e&&e.getVelocity)},37670:function(e,t,n){"use strict";n.d(t,{K:function(){return o}});var r=n(48386),i=n(30876);function o(e,t){let n=e.getValue("willChange");if((0,i.i)(n)&&n.add)return n.add(t);if(!n&&r.c.WillChange){let n=new r.c.WillChange("auto");e.addValue("willChange",n),n.add(t)}}},12268:function(e,t,n){"use strict";function r(e,t){-1===e.indexOf(t)&&e.push(t)}function i(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}n.d(t,{cl:function(){return i},y4:function(){return r}})},970:function(e,t,n){"use strict";n.d(t,{u:function(){return r}});let r=(e,t,n)=>n>t?t:n<e?e:n},38994:function(e,t,n){"use strict";n.d(t,{Bn:function(){return s},X7:function(){return a},Z7:function(){return o}});var r=n(80941),i=n(95714);let o=e=>1-Math.sin(Math.acos(e)),s=(0,i.M)(o),a=(0,r.o)(o)},80941:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});let r=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2},95714:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});let r=e=>t=>1-e(1-t)},46572:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});let r=e=>Array.isArray(e)&&"number"!=typeof e[0]},11151:function(e,t,n){"use strict";n.d(t,{K:function(){return r},k:function(){return i}}),n(68571);let r=()=>{},i=()=>{}},48386:function(e,t,n){"use strict";n.d(t,{c:function(){return r}});let r={}},81758:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});let r=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)},6667:function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e}n.d(t,{K:function(){return r}})},51691:function(e,t,n){"use strict";n.d(t,{W:function(){return r}});let r=e=>/^0[^.\s]+$/u.test(e)},8603:function(e,t,n){"use strict";function r(e){let t;return()=>(void 0===t&&(t=e()),t)}n.d(t,{X:function(){return r}})},19676:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=e=>e},47857:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});let r=(e,t)=>n=>t(e(n)),i=(...e)=>e.reduce(r)},22063:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});let r=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r}},72859:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(12268);class i{constructor(){this.subscriptions=[]}add(e){return(0,r.y4)(this.subscriptions,e),()=>(0,r.cl)(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}},53348:function(e,t,n){"use strict";n.d(t,{X:function(){return i},w:function(){return r}});let r=e=>1e3*e,i=e=>e/1e3},91660:function(e,t,n){"use strict";function r(e,t){return t?1e3/t*e:0}n.d(t,{R:function(){return r}})},89364:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});let r=e=>"object"==typeof e&&null!=e&&1===e.nodeType,i=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,o=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return i(n.overflowY,t)||i(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},s=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,a=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},l=(e,t)=>
295{var n,i,l,u;if("undefined"==typeof document)return[];let{scrollMode:c,block:d,inline:f,boundary:h,skipOverflowHiddenElements:p}=t,g="function"==typeof h?h:e=>e!==h;if(!r(e))throw TypeError("Invalid target");let m=document.scrollingElement||document.documentElement,y=[],v=e;for(;r(v)&&g(v);){if((v=a(v))===m){y.push(v);break}null!=v&&v===document.body&&o(v)&&!o(document.documentElement)||null!=v&&o(v,p)&&y.push(v)}let b=null!=(i=null==(n=window.visualViewport)?void 0:n.width)?i:innerWidth,w=null!=(u=null==(l=window.visualViewport)?void 0:l.height)?u:innerHeight,{scrollX:x,scrollY:S}=window,{height:k,width:E,top:_,right:T,bottom:C,left:A}=e.getBoundingClientRect(),{top:R,right:j,bottom:P,left:M}=(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),I="start"===d||"nearest"===d?_-R:"end"===d?C+P:_+k/2-R+P,O="center"===f?A+E/2-M+j:"end"===f?T+j:A-M,$=[];for(let e=0;e<y.length;e++){let t=y[e],{height:n,width:r,top:i,right:a,bottom:l,left:u}=t.getBoundingClientRect();if("if-needed"===c&&_>=0&&A>=0&&C<=w&&T<=b&&(t===m&&!o(t)||_>=i&&C<=l&&A>=u&&T<=a))break;let h=getComputedStyle(t),p=parseInt(h.borderLeftWidth,10),g=parseInt(h.borderTopWidth,10),v=parseInt(h.borderRightWidth,10),R=parseInt(h.borderBottomWidth,10),j=0,P=0,M="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-v:0,z="offsetHeight"in t?t.offsetHeight-t.clientHeight-g-R:0,L="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,N="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(m===t)j="start"===d?I:"end"===d?I-w:"nearest"===d?s(S,S+w,w,g,R,S+I,S+I+k,k):I-w/2,P="start"===f?O:"center"===f?O-b/2:"end"===f?O-b:s(x,x+b,b,p,v,x+O,x+O+E,E),j=Math.max(0,j+S),P=Math.max(0,P+x);else{j="start"===d?I-i-g:"end"===d?I-l+R+z:"nearest"===d?s(i,l,n,g,R+z,I,I+k,k):I-(i+n/2)+z/2,P="start"===f?O-u-p:"center"===f?O-(u+r/2)+M/2:"end"===f?O-a+v+M:s(u,a,r,p,v+M,O,O+E,E);let{scrollLeft:e,scrollTop:o}=t;j=0===N?0:Math.max(0,Math.min(o+j/N,t.scrollHeight-n/N+z)),P=0===L?0:Math.max(0,Math.min(e+P/L,t.scrollWidth-r/L+M)),I+=o-j,O+=e-P}$.push({el:t,top:j,left:P})}return $},u=e=>!1===e?{block:"end",inline:"nearest"}:e===Object(e)&&0!==Object.keys(e).length?e:{block:"start",inline:"nearest"};function c(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)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(l(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:i,top:o,left:s}of l(e,u(t))){let e=o-n.top+n.bottom,t=s-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}},83780:function(e,t,n){"use strict";n.d(t,{CR:function(){return u},FC:function(){return h},Jh:function(){return a},KL:function(){return p},XA:function(){return l},ZT:function(){return i},ev:function(){return d},fl:function(){return c},mG:function(){return s},pi:function(){return o},qq:function(){return f}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})}function a(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;
295function a(a){return function(l){return function(a){if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function l(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}function d(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function f(e){return this instanceof f?(this.v=e,this):new f(e)}function h(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||a(e,t)})},t&&(r[e]=t(r[e])))}function a(e,t){try{var n;(n=i[e](t)).value instanceof f?Promise.resolve(n.value.v).then(l,u):c(o[0][2],n)}catch(e){c(o[0][3],e)}}function l(e){a("next",e)}function u(e){a("throw",e)}function c(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function p(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=l(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError},84222:function(e,t,n){"use strict";n.d(t,{i:function(){return a}});var r=n(7653);let i=r.createContext(!0);function o(){throw Error("A function wrapped in useEffectEvent can't be called during rendering.")}let s=()=>{try{return r.use(i)}catch{return!1}};function a(e){let t=r.useRef(o);return r.useInsertionEffect(()=>{t.current=e},[e]),(...e)=>(s()&&o(),(0,t.current)(...e))}}}]);
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.