PageSourceSearch

https://www.dmfluxury.com/_next/static/chunks/6529.030f68669d72da9a.js

js dmfluxury.com collected 2026-10-07 15:46:21 UTC 419,860 bytes, 226 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6529],{74048:function(e,t,n){"use strict";n.d(t,{do:function(){return G}});var r,i,o,a=[],s="ResizeObserver loop completed with undelivered notifications.",l=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:s}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=s),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}(),h=function(e){return e instanceof SVGElement&&"getBBox"in e},f=function(e){if(h(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)},m=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},g="undefined"!=typeof window?window:{},y=new WeakMap,v=/auto|scroll/,b=/^tb|vertical/,x=/msie|trident/i.test(g.navigator&&g.navigator.userAgent),w=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(f(e))return y.set(e,k),k;var n=getComputedStyle(e),r=h(e)&&e.ownerSVGElement&&e.getBBox(),i=!x&&"border-box"===n.boxSizing,o=b.test(n.writingMode||""),a=!r&&v.test(n.overflowY||""),s=!r&&v.test(n.overflowX||""),l=r?0:w(n.paddingTop),c=r?0:w(n.paddingRight),p=r?0:w(n.paddingBottom),m=r?0:w(n.paddingLeft),g=r?0:w(n.borderTopWidth),E=r?0:w(n.borderRightWidth),C=r?0:w(n.borderBottomWidth),j=r?0:w(n.borderLeftWidth),A=m+c,_=l+p,T=j+E,M=g+C,R=s?e.offsetHeight-M-e.clientHeight:0,P=a?e.offsetWidth-T-e.clientWidth:0,I=r?r.width:w(n.width)-(i?A+T:0)-P,O=r?r.height:w(n.height)-(i?_+M:0)-R,$=I+A+P+T,D=O+_+R+M,L=u({devicePixelContentBoxSize:S(Math.round(I*devicePixelRatio),Math.round(O*devicePixelRatio),o),borderBoxSize:S($,D,o),contentBoxSize:S(I,O,o),contentRect:new d(m,l,I,O)});return y.set(e,L),L},C=function(e,t,n){var r=E(e,n),o=r.borderBoxSize,a=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case i.DEVICE_PIXEL_CONTENT_BOX:return s;case i.BORDER_BOX:return o;default:return a}},j=function(e){var t=E(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=u([t.borderBoxSize]),this.contentBoxSize=u([t.contentBoxSize]),this.devicePixelContentBoxSize=u([t.devicePixelContentBoxSize])},A=function(e){if(f(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},_=function(){var e=1/0,t=[];a.forEach(function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach(function(t){var n=new j(t.target),i=A(t.target);r.push(n),t.lastReportedSize=C(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},T=function(e){a.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(A(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},M=function(){var e=0;for(T(0);a.some(function(e){return e.activeTargets.length>0});)T(e=_());return a.some(function(e){return e.skippedTargets.length>0})&&l(),e>0},R=[],P=function(e){if(!o){var t=0,n=document.createTextNode("");
1new MutationObserver(function(){return R.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),o=function(){n.textContent="".concat(t?t--:t++)}}R.push(e),o()},I=function(e){P(function(){requestAnimationFrame(e)})},O=0,$={attributes:!0,characterData:!0,childList:!0,subtree:!0},D=["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,z=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=M()}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():g.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),D.forEach(function(t){return g.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),D.forEach(function(t){return g.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),V=function(e){!O&&e>0&&z.start(),(O+=e)||z.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=C(this.target,this.observedBox,!0);return h(e=this.target)||m(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},U=new WeakMap,H=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);U.set(e,n)},e.observe=function(e,t,n){var r=U.get(e),i=0===r.observationTargets.length;0>H(r.observationTargets,t)&&(i&&a.push(r),r.observationTargets.push(new F(t,n&&n.box)),V(1),z.schedule())},e.unobserve=function(e,t){var n=U.get(e),r=H(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&a.splice(a.indexOf(n),1),n.observationTargets.splice(r,1),V(-1))},e.disconnect=function(e){var t=this,n=U.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),G=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}()},23129:function(e,t,n){"use strict";let r,i,o;var a,s,l=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,h=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of d(t))f.call(e,i)||i===n||u(e,i,{get:()=>t[i],enumerable:!(r=c(t,i))||r.enumerable});return e},m={};((e,t)=>
1{for(var n in t)u(e,n,{get:t[n],enumerable:!0})})(m,{$dispatcherGuard:()=>A,$makeReadOnly:()=>T,$reset:()=>_,$structuralCheck:()=>O,c:()=>S,clearRenderCounterRegistry:()=>R,renderCounterRegistry:()=>M,useRenderCounter:()=>P}),e.exports=p(u({},"__esModule",{value:!0}),m);var g=(o=null!=(r=n(2265))?l(h(r)):{},p(!i&&r&&r.__esModule?o:u(o,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:v,isValidElement:b}=g,x=null!=(a=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?a:g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.memo_cache_sentinel"),S="function"==typeof(null==(s=g.__COMPILER_RUNTIME)?void 0:s.c)?g.__COMPILER_RUNTIME.c:function(e){return g.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=w;return t[w]=!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 C(e){return x.ReactCurrentDispatcher.current=e,x.ReactCurrentDispatcher.current}k.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var j=[];function A(e){let t=x.ReactCurrentDispatcher.current;if(0===e){if(j.push(t),1===j.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.");C(k)}else if(1===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===j.length&&(E=null),C(e)}else if(2===e)j.push(t),C(E);else if(3===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");C(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function _(e){for(let t=0;t<e.length;t++)e[t]=w}function T(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var M=new Map;function R(){for(let e of M.values())e.forEach(e=>{e.count=0})}function P(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=M.get(e))&&(n=new Set,M.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=M.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var I=new Set;function O(e,t,n,r,i,o){function a(e,t,a,s){let l=`${r}:${o} [${i}] ${n}${a} changed from ${e} to ${t} at depth ${s}`;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)a(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),s=Array.isArray(n);if(null===t&&null!==n)a("null",`type ${typeof n}`,r,i);else if(null===n)a(`type ${typeof t}`,"null",r,i);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,i);else for(let[o,s]of t)n.has(o)?e(s,n.get(o),`${r}.get(${o})`,i+1):a(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i)}else a("Map instance","other value",r,i)}else if(n instanceof Map)a("other value","Map instance",r,i);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(let e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i)}else a("Set instance","other value",r,i)}else if(n instanceof Set)a("other value","Set instance",r,i);else if(o||s){if(o!==s)a(`type ${o?"array":"object"}`,`type ${s?"array":"object"}`,r,i);else if(t.length!==n.length)a(`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)?a(`type ${b(t)?"React element":"object"}`,`type ${b(n)?"React element":"object"}`,r,i):t.type!==n.type?a(`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||a(`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):a(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&a(t,n,r,i)}}}(e,t,"",0)}},98259:function(e,t,n){"use strict";let r,i,o;var a,s,l=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,h=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of d(t))f.call(e,i)||i===n||u(e,i,{get:()=>t[i],enumerable:!(r=c(t,i))||r.enumerable});return e},m={};((e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})})(m,{$dispatcherGuard:()=>A,$makeReadOnly:()=>T,$reset:()=>_,$structuralCheck:()=>O,c:()=>S,clearRenderCounterRegistry:()=>R,renderCounterRegistry:()=>M,useRenderCounter:()=>P}),e.exports=p(u({},"__esModule",{value:!0}),m);var g=(o=null!=(r=n(2265))?l(h(r)):{},p(!i&&r&&r.__esModule?o:u(o,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:v,isValidElement:b}=g,x=null!=(a=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?a:g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.memo_cache_sentinel"),S="function"==typeof(null==(s=g.__COMPILER_RUNTIME)?void 0:s.c)?g.__COMPILER_RUNTIME.c:function(e){return g.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=w;return t[w]=!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 C(e){return x.ReactCurrentDispatcher.current=e,x.ReactCurrentDispatcher.current}k.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var j=[];function A(e){let t=x.ReactCurrentDispatcher.current;if(0===e){if(j.push(t),1===j.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.");C(k)}else if(1===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===j.length&&(E=null),C(e)}else if(2===e)j.push(t),C(E);else if(3===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");C(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function _(e){for(let t=0;t<e.length;t++)e[t]=w}function T(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var M=new Map;function R(){for(let e of M.values())e.forEach(e=>{e.count=0})}function P(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=M.get(e))&&(n=new Set,M.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=M.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var I=new Set;function O(e,t,n,r,i,o){function a(e,t,a,s){let l=`${r}:${o} [${i}] ${n}${a} changed from ${e} to ${t} at depth ${s}`;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)a(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),s=Array.isArray(n);if(null===t&&null!==n)a("null",`type ${typeof n}`,r,i);else if(null===n)a(`type ${typeof t}`,"null",r,i);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,i);else for(let[o,s]of t)n.has(o)?e(s,n.get(o),`${r}.get(${o})`,i+1):a(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i)}else a("Map instance","other value",r,i)}else if(n instanceof Map)a("other value","Map instance",r,i);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}
1`,r,i);else for(let e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i)}else a("Set instance","other value",r,i)}else if(n instanceof Set)a("other value","Set instance",r,i);else if(o||s){if(o!==s)a(`type ${o?"array":"object"}`,`type ${s?"array":"object"}`,r,i);else if(t.length!==n.length)a(`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)?a(`type ${b(t)?"React element":"object"}`,`type ${b(n)?"React element":"object"}`,r,i):t.type!==n.type?a(`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||a(`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):a(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&a(t,n,r,i)}}}(e,t,"",0)}},23910:function(e,t,n){var r=n(74288).Symbol;e.exports=r},73819:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},76378: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}},56569:function(e){e.exports=function(e){return e.split("")}},59652:function(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},54506:function(e,t,n){var r=n(23910),i=n(4479),o=n(80910),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},98880:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},99558:function(e){e.exports=function(e,t,n){var r=-1,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}},65020:function(e,t,n){var r=n(23910),i=n(73819),o=n(25614),a=n(78371),s=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(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-s?"-0":n}},91684:function(e,t,n){var r=n(99558);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)}},80675:function(e,t,n){var r=n(91684),i=n(14503),o=n(88551),a=n(3641);e.exports=function(e){return function(t){var n=i(t=a(t))?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return s[e]()+l}}},82638:function(e,t,n){var r=n(76378),i=n(42143),o=n(67512),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},62167:function(e,t,n){var r=n(98880)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=r},17071:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4479:function(e,t,n){var r=n(23910),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},14503:function(e){var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},27926:function(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},80910:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},74288:function(e,t,n){var r=n(17071),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},88551:function(e,t,n){var r=n(56569),i=n(14503),o=n(26364);e.exports=function(e){return i(e)?o(e):r(e)}},26364:function(e){var t="\ud800-\udfff",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\ud83c[\udffb-\udfff]",i="[^"+t+"]",o="(?:\ud83c[\udde6-\uddff]){2}",a="[\ud800-\udbff][\udc00-\udfff]",s="(?:"+n+"|"+r+")?",l="[\\ufe0e\\ufe0f]?",u="(?:\\u200d(?:"+[i,o,a].join("|")+")"+l+s+")*",c=RegExp(r+"(?="+r+")|(?:"+[i+n+"?",n,o,a,"["+t+"]"].join("|")+")"+(l+s+u),"g");e.exports=function(e){return e.match(c)||[]}},79269:function(e){var t="\ud800-\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",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",a="['’]",s="["+o+"]",l="["+r+"]",u="[^"+t+o+"\\d+"+n+r+i+"]",c="(?:\ud83c[\udde6-\uddff]){2}",d="[\ud800-\udbff][\udc00-\udfff]",h="["+i+"]",f="(?:"+l+"|"+u+")",p="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",m="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",y="[\\ufe0e\\ufe0f]?",v="(?:\\u200d(?:"+["[^"+t+"]",c,d].join("|")+")"+y+g+")*",b="(?:"+["["+n+"]",c,d].join("|")+")"+(y+g+v),x=RegExp([h+"?"+l+"+"+p+"(?="+[s,h,"$"].join("|")+")","(?:"+h+"|"+u+")+"+m+"(?="+[s,h+f,"$"].join("|")+")",h+"?"+f+"+"+p,h+"+"+m,"\\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(x)||[]}},42143:function(e,t,n){var r=n(62167),i=n(3641),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
17f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},25614:function(e){var t=Array.isArray;e.exports=t},10303:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},78371:function(e,t,n){var r=n(54506),i=n(10303);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},57685:function(e,t,n){var r=n(82638),i=n(75551),o=r(function(e,t,n){return e+(n?" ":"")+i(t)});e.exports=o},3641:function(e,t,n){var r=n(65020);e.exports=function(e){return null==e?"":r(e)}},75551:function(e,t,n){var r=n(80675)("toUpperCase");e.exports=r},67512:function(e,t,n){var r=n(59652),i=n(27926),o=n(3641),a=n(79269);e.exports=function(e,t,n){return(e=o(e),void 0===(t=n?void 0:t))?i(e)?a(e):r(e):e.match(t)||[]}},83238:function(e,t,n){"use strict";let r,i,o;var a,s,l=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,h=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of d(t))f.call(e,i)||i===n||u(e,i,{get:()=>t[i],enumerable:!(r=c(t,i))||r.enumerable});return e},m={};((e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})})(m,{$dispatcherGuard:()=>A,$makeReadOnly:()=>T,$reset:()=>_,$structuralCheck:()=>O,c:()=>S,clearRenderCounterRegistry:()=>R,renderCounterRegistry:()=>M,useRenderCounter:()=>P}),e.exports=p(u({},"__esModule",{value:!0}),m);var g=(o=null!=(r=n(2265))?l(h(r)):{},p(!i&&r&&r.__esModule?o:u(o,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:v,isValidElement:b}=g,x=null!=(a=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?a:g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.memo_cache_sentinel"),S="function"==typeof(null==(s=g.__COMPILER_RUNTIME)?void 0:s.c)?g.__COMPILER_RUNTIME.c:function(e){return g.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=w;return t[w]=!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 C(e){return x.ReactCurrentDispatcher.current=e,x.ReactCurrentDispatcher.current}k.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var j=[];function A(e){let t=x.ReactCurrentDispatcher.current;if(0===e){if(j.push(t),1===j.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.");C(k)}else if(1===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===j.length&&(E=null),C(e)}else if(2===e)j.push(t),C(E);else if(3===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");C(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function _(e){for(let t=0;t<e.length;t++)e[t]=w}function T(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var M=new Map;function R(){for(let e of M.values())e.forEach(e=>{e.count=0})}function P(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=M.get(e))&&(n=new Set,M.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=M.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var I=new Set;function O(e,t,n,r,i,o){function a(e,t,a,s){let l=`${r}:${o} [${i}] ${n}${a} changed from ${e} to ${t} at depth ${s}`;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)a(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),s=Array.isArray(n);if(null===t&&null!==n)a("null",`type ${typeof n}`,r,i);else if(null===n)a(`type ${typeof t}`,"null",r,i);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}
1`,r,i);else for(let[o,s]of t)n.has(o)?e(s,n.get(o),`${r}.get(${o})`,i+1):a(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i)}else a("Map instance","other value",r,i)}else if(n instanceof Map)a("other value","Map instance",r,i);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(let e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i)}else a("Set instance","other value",r,i)}else if(n instanceof Set)a("other value","Set instance",r,i);else if(o||s){if(o!==s)a(`type ${o?"array":"object"}`,`type ${s?"array":"object"}`,r,i);else if(t.length!==n.length)a(`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)?a(`type ${b(t)?"React element":"object"}`,`type ${b(n)?"React element":"object"}`,r,i):t.type!==n.type?a(`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||a(`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):a(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&a(t,n,r,i)}}}(e,t,"",0)}},59679: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"),a=Symbol.for("react.profiler"),s=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"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case c:case d:case p:return e;default:switch(e=e&&e.$$typeof){case l:case u:case f:case h:case s:return e;default:return t}}case r:return t}}}t.ContextConsumer=s,t.ContextProvider=l,t.Element=n,t.ForwardRef=u,t.Fragment=i,t.Lazy=f,t.Memo=h,t.Portal=r,t.Profiler=a,t.StrictMode=o,t.Suspense=c,t.SuspenseList=d,t.isContextConsumer=function(e){return g(e)===s},t.isContextProvider=function(e){return g(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return g(e)===u},t.isFragment=function(e){return g(e)===i},t.isLazy=function(e){return g(e)===f},t.isMemo=function(e){return g(e)===h},t.isPortal=function(e){return g(e)===r},t.isProfiler=function(e){return g(e)===a},t.isStrictMode=function(e){return g(e)===o},t.isSuspense=function(e){return g(e)===c},t.isSuspenseList=function(e){return g(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===o||e===c||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===m||void 0!==e.getModuleId)},t.typeOf=g},82558:function(e,t,n){"use strict";e.exports=n(59679)},80717:function(e,t,n){"use strict";n.d(t,{f6:function(){return ts},iv:function(){return tp},F4:function(){return tv},zo:function(){return tg},Fg:function(){return ta}});var r,i,o,a=n(2265),s="-ms-",l="-moz-",u="-webkit-",c="comm",d="rule",h="decl",f="@keyframes",p=Math.abs,m=String.fromCharCode,g=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 x(e,t){return 0|e.charCodeAt(t)}function w(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 C=1,j=1,A=0,_=0,T=0,M="";function R(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:C,column:j,length:a,return:"",siblings:s}}function P(e,t){return g(R("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function I(e){for(;e.root;)e=P(e.root,{children:[e]});k(e,e.siblings)}function O(){return T=_<A?x(M,_++):0,j++,10===T&&(j=1,C++),T}function $(){return x(M,_)}function D(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=_-1,n=function e(t){for(;O();)switch(T){case t:return _;case 34:case 39:34!==t&&39!==t&&e(T);break;case 40:41===t&&e(t);break;case 92:O()}return _}(91===e?e+2:40===e?e+1:e),w(M,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 z(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case h:return e.return=e.return||e.value;case c:return"";case f: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 h:e.return=function e(t,n,r){var i;switch(i=n,45^x(t,0)?(((i<<2^x(t,0))<<2^x(t,1))<<2^x(t,2))<<2^x(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;
1case 5349:case 4246:case 4810:case 6968:case 2756:return u+t+l+t+s+t+t;case 5936:switch(x(t,n+11)){case 114:return u+t+s+v(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return u+t+s+v(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return u+t+s+v(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return u+t+s+t+t;case 6165:return u+t+s+"flex-"+t+t;case 5187:return u+t+v(t,/(\w+).+(:[^]+)/,u+"box-$1$2"+s+"flex-$1$2")+t;case 5443:return u+t+s+"flex-item-"+v(t,/flex-|-self/g,"")+(y(t,/flex-|baseline/)?"":s+"grid-row-"+v(t,/flex-|-self/g,""))+t;case 4675:return u+t+s+"flex-line-pack"+v(t,/align-content|flex-|-self/g,"")+t;case 5548:return u+t+s+v(t,"shrink","negative")+t;case 5292:return u+t+s+v(t,"basis","preferred-size")+t;case 6060:return u+"box-"+v(t,"-grow","")+u+t+s+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"+s+"flex-pack:$3"),/space-between/,"justify")+u+t+t;case 4200:if(!y(t,/flex-|baseline/))return s+"grid-column-align"+w(t,n)+t;break;case 2592:case 3360:return s+v(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,y(e.props,/grid-\w+-end/)}))return~b(t+(r=r[n].value),"span",0)?t:s+v(t,"-start","")+t+s+"grid-row-span:"+(~b(r,"span",0)?y(r,/\d+/):+y(r,/\d+/)-+y(t,/\d+/))+";";return s+v(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return y(e.props,/grid-\w+-start/)})?t:s+v(v(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return v(t,/(.+)-inline(.+)/,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(x(t,n+1)){case 109:if(45!==x(t,n+4))break;case 102:return v(t,/(.+:)(.+)-([^]+)/,"$1"+u+"$2-$3$1"+l+(108==x(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,a,l){return s+n+":"+r+l+(i?s+n+"-span:"+(o?a:+a-+r)+l:"")+t});case 4949:if(121===x(t,n+6))return v(t,":",":"+u)+t;break;case 6444:switch(x(t,45===x(t,14)?18:11)){case 120:return v(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+u+(45===x(t,14)?"inline-":"")+"box$3$1"+u+"$2$3$1"+s+"$2box$3")+t;case 100:return v(t,":",":"+s)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return v(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n);return;case f:return N([P(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(P(e,{props:[v(t,/:(read-\w+)/,":"+l+"$1")]})),I(P(e,{props:[t]})),g(e,{props:E(n,r)});break;case"::placeholder":I(P(e,{props:[v(t,/:(plac\w+)/,":"+u+"input-$1")]})),I(P(e,{props:[v(t,/:(plac\w+)/,":"+l+"$1")]})),I(P(e,{props:[v(t,/:(plac\w+)/,s+"input-$1")]})),I(P(e,{props:[t]})),g(e,{props:E(n,r)})}return""},i.map(o).join("")}}}function F(e,t,n,r,i,o,a,s,l,u,c,h){for(var f=i-1,m=0===i?o:[""],g=m.length,y=0,b=0,x=0;y<r;++y)for(var S=0,k=w(e,f+1,f=p(b=a[y])),E=e;S<g;++S)(E=(b>0?m[S]+" "+k:v(k,/&\f/g,m[S])).trim())&&(l[x++]=E);return R(e,t,n,0===i?d:s,l,u,c,h)}function B(e,t,n,r,i){return R(e,t,n,h,w(e,0,r),w(e,r+1,-1),r,i)}var U=n(25566);let H=void 0!==U&&void 0!==U.env&&(U.env.REACT_APP_SC_ATTR||U.env.SC_ATTR)||"data-styled",W="active",G="data-styled-version",Y="6.5.3",q="/*!sc*/\n",X="undefined"!=typeof window&&"undefined"!=typeof document;function Z(e){if(void 0!==U&&void 0!==U.env){let t=U.env[e];if(void 0!==t&&""!==t)return"false"!==t}}let K=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(i=null!==(r=Z("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==r?r:Z("SC_DISABLE_SPEEDY"))&&void 0!==i?i:void 0!==U&&void 0!==U.env&&!1),Q="sc-keyframes-";function J(e,...t){return Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let ee=new Map,et=new Map,en=1,er=e=>{if(ee.has(e))return ee.get(e);for(;et.has(en);)en++;let t=en++;return ee.set(e,t),et.set(t,e),t},ei=e=>et.get(e),eo=(e,t)=>{en=t+1,ee.set(e,t),et.set(t,e)},ea=Object.freeze([]),es=Object.freeze({}),el=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,eu=/(^-|-$)/g;function ec(e){return e.replace(el,"-").replace(eu,"")}
1let ed=/(a)(d)/gi,eh=e=>String.fromCharCode(e+(e>25?39:97));function ef(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=eh(t%52)+n;return(eh(t%52)+n).replace(ed,"$1-$2")}let ep=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},em=e=>ep(5381,e);function eg(e){return"string"==typeof e}let ey=Symbol.for("react.memo"),ev=Symbol.for("react.forward_ref"),eb={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},ex={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ew={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eS={[ev]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[ey]:ew};function ek(e){return("type"in e&&e.type.$$typeof)===ey?ew:"$$typeof"in e?eS[e.$$typeof]:eb}let eE=Object.defineProperty,eC=Object.getOwnPropertyNames,ej=Object.getOwnPropertySymbols,eA=Object.getOwnPropertyDescriptor,e_=Object.getPrototypeOf,eT=Object.prototype;function eM(e){return"function"==typeof e}let eR=Symbol.for("react.forward_ref");function eP(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&e.$$typeof===eR&&"styledComponentId"in e}function eI(e,t){return e&&t?e+" "+t:e||t||""}function eO(e,t){return e.join(t||"")}function e$(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eD(e,t){Object.defineProperty(e,"toString",{value:t})}let eL=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){let t=this.groupSizes,n=t.length,r=n;for(;e>=r;)if((r<<=1)<0)throw J(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,o=t.length;i<o;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){let t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;let n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;e<i;e++)t+=this.tag.getRule(e)+q;return t}},eN=`style[${H}][${G}="${Y}"]`,ez=RegExp(`^${H}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),eV=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,eF=e=>{if(!e)return document;if(eV(e))return e;if("getRootNode"in e){let t=e.getRootNode();if(eV(t))return t}return document},eB=(e,t,n)=>{let r;let i=n.split(",");for(let n=0,o=i.length;n<o;n++)(r=i[n])&&e.registerName(t,r)},eU=(e,t)=>{var n;let r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(q),i=[];for(let t=0,n=r.length;t<n;t++){let n=r[t].trim();if(!n)continue;let o=n.match(ez);if(o){let t=0|parseInt(o[1],10),n=o[2];0!==t&&(eo(n,t),eB(e,n,o[3]),e.getTag().insertRules(t,i)),i.length=0}else i.push(n)}},eH=e=>{let t=eF(e.options.target).querySelectorAll(eN);for(let n=0,r=t.length;n<r;n++){let r=t[n];r&&r.getAttribute(H)!==W&&(eU(e,r),r.parentNode&&r.parentNode.removeChild(r))}},eW=!1,eG=(e,t)=>{let r=document.head,i=e||r,o=document.createElement("style"),a=(e=>{let t=Array.from(e.querySelectorAll(`style[${H}]`));return t[t.length-1]})(i),s=void 0!==a?a.nextSibling:null;o.setAttribute(H,W),o.setAttribute(G,Y);let l=t||function(){if(!1!==eW)return eW;if("undefined"!=typeof document){let e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return eW=e.nonce||e.getAttribute("content")||void 0;let t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return eW=t.getAttribute("content")||void 0}return eW=n.nc}();return l&&o.setAttribute("nonce",l),i.insertBefore(o,s),o},eY=class{constructor(e,t){this.element=eG(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;let n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r.ownerNode===e)return r}throw J(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){let t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}}
1,eq=class{constructor(e,t){this.element=eG(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){let n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}},eX=X,eZ={isServer:!X,useCSSOMInjection:!K};class eK{static registerId(e){return er(e)}constructor(e=es,t={},n){this.options=Object.assign(Object.assign({},eZ),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&X&&eX&&(eX=!1,eH(this)),eD(this,()=>(e=>{let t=e.getTag(),{length:n}=t,r="";for(let i=0;i<n;i++){let n=ei(i);if(void 0===n)continue;let o=e.names.get(n);if(void 0===o||!o.size)continue;let a=t.getGroup(i);if(0===a.length)continue;let s=H+".g"+i+'[id="'+n+'"]',l="";for(let e of o)e.length>0&&(l+=e+",");r+=a+s+'{content:"'+l+'"}'+q}return r})(this))}rehydrate(){!this.server&&X&&eH(this)}reconstructWithOptions(e,t=!0){let n=new eK(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&X&&e.target!==this.options.target&&eF(this.options.target)!==eF(e.target)&&eH(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=new eL((({useCSSOMInjection:e,target:t,nonce:n})=>e?new eY(t,n):new eq(t,n))(this.options)))}hasNameForId(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}registerName(e,t){er(e),e.startsWith(Q)&&this.keyframeIds.add(e);let n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(er(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(er(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}let eQ=new WeakSet,eJ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart: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};function e0(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}let e1=Symbol.for("sc-keyframes");function e2(e){return eM(e)&&!(e.prototype&&e.prototype.isReactComponent)}let e5=e=>null==e||!1===e||""===e,e3=Symbol.for("react.client.reference");function e4(e){return e.$$typeof===e3}function e6(e,t,n,r,i=[]){if(e5(e))return i;let o=typeof e;if("string"===o)return i.push(e),i;if("function"===o)return e4(e)?i:e2(e)&&t?e6(e(t),t,n,r,i):(i.push(e),i);if(Array.isArray(e)){for(let o=0;o<e.length;o++)e6(e[o],t,n,r,i);return i}return eP(e)?i.push(`.${e.styledComponentId}`):"object"==typeof e&&null!==e&&e1 in e?n?(e.inject(n,r),i.push(e.getName(r))):i.push(e):e4(e)||(e$(e)?e.toString!==Object.prototype.toString?i.push(e.toString()):function e(t,n){for(let r in t){let i=t[r];t.hasOwnProperty(r)&&!e5(i)&&(Array.isArray(i)&&eQ.has(i)||eM(i)?n.push(e0(r)+":",i,";"):e$(i)?(n.push(r+" {"),e(i,n),n.push("}")):n.push(e0(r)+": "+(null==i||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in eJ||r.startsWith("--")?String(i).trim():i+"px")+";"))}}(e,i):i.push(e.toString())),i}let e9=em(Y);class e8{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=ep(e9,t),this.baseStyle=n,eK.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let i="";for(let r=0;r<this.rules.length;r++){let o=this.rules[r];if("string"==typeof o)i+=o;else if(o){if(e2(o)){let r=o(e);"string"==typeof r?i+=r:null!=r&&!1!==r&&(i+=eO(e6(r,e,t,n)))}else i+=eO(e6(o,e,t,n))}}
1if(i){this.dynamicNameCache||(this.dynamicNameCache=new Map);let e=n.hash?n.hash+i:i,o=this.dynamicNameCache.get(e);if(!o){if(o=ef(ep(ep(this.baseHash,n.hash),i)>>>0),this.dynamicNameCache.size>=200){let e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,o)}if(!t.hasNameForId(this.componentId,o)){let e=n(i,"."+o,void 0,this.componentId);t.insertRules(this.componentId,o,e)}r=eI(r,o)}}return r}}let e7=/&/g;function te(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function tt(e){let t=e.length,n="",r=0,i=0,o=0,a=!1,s=!1;for(let l=0;l<t;l++){let u=e.charCodeAt(l);if(0!==o||a||47!==u||42!==e.charCodeAt(l+1)){if(a)42===u&&47===e.charCodeAt(l+1)&&(a=!1,l++);else if(34!==u&&39!==u||te(e,l)){if(0===o){if(123===u)i++;else if(125===u){if(--i<0){s=!0;let n=l+1;for(;n<t;){let t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,i=0,l=n-1,r=n;continue}0===i&&(n+=e.substring(r,l+1),r=l+1)}else 59===u&&0===i&&(n+=e.substring(r,l+1),r=l+1)}}else 0===o?o=u:o===u&&(o=0)}else a=!0,l++}return s||0!==i||0!==o?(r<t&&0===i&&0===o&&(n+=e.substring(r)),n):e}let tn=new eK,tr=function({options:e=es,plugins:t=ea}=es){var n,r,i;let o,a,s;let l=(e,t,n)=>n.startsWith(a)&&n.endsWith(a)&&n.replaceAll(a,"").length>0?`.${o}`:e,u=t.slice();u.push(e=>{e.type===d&&e.value.includes("&")&&(s||(s=RegExp(`\\${a}\\b`,"g")),e.props[0]=e.props[0].replace(e7,a).replace(s,l))}),e.prefix&&u.push(V),u.push(z);let h=[],f=(i=(r=u.concat((n=e=>h.push(e),function(e){!e.root&&(e=e.return)&&n(e)}))).length,function(e,t,n,o){for(var a="",s=0;s<i;s++)a+=r[s](e,t,n,o)||"";return a}),g=(t,n="",r="",i="&")=>{var l,u,d;o=i,a=n,s=void 0;let g=function(e){let t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return tt(e);let r=e.length,i="",o=0,a=0,s=0,l=0,u=0,c=!1;for(;a<r;){let t=e.charCodeAt(a);if(34!==t&&39!==t||te(e,a)){if(0===s){if(47===t&&a+1<r&&42===e.charCodeAt(a+1)){for(a+=2;a+1<r&&(42!==e.charCodeAt(a)||47!==e.charCodeAt(a+1));)a++;a+=2}else if(40!==t){if(41!==t){if(l>0)a++;else if(42===t&&a+1<r&&47===e.charCodeAt(a+1))i+=e.substring(o,a),a+=2,o=a,c=!0;else if(47===t&&a+1<r&&47===e.charCodeAt(a+1)){for(i+=e.substring(o,a);a<r&&10!==e.charCodeAt(a);)a++;o=a,c=!0}else 123===t?u++:125===t&&u--,a++}else l>0&&l--,a++}else l++,a++}else a++}else 0===s?s=t:s===t&&(s=0),a++}return c?(o<r&&(i+=e.substring(o)),0===u?i:tt(i)):0===u?e:tt(e)}(t),y=(d=function e(t,n,r,i,o,a,s,l,u){for(var d,h=0,f=0,g=s,y=0,E=0,A=0,P=1,I=1,N=1,z=0,V="",U=o,H=a,W=i,G=V;I;)switch(A=z,z=O()){case 40:if(108!=A&&58==x(G,g-1)){-1!=b(G+=v(L(z),"&","&\f"),"&\f",p(h?l[h-1]:0))&&(N=-1);break}case 34:case 39:case 91:G+=L(z);break;case 9:case 10:case 13:case 32:G+=function(e){for(;T=$();)if(T<33)O();else break;return D(e)>2||D(T)>3?"":" "}(A);break;case 92:G+=function(e,t){for(var n;--t&&O()&&!(T<48)&&!(T>102)&&(!(T>57)||!(T<65))&&(!(T>70)||!(T<97)););return n=_+(t<6&&32==$()&&32==O()),w(M,e,n)}(_-1,7);continue;case 47:switch($()){case 42:case 47:k(R(d=function(e,t){for(;O();)if(e+T===57)break;else if(e+T===84&&47===$())break;return"/*"+w(M,t,_-1)+"*"+m(47===e?e:O())}(O(),_),n,r,c,m(T),w(d,2,-2),0,u),u),(5==D(A||1)||5==D($()||1))&&S(G)&&" "!==w(G,-1,void 0)&&(G+=" ");break;default:G+="/"}break;case 123*P:l[h++]=S(G)*N;case 125*P:case 59:case 0:switch(z){case 0:case 125:I=0;case 59+f:-1==N&&(G=v(G,/\f/g,"")),E>0&&(S(G)-g||0===P&&47===A)&&k(E>32?B(G+";",i,r,g-1,u):B(v(G," ","")+";",i,r,g-2,u),u);break;case 59:G+=";";default:if(k(W=F(G,n,r,h,f,o,l,V,U=[],H=[],g,a),a),123===z){if(0===f)e(G,n,W,W,U,a,g,l,H);else{switch(y){case 99:if(110===x(G,3))break;case 108:if(97===x(G,2))break;default:f=0;case 100:case 109:case 115:}f?e(t,W,W,i&&k(F(t,W,W,0,0,o,l,V,o,U=[],g,H),H),o,H,g,l,i?U:H):e(G,W,W,W,[""],H,0,l,H)}}}h=f=E=0,P=N=1,V=G="",g=s;break;case 58:g=1+S(G),E=A;default:if(P<1){if(123==z)--P;else if(125==z&&0==P++&&125==(T=_>0?x(M,--_):0,j--,10===T&&(j=1,C--),T))continue}switch(G+=m(z),z*P){case 38:N=f>0?1:(G+="\f",-1);break;case 44:l[h++]=(S(G)-1)*N,N=1;break;case 64:45===$()&&(G+=L(O())),y=$(),f=g=S(V=G+=function(e){for(;!D($());)O();return w(M,e,_)}(_)),z++;break;case 45:45===A&&2==S(G)&&(P=0)}}return a}("",null,null,null,[""],(u=l=r||n?r+" "+n+" { "+g+" }":g,C=j=1,A=S(M=u),_=0,l=[]),0,[0],l),M="",d);return e.namespace&&(y=function e(t,n){let r=n+" ",i=","+r;for(let o=0;o<t.length;o++){let a=t[o];if("rule"===a.type){a.value=(r+a.value).replaceAll(",",i);let e=a.props,t=[];for(let n=0;n<e.length;n++)t[n]=r+e[n];a.props=t}Array.isArray(a.children)&&"@keyframes"!==a.type&&e(a.children,n)}return t}(y,e.namespace)),h=[],N(y,f),h},y=5381;for(let e=0;e<t.length;e++)t[e].name||J(15),y=ep(y,t[e].name);return(null==e?void 0:e.namespace)&&(y=ep(y,e.namespace)),(null==e?void 0:e.prefix)&&(y=ep(y,"p")),g.hash=5381!==y?y.toString():"",g}(),ti=a.createContext({shouldForwardProp:void 0,styleSheet:tn,stylis:tr,stylisPlugins:void 0});ti.Consumer;let to=a.createContext(void 0);function ta(){let e=a.useContext(to);if(!e)throw J(18);return e}function ts(e){let t=a.useContext(to),n=a.useMemo(()=>(function(e,t){if(!e)throw J(14);if(eM(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw J(8);return t?Object.assign(Object.assign({},t),e):e})(e.theme,t),[e.theme,t]);return e.children?a.createElement(to.Provider,{value:n},e.children):null}to.Consumer;let tl=Object.prototype.hasOwnProperty,tu={};
1function tc(e,t,n){let r=eP(e),i=!eg(e),{attrs:o=ea,componentId:s=function(e,t){let n="string"!=typeof e?"sc":ec(e);tu[n]=(tu[n]||0)+1;let r=n+"-"+ef(em(Y+n+tu[n])>>>0);return t?t+"-"+r:r}(t.displayName,t.parentComponentId),displayName:l=eg(e)?`styled.${e}`:`Styled(${e.displayName||e.name||"Component"})`}=t,u=t.displayName&&t.componentId?ec(t.displayName)+"-"+t.componentId:t.componentId||s,c=r&&e.attrs?e.attrs.concat(o).filter(Boolean):o,{shouldForwardProp:d}=t;if(r&&e.shouldForwardProp){let n=e.shouldForwardProp;if(t.shouldForwardProp){let e=t.shouldForwardProp;d=(t,r)=>n(t,r)&&e(t,r)}else d=n}let h=new e8(n,u,r?e.componentStyle:void 0);function f(e,t){return function(e,t,n){let r,i;let{attrs:o,componentStyle:s,defaultProps:l,foldedComponentIds:u,styledComponentId:c,target:d}=e,h=a.useContext(to),f=a.useContext(ti),p=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n=es){return e.theme!==n.theme&&e.theme||t||n.theme}(t,h,l)||es;{let e=a.useRef(null),n=e.current;if(null!==n&&n[1]===m&&n[2]===f.styleSheet&&n[3]===f.stylis&&n[7]===s&&function(e,t,n){let r=0;for(let n in t)if(tl.call(t,n)&&(r++,e[n]!==t[n]))return!1;return r===n}(n[0],t,n[4]))r=n[5],i=n[6];else{r=function(e,t,n){let r=Object.assign(Object.assign({},t),{className:void 0,theme:n}),i=e.length>1;for(let n=0;n<e.length;n++){let o=e[n],a=eM(o)?o(i?Object.assign({},r):r):o;for(let e in a)"className"===e?r.className=eI(r.className,a[e]):"style"===e?r.style=Object.assign(Object.assign({},r.style),a[e]):e in t&&void 0===t[e]||(r[e]=a[e])}return"className"in t&&"string"==typeof t.className&&(r.className=eI(r.className,t.className)),r}(o,t,m),i=s.generateAndInjectStyles(r,f.styleSheet,f.stylis);let n=0;for(let e in t)tl.call(t,e)&&n++;e.current=[t,m,f.styleSheet,f.stylis,n,r,i,s]}}let g=r.as||d,y=function(e,t,n,r){let i={};for(let o in e)void 0===e[o]||"$"===o[0]||"as"===o||"theme"===o&&e.theme===n||("forwardedAs"===o?i.as=e.forwardedAs:r&&!r(o,t)||(i[o]=e[o]));return i}(r,g,m,p),v=eI(u,c);return i&&(v+=" "+i),r.className&&(v+=" "+r.className),y[eg(g)&&g.includes("-")?"class":"className"]=v,n&&(y.ref=n),(0,a.createElement)(g,y)}(p,e,t)}f.displayName=l;let p=a.forwardRef(f);return p.attrs=c,p.componentStyle=h,p.displayName=l,p.shouldForwardProp=d,p.foldedComponentIds=r?eI(e.foldedComponentIds,e.styledComponentId):"",p.styledComponentId=u,p.target=r?e.target:e,Object.defineProperty(p,"defaultProps",{get(){return this._foldedDefaultProps},set(t){this._foldedDefaultProps=r?function(e,...t){for(let n of t)(function e(t,n,r=!1){if(!r&&!e$(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(let r=0;r<n.length;r++)t[r]=e(t[r],n[r]);else if(e$(n))for(let r in n)t[r]=e(t[r],n[r]);return t})(e,n,!0);return e}({},e.defaultProps,t):t}}),eD(p,()=>`.${p.styledComponentId}`),i&&function e(t,n,r){if("string"!=typeof n){let i=e_(n);i&&i!==eT&&e(t,i,r);let o=eC(n).concat(ej(n)),a=ek(t),s=ek(n);for(let e=0;e<o.length;++e){let i=o[e];if(!(i in ex||r&&r[i]||s&&i in s||a&&i in a)){let e=eA(n,i);try{eE(t,i,e)}catch(e){}}}}return t}(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),p}var td=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"]);function th(e,t){let n=[e[0]];for(let r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}let tf=e=>(eQ.add(e),e);function tp(e,...t){return eM(e)||e$(e)?tf(e6(th(ea,[e,...t]))):0===t.length&&1===e.length&&"string"==typeof e[0]?e6(e):tf(e6(th(e,t)))}let tm=e=>(function e(t,n,r=es){if(!n)throw J(1,n);let i=(e,...i)=>t(n,r,tp(e,...i));return i.attrs=i=>e(t,n,Object.assign(Object.assign({}
1,r),{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)})),i.withConfig=i=>e(t,n,Object.assign(Object.assign({},r),i)),i})(tc,e),tg=tm;td.forEach(e=>{tg[e]=tm(e)});class ty{constructor(e,t){this[o]=!0,this.inject=(e,t=tr)=>{let n=this.getName(t);if(!e.hasNameForId(this.id,n)){let r=t(this.rules,n,"@keyframes");e.insertRules(this.id,n,r)}},this.name=e,this.id=Q+e,this.rules=t,er(this.id),eD(this,()=>{throw J(12,String(this.name))})}getName(e=tr){return e.hash?this.name+ef(+e.hash>>>0):this.name}}function tv(e,...t){let n=eO(tp(e,...t));return new ty(ef(em(n)>>>0),n)}o=e1},79824:function(e,t,n){"use strict";n.d(t,{fi:function(){return ec},BA:function(){return eh},aQ:function(){return m}});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"}}},a={avatar:{sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},button:{textWeight:"medium",border:{width:1},focusRing:{offset:-1,width:1}},card:{border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},container:[320,640,960,1280,1600,1920],media:[360,600,900,1200,1800,2400],layer:{dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},radius:[0,1,3,6,9,12,21],shadow:[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-2],penumbra:[0,6,10,0],ambient:[0,1,18,1]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:[0,4,8,12,20,32,52,84,136,220],input:{border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}}
1,radio:{size:17,markSize:9,focusRing:{offset:-1,width:1}},switch:{width:25,height:17,padding:5,transitionDurationMs:150,transitionTimingFunction:"ease-out",focusRing:{offset:1,width:1}},select:{focusRing:{offset:-1,width:1}},text:{focusRing:{offset:-1,width:1}}},style:{button:{root:{transition:"background-color 100ms,border-color 100ms,color 100ms"}}}},s={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}]}},l=new WeakMap;function u(e){let t=l.get(e);if(t)return t;let n=d(e,e.card.enabled),r={_blend:e._blend||(e.dark?"screen":"multiply"),_dark:e.dark,accent:n.accent,avatar:n.avatar,backdrop:e.base.shadow.ambient,badge:n.badge,bg:e.base.bg,border:e.base.border,button:{default:c(e,e.button.default),ghost:c(e,e.button.ghost),bleed:c(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:h(e.input.default),invalid:h(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:c(e,e.selectable||e.muted),shadow:e.base.shadow,skeleton:{from:e.skeleton?.from||e.base.border,to:e.skeleton?.to||e.base.border},syntax:e.syntax};return l.set(e,r),r}function c(e,t){return{default:{enabled:d(e,t.default.enabled),hovered:d(e,t.default.hovered),pressed:d(e,t.default.pressed),selected:d(e,t.default.selected),disabled:d(e,t.default.disabled)},neutral:{enabled:d(e,t.default.enabled),hovered:d(e,t.default.hovered),pressed:d(e,t.default.pressed),selected:d(e,t.default.selected),disabled:d(e,t.default.disabled)},primary:{enabled:d(e,t.primary.enabled),hovered:d(e,t.primary.hovered),pressed:d(e,t.primary.pressed),selected:d(e,t.primary.selected),disabled:d(e,t.primary.disabled)},suggest:{enabled:d(e,t.primary.enabled),hovered:d(e,t.primary.hovered),pressed:d(e,t.primary.pressed),selected:d(e,t.primary.selected),disabled:d(e,t.primary.disabled)},positive:{enabled:d(e,t.positive.enabled),hovered:d(e,t.positive.hovered),pressed:d(e,t.positive.pressed),selected:d(e,t.positive.selected),disabled:d(e,t.positive.disabled)},caution:{enabled:d(e,t.caution.enabled),hovered:d(e,t.caution.hovered),pressed:d(e,t.caution.pressed),selected:d(e,t.caution.selected),disabled:d(e,t.caution.disabled)},critical:{enabled:d(e,t.critical.enabled),hovered:d(e,t.critical.hovered),pressed:d(e,t.critical.pressed),selected:d(e,t.critical.selected),disabled:d(e,t.critical.disabled)}}}function d(e,t){return{...t,avatar:{gray:{bg:e.spot.gray,fg:e.base.bg},blue:{bg:e.spot.blue,fg:e.base.bg},purple:{bg:e.spot.purple,fg:e.base.bg},magenta:{bg:e.spot.magenta,fg:e.base.bg},red:{bg:e.spot.red,fg:e.base.bg},orange:{bg:e.spot.orange,fg:e.base.bg},yellow:{bg:e.spot.yellow,fg:e.base.bg},green:{bg:e.spot.green,fg:e.base.bg}
1,cyan:{bg:e.spot.cyan,fg:e.base.bg}},badge:{default:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,dot:e.muted.default.enabled.muted.fg,icon:e.muted.default.enabled.muted.fg},neutral:{bg:e.muted.transparent.enabled.bg,fg:e.muted.transparent.enabled.fg,dot:e.muted.transparent.enabled.muted.fg,icon:e.muted.transparent.enabled.muted.fg},primary:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},suggest:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},positive:{bg:e.muted.positive.enabled.bg,fg:e.muted.positive.enabled.fg,dot:e.muted.positive.enabled.muted.fg,icon:e.muted.positive.enabled.muted.fg},caution:{bg:e.muted.caution.enabled.bg,fg:e.muted.caution.enabled.fg,dot:e.muted.caution.enabled.muted.fg,icon:e.muted.caution.enabled.muted.fg},critical:{bg:e.muted.critical.enabled.bg,fg:e.muted.critical.enabled.fg,dot:e.muted.critical.enabled.muted.fg,icon:e.muted.critical.enabled.muted.fg}},kbd:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,border:e.muted.default.enabled.border},muted:{...e.muted.default.enabled.muted,bg:t.bg2||t.bg},skeleton:{from:t.skeleton?.from||t.border,to:t.skeleton?.to||t.border}}}function h(e){return{enabled:f(e.enabled),disabled:f(e.disabled),readOnly:f(e.readOnly),hovered:f(e.hovered)}}function f(e){return{bg:e.bg,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let p=new WeakMap;function m(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=p.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...a.avatar,...e.sanity.avatar},button:{...a.button,...e.sanity.button},card:a.card,color:u(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...a.input,...e.sanity.input,checkbox:{...a.input.checkbox,...e.sanity.input.checkbox},radio:{...a.input.radio,...e.sanity.input.radio},switch:{...a.input.switch,...e.sanity.input.switch}},layer:e.sanity.layer??a.layer,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return p.set(e,n),n}function g(e){return 2===e._version}let y=new WeakMap,v=new WeakMap;function b(e){let t=v.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,font:a,input:s,media:l,radius:u,shadow:c,space:d,style:h}=e;return{_version:0,avatar:n,button:r,container:o,color:{light:{transparent:x(i.light.transparent),default:x(i.light.default),primary:x(i.light.primary),positive:x(i.light.positive),caution:x(i.light.caution),critical:x(i.light.critical)},dark:{transparent:x(i.dark.transparent),default:x(i.dark.default),primary:x(i.dark.primary),positive:x(i.dark.positive),caution:x(i.dark.caution),critical:x(i.dark.critical)}},focusRing:s.text.focusRing,fonts:a,input:s,media:l,radius:u,shadows:c,space:d,styles:h,v2:e}}function x(e){return{base:{bg:e.bg,fg:e.fg,border:e.border,focusRing:e.focu
1sRing,shadow:e.shadow},button:e.button,card:e.selectable.default,dark:e._dark,input:{default:w(e.input.default),invalid:w(e.input.invalid)},muted:{...e.button.ghost,transparent:e.button.ghost.default},solid:{...e.button.default,transparent:e.button.default.default},selectable:e.selectable,spot:{gray:e.avatar.gray.bg,blue:e.avatar.blue.bg,purple:e.avatar.purple.bg,magenta:e.avatar.magenta.bg,red:e.avatar.red.bg,orange:e.avatar.orange.bg,yellow:e.avatar.yellow.bg,green:e.avatar.green.bg,cyan:e.avatar.cyan.bg},syntax:e.syntax}}function w(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"],C=["default","neutral","primary","suggest","positive","caution","critical"],j=["enabled","hovered","pressed","selected","disabled"],A=["default","ghost","bleed"],_=["default","invalid"],T=["enabled","hovered","readOnly","disabled"];function M(e){return i.includes(e)}function R(e){return/^\d+%$/.test(e)}function P(e){let t=e.split("/"),n=t.shift()||"",[i,o]=n.split(" ");if(M(i)){let e=t.shift()||"";return R(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 R(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.includes(i)){let[e,r]=(n=t.shift()||"").split(" ");if(M(e)){let n=t.shift()||"";return R(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],[...E],[...C],[...j],[..._],[...T];let O=["500","500"];function $(e,t=O){var n;let r;let{hue:i,scheme:o}=e,a=P(t["light"===o?0:1]);if(!a||"color"!==a.type)throw Error(`Invalid color token: ${t[0]}`);return n={...a,hue:a.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 D={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(z,{})}function z(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)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:U(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 A)i[e]=function(e,t){let{cardTone:n,mode:r,scheme:i}=e,o={};for(let e of C)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:i,tone:o}=e,a={};for(let e of j)a[e]=function(e,t){let{cardTone:n,mode:r,tone:i,scheme:o,state:a}=e,s=t?.color?.base?.[n],l=t?.color?.button?.[r]?.[i]?.[a],u=l?._hue||s?._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:U(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 a}({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:H({mode:"default",scheme:n,tone:r},t),invalid:H({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 C)i[e]=function(e,t){let{cardTone:n,scheme:r,tone:i}=e,o={};for(let e of j)o[e]=function(e,t){let{cardTone:n,scheme:r,state:i,tone:o}=e,a=t?.color?.base?.[n],s=t?.color?.selectable?.[o]?.[i],l=s?._hue||a?._hue||"gray",u=s?._blend||["screen","multiply"],c={hue:l,scheme:r};return{_blend:u["light"===r?0:1],accent:{fg:$(c,s?.accent?.fg)},avatar:F({scheme:r},s),badge:U(s?.badge,{scheme:r},t),bg:$(c,s?.bg),border:$(c,s?.border),code:{bg:$(c,s?.code?.bg),fg:$(c,s?.code?.fg)},fg:$(c,s?.fg),icon:$(c,s?.icon),muted:{bg:$(c,s?.muted?.bg),fg:$(c,s?.muted?.fg)},kbd:{bg:$(c,s?.kbd?.bg),fg:$(c,s?.kbd?.fg),border:$(c,s?.kbd?.border)},link:{fg:$(c,s?.link?.fg)},skeleton:{from:$(c,s?.skeleton?.from),to:$(c,s?.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 U(e,t,n){let{scheme:r}=t,i={};for(let t of C)i[t]=function(e,t,n){let{scheme:r,tone:i}=t,o=e?.[i],a={hue:o?._hue||n?.color?.base?.[i]?._hue||"gray",scheme:r};return{bg:$(a,o?.bg),fg:$(a,o?.fg),dot:$(a,o?.dot),icon:$(a,o?.icon)}}(e,{scheme:r,tone:t},n);return i}function H(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,a=t?.color?.base?.[n],s=t?.color?.input?.[r]?.[o],l=s?._hue||a?._hue||"gray",u=s?._blend||["screen","multiply"],c={hue:l,scheme:i};return{_blend:u["light"===i?0:1],bg:$(c,s?.bg),border:$(c,s?.border),fg:$(c,s?.fg),muted:{bg:$(c,s?.muted?.bg)},placeholder:$(c,s?.placeholder)}}function G(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=G((i-e)/(t-e))))+r*o}function q(e){return Math.round(e)}function X(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 Z(e){let t=q(G(Math.round(e.r),0,255)),n=q(G(Math.round(e.g),0,255)),r=q(G(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 K=/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 X(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,a=0,s=0,l=0;return 0<=e.h&&e.h<60?(a=r,s=i,l=0):60<=e.h&&e.h<120?(a=i,s=r,l=0):120<=e.h&&e.h<180?(a=0,s=r,l=i):180<=e.h&&e.h<240?(a=0,s=i,l=r):240<=e.h&&e.h<300?(a=i,s=0,l=r):300<=e.h&&e.h<360&&(a=r,s=0,l=i),{r:Math.round((a+o)*255),g:Math.round((s+o)*255),b:Math.round((l+o)*255)}}(function(e){let t=K.exec(e);if(!t)throw Error(`parseHsl: string is not a HSL color: "${e}"`);return{h:parseInt(t[1]),s:parseFloat(t[3]),l:parseFloat(t[5])}}(e));if(e.startsWith("rgba("))return function(e){let t=e.replace(/rgba\(|\)/g,"").split(",");return{r:parseInt(t[0]),g:parseInt(t[1]),b:parseInt(t[2]),a:parseFloat(t[3])}}(e);throw Error(`parseColor: unexpected color format: "${e}"`)}let J=[0,255];function ee(e,t){let{bg:n,blendMode:r,colorPalette:i}=t;if("white"===n)throw Error("Cannot blend with white background");let o=P(e);if(!o||"color"!==o.type)throw Error(`Invalid color token value: ${e}`);let a="";if("black"===o.key&&(a=et(i.black)),"white"===o.key&&(a=et(i.white)),o.hue&&o.tint&&(a=et(i[o.hue][o.tint])),!a)throw Error(`Invalid color token value: ${e}`);let s=a,l={blendMode:r,bg:n,black:et(i.black),white:et(i.white)};try{if(a=function(e,t){var n,r,i,o,a,s,l,u,c;let{blendMode:d}=t,h=Q(e),f=Q(t.black),p=Q(t.white),m=t.bg?Q(t.bg):"multiply"===d?p:f,g={r:[f.r,p.r],g:[f.g,p.g],b:[f.b,p.b]},y={r:G(Y(...g.r,...J,m.r),...J),g:G(Y(...g.g,...J,m.g),...J),b:G(Y(...g.b,...J,m.b),...J)},v={r:G(Y(...g.r,...J,h.r),...J),g:G(Y(...g.g,...J,h.g),...J),b:G(Y(...g.b,...J,h.b),...J)},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)+(a=v.r/255)-o*a),g:255*((s=y.g/255)+(l=v.g/255)-s*l),b:255*((u=y.b/255)+(c=v.b/255)-u*c)};return Z({r:G(Y(...J,...g.r,b.r),...g.r),g:G(Y(...J,...g.g,b.g),...g.g),b:G(Y(...J,...g.b,b.b),...g.b)})}(a,l),n&&void 0!==o.mix){var u,c,d,h,f,p,m;let e=X(n),t=X(a);a=Z((u=o.mix,{r:(c=e.r,d=t.r,c+(d-c)*u),g:(h=e.g,f=t.g,h+(f-h)*u),b:(p=e.b,m=t.b,p+(m-p)*u)}))}}catch(e){throw console.warn("could not blend",a,l),e}
1return"#aN"===a&&(console.warn(`invalid color token value: ${e}`),a=s),void 0!==o.opacity&&(a=function(e,t){let n=Q(e);return`rgba(${n.r},${n.g},${n.b},${t})`}(a,o.opacity)),a}function et(e){return"string"==typeof e?e:e.hex}function en(e,t){let n=Object.entries(t),[,r]=n.find(([e])=>"transparent"===e),[,i]=n.find(([e])=>"default"===e),o=er(r,{colorPalette:e}),a=er(i,{colorPalette:e}),s=a.bg;if("white"===s)throw Error("Cannot blend with white background");return Object.fromEntries([["transparent",o],["default",a],...n.filter(([e])=>"default"!==e&&"transparent"!==e).map(([t,n])=>[t,er(n,{bg:s,colorPalette:e})])])}function er(e,t){var n,r,i,o;let{colorPalette:a,bg:s}=t,l=e._blend||"multiply",u=ee(e.bg,{colorPalette:a,bg:s,blendMode:l}),c={colorPalette:a,bg:u,blendMode:l},d=(n=e.button,r={baseBg:u,blendMode:l,colorPalette:a},{default:ea(n.default,r),ghost:ea(n.ghost,r),bleed:ea(n.bleed,r)}),h=function(e,t){let n={};for(let i of C){var r;n[i]={enabled:es((r=e[i]).enabled,t),hovered:es(r.hovered,t),pressed:es(r.pressed,t),selected:es(r.selected,t),disabled:es(r.disabled,t)}}return n}(e.selectable,{colorPalette:a,baseBg:u,blendMode:l}),f={outline:ee(e.shadow.outline,c),umbra:ee(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),penumbra:ee(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),ambient:ee(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}})};return{_blend:l,_dark:e._dark,accent:{fg:ee(e.accent.fg,c)},avatar:ei(e.avatar,{baseBg:u,colorPalette:a,blendMode:l}),backdrop:ee(e.backdrop,c),badge:eo(e.badge,{baseBg:u,colorPalette:a,blendMode:l}),bg:u,border:ee(e.border,c),button:d,code:{bg:ee(e.code.bg,c),fg:ee(e.code.fg,c)},fg:ee(e.fg,c),focusRing:ee(e.focusRing,c),icon:ee(e.icon,c),input:(i=e.input,o={baseBg:u,colorPalette:a,blendMode:l},{default:el(i.default,o),invalid:el(i.invalid,o)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=ee(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:o,blendMode:r,colorPalette:i};return{bg:o,fg:ee(e.fg,a),border:ee(e.border,a)}}(e.kbd,{baseBg:u,colorPalette:a,blendMode:l}),link:{fg:ee(e.link.fg,c)},muted:{bg:ee(e.muted.bg,c),fg:ee(e.muted.fg,c)},shadow:f,skeleton:{from:ee(e.skeleton.from,c),to:ee(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:ee(e.atrule,o),attrName:ee(e.attrName,o),attrValue:ee(e.attrValue,o),attribute:ee(e.attribute,o),boolean:ee(e.boolean,o),builtin:ee(e.builtin,o),cdata:ee(e.cdata,o),char:ee(e.char,o),class:ee(e.class,o),className:ee(e.className,o),comment:ee(e.comment,o),constant:ee(e.constant,o),deleted:ee(e.deleted,o),doctype:ee(e.doctype,o),entity:ee(e.entity,o),function:ee(e.function,o),hexcode:ee(e.hexcode,o),id:ee(e.id,o),important:ee(e.important,o),inserted:ee(e.inserted,o),keyword:ee(e.keyword,o),number:ee(e.number,o),operator:ee(e.operator,o),prolog:ee(e.prolog,o),property:ee(e.property,o),pseudoClass:ee(e.pseudoClass,o),pseudoElement:ee(e.pseudoElement,o),punctuation:ee(e.punctuation,o),regex:ee(e.regex,o),selector:ee(e.selector,o),string:ee(e.string,o),symbol:ee(e.symbol,o),tag:ee(e.tag,o),unit:ee(e.unit,o),url:ee(e.url,o),variable:ee(e.variable,o)}}(e.syntax,{baseBg:u,colorPalette:a,blendMode:l}),selectable:h}}function ei(e,t){let n={};for(let i of r)n[i]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=ee(e.bg,{bg:n,blendMode:r,colorPalette:i});return{_blend:o,bg:a,fg:ee(e.fg,{bg:a,blendMode:o,colorPalette:i})}}(e[i],t);return n}function eo(e,t){let n={};for(let r of C)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=ee(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:o,blendMode:r,colorPalette:i};return{bg:o,dot:ee(e.dot,a),fg:ee(e.fg,a),icon:ee(e.icon,a)}}(e[r],t);return n}function ea(e,t){let n={};for(let i of C){var r;n[i]={enabled:es((r=e[i]).enabled,t),hovered:es(r.hovered,t),pressed:es(r.pressed,t),selected:es(r.selected,t),disabled:es(r.disabled,t)}}return n}function es(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=ee(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:a,blendMode:o,colorPalette:i};
1return{_blend:o,accent:{fg:ee(e.accent.fg,s)},avatar:ei(e.avatar,{baseBg:a,colorPalette:i,blendMode:o}),badge:eo(e.badge,{baseBg:a,colorPalette:i,blendMode:o}),bg:a,border:ee(e.border,s),code:{bg:ee(e.code.bg,s),fg:ee(e.code.fg,s)},fg:ee(e.fg,s),icon:ee(e.icon,s),link:{fg:ee(e.link.fg,s)},muted:{bg:ee(e.muted.bg,s),fg:ee(e.muted.fg,s)},kbd:{bg:ee(e.kbd.bg,s),fg:ee(e.kbd.fg,s),border:ee(e.kbd.border,s)},skeleton:{from:ee(e.skeleton?.from,s),to:ee(e.skeleton?.to,s)}}}function el(e,t){return{enabled:eu(e.enabled,t),hovered:eu(e.hovered,t),readOnly:eu(e.readOnly,t),disabled:eu(e.disabled,t)}}function eu(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=ee(e.bg,{colorPalette:i,bg:n,blendMode:r}),s={colorPalette:i,bg:a,blendMode:o};return{_blend:o,bg:a,border:ee(e.border,s),fg:ee(e.fg,s),muted:{bg:ee(e.muted.bg,s)},placeholder:ee(e.placeholder,s)}}function ec(e){let t=function(e){let t={color:function(e){let t=N(D,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.reduce((e,t)=>({...e,[t]:N({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:C.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 A)t[n]=function(e,t){let n={};for(let i of C)n[i]=function(e,t,n){let i={};for(let o of j)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]),a=o._hue||e?.base?.[t]?._hue;return{...o,_hue:a,avatar:r.reduce((e,t)=>({...e,[t]:N({_hue:t},o.avatar?.["*"],o.avatar?.[t])}),{}),badge:C.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||a,...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 _)t[n]=function(e,t){let n={};for(let r of T)n[r]=function(e,t,n){let r=N(e?.input?.["*"]?.["*"],e?.
1input?.[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 C)t[n]=function(e,t){let n={_hue:e?.selectable?.[t]?._hue||e?.base?.[t]?._hue};for(let i of j)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.reduce((e,t)=>({...e,[t]:N({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:C.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)};return{light:V({scheme:"light"},t),dark:V({scheme:"dark"},t)}}(e);return b({_version:2,avatar:e?.avatar??a.avatar,button:e?.button??a.button,card:e?.card??a.card,color:function(e,t){let n=t?.palette??o;return{light:en(n,e.light),dark:en(n,e.dark)}}(t,e),container:e?.container??a.container,font:e?.font??s,input:e?.input??a.input,layer:e?.layer??a.layer,media:e?.media??a.media,radius:e?.radius??a.radius,shadow:e?.shadow??a.shadow,space:e?.space??a.space,style:e?.style??a.style})}let ed=new Map;function eh(e,t,n){var r;let i=function(e,t,n){let r=ed.get(t);if(!r)return;let i=r.get(n);if(i)return i.get(e)}(e,t,n);if(i)return i;let o=g(e)?b(e):e,s=g(e)?e:function(e){if(e.v2)return e.v2;let t=y.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,fonts:s,input:l,layer:c,media:d,radius:h,shadows:f,space:p,styles:m}=e,g={_version:2,avatar:{...a.avatar,...n},button:{...a.button,...r},card:a.card,color:{light:{transparent:u(i.light.transparent),default:u(i.light.default),neutral:u(i.light.transparent),primary:u(i.light.primary),suggest:u(i.light.primary),positive:u(i.light.positive),caution:u(i.light.caution),critical:u(i.light.critical)},dark:{transparent:u(i.dark.transparent),default:u(i.dark.default),neutral:u(i.dark.transparent),primary:u(i.dark.primary),suggest:u(i.dark.primary),positive:u(i.dark.positive),caution:u(i.dark.caution),critical:u(i.dark.critical)}},container:o,font:s,input:{...a.input,...l,checkbox:{...a.input.checkbox,...l.checkbox},radio:{...a.input.radio,...l.radio},switch:{...a.input.switch,...l.switch}},layer:c??a.layer,media:d,radius:h,shadow:f,space:p,style:m};return y.set(e,g),g}(e),l=o.color[t]||o.color.light,c=l[n]||l.default,d=o.layer||a.layer,h=s.color[t]||s.color.light,f="neutral"in(r=h[n]||h.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}},p=s.layer||a.layer,m={sanity:{...o,color:c,layer:d,v2:{...s,_resolved:!0,color:f,layer:p}}};return function(e,t,n,r){ed.has(t)||ed.set(t,new Map);let i=ed.get(t);i.has(n)||i.set(n,new WeakMap),i.get(n).set(e,r)}(e,t,n,m),m}},57586:function(e,t,n){"use strict";n.d(t,{M:function(){return b}});var r=n(57437),i=n(2265),o=n(58881),a=n(53576),s=n(12014),l=n(64252),u=n(13537),c=n(45750);function d(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class h extends i.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,u.R)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,n=(0,u.R)(e)&&e.offsetWidth||0,r=(0,u.R)(e)&&e.offsetHeight||0,i=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(i.height),o.width=parseFloat(i.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function f(e){var t,n;let{children:o,isPresent:a,anchorX:s,anchorY:l,root:u,pop:f}=e,p=(0,i.useId)(),m=(0,i.useRef)(null),g=(0,i.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:y}=(0,i.useContext)(c._),v=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.useCallback(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{let n=!1,r=t.map(t=>{let r=d(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e<r.length;e++){let n=r[e];"function"==typeof n?n():d(t[e],null)}}}}(...t),t)}(m,!1!==f?null!==(n=null===(t=o.props)||void 0===t?void 0:t.ref)&&void 0!==n?n:null==o?void 0:o.ref:void 0);return(0,i.useInsertionEffect)(()=>{let{width:e,height:t,top:n,left:r,right:i,bottom:o,direction:c}=g.current;if(a||!1===f||!m.current||!e||!t)return;let d="rtl"===c;m.current.dataset.motionPopId=p;let h=document.createElement("style");y&&(h.nonce=y);let v=null!=u?u:document.head;return v.appendChild(h),h.sheet&&h.sheet.insertRule('\n          [data-motion-pop-id="'.concat(p,'"] {\n            position: absolute !important;\n            width: ').concat(e,"px !important;\n            height: ").concat(t,"px !important;
1\n            ").concat("left"===s?d?"right: ".concat(i):"left: ".concat(r):d?"left: ".concat(r):"right: ".concat(i),"px !important;\n            ").concat("bottom"===l?"bottom: ".concat(o):"top: ".concat(n),"px !important;\n          }\n        ")),()=>{var e;null===(e=m.current)||void 0===e||e.removeAttribute("data-motion-pop-id"),v.contains(h)&&v.removeChild(h)}},[a]),(0,r.jsx)(h,{isPresent:a,childRef:m,sizeRef:g,pop:f,children:!1===f?o:i.cloneElement(o,{ref:v})})}let p=e=>{let{children:t,initial:n,isPresent:o,onExitComplete:u,custom:c,presenceAffectsLayout:d,mode:h,anchorX:p,anchorY:g,root:y}=e,v=(0,a.h)(m),b=(0,i.useId)(),x=(0,i.useRef)(o),w=(0,i.useRef)(u);(0,s.L)(()=>{x.current=o,w.current=u});let S=!0,k=(0,i.useMemo)(()=>(S=!1,{id:b,initial:n,isPresent:o,custom:c,onExitComplete:e=>{for(let t of(v.set(e,!0),v.values()))if(!t)return;u&&u()},register:e=>(v.set(e,!1),()=>{var t;v.delete(e),x.current||v.size||null===(t=w.current)||void 0===t||t.call(w)})}),[o,v,u]);return d&&S&&(k={...k}),(0,i.useMemo)(()=>{v.forEach((e,t)=>v.set(t,!1))},[o]),i.useEffect(()=>{o||v.size||!u||u()},[o]),t=(0,r.jsx)(f,{pop:"popLayout"===h,isPresent:o,anchorX:p,anchorY:g,root:y,children:t}),(0,r.jsx)(l.O.Provider,{value:k,children:t})};function m(){return new Map}var g=n(49637);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:h=!1,anchorX:f="left",anchorY:m="top",root:b}=e,[x,w]=(0,g.oO)(h),S=(0,i.useMemo)(()=>v(t),[t]),k=h&&!x?[]:S.map(y),E=(0,i.useRef)(!0),C=(0,i.useRef)(S),j=(0,a.h)(()=>new Map),A=(0,i.useRef)(new Set),[_,T]=(0,i.useState)(S),[M,R]=(0,i.useState)(S);(0,s.L)(()=>{E.current=!1,C.current=S;for(let e=0;e<M.length;e++){let t=y(M[e]);k.includes(t)?(j.delete(t),A.current.delete(t)):!0!==j.get(t)&&j.set(t,!1)}},[M,k.length,k.join("-")]);let P=[];if(S!==_){let e=[...S];for(let t=0;t<M.length;t++){let n=M[t],r=y(n);k.includes(r)||(e.splice(t,0,n),P.push(n))}return"wait"===d&&P.length&&(e=P),R(v(e)),T(S),null}let{forceRender:I}=(0,i.useContext)(o.p);return(0,r.jsx)(r.Fragment,{children:M.map(e=>{let t=y(e),i=(!h||!!x)&&(S===M||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(A.current.has(t)||!j.has(t))return;A.current.add(t),j.set(t,!0);let e=!0;j.forEach(t=>{t||(e=!1)}),e&&(null==I||I(),R(C.current),h&&(null==w||w()),u&&u())},anchorX:f,anchorY:m,children:e},t)})})}},49637:function(e,t,n){"use strict";n.d(t,{oO:function(){return o}});var r=n(2265),i=n(64252);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:a}=t,s=(0,r.useId)();(0,r.useEffect)(()=>{if(e)return a(s)},[e]);let l=(0,r.useCallback)(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,l]:[!0]}},58881:function(e,t,n){"use strict";n.d(t,{p:function(){return r}});let r=(0,n(2265).createContext)({})},45750:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});let r=(0,n(2265).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},64252:function(e,t,n){"use strict";n.d(t,{O:function(){return r}});let r=(0,n(2265).createContext)(null)},53576:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var r=n(2265);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},12014:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(2265);let i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},13537:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var r=n(41464);function i(e){return(0,r.K)(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}},59960: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}})},41464:function(e,t,n){"use strict";n.d(t,{K:function(){return r}});let r=e=>"object"==typeof e&&null!==e},12341:function(e,t,n){"use strict";let r,i,o;n.d(t,{EAS:function(){return o1}});let a=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],s=new Set([...a,"pathRotation"]),l=(e,t,n
1)=>n>t?t:n<e?e:n,u={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},c={...u,transform:e=>l(0,1,e)},d={...u,default:1},h=e=>Math.round(1e5*e)/1e5,f=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,p=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,m=(e,t)=>n=>!!("string"==typeof n&&p.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),g=(e,t,n)=>r=>{if("string"!=typeof r)return r;let[i,o,a,s]=r.match(f);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},y=e=>l(0,255,e),v={...u,transform:e=>Math.round(y(e))},b={test:m("rgb","red"),parse:g("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+v.transform(e)+", "+v.transform(t)+", "+v.transform(n)+", "+h(c.transform(r))+")"},x={test:m("#"),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),alpha:i?parseInt(i,16)/255:1}},transform:b.transform},w=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),S=w("deg"),k=w("%"),E=w("px"),C=w("vh"),j=w("vw"),A={...k,parse:e=>k.parse(e)/100,transform:e=>k.transform(100*e)},_={test:m("hsl","hue"),parse:g("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+k.transform(h(t))+", "+k.transform(h(n))+", "+h(c.transform(r))+")"},T={test:e=>b.test(e)||x.test(e)||_.test(e),parse:e=>b.test(e)?b.parse(e):_.test(e)?_.parse(e):x.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?b.transform(e):_.transform(e),getAnimatableNone:e=>{let t=T.parse(e);return t.alpha=0,T.transform(t)}},M=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,R="number",P="color",I=/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 O(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,a=t.replace(I,e=>(T.test(e)?(r.color.push(o),i.push(P),n.push(T.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(R),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:a,indexes:r,types:i}}function $({split:e,types:t}){let n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],void 0!==r[o]){let e=t[o];e===R?i+=h(r[o]):e===P?i+=T.transform(r[o]):i+=r[o]}return i}}let D=e=>"number"==typeof e?0:T.test(e)?T.getAnimatableNone(e):e,L=(e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:D(e),N={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(f)?.length||0)+(e.match(M)?.length||0)>0},parse:function(e){return O(e).values},createTransformer:function(e){return $(O(e))},getAnimatableNone:function(e){let t=O(e);return $(t)(t.values.map((e,n)=>L(e,t.split[n])))}},z=new Set(["brightness","contrast","saturate","opacity"]);function V(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(f)||[];if(!r)return e;let i=n.replace(r,""),o=z.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}let F=/\b([a-z-]*)\(.*?\)/gu,B={...N,getAnimatableNone:e=>{let t=e.match(F);return t?t.map(V).join(" "):e}},U={...N,getAnimatableNone:e=>{let t=N.parse(e);return N.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},H={...u,transform:Math.round},W={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,inset:E,insetBlock:E,insetBlockStart:E,insetBlockEnd:E,insetInline:E,insetInlineStart:E,insetInlineEnd:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,paddingBlock:E,paddingBlockStart:E,paddingBlockEnd:E,paddingInline:E,paddingInlineStart:E,paddingInlineEnd:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,marginBlock:E,marginBlockStart:E,marginBlockEnd:E,marginInline:E,marginInlineStart:E,marginInlineEnd:E,fontSize:E,backgroundPositionX:E,backgroundPositionY:E,rotate:S,pathRotation:S,rotateX:S,rotateY:S,rotateZ:S,scale:d,scaleX:d,scaleY:d,scaleZ:d,skew:S,skewX:S,skewY:S,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:c,originX:A,originY:A,originZ:E,zIndex:H,fillOpacity:c,strokeOpacity:c,numOctaves:H},G={...W,color:T,backgroundColor:T,outlineColor:T,fill:T,stroke:T,borderColor:T,borderTopColor:T,borderRightColor:T,borderBottomColor:T,borderLeftColor:T,filter:B,WebkitFilter:B,mask:U,WebkitMask:U},Y=e=>G[e],q=()=>({translate:0,scale:1,origin:0,originPoint:0}),X=()=>({x:q(),y:q()}),Z=()=>({min:0,max:0}),K=()=>({x:Z(),y:Z()}),Q=e=>!!(e&&e.getVelocity),J=new Set(["width","height","top","left","right","bottom",...a]),ee=e=>t=>t.test(e),et=[u,E,k,S,j,C,{test:e=>"auto"===e,parse:e=>e}],en=e=>et.find(ee(e));n(25566);let er=()=>{},ei=()=>{},eo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ea=e=>t=>"string"==typeof t&&t.startsWith(e),es=ea("--"),el=ea("var(--"),eu=e=>!!el(e)&&ec.test(e.split("/*")[0].trim()),ec=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ed(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let eh=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ef=e=>180*e/Math.PI,ep=e=>eg(ef(Math.atan2(e[1],e[0]))),em={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ep,rotateZ:ep,skewX:e=>ef(Math.atan(e[1])),skewY:e=>ef(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},eg=e=>((e%=360)<0&&(e+=360),e),ey=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ev=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),eb={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ey,scaleY:ev,scale:e=>(ey(e)+ev(e))/2,rotateX:e=>eg(ef(Math.atan2(e[6],e[5]))),rotateY:e=>eg(ef(Math.atan2(-e[2],e[0]))),rotateZ:ep,rotate:ep,skewX:e=>ef(Math.atan(e[4])),skewY:e=>ef(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ex(e){return e.includes("scale")?1:0}function ew(e,t){let n,r;if(!e||"none"===e)return ex(t);let i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(i)n=eb,r=i;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=em,r=t}if(!r)return ex(t);let o=n[t],a=r[1].split(",").map(ek);return"function"==typeof o?o(a):a[o]}let eS=(e,t)=>{let{transform:n="none"}=getComputedStyle(e);return ew(n,t)};function ek(e){return parseFloat(e.trim())}let eE=e=>e===u||e===E,eC=new Set(["x","y","z"]),ej=a.filter(e=>!eC.has(e)),eA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-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})=>ew(t,"x"),y:(e,{transform:t})=>ew(t,"y")};eA.translateX=eA.x,eA.translateY=eA.y;let e_=e=>e,eT={},eM=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eR(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=eM.reduce((e,t)=>
1(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1};function s(t){o.has(t)&&(l.schedule(t),e()),t(a)}let l={schedule:(e,i=!1,a=!1)=>{let s=a&&r?t:n;return i&&o.add(e),s.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(a=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(s),t.clear(),r=!1,i&&(i=!1,l.process(e))}};return l}(o),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=a,m=()=>{let o=eT.useManualTiming,a=o?i.timestamp:performance.now();n=!1,o||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},g=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:eM.reduce((e,t)=>{let r=a[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<eM.length;t++)a[eM[t]].cancel(e)},state:i,steps:a}}let{schedule:eP,cancel:eI,state:eO,steps:e$}=eR("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e_,!0),eD=new Set,eL=!1,eN=!1,ez=!1;function eV(){if(eN){let e=Array.from(eD).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=function(e){let t=[];return ej.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(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)})}eN=!1,eL=!1,eD.forEach(e=>e.complete(ez)),eD.clear()}function eF(){eD.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eN=!0)})}class eB{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?(eD.add(this),eL||(eL=!0,eP.read(eF),eP.resolveKeyframes(eV))):(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),eD.delete(this)}cancel(){"scheduled"===this.state&&(eD.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let eU=e=>/^0[^.\s]+$/u.test(e),eH=new Set([B,U]);function eW(e,t){let n=Y(e);return eH.has(n)||(n=N),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let eG=new Set(["auto","none","0"]);class eY extends eB{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&&eu(r=r.trim())){let i=function e(t,n,r=1){ei(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=eh.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}(t);if(!i)return;let a=window.getComputedStyle(n).getPropertyValue(i);if(a){let e=a.trim();return eo(e)?parseFloat(e):e}return eu(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(),!J.has(n)||2!==e.length)return;let[r,i]=e,o=en(r),a=en(i);if(ed(r)!==ed(i)&&eA[n]){this.needsMeasurement=!0;return}if(o!==a){if(eE(o)&&eE(a))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else eA[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||eU(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&&!eG.has(t)&&O(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=eW(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=eA[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]=eA[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}let eq=e=>1e3*e,eX=e=>e/1e3;function eZ(e,t){-1===e.indexOf(t)&&e.push(t)}function eK(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class eQ{constructor(){this.subscriptions=[]}add(e){return eZ(this.subscriptions,e),()=>eK(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}}let eJ=e=>e.startsWith("--");function e0(e,t,n){eJ(t)?e.style.setProperty(t,n):e.style[t]=n}function e1(e){let t;return()=>(void 0===t&&(t=e()),t)}let e2={};function e5(e,t){let n=e1(e);return()=>e2[t]??n()}let e3=e5(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),e4=e=>null!==e;function e6(e,{repeat:t,repeatType:n="loop"},r,i=1){let o=e.filter(e4),a=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return a&&void 0!==r?r:o[a]}class e9{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 e8=e=>Array.isArray(e)&&"number"==typeof e[0],e7=e5(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),te=(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)})`},tt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,tn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tt([0,.65,.55,1]),circOut:tt([.55,0,1,.45]),backIn:tt([.31,.01,.66,-.59]),backOut:tt([.33,1.53,.69,.99])};function tr(e){return"function"==typeof e&&"applyToOptions"in e}class ti extends e9{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:a,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,ei("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return tr(e)&&e7()?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:a="loop",ease:s="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?e7()?te(t,n):"ease-out":e8(t)?tt(t):Array.isArray(t)?t.map(t=>e(t,n)||tn.easeOut):tn[t]}(s,i);Array.isArray(d)&&(c.easing=d);let h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=e6(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),e0(t,n,e),this.animation.cancel()}s?.(),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(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return eX(Number(this.animation.effect?.getComputedTiming?.().duration||0))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+eX(e)}get time(){return eX(Number(this.animation.currentTime)||0)}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=eq(e),t&&this.animation.pause()}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,rangeStart:t,rangeEnd:n,observe:r}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&e3())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),e_):r(this)}}let to=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),{schedule:ta,cancel:ts}=eR(queueMicrotask,!1);function tl(){r=void 0}let tu={now:()=>(void 0===r&&tu.set(eO.isProcessing||eT.useManualTiming?eO.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(tl)}},tc=(e,t)=>t?1e3/t*e:0,td=e=>!isNaN(parseFloat(e)),th={current:void 0};class tf{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=tu.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=tu.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=td(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 eQ);let n=this.events[e].add(t);return"change"===e?()=>{n(),eP.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)}
1setWithVelocity(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 th.current&&th.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=tu.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return tc(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 tp(e,t){return new tf(e,t)}let tm=[...et,T,N],tg=e=>tm.find(ee(e)),ty=new WeakMap;function tv(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tb(e){return"string"==typeof e||Array.isArray(e)}let tx=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tw=["initial",...tx];function tS(e){return tv(e.animate)||tw.some(t=>tb(e[t]))}function tk(e){return!!(tS(e)||e.variants)}let tE={current:null},tC={current:!1},tj="undefined"!=typeof window;function tA(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function t_(e,t,n,r){if("function"==typeof t){let[i,o]=tA(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,o]=tA(r);t=t(void 0!==n?n:e.custom,i,o)}return t}let tT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tM={};class tR{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=eB,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=tu.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,eP.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=tS(t),this.isVariantNode=tk(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];void 0!==l[e]&&Q(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,ty.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.forEac
1h((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(tC.current||function(){if(tC.current=!0,tj){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tE.current=e.matches;e.addEventListener("change",t),t()}else tE.current=!1}}(),this.shouldReduceMotion=tE.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),eI(this.notifyUpdate),eI(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;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&to.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:o,duration:a}=t.accelerate,s=new ti({element:this.current,name:e,keyframes:r,times:i,ease:o,duration:eq(a)}),l=n(s);this.valueSubscriptions.set(e,()=>{l(),s.cancel()});return}let r=s.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&eP.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()})}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 tM){let t=tM[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];t.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):K()}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<tT.length;t++){let n=tT[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(Q(i))e.addValue(r,i);else if(Q(o))e.addValue(r,tp(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,tp(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=tp(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];
1return null!=n&&("string"==typeof n&&(eo(n)||eU(n))?n=parseFloat(n):!tg(n)&&N.test(t)&&(n=eW(e,t)),this.setBaseTarget(e,Q(n)?n.get():n)),Q(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=t_(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||Q(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 eQ),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){ta.render(this.render)}}class tP extends tR{constructor(){super(...arguments),this.KeyframeResolver=eY}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;Q(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function tI(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let tO=(e,t)=>t&&"number"==typeof e?t.transform(e):e,t$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tD=a.length;function tL(e,t,n){let{style:r,vars:i,transformOrigin:o}=e,l=!1,u=!1;for(let e in t){let n=t[e];if(s.has(e)){l=!0;continue}if(es(e)){i[e]=n;continue}{let t=tO(n,W[e]);e.startsWith("origin")?(u=!0,o[e]=t):r[e]=t}}if(!t.transform&&(l||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<tD;o++){let s=a[o],l=e[s];if(void 0===l)continue;let u=!0;if("number"==typeof l)u=l===(s.startsWith("scale")?1:0);else{let e=parseFloat(l);u=s.startsWith("scale")?1===e:0===e}if(!u||n){let e=tO(l,W[s]);if(!u){i=!1;let t=t$[s]||s;r+=`${t}(${e}) `}n&&(t[s]=e)}}let o=e.pathRotation;return o&&(i=!1,r+=`rotate(${tO(o,W.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),u){let{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}let tN={offset:"stroke-dashoffset",array:"stroke-dasharray"},tz={offset:"strokeDashoffset",array:"strokeDasharray"},tV=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tF(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},l,u,c){if(tL(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of(d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),tV))void 0!==d[e]&&(h[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;let o=i?tN:tz;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}(d,i,o,a,!1)}let tB=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"]),tU=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tH(e,{style:t,vars:n},r,i){let o;let a=e.style;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}let tW=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function tG(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let tY={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!E.test(e))return e;e=parseFloat(e)}let n=tG(e,t.target.x),r=tG(e,t.target.y);return`${n}% ${r}%`}},tq=(e,t,n)=>e+(t-e)*n,tX={borderRadius:{...tY,applyTo:[...tW]},borderTopLeftRadius:tY,borderTopRightRadius:tY,borderBottomLeftRadius:tY,borderBottomRightRadius:tY,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=N.parse(e);if(r.length>5)return e;let i=N.createTransformer(e),o="number"!=typeof r[0]?1:0,a=n.x.scale*t.x,s=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=s;let l=tq(a,s,.5);return"number"==typeof r[2+o]&&(r[2+o]/=l),"number"==typeof r[3+o]&&(r[3+o]/=l),i(r)}}};function tZ(e,{layout:t,layoutId:n}){return s.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!tX[e]||"opacity"===e)}function tK(e,t,n){let r=e.style,i=t?.style,o={};if(!r)return o;for(let t in r)(Q(r[t])||i&&Q(i[t])||tZ(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(o[t]=r[t]);return o}
1function tQ(e,t,n){let r=tK(e,t,n);for(let n in e)(Q(e[n])||Q(t[n]))&&(r[-1!==a.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}class tJ extends tP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=K}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(s.has(t)){let e=Y(t);return e&&e.default||0}return t=tB.has(t)?t:tI(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return tQ(e,t,n)}build(e,t,n){tF(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){for(let n in tH(e,t,void 0,r),t.attrs)e.setAttribute(tB.has(n)?n:tI(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=tU(e.tagName),super.mount(e)}}function t0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function t1(e){return void 0===e||1===e}function t2({scale:e,scaleX:t,scaleY:n}){return!t1(e)||!t1(t)||!t1(n)}function t5(e){return t2(e)||t3(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function t3(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function t4(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function t6(e,t=0,n=1,r,i){e.min=t4(e.min,t,n,r,i),e.max=t4(e.max,t,n,r,i)}function t9(e,{x:t,y:n}){t6(e.x,t.translate,t.scale,t.originPoint),t6(e.y,n.translate,n.scale,n.originPoint)}function t8(e,t){e.min+=t,e.max+=t}function t7(e,t,n,r,i=.5){let o=tq(e.min,e.max,i);t6(e,t,n,o,r)}function ne(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function nt(e,t,n){let r=n??e;t7(e.x,ne(t.x,r.x),t.scaleX,t.scale,t.originX),t7(e.y,ne(t.y,r.y),t.scaleY,t.scale,t.originY)}function nn(e,t){return t0(function(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}}(e.getBoundingClientRect(),t))}class nr extends tP{constructor(){super(...arguments),this.type="html",this.renderInstance=tH}mount(e){ei(!!e.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(e,t){if(s.has(t))return this.projection?.isProjecting?ex(t):eS(e,t);{let n=window.getComputedStyle(e),r=(es(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return nn(e,t)}build(e,t,n){tL(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return tK(e,t,n)}}var ni,no=n(2265);let na=["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 ns(e){if("string"!=typeof e||e.includes("-"));else if(na.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var nl=n(57437),nu=n(58881);let nc=(0,no.createContext)({strict:!1});var nd=n(45750);let nh=(0,no.createContext)({});function nf(e){return Array.isArray(e)?e.join(" "):e}let np=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nm(e,t,n){for(let r in t)Q(t[r])||tZ(r,n)||(e[r]=t[r])}let ng=()=>({...np(),attrs:{}}),ny=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","propagate","ignoreStrict","viewport"]);function nv(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ny.has(e)}let nb=e=>!nv(e);try{ni=require("@emotion/is-prop-valid").default,"function"==typeof ni&&(nb=e=>e.startsWith("on")?!nv(e):ni(e))}catch(e){}function nx(e){return Q(e)?e.get():e}var nw=n(64252),nS=n(53576);let nk=e=>(t,n)=>{let r=(0,no.useContext)(nh),i=(0,no.useContext)(nw.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]=nx(o[e]);let{initial:a,animate:s}=e,l=tS(e),u=tk(e);t&&u&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial,d=(c=c||!1===a)?s:a;if(d&&"boolean"!=typeof d&&!tv(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=t_(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}
1(t,n,r,i),renderState:o()}})(e,t,r,i);return n?o():(0,nS.h)(o)},nE=nk({scrapeMotionValuesFromProps:tK,createRenderState:np}),nC=nk({scrapeMotionValuesFromProps:tQ,createRenderState:ng}),nj={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"]},nA=!1;function n_(){return!function(){if(nA)return;let e={};for(let t in nj)e[t]={isEnabled:e=>nj[t].some(t=>!!e[t])};tM=e,nA=!0}(),tM}let nT=Symbol.for("motionComponentSymbol"),nM="data-"+tI("framerAppearId"),nR=(0,no.createContext)({});function nP(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}var nI=n(12014);function nO(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=n_();for(let n in e)t[n]={...t[n],...e[n]};tM=t}(o);let s=i?"svg"===i:ns(e),l=s?nC:nE;function u(t,n){let i;let o={...(0,no.useContext)(nd._),...t,layoutId:function(e){let{layoutId:t}=e,n=(0,no.useContext)(nu.p).id;return n&&void 0!==t?n+"-"+t:t}(t)},{isStatic:u}=o,c=function(e){let{initial:t,animate:n}=function(e,t){if(tS(e)){let{initial:t,animate:n}=e;return{initial:!1===t||tb(t)?t:void 0,animate:tb(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,no.useContext)(nh));return(0,no.useMemo)(()=>({initial:t,animate:n}),[nf(t),nf(n)])}(t),d=l(t,u);if(!u&&"undefined"!=typeof window){(0,no.useContext)(nc).strict;let t=function(e){let{drag:t,layout:n}=n_();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,c.visualElement=function(e,t,n,r,i,o){var a,s,l,u;let{visualElement:c}=(0,no.useContext)(nh),d=(0,no.useContext)(nc),h=(0,no.useContext)(nw.O),f=(0,no.useContext)(nd._),p=f.reducedMotion,m=f.skipAnimations,g=(0,no.useRef)(null),y=(0,no.useRef)(!1);r=r||d.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:p,skipAnimations:m,isSVG:o}),y.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));let v=g.current,b=(0,no.useContext)(nR);v&&!v.projection&&i&&("html"===v.type||"svg"===v.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=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:!!a||s&&nP(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(g.current,n,i,b);let x=(0,no.useRef)(!1);(0,no.useInsertionEffect)(()=>{v&&x.current&&v.update(n,h)});let w=n[nM],S=(0,no.useRef)(!!w&&"undefined"!=typeof window&&!(null===(a=(s=window).MotionHandoffIsComplete)||void 0===a?void 0:a.call(s,w))&&(null===(l=(u=window).MotionHasOptimisedAnimation)||void 0===l?void 0:l.call(u,w)));return(0,nI.L)(()=>{y.current=!0,v&&(x.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),S.current&&v.animationState&&v.animationState.animateChanges())}),(0,no.useEffect)(()=>{v&&(!S.current&&v.animationState&&v.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var e,t;null===(e=(t=window).MotionHandoffMarkAsComplete)||void 0===e||e.call(t,w)}),S.current=!1),v.enteringChildren=void 0)}),v}(e,d,o,a,t.ProjectionNode,s)}return(0,nl.jsxs)(nh.Provider,{value:c,children:[i&&c.visualElement?(0,nl.jsx)(i,{visualElement:c.visualElement,...o}):null,function(e,t,n,r,i){let{latestValues:o}=r,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6?arguments[6]:void 0,l=((null!=s?s:ns(e))?function(e,t,n,r){let i=(0,no.useMemo)(()=>{let n=ng();return tF(n,t,tU(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};
1nm(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 nm(r,n,e),Object.assign(r,function(e,t){let{transformTemplate:n}=e;return(0,no.useMemo)(()=>{let e=np();return tL(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.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n})(t,o,i,e),u=function(e,t,n){let r={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&!Q(e[i])&&(nb(i)||!0===n&&nv(i)||!t&&!nv(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,a),c=e!==no.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=(0,no.useMemo)(()=>Q(d)?d.get():d,[d]);return(0,no.createElement)(e,{...c,children:h})}(e,t,function(e,t,n){let r=(0,no.useRef)(n);(0,no.useInsertionEffect)(()=>{r.current=n});let i=(0,no.useRef)(null);return(0,no.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 a=r.current;if("function"==typeof a){if(n){let e=a(n);"function"==typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}(d,c.visualElement,n),d,u,r,s)]})}u.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 c=(0,no.forwardRef)(u);return c[nT]=e,c}class n${constructor(e){this.isMounted=!1,this.node=e}update(){}}function nD(e,t,n){let r=e.getProps();return t_(r,t,void 0!==n?n:r.custom,e)}function nL(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function nN(e,t){let n=e?.[t]??e?.default??e;return n!==e?nL(n,e):n}let nz=e=>Array.isArray(e);function nV(e,t){let n=e.getValue("willChange");if(Q(n)&&n.add)return n.add(t);if(!n&&eT.WillChange){let n=new eT.WillChange("auto");e.addValue("willChange",n),n.add(t)}}let nF=(...e)=>e.reduce((e,t)=>n=>t(e(n)));function nB(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}function nU(e,t){return n=>n>0?t:e}let nH=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},nW=[x,b,_],nG=e=>nW.find(t=>t.test(e));function nY(e){let t=nG(e);if(er(!!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===_&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=nB(s,r,e+1/3),o=nB(s,r,e),a=nB(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}(n)),n}let nq=(e,t)=>{let n=nY(e),r=nY(t);if(!n||!r)return nU(e,t);let i={...n};return e=>(i.red=nH(n.red,r.red,e),i.green=nH(n.green,r.green,e),i.blue=nH(n.blue,r.blue,e),i.alpha=tq(n.alpha,r.alpha,e),b.transform(i))},nX=new Set(["none","hidden"]);function nZ(e,t){return n=>tq(e,t,n)}function nK(e){return"number"==typeof e?nZ:"string"==typeof e?eu(e)?nU:T.test(e)?nq:n0:Array.isArray(e)?nQ:"object"==typeof e?T.test(e)?nq:nJ:nU}function nQ(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>nK(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function nJ(e,t){let n={...e,...t},r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=nK(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}let n0=(e,t)=>{let n=N.createTransformer(t),r=O(e),i=O(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?nX.has(e)&&!i.values.length||nX.has(t)&&!r.values.length?nX.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:nF(nQ(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],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}(r,i),i.values),n):(er(!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"),nU(e,t))};function n1(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?tq(e,t,n):nK(e)(e,t)}let n2=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>eP.update(t,e),stop:()=>eI(t),now:()=>eO.isProcessing?eO.timestamp:tu.now()}};function n5(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}let n3={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};function n4(e,t){return e*Math.sqrt(1-t*t)}let n6=["duration","bounce"],n9=["stiffness","damping","mass"];function n8(e,t){return t.some(t=>void 0!==e[t])}function n7(e=n3.visualDuration,t=n3.bounce){let n,r,i,o,a,s;let u="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:c,restDelta:d}=u,h=u.keyframes[0],f=u.keyframes[u.keyframes.length-1],p={done:!1,value:h},{stiffness:m,damping:g,mass:y,duration:v,velocity:b,isResolvedFromDuration:x}=function(e){let t={velocity:n3.velocity,stiffness:n3.stiffness,damping:n3.damping,mass:n3.mass,isResolvedFromDuration:!1,...e};if(!n8(e,n9)&&n8(e,n6)){if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),r=n*n,i=2*l(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:n3.mass,stiffness:r,damping:i}}else{let n=function({duration:e=n3.duration,bounce:t=n3.bounce,velocity:n=n3.velocity,mass:r=n3.mass}){let i,o;er(e<=eq(n3.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=l(n3.minDamping,n3.maxDamping,a),e=l(n3.minDuration,n3.maxDuration,eX(e)),a<1?(i=t=>{let r=t*a,i=r*e;return .001-(r-n)/n4(t,a)*Math.exp(-i)},o=t=>{let r=t*a*e,o=Math.pow(a,2)*Math.pow(t,2)*e,s=n4(Math.pow(t,2),a);return(r*n+n-o)*Math.exp(-r)*(-i(t)+.001>0?-1:1)/s}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),o=t=>e*e*(n-t)*Math.exp(-t*e));let s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=eq(e),isNaN(s))return{stiffness:n3.stiffness,damping:n3.damping,duration:e};{let t=Math.pow(s,2)*r;
1return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:n3.mass}).isResolvedFromDuration=!0}}return t}({...u,velocity:-eX(u.velocity||0)}),w=b||0,S=g/(2*Math.sqrt(m*y)),k=f-h,E=eX(Math.sqrt(m/y)),C=5>Math.abs(k);if(c||(c=C?n3.restSpeed.granular:n3.restSpeed.default),d||(d=C?n3.restDelta.granular:n3.restDelta.default),S<1)i=n4(E,S),o=(w+S*E*k)/i,n=e=>f-Math.exp(-S*E*e)*(o*Math.sin(i*e)+k*Math.cos(i*e)),a=S*E*o+k*i,s=S*E*k-o*i,r=e=>Math.exp(-S*E*e)*(a*Math.sin(i*e)+s*Math.cos(i*e));else if(1===S){n=e=>f-Math.exp(-E*e)*(k+(w+E*k)*e);let e=w+E*k;r=t=>Math.exp(-E*t)*(E*e*t-w)}else{let e=E*Math.sqrt(S*S-1);n=t=>{let n=Math.exp(-S*E*t),r=Math.min(e*t,300);return f-n*((w+S*E*k)*Math.sinh(r)+e*k*Math.cosh(r))/e};let t=(w+S*E*k)/e,i=S*E*t-k*e,o=S*E*k-t*e;r=t=>{let n=Math.exp(-S*E*t),r=Math.min(e*t,300);return n*(i*Math.sinh(r)+o*Math.cosh(r))}}let j={calculatedDuration:x&&v||null,velocity:e=>eq(r(e)),next:e=>{if(!x&&S<1){let t=Math.exp(-S*E*e),n=Math.sin(i*e),r=Math.cos(i*e),l=f-t*(o*n+k*r),u=eq(t*(a*n+s*r));return p.done=Math.abs(u)<=c&&Math.abs(f-l)<=d,p.value=p.done?f:l,p}let t=n(e);if(x)p.done=e>=v;else{let n=eq(r(e));p.done=Math.abs(n)<=c&&Math.abs(f-t)<=d}return p.value=p.done?f:t,p},toString:()=>{let e=Math.min(n5(j),2e4),t=te(t=>j.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return j}function re(e,t,n){let r=Math.max(t-5,0);return tc(n-e(r),t-r)}function rt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d,h;let f=e[0],p={done:!1,value:f},m=e=>void 0!==s&&e<s||void 0!==l&&e>l,g=e=>void 0===s?l:void 0===l?s:Math.abs(s-e)<Math.abs(l-e)?s:l,y=n*t,v=f+y,b=void 0===a?v:a(v);b!==v&&(y=b-f);let x=e=>-y*Math.exp(-e/r),w=e=>b+x(e),S=e=>{let t=x(e),n=w(e);p.done=Math.abs(t)<=u,p.value=p.done?b:n},k=e=>{m(p.value)&&(d=e,h=n7({keyframes:[p.value,g(p.value)],velocity:re(w,e,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return(h||void 0!==d||(t=!0,S(e),k(e)),void 0!==d&&e>=d)?h.next(e-d):(t||S(e),p)}}}n7.applyToOptions=e=>{let t=function(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(n5(r),2e4);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:eX(i)}}(e,100,n7);return e.ease=t.ease,e.duration=eq(t.duration),e.type="keyframes",e};let rn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function rr(e,t,n,r){if(e===t&&n===r)return e_;let i=t=>(function(e,t,n,r,i){let o,a;let s=0;do(o=rn(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a;while(Math.abs(o)>1e-7&&++s<12);return a})(t,0,1,e,n);return e=>0===e||1===e?e:rn(i(e),t,r)}let ri=rr(.42,0,1,1),ro=rr(0,0,.58,1),ra=rr(.42,0,.58,1),rs=e=>Array.isArray(e)&&"number"!=typeof e[0],rl=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ru=e=>t=>1-e(1-t),rc=rr(.33,1.53,.69,.99),rd=ru(rc),rh=rl(rd),rf=e=>e>=1?1:(e*=2)<1?.5*rd(e):.5*(2-Math.pow(2,-10*(e-1))),rp=e=>1-Math.sin(Math.acos(e)),rm=ru(rp),rg=rl(rp),ry={linear:e_,easeIn:ri,easeInOut:ra,easeOut:ro,circIn:rp,circInOut:rg,circOut:rm,backIn:rd,backInOut:rh,backOut:rc,anticipate:rf},rv=e=>"string"==typeof e,rb=e=>{if(e8(e)){ei(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,r,i]=e;return rr(t,n,r,i)}return rv(e)?(ei(void 0!==ry[e],`Invalid easing type '${e}'`,"invalid-easing-type"),ry[e]):e},rx=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1};function rw({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){let i=rs(r)?r.map(rb):rb(r),o={done:!1,value:t[0]},a=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if(ei(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];let a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,n){let r=[],i=n||eT.mix||n1,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);t&&(o=nF(Array.isArray(t)?t[n]||e_:t,o)),r.push(o)}return r}(t,r,i),u=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(u>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=rx(e[r],e[r+1],n);return s[r](i)};return n?t=>c(l(e[0],e[o-1],t)):c}((n&&n.length===t.length?n:function(e){let t=[0];return function(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=rx(0,t,r);e.push(tq(n,1,i))}}(t,e.length-1),t}(t)).map(t=>t*e),t,{ease:Array.isArray(i)?i:t.map(()=>i||ra).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}let rS={decay:rt,inertia:rt,tween:rw,keyframes:rw,spring:n7};function rk(e){"string"==typeof e.type&&(e.type=rS[e.type])}let rE=e=>e/100;class rC extends e9{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==tu.now()&&this.tick(tu.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;rk(e);let{type:t=rw,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e,{keyframes:a}=e,s=t||rw;s!==rw&&"number"!=typeof a[0]&&(this.mixKeyframes=nF(rE,n1(a[0],a[1])),a=[0,100]);let l=s({...e,keyframes:a});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...a].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=n5(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}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 n;let{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:u}=this;if(null===this.startTime)return r.next(0);let{delay:c=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:p,type:m,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let x=this.currentTime,w=r;if(h){let e=Math.min(this.currentTime,i)/s,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,h+1))%2&&("reverse"===f?(n=1-n,p&&(n-=p/s)):"mirror"===f&&(w=a)),x=l(0,1,n)*s}b?(this.delayState.value=d[0],n=this.delayState):n=w.next(x),o&&!b&&(n.value=o(n.value));let{done:S}=n;b||null===u||(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return k&&m!==rt&&(n.value=e6(d,this.options,y,this.speed)),g&&g(n.value),k&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return eX(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+eX(e)}get time(){return eX(this.currentTime)}set time(e){e=eq(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?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return re(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(tu.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=eX(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=n2,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(tu.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}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)}}let rj={anticipate:rf,backInOut:rh,circInOut:rg};class rA extends ti{constructor(e){"string"==typeof e.ease&&e.ease in rj&&(e.ease=rj[e.ease]),rk(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(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 rC({...o,autoplay:!1}
1),s=Math.max(10,tu.now()-this.startTime),u=l(0,10,s-10),c=a.sample(s).value,{name:d}=this.options;i&&d&&e0(i,d,c),t.setWithVelocity(a.sample(Math.max(0,s-u)).value,c,u),a.stop()}}let r_=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(N.test(e)||"0"===e)&&!e.startsWith("url("));function rT(e){e.duration=0,e.type="keyframes"}let rM=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,rR=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),rP=e1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class rI extends e9{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:s,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tu.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,name:s,motionValue:l,element:u,...c},h=u?.KeyframeResolver||eB;this.keyframeResolver=new h(a,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){let i;this.keyframeResolver=void 0;let{name:o,type:a,velocity:s,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=tu.now();let d=!0;!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],a=r_(i,t),s=r_(o,t);return er(a===s,`You are trying to animate ${t} from "${i}" to "${o}". "${a?o:i}" is not an animatable value.`,"value-not-animatable"),!!a&&!!s&&(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||tr(n))&&r)}(e,o,a,s)&&(d=!1,(eT.instantAnimations||!l)&&c?.(e6(e,n,t)),e[0]=e[e.length-1],rT(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},f=d&&!u&&function(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a,keyframes:s}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;let{onUpdate:u,transformTemplate:c}=t.owner.getProps();return rP()&&n&&(to.has(n)||rR.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&rM.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!c)&&!u&&!r&&"mirror"!==i&&0!==o&&"inertia"!==a}(h),p=h.motionValue?.owner?.current;if(f)try{i=new rA({...h,element:p})}catch{i=new rC(h)}else i=new rC(h);i.finished.then(()=>{this.notifyFinished()}).catch(e_),this.pendingTimeline&&(this.stopTimeline=i.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=i}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(),ez=!0,eF(),eV(),ez=!1),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()}}let rO={type:"spring",stiffness:500,damping:25,restSpeed:10},r$=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),rD={type:"keyframes",duration:.8},rL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rN=(e,{keyframes:t})=>t.length>2?rD:s.has(e)?e.startsWith("scale")?r$(t[1]):rO:rL,rz=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),rV=(e,t,n,r={},i,o)=>a=>{let s=nN(r,e)||{},l=s.delay||r.delay||0,{elapsed:u=0}=r;u-=eq(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>
1{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function(e){for(let t in e)if(!rz.has(t))return!0;return!1}(s)&&Object.assign(c,rN(e,c)),c.duration&&(c.duration=eq(c.duration)),c.repeatDelay&&(c.repeatDelay=eq(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(rT(c),0!==c.delay||(d=!0)),(eT.instantAnimations||eT.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,rT(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){let e=e6(c.keyframes,s);if(void 0!==e){eP.update(()=>{c.onUpdate(e),c.onComplete()});return}}return s.isSync?new rC(c):new rI(c)};function rF(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:a,...s}=t,l=e.getDefaultTransition();o=o?nL(o,l):l;let u=o?.reduceMotion,c=o?.skipAnimations;r&&(o=r);let d=[],h=i&&e.animationState&&e.animationState.getState()[i],f=o?.path;for(let t in f&&f.animateVisualElement(e,s,o,n,d),s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(void 0===i||h&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(h,t))continue;let a={delay:n,...nN(o||{},t)};c&&(a.skipAnimations=!0);let l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(i)&&i===l&&!a.velocity){eP.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=e.props[nM];if(n){let e=window.MotionHandoffAnimation(n,t,eP);null!==e&&(a.startTime=e,f=!0)}}nV(e,t);let p=u??e.shouldReduceMotion;r.start(rV(t,r,i,p&&J.has(t)?{type:!1}:a,e,f));let m=r.animation;m&&d.push(m)}if(a){let t=()=>eP.update(()=>{a&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=nD(e,t)||{};for(let t in i={...i,...n}){var o;let n=nz(o=i[t])?o[o.length-1]||0:o;e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tp(n))}}(e,a)});d.length?Promise.all(d).then(t):t()}return d}function rB(e,t,n,r=0,i=1){let o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,s=(a-1)*r;return"function"==typeof n?n(o,a):1===i?o*r:s-o*r}function rU(e,t,n={}){let r=nD(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(rF(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=0,o=1,a){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(rU(l,t,{...a,delay:n+("function"==typeof r?0:r)+rB(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,a,s,n)}:()=>Promise.resolve(),{when:s}=i;if(!s)return Promise.all([o(),a(n.delay)]);{let[e,t]="beforeChildren"===s?[o,a]:[a,o];return e().then(()=>t())}}let rH=tw.length;function rW(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 rG=[...tx].reverse(),rY=tx.length;function rq(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rX(){return{animate:rq(!0),whileInView:rq(),whileHover:rq(),whileTap:rq(),whileDrag:rq(),whileFocus:rq(),exit:rq()}}class rZ extends n${updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();tv(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(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}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=>rU(e,t,n)));else if("string"==typeof t)r=rU(e,t,n);else{let i="function"==typeof t?nD(e,t,n.custom):t;r=Promise.all(rF(e,i,n))}return r.then(()=>
1{e.notify("AnimationComplete",t)})})(e,t,n))),n=rX(),r=!0,i=!1,o=t=>(n,r)=>{let i=nD(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 a(a){let{props:s}=e,l=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<rH;e++){let r=tw[e],i=t.props[r];(tb(i)||!1===i)&&(n[r]=i)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<rY;t++){var f;let p=rG[t],m=n[p],g=void 0!==s[p]?s[p]:l[p],y=tb(g),v=p===a?m.isActive:null;!1===v&&(h=t);let b=g===l[p]&&g!==s[p]&&y;if(b&&(r||i)&&e.manuallyAnimateOnMount&&(b=!1),m.protectedKeys={...d},!m.isActive&&null===v||!g&&!m.prevProp||tv(g)||"boolean"==typeof g)continue;if("exit"===p&&m.isActive&&!0!==v){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let x=(f=m.prevProp,"string"==typeof g?g!==f:!!Array.isArray(g)&&!rW(g,f)),w=x||p===a&&m.isActive&&!b&&y||t>h&&y,S=!1,k=Array.isArray(g)?g:[g],E=k.reduce(o(p),{});!1===v&&(E={});let{prevResolvedValues:C={}}=m,j={...C,...E},A=t=>{w=!0,c.has(t)&&(S=!0,c.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in j){let t=E[e],n=C[e];if(!d.hasOwnProperty(e))(nz(t)&&nz(n)?!rW(t,n)||x:t!==n)?null!=t?A(e):c.add(e):void 0!==t&&c.has(e)?A(e):m.protectedKeys[e]=!0}m.prevProp=g,m.prevResolvedValues=E,m.isActive&&(d={...d,...E}),(r||i)&&e.blockInitialAnimation&&(w=!1);let _=b&&x,T=!_||S;w&&T&&u.push(...k.map(t=>{let n={type:p};if("string"==typeof t&&(r||i)&&!_&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=nD(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=rB(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof s.initial){let n=nD(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),u.push({animation:t})}let p=!!u.length;return r&&(!1===s.initial||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(u):Promise.resolve()}return{animateChanges:a,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=a(t);for(let e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=rX(),i=!0}}}(e))}}let rK=0;class rQ extends n${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;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){let n=nD(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...i}=n;for(let e in i){var r;null===(r=this.node.getValue(e))||void 0===r||r.jump(i[e])}}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}constructor(){super(...arguments),this.id=rK++,this.isExitComplete=!1}}let rJ={x:!1,y:!1};function r0(e){return[e("x"),e("y")]}function r1(e){return e.max-e.min}function r2(e,t,n,r=.5){e.origin=r,e.originPoint=tq(t.min,t.max,e.origin),e.scale=r1(n)/r1(t),e.translate=tq(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 r5(e,t,n,r){r2(e.x,t.x,n.x,r?r.originX:void 0),r2(e.y,t.y,n.y,r?r.originY:void 0)}function r3(e,t,n,r=0){let i=r?tq(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+r1(t)}function r4(e,t,n,r=0){let i=r?tq(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+r1(t)}function r6(e,t,n,r){r4(e.x,t.x,n.x,r?.x),r4(e.y,t.y,n.y,r?.y)}let r9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),r8=new Set(["INPUT","SELECT","TEXTAREA"]);function r7(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var ie=n(41464);function it(e){return(0,ie.K)(e)&&"ownerSVGElement"in e}var ir=n(59960);let ii=new WeakMap,io=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:it(r)&&"getBBox"in r?r.getBBox()[t]:r[n],ia=io("inline","width","offsetWidth"),is=io("block","height","offsetHeight");function il({target:e,borderBoxSize:t}){ii.get(e)?.forEach(n=>
1{n(e,{get width(){return ia(e,t)},get height(){return is(e,t)}})})}function iu(e){e.forEach(il)}let ic=new Set;function id(e,t){return"function"==typeof e?(ic.add(e),o||(o=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ic.forEach(t=>t(e))},window.addEventListener("resize",o)),()=>{ic.delete(e),ic.size||"function"!=typeof o||(window.removeEventListener("resize",o),o=void 0)}):function(e,t){i||"undefined"==typeof ResizeObserver||(i=new ResizeObserver(iu));let n=(0,ir.I)(e);return n.forEach(e=>{let n=ii.get(e);n||(n=new Set,ii.set(e,n)),n.add(t),i?.observe(e)}),()=>{n.forEach(e=>{let n=ii.get(e);n?.delete(t),n?.size||i?.unobserve(e)})}}(e,t)}let ih=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function ip(e){return{point:{x:e.pageX,y:e.pageY}}}let im=e=>t=>ih(t)&&e(t,ip(t));function ig(e,t,n,r){return r7(e,t,im(n),r)}let iy=e=>{let{current:t}=e;return t?t.ownerDocument.defaultView:null},iv=(e,t)=>Math.abs(e-t),ib=new Set(["auto","scroll"]);class ix{startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(ib.has(e.overflowX)||ib.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}),window.addEventListener("scroll",this.onWindowScroll),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),eP.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),eI(this.updatePoint)}constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=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;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=iw(this.lastRawMoveEventInfo,this.transformPagePoint));let n=ik(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,i=(e=n.offset,t={x:0,y:0},Math.sqrt(iv(e.x,t.x)**2+iv(e.y,t.y)**2)>=this.distanceThreshold);if(!r&&!i)return;let{point:o}=n,{timestamp:a}=eO;this.history.push({...o,timestamp:a});let{onStart:s,onMove:l}=this.handlers;r||(s&&s(this.lastMoveEvent,n),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,n)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=iw(t,this.transformPagePoint),eP.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=ik("pointercancel"===e.type?this.lastMoveEventInfo:iw(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!ih(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;let s=iw(ip(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=eO;this.history=[{...l,timestamp:u}];let{onSessionStart:c}=t;c&&c(e,ik(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=nF(ig(this.contextWindow,"pointermove",this.handlePointerMove,d),ig(this.contextWindow,"pointerup",this.handlePointerUp,d),ig(this.contextWindow,"pointercancel",this.handlePointerUp,d)),a&&this.startScrollTracking(a)}}function iw(e,t){return t?{point:t(e.point)}:e}function iS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ik(e,t){let{point:n}=e;return{point:n,delta:iS(n,iE(t)),offset:iS(n,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=iE(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>eq(.1)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*eq(.1)&&(r=e[1]);let o=eX(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};let a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,.1)}}function iE(e){return e[e.length-1]}function iC(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 ij(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 iA(e,t,n){return{min:i_(e,t),max:i_(e,n)}}function i_(e,t){return"number"==typeof e?e:e[t]||0}let iT=new WeakMap;class iM{start(e){let{snapToCursor:t=!1,distanceThreshold:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let{dragSnapToOrigin:i}=this.getProps();this.panSession=new ix(e,{onSessionStart:e=>{t&&this.snapToCursor(ip(e).point),this.stopAnimation()},onStart:(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===n||"y"===n?rJ[n]?null:(rJ[n]=!0,()=>{rJ[n]=!1}):rJ.x||rJ.y?null:(rJ.x=rJ.y=!0,()=>{rJ.x=rJ.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),r0(e=>{let t=this.getAxisMotionValue(e).get()||0;if(k.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=r1(r);t=parseFloat(t)/100*e}}}this.originPoint[e]=t}),i&&eP.update(()=>i(e,t),!1,!0),nV(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>
1{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:a}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),o&&eP.update(()=>o(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:iy(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:a}=this.getProps();a&&eP.postRender(()=>a(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||!iP(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,t,n){let{min:r,max:i}=t;return void 0!==r&&e<r?e=n?tq(r,e,n.min):Math.max(e,r):void 0!==i&&e>i&&(e=n?tq(i,e,n.max):Math.min(e,i)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&nP(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=function(e,t){let{top:n,left:r,bottom:i,right:o}=t;return{x:iC(e.x,r,o),y:iC(e.y,n,i)}}(r.layoutBox,t):this.constraints=!1,this.elastic=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.35;return!1===e?e=0:!0===e&&(e=.35),{x:iA(e,"left","right"),y:iA(e,"top","bottom")}}(n),i!==this.constraints&&!nP(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&r0(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}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nP(t))return!1;let r=t.current;ei(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;i.root&&(i.root.scroll=void 0,i.root.updateScroll());let o=function(e,t,n){let r=nn(e,n),{scroll:i}=t;return i&&(t8(r.x,i.offset.x),t8(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a={x:ij((e=i.layout.layoutBox).x,o.x),y:ij(e.y,o.y)};if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=t0(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{};return Promise.all(r0(a=>{if(!iP(a,t,this.currentDirection))return;let l=s&&s[a]||{};(!0===o||o===a)&&(l={min:0,max:0});let u={type:"inertia",velocity:n?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(a,u)})).then(a)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return nV(this.visualElement,e),n.start(rV(e,n,0,t,this.visualElement,!1))}stopAnimation(){r0(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var t;let n="_drag".concat(e.toUpperCase());return this.visualElement.getProps()[n]||this.visualElement.getValue(e,null!==(t=this.visualElement.latestValues[e])&&void 0!==t?t:0)}snapToCursor(e){r0(t=>{let{drag:n}=this.getProps();if(!iP(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],a=i.get()||0;i.set(e[t]-tq(n,o,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!nP(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};r0(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();
1r[e]=function(e,t){let n=.5,r=r1(e),i=r1(t);return i>r?n=rx(t.min,t.max-r,e.min):r>i&&(n=rx(e.min,e.max-i,t.min)),l(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.constraints=!1,this.resolveConstraints(),r0(t=>{if(!iP(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(tq(i,o,r[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;iT.set(this.visualElement,this);let t=this.visualElement.current,n=ig(t,"pointerdown",e=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=e.target,o=i!==t&&(r8.has(i.tagName)||!0===i.isContentEditable);n&&r&&!o&&this.start(e)}),r=()=>{let{dragConstraints:n}=this.getProps();nP(n)&&n.current&&(this.constraints=this.resolveRefConstraints(),e||(e=function(e,t,n){let r=id(e,iR(n)),i=id(t,iR(n));return()=>{r(),i()}}(t,n.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),eP.read(r);let a=r7(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",e=>{let{delta:t,hasLayoutChanged:n}=e;this.isDragging&&n&&(r0(e=>{let n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}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=K(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}}function iR(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function iP(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}class iI extends n${mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||e_}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()}constructor(e){super(e),this.removeGroupControls=e_,this.removeListeners=e_,this.controls=new iM(e)}}let iO=e=>(t,n)=>{e&&eP.update(()=>e(t,n),!1,!0)};class i$ extends n${onPointerDown(e){this.session=new ix(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iy(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:iO(e),onStart:iO(t),onMove:iO(n),onEnd:(e,t)=>{delete this.session,r&&eP.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ig(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}constructor(){super(...arguments),this.removePointerDownListener=e_}}let iD={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var iL=n(49637);let iN=!1;class iz extends no.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),iN&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),iD.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}),iN=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||eP.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),ta.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;iN=!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 iV(e){let[t,n]=(0,iL.oO)(),r=(0,no.useContext)(nu.p);return(0,nl.jsx)(iz,{...e,layoutGroup:r,switchLayoutGroup:(0,no.useContext)(nR),isPresent:t,safeToRemove:n})}let iF={value:null,addProjectionMetrics:null},iB=tW.length,iU=e=>"string"==typeof e?parseFloat(e):e,iH=e=>"number"==typeof e||E.test(e);function iW(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let iG=iq(0,.5,rm),iY=iq(.5,.95,e_);function iq(e,t,n){return r=>r<e?0:r>t?1:n(rx(e,t,r))}function iX(e,t){e.min=t.min,e.max=t.max}function iZ(e,t){iX(e.x,t.x),iX(e.y,t.y)}function iK(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function iQ(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function iJ(e,t,[n,r,i],o,a){!function(e,t=0,n=1,r=.5,i,o=e,a=e){if(k.test(t)&&(t=parseFloat(t),t=tq(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=tq(o.min,o.max,r);e===o&&(s-=t),e.min=iQ(e.min,t,n,s,i),e.max=iQ(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,o,a)}let i0=["x","scaleX","originX"],i1=["y","scaleY","originY"];function i2(e,t,n,r){iJ(e.x,t,i0,n?n.x:void 0,r?r.x:void 0),iJ(e.y,t,i1,n?n.y:void 0,r?r.y:void 0)}function i5(e){return 0===e.translate&&1===e.scale}function i3(e){return i5(e.x)&&i5(e.y)}function i4(e,t){return e.min===t.min&&e.max===t.max}function i6(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function i9(e,t){return i6(e.x,t.x)&&i6(e.y,t.y)}function i8(e){return r1(e.x)/r1(e.y)}function i7(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class oe{constructor(){this.members=[]}add(e){eZ(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&!1!==r.isConnected||n.snapshot||(eK(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(eK(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){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(void 0===r||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isU
1pdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let ot=(e,t)=>e.depth-t.depth;class on{constructor(){this.children=[],this.isDirty=!1}add(e){eZ(this.children,e),this.isDirty=!0}remove(e){eK(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ot),this.isDirty=!1,this.children.forEach(e)}}let or={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},oi=["","X","Y","Z"],oo=0;function oa(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function os({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=oo++,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,iF.value&&(or.nodes=or.calculatedTargetDeltas=or.calculatedProjections=0),this.nodes.forEach(oc),this.nodes.forEach(ob),this.nodes.forEach(ox),this.nodes.forEach(od),iF.addProjectionMetrics&&iF.addProjectionMetrics(or)},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 on)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new eQ),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=it(t)&&!(it(t)&&"svg"===t.tagName),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;eP.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=tu.now(),r=({timestamp:t})=>{let i=t-n;i>=250&&(eI(r),e(i-250))};return eP.setup(r,!0),()=>eI(r)}(i,0),iD.hasAnimatedSinceResize&&(iD.hasAnimatedSinceResize=!1,this.nodes.forEach(ov)))})}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()||oj,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!i9(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={...nN(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u,t.path)}else t||ov(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(),eI(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.forEac
1h(ow),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=n.props[nM];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",eP,!(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,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!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()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(op),this.nodes.forEach(of);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(om);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(og),this.nodes.forEach(oy),this.nodes.forEach(ol),this.nodes.forEach(ou)):this.nodes.forEach(om),this.clearAllSnapshots();let e=tu.now();eO.delta=l(0,1e3/60,e-eO.timestamp),eO.timestamp=e,eO.isProcessing=!0,e$.update.process(eO),e$.preRender.process(eO),e$.render.process(eO),eO.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ta.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(oh),this.sharedNodes.forEach(oS)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eP.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eP.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),!this.snapshot||r1(this.snapshot.measuredBox.x)||r1(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||(this.layoutCorrected=K()),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&&!i3(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||t5(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)),oT((t=r).x),oT(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return K();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(oR))){let{scroll:e}=this.root;e&&(t8(t.x,e.offset.x),t8(t.y,e.offset.y))}return t}removeElementScroll(e){let t=K();if(iZ(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&&iZ(t,e),t8(t.x,i.offset.x),t8(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||K();iZ(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(t8(r.x,-n.scroll.offset.x),t8(r.y,-n.scroll.offset.y)),t5(n.latestValues)&&nt(r,n.latestValues,n.layout?.layoutBox)}return t5(this.latestValues)&&nt(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=K();iZ(t,e);for(let e=0;e<this.path.length;e++){let n;let r=this.path[e];t5(r.latestValues)&&(r.instance&&(t2(r.latestValues)&&r.updateSnapshot(),iZ(n=K(),r.measurePageBox())),i2(t,r.latestValues,r.snapshot?.layoutBox,n))}return t5(this.latestValues)&&i2(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!==eO.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
1isTransformDirty),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=eO.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=K(),this.targetWithTransforms=K()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,s,l,u;this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,u=this.options.layoutAnchor||void 0,r3(a.x,s.x,l.x,u?.x),r3(a.y,s.y,l.y,u?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):iZ(this.target,this.layout.layoutBox),t9(this.target,this.targetDelta)):iZ(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&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),iF.value&&or.calculatedTargetDeltas++}}getClosestProjectingParent(){return!this.parent||t2(this.parent.latestValues)||t3(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=K(),this.relativeTargetOrigin=K(),r6(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),iZ(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===eO.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;iZ(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){let i,o;let a=n.length;if(a){t.x=t.y=1;for(let s=0;s<a;s++){o=(i=n[s]).projectionDelta;let{visualElement:a}=i.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(t8(e.x,-i.scroll.offset.x),t8(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,t9(e,o)),r&&t5(i.latestValues)&&nt(e,i.latestValues,i.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(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=K());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(iK(this.prevProjectionDelta.x,this.projectionDelta.x),iK(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),r5(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&i7(this.projectionDelta.x,this.prevProjectionDelta.x)&&i7(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),iF.value&&or.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=X(),this.projectionDelta=X(),this.projectionDeltaWithTransform=X()}setAnimationOrigin(e,t=!1,n){let r;let i=this.snapshot,o=i?i.latestValues:{},a={...this.latestValues},s=X();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let l=K(),u=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),d=!c||c.members.length<=1,h=!!(u&&!d&&!0===this.options.crossfade&&!this.path.some(oC));this.animationProgress=0;let f=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,i=f?.(n);if(i?(s.x.translate=i.x,s.x.scale=tq(e.x.scale,1,n),s.x.origin=e.x.origin,s.x.originPoint=e.x.originPoint,s.y.translate=i.y,s.y.scale=tq(e.y.scale,1,n),s.y.origin=e.y.origin,s.y.originPoint=e.y.originPoint):(ok(s.x,e.x,n),ok(s.y,e.y,n)),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var c,p,m,g;r6(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),m=this.relativeTarget,g=this.relativeTargetOrigin,oE(m.x,g.x,l.x,n),oE(m.y,g.y,l.y,n),r&&(c=this.relativeTarget,p=r,
1i4(c.x,p.x)&&i4(c.y,p.y))&&(this.isProjectionDirty=!1),r||(r=K()),iZ(r,this.relativeTarget)}u&&(this.animationValues=a,function(e,t,n,r,i,o){i?(e.opacity=tq(0,n.opacity??1,iG(r)),e.opacityExit=tq(t.opacity??1,0,iY(r))):o&&(e.opacity=tq(t.opacity??1,n.opacity??1,r));for(let i=0;i<iB;i++){let o=tW[i],a=iW(t,o),s=iW(n,o);(void 0!==a||void 0!==s)&&(a||(a=0),s||(s=0),0===a||0===s||iH(a)===iH(s)?(e[o]=Math.max(tq(iU(a),iU(s),r),0),(k.test(s)||k.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=tq(t.rotate||0,n.rotate||0,r))}(a,o,this.latestValues,n,h,d)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(eI(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=eP.update(()=>{iD.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=tp(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){let r=Q(e)?e:tp(e);return r.start(rV("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{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&&oM(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||K();let t=r1(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=r1(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}iZ(t,n),nt(t,i),r5(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new oe),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&&oa("z",e,r,this.animationValues);for(let t=0;t<oi.length;t++)oa(`rotate${oi[t]}`,e,r,this.animationValues),oa(`skew${oi[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=nx(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=nx(t?.pointerEvents)||""),this.hasProjected&&!t5(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1);return}e.visibility="";let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();
1let o=function(e,t,n){let r="",i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:o,rotateY:a,skewX:s,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),o&&(r+=`rotateX(${o}deg) `),a&&(r+=`rotateY(${a}deg) `),s&&(r+=`skewX(${s}deg) `),l&&(r+=`skewY(${l}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==s||1!==l)&&(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(o=n(i,o)),e.transform=o;let{x:a,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${100*a.origin}% ${100*s.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,tX){if(void 0===i[t])continue;let{correct:n,applyTo:a,isCSSVariable:s}=tX[t],l="none"===o?i[t]:n(i[t],r);if(a){let t=a.length;for(let n=0;n<t;n++)e[a[n]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?nx(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(of),this.root.sharedNodes.clear()}}}function ol(e){e.updateLayout()}function ou(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;if("size"===i)r0(e=>{let r=o?t.measuredBox[e]:t.layoutBox[e],i=r1(r);r.min=n[e].min,r.max=r.min+i});else if("x"===i||"y"===i){let e="x"===i?"y":"x";iX(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else oM(i,t.layoutBox,n)&&r0(r=>{let i=o?t.measuredBox[r]:t.layoutBox[r],a=r1(n[r]);i.max=i.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});let a=X();r5(a,n,t.layoutBox);let s=X();o?r5(s,e.applyTransform(r,!0),t.measuredBox):r5(s,n,t.layoutBox);let l=!i3(a),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let a=e.options.layoutAnchor||void 0,s=K();r6(s,t.layoutBox,i.layoutBox,a);let l=K();r6(l,n,o.layoutBox,a),i9(s,l)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function oc(e){iF.value&&or.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 od(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oh(e){e.clearSnapshot()}function of(e){e.clearMeasurements()}function op(e){e.isLayoutDirty=!0,e.updateLayout()}function om(e){e.isLayoutDirty=!1}function og(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function oy(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ov(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ob(e){e.resolveTargetDelta()}function ox(e){e.calcProjection()}function ow(e){e.resetSkewAndRotation()}function oS(e){e.removeLeadSnapshot()}function ok(e,t,n){e.translate=tq(t.translate,0,n),e.scale=tq(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oE(e,t,n,r){e.min=tq(t.min,n.min,r),e.max=tq(t.max,n.max,r)}function oC(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let oj={duration:.45,ease:[.4,0,.1,1]},oA=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),o_=oA("applewebkit/")&&!oA("chrome/")?Math.round:e_;function oT(e){e.min=o_(e.min),e.max=o_(e.max)}
1function oM(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(i8(t)-i8(n)))}function oR(e){return e!==e.root&&e.scroll?.wasRoot}let oP=os({attachResizeListener:(e,t)=>r7(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),oI={current:void 0},oO=os({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oI.current){let e=new oP({});e.mount(window),e.setOptions({layoutScroll:!0}),oI.current=e}return oI.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function o$(e,t){let n=(0,ir.I)(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function oD(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&eP.postRender(()=>i(t,ip(t)))}class oL extends n${mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=o$(e,n);return r.forEach(e=>{let n,r=!1,o=!1,a=()=>{e.removeEventListener("pointerleave",u)},s=e=>{n&&(n(e),n=void 0),a()},l=e=>{r=!1,window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l),o&&(o=!1,s(e))},u=e=>{if("touch"!==e.pointerType){if(r){o=!0;return}s(e)}};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||rJ.x||rJ.y)return;o=!1;let a=t(e,r);"function"==typeof a&&(n=a,e.addEventListener("pointerleave",u,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",l,i),window.addEventListener("pointercancel",l,i)},i)}),o}(e,(e,t)=>(oD(this.node,t,"Start"),e=>oD(this.node,e,"End"))))}unmount(){}}class oN extends n${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=nF(r7(this.node.current,"focus",()=>this.onFocus()),r7(this.node.current,"blur",()=>this.onBlur()))}unmount(){}constructor(){super(...arguments),this.isActive=!1}}var oz=n(13537);let oV=(e,t)=>!!t&&(e===t||oV(e,t.parentElement)),oF=new WeakSet;function oB(e){return t=>{"Enter"===t.key&&e(t)}}function oU(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}let oH=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=oB(()=>{if(oF.has(n))return;oU(n,"down");let e=oB(()=>{oU(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>oU(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function oW(e){return ih(e)&&!(rJ.x||rJ.y)}let oG=new WeakSet;function oY(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&&eP.postRender(()=>i(t,ip(t)))}class oq extends n${mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[r,i,o]=o$(e,n),a=e=>{let r=e.currentTarget;if(!oW(e)||oG.has(e))return;oF.add(r),n.stopPropagation&&oG.add(e);let o=t(r,e),a={...i,capture:!0},s=(e,t)=>{window.removeEventListener("pointerup",l,a),window.removeEventListener("pointercancel",u,a),oF.has(r)&&oF.delete(r),oW(e)&&"function"==typeof o&&o(e,{success:t})},l=e=>{s(e,r===window||r===document||n.useGlobalTarget||oV(r,e.target))},u=e=>{s(e,!1)};window.addEventListener("pointerup",l,a),window.addEventListener("pointercancel",u,a)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,i),(0,oz.R)(e)&&(e.addEventListener("focus",e=>oH(e,i)),r9.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(oY(this.node,t,"Start"),(e,t)=>{let{success:n}=t;return oY(this.node,e,n?"End":"Cancel")}),{useGlobalTarget:t,stopPropagation:(null==n?void 0:n.tap)===!1})}unmount(){}}let oX=new WeakMap,oZ=new WeakMap,oK=e=>
1{let t=oX.get(e.target);t&&t(e)},oQ=e=>{e.forEach(oK)},oJ={some:0,all:1};class o0 extends n${startObserver(){var e;null===(e=this.stopObserver)||void 0===e||e.call(this);let{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:"number"==typeof i?i:oJ[i]};this.stopObserver=function(e,t,n){let r=function(e){let{root:t,...n}=e,r=t||document;oZ.has(r)||oZ.set(r,{});let i=oZ.get(r),o=JSON.stringify(n);return i[o]||(i[o]=new IntersectionObserver(oQ,{root:t,...n})),i[o]}(t);return oX.set(e,n),r.observe(e),()=>{oX.delete(e),r.unobserve(e)}}(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!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(),i=t?n:r;i&&i(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function(e){let{viewport:t={}}=e,{viewport:n={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=>t[e]!==n[e]}(e,t))&&this.startObserver()}unmount(){var e;null===(e=this.stopObserver)||void 0===e||e.call(this),this.hasEnteredView=!1,this.isInView=!1}constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}}let o1=function(e,t){if("undefined"==typeof Proxy)return nO;let n=new Map,r=(n,r)=>nO(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,nO(o,void 0,e,t)),n.get(o))})}({animation:{Feature:rZ},exit:{Feature:rQ},inView:{Feature:o0},tap:{Feature:oq},focus:{Feature:oN},hover:{Feature:oL},pan:{Feature:i$},drag:{Feature:iI,ProjectionNode:oO,MeasureLayout:iV},layout:{ProjectionNode:oO,MeasureLayout:iV}},(e,t)=>{var n;return(null!==(n=t.isSVG)&&void 0!==n?n:ns(e))?new tJ(t):new nr(t,{allowProjection:e!==no.Fragment})})},15217:function(e,t,n){"use strict";let r,i;n.r(t),n.d(t,{default:function(){return sK}});var o,a,s,l,u,c,d,h,f,p=n(57437),m=n(98259),g=n(74951),y=n(2265),v=n(54887),b=n(50658),x=n(90535),w=n(80717);function S(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):k.test(e)?Number(e):e)}let k=/^-?\d+$/,E=/^[a-z_$]+/;function C(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:"object"==typeof e&&"_key"in e&&"string"==typeof e._key?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&E.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function j(e){if("createIfNotExists"in e)return{type:"createIfNotExists",document:e.createIfNotExists};if("createOrReplace"in e)return{type:"createOrReplace",document:e.createOrReplace};if("create"in e)return{type:"create",document:e.create};if("delete"in e)return{id:e.delete.id,type:"delete"};if("patch"in e){var t,n;return{type:"patch",id:e.patch.id,patches:[..."set"in(n=t=e.patch)?Object.keys(n.set).map(e=>({path:S(e),op:{type:"set",value:n.set[e]}})):[],..."setIfMissing"in t?Object.keys(t.setIfMissing).map(e=>({path:S(e),op:{type:"setIfMissing",value:t.setIfMissing[e]}})):[],..."unset"in t?t.unset.map(e=>({path:S(e),op:{type:"unset"}})):[],..."inc"in t?Object.keys(t.inc).map(e=>({path:S(e),op:{type:"inc",amount:t.inc[e]}})):[],..."inc"in t?Object.keys(t.dec).map(e=>({path:S(e),op:{type:"dec",amount:t.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let t=function(e){let t=A.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${A.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!t)throw Error("Insert patch missing position");let n=S(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 A=["before","replace","after"];function _(e){return M(e)}function T(e){return e.flatMap(_)}function M(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:[C(t)]};if("insert"===n.type)return{insert:{[n.position]:C([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[C(t)]:n.value}};if("inc"===n.type)return{inc:{[C(t)]:n.amount}};if("dec"===n.type)return{dec:{[C(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[C(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${C(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>
1C([...t,{_key:e._key}])),insert:{[n.position]:C([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[C(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>C(t.concat(e)))};if("replace"===n.type)return{insert:{replace:C(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[C(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}function R(e){return Array.isArray(e)?e:[e]}var P=Object.freeze({__proto__:null,decode:function(e){return j(e)},decodeAll:function(e){return e.map(j)},encode:_,encodeAll:T,encodeMutation:M,encodeTransaction:function(e){return{transactionId:e.id,mutations:T(e.mutations)}}});function I(e,t,n){return{type:"insert",referenceItem:n,position:t,items:R(e)}}function O(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function $(e){return{type:"remove",referenceItem:e}}function D(e,t){return{path:"string"==typeof e?S(e):e,op:t}}var L=n(88603);let N=(0,L.ah)(),z=N,V=new Set,F=/_key\s*==\s*['"](.*)['"]/,B=/^\d*:\d*$/;function U(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function H(e){return"string"==typeof e?F.test(e.trim()):"object"==typeof e&&"_key"in e}let W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/_key\s*==\s*['"](.*)['"]/;function Y(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(W);if(!t)throw Error("Invalid path string");return t.map(q)}(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(U(t)){if(!Array.isArray(i))return n;i=i[t]}if(H(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 q(e){return U(e)?Number(e.replace(/[^\d]/g,"")):H(e)?{_key:e.match(G)[1]}:!function(e){if("string"==typeof e&&B.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 X(){return(0,y.useSyncExternalStore)(Q,K,Z)}function Z(){return N}function K(){return z}function Q(e){return V.add(e),()=>V.delete(e)}function J(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function ee(e,t){let n=(0,g.el)(),r=(0,g.Ax)();if(t===N||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let i=(0,b.qy)(e),o=(0,b.vs)(e),a=t.getSnapshot().context?.documents,s=a?.[i],l=a?.[o],u=s||l;if(!u)throw Error(`Document "${e}" not found`);let c=s.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:s,draftId:i,getSnapshot:()=>d,publishedDoc:l,publishedId:o,get snapshot(){if(!c)throw Error(`Snapshot for document "${e}" not found`);return c}}}function et(){let e,t,n;let r=(0,m.c)(7),i=X();r[0]!==i?(e=e=>({id:e,commit:()=>{let{draftDoc:t}=ee(e,i);t.send({type:"submit"})},get:t=>{let{snapshot:n}=ee(e,i);return t?Y(n,t):n},getSnapshot:function(e,t){let{getSnapshot:n}=ee(e,t);return n}(e,i),patch:async(t,n)=>{let r=ee(e,i),{draftDoc:o,draftId:a,getSnapshot:s,publishedId:l}=r,{commit:u=!0}=n||{},c=await ("function"==typeof t?t({draftId:a,publishedId:l,get snapshot(){return r.snapshot},getSnapshot:s}):t),d=await s();if(!d)throw Error(`Snapshot for document "${e}" not found`);o.send({type:"mutate",mutations:[{type:"createIfNotExists",document:{...d,_id:a}},{type:"patch",id:a,patches:R(c)}]}),u&&("object"==typeof u&&"debounce"in u?J(()=>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}=ee(e,i),{commit:o}=n||{},a=void 0===o||o;r.send({type:"mutate",mutations:t}),a&&("object"==typeof a&&"debounce"in a?J(()=>r.send({type:"submit"}),a.debounce)():r.send({type:"submit"}))},r[2]=i,r[3]=t):t=r[3];let a=t;return r[4]!==o||r[5]!==a?(n={getDocument:o,mutateDocument:a},r[4]=o,r[5]=a,r[6]=n):n=r[6],n}let en=()=>
1{if(i)return i;i=[];for(let e=0;e<256;++e)i[e]=(e+256).toString(16).slice(1);return i};function er(e){let t=en();return(function(e=16){let t=new Uint8Array(e);return function(e){let t="undefined"!=typeof window&&"crypto"in window?window.crypto:globalThis.crypto;if(!t||!t.getRandomValues)throw Error("WebCrypto not available in this environment");t.getRandomValues(e)}(t),t})(e).reduce((e,n)=>e+t[n],"").slice(0,e)}function ei(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 a=r.lastIndexOf("["),s=r.substring(0,a);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(!s||!t)throw Error("Invalid path");return{path:s,key:t,hasExplicitKey:n}}async function eo(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:i}=ei(e),o=await t.getSnapshot(),a=Y(o,r),s=Y(o,e.path),l=a.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===a.length-1)return[];u=-1,c="after"}else if("next"===n){if(l===a.length-1)return[];u=l,c="after"}else if("previous"===n){if(0===l)return[];u=l-1,c="before"}return[D(r,O(l,l+1)),D(r,I(s,c,u))]}var ea=n(77861);let es=(0,ea.zGw)((0,ea.Z_8)(),(0,ea.EiV)(1)),el=(0,ea.jtO)(es),eu=(0,ea.Ryn)({baseUrl:es,dataset:el,id:es,path:es,projectId:el,tool:el,type:el,workspace:el,perspective:(0,ea.tvc)((0,ea.Z_8)(),"drafts")}),ec=/^([\w-]+):(0|[1-9][0-9]*)$/,ed=/^([\w-]+):([0-9]+),([0-9]+)$/,eh=/^([\w-]+):([\w-]+)$/,ef=(0,ea.zGw)((0,ea.Z_8)(),(0,ea.EiV)(1)),ep=(0,ea.Ryn)({origin:ef,href:ef,data:(0,ea.jtO)((0,ea.IMB)((0,ea.Z_8)(),(0,ea._4T)()))});function em(e){let t=(0,ea.AsG)(eu,e);if(t.success)return t.output;let n=(0,ea.AsG)(ep,e);if(n.success)try{let e=new URL(n.output.href,typeof document>"u"?"https://example.com":location.origin);return e.searchParams.size>0?(0,ea.Qc3)(eu,Object.fromEntries(e.searchParams.entries())):n.output}catch(e){return console.error("Failed to parse sanity node",e),n.output}}var eg={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},ey={0:8203,1:8204,2:8205,3:65279},ev=[,,,,].fill(String.fromCodePoint(ey[0])).join(""),eb=Object.fromEntries(Object.entries(ey).map(e=>e.reverse())),ex=Object.fromEntries(Object.entries(eg).map(e=>e.reverse())),ew=`${Object.values(eg).map(e=>`\\u{${e.toString(16)}}`).join("")}`,eS=RegExp(`[${ew}]{4,}`,"gu");let ek=[];for(let e=0;e<256;++e)ek.push((e+256).toString(16).slice(1));let eE=new Uint8Array(16);var eC={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ej(e,t,n){if(eC.randomUUID&&!e)return eC.randomUUID();let i=(e=e||{}).random??e.rng?.()??function(){if(!r){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(eE)}();if(i.length<16)throw Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(ek[e[t+0]]+ek[e[t+1]]+ek[e[t+2]]+ek[e[t+3]]+"-"+ek[e[t+4]]+ek[e[t+5]]+"-"+ek[e[t+6]]+ek[e[t+7]]+"-"+ek[e[t+8]]+ek[e[t+9]]+"-"+ek[e[t+10]]+ek[e[t+11]]+ek[e[t+12]]+ek[e[t+13]]+ek[e[t+14]]+ek[e[t+15]]).toLowerCase()}(i)}function eA(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function e_(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 eT(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function eM(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function eR(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,e_(e,Math.min(e.w,e.h)/10,"horizontal"===n?"x":"y"))))return null;for(let a of t){let t=function(e,t){let n=[{x1:t.x,y1:t.y,x2:t.x+t.w,y2:t.y},{x1:t.x+t.w,y1:t.y,x2:t.x+t.w,y2:t.y+t.h},{x1:t.x+t.w,y1:t.y+t.h,x2:t.x,y2:t.y+t.h},{x1:t.x,y1:t.y+t.h,x2:t.x,y2:t.y}],r=[];for(let t=0;t<n.length;t++){let i=function(e,t){let{x1:n,y1:r,x2:i,y2:o}=e,{x1:a,y1:s,x2:l,y2:u}=t;if(n===i&&r===o||a===l&&s===u)return!1;let c=(u-s)*(i-n)-(l-a)*(o-r);if(0===c)return!1;let d=((l-a)*(r-s)-(u-s)*(n-a))/c,h=((i-n)*(r-s)-(o-r)*(n-a))/c;return!(d<0)&&!(d>1)&&!(h<0)&&!(h>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)=>eM(t,{x:e.x1,y:e.y1})-eM(n,{x:e.x1,y:e.y1}))}(e,e_(a,Math.min(a.w,a.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?eM(o,e)<eM(o,r)&&(r=e,i=a):(r=e,i=a)}}return i||null}function eP(e,t,n){let{x:r,y:i,w:o,h:a}=e,{x:s,y:l}=n;return{x:s+(r-s)*t,y:l+(i-l)*t,w:o*t,h:a*t}}function eI(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 eO(e,t){return t.find(t=>eT(eA(t.elements.element),e))?.sanity}function e$(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:eO(t.left,e)}:null,right:t.right?{rect:t.right,sanity:eO(t.right,e)}:null}:{top:t.top?{rect:t.top,sanity:eO(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:eO(t.bottom,e)}:null}}function eD(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}}
1function eL(e,t,n){let r=eA(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=eP(eA(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 eN(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 ez(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=eI(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 eV(e,t,n,r,i,o){return new Promise(a=>{if(1===new DOMMatrix(window.getComputedStyle(t).transform).a)return;let s=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),a()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),t.style.transform=`translateY(${Math.max(l-e,-s+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 eF=!1,eB={y:0},eU={x:0,y:0},eH=typeof document>"u"?0:document.documentElement.scrollHeight,eW=null,eG=e=>e instanceof HTMLElement||e instanceof SVGElement,eY=e=>e&&eG(e)?e.dataset?.sanityOverlayElement?e:eY(e.parentElement):null;function eq(e){return eS.lastIndex=0,eS.test(e)}function eX(e,t=!1){return eq(e)?function(e,t=!1){try{let n=function(e){let t=e.match(eS);if(t)return function(e,t=!1){let n=Array.from(e);if(n.length%2==0){if(n.length%4||!e.startsWith(ev))return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${ex[e[2*t].codePointAt(0)]}${ex[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let i=[],o=[r.join("")],a=10;for(;o.length;){let e=o.shift();try{if(i.push(JSON.parse(e)),t)break}catch(r){if(!a--)throw r;let t=+(null==(n=r.message.match(/\sposition\s(\d+)$/))?void 0:n[1]);if(!t)throw r;o.unshift(e.substring(0,t),e.substring(t))}}return i}(n,t)}else throw Error("Encoded data has invalid length");let r=[];for(let e=.25*n.length;e--;){let t=n.slice(4*e,4*e+4).map(e=>eb[e.codePointAt(0)]).join("");r.unshift(String.fromCharCode(parseInt(t,4)))}if(t){r.shift();let e=r.indexOf("\0");return -1===e&&(e=r.length),[JSON.parse(r.slice(0,e).join(""))]}return r.join("").split("\0").filter(Boolean).map(e=>JSON.parse(e))}(t[0],!0)[0]}(e);return n&&"sanity.io"===n.origin?(t&&(n.href=n.href?.replace(".alt","")),n):null}catch(t){return console.error("Failed to decode stega for string: ",e,"with the original error: ",t),null}}(e,t):null}let eZ=e=>e.nodeType===Node.ELEMENT_NODE,eK=e=>"IMG"===e.tagName,eQ=e=>"TIME"===e.tagName,eJ=e=>"SVG"===e.tagName.toUpperCase();function e0(e){return"path"in e}function e1(e){if(!e.length||!e.map(e=>e0(e)).every((e,t,n)=>e===n[0]))return;if(!e0(e[0]))return e[0];let t=e.filter(e0),n=e[0],r=["projectId","dataset","id","baseUrl","workspace","tool"];for(let e=1;e<t.length;e++){let 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
1)=>t===r[n]?[...e,t]:[],[]).reverse().join(".")}(n.path,i.path)}}return n}function e2(e){let t=e.lastIndexOf(".");return e.substring(t,e.length).includes("[")}function e5(e){if(!e2(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function e3(e,t){return!!(e2(e.path)&&e2(t.path))&&e5(e.path)===e5(t.path)}function e4(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!e0(t)||!e2(t.path))return null;let i=e.getAttribute("data-sanity-drag-group"),o=[...n].reduce((e,n)=>{let o=r.get(n),a=n.getAttribute("data-sanity-drag-disable"),s=n.getAttribute("data-sanity-drag-group"),l=null!==n.getAttribute("data-sanity");return o?.sanity&&!a&&e0(o.sanity)&&e3(t,o.sanity)&&(null===i||i===s)&&l&&e.push(o),e},[]);return o.length<=1?null:o}let e6=(0,y.createContext)(null);var e9=n(23129),e8=n(71033),e7=n(57685),te=n(59679);function tt(e){let t=function e(t){return!!t&&("object"==typeof t||"function"==typeof t)&&("reference"===t.name||e(t.type))}(e)&&1===(e.to??[]).length?e.to[0].icon:void 0;return e.icon??e.type?.icon??t}function tn(e,t){return{query:"change query"===t.type?t.query:e.query,groups:"select group"===t.type?e.groups.map(e=>({...e,selected:t.name===e.name})):e.groups,views:"toggle view"===t.type?e.views.map(e=>({...e,selected:t.name===e.name})):e.views}}let tr="all-items",ti={gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))"};function to(e){let t,n,r,i,o,a,s,l,u,c,d,h,f,m,g,v;let b=(0,e9.c)(54),w=void 0===e.showIcons||e.showIcons,S=void 0===e.filter||"auto"===e.filter?e.schemaTypes.length>5:e.filter;b[0]!==e.groups||b[1]!==e.labels?(t=e.groups?[{name:tr,title:e.labels["insert-menu.filter.all-items"],selected:!0},...e.groups.map(tl)]:[],b[0]=e.groups,b[1]=e.labels,b[2]=t):t=b[2],b[3]!==e.views?(n=e.views??[{name:"list"}],b[3]=e.views,b[4]=n):n=b[4],b[5]!==n?(r=n.map(ts),b[5]=n,b[6]=r):r=b[6],b[7]!==t||b[8]!==r?(i={query:"",groups:t,views:r},b[7]=t,b[8]=r,b[9]=i):i=b[9];let[k,E]=(0,y.useReducer)(tn,i);if(b[10]!==e||b[11]!==S||b[12]!==w||b[13]!==k.groups||b[14]!==k.query||b[15]!==k.views){var C,j,A;let t,n,r;let i=(C=e.schemaTypes,j=k.query,A=k.groups,C.filter(e=>(function(e,t){let n=t.find(e=>e.selected);return!n||n.name===tr||n.of?.includes(e.name)})(e,A)&&function(e,t){let n=t.trim().toLowerCase();return e.title?e.title?.toLowerCase().includes(n):e.name.includes(n)}(e,j))),m=k.views.find(ta),g=S||k.views.length>1,y=k.groups&&k.groups.length>0,v=g||y;s=x.v2,f=0,a=x.kC,c="column",d="fill",b[25]!==v?(t=v?{style:{borderBottom:"1px solid var(--card-border-color)"},paddingBottom:1}:{},b[25]=v,b[26]=t):t=b[26],b[27]!==e.labels||b[28]!==S||b[29]!==g||b[30]!==k.query||b[31]!==k.views?(n=g?(0,p.jsxs)(x.kC,{flex:"none",align:"center",paddingTop:1,paddingX:1,gap:1,children:[S?(0,p.jsx)(x.xu,{flex:1,children:(0,p.jsx)(x.oi,{autoFocus:!0,border:!1,fontSize:1,icon:e8.W1M,onChange:e=>{E({type:"change query",query:e.target.value})},placeholder:e.labels["insert-menu.search.placeholder"],value:k.query})}):null,k.views.length>1?(0,p.jsx)(x.xu,{flex:"none",children:(0,p.jsx)(td,{views:k.views,onToggle:e=>{E({type:"toggle view",name:e})},labels:e.labels})}):null]}):null,b[27]=e.labels,b[28]=S,b[29]=g,b[30]=k.query,b[31]=k.views,b[32]=n):n=b[32],b[33]!==y||b[34]!==k.groups?(r=y?(0,p.jsx)(x.xu,{paddingTop:1,paddingX:1,children:(0,p.jsx)(x.td,{space:1,children:k.groups.map(e=>(0,p.jsx)(x.OK,{id:`${e.name}-tab`,"aria-controls":`${e.name}-panel`,label:e.title??e7(e.name),selected:e.selected,onClick:()=>{E({type:"select group",name:e.name})}},e.name))})}):null,b[33]=y,b[34]=k.groups,b[35]=r):r=b[35],b[36]!==t||b[37]!==n||b[38]!==r?(h=(0,p.jsxs)(x.xu,{...t,children:[n,r]}),b[36]=t,b[37]=n,b[38]=r,b[39]=h):h=b[39],o=x.xu,l=1,u=0===i.length?(0,p.jsx)(x.xu,{padding:2,children:(0,p.jsx)(x.xv,{muted:!0,size:1,children:e.labels["insert-menu.search.no-results"]})}):m?"grid"===m.name?(0,p.jsx)(x.rj,{autoRows:"auto",flex:1,gap:1,style:ti,children:i.map(t=>(0,p.jsx)(tf,{icon:w?tt(t):void 0,onClick:()=>{e.onSelect(t)},previewImageUrl:m.previewImageUrl?.(t.name),schemaType:t}
1,t.name))}):(0,p.jsx)(x.Kq,{flex:1,space:1,children:i.map(t=>(0,p.jsx)(x.sN,{icon:w?tt(t):void 0,onClick:()=>{e.onSelect(t)},text:t.title??e7(t.name)},t.name))}):null,b[10]=e,b[11]=S,b[12]=w,b[13]=k.groups,b[14]=k.query,b[15]=k.views,b[16]=o,b[17]=a,b[18]=s,b[19]=l,b[20]=u,b[21]=c,b[22]=d,b[23]=h,b[24]=f}else o=b[16],a=b[17],s=b[18],l=b[19],u=b[20],c=b[21],d=b[22],h=b[23],f=b[24];return b[40]!==o||b[41]!==l||b[42]!==u?(m=(0,p.jsx)(o,{padding:l,children:u}),b[40]=o,b[41]=l,b[42]=u,b[43]=m):m=b[43],b[44]!==a||b[45]!==m||b[46]!==c||b[47]!==d||b[48]!==h?(g=(0,p.jsxs)(a,{direction:c,height:d,children:[h,m]}),b[44]=a,b[45]=m,b[46]=c,b[47]=d,b[48]=h,b[49]=g):g=b[49],b[50]!==s||b[51]!==g||b[52]!==f?(v=(0,p.jsx)(s,{padding:f,children:g}),b[50]=s,b[51]=g,b[52]=f,b[53]=v):v=b[53],v}function ta(e){return e.selected}function ts(e,t){return{...e,selected:0===t}}function tl(e){return{...e,selected:!1}}let tu={grid:e8.dd_,list:e8.AEM},tc={grid:"insert-menu.toggle-grid-view.tooltip",list:"insert-menu.toggle-list-view.tooltip"};function td(e){let t,n,r,i;let o=(0,e9.c)(11),a=e.views.findIndex(th),s=e.views[a+1]??e.views[0],l=e.labels[tc[s.name]];o[0]!==l?(t=(0,p.jsx)(x.xv,{size:1,children:l}),o[0]=l,o[1]=t):t=o[1];let u=tu[s.name];return o[2]!==s.name||o[3]!==e?(n=()=>{e.onToggle(s.name)},o[2]=s.name,o[3]=e,o[4]=n):n=o[4],o[5]!==u||o[6]!==n?(r=(0,p.jsx)(x.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,p.jsx)(x.u,{content:t,placement:"top",portal:!0,children:r}),o[8]=t,o[9]=r,o[10]=i):i=o[10],i}function th(e){return e.selected}function tf(e){let t,n,r,i,o,a,s,l,u;let c=(0,e9.c)(19),[d,h]=(0,y.useState)(!1),f=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]!==f?(r=(0,te.isValidElementType)(f)?(0,p.jsx)(x.kC,{align:"center",justify:"center",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,p.jsx)(x.xv,{size:1,children:(0,p.jsx)(f,{})})}):null,c[2]=f,c[3]=r):r=c[3],c[4]!==d||c[5]!==e.previewImageUrl?(i=!e.previewImageUrl||d?null:(0,p.jsx)("img",{src:e.previewImageUrl,style:{objectFit:"contain",width:"100%",height:"100%",position:"absolute",inset:0},onError:()=>{h(!0)}}),c[4]=d,c[5]=e.previewImageUrl,c[6]=i):i=c[6],c[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,p.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?(a=(0,p.jsxs)(x.xu,{flex:"none",style:n,children:[r,i,o]}),c[8]=r,c[9]=i,c[10]=a):a=c[10];let m=e.schemaType.title??e.schemaType.name;return c[11]!==m?(s=(0,p.jsx)(x.xu,{flex:1,padding:2,children:(0,p.jsx)(x.xv,{size:1,weight:"medium",children:m})}),c[11]=m,c[12]=s):s=c[12],c[13]!==a||c[14]!==s?(l=(0,p.jsxs)(x.kC,{direction:"column",gap:1,padding:1,children:[a,s]}),c[13]=a,c[14]=s,c[15]=l):l=c[15],c[16]!==e.onClick||c[17]!==l?(u=(0,p.jsx)(x.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 tp(e){if(!e)return(0,p.jsx)(e8.FMB,{});if("string"===e.type)return(0,p.jsx)(e8.Rhe,{});if("number"===e.type)return(0,p.jsx)(e8.yEv,{});let{value:t}=e;if("icon"in e&&e.icon)return(0,p.jsx)("div",{dangerouslySetInnerHTML:{__html:e.icon}});let{type:n}=t;if("string"===n)return(0,p.jsx)(e8.Rhe,{});if("boolean"===n)return(0,p.jsx)(e8.nSX,{});if("number"===n)return(0,p.jsx)(e8.yEv,{});if("array"===n||"union"===n)return(Array.isArray(t.of)?t.of:[t.of]).some(e=>"name"in e&&"block"===e.name)?(0,p.jsx)(e8.aI,{}):(0,p.jsx)(e8.DZP,{});if("object"===n){if("image"===e.name)return(0,p.jsx)(e8.XBm,{});if("block"===e.name)return(0,p.jsx)(e8.Rhe,{})}return(0,p.jsx)(e8.FMB,{})}let tm=(0,w.iv)`
2  overflow-y: scroll;
3  overscroll-behavior: contain;
4  -ms-overflow-style: none;
5  scrollbar-width: none;
6
7  &:before {
8    content: '';
9    display: block;
10    height: calc(100% + 1px);
11    position: absolute;
12    top: 0;
13    width: 100%;
14    z-index: -1;
15  }
16`,tg=w.zo.div`
17  height: 100%;
18  inset: 0;
19  pointer-events: all;
20  position: fixed;
21  width: 100%;
22  display: flex;
23  justify-content: center;
24  align-items: center;
25
26  ${e=>e.$blockScroll&&tm}
27`,ty=w.zo.div`
28  background: transparent;
29  height: 100%;
30  inset: 0;
31  position: absolute;
32  width: 100%;
33`,tv=e=>{let t;let n=(0,m.c)(2);return n[0]!==e?(t=(0,p.jsx)(x.h_,{children:(0,p.jsx)(tb,{...e})}),n[0]=e,n[1]=t):t=n[1],t},tb=e=>{let t,n;let r=(0,m.c)(7),{children:i,onDismiss:o,setBoundaryElement:a,blockScroll:s}=e,l=void 0===s||s;return r[0]!==o?(t=(0,p.jsx)(ty,{onMouseDownCapture:()=>{o?.()}}),r[0]=o,r[1]=t):t=r[1],r[2]!==l||r[3]!==i||r[4]!==a||r[5]!==t?(n=(0,p.jsxs)(tg,{"data-sanity-overlay-element":!0,ref:a,onClick:tx,$blockScroll:l,children:[t,i]}),r[2]=l,r[3]=i,r[4]=a,r[5]=t,r[6]=n):n=r[6],n};function tx(e){e.stopPropagation()}function tw(e){return{type:"log",name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}let tS={"Visual Editing Drag Sequence Completed":tw({name:"Visual Editing Drag Sequence Completed",description:"An array is successfully reordered using drag and drop.",version:1}),"Visual Editing Drag Minimap Enabled":tw({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":tw({name:"Visual Editing Context Menu Item Removed",description:"An item is removed using the Context Menu.",version:1}),"Visual Editing Context Menu Item Duplicated":tw({name:"Visual Editing Context Menu Item Duplicated",description:"An item is duplicated using the Context Menu.",version:1}),"Visual Editing Context Menu Item Moved":tw({name:"Visual Editing Context Menu Item Moved",description:"An item is moved using the Context Menu.",version:1}),"Visual Editing Context Menu Item Inserted":tw({name:"Visual Editing Context Menu Item Inserted",description:"An item is inserted using the Context Menu.",version:1}),"Visual Editing Insert Menu Item Inserted":tw({name:"Visual Editing Insert Menu Item Inserted",description:"An item is inserted using the Insert Menu.",version:1}),"Visual Editing Overlay Clicked":tw({name:"Visual Editing Overlay Clicked",description:"An Overlay is clicked.",version:1})},tk=(0,y.createContext)(void 0);function tE(){let e=(0,y.useContext)(tk);if(!e)throw Error("Telemetry context is missing");return e}let tC={"insert-menu.filter.all-items":"All","insert-menu.search.no-results":"No results","insert-menu.search.placeholder":"Filter types…","insert-menu.toggle-grid-view.tooltip":"Toggle grid view","insert-menu.toggle-list-view.tooltip":"Toggle list view"},tj=e=>{let t,n,r,i;let o=(0,m.c)(11),{node:a,onSelect:s}=e;o[0]!==a.options?.insertMenu?(t=a.options?.insertMenu||{},o[0]=a.options?.insertMenu,o[1]=t):t=o[1];let l=t;o[2]!==l.views?(n=l.views?.map(tA),o[2]=l.views,o[3]=n):n=o[3];let u=n;return o[4]!==a.of?(r=a.of.map(t_),o[4]=a.of,o[5]=r):r=o[5],o[6]!==l||o[7]!==s||o[8]!==r||o[9]!==u?(i=(0,p.jsx)(to,{...l,labels:tC,schemaTypes:r,onSelect:s,views:u}),o[6]=l,o[7]=s,o[8]=r,o[9]=u,o[10]=i):i=o[10],i};function tA(e){return"grid"===e.name?{...e,previewImageUrl:t=>e.previewImageUrls?.[t]}:e}function t_(e){return{...e,icon:tp(e)}}let tT=e=>{let t,n,r,i,o;let a=(0,m.c)(10);return a[0]!==e?({children:t,style:r,...n}=e,a[0]=e,a[1]=t,a[2]=n,a[3]=r):(t=a[1],n=a[2],r=a[3]),a[4]!==r?(i={...r,pointerEvents:"all"},a[4]=r,a[5]=i):i=a[5],a[6]!==t||a[7]!==n||a[8]!==i?(o=(0,p.jsx)("div",{style:i,"data-sanity-overlay-element":!0,...n,children:t}),a[6]=t,a[7]=n,a[8]=i,a[9]=o):o=a[9],o};var tM=n(83238),tR=n(79824),tP=n(12341);function tI(e){if(!(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex")||((0,x.bg)(e)?!!e.href&&"ignore"!==e.rel:(0,x.LL)(e)?"hidden"
33!==e.type&&"file"!==e.type&&!e.disabled:!!((0,x.fe)(e)||(0,x.RV)(e)||(0,x.ZH)(e))&&!e.disabled)))return!1;try{e.focus()}catch{}return document.activeElement===e}function tO(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if((0,x.Re)(n)&&(tI(n)||tO(n)))return!0}return!1}n(57586);let t$=w.zo.div.withConfig({displayName:"StyledAutocomplete",componentId:"sc-1igauft-0"})`line-height:0;`,tD=(0,w.zo)(x.xu).withConfig({displayName:"ListBox",componentId:"sc-1igauft-1"})`& > ul{list-style:none;padding:0;margin:0;}`,tL=(0,w.F4)`
34  from {
35    transform: rotate(0deg);
36  }
37
38  to {
39    transform: rotate(360deg);
40  }
41`,tN=(0,w.zo)(e8.L4p).withConfig({displayName:"AnimatedSpinnerIcon",componentId:"sc-1igauft-2"})`animation:${tL} 500ms linear infinite;`;function tz(e){let t,n,r;let i=(0,tM.c)(11),{children:o,id:a,onSelect:s,selected:l,value:u}=e;i[0]!==s||i[1]!==u?(t=()=>{setTimeout(()=>{s(u)},0)},i[0]=s,i[1]=u,i[2]=t):t=i[2];let c=t;i[3]!==c?(n=e=>{"Enter"!==e.key||(0,x.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]!==a||i[9]!==l?(r=(0,p.jsx)("li",{"aria-selected":l,"data-ui":"AutocompleteOption",id:a,role:"option",onClick:c,onKeyDown:d,children:o}),i[5]=o,i[6]=c,i[7]=d,i[8]=a,i[9]=l,i[10]=r):r=i[10],r}function tV(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 tF=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],tB=["bottom-start","top-start"],tU=(e,t)=>t?t.value:e,tH=(e,t)=>t.value.toLowerCase().indexOf(e.toLowerCase())>-1;(0,y.forwardRef)(function(e,t){let{border:n=!0,customValidity:r,disabled:i,filterOption:o,fontSize:a=2,icon:s,id:l,listBox:u=x.bT,loading:c,onBlur:d,onChange:h,onFocus:f,onQueryChange:m,onSelect:g,openButton:v,openOnFocus:b,options:w,padding:S=3,popover:k=x.bT,prefix:E,radius:C=2,readOnly:j,relatedElements:A,renderOption:_,renderPopover:T,renderValue:M=tU,suffix:R,value:P,...I}=e,[O,$]=(0,y.useReducer)(tV,{activeValue:P||null,focused:!1,listFocused:!1,query:null,value:P||null}),{activeValue:D,focused:L,listFocused:N,query:z,value:V}=O,F=(0,y.useCallback)(({value:e})=>(0,p.jsx)(x.Zb,{"data-as":"button",padding:S,radius:2,tone:"inherit",children:(0,p.jsx)(x.xv,{size:a,textOverflow:"ellipsis",children:e})}),[a,S]),B="function"==typeof _?_:F,U="function"==typeof o?o:tH,H=(0,y.useRef)(null),W=(0,y.useRef)(null),G=(0,y.useRef)(null),Y=(0,y.useRef)(null),q=(0,y.useRef)(!1),X=(0,y.useRef)(V),Z=(0,y.useRef)(P),K=(0,y.useRef)(!1);(0,y.useImperativeHandle)(t,()=>G.current);let Q=`${l}-listbox`,J=Array.isArray(w)?w:x.LZ,ee=(0,x.Q5)(S),et=(0,y.useMemo)(()=>null!==V?J.find(e=>e.value===V):void 0,[J,V]),en=(0,y.useMemo)(()=>J.filter(e=>!z||U(z,e)),[U,J,z]),er=en.length,ei=D?`${l}-option-${D}`:void 0,eo=null!==z&&c||L&&null!==z,ea=(0,y.useCallback)(e=>{setTimeout(()=>{if(K.current)return;let t=(A||[]).concat(H.current?[H.current]:[],W.current?[W.current]:[]),n=!1;if(document.activeElement){for(let e of t)if(e===document.activeElement||e.contains(document.activeElement)){n=!0;break}}!1===n&&($({type:"root/blur"}),K.current=!1,m&&m(null),d&&d(e))},0)},[d,m,A]),es=(0,y.useCallback)(e=>{let t=Y.current,n=e.target instanceof HTMLElement?e.target:null,r=t?.contains(n)||!1;r!==q.current&&(q.current=r,$({type:"root/setListFocused",listFocused:r}))},[]),el=(0,y.useCallback)(e=>{$({type:"value/change",value:e}),K.current=!1,g&&g(e),X.current=e,h&&h(e),m&&m(null),G.current?.focus()},[h,g,m]),eu=(0,y.useCallback)(e=>{if("ArrowDown"===e.key){if(e.preventDefault(),!er)return;let t=en.find(e=>e.value===D),n=t?en.indexOf(t):-1,r=en[(n+1)%er];r&&$({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("ArrowUp"===e.key){if(e.preventDefault(),!er)return;let t=en.find(e=>e.value===D),n=t?en.indexOf(t):-1,r=en[-1===n?er-1:(er+n-1)%er];r&&$({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("Escape"===e.key){$({type:"root/escape"}),K.current=!1,m&&m(null),G.current?.focus();return}let t=e.target,n=Y.current;
41if((n===t||n?.contains(t))&&!tF.includes(e.key)){G.current?.focus();return}},[D,en,er,m]),ec=(0,y.useCallback)(e=>{let t=e.currentTarget.value;$({type:"input/change",query:t}),m&&m(t)},[m]),ed=(0,y.useCallback)(()=>{$({type:"root/open",query:V?M(V,et):""})},[et,M,V]),eh=(0,y.useCallback)(e=>{L||($({type:"input/focus"}),f&&f(e),b&&ed())},[L,f,b,ed]),ef=(0,y.useCallback)(()=>{K.current=!0},[]),ep=(0,y.useCallback)(()=>{K.current=!1},[]),em=(0,y.useCallback)(()=>{$({type:"root/clear"}),X.current="",h&&h(""),m&&m(null),G.current?.focus()},[h,m]),eg=(0,y.useCallback)(()=>{$({type:"input/focus"})},[]);(0,y.useEffect)(()=>{if(P!==Z.current){Z.current=P,void 0!==P&&($({type:"value/change",value:P}),X.current=P);return}P!==X.current&&(X.current=P||null,$({type:"value/change",value:P||null}))},[P]),(0,y.useEffect)(()=>{!L&&X.current&&$({type:"root/setActiveValue",value:X.current})},[L]),(0,y.useEffect)(()=>{let e=Y.current;if(!e)return;let t=en.find(e=>e.value===D);if(t){let n=en.indexOf(t),r=e.childNodes[n];if(r){if(document.activeElement&&r.contains(document.activeElement))return;tO(r)}}},[D,en]);let ey=(0,y.useMemo)(()=>{if(!c&&!i&&V)return{"aria-label":"Clear",onFocus:eg}},[i,eg,c,V]),ev=(0,y.useMemo)(()=>ee.map(e=>0===e?0:1===e||2===e?1:e-2),[ee]),eb=(0,y.useMemo)(()=>ee.map(e=>Math.max(e-1,0)),[ee]),ex=(0,y.useMemo)(()=>"object"==typeof v?v:x.bT,[v]),ew=(0,y.useCallback)(e=>{ed(),ex.onClick&&ex.onClick(e),requestAnimationFrame(()=>G.current?.focus())},[ex,ed]),eS=(0,y.useMemo)(()=>i||j||!v?void 0:(0,p.jsx)(x.xu,{"aria-hidden":eo,padding:ev,children:(0,p.jsx)(x.zx,{"aria-label":"Open",disabled:eo,fontSize:a,icon:e8.v4q,mode:"bleed",padding:eb,...ex,onClick:ew})}),[i,eo,a,ew,v,ev,eb,ex,j]),ek=(0,y.useMemo)(()=>null===z?null!==V?M(V,et):"":z,[et,z,M,V]),eE=(0,p.jsx)(x.oi,{...I,"aria-activedescendant":ei,"aria-autocomplete":"list","aria-expanded":eo,"aria-owns":Q,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border:n,clearButton:ey,customValidity:r,disabled:i,fontSize:a,icon:s,iconRight:c&&tN,id:l,inputMode:"search",onChange:ec,onClear:em,onFocus:eh,padding:ee,prefix:E,radius:C,readOnly:j,ref:G,role:"combobox",spellCheck:!1,suffix:R||eS,value:ek}),eC=(0,y.useCallback)(e=>{"Tab"===e.key&&N&&G.current?.focus()},[N]),ej=(0,y.useMemo)(()=>0===en.length?null:(0,p.jsx)(tD,{"data-ui":"AutoComplete__results",onKeyDown:eC,padding:1,...u,tabIndex:-1,children:(0,p.jsx)(x.Kq,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:Q,ref:Y,role:"listbox",space:1,children:en.map(e=>{let t=null!==D?e.value===D:et===e;return(0,p.jsx)(tz,{id:`${l}-option-${e.value}`,onSelect:el,selected:t,value:e.value,children:(0,y.cloneElement)(B(e),{disabled:c,selected:t,tabIndex:N&&t?0:-1})},e.value)})})}),[D,et,en,el,eC,l,u,Q,N,c,B]),eA=(0,y.useMemo)(()=>T?T({content:ej,hidden:!eo,inputElement:G.current,onMouseEnter:ef,onMouseLeave:ep},W):0===er?null:(0,p.jsx)(x.J2,{arrow:!1,constrainSize:!0,content:ej,fallbackPlacements:tB,matchReferenceWidth:!0,onMouseEnter:ef,onMouseLeave:ep,open:eo,overflow:"auto",placement:"bottom-start",portal:!0,radius:C,ref:W,referenceElement:G.current,...k}),[ej,eo,er,ef,ep,k,C,T]);return(0,p.jsxs)(t$,{"data-ui":"Autocomplete",onBlur:ea,onFocus:es,onKeyDown:eu,ref:H,children:[eE,eA]})}).displayName="ForwardRef(Autocomplete)";let tW=w.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;`,tG=(0,w.zo)(x.zx).withConfig({displayName:"ExpandButton",componentId:"sc-1es8h8q-1"})`appearance:none;margin:-4px;`;(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f;let m=(0,tM.c)(44);m[0]!==e?({children:n,maxLength:r,separator:o,space:a,...i}=e,m[0]=e,m[1]=n,m[2]=r,m[3]=i,m[4]=o,m[5]=a):(n=m[1],r=m[2],i=m[3],o=m[4],a=m[5]);let g=(0,x.Q5)(void 0===a?2:a),[v,b]=(0,y.useState)(!1),w=(0,y.useRef)(null),S=(0,y.useRef)(null);m[6]===Symbol.for("react.memo_cache_sentinel")?(s=()=>b(!1),m[6]=s):s=m[6];let k=s;m[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>b(!0),m[7]=l):l=m[7];let E=l;m[8]===Symbol.for("react.memo_cache_sentinel")?(u=()=>[w.current,S.current],m[8]=u):u=m[8],(0,x.Of)(k,u),m[9]!==n?(c=y.Children.toArray(n).filter(y.isValidElement),m[9]=n,m[10]=c):c=m[10];let C=c;e:{let e=C.length;if(r&&e>r){let t;let n=Math.ceil(r/2),i=Math.floor(r/2);if(m[11]!==i||m[12]!==n||m[13]!==e||m[14]!==v||m[15]!==C||m[16]!==g){let r,o,a,s;let l=C.slice(0,n-1);m[18]!==i||m[19]!==n||m[20]!==e||m[21]!==C?(r=C.slice(n-1,e-i),m[18]=i,m[19]=n,m[20]=e,m[21]=C,m[22]=r):r=m[22],m[23]!==g||m[24]!==r?(o=(0,p.jsx)(x.Kq,{as:"ol",overflow:"auto",padding:g,space:g,children:r}),m[23]=g,m[24]=r,m[25]=o):o=m[25];let u=v?k:E;m[26]!==v||m[27]!==u?(a=(0,p.jsx)(tG,{fontSize:1,mode:"bleed",onClick:u,padding:1,ref:w,selected:v,text:"…"}),m[26]=v,m[27]=u,m[28]=a):a=m[28],m[29]!==v||m[30]!==a||m[31]!==o?(s=(0,p.jsx)(x.J2,{constrainSize:!0,content:o,open:v,placement:"top",portal:!0,ref:S,children:a},"button"),m[29]=v,m[30]=a,m[31]=o,m[32]=s):s=m[32],t=[...l,s,...C.slice(e-i)],m[11]=i,m[12]=n,m[13]=e,m[14]=v,m[15]=C,m[16]=g,m[17]=t}else t=m[17];d=t;break e}d=C}let j=d;if(m[33]!==j||m[34]!==o||m[35]!==g){let e;m[37]!==o||m[38]!==g?(e=(e,t)=>(0,p.jsxs)(y.Fragment,{children:[t>0&&(0,p.jsx)(x.xu,{"aria-hidden":!0,as:"li",paddingX:g,children:o||(0,p.jsx)(x.xv,{muted:!0,children:"/"})}),(0,p.jsx)(x.xu,{as:"li",children:e})]},t),m[37]=o,m[38]=g,m[39]=e):e=m[39],h=j.map(e),m[33]=j,m[34]=o,m[35]=g,m[36]=h}
41else h=m[36];return m[40]!==t||m[41]!==i||m[42]!==h?(f=(0,p.jsx)(tW,{"data-ui":"Breadcrumbs",...i,ref:t,children:h}),m[40]=t,m[41]=i,m[42]=h,m[43]=f):f=m[43],f}).displayName="ForwardRef(Breadcrumbs)";let tY=(0,x.tx)("@sanity/ui/context/dialog",{version:0});function tq(e,t,n){return!e||!t||(0,x.dG)(e,n)||(0,x.dG)(t,n)}let tX=(0,w.zo)(x.mh).withConfig({displayName:"StyledDialog",componentId:"sc-4n4xb3-0"})(x.ZE,function({theme:e}){let{color:t}=(0,tR.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,tR.aQ)(e.theme);return(0,x.Lt)(t,e.$position,e=>({"&&":{position:e}}))},function(e){return e.$animate?(0,w.iv)`@keyframes zoomIn{from{opacity:0;transform:scale(0.95);}to{opacity:1;transform:scale(1);}}@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}animation:fadeIn 200ms ease-out;& > [data-ui='DialogCard']{animation:zoomIn 200ms ease-out;}`:(0,w.iv)``}),tZ=(0,w.zo)(x.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;`,tK=(0,w.zo)(x.Zb).withConfig({displayName:"DialogCardRoot",componentId:"sc-4n4xb3-2"})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`,tQ=(0,w.zo)(x.kC).withConfig({displayName:"DialogLayout",componentId:"sc-4n4xb3-3"})`flex:1;min-height:0;width:100%;`,tJ=(0,w.zo)(x.xu).withConfig({displayName:"DialogHeader",componentId:"sc-4n4xb3-4"})`position:relative;z-index:2;`,t0=(0,w.zo)(x.xu).withConfig({displayName:"DialogContent",componentId:"sc-4n4xb3-5"})`position:relative;z-index:1;overflow:auto;outline:none;`,t1=(0,w.zo)(x.xu).withConfig({displayName:"DialogFooter",componentId:"sc-4n4xb3-6"})`position:relative;z-index:3;`,t2=(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f,m;let g=(0,tM.c)(38),{__unstable_autoFocus:v,__unstable_hideCloseButton:b,children:w,contentRef:S,footer:k,header:E,id:C,onClickOutside:j,onClose:A,portal:_,radius:T,scheme:M,shadow:R,width:P}
41=e,I=(0,x.vI)(),O=_?I.elements?.[_]||null:I.element,$=(0,x.sz)().element,D=(0,x.Q5)(T),L=(0,x.Q5)(R),N=(0,x.Q5)(P),z=(0,y.useRef)(null),V=(0,y.useRef)(null),{isTopLayer:F}=(0,x.sJ)(),B=`${C}_label`,U=!!A&&!1===b,H=!!E||U;return g[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>z.current,g[0]=n):n=g[0],(0,y.useImperativeHandle)(t,n),g[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>V.current,g[1]=r):r=g[1],(0,y.useImperativeHandle)(S,r),g[2]!==v?(i=()=>{v&&z.current&&tO(z.current)},o=[v,z],g[2]=v,g[3]=i,g[4]=o):(i=g[3],o=g[4]),(0,y.useEffect)(i,o),g[5]!==$||g[6]!==F||g[7]!==A||g[8]!==O?(a=e=>{if(!F||!A)return;let t=document.activeElement;t&&!tq($,O,t)||"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),A())},g[5]=$,g[6]=F,g[7]=A,g[8]=O,g[9]=a):a=g[9],(0,x.qh)(a),g[10]!==$||g[11]!==F||g[12]!==j||g[13]!==O?(s=F&&j&&(e=>{let t=e.target;t&&!tq($,O,t)||j()}),g[10]=$,g[11]=F,g[12]=j,g[13]=O,g[14]=s):s=g[14],g[15]===Symbol.for("react.memo_cache_sentinel")?(l=()=>[z.current],g[15]=l):l=g[15],(0,x.Of)(s,l),g[16]!==E||g[17]!==B||g[18]!==A||g[19]!==U||g[20]!==H?(u=H&&(0,p.jsx)(tJ,{children:(0,p.jsxs)(x.kC,{align:"flex-start",padding:3,children:[(0,p.jsx)(x.xu,{flex:1,padding:2,children:E&&(0,p.jsx)(x.xv,{id:B,size:1,weight:"semibold",children:E})}),U&&(0,p.jsx)(x.xu,{flex:"none",children:(0,p.jsx)(x.zx,{"aria-label":"Close dialog",disabled:!A,icon:e8.Two,mode:"bleed",onClick:A,padding:2})})]})}),g[16]=E,g[17]=B,g[18]=A,g[19]=U,g[20]=H,g[21]=u):u=g[21],g[22]!==w?(c=(0,p.jsx)(t0,{flex:1,ref:V,tabIndex:-1,children:w}),g[22]=w,g[23]=c):c=g[23],g[24]!==k?(d=k&&(0,p.jsx)(t1,{children:k}),g[24]=k,g[25]=d):d=g[25],g[26]!==u||g[27]!==c||g[28]!==d?(h=(0,p.jsxs)(tQ,{direction:"column",children:[u,c,d]}),g[26]=u,g[27]=c,g[28]=d,g[29]=h):h=g[29],g[30]!==D||g[31]!==M||g[32]!==L||g[33]!==h?(f=(0,p.jsx)(tK,{radius:D,ref:z,scheme:M,shadow:L,children:h}),g[30]=D,g[31]=M,g[32]=L,g[33]=h,g[34]=f):f=g[34],g[35]!==f||g[36]!==N?(m=(0,p.jsx)(tZ,{"data-ui":"DialogCard",width:N,children:f}),g[35]=f,g[36]=N,g[37]=m):m=g[37],m});t2.displayName="ForwardRef(DialogCard)",(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f,m,g,v,b,w,S,k,E,C,j,A,_,T,M,R,P;let I=(0,tM.c)(60),O=(0,y.useContext)(tY),{layer:$}=(0,x.g9)();I[0]!==e?({__unstable_autoFocus:v,__unstable_hideCloseButton:b,cardRadius:w,cardShadow:S,children:i,contentRef:o,footer:a,header:s,id:l,onActivate:u,onClickOutside:c,onClose:d,onFocus:h,padding:k,portal:f,position:n,scheme:g,width:E,zOffset:r,animate:C,...m}=e,I[0]=e,I[1]=n,I[2]=r,I[3]=i,I[4]=o,I[5]=a,I[6]=s,I[7]=l,I[8]=u,I[9]=c,I[10]=d,I[11]=h,I[12]=f,I[13]=m,I[14]=g,I[15]=v,I[16]=b,I[17]=w,I[18]=S,I[19]=k,I[20]=E,I[21]=C):(n=I[1],r=I[2],i=I[3],o=I[4],a=I[5],s=I[6],l=I[7],u=I[8],c=I[9],d=I[10],h=I[11],f=I[12],m=I[13],g=I[14],v=I[15],b=I[16],w=I[17],S=I[18],k=I[19],E=I[20],C=I[21]);let D=void 0===v||v,L=void 0!==b&&b,N=void 0===w?4:w,z=void 0===S?3:S,V=void 0===k?3:k,F=void 0===E?0:E,B=void 0!==C&&C,U=n??(O.position||"fixed"),H=r??(O.zOffset||$.dialog.zOffset),W=!(0,x.Tb)()&&B,G=(0,x.vI)(),Y=f?G.elements?.[f]||null:G.element,q=(0,x.sz)().element,X=(0,x.Q5)(N),Z=(0,x.Q5)(V),K=(0,x.Q5)(U),Q=(0,x.Q5)(F),J=(0,x.Q5)(H),ee=(0,y.useRef)(null),et=(0,y.useRef)(null),en=(0,y.useRef)(null),er=(0,y.useRef)(null);I[22]!==h?(j=e=>{h?.(e);let t=e.target,n=en.current;if(n&&t===ee.current){(function e(t){for(let n=t.childNodes.length-1;n>=0;n--){let r=t.childNodes[n];if((0,x.Re)(r)&&(tI(r)||e(r)))return!0}return!1})(n);return}if(n&&t===et.current){tO(n);return}(0,x.Re)(e.target)&&(er.current=e.target)},I[22]=h,I[23]=j):j=I[23];let ei=j,eo=`${l}_label`,ea=(0,y.useRef)(void 0);I[24]!==q||I[25]!==Y?(A=()=>{ea.current&&clearTimeout(ea.current),ea.current=setTimeout(()=>{let e=document.activeElement;if(e&&!tq(q,Y,e)){let e=er.current;if(!e||!document.body.contains(e)){let e=en.current;e&&tO(e);return}
41e.focus()}},0)},I[24]=q,I[25]=Y,I[26]=A):A=I[26];let es=A;return I[27]===Symbol.for("react.memo_cache_sentinel")?(_=(0,p.jsx)("div",{ref:ee,tabIndex:0}),I[27]=_):_=I[27],I[28]!==D||I[29]!==X||I[30]!==z||I[31]!==i||I[32]!==o||I[33]!==a||I[34]!==s||I[35]!==L||I[36]!==l||I[37]!==c||I[38]!==d||I[39]!==f||I[40]!==g||I[41]!==Q?(T=(0,p.jsx)(t2,{__unstable_autoFocus:D,__unstable_hideCloseButton:L,contentRef:o,footer:a,header:s,id:l,onClickOutside:c,onClose:d,portal:f,radius:X,ref:en,scheme:g,shadow:z,width:Q,children:i}),I[28]=D,I[29]=X,I[30]=z,I[31]=i,I[32]=o,I[33]=a,I[34]=s,I[35]=L,I[36]=l,I[37]=c,I[38]=d,I[39]=f,I[40]=g,I[41]=Q,I[42]=T):T=I[42],I[43]===Symbol.for("react.memo_cache_sentinel")?(M=(0,p.jsx)("div",{ref:et,tabIndex:0}),I[43]=M):M=I[43],I[44]!==W||I[45]!==ei||I[46]!==es||I[47]!==l||I[48]!==eo||I[49]!==u||I[50]!==Z||I[51]!==K||I[52]!==t||I[53]!==m||I[54]!==T||I[55]!==J?(R=(0,p.jsxs)(tX,{...m,$animate:W,$padding:Z,$position:K,"aria-labelledby":eo,"aria-modal":!0,"data-ui":"Dialog",id:l,onActivate:u,onClick:es,onFocus:ei,ref:t,role:"dialog",zOffset:J,children:[_,T,M]}),I[44]=W,I[45]=ei,I[46]=es,I[47]=l,I[48]=eo,I[49]=u,I[50]=Z,I[51]=K,I[52]=t,I[53]=m,I[54]=T,I[55]=J,I[56]=R):R=I[56],I[57]!==f||I[58]!==R?(P=(0,p.jsx)(x.h_,{__unstable_name:f,children:R}),I[57]=f,I[58]=R,I[59]=P):P=I[59],P}).displayName="ForwardRef(Dialog)";let t5=(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f,m,g,v,b,w,S,k,E,C,j,A;let _=(0,tM.c)(62),{__unstable_disableRestoreFocusOnClose:T,boundaryElement:M,button:R,id:P,menu:I,onClose:O,onOpen:$,placement:D,popoverScheme:L,portal:N,popover:z,popoverRadius:V,preventOverflow:F}=e,B=void 0!==T&&T,U=void 0===N||N,[H,W]=(0,y.useState)(!1),[G,Y]=(0,y.useState)(null),[q,X]=(0,y.useState)(null);_[0]===Symbol.for("react.memo_cache_sentinel")?(n=[],_[0]=n):n=_[0];let[Z,K]=(0,y.useState)(n),Q=(0,y.useRef)(H);_[1]!==$||_[2]!==H?(r=()=>{$&&H&&!Q.current&&$()},i=[$,H],_[1]=$,_[2]=H,_[3]=r,_[4]=i):(r=_[3],i=_[4]),(0,y.useEffect)(r,i),_[5]!==O||_[6]!==H?(o=()=>{O&&!H&&Q.current&&O()},a=[O,H],_[5]=O,_[6]=H,_[7]=o,_[8]=a):(o=_[7],a=_[8]),(0,y.useEffect)(o,a),_[9]!==H?(s=()=>{Q.current=H},l=[H],_[9]=H,_[10]=s,_[11]=l):(s=_[10],l=_[11]),(0,y.useEffect)(s,l),_[12]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{W(t3),Y(null)},_[12]=u):u=_[12];let J=u;_[13]!==H?(c=e=>{H&&e.preventDefault()},_[13]=H,_[14]=c):c=_[14];let ee=c;_[15]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{if("ArrowDown"===e.key||"Enter"===e.key||" "===e.key){e.preventDefault(),W(!0),Y("first");return}if("ArrowUp"===e.key){e.preventDefault(),W(!0),Y("last");return}},_[15]=d):d=_[15];let et=d;_[16]!==q||_[17]!==Z?(h=e=>{let t=e.target;if(t instanceof Node&&!(q&&(t===q||q.contains(t)))){for(let e of Z)if(t===e||e.contains(t))return;W(!1)}},_[16]=q,_[17]=Z,_[18]=h):h=_[18];let en=h;_[19]!==q||_[20]!==B?(f=()=>{W(!1),!B&&q&&q.focus()},_[19]=q,_[20]=B,_[21]=f):f=_[21];let er=f;_[22]!==Z?(m=e=>{let t=e.relatedTarget;if(t instanceof Node){for(let e of Z)if(e===t||e.contains(t))return;W(!1)}},_[22]=Z,_[23]=m):m=_[23];let ei=m;_[24]!==q||_[25]!==B?(g=()=>{W(!1),!B&&q&&q.focus()},_[24]=q,_[25]=B,_[26]=g):g=_[26];let eo=g;_[27]===Symbol.for("react.memo_cache_sentinel")?(v=e=>(K(t=>t.concat([e])),()=>K(t=>t.filter(t=>t!==e))),_[27]=v):v=_[27];let ea=v;_[28]!==q||_[29]!==ei||_[30]!==eo||_[31]!==en||_[32]!==er||_[33]!==P||_[34]!==I||_[35]!==G?(b=I&&(0,y.cloneElement)(I,{"aria-labelledby":P,onBlurCapture:ei,onClickOutside:en,onEscape:er,onItemClick:eo,originElement:q,registerElement:ea,shouldFocus:G}),_[28]=q,_[29]=ei,_[30]=eo,_[31]=en,_[32]=er,_[33]=P,_[34]=I,_[35]=G,_[36]=b):b=_[36];let es=b;_[37]!==R||_[38]!==ee||_[39]!==P||_[40]!==H?(w=R&&(0,y.cloneElement)(R,{"data-ui":"MenuButton",id:P,onClick:J,onKeyDown:et,onMouseDown:ee,"aria-haspopup":!0,"aria-expanded":H,ref:X,selected:R.props.selected??H}),_[37]=R,_[38]=ee,_[39]=P,_[40]=H,_[41]=w):w=_[41];let el=w;_[42]!==q?(S=()=>q,k=[q],_[42]=q,_[43]=S,_[44]=k):(S=_[43],k=_[44]),(0,y.useImperativeHandle)(t,S,k),_[45]!==z?(E=z||{},_[45]=z,_[46]=E):E=_[46],_[47]!==M||_[48]!==D||_[49]!==V||_[50]!==L||_[51]!==U||_[52]!==F||_[53]!==E?(C={boundaryElement:M,overflow:"auto",placement:D,portal:U,preventOverflow:F,radius:V,scheme:L,...E},_[47]=M,_[48]=D,_[49]=V,_[50]=L,_[51]=U,_[52]=F,_[53]=E,_[54]=C):C=_[54];let eu=C;return _[55]!==el?(j=el||(0,p.jsx)(p.Fragment,{}),_[55]=el,_[56]=j):j=_[56],_[57]!==es||_[58]!==H||_[59]!==eu||_[60]!==j?(A=(0,p.jsx)(x.J2,{"data-ui":"MenuButton__popover",...eu,content:es,open:H,children:j}),_[57]=es,_[58]=H,_[59]=eu,_[60]=j,_[61]=A):A=_[61],A});function t3(e){return!e}t5.displayName="ForwardRef(MenuButton)";let t4=(0,w.F4)`0%{background-position:100%;}100%{background-position:-100%;}`,t6=(0,w.iv)`background-image:linear-gradient( to right,var(--card-skeleton-color-from),var(--card-skeleton-color-to),var(--card-skeleton-color-from),var(--card-skeleton-color-from),var(--card-skeleton-color-from) );background-position:100%;background-size:200% 100%;background-attachment:fixed;animation-name:${t4};animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-duration:2000ms;`,t9=(0,w.iv)`opacity:${({$visible:e})=>e?1:0};transition:opacity 200ms ease-in;@media screen and (prefers-reduced-motion:no-preference){${({$animated:e})=>e?t6:(0,w.iv)`background-color:var(--card-skeleton-color-from);`}}@media screen and (prefers-reduced-motion:reduce){background-color:var(--card-skeleton-color-from);}`,t8=(0,w.zo)(x.xu).withConfig({displayName:"StyledSkeleton",componentId:"sc-ebtpni-0"})(x.E5,t9),t7=(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l;let u=(0,tM.c)(14);u[0]!==e?({animated:o,delay:n,radius:r,...i}=e,u[0]=e,u[1]=n,u[2]=r,u[3]=i,u[4]=o):(n=u[1],r=u[2],i=u[3],o=u[4]);let c=void 0!==o&&o,[d,h]=(0,y.useState)(!n);u[5]!==n?(a=()=>
41{if(!n)return h(!0);let e=setTimeout(()=>{h(!0)},n);return()=>{clearTimeout(e)}},s=[n],u[5]=n,u[6]=a,u[7]=s):(a=u[6],s=u[7]),(0,y.useEffect)(a,s);let f=(0,x.Q5)(r);return u[8]!==c||u[9]!==t||u[10]!==i||u[11]!==f||u[12]!==d?(l=(0,p.jsx)(t8,{...i,$animated:c,$radius:f,$visible:d,ref:t}),u[8]=c,u[9]=t,u[10]=i,u[11]=f,u[12]=d,u[13]=l):l=u[13],l});t7.displayName="ForwardRef(Skeleton)";let ne=(0,w.zo)(t7).withConfig({displayName:"StyledSkeleton",componentId:"sc-2p7a1v-0"})(e=>{let{$size:t,$style:n}=e,{font:r,media:i}=(0,tR.aQ)(e.theme),o=r[n];return(0,x.Lt)(i,t,e=>{let t=o.sizes[e];return{height:t.lineHeight-t.ascenderHeight-t.descenderHeight}})});(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tM.c)(7);o[0]!==e?({size:r,...n}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=(0,x.Q5)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,p.jsx)(ne,{...n,$size:a,ref:t,$style:"text"}),o[3]=a,o[4]=t,o[5]=n,o[6]=i):i=o[6],i}).displayName="ForwardRef(TextSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tM.c)(7);o[0]!==e?({size:r,...n}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=(0,x.Q5)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,p.jsx)(ne,{...n,$size:a,ref:t,$style:"label"}),o[3]=a,o[4]=t,o[5]=n,o[6]=i):i=o[6],i}).displayName="ForwardRef(LabelSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tM.c)(7);o[0]!==e?({size:r,...n}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=(0,x.Q5)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,p.jsx)(ne,{...n,$size:a,ref:t,$style:"heading"}),o[3]=a,o[4]=t,o[5]=n,o[6]=i):i=o[6],i}).displayName="ForwardRef(HeadingSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tM.c)(7);o[0]!==e?({size:r,...n}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=(0,x.Q5)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,p.jsx)(ne,{...n,$size:a,ref:t,$style:"code"}),o[3]=a,o[4]=t,o[5]=n,o[6]=i):i=o[6],i}).displayName="ForwardRef(CodeSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tM.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 a=void 0===e.tabIndex?0:e.tabIndex;return o[3]!==n||o[4]!==e.children||o[5]!==t||o[6]!==r||o[7]!==a?(i=(0,p.jsx)(x.xu,{"data-ui":"TabPanel",...r,flex:n,ref:t,role:"tabpanel",tabIndex:a,children:e.children}),o[3]=n,o[4]=e.children,o[5]=t,o[6]=r,o[7]=a,o[8]=i):i=o[8],i}).displayName="ForwardRef(TabPanel)";let nt={error:"critical",warning:"caution",success:"positive",info:"neutral"},nn={error:"critical",warning:"caution",success:"positive",info:"neutral"},nr=(0,w.zo)(x.kC).withConfig({displayName:"TextBox",componentId:"sc-1rr7rxo-0"})`overflow-x:auto;`,ni=(0,w.zo)(x.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);}`,no=w.zo.div.withConfig({displayName:"LoadingBar",componentId:"sc-1rr7rxo-2"})`display:flex;position:absolute;bottom:0px;top:0px;left:0px;right:0px;pointer-events:none;z-index:-1;overflow:hidden;overflow:clip;background:transparent;align-items:flex-end;will-change:opacity;`,na=(0,w.zo)(x.Zb).withConfig({displayName:"LoadingBarMask",componentId:"sc-1rr7rxo-3"})`position:absolute;top:0;left:-${2}px;right:-${2}px;bottom:${2}px;z-index:1;`,ns=(0,w.zo)(x.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,tR.aQ)(e.theme);return t.button.default[e.tone].enabled.bg}};`,nl={error:"alert",warning:"alert",success:"alert",info:"alert"},nu={initial:{y:32,scale:.5,zIndex:1},hidden:{opacity:0},visible:e=>e?{opacity:1,transition:{when:"beforeChildren",staggerChildren:e/3,duration:e/3}}:{opacity:1},slideIn:{y:0,scale:1},slideOut:{zIndex:0,scale:.75}},nc={initial:{willChange:"transform"},hidden:{opacity:0},visible:{opacity:1}},nd=tP.EAS.create(ni),nh=tP.EAS.create(x.kC),nf=tP.EAS.create(x.xv),np=tP.EAS.create(no),nm=tP.EAS.create(ns);function ng(e){if("treeitem"===e.getAttribute("role")&&e.focus(),"none"===e.getAttribute("role")){let t=e.firstChild;t&&t instanceof HTMLElement&&t.focus()}}(0,x.tx)("@sanity/ui/context/toast",null),(0,w.zo)(x.rj).withConfig({displayName:"StyledLayer",componentId:"sc-1tbwn58-0"})`box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;`;let ny=(0,x.tx)("@sanity/ui/context/tree",null);function nv(){let e=(0,y.useContext)(ny);if(!e)throw Error("Tree: missing context value");return e}(0,y.memo)((0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f,m,g,v,b,w,S,k,E,C;let j=(0,tM.c)(37);j[0]!==e?({children:n,space:o,onFocus:r,...i}=e,j[0]=e,j[1]=n,j[2]=r,j[3]=i,j[4]=o):(n=j[1],r=j[2],i=j[3],o=j[4]);let A=void 0===o?1:o,_=(0,y.useRef)(null),[T,M]=(0,y.useState)(null),R=(0,y.useRef)(T);j[5]===Symbol.for("react.memo_cache_sentinel")?(a=[],j[5]=a):a=j[5];let P=a;j[6]===Symbol.for("react.memo_cache_sentinel")?(s=[],j[6]=s):s=j[6];let[I,O]=(0,y.useState)(s);j[7]===Symbol.for("react.memo_cache_sentinel")?(l={},j[7]=l):l=j[7];let[$,D]=(0,y.useState)(l),L=(0,y.useRef)($);j[8]===Symbol.for("react.memo_cache_sentinel")?(u=()=>_.current,j[8]=u):u=j[8],(0,y.useImperativeHandle)(t,u),j[9]!==T?(c=()=>{R.current=T},d=[T],j[9]=T,j[10]=c,j[11]=d):(c=j[10],d=j[11]),(0,y.useEffect)(c,d),j[12]!==$?(h=()=>{L.current=$},f=[$],j[12]=$,j[13]=h,j[14]=f):(h=j[13],f=j[14]),(0,y.useEffect)(h,f),j[15]===Symbol.for("react.memo_cache_sentinel")?(m=(e,t,n,r)=>(D(r=>({...r,[t]:{element:e,expanded:n}})),r&&M(e),()=>{D(e=>{let n={...e};return delete n[t],n})}),j[15]=m):m=j[15];let N=m;j[16]===Symbol.for("react.memo_cache_sentinel")?(g=(e,t)=>
41{D(n=>{let r=n[e];return r?{...n,[e]:{...r,expanded:t}}:n})},j[16]=g):g=j[16];let z=g,V=T||I[0]||null;j[17]!==A||j[18]!==$||j[19]!==V?(v={version:0,focusedElement:V,level:0,path:P,registerItem:N,setExpanded:z,setFocusedElement:M,space:A,state:$},j[17]=A,j[18]=$,j[19]=V,j[20]=v):v=j[20];let F=v;j[21]!==I?(b=e=>{if(R.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=[],a=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){a=!1;break}}if(a)return i[t]}return null}(L.current,I,R.current);t&&(ng(t),M(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=[],a=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){a=!1;break}}if(a)return i[t]}return null}(L.current,I,R.current);t&&(ng(t),M(t));return}if("ArrowLeft"===e.key){e.preventDefault();let t=R.current.getAttribute("data-tree-key");if(!t)return;let n=L.current[t];if(!n)return;if(n.expanded)D(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(),M(r.element))}return}if("ArrowRight"===e.key){e.preventDefault();let t=R.current.getAttribute("data-tree-key");if(!t)return;L.current[t]?.expanded||D(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!0}}:e});return}}},j[21]=I,j[22]=b):b=j[22];let B=b;j[23]!==r?(w=e=>{M(e.target),r?.(e)},j[23]=r,j[24]=w):w=j[24];let U=w;return j[25]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{_.current&&O(Array.from(_.current.querySelectorAll('[data-ui="TreeItem"]')))},j[25]=S):S=j[25],j[26]!==n?(k=[n],j[26]=n,j[27]=k):k=j[27],(0,y.useEffect)(S,k),j[28]!==n||j[29]!==U||j[30]!==B||j[31]!==i||j[32]!==A?(E=(0,p.jsx)(x.Kq,{as:"ul","data-ui":"Tree",...i,onFocus:U,onKeyDown:B,ref:_,role:"tree",space:A,children:n}),j[28]=n,j[29]=U,j[30]=B,j[31]=i,j[32]=A,j[33]=E):E=j[33],j[34]!==F||j[35]!==E?(C=(0,p.jsx)(ny.Provider,{value:F,children:E}),j[34]=F,j[35]=E,j[36]=C):C=j[36],C})).displayName="Memo(ForwardRef(Tree))";let nb=(0,y.memo)(function(e){let t,n,r,i;let o=(0,tM.c)(9);o[0]!==e?({children:t,expanded:r,...n}=e,o[0]=e,o[1]=t,o[2]=n,o[3]=r):(t=o[1],n=o[2],r=o[3]);let a=void 0!==r&&r,s=nv(),l=!a;return o[4]!==t||o[5]!==n||o[6]!==l||o[7]!==s.space?(i=(0,p.jsx)(x.Kq,{as:"ul","data-ui":"TreeGroup",...n,hidden:l,marginTop:s.space,role:"group",space:s.space,children:t}),o[4]=t,o[5]=n,o[6]=l,o[7]=s.space,o[8]=i):i=o[8],i}),nx=(0,y.memo)(w.zo.li.withConfig({displayName:"StyledTreeItem",componentId:"sc-iiskig-0"})(function(){return(0,w.iv)`&[role='none'] > [role='treeitem']{outline:none;cursor:default;border-radius:3px;background-color:var(--card-bg-color);color:var(--treeitem-fg-color);&:focus{position:relative;}}&[role='treeitem']{outline:none;& > div{cursor:default;border-radius:3px;background-color:var(--card-bg-color);color:var(--treeitem-fg-color);}&:focus > div{position:relative;}}`},function(e){let{color:t}=(0,tR.aQ)(e.theme),n=t.selectable.default;return(0,w.iv)`&[role='none']{& > [role='treeitem']{${(0,x.gG)(t,n.enabled)}}&[data-selected] > [role='treeitem']{${(0,x.gG)(t,n.pressed)}}@media (hover:hover){&:not([data-selected]) > [role='treeitem']:not(:focus):hover{${(0,x.gG)(t,n.hovered)}}& > [role='treeitem']:focus{${(0,x.gG)(t,n.selected)}}}}&[role='treeitem']{& > [data-ui='TreeItem__box']{${(0,x.gG)(t,n.enabled)}}&[data-selected] > [data-ui='TreeItem__box']{${(0,x.gG)(t,n.pressed)}}@media (hover:hover){&:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover{${(0,x.gG)(t,n.hovered)}}&:focus > [data-ui='TreeItem__box']{${(0,x.gG)(t,n.selected)}}}}`})),nw=(0,w.zo)(x.xu).attrs({forwardedAs:"a"}).withConfig({displayName:"TreeItemBox",componentId:"sc-iiskig-1"})(function(e){let{$level:t}=e,{space:n}=(0,tR.aQ)(e.theme);return(0,w.iv)`padding-left:${(0,x.hO)(n[2]*t)};&[data-as='a']{text-decoration:none;}`}),nS=(0,w.zo)(x.xv).withConfig({displayName:"ToggleArrowText",componentId:"sc-iiskig-2"})`& > svg{transition:transform 100ms;}`;(0,y.memo)(function(e){let{children:t,expanded:n=!1,fontSize:r=1,href:i,icon:o,id:a,linkAs:s,muted:l,onClick:u,padding:c=2,selected:d=!1,space:h=2,text:f,weight:m,...g}=e,v=(0,y.useRef)(null),b=(0,y.useRef)(null),w=nv(),{path:S,registerItem:k,setExpanded:E,setFocusedElement:C}=w,j=(0,y.useId)(),A=a||j,_=(0,y.useMemo)(()=>S.concat([A||""]),[A,S]),T=_.join("/"),M=w.state[T],R=w.focusedElement===v.current,P=M?.expanded===void 0?n:M?.expanded||!1,I=w.focusedElement&&w.focusedElement===v.current?0:-1,O=(0,y.useMemo)(()=>({...w,level:w.level+1,path:_}),[_,w]),$=(0,y.useCallback)(e=>{u&&u(e);let t=e.target;t instanceof HTMLElement&&("TreeItem"===t.getAttribute("data-ui")||t.closest('[data-ui="TreeItem__box"]'))&&(e.stopPropagation(),E(T,!P),C(v.current))},[P,T,u,E,C]),D=(0,y.useCallback)(e=>{R&&"Enter"===e.key&&(b.current||v.current)?.click()},[R]);(0,y.useEffect)(()=>
41{if(v.current)return k(v.current,_.join("/"),P,d)},[P,_,k,d]);let L=(0,p.jsxs)(x.kC,{padding:c,children:[(0,p.jsxs)(x.xu,{marginRight:h,style:{visibility:o||t?"visible":"hidden",pointerEvents:"none"},children:[o&&(0,p.jsx)(x.xv,{muted:l,size:r,weight:m,children:(0,p.jsx)(o,{})}),!o&&(0,p.jsx)(nS,{muted:l,size:r,weight:m,children:(0,p.jsx)(e8.tgp,{style:{transform:P?"rotate(90deg)":void 0}})})]}),(0,p.jsx)(x.xu,{flex:1,children:(0,p.jsx)(x.xv,{muted:l,size:r,textOverflow:"ellipsis",weight:m,children:f})})]});return i?(0,p.jsxs)(nx,{"data-selected":d?"":void 0,"data-tree-id":A,"data-tree-key":T,"data-ui":"TreeItem",...g,onClick:$,ref:v,role:"none",children:[(0,p.jsx)(nw,{$level:w.level,"aria-expanded":P,as:s,"data-ui":"TreeItem__box",href:i,ref:b,role:"treeitem",tabIndex:I,children:L}),(0,p.jsx)(ny.Provider,{value:O,children:t&&(0,p.jsx)(nb,{hidden:!P,children:t})})]}):(0,p.jsxs)(nx,{"data-selected":d?"":void 0,"data-ui":"TreeItem","data-tree-id":A,"data-tree-key":T,...g,"aria-expanded":P,onClick:$,onKeyDown:D,ref:v,role:"treeitem",tabIndex:I,children:[(0,p.jsx)(nw,{$level:w.level,as:"div","data-ui":"TreeItem__box",children:L}),(0,p.jsx)(ny.Provider,{value:O,children:t&&(0,p.jsx)(nb,{expanded:P,children:t})})]})}).displayName="Memo(TreeItem)";let nk=e=>"object"==typeof e&&null!=e&&1===e.nodeType,nE=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,nC=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return nE(n.overflowY,t)||nE(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},nj=(e,t,n,r,i,o,a,s)=>o<e&&a>t||o>e&&a<t?0:o<=e&&s<=n||a>=t&&s>=n?o-e-r:a>t&&s<n||o<e&&s>n?a-t+i:0,nA=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},n_=(e,t)=>{var n,r,i,o;if("undefined"==typeof document)return[];let{scrollMode:a,block:s,inline:l,boundary:u,skipOverflowHiddenElements:c}=t,d="function"==typeof u?u:e=>e!==u;if(!nk(e))throw TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,f=[],p=e;for(;nk(p)&&d(p);){if((p=nA(p))===h){f.push(p);break}null!=p&&p===document.body&&nC(p)&&!nC(document.documentElement)||null!=p&&nC(p,c)&&f.push(p)}let m=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,g=null!=(o=null==(i=window.visualViewport)?void 0:i.height)?o:innerHeight,{scrollX:y,scrollY:v}=window,{height:b,width:x,top:w,right:S,bottom:k,left:E}=e.getBoundingClientRect(),{top:C,right:j,bottom:A,left:_}=(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),T="start"===s||"nearest"===s?w-C:"end"===s?k+A:w+b/2-C+A,M="center"===l?E+x/2-_+j:"end"===l?S+j:E-_,R=[];for(let e=0;e<f.length;e++){let t=f[e],{height:n,width:r,top:i,right:o,bottom:u,left:c}=t.getBoundingClientRect();if("if-needed"===a&&w>=0&&E>=0&&k<=g&&S<=m&&(t===h&&!nC(t)||w>=i&&k<=u&&E>=c&&S<=o))break;let d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),C=parseInt(d.borderTopWidth,10),j=parseInt(d.borderRightWidth,10),A=parseInt(d.borderBottomWidth,10),_=0,P=0,I="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-j:0,O="offsetHeight"in t?t.offsetHeight-t.clientHeight-C-A:0,$="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,D="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(h===t)_="start"===s?T:"end"===s?T-g:"nearest"===s?nj(v,v+g,g,C,A,v+T,v+T+b,b):T-g/2,P="start"===l?M:"center"===l?M-m/2:"end"===l?M-m:nj(y,y+m,m,p,j,y+M,y+M+x,x),_=Math.max(0,_+v),P=Math.max(0,P+y);else{_="start"===s?T-i-C:"end"===s?T-u+A+O:"nearest"===s?nj(i,u,n,C,A+O,T,T+b,b):T-(i+n/2)+O/2,P="start"===l?M-c-p:"center"===l?M-(c+r/2)+I/2:"end"===l?M-o+j+I:nj(c,o,r,p,j+I,M,M+x,x);let{scrollLeft:e,scrollTop:a}=t;_=0===D?0:Math.max(0,Math.min(a+_/D,t.scrollHeight-n/D+O)),P=0===$?0:Math.max(0,Math.min(e+P/$,t.scrollWidth-r/$+I)),T+=a-_,M+=e-P}R.push({el:t,top:_,left:P})}return R},nT=e=>!1===e?{block:"end",inline:"nearest"}:e===Object(e)&&0!==Object.keys(e).length?e:{block:"start",inline:"nearest"};var nM=n(34249),nR=n(82799),nP=n(95978),nI=n(82863),nO=n(36381);function n$(e){let[t,n]=e;return[t,n]}function nD(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 a=Math.min(i,o);if(n===r)return a;let s=0,l=1;for(let e=0;-1!==e;){let t=n.substring(a-l);if(-1===(e=r.indexOf(t)))break;
41l+=e,(0===e||n.substring(a-l)===r.substring(0,l))&&(s=l,l++)}return s}function nL(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 nN(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 nz(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343}function nV(e,t,n,r,i){let o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),u=nX(o,a,{checkLines:!1,deadline:i}),c=nX(s,l,{checkLines:!1,deadline:i});return u.concat(c)}function nF(e,t,n){let r=e.slice(n,n+Math.floor(e.length/4)),i=-1,o="",a,s,l,u;for(;-1!==(i=t.indexOf(r,i+1));){let r=nL(e.slice(n),t.slice(i)),c=nN(e.slice(0,n),t.slice(0,i));o.length<c+r&&(o=t.slice(i-c,i)+t.slice(i,i+r),a=e.slice(0,n-c),s=e.slice(n+r),l=t.slice(0,i-c),u=t.slice(i+r))}return 2*o.length>=e.length?[a||"",s||"",l||"",u||"",o||""]:null}var nB=Object.defineProperty,nU=Object.getOwnPropertySymbols,nH=Object.prototype.hasOwnProperty,nW=Object.prototype.propertyIsEnumerable,nG=(e,t,n)=>t in e?nB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nY=(e,t)=>{for(var n in t||(t={}))nH.call(t,n)&&nG(e,n,t[n]);if(nU)for(var n of nU(t))nW.call(t,n)&&nG(e,n,t[n]);return e};function nq(e,t,n){var r,i;let o;if(null===e||null===t)throw Error("Null input. (diff)");let a=nX(e,t,nY({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&&nQ(e,t,1),nz(i)&&0===n&&nQ(e,t,-1)}for(let t=0;t<e.length;t++)0===e[t][1].length&&e.splice(t,1)}(a),a}function nX(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let o=nL(r,i),a=r.substring(0,o);o=nN(r=r.substring(o),i=i.substring(o));let s=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,a=i.indexOf(o);if(-1!==a)return r=[[1,i.substring(0,a)],[0,o],[1,i.substring(a+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 s=function(e,t,n=1){let r,i,o,a,s;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=nF(l,u,Math.ceil(l.length/4)),d=nF(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],a=r[2],s=r[3]):(a=r[0],s=r[1],i=r[2],o=r[3]),[i,o,a,s,r[4]]}(e,t);if(s){let e=s[0],t=s[1],r=s[2],i=s[3],o=s[4],a=nX(e,r,n),l=nX(t,i,n);return a.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,a=-1,s=n.length;for(;a<e.length-1;){-1===(a=e.indexOf(`
42`,i))&&(a=e.length-1);let l=e.slice(i,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(s===o&&(l=e.slice(i),a=e.length),t+=String.fromCharCode(s),r[l]=s,n[s++]=l),i=a+1}return t}n[0]="";let o=4e4,a=i(e);return o=65535,{chars1:a,chars2:i(t),lineArray:n}}(r,i);r=o.chars1,i=o.chars2;let a=o.lineArray,s=nX(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("")}})(s,a),(s=nJ(s)).push([0,""]);let l=0,u=0,c=0,d="",h="";for(;l<s.length;){switch(s[l][0]){case 1:c++,h+=s[l][1];break;case -1:u++,d+=s[l][1];break;case 0:if(u>=1&&c>=1){s.splice(l-u-c,u+c),l=l-u-c;let e=nX(d,h,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)s.splice(l,0,e[t]);l+=e.length}c=0,u=0,d="",h="";break;default:throw Error("Unknown diff operation.")}l++}return s.pop(),s}(e,t,n):function(e,t,n){let r=e.length,i=t.length,o=Math.ceil((r+i)/2),a=2*o,s=Array(a),l=Array(a);for(let e=0;e<a;e++)s[e]=-1,l[e]=-1;s[o+1]=0,l[o+1]=0;let u=r-i,c=u%2!=0,d=0,h=0,f=0,p=0;for(let m=0;m<o&&!(Date.now()>n);m++){for(let f=-m+d;f<=m-h;f+=2){let p;let g=o+f,y=(p=f===-m||f!==m&&s[g-1]<s[g+1]?s[g+1]:s[g-1]+1)-f;for(;p<r&&y<i&&e.charAt(p)===t.charAt(y);)p++,y++;if(s[g]=p,p>r)h+=2;else if(y>i)d+=2;else if(c){let i=o+u-f;if(i>=0&&i<a&&-1!==l[i]&&p>=r-l[i])return nV(e,t,p,y,n)}}for(let d=-m+f;d<=m-p;d+=2){let h;let g=o+d,y=(h=d===-m||d!==m&&l[g-1]<l[g+1]?l[g+1]:l[g-1]+1)-d;for(;h<r&&y<i&&e.charAt(r-h-1)===t.charAt(i-y-1);)h++,y++;if(l[g]=h,h>r)p+=2;else if(y>i)f+=2;else if(!c){let i=o+u-d;if(i>=0&&i<a&&-1!==s[i]){let a=s[i],l=o+a-i;
42if(a>=(h=r-h))return nV(e,t,a,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 a&&l.unshift([0,a]),s&&l.push([0,s]),l=n6(l)}function nZ(e,t,n){return 1===n?e+t:t+e}function nK(e,t){return 1===t?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function nQ(e,t,n){var r,i;let o=1===n?-1:1,a=null,s=null,l=t+n;for(;l>=0&&l<e.length&&(null===a||null===s);l+=n){let[r,i]=e[l];if(0!==i.length){if(1===r){null===a&&(a=l);continue}if(-1===r){null===s&&(s=l);continue}if(0===r){if(null===a&&null===s){let[r,i]=nK(e[t][1],n);e[t][1]=r,e[l][1]=nZ(e[l][1],i,o);return}break}}}if(null!==a&&null!==s&&(r=a,i=s,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]=nK(e[a][1],o),[l]=nK(e[s][1],o);e[a][1]=r,e[s][1]=l,e[t][1]=nZ(e[t][1],i,n);return}let[u,c]=nK(e[t][1],n);e[t][1]=u,null===a?(e.splice(l,0,[1,c]),null!==s&&s>=l&&s++):e[a][1]=nZ(e[a][1],c,o),null===s?e.splice(l,0,[-1,c]):e[s][1]=nZ(e[s][1],c,o)}function nJ(e){let t=e.map(e=>n$(e)),n=!1,r=[],i=0,o=null,a=0,s=0,l=0,u=0,c=0;for(;a<t.length;)0===t[a][0]?(r[i++]=a,s=u,l=c,u=0,c=0,o=t[a][1]):(1===t[a][0]?u+=t[a][1].length:c+=t[a][1].length,o&&o.length<=Math.max(s,l)&&o.length<=Math.max(u,c)&&(t.splice(r[i-1],0,[-1,o]),t[r[i-1]+1][0]=1,i--,a=--i>0?r[i-1]:-1,s=0,l=0,u=0,c=0,o=null,n=!0)),a++;for(n&&(t=n6(t)),t=n4(t),a=1;a<t.length;){if(-1===t[a-1][0]&&1===t[a][0]){let e=t[a-1][1],n=t[a][1],r=nD(e,n),i=nD(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(a,0,[0,n.substring(0,r)]),t[a-1][1]=e.substring(0,e.length-r),t[a+1][1]=n.substring(r),a++):(i>=e.length/2||i>=n.length/2)&&(t.splice(a,0,[0,e.substring(0,i)]),t[a-1][0]=1,t[a-1][1]=n.substring(0,n.length-i),t[a+1][0]=-1,t[a+1][1]=e.substring(i),a++),a++}a++}return t}let n0=/[^a-zA-Z0-9]/,n1=/\s/,n2=/[\r\n]/,n5=/\n\r?\n$/,n3=/^\r?\n\r?\n/;function n4(e){let t=e.map(e=>n$(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(n0),o=r.match(n0),a=i&&n.match(n1),s=o&&r.match(n1),l=a&&n.match(n2),u=s&&r.match(n2),c=l&&e.match(n5),d=u&&t.match(n3);return c||d?5:l||u?4:i&&!a&&s?3:a||s?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],a=nN(e,i);if(a){let t=i.substring(i.length-a);e=e.substring(0,e.length-a),i=t+i.substring(0,i.length-a),o=t+o}let s=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,s=e,l=i,u=o)}t[r-1][1]!==s&&(s?t[r-1][1]=s:(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 n6(e){let t=e.map(e=>n$(e));t.push([0,""]);let n=0,r=0,i=0,o="",a="",s;for(;n<t.length;)switch(t[n][0]){case 1:i++,a+=t[n][1],n++;break;case -1:r++,o+=t[n][1],n++;break;case 0:r+i>1?(0!==r&&0!==i&&(0!==(s=nL(a,o))&&(n-r-i>0&&0===t[n-r-i-1][0]?t[n-r-i-1][1]+=a.substring(0,s):(t.splice(0,0,[0,a.substring(0,s)]),n++),a=a.substring(s),o=o.substring(s)),0!==(s=nN(a,o))&&(t[n][1]=a.substring(a.length-s)+t[n][1],a=a.substring(0,a.length-s),o=o.substring(0,o.length-s))),n-=r+i,t.splice(n,r+i),o.length&&(t.splice(n,0,[-1,o]),n++),a.length&&(t.splice(n,0,[1,a]),n++),n++):0!==n&&0===t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",a="";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=n6(t)),t}var n9=Object.defineProperty,n8=Object.getOwnPropertySymbols,n7=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,rt=(e,t,n)=>t in e?n9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rn=(e,t)=>{for(var n in t||(t={}))n7.call(t,n)&&rt(e,n,t[n]);if(n8)for(var n of n8(t))re.call(t,n)&&rt(e,n,t[n]);return e};let rr={threshold:.5,distance:1e3};function ri(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=rn(rn({},rr),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 a(e,r){let o=e/t.length,a=Math.abs(n-r);return i.distance?o+a/i.distance:a?1:o}let s=i.threshold,l=e.indexOf(t,n);-1!==l&&(s=Math.min(a(0,l),s),-1!==(l=e.lastIndexOf(t,n+t.length))&&(s=Math.min(a(0,l),s)));let u=1<<t.length-1;l=-1;let c,d,h=t.length+e.length,f=[];for(let r=0;r<t.length;r++){for(c=0,d=h;c<d;)a(r,n+d)<=s?c=d:h=d,d=Math.floor((h-c)/2+c);h=d;let i=Math.max(1,n-d+1),p=Math.min(n+d,e.length)+t.length,m=Array(p+2);m[p+1]=(1<<r)-1;for(let t=p;t>=i;t--){let c=o[e.charAt(t-1)];if(0===r?m[t]=(m[t+1]<<1|1)&c:m[t]=(m[t+1]<<1|1)&c|((f[t+1]|f[t])<<1|1)|f[t+1],m[t]&u){let e=a(r,t-1);if(e<=s){if(s=e,(l=t-1)>n)i=Math.max(1,2*n-l);else break}}}if(a(r+1,n)>s)break;f=m}return l}(e,t,i,r):-1}function ro(e){let t=[];for(let n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function ra(e){let t=[];for(let n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function rs(e,t){let n=0,r=0,i=0,o=0,a;for(a=0;a<e.length&&(1!==e[a][0]&&(n+=e[a][1].length),-1!==e[a][0]&&(r+=e[a][1].length),!(n>t));a++)i=n,o=r;return e.length!==a&&-1===e[a][0]?o:o+(t-i)}function rl(e){let t=0;for(let n=0;n<e.length;n++){let r=e.codePointAt(n);if(typeof r>"u")throw Error("Failed to get codepoint");t+=ru(r)}return t}function ru(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function rc(e,t){return{diffs:[],start1:e,start2:t,utf8Start1:e,utf8Start2:t,length1:0,length2:0,utf8Length1:0,utf8Length2:0}}var rd=Object.defineProperty,rh=Object.getOwnPropertySymbols,rf=Object.prototype.hasOwnProperty,rp=Object.prototype.propertyIsEnumerable,rm=(e,t,n
42)=>t in e?rd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rg=(e,t)=>{for(var n in t||(t={}))rf.call(t,n)&&rm(e,n,t[n]);if(rh)for(var n of rh(t))rp.call(t,n)&&rm(e,n,t[n]);return e};let ry={margin:4};function rv(e={}){return rg(rg({},ry),e)}function rb(e,t,n){if(0===t.length)return[];let r=[],i=rc(0,0),o=0,a=0,s=0,l=0,u=0,c=e,d=e;for(let e=0;e<t.length;e++){let h=t[e],[f,p]=h,m=p.length,g=rl(p);switch(o||0===f||(i.start1=a,i.start2=s,i.utf8Start1=l,i.utf8Start2=u),f){case 1:i.diffs[o++]=h,i.length2+=m,i.utf8Length2+=g,d=d.substring(0,s)+p+d.substring(s);break;case -1:i.length1+=m,i.utf8Length1+=g,i.diffs[o++]=h,d=d.substring(0,s)+d.substring(s+m);break;case 0:m<=2*n.margin&&o&&t.length!==e+1?(i.diffs[o++]=h,i.length1+=m,i.length2+=m,i.utf8Length1+=g,i.utf8Length2+=g):m>=2*n.margin&&o&&(rx(i,c,n),r.push(i),i=rc(-1,-1),o=0,c=d,a=s,l=u);break;default:throw Error("Unknown diff type")}1!==f&&(a+=m,l+=g),-1!==f&&(s+=m,u+=g)}return o&&(rx(i,c,n),r.push(i)),r}function rx(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&&nz(t[o])&&o--;let a=t.substring(o,e.start2);a&&e.diffs.unshift([0,a]);let s=a.length,l=rl(a),u=e.start2+e.length1+i;u<t.length&&nz(t[u])&&u++;let c=t.substring(e.start2+e.length1,u);c&&e.diffs.push([0,c]);let d=c.length,h=rl(c);e.start1-=s,e.start2-=s,e.utf8Start1-=l,e.utf8Start2-=l,e.length1+=s+d,e.length2+=s+d,e.utf8Length1+=l+h,e.utf8Length2+=l+h}let rw=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;function rS(e){return parseInt(e,10)}function rk(e){let t,n,r;let{utf8Length1:i,utf8Length2:o,utf8Start1:a,utf8Start2:s,diffs:l}=e;t=0===i?`${a},0`:1===i?`${a+1}`:`${a+1},${i}`,n=0===o?`${s},0`:1===o?`${s+1}`:`${s+1},${o}`;let u=[`@@ -${t} +${n} @@
43`];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])}
44`}return u.join("").replace(/%20/g," ")}var rE="object"==typeof global&&global&&global.Object===Object&&global,rC="object"==typeof self&&self&&self.Object===Object&&self,rj=rE||rC||Function("return this")(),rA=rj.Symbol,r_=Object.prototype,rT=r_.hasOwnProperty,rM=r_.toString,rR=rA?rA.toStringTag:void 0,rP=function(e){var t=rT.call(e,rR),n=e[rR];try{e[rR]=void 0;var r=!0}catch(e){}var i=rM.call(e);return r&&(t?e[rR]=n:delete e[rR]),i},rI=Object.prototype.toString,rO=rA?rA.toStringTag:void 0,r$=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":rO&&rO in Object(e)?rP(e):rI.call(e)},rD=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},rL=function(e){if(!rD(e))return!1;var t=r$(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},rN=rj["__core-js_shared__"],rz=(o=/[^.]+$/.exec(rN&&rN.keys&&rN.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",rV=Function.prototype.toString,rF=function(e){if(null!=e){try{return rV.call(e)}catch(e){}try{return e+""}catch(e){}}return""},rB=/^\[object .+?Constructor\]$/,rU=Object.prototype,rH=Function.prototype.toString,rW=rU.hasOwnProperty,rG=RegExp("^"+rH.call(rW).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rY=function(e,t){var n,r=null==e?void 0:e[t];return rD(n=r)&&(!rz||!(rz in n))&&(rL(n)?rG:rB).test(rF(n))?r:void 0},rq=function(){try{var e=rY(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),rX=function(e,t,n){"__proto__"==t&&rq?rq(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},rZ=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r},rK=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e},rQ=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},rJ=function(e){return null!=e&&"object"==typeof e},r0=function(e){return rJ(e)&&"[object Arguments]"==r$(e)},r1=Object.prototype,r2=r1.hasOwnProperty,r5=r1.propertyIsEnumerable,r3=r0(function(){return arguments}())?r0:function(e){return rJ(e)&&r2.call(e,"callee")&&!r5.call(e,"callee")},r4=Array.isArray,r6="object"==typeof exports&&exports&&!exports.nodeType&&exports,r9=r6&&"object"==typeof module&&module&&!module.nodeType&&module,r8=r9&&r9.exports===r6?rj.Buffer:void 0,r7=(r8?r8.isBuffer:void 0)||function(){return!1},ie=/^(?:0|[1-9]\d*)$/,it=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ie.test(e))&&e>-1&&e%1==0&&e<t},ir=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ii={};
44ii["[object Float32Array]"]=ii["[object Float64Array]"]=ii["[object Int8Array]"]=ii["[object Int16Array]"]=ii["[object Int32Array]"]=ii["[object Uint8Array]"]=ii["[object Uint8ClampedArray]"]=ii["[object Uint16Array]"]=ii["[object Uint32Array]"]=!0,ii["[object Arguments]"]=ii["[object Array]"]=ii["[object ArrayBuffer]"]=ii["[object Boolean]"]=ii["[object DataView]"]=ii["[object Date]"]=ii["[object Error]"]=ii["[object Function]"]=ii["[object Map]"]=ii["[object Number]"]=ii["[object Object]"]=ii["[object RegExp]"]=ii["[object Set]"]=ii["[object String]"]=ii["[object WeakMap]"]=!1;var io="object"==typeof exports&&exports&&!exports.nodeType&&exports,ia=io&&"object"==typeof module&&module&&!module.nodeType&&module,is=ia&&ia.exports===io&&rE.process,il=function(){try{var e=ia&&ia.require&&ia.require("util").types;if(e)return e;return is&&is.binding&&is.binding("util")}catch(e){}}(),iu=il&&il.isTypedArray,ic=iu?function(e){return iu(e)}:function(e){return rJ(e)&&ir(e.length)&&!!ii[r$(e)]},id=Object.prototype.hasOwnProperty,ih=function(e,t){var n=r4(e),r=!n&&r3(e),i=!n&&!r&&r7(e),o=!n&&!r&&!i&&ic(e),a=n||r||i||o,s=a?rQ(e.length,String):[],l=s.length;for(var u in e)(t||id.call(e,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||it(u,l)))&&s.push(u);return s},ip=Object.prototype,im=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ip)},ig=(a=Object.keys,s=Object,function(e){return a(s(e))}),iy=Object.prototype.hasOwnProperty,iv=function(e){if(!im(e))return ig(e);var t=[];for(var n in Object(e))iy.call(e,n)&&"constructor"!=n&&t.push(n);return t},ib=function(e){return null!=e&&ir(e.length)&&!rL(e)},ix=function(e){return ib(e)?ih(e):iv(e)},iw=(l=function(e,t){return e&&rK(e,t,ix)},function(e,t){if(null==e)return e;if(!ib(e))return l(e,t);for(var n=e.length,r=-1,i=Object(e);(u?r--:++r<n)&&!1!==t(i[r],r,i););return e}),iS=function(e,t){return e===t||e!=e&&t!=t},ik=function(e,t){for(var n=e.length;n--;)if(iS(e[n][0],t))return n;return -1},iE=Array.prototype.splice;function iC(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])}}iC.prototype.clear=function(){this.__data__=[],this.size=0},iC.prototype.delete=function(e){var t=this.__data__,n=ik(t,e);return!(n<0)&&(n==t.length-1?t.pop():iE.call(t,n,1),--this.size,!0)},iC.prototype.get=function(e){var t=this.__data__,n=ik(t,e);return n<0?void 0:t[n][1]},iC.prototype.has=function(e){return ik(this.__data__,e)>-1},iC.prototype.set=function(e,t){var n=this.__data__,r=ik(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ij=rY(rj,"Map"),iA=rY(Object,"create"),i_=Object.prototype.hasOwnProperty,iT=Object.prototype.hasOwnProperty;function iM(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])}}iM.prototype.clear=function(){this.__data__=iA?iA(null):{},this.size=0},iM.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},iM.prototype.get=function(e){var t=this.__data__;if(iA){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i_.call(t,e)?t[e]:void 0},iM.prototype.has=function(e){var t=this.__data__;return iA?void 0!==t[e]:iT.call(t,e)},iM.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iA&&void 0===t?"__lodash_hash_undefined__":t,this};var iR=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},iP=function(e,t){var n=e.__data__;return iR(t)?n["string"==typeof t?"string":"hash"]:n.map};function iI(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 iO(e){var t=this.__data__=new iC(e);this.size=t.size}function i$(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new iI;++t<n;)this.add(e[t])}iI.prototype.clear=function(){this.size=0,this.__data__={hash:new iM,map:new(ij||iC),string:new iM}},iI.prototype.delete=function(e){var t=iP(this,e).delete(e);return this.size-=t?1:0,t},iI.prototype.get=function(e){return iP(this,e).get(e)},iI.prototype.has=function(e){return iP(this,e).has(e)},iI.prototype.set=function(e,t){var n=iP(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},iO.prototype.clear=function(){this.__data__=new iC,this.size=0},iO.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},iO.prototype.get=function(e){return this.__data__.get(e)},iO.prototype.has=function(e){return this.__data__.has(e)},iO.prototype.set=function(e,t){var n=this.__data__;if(n instanceof iC){var r=n.__data__;if(!ij||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new iI(r)}return n.set(e,t),this.size=n.size,this},i$.prototype.add=i$.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},i$.prototype.has=function(e){return this.__data__.has(e)};var iD=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}
44,iL=function(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,h=!0,f=2&n?new i$:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=a?r(m,p,d,t,e,o):r(p,m,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!iD(t,function(e,t){if(!f.has(t)&&(p===e||i(p,e,n,r,o)))return f.push(t)})){h=!1;break}}else if(!(p===m||i(p,m,n,r,o))){h=!1;break}}return o.delete(e),o.delete(t),h},iN=rj.Uint8Array,iz=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},iV=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},iF=rA?rA.prototype:void 0,iB=iF?iF.valueOf:void 0,iU=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new iN(e),new iN(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return iS(+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 s=iz;case"[object Set]":var l=1&r;if(s||(s=iV),e.size!=t.size&&!l)break;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=iL(s(e),s(t),r,i,o,a);return a.delete(e),c;case"[object Symbol]":if(iB)return iB.call(e)==iB.call(t)}return!1},iH=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},iW=function(e,t,n){var r=t(e);return r4(e)?r:iH(r,n(e))},iG=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o},iY=Object.prototype.propertyIsEnumerable,iq=Object.getOwnPropertySymbols,iX=iq?function(e){return null==e?[]:iG(iq(e=Object(e)),function(t){return iY.call(e,t)})}:function(){return[]},iZ=function(e){return iW(e,ix,iX)},iK=Object.prototype.hasOwnProperty,iQ=function(e,t,n,r,i,o){var a=1&n,s=iZ(e),l=s.length;if(l!=iZ(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:iK.call(t,c)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<l;){var m=e[c=s[u]],g=t[c];if(r)var y=a?r(g,m,c,t,e,o):r(m,g,c,e,t,o);if(!(void 0===y?m===g||i(m,g,n,r,o):y)){f=!1;break}p||(p="constructor"==c)}if(f&&!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)&&(f=!1)}return o.delete(e),o.delete(t),f}
44,iJ=rY(rj,"DataView"),i0=rY(rj,"Promise"),i1=rY(rj,"Set"),i2=rY(rj,"WeakMap"),i5="[object Map]",i3="[object Promise]",i4="[object Set]",i6="[object WeakMap]",i9="[object DataView]",i8=rF(iJ),i7=rF(ij),oe=rF(i0),ot=rF(i1),on=rF(i2),or=r$;(iJ&&or(new iJ(new ArrayBuffer(1)))!=i9||ij&&or(new ij)!=i5||i0&&or(i0.resolve())!=i3||i1&&or(new i1)!=i4||i2&&or(new i2)!=i6)&&(or=function(e){var t=r$(e),n="[object Object]"==t?e.constructor:void 0,r=n?rF(n):"";if(r)switch(r){case i8:return i9;case i7:return i5;case oe:return i3;case ot:return i4;case on:return i6}return t});var oi=or,oo="[object Arguments]",oa="[object Array]",os="[object Object]",ol=Object.prototype.hasOwnProperty,ou=function(e,t,n,r,i,o){var a=r4(e),s=r4(t),l=a?oa:oi(e),u=s?oa:oi(t);l=l==oo?os:l,u=u==oo?os:u;var c=l==os,d=u==os,h=l==u;if(h&&r7(e)){if(!r7(t))return!1;a=!0,c=!1}if(h&&!c)return o||(o=new iO),a||ic(e)?iL(e,t,n,r,i,o):iU(e,t,l,n,r,i,o);if(!(1&n)){var f=c&&ol.call(e,"__wrapped__"),p=d&&ol.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new iO),i(m,g,n,r,o)}}return!!h&&(o||(o=new iO),iQ(e,t,n,r,i,o))},oc=function e(t,n,r,i,o){return t===n||(null!=t&&null!=n&&(rJ(t)||rJ(n))?ou(t,n,r,i,e,o):t!=t&&n!=n)},od=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],u=e[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in e))return!1}else{var d=new iO;if(r)var h=r(u,c,l,e,t,d);if(!(void 0===h?oc(c,u,3,r,d):h))return!1}}return!0},oh=function(e){return e==e&&!rD(e)},of=function(e){for(var t=ix(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,oh(i)]}return t},op=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},om=function(e){var t=of(e);return 1==t.length&&t[0][2]?op(t[0][0],t[0][1]):function(n){return n===e||od(n,e,t)}},og=function(e){return"symbol"==typeof e||rJ(e)&&"[object Symbol]"==r$(e)},oy=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ov=/^\w*$/,ob=function(e,t){if(r4(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||og(e))||ov.test(e)||!oy.test(e)||null!=t&&e in Object(t)};function ox(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 a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ox.Cache||iI),n}ox.Cache=iI;var ow=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oS=/\\(\\)?/g,ok=(d=(c=ox(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ow,function(e,n,r,i){t.push(r?i.replace(oS,"$1"):n||e)}),t},function(e){return 500===d.size&&d.clear(),e})).cache,c),oE=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},oC=1/0,oj=rA?rA.prototype:void 0,oA=oj?oj.toString:void 0,o_=function e(t){if("string"==typeof t)return t;if(r4(t))return oE(t,e)+"";if(og(t))return oA?oA.call(t):"";var n=t+"";return"0"==n&&1/t==-oC?"-0":n},oT=function(e,t){return r4(e)?e:ob(e,t)?[e]:ok(null==e?"":o_(e))},oM=1/0,oR=function(e){if("string"==typeof e||og(e))return e;var t=e+"";return"0"==t&&1/e==-oM?"-0":t},oP=function(e,t){t=oT(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[oR(t[n++])];return n&&n==r?e:void 0},oI=function(e,t,n){var r=null==e?void 0:oP(e,t);return void 0===r?n:r},oO=function(e,t){return null!=e&&t in Object(e)},o$=function(e,t,n){t=oT(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=oR(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ir(i)&&it(a,i)&&(r4(e)||r3(e))},oD=function(e){return e},oL=function(e){var t;return ob(e)?(t=oR(e),function(e){return null==e?void 0:e[t]}):function(t){return oP(t,e)}},oN=function(e){if("function"==typeof e)return e;if(null==e)return oD;if("object"==typeof e){var t,n;return r4(e)?(t=e[0],n=e[1],ob(t)&&oh(n)?op(oR(t),n):function(e){var r=oI(e,t);return void 0===r&&r===n?null!=e&&o$(e,t,oO):oc(n,r,3)}):om(e)}return oL(e)},oz=Object.prototype.hasOwnProperty,oV=(h=function(e,t,n){oz.call(e,n)?e[n].push(t):rX(e,n,[t])},function(e,t){return(r4(e)?rZ:function(e,t,n,r){return iw(e,function(e,i,o){t(r,e,n(e),o)}),r})(e,h,oN(t,2),{})});
44let oF=["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 oB{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=oF[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 oU(e,t,n=0){let r=n,i=0;for(i=n;r<t;i++){var o;let t=(o=e.codePointAt(i))>>16?4:o>>11?3:o>>7?2:1;4===t&&i++,r+=t}return i}class oH{wrap(e){return e}finalize(e){return Array.isArray(e)?e:e.data}markChanged(e){return e}objectGetKeys(e){return Object.keys(e)}
44objectGetField(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=oU(t,n),o=oU(t,r,i);e.data+=t.slice(i,o)}stringAppendValue(e,t){e.data+=t}}var oW=n(71064),oG=n(44465),oY=n(89155),oq=n(68851),oX=n(96987),oZ=n(5853),oK=n(8150),oQ=1,oJ={};function o0(e){return e in oJ&&(delete oJ[e],!0)}var o1=function(e){var t=oQ++;return oJ[t]=!0,f||(f=Promise.resolve()),f.then(function(){return o0(t)&&e()}),t},o2=function(e){o0(e)},o5={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o5.delegate;return((null==n?void 0:n.setImmediate)||o1).apply(void 0,(0,oZ.ev)([],(0,oZ.CR)(e)))},clearImmediate:function(e){var t=o5.delegate;return((null==t?void 0:t.clearImmediate)||o2)(e)},delegate:void 0},o3=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return(0,oZ.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=o5.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&&(o5.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(oK.o),o4=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,oZ.ZT)(t,e),t.prototype.flush=function(e){this._active=!0;var t,n=this._scheduled;this._scheduled=void 0;var r=this.actions;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while((e=r[0])&&e.id===n&&r.shift());if(this._active=!1,t){for(;(e=r[0])&&e.id===n&&r.shift();)e.unsubscribe();throw t}},t}(n(319).v))(o3),o6=n(3564),o9=n(75522),o8=n(30173);function o7(e){if("patch"===e.type)return e.id;if("create"===e.type)return e.document._id;if("delete"===e.type)return e.id;if("createIfNotExists"===e.type||"createOrReplace"===e.type)return e.document._id;throw Error("Invalid mutation type")}let ae=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function at(e){return"string"==typeof e?._key}function an(e){return"object"==typeof e&&"_key"in e&&"string"==typeof e._key}function ar(e){return"number"==typeof e||an(e)}function ai(e,t){if(0===e.length)return t;let n=t;for(let t of e){if(ar(t)){if(!Array.isArray(n))return;if(an(t)){n=n.find(e=>e._key===t._key);continue}n=n[t];continue}n=n[t]}return n}let ao=/^[a-z_$]+/;function aa(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:an(e)?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&ao.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function as(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function al(e,t){if("number"==typeof t)return function(e,t){if(0===e&&(-1===t||0===t))return 0;let n=t<0?e+t:t;return n>=e||n<0?null:n}(e.length,t);if(an(t)){let n=e.findIndex(e=>(null!==e&&"object"==typeof e&&"string"==typeof e._key&&e._key||null)===t._key);return -1===n?null:n}throw Error(`Expected path segment to be addressing a single array item either by numeric index or by '_key'. Instead saw ${JSON.stringify(t)}`)}function au(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function ac(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "insert()" on non-array value');let n=al(t,e.referenceItem);if(null===n)throw Error(`Found no matching array element to insert ${e.position}`);return 0===t.length?e.items:au(t,"before"===e.position?n:n+1,0,e.items)}let ad=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);var ah=Object.freeze({__proto__:null,assign:function(e,t){if(!as(t))throw TypeError('Cannot apply "assign()" on non-object value');return!function(e){for(let t in e)if(ad(e,t))return!1;return!0}(e.value)?{...t,...e.value}:t},dec:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "dec()" on non-numeric value');return t-e.amount},diffMatchPatch:function(e,t){if("string"!=typeof t)throw TypeError('Cannot apply "diffMatchPatch()" on non-string value');return function(e,t,n={}){if("string"==typeof e)throw Error("Patches must be an array - pass the patch to `parsePatch()` first");let r=t;if(0===e.length)return[r,[]];let 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+=ru(e),e>65535?i+=2:i+=1}if(!n.allowExceedingIndices&&r!==e)throw Error("Failed to determine byte offset");return i}let a=[];for(let t of e)a.push({diffs:t.diffs.map(e=>n$(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 a}(e,r,{allowExceedingIndices:n.allowExceedingIndices}),o=n.margin||4,a=n.deleteThreshold||.4,s=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=s+r+s,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,a="";for(;0!==r.diffs.length;){let s=rc(i-a.length,o-a.length),l=!0;if(""!==a){let e=rl(a);s.length1=a.length,s.utf8Length1=e,s.length2=a.length,s.utf8Length2=e,s.diffs.push([0,a])}for(;0!==r.diffs.length&&s.length1<32-t;){let e=r.diffs[0][0],n=r.diffs[0][1],a=rl(n);if(1===e){s.length2+=n.length,s.utf8Length2+=a,o+=n.length;let e=r.diffs.shift();e&&s.diffs.push(e),l=!1}else -1===e&&1===s.diffs.length&&0===s.diffs[0][0]&&n.length>64?(s.length1+=n.length,s.utf8Length1+=a,i+=n.length,l=!1,s.diffs.push([e,n]),r.diffs.shift()):(a=rl(n=n.substring(0,32-s.length1-t)),s.length1+=n.length,s.utf8Length1+=a,i+=n.length,0===e?(s.length2+=n.length,s.utf8Length2+=a,o+=n.length):l=!1,s.diffs.push([e,n]),n===r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(n.length))}a=(a=ra(s.diffs)).substring(a.length-t);let u=ro(r.diffs).substring(0,t),c=rl(u);""!==u&&(s.length1+=u.length,s.length2+=u.length,s.utf8Length1+=c,s.utf8Length2+=c,0!==s.diffs.length&&0===s.diffs[s.diffs.length-1][0]?s.diffs[s.diffs.length-1][1]+=u:s.diffs.push([0,u])),l||e.splice(++n,0,s)}}}(i,o);let l=0,u=[];for(let e=0;e<i.length;e++){let t=i[e].start2+l,n=ro(i[e].diffs),o,s=-1;if(n.length>32?-1!==(o=ri(r,n.substring(0,32),t))&&(-1===(s=ri(r,n.substring(n.length-32),t+n.length-32))||o>=s)&&(o=-1):o=ri(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===s?r.substring(o,o+n.length):r.substring(o,s+32),n===c)r=r.substring(0,o)+ra(i[e].diffs)+r.substring(o+n.length);else{let t=nq(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],a=e[i][1];switch(o){case 1:n+=a.length;break;case -1:r+=a.length;break;case 0:t+=Math.max(n,r),n=0,r=0;break;default:throw Error("Unknown diff operation.")}}return t+Math.max(n,r)}(t)/n.length>a)u[e]=!1;else{t=n4(t);let n=0,a=0;for(let s=0;s<i[e].diffs.length;s++){let l=i[e].diffs[s];0!==l[0]&&(a=rs(t,n)),1===l[0]?r=r.substring(0,o+a)+l[1]+r.substring(o+a):-1===l[0]&&(r=r.substring(0,o+a)+r.substring(o+rs(t,n+l[1].length))),-1!==l[0]&&(n+=l[1].length)}}}}}return[r=r.substring(s.length,r.length-s.length),u]}(function(e){if(!e)return[];let t=[],n=e.split(`
45`),r=0;for(;r<n.length;){let e=n[r].match(rw);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=rc(rS(e[1]),rS(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=rS(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=rS(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 a=rl(e)-e.length;if("-"===o)i.diffs.push([-1,e]),i.length1-=a;else if("+"===o)i.diffs.push([1,e]),i.length2-=a;else if(" "===o)i.diffs.push([0,e]),i.length1-=a,i.length2-=a;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:ac,remove:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "remove()" on non-array value');let n=al(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return au(t,n,1,[])},replace:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "replace()" on non-array value');let n=al(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return au(t,n,e.items.length,e.items)},set:function(e,t){return e.value},setIfMissing:function(e,t){return t??e.value},truncate:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "truncate()" on non-array value');return"number"==typeof e.endIndex?t.slice(0,e.startIndex).concat(t.slice(e.endIndex)):t.slice(0,e.startIndex)},unassign:function(e,t){if(!as(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');
45if(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 ac({type:"insert",items:r,referenceItem:e.referenceItem,position:e.position},i)}});function af(e,t){return e.reduce((e,t)=>ap(t,e),t)}function ap(e,t){return function e(t,n,r){if(!(t.length>0))return function(e,t){if(!(e.type in ah))throw Error(`Invalid operation type: "${e.type}"`);return ah[e.type](e,t)}(n,r);let[i,...o]=t;if(ar(i)&&Array.isArray(r))return function(t,n,r,i){let o=al(i,t);if(null===o||-1===o)return i;let a=i[o],s=e(n,r,a);return s===a?i:au(i,o,1,[s])}(i,o,n,r);if("string"==typeof i&&as(r))return function(t,n,r,i){let o=i[t];if(void 0===o&&n.length>0)return i;let a=e(n,r,o);return a===o?i:{...i,[t]:a}}(i,o,n,r);throw Error(`Cannot apply operation of type "${n.type}" to path ${aa(t)} on ${typeof r} value`)}(e.path,e.op,t)}function am(e){return"_id"in e}function ag(e,t){return t.reduce((e,t)=>{let n=ay(e,t);if("error"===n.status)throw Error(n.message);return"noop"===n.status?e:n.after},e)}function ay(e,t){if("create"===t.type)return function(e,t){var n;if(e)return{status:"error",message:"Document already exist"};let r=am(n=t.document)?n:{...n,_id:ae()};return{status:"created",id:r._id,after:r}}(e,t);if("createIfNotExists"===t.type)return am(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 am(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 af(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 av(e,t,n){let r=[];for(let n of e.slice().reverse()){if(t(n))return r;r.push(n)}return r.reverse()}function ab(e,t){return aa(e)===aa(t)}function ax(e,t){let n=e;return t.reduce((e,t)=>{let r=n;if(n=ap(t,n),"set"===t.op.type&&"string"==typeof t.op.value){let n=ai(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=nq(e,t,{checkLines:!0});return n.length>2&&(n=function(e,t=4){let n=e.map(e=>n$(e)),r=!1,i=[],o=0,a=null,s=0,l=!1,u=!1,c=!1,d=!1;for(;s<n.length;)0===n[s][0]?(n[s][1].length<t&&(c||d)?(i[o++]=s,l=c,u=d,a=n[s][1]):(o=0,a=null),c=!1,d=!1):(-1===n[s][0]?d=!0:c=!0,a&&(l&&u&&c&&d||a.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,a]),n[i[o-1]+1][0]=1,o--,a=null,l&&u?(c=!0,d=!0,o=0):(s=--o>0?i[o-1]:-1,c=!1,d=!1),r=!0)),s++;return r&&(n=n6(n)),n}(n=nJ(n))),rb(e,n,rv(void 0))}if(e&&Array.isArray(e)&&typeof t>"u")return rb(ro(e),e,rv(void 0));if("string"==typeof e&&t&&Array.isArray(t))return rb(e,t,rv(void 0));throw Error("Unknown call format to make()")})(n,t.op.value).map(rk).join("")}};return e.flatMap(e=>ab(e.path,t.path)&&"diffMatchPatch"===e.op.type?[]:e).concat(r)}}return e.push(t),e},[])}function aw(e,t,n,r){let i=t,o=r.map(t=>{let n=t.mutations.flatMap(t=>{if(o7(t)!==e)return[];let n=i;return i=ag(i,[t]),n&&"patch"===t.type?{type:"dmpified",mutation:{...t,dmpPatches:ax(n,t.patches),original:t.patches}}:t});return{...t,mutations:n}}),a=n;return o.map(t=>{let n=[];return t.mutations.forEach(t=>{if("dmpified"===t.type)try{a=af(t.mutation.dmpPatches,a),n.push(t)}catch{console.warn("Failed to apply dmp patch, falling back to original");try{a=af(t.mutation.original,a),n.push(t)}catch(t){throw Error(`Failed to apply patch for document "${e}": ${t.message}`)}}else a=ag(a,[t])})}),[r.map(t=>({...t,mutations:t.mutations.map(t=>"patch"!==t.type||o7(t)!==e?t:{...t,patches:t.patches.map(e=>"set"!==e.op.type?e:{...e,op:{...e.op,value:ai(e.path,a)}})})})),a]}function aS(e){return function(e){if("create"===e.type||"createIfNotExists"===e.type||"createOrReplace"===e.type)return{[e.type]:e.document};if("delete"===e.type)return{delete:{id:e.id}};let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...function(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[aa(t)]};if("insert"===n.type)return{insert:{[n.position]:aa([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[aa(t)]:n.value}};if("inc"===n.type)return{inc:{[aa(t)]:n.amount}};if("dec"===n.type)return{dec:{[aa(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[aa(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${aa(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>
45aa([...t,{_key:e._key}])),insert:{[n.position]:aa([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[aa(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>aa(t.concat(e)))};if("replace"===n.type)return{insert:{replace:aa(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[aa(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}(e)}function ak(e){let t=e.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation","reconnect"],includeResult:!1,includePreviousRevision:!1,visibility:"transaction",effectFormat:"mendoza",includeMutations:!1}).pipe((0,oW.B)({resetOnRefCountZero:!0})),n=t.pipe((0,oG.h)(e=>"reconnect"===e.type)),r=t.pipe((0,oG.h)(e=>"welcome"===e.type)),i=t.pipe((0,oG.h)(e=>"mutation"===e.type)),o=(0,nO.T)(r,n).pipe((0,oY.d)({bufferSize:1,refCount:!0})).pipe((0,oG.h)(e=>"welcome"===e.type));return(0,nO.T)(o,i,n)}let aE=(0,o6.cY)({types:{},actions:{"assign error to context":(0,o9.a)({error:({event:e})=>e}),"clear error from context":(0,o9.a)({error:void 0}),"connect to server-sent events":(0,nR.r)({type:"connect"}),"listen to server-sent events":(0,nR.d)("server-sent events",{id:"listener",input:({context:e})=>({listener:e.sharedListener||ak(e.client),id:e.id})}),"stop listening to server-sent events":(0,nR.s)("listener"),"buffer remote mutation events":(0,o9.a)({mutationEvents:({event:e,context:t})=>((0,o6.ZD)(e,"mutation"),[...t.mutationEvents,e])}),"restore stashed changes":(0,o9.a)({stagedChanges:({event:e,context:t})=>((0,o6.ZD)(e,"xstate.done.actor.submitTransactions"),t.stashedChanges),stashedChanges:[]}),"rebase fetched remote snapshot":(0,o8.e)(({enqueue:e})=>{e.assign(({event:e,context:t})=>{(0,o6.ZD)(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=aC(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,a]=aw(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:a,stagedChanges:o,mutationEvents:[]}}),e.sendParent(({context:e})=>({type:"rebased.remote",id:e.id,document:e.remote}))}),"apply mendoza patch":(0,o9.a)(({event:e,context:t})=>{(0,o6.ZD)(e,"mutation");let n=t.remote;if(e.transactionId===n?._rev)return{};let r=aC(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]=aw(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:o,stagedChanges:i}}),"increment fetch attempts":(0,o9.a)({fetchRemoteSnapshotAttempts:({context:e})=>e.fetchRemoteSnapshotAttempts+1}),"reset fetch attempts":(0,o9.a)({fetchRemoteSnapshotAttempts:0}),"increment submit attempts":(0,o9.a)({submitTransactionsAttempts:({context:e})=>e.submitTransactionsAttempts+1}),"reset submit attempts":(0,o9.a)({submitTransactionsAttempts:0}),"stage mutation":(0,o9.a)({stagedChanges:({event:e,context:t})=>((0,o6.ZD)(e,"mutate"),[...t.stagedChanges,{transaction:!1,mutations:e.mutations}])}),"stash mutation":(0,o9.a)({stashedChanges:({event:e,context:t})=>((0,o6.ZD)(e,"mutate"),[...t.stashedChanges,{transaction:!1,mutations:e.mutations}])}),"rebase local snapshot":(0,o8.e)(({enqueue:e})=>{e.assign({local:({event:e,context:t})=>{(0,o6.ZD)(e,"mutate");let n=new Map;return t.local&&n.set(t.id,t.local),function(e,t){e.forEach(e=>{("created"===e.status||"updated"===e.status)&&t.set(e.id,e.after),"deleted"===e.status&&t.delete(e.id)})}(function(e,t){let n=Object.create(null);for(let r of e){let e=o7(r);if(!e)throw Error("Unable to get document id from mutation");let i=n[e]?.after||t.get(e),o=ay(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":(0,o8.b)(({context:e})=>({type:"pristine",id:e.id})),"send sync event to parent":(0,o8.b)(({context:e})=>({type:"sync",id:e.id,document:e.remote})),"send mutation event to parent":(0,o8.b)(({context:e,event:t})=>((0,o6.ZD)(t,"mutation"),{type:"mutation",id:e.id,previousRev:t.previousRev,resultRev:t.resultRev,effects:t.effects}))},actors:{"server-sent events":(0,L.Y$)(({input:e})=>{let{listener:t,id:n}=e;return(0,oq.P)(()=>t).pipe((0,oG.h)(e=>"welcome"===e.type||"reconnect"===e.type||"mutation"===e.type&&e.documentId===n),(0,oX.Q)(o4))}),"fetch remote snapshot":(0,L.p4)(async({input:e,signal:t})=>{let{client:n,id:r}=e;return await n.getDocument(r,{signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}),"submit mutations as transactions":(0,L.p4)(async({input:e,signal:t})=>{let{client:n,transactions:r}=e;for(let e of r){if(t.aborted)return;await n.dataRequest("mutate",{transactionId:e.id,mutations:e.mutations.flatMap(aS)},{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=[];
45return 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(oV(e.mutations,o7)).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):av(e,e=>"delete"===e.type).find(e=>"createIfNotExists"===e.type)||e.push(t),e),[])).flat().reduce((e,t)=>{let n=e[e.length-1];return n&&"patch"!==n.type||"patch"!==t.type?e.concat(t):e.slice(0,-1).concat({...t,patches:(n?.patches||[]).concat(t.patches)})},[])})})).map(e=>({...e,mutations:e.mutations.map(e=>"patch"!==e.type?e:{...e,patches:e.patches.reduce((e,t)=>{if("unset"!==t.op.type)return e.push(t),e;let n=e.filter(e=>{var n,r;return n=t.path,r=e.path,!(n.length<=r.length&&n.every((e,t)=>{var n;return n=function(e,t){if(t<0||t>=e.length)throw Error("Index out of bounds");return e[t]}(r,t),at(e)&&at(n)?e._key===n._key:"number"==typeof e?Number(e)===Number(n):e===n}))});return n.push(t),n},[]).reduceRight((e,t)=>(e.find(e=>{var n,r;return n=e.op,("set"===(r=t.op).type||"unset"===r.type)&&("set"===n.type||"unset"===n.type)&&ab(e.path,t.path)})||e.unshift(t),e),[]).reduce((e,t)=>("setIfMissing"!==t.op.type?e.push(t):av(e,e=>"unset"===e.op.type).find(e=>"setIfMissing"===e.op.type&&ab(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:ax(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 aC(e,t,n){var r;let i=(r=function(e){if(!e)return null;let{_rev:t,...n}=e;return n}(e),new oB(new oH,r,t).process());return i?Object.assign(i,{_rev:n}):null}let aj=e=>{let t=(0,L.p4)(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=(0,L.p4)(async({input:t})=>{let{transactions:n}=t;for(let t of n){let n=P.encodeTransaction(t);return e.post("visual-editing/mutate",n)}});return aE.provide({actions:{"send sync event to parent":(0,o8.e)(({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}})},aA=(0,o6.cY)({types:{},actions:{"emit sync event":(0,o8.a)(({event:e})=>((0,o6.ZD)(e,"sync"),e)),"emit mutation event":(0,o8.a)(({event:e})=>((0,o6.ZD)(e,"mutation"),e)),"emit rebased event":(0,o8.a)(({event:e})=>((0,o6.ZD)(e,["rebased.local","rebased.remote"]),e)),"emit pristine event":(0,o8.a)(({event:e})=>((0,o6.ZD)(e,["pristine"]),e)),"add document actor":(0,o9.a)({documents:({context:e,event:t,spawn:n})=>{(0,o6.ZD)(t,"observe");let r=t.documentId;return e.documents[r]?e.documents:{...e.documents,[r]:n("documentMutatorMachine",{input
45:{id:r,client:e.client,sharedListener:e.sharedListener||ak(e.client)},id:r})}}}),"stop remote snapshot":(0,nR.s)(({context:e,event:t})=>((0,o6.ZD)(t,"unobserve"),e.documents[t.documentId])),"remove remote snapshot from context":(0,o9.a)({documents:({context:e,event:t})=>{if((0,o6.ZD)(t,"unobserve"),!e.documents[t.documentId])return e.documents;let{[t.documentId]:n,...r}=e.documents;return r}})},actors:{documentMutatorMachine:aE}}).createMachine({id:"dataset-mutator",context:({input:e})=>({documents:{},client:e.client,sharedListener:e.sharedListener}),on:{sync:{actions:["emit sync event"]},mutation:{actions:["emit mutation event"]},"rebased.*":{actions:["emit rebased event"]},pristine:{actions:["emit pristine event"]},observe:{actions:["add document actor"]},unobserve:{actions:["stop remote snapshot","remove remote snapshot from context"]}},initial:"pristine",states:{pristine:{}}}),a_=e=>aA.provide({actors:{documentMutatorMachine:aj(e)}}),aT=e=>{let t,n,r,i;let o=(0,m.c)(8),{comlink:a,history:s}=e;return o[0]!==a||o[1]!==s?(t=()=>a?.on("presentation/navigate",e=>{s?.update(e)}),n=[a,s],o[0]=a,o[1]=s,o[2]=t,o[3]=n):(t=o[2],n=o[3]),(0,y.useEffect)(t,n),o[4]!==a||o[5]!==s?(r=()=>{if(s)return s.subscribe(e=>{e.title=e.title||document.title,a?.post("visual-editing/navigate",e)})},i=[a,s],o[4]=a,o[5]=s,o[6]=r,o[7]=i):(r=o[6],i=o[7]),(0,y.useEffect)(r,i),null},aM=e=>{let t,n;let r=(0,m.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,y.useEffect)(t,n),null};function aR(e){let t=new CustomEvent("sanity/dragEnd",{detail:e,cancelable:!0});window.dispatchEvent(t)}let aP=(0,y.createContext)(null);function aI(){let e=(0,y.useContext)(aP);if(!e)throw Error("Schema context is missing");return e}function aO(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}=ei(e);return[D(r,I([{_type:t,_key:er()}],n,{_key:i}))]})(e,n,r))}function a$(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Duplicate",icon:e8.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}=ei(e);return[D(r,I({...Y(t,e.path),_key:er()},n,{_key:i}))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Duplicated"}]:[]}function aD(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Remove",icon:e8.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}=ei(e),i=Y(t,n).findIndex(e=>e._key===r);return[D(n,O(i,i+1))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Removed"}]:[]}async function aL(e,t=!0){let{node:n,doc:r}=e;if(!r)return[];let i=[],o=[],[a,s,l,u]=await Promise.all([eo(n,r,"previous"),eo(n,r,"next"),eo(n,r,"first"),eo(n,r,"last")]);return l.length&&o.push({type:"action",label:"To top",icon:e8.EI4,action:()=>r.patch(l),telemetryEvent:"Visual Editing Context Menu Item Moved"}),a.length&&o.push({type:"action",label:"Up",icon:e8.Hf3,action:()=>r.patch(a),telemetryEvent:"Visual Editing Context Menu Item Moved"}),s.length&&o.push({type:"action",label:"Down",icon:e8.veu,action:()=>r.patch(s),telemetryEvent:"Visual Editing Context Menu Item Moved"}),u.length&&o.push({type:"action",label:"To bottom",icon:e8.xEY,action:()=>r.patch(u),telemetryEvent:"Visual Editing Context Menu Item Moved"}),o.length&&(i.push({type:"group",label:"Move",icon:e8.fzI,items:o}),t&&i.push({type:"divider"})),i}async function aN(e){let{node:t,field:n,doc:r}=e,i=[];return i.push(...a$(e)),i.push(...aD(e)),i.push(...await aL(e)),i.push({type:"action",label:"Insert before",icon:e8.ySV,action:aO(t,r,n.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i.push({type:"action",label:"Insert after",icon:e8.oty,action:aO(t,r,n.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i}let az=e=>{let t,n,r,i,o;let a=(0,m.c)(12),{label:s,parent:l,width:u,onSelect:c,boundaryElement:d}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=["left-start","right","left","right-end","left-end","bottom","top"],a[0]=t):t=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(n=[4,4,4,4],a[1]=n):n=a[1],a[2]!==d||a[3]!==u?(r={arrow:!1,constrainSize:!0,floatingBoundary:d,padding:0,placement:"right-start",fallbackPlacements:t,preventOverflow:!0,width:u,__unstable_margins:n},a[2]=d,a[3]=u,a[4]=r):r=a[4],a[5]!==c||a[6]!==l?(i=(0,p.jsx)(tj,{node:l,onSelect:c}
45),a[5]=c,a[6]=l,a[7]=i):i=a[7],a[8]!==s||a[9]!==r||a[10]!==i?(o=(0,p.jsx)(x.kS,{fontSize:1,icon:e8.oty,padding:2,popover:r,space:2,text:s,children:i}),a[8]=s,a[9]=r,a[10]=i,a[11]=o):o=a[11],o};async function aV(e){let{doc:t,node:n,parent:r}=e,i=[];if(i.push(...a$(e)),i.push(...aD(e)),i.push(...await aL(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,p.jsx)(az,{label:"Insert before",onSelect:e=>{aO(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,p.jsx)(az,{label:"Insert after",onSelect:e=>{aO(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:e8.ySV,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",icon:tp(e),label:"block"===e.name?"Paragraph":e.title||e.name,action:aO(n,t,e.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))}),i.push({type:"group",label:"Insert after",icon:e8.oty,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",label:"block"===e.name?"Paragraph":e.title||e.name,icon:tp(e),action:aO(n,t,e.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))});return i}let aF=[-4,4,-4,4];function aB(e){let t;let n=(0,m.c)(27),{node:r,onDismiss:i,boundaryElement:o}=e,a=tE();n[0]!==r||n[1]!==i||n[2]!==a?(t=()=>{"action"===r.type&&(r.action?.(),i?.(),r.telemetryEvent&&a(r.telemetryEvent,null))},n[0]=r,n[1]=i,n[2]=a,n[3]=t):t=n[3];let s=t;if("divider"===r.type){let e;return n[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,p.jsx)(x.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]!==s||n[9]!==t?(e=(0,p.jsx)(x.sN,{fontSize:1,hotkeys:r.hotkeys,icon:r.icon,padding:2,space:2,text:r.label,disabled:t,onClick:s}),n[5]=r.hotkeys,n[6]=r.icon,n[7]=r.label,n[8]=s,n[9]=t,n[10]=e):e=n[10],e}if("group"===r.type){let e,t,a;let s=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:aF},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,p.jsx)(aB,{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?(a=(0,p.jsx)(x.kS,{fontSize:1,icon:s,padding:2,popover:e,space:2,text:l,children:t}),n[19]=r.icon,n[20]=r.label,n[21]=t,n[22]=a):a=n[22],a}if("custom"===r.type){let e;let{component:t}=r;return n[23]!==t||n[24]!==o||n[25]!==a?(e=(0,p.jsx)(t,{boundaryElement:o,sendTelemetry:a}),n[23]=t,n[24]=o,n[25]=a,n[26]=e):e=n[26],e}return null}let aU=e=>{let t,n,r,i,o,a,s,l,u,c,d,h,f,g,v,b,w,S;let k=(0,m.c)(43),{node:E,onDismiss:C,position:j}=e,{x:A,y:_}=j,[T,M]=(0,y.useState)(null),{getField:R}=aI(),{getDocument:P}=et();k[0]!==R||k[1]!==E?(t=R(E),k[0]=R,k[1]=E,k[2]=t):t=k[2];let{field:I,parent:O}=t;n=I?.title||I?.name||"Unknown type";let[$,D]=(0,y.useState)(void 0);k[3]!==I||k[4]!==P||k[5]!==E||k[6]!==O?(r=()=>{(async()=>{let e=P(E.id);e&&D(await function(e){let{node:t,field:n,parent:r,doc:i}=e;return n?.type==="arrayItem"?aN({node:t,field:n,doc:i}):r?.type==="union"?aV({node:t,parent:r,doc:i}):Promise.resolve([])}({node:E,field:I,parent:O,doc:e}))})()},i=[I,E,O,P],k[3]=I,k[4]=P,k[5]=E,k[6]=O,k[7]=r,k[8]=i):(r=k[7],i=k[8]),(0,y.useEffect)(r,i),k[9]!==A||k[10]!==_?(a={getBoundingClientRect:()=>({bottom:_,left:A,right:A,top:_,width:0,height:0})},k[9]=A,k[10]=_,k[11]=a):a=k[11],o=a,k[12]!==I?(l=tp(I),k[12]=I,k[13]=l):l=k[13],s=l,k[14]===Symbol.for("react.memo_cache_sentinel")?(u={minWidth:120,maxWidth:160},k[14]=u):u=k[14],k[15]!==s||k[16]!==$?(c=(0,p.jsx)(x.xu,{flex:"none",children:$?(0,p.jsx)(x.xv,{size:1,children:s}):(0,p.jsx)(x.$j,{size:1})}),k[15]=s,k[16]=$,k[17]=c):c=k[17];let L=$?n:"Loading...";k[18]!==L?(d=(0,p.jsx)(x.Kq,{flex:1,space:2,children:(0,p.jsx)(x.xv,{size:1,weight:"semibold",children:L})}),k[18]=L,k[19]=d):d=k[19],k[20]!==c||k[21]!==d?(h=(0,p.jsxs)(x.kC,{gap:2,padding:2,children:[c,d]}),k[20]=c,k[21]=d,k[22]=h):h=k[22],k[23]!==T||k[24]!==$||k[25]!==C?(f=$&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(x.R,{}),$.map((e,t)=>(0,p.jsx)(aB,{node:e,onDismiss:C,boundaryElement:T},t))]}),k[23]=T,k[24]=$,k[25]=C,k[26]=f):f=k[26],k[27]!==h||k[28]!==f?(g=(0,p.jsxs)(x.v2,{style:u,children:[h,f]}),k[27]=h,k[28]=f,k[29]=g):g=k[29];let N=`${A}-${_}`;return k[30]!==A||k[31]!==_?(v={position:"absolute",left:A,top:_},k[30]=A,k[31]=_,k[32]=v):v=k[32],k[33]!==N||k[34]!==v?(b=(0,p.jsx)("div",{style:v},N),k[33]=N,k[34]=v,k[35]=b):b=k[35],k[36]!==o||k[37]!==g||k[38]!==b?(w=(0,p.jsx)(x.J2,{__unstable_margins:aF,arrow:!1,open:!0,placement:"right-start",referenceElement:o,content:g,children:b}),k[36]=o,k[37]=g,k[38]=b,k[39]=w):w=k[39],k[40]!==C||k[41]!==w?(S=(0,p.jsx)(tv,{setBoundaryElement:M,onDismiss:C,children:w}),k[40]=C,k[41]=w,k[42]=S):S=k[42],S},aH=(0,y.createContext)(null),aW=e=>(0,y.isValidElement)(e),aG=(0,w.zo)(x.Zb)`
46  background-color: var(--overlay-bg);
47  border-radius: 3px;
48  pointer-events: none;
49  position: absolute;
50  will-change: transform;
51  box-shadow: var(--overlay-box-shadow);
52  transition: none;
53
54  --overlay-bg: transparent;
55  --overlay-box-shadow: inset 0 0 0 1px transparent;
56
57  [data-overlays] & {
58    --overlay-bg: color-mix(in srgb, transparent 95%, var(--card-focus-ring-color));
59    --overlay-box-shadow: inset 0 0 0 2px
60      color-mix(in srgb, transparent 50%, var(--card-focus-ring-color));
61  }
62
63  [data-fading-out] & {
64    transition:
65      box-shadow 1550ms,
66      background-color 1550ms;
67
68    --overlay-bg: rgba(0, 0, 255, 0);
69    --overlay-box-shadow: inset 0 0 0 1px transparent;
70  }
71
72  &[data-focused] {
73    --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color);
74  }
75
76  &[data-hovered]:not([data-focused]) {
77    transition: none;
78    --overlay-box-shadow: inset 0 0 0 2px var(--card-focus-ring-color);
79  }
80
81  /* [data-unmounted] & {
82    --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color);
83  } */
84
85  :link {
86    text-decoration: none;
87  }
88`,aY=(0,w.zo)(x.kC)`
89  bottom: 100%;
90  cursor: pointer;
91  pointer-events: none;
92  position: absolute;
93  right: 0;
94
95  [data-hovered]:not([data-menu-open]) & {
96    pointer-events: all;
97  }
98
99  [data-flipped] & {
100    bottom: auto;
101    top: 100%;
102  }
103`,aq=(0,w.zo)(x.kC)`
104  top: 100%;
105  cursor: pointer;
106  pointer-events: none;
107  position: absolute;
108  left: 0;
109
110  gap: 4px;
111  padding: 4px 0;
112  flex-wrap: wrap;
113
114  [data-hovered]:not([data-menu-open]) & {
115    pointer-events: all;
116  }
117
118  [data-flipped] & {
119    top: calc(100% + 2rem);
120  }
121`,aX=(0,w.zo)(x.kC)`
122  margin: -0.5rem;
123
124  [data-hovered]:not([data-menu-open]) & {
125    pointer-events: all;
126  }
127`,aZ=(0,w.zo)(x.kC)`
128  bottom: 100%;
129  cursor: pointer;
130  pointer-events: none;
131  position: absolute;
132  left: 0;
133
134  [data-hovered]:not([data-menu-open]) & {
135    pointer-events: all;
136  }
137
138  [data-flipped] & {
139    bottom: auto;
140    top: 100%;
141  }
142`,aK=(0,w.zo)(x.Zb)`
143  cursor: pointer;
144  background-color: var(--card-focus-ring-color);
145  right: 0;
146  border-radius: 3px;
147
148  & [data-ui='Text'] {
149    color: #fff;
150    white-space: nowrap;
151  }
152`,aQ=(0,w.zo)(x.kC)`
153  display: flex;
154  align-items: center;
155  background-color: var(--card-focus-ring-color);
156  right: 0;
157  border-radius: 3px;
158  & [data-ui='Text'],
159  & [data-sanity-icon] {
160    color: #fff;
161    white-space: nowrap;
162  }
163`,aJ=w.zo.div`
164  position: absolute;
165  inset: 0;
166  pointer-events: all;
167`,a0=e=>{let t,n,r,i,o,a,s,l,u,c,d,h,f,g,v,w,S,k;let E=(0,m.c)(59),{id:C,element:j,focused:A,componentResolver:_,node:T,showActions:M,draggable:R,targets:P,elementType:I,comlink:O,onActivateExclusivePlugin:$,onMenuOpenChange:D}=e,{getField:L,getType:N}=aI();E[0]!==N||E[1]!==T?(t=N(T),E[0]=N,E[1]=T,E[2]=t):t=E[2];let z=t;E[3]!==T?(n="path"in T?function(e){let{id:t,type:n,path:r,baseUrl:i,tool:o,workspace:a}=e;return(0,b.tZ)({baseUrl:i,workspace:a,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}(b.eT.fromString(r)):[]})}(T):T.href,E[3]=T,E[4]=n):n=E[4];let V=n,F=function(){let e=(0,y.useContext)(aH);if(!e)throw Error("Preview Snapshots context is missing");return e}();e:{let e;if(!("path"in T)){r=void 0;break e}E[5]!==T||E[6]!==F?(e=F.find(e=>e._id===T.id)?.title,E[5]=T,E[6]=F,E[7]=e):e=E[7],r=e}let B=r;E[8]!==j||E[9]!==A||E[10]!==L||E[11]!==N?(o=function(e,t){let n=N(e),{field:r,parent:i}=L(e);if(!("id"in e)||!r||!n)return;let o=r.value.type;return{document:n,element:j,targetElement:t||j,field:r,focused:!!A,node:e,parent:i,type:o}},E[8]=j,E[9]=A,E[10]=L,E[11]=N,E[12]=o):o=E[12];let U=o;if(E[13]!==I||E[14]!==U||E[15]!==T?(a="element"===I?U(T):void 0,E[13]=I,E[14]=U,E[15]=T,E[16]=a):a=E[16],E[17]!==U||E[18]!==P){let e;E[20]!==U?(e=e=>U(e.sanity,e.element),E[20]=U,E[21]=e):e=E[21],s=P.map(e).filter(a3),E[17]=U,E[18]=P,E[19]=s}else s=E[19];E[22]!==a||E[23]!==s?(l={legacyComponentContext:a,pluginContexts:s},E[22]=a,E[23]=s,E[24]=l):l=E[24];let H=function(e,t){let n;let r=(0,m.c)(4);e:{let i;if(!e){n=void 0;break e}if(r[0]!==e||r[1]!==t){let o=t?.(e);if(!o){n=void 0;break e}if(aW(o)){n=o;break e}i=(Array.isArray(o)?o:[o]).map(a2),r[0]=e,r[1]=t,r[2]=i,r[3]=n}else i=r[2],n=r[3];n=i}return n}((i=l).legacyComponentContext,_),W=function(e,t){let n;let r=(0,m.c)(5);if(r[0]!==e||r[1]!==t){let i;r[3]!==t?(i=e=>{let n={id:ej(),context:e,hud:[],exclusive:[]};return t?.forEach(t=>{t.guard?.(e)&&("hud"===t.type&&n.hud.push(t),"exclusive"===t.type&&n.exclusive.push(t))}),n},r[3]=t,r[4]=i):i=r[4],n=e.map(i),r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(i.pluginContexts,e.plugins);E[25]!==z?(u=z?.icon?(0,p.jsx)("div",{dangerouslySetInnerHTML:{__html:z.icon}}):(0,p.jsx)(e8.$lS,{}),E[25]=z,E[26]=u):u=E[26];let G=u,Y=(0,y.useId)();E[27]!==W?(c=W?.some(a4),E[27]=W,E[28]=c):c=E[28];let q=c||W?.length>1;E[29]!==C?(d=()=>{window.dispatchEvent(new CustomEvent("sanity-overlay/label-click",{detail:{id:C}}))},E[29]=C,E[30]=d):d=E[30];let X=d;return E[31]!==V||E[32]!==M?(h=M?(0,p.jsx)(aY,{gap:1,paddingY:1,children:(0,p.jsx)(a5,{href:V})}):null,E[31]=V,E[32]=M,E[33]=h):h=E[33],E[34]!==O||E[35]!==R||E[36]!==X||E[37]!==G||E[38]!==Y||E[39]!==W||E[40]!==$||E[41]!==D||E[42]!==q||E[43]!==B?(f=(B||q)&&(0,p.jsx)(aZ,{gap:1,paddingY:1,onClick:X,children:(0,p.jsxs)(aQ,{gap:2,padding:2,children:[R&&(0,p.jsx)(x.xu,{marginRight:1,children:(0,p.jsx)(x.xv,{className:"drag-handle",size:0,children:(0,p.jsx)(e8.VVU,{})})}),(0,p.jsx)(x.xv,{size:0,children:G}),B&&(0,p.jsx)(x.xv,{size:1,weight:"medium",children:B}),q&&(0,p.jsx)(x.xu,{paddingLeft:2,onClick:a6,children:(0,p.jsx)(aX,{children:(0,p.jsx)(t5,{id:Y,popover:{animate:!0,placement:"bottom-start",constrainSize:!0,tone:"default"},onOpen:()=>{D?.(!0)},onClose:()=>{D?.(!1)}
167,button:(0,p.jsx)(x.zx,{icon:e8.zGg,tone:"primary",padding:2}),menu:(0,p.jsx)(x.v2,{paddingY:0,children:(0,p.jsx)(tT,{children:W?.map((e,t)=>p.jsxs(y.Fragment,{children:[p.jsxs(x.Kq,{role:"group",paddingY:1,space:0,children:[p.jsx(x.sN,{paddingY:2,text:p.jsx(x.xu,{paddingY:2,children:p.jsx(x.xv,{muted:!0,size:1,style:{textTransform:"capitalize"},children:`${e.context.document.name}: ${e.context.field?.name}`})}),onClick:()=>{e.context.node&&O?.post("visual-editing/focus",e.context.node)}}),e.exclusive.map(t=>t.component?p.jsx(x.sN,{paddingY:2,icon:t.icon||p.jsx(e8.BWR,{}),text:p.jsx(x.xu,{paddingY:2,children:p.jsx(x.xv,{size:1,children:t.title||t.name})}),onClick:()=>$?.(t,e.context)},t.name):null)]}),t<W.length-1&&p.jsx(x.R,{})]},e.id))})})})})})]})}),E[34]=O,E[35]=R,E[36]=X,E[37]=G,E[38]=Y,E[39]=W,E[40]=$,E[41]=D,E[42]=q,E[43]=B,E[44]=f):f=E[44],E[45]!==W?(g=W?.map(a9),E[45]=W,E[46]=g):g=E[46],E[47]!==g?(v=(0,p.jsx)(aq,{children:g}),E[47]=g,E[48]=v):v=E[48],E[49]!==h||E[50]!==f||E[51]!==v?(w=(0,p.jsxs)(tT,{children:[h,f,v]}),E[49]=h,E[50]=f,E[51]=v,E[52]=w):w=E[52],E[53]!==H||E[54]!==i.legacyComponentContext?(S=Array.isArray(H)?H.map((e,t)=>{let{component:n,props:r}=e;return(0,p.jsx)(n,{PointerEvents:tT,...i.legacyComponentContext,...r},t)}):H,E[53]=H,E[54]=i.legacyComponentContext,E[55]=S):S=E[55],E[56]!==w||E[57]!==S?(k=(0,p.jsxs)(p.Fragment,{children:[w,S]}),E[56]=w,E[57]=S,E[58]=k):k=E[58],k},a1=(0,y.memo)(function(e){let t,n,r,i,o,a,s,l,u,c,d,h,f,g;let v=(0,m.c)(38),{draggable:b,focused:x,hovered:w,rect:S,wasMaybeCollapsed:k,enableScrollIntoView:E}=e,C=(0,y.useRef)(null),j=(0,y.useRef)(!1),A=`${S.w}px`,_=`${S.h}px`,T=`translate(${S.x}px, ${S.y}px)`;v[0]!==A||v[1]!==_||v[2]!==T?(n={width:A,height:_,transform:T},v[0]=A,v[1]=_,v[2]=T,v[3]=n):n=v[3],t=n,v[4]!==E||v[5]!==x||v[6]!==k?(r=()=>{if(!j.current&&!k&&!0===x&&C.current&&E){let e=C.current;(function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(n_(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:i,top:o,left:a}of n_(e,nT(t))){let e=o-n.top+n.bottom,t=a-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}})(C.current,{behavior:t=>{0!==t.length&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},scrollMode:"if-needed",block:"center",inline:"nearest"})}j.current=!0===x},i=[x,k,E],v[4]=E,v[5]=x,v[6]=k,v[7]=r,v[8]=i):(r=v[7],i=v[8]),(0,y.useEffect)(r,i);let[M,R]=(0,y.useState)(!1);v[9]!==w?(o=()=>{if(!C.current||!w)return;let e=new IntersectionObserver(e=>{let[t]=e;R(t.boundingClientRect.top<0)},{threshold:1});return e.observe(C.current),()=>e.disconnect()},v[9]=w,v[10]=o):o=v[10],v[11]!==w||v[12]!==M?(a=[w,M],v[11]=w,v[12]=M,v[13]=a):a=v[13],(0,y.useEffect)(o,a);let[P,I]=(0,y.useState)(null);v[14]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{I(null),window.dispatchEvent(new CustomEvent("sanity-overlay/exclusive-plugin-closed"))},v[14]=s):s=v[14];let O=s;v[15]===Symbol.for("react.memo_cache_sentinel")?(l=(e,t)=>{I({plugin:e,context:t})},v[15]=l):l=v[15];let $=l,D=P?.plugin.component,[L,N]=(0,y.useState)(!1);v[16]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{N(!1)},v[16]=u):u=v[16],v[17]!==w?(c=[w],v[17]=w,v[18]=c):c=v[18],(0,y.useEffect)(u,c),v[19]!==D||v[20]!==L?(d=L||D?(0,p.jsx)(tb,{onDismiss:O,blockScroll:L}):null,v[19]=D,v[20]=L,v[21]=d):d=v[21];let z=x?"":void 0,V=w?"":void 0,F=M?"":void 0,B=b?"":void 0,U=L?"":void 0;return v[22]!==D||v[23]!==P||v[24]!==w||v[25]!==e?(h=D?(0,p.jsx)(aJ,{"data-sanity-overlay-element":!0,onClick:a8,children:(0,p.jsx)(D,{...P.context,closeExclusiveView:O})}):w?(0,p.jsx)(a0,{...e,onActivateExclusivePlugin:$,onMenuOpenChange:N}):null,v[22]=D,v[23]=P,v[24]=w,v[25]=e,v[26]=h):h=v[26],v[27]!==t||v[28]!==z||v[29]!==V||v[30]!==F||v[3
1671]!==B||v[32]!==U||v[33]!==h?(f=(0,p.jsx)(aG,{"data-focused":z,"data-hovered":V,"data-flipped":F,"data-draggable":B,"data-menu-open":U,ref:C,style:t,children:h}),v[27]=t,v[28]=z,v[29]=V,v[30]=F,v[31]=B,v[32]=U,v[33]=h,v[34]=f):f=v[34],v[35]!==d||v[36]!==f?(g=(0,p.jsxs)(p.Fragment,{children:[d,f]}),v[35]=d,v[36]=f,v[37]=g):g=v[37],g});function a2(e){return"object"==typeof e&&"component"in e?e:{component:e,props:{}}}let a5=(0,y.memo)(function(e){let t,n,r,i;let o=(0,m.c)(6),a=(0,y.useSyncExternalStore)(a7,se);return o[0]!==e.href||o[1]!==a?(n=function e(t,n){try{let r=new URL(t,typeof location>"u"?void 0:location.origin);if(r.hash){let t=new URL(e(r.hash.slice(1),n));return`${r.origin}${r.pathname}${r.search}#${t.pathname}${t.search}`}return r.searchParams.set("preview",n),r.toString()}catch{return t}}(e.href,a),o[0]=e.href,o[1]=a,o[2]=n):n=o[2],t=n,o[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,p.jsx)(aK,{padding:2,children:(0,p.jsx)(x.xv,{size:1,weight:"medium",children:"Open in Studio"})}),o[3]=r):r=o[3],o[4]!==t?(i=(0,p.jsx)(x.xu,{as:"a",href:t,target:"_blank",rel:"noopener noreferrer",children:r}),o[4]=t,o[5]=i):i=o[5],i});function a3(e){return void 0!==e}function a4(e){return e.exclusive.length>0}function a6(e){e.stopPropagation()}function a9(e){return(0,p.jsx)(y.Fragment,{children:e.hud.map(t=>{let n=t.component;return n?(0,p.jsx)(n,{...e.context},t.name):null})},e.id)}function a8(e){e.stopPropagation()}function a7(e){let t=()=>e();return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}function se(){return window.location.href}let st=e=>{let t;let n=(0,m.c)(5),{dragGroupRect:r}=e,i=`${r.y}px`,o=`${r.x}px`,a=`${r.w-1}px`,s=`${r.h-1}px`;return n[0]!==i||n[1]!==o||n[2]!==a||n[3]!==s?(t=(0,p.jsx)("div",{style:{position:"absolute",top:i,left:o,width:a,height:s,border:"1px dashed #f0709b",pointerEvents:"none"}}),n[0]=i,n[1]=o,n[2]=a,n[3]=s,n[4]=t):t=n[4],t},sn=e=>{let t;let n=(0,m.c)(4),{dragInsertPosition:r}=e;if(null===r)return;let i=r?.left||r?.right?"horizontal":"vertical",o=0,a=0,s=0,l=0;if("horizontal"===i){let{left:e,right:t}=r;if(s=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,a=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,a=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,a=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,a=.5*r+.5*i-3,s=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,a=e.rect.y-3,s=e.rect.w-2*t,l=6}else if(t&&!e){let e=.0125*t.rect.w;o=t.rect.x+e,a=t.rect.y+t.rect.h-3,s=t.rect.w-2*e,l=6}}let u=`${s}px`,c=`${l}px`,d=`translate(${o}px, ${a}px)`;return n[0]!==u||n[1]!==c||n[2]!==d?(t=(0,p.jsx)("div",{style:{position:"absolute",width:u,height:c,transform:d,background:"#556bfc",border:"2px solid white",borderRadius:"999px",zIndex:"999999"}}),n[0]=u,n[1]=c,n[2]=d,n[3]=t):t=n[3],t},sr=w.zo.div`
168  --drag-preview-opacity: 0.98;
169  --drag-preview-skeleton-stroke: #ffffff;
170
171  @media (prefers-color-scheme: dark) {
172    --drag-preview-skeleton-stroke: #383d51;
173  }
174
175  position: fixed;
176  display: grid;
177  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})`};
178  width: ${({$width:e})=>`${e}px`};
179  height: ${({$height:e})=>`${e}px`};
180  z-index: 9999999;
181  opacity: var(--drag-preview-opacity);
182  cursor: move;
183
184  .drag-preview-content-wrapper {
185    position: relative;
186    width: 100%;
187    height: 100%;
188    container-type: inline-size;
189  }
190
191  [data-ui='card'] {
192    position: relative;
193    width: 100%;
194    height: 100%;
195  }
196
197  .drag-preview-skeleton {
198    position: absolute;
199    inset: 0;
200
201    rect {
202      stroke: var(--drag-preview-skeleton-stroke);
203    }
204  }
205
206  .drag-preview-handle {
207    position: absolute;
208    top: 4cqmin;
209    left: 4cqmin;
210    width: 6cqmin;
211    fill: var(--drag-preview-handle-fill);
212  }
213`,si=e=>{var t,n;let r,i,o,a,s,l,u,c,d,h,f,g,y,v,b,w,S,k,E,C,j;let A=(0,m.c)(50),{skeleton:_}=e,T=Math.min(_.maxWidth,window.innerWidth/2),M=_.w>T?T/_.w:1,R=_.offsetX*M,P=_.offsetY*M,I=(0,x.Bj)(),O=(0,x.g9)(),$=O.radius[~~((n=(_.w-0)*((t=O.radius.length-2)-1)/1920+1)<1?1:n>t?t:n)];if(A[0]!==R||A[1]!==P||A[2]!==I||A[3]!==$||A[4]!==M||A[5]!==_.childRects||A[6]!==_.h||A[7]!==_.w){let e=_.childRects.filter(so),t=_.childRects.filter(sa);i=sr,a=_.w,s=_.h,l=R,u=P,c=M,r=x.Zb,g=$,y=4,v="hidden",b="transparent",w=I?"dark":"light",f="drag-preview-content-wrapper",d="drag-preview-skeleton",h=`0 0 ${_.w} ${_.h}`,o=[...e,...t],A[0]=R,A[1]=P,A[2]=I,A[3]=$,A[4]=M,A[5]=_.childRects,A[6]=_.h,A[7]=_.w,A[8]=r,A[9]=i,A[10]=o,A[11]=a,A[12]=s,A[13]=l,A[14]=u,A[15]=c,A[16]=d,A[17]=h,A[18]=f,A[19]=g,A[20]=y,A[21]=v,A[22]=b,A[23]=w}else r=A[8],i=A[9],o=A[10],a=A[11],s=A[12],l=A[13],u=A[14],c=A[15],d=A[16],h=A[17],f=A[18],g=A[19],y=A[20],v=A[21],b=A[22],w=A[23];return A[24]!==o||A[25]!==O.color?(S=o.map((e,t)=>(0,p.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:O.color.skeleton.from},t)),A[24]=o,A[25]=O.color,A[26]=S):S=A[26],A[27]!==S||A[28]!==d||A[29]!==h?(k=(0,p.jsx)("svg",{className:d,viewBox:h,children:S}),A[27]=S,A[28]=d,A[29]=h,A[30]=k):k=A[30],A[31]!==k||A[32]!==f?(E=(0,p.jsx)("div",{className:f,children:k}),A[31]=k,A[32]=f,A[33]=E):E=A[33],A[34]!==r||A[35]!==E||A[36]!==g||A[37]!==y||A[38]!==v||A[39]!==b||A[40]!==w?(C=(0,p.jsx)(r,{radius:g,shadow:y,overflow:v,tone
213:b,scheme:w,children:E}),A[34]=r,A[35]=E,A[36]=g,A[37]=y,A[38]=v,A[39]=b,A[40]=w,A[41]=C):C=A[41],A[42]!==i||A[43]!==a||A[44]!==s||A[45]!==l||A[46]!==u||A[47]!==c||A[48]!==C?(j=(0,p.jsx)(i,{$width:a,$height:s,$offsetX:l,$offsetY:u,$scaleFactor:c,children:C}),A[42]=i,A[43]=a,A[44]=s,A[45]=l,A[46]=u,A[47]=c,A[48]=C,A[49]=j):j=A[49],j};function so(e){return"IMG"===e.tagName}function sa(e){return"IMG"!==e.tagName}let ss=(0,w.zo)(x.Zb)`
214  position: fixed;
215  bottom: 2rem;
216  left: 2rem;
217`,sl=()=>{let e,t;let n=(0,m.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,p.jsx)(ss,{padding:2,shadow:2,radius:2,style:e,children:(0,p.jsxs)(x.kC,{align:"center",gap:2,children:[(0,p.jsx)(x.SV,{keys:["Shift"]}),(0,p.jsx)(x.xv,{size:1,children:"Zoom Out"}),(0,p.jsx)(e8.Qq,{})]})}),n[1]=t):t=n[1],t},su=(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=>{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 sc(e,t){let{type:n}=t,{contextMenu:r,focusPath:i,perspective:o,isDragging:a,dragInsertPosition:s,dragShowMinimap:l,dragShowMinimapPrompt:u,dragSkeleton:c,dragMinimapTransition:d,dragGroupRect:h}=e,f=!1;if("presentation/focus"===n){let n=e.focusPath;n!==(i=t.data.path)&&(f=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&&(s=t.insertPosition),"overlay/dragStart"===n&&(a=!0),"overlay/dragUpdateSkeleton"===t.type&&(c=t.skeleton),"overlay/dragEnd"===n&&(a=!1),"overlay/dragToggleMinimapPrompt"===t.type&&(u=t.display),"overlay/dragStartMinimapTransition"===n&&(d=!0),"overlay/dragEndMinimapTransition"===n&&(d=!1),"overlay/dragUpdateGroupRect"===n&&(h=t.groupRect),"overlay/dragToggleMinimap"===n&&(l=t.display),{...e,contextMenu:r,elements:su(e.elements,t),dragInsertPosition:s,dragSkeleton:c,dragGroupRect:h,isDragging:a,focusPath:i,perspective:o,wasMaybeCollapsed:f,dragShowMinimap:l,dragShowMinimapPrompt:u,dragMinimapTransition:d}}let sd=function(e){let t,n,r,i,o,a,s;let l=(0,m.c)(13),{comlink:u,children:c}=e;l[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],l[0]=t):t=l[0];let[d,h]=(0,y.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});h(t.snapshots)}catch{}},l[1]=u,l[2]=n):n=l[2];let f=n;return l[3]!==u||l[4]!==f?(r=()=>{if(!u)return;let e=new AbortController,t=u.onStatus(()=>{f(e.signal)},"connected");return()=>{e.abort(),t()}},i=[u,f],l[3]=u,l[4]=f,l[5]=r,l[6]=i):(r=l[5],i=l[6]),(0,y.useEffect)(r,i),l[7]!==u?(o=()=>u?.on("presentation/preview-snapshots",e=>{h(e.snapshots)}),a=[u],l[7]=u,l[8]=o,l[9]=a):(o=l[8],a=l[9]),(0,y.useEffect)(o,a),l[10]!==c||l[11]!==d?(s=(0,p.jsx)(aH.Provider,{value:d,children:c}),l[10]=c,l[11]=d,l[12]=s):s=l[12],s};function sh(e){return"document"===e.type}function sf(e){return"type"===e.type}let sp=function(e){let t,n,r,i,o,a,s,l,u,c,d,h;let f=(0,m.c)(22),{comlink:g,children:v,elements:b}=e;f[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,f[0]=t):t=f[0];let[x,w]=(0,y.useState)(t),[S,k]=(0,y.useState)(null);f[1]!==g?(n=()=>
217{if(!g)return;let e=async function(e){if(g)try{let t=await g.fetch("visual-editing/schema",void 0,{signal:e,suppressWarnings:!0});k(t.schema)}catch{}},t=new AbortController,n=g.onStatus(()=>{e(t.signal)},"connected");return()=>{t.abort(),n()}},r=[g],f[1]=g,f[2]=n,f[3]=r):(n=f[2],r=f[3]),(0,y.useEffect)(n,r),f[4]===Symbol.for("react.memo_cache_sentinel")?(i=[],f[4]=i):i=f[4];let E=(0,y.useRef)(i),C=(0,y.useDeferredValue)(b);f[5]!==C?(o=C.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]=C,f[6]=o):o=f[6];let j=o,A=(0,y.useRef)(null);f[7]!==g||f[8]!==j?(a=()=>{if(!j.length||!g)return;let e=async(e,t)=>{let n=E.current;try{E.current=e;let n=await g.fetch("visual-editing/schema-union-types",{paths:e},{signal:t,suppressWarnings:!0});if(t.aborted)return;w(n.types),A.current=null}catch{}t.aborted&&(E.current=n)};j.some(e=>!E.current.find(t=>{let{id:n,path:r}=t;return n===e.id&&r===e.path}))&&(A.current?.abort(),A.current=new AbortController,e(j,A.current.signal))},s=[g,j],f[7]=g,f[8]=j,f[9]=a,f[10]=s):(a=f[9],s=f[10]),(0,y.useEffect)(a,s),f[11]!==S?(l=(e,t)=>{if(!S||"string"!=typeof e&&(!("path"in e)||!Array.isArray(S)))return;let n="string"==typeof e?e:e.type;return S.filter("document"===(t||"document")?sh:sf).find(e=>e.name===n)},f[11]=S,f[12]=l):l=f[12];let _=l;f[13]!==_||f[14]!==x?(u=e=>{if(!("path"in e))return{field:void 0,parent:void 0};let t=_(e);if(!t)return{field:void 0,parent:void 0};let n=e.path.split(".").flatMap(sm);try{return function t(n,r,i,o){let a=void 0===o?[]:o;if(!n)return{field:void 0,parent:void 0};let[s,...l]=r;if("fields"in n){let e=n.fields[s];if(!e&&"rest"in n)return t(n.rest,r,n,a);if(!l.length)return{field:e,parent:i};if(!e)throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...a,...r].join(".")}"`);return t(e.value,l,n,[...a,s])}if("array"===n.type)return t(n.of,r,n,a);if("arrayItem"===n.type)return l.length?t(n.value,l,n,[...a,s]):{field:n,parent:i};if("union"===n.type){let r=s.startsWith("[_key==")?x?.get(e.id)?.get([a.join("."),s].filter(Boolean).join("")):s;return t(n.of.find(e=>"unionOption"===e.type?e.name===r:e),l,n,[...a,s])}if("unionOption"===n.type)return s?t(n.value,r,n,a):{field:n,parent:i};if("inline"===n.type)return t(_(n.name,"type").value,r,n,a);throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...a,...r].join(".")}"`)}(t,n,void 0)}catch(e){return e instanceof Error&&console.warn(e.message),{field:void 0,parent:void 0}}},f[13]=_,f[14]=x,f[15]=u):u=f[15];let T=u;return f[16]!==T||f[17]!==_?(d={getField:T,getType:_},f[16]=T,f[17]=_,f[18]=d):d=f[18],c=d,f[19]!==v||f[20]!==c?(h=(0,p.jsx)(aP.Provider,{value:c,children:v}),f[19]=v,f[20]=c,f[21]=h):h=f[21],h};function sm(e){return e.includes("[")?e.split(/(\[.+\])/,2):[e]}let sg=(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))}})({}),sy=e=>{let t,n,r,i,o,a,s;let l=(0,m.c)(11),{comlink:u,children:c}=e;return l[0]!==u?(t=()=>u?.on("presentation/shared-state",sv),n=[u],l[0]=u,l[1]=t,l[2]=n):(t=l[1],n=l[2]),(0,y.useEffect)(t,n),l[3]!==u?(r=()=>{(async function(){let e=await u?.fetch("visual-editing/shared-state",void 0,{suppressWarnings:!0});e&&sg.setState(()=>e.state)})().catch(sb)},i=[u],l[3]=u,l[4]=r,l[5]=i):(r=l[4],i=l[5]),(0,y.useEffect)(r,i),l[6]!==u?(a={comlink:u,store:sg},l[6]=u,l[7]=a):a=l[7],o=a,l[8]!==c||l[9]!==o?(s=(0,p.jsx)(e6.Provider,{value:o,children:c}),l[8]=c,l[9]=o,l[10]=s):s=l[10],s};function sv(e){"value"in e?sg.setState(t=>({...t,[e.key]:e.value})):sg.setState(t=>Object.fromEntries(Object.entries(t).filter(t=>{let[n]=t;return n!==e.key})))}function sb(e){console.debug(e),console.warn("[@sanity/visual-editing]: Failed to fetch shared state. Check your version of `sanity` is up-to-date")}let sx=e=>{let t,n;let r=(0,m.c)(5),{children:i,comlink:o}=e;r[0]!==o?(t=(e,t)=>{if(!o)return;let n=tS[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 a=t;return r[2]!==i||r[3]!==a?(n=(0,p.jsx)(tk.Provider,{value:a,children:i}),r[2]=i,r[3]=a,r[4]=n):n=r[4],n};function sw(){}function sS(e){return e.id}function sk(e){return!!e}function sE(e){let{sanity:t}=e;return t&&"id"in t?t:null}let sC=w.zo.div`
218  background-color: transparent;
219  direction: ltr;
220  inset: 0;
221  pointer-events: none;
222  position: absolute;
223  width: 100%;
224  height: 100%;
225  z-index: ${({$zIndex:e})=>e??"9999999"};
226`;function sj(e){let t,n;return t=requestAnimationFrame(()=>{n=requestAnimationFrame(e)}),()=>{void 0!==t&&cancelAnimationFrame(t),void 0!==n&&cancelAnimationFrame(n)}}let sA=e=>{let t,n,r,i,o;let a=(0,m.c)(8),{documentIds:s}=e;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],a[0]=t):t=a[0];let[l,u]=(0,y.useState)(t);a[1]!==s?(n=()=>{u(e=>{let t=Array.from(new Set(s));return e.length===t.length&&e.reduce(sP,t)?.length===0?e:t})},r=[s],a[1]=s,a[2]=n,a[3]=r):(n=a[2],r=a[3]),(0,y.useEffect)(n,r);let c=X();return a[4]!==c||a[5]!==l?(i=()=>{for(let e of l)c.send({type:"observe",documentId:(0,b.qy)(e)}),c.send({type:"observe",documentId:(0,b.vs)(e)});return()=>{for(let e of l)c.send({type:"unobserve",documentId:(0,b.qy)(e)}),c.send({type:"unobserve",documentId:(0,b.vs)(e)})}},o=[c,l],a[4]=c,a[5]=l,a[6]=i,a[7]=o):(i=a[6],o=a[7]),(0,y.useEffect)(i,o),null},s_=e=>{let t,n,r;let i=(0,m.c)(12),{comlink:o,dispatch:a,inFrame:s,inPopUp:l,onDrag:u,overlayEnabled:c,rootElement:d}=e,{dispatchDragEndEvent:h}=function(){let e,t,n;let r=(0,m.c)(4),{getDocument:i}=et();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:a,hasExplicitKey:s}=ei(n),{path:l,key:u}=ei(t);l&&u&&u!==a&&e.patch(async e=>{let{getSnapshot:t}=e,i=Y(await t(),n.path);return s?[D(l,$({_key:a})),D(l,I(i,r,{_key:u}))]:[D(l,$(~~a)),D(l,I(i,r,u>a?~~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,y.useEffect)(e,t),r[3]===Symbol.for("react.memo_cache_sentinel")?(n={dispatchDragEndEvent:aR},r[3]=n):n=r[3],n}(),f=tE();i[0]!==o||i[1]!==a||i[2]!==h||i[3]!==u||i[4]!==f?(t=e=>{if("element/click"===e.type){let{sanity:t}=e;o?.post("visual-editing/focus",t),f("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;h({insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}),t&&f("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)f("Visual Editing Drag Minimap Enabled",null);else if("overlay/setCursor"===e.type){let{element:t,cursor:n}=e;n?t.style.cursor=n:t.style.removeProperty("cursor")}a(e)},i[0]=o,i[1]=a,i[2]=h,i[3]=u,i[4]=f,i[5]=t):t=i[5];let p=function(e,t,n,r){let i,o;let a=(0,m.c)(7),s=(0,y.useRef)(void 0),l=X()!==N;return a[0]!==e||a[1]!==t||a[2]!==n||a[3]!==r||a[4]!==l?(i=()=>
226{if(e)return s.current=function({handler:e,overlayElement:t,inFrame:n,inPopUp:r,optimisticActorReady:i}){let o=!1,a=new Map,s=new WeakMap,l=new Set,u=new WeakMap,c=new WeakMap,d,h,f,p=!1,m=[],g=()=>m[m.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 x({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;y(i,r),d.unobserve(o),m=m.filter(e=>e!==i),e({type:"element/deactivate",id:t})}function w(t){if(!(!n&&!r||!i))for(let n of m){if(t===n){let n=s.get(t)?.sanity;if(!n||!e0(n))return;if(e4(t,n,l,s)){let n=t.style.cursor;n&&c.set(t,n),e({type:"overlay/setCursor",element:t,cursor:"move"});continue}}S(n)}}function S(t){let n=c.get(t);e({type:"overlay/setCursor",element:t,cursor:n})}function k(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 em(e);try{let t=JSON.parse(e);return em(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=b.eT.toString(function(e){let t=[];for(let n of e.split(".")){let e=ec.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=ed.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=eh.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,ea.is)(eu,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 a=function(t){let{nodeType:n,parentElement:i,textContent:o}=t;if(eZ(t)&&t.dataset?.sanityEditTarget!==void 0){let n=e1(e(t).map(e=>"element"===e.type?e.commonSanity:void 0).filter(e=>void 0!==e));if(n)return{reason:"edit-target",elements:{element:t,measureElement:t},sanity:n}}else if(n===Node.TEXT_NODE&&i&&o){let e=eX(o);return e?r(i,e,"stega-text",!0):void 0}else if(eZ(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&&eq(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&eq(t.textContent)));if(eK(t)){let e=eX(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if(eQ(t)){let e=eX(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if(eJ(t)){if(!t.ariaLabel)return;let e=eX(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(i),s=o;if(eZ(i)&&i.dataset?.sanityEditGroup!==void 0&&(s={type:"group",elements:{element:i,measureElement:i},targets:[]},n.push(s)),a){let e={elements:a.elements,sanity:a.sanity,reason:a.reason};s&&!a.preventGrouping?s.targets.push(e):n.push({elements:a.elements,type:"element",targets:[e]})}if(eZ(i)&&!eK(i)&&!("SCRIPT"===i.tagName||"SANITY-VISUAL-EDITING"===i.tagName))for(let e of i.childNodes)t(e,s)}(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:e1(e.targets.map(({sanity:e})=>e).filter(e=>void 0!==e))||e.targets[0].sanity;return t?{...e,commonSanity:t}:null}).filter(e=>null!==e)}(c)){if("group"===d.type){for(let e of d.targets){let t=s.get(e.elements.element);t&&"element"===t.type&&E(e.elements.element)}0===d.targets.length&&E(d.elements.element)}if(!d.commonSanity)continue;let{element:c}=d.elements;s.has(c)?function(t){let{element:n}=t.elements,r=s.get(n);r&&(s.set(n,{...r,sanity:t.commonSanity}),e({type:"element/update",elementType:r.type,id:r.id,rect:eA(n),sanity:t.commonSanity,targets:t.targets.map(e=>({sanity:e.sanity,element:e.elements.element}))}))}(d):function({type:c,elements:d,commonSanity:f,targets:y}){let{element:b,measureElement:x}=d,k={click(t){let r=t.target;if(b===g()&&b.contains(r)){n&&(t.preventDefault(),t.stopPropagation());let r=s.get(b)?.sanity;r&&!p&&e({type:"element/click",id:E,sanity:r})}},contextmenu(t){if(!("path"in f)||!n&&!r||!i||!f.path.split(".").pop()?.includes("[_key=="))return;let o=t.target;b===g()&&b.contains(o)&&((n||r)&&(t.preventDefault(),t.stopPropagation()),e({type:"element/contextmenu",id:E,position:{x:t.clientX,y:t.clientY},sanity:f}))},mousedown(t){if(t.preventDefault(),t.currentTarget!==m.at(-1)||b.getAttribute("data-sanity-drag-disable")||!n&&!r||!i)return;let o=s.get(b)?.sanity;if(!o||!e0(o)||!e2(o.path))return;let a=e4(b,f,l,s);a&&function(e){var t;let{mouseEvent:n,element:r,overlayGroup:i,handler:o,target:a,onSequenceStart:s,onSequenceEnd:l}=e;if(0!==n.button)return;window.focus();let u=i.map(e=>eA(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=u).some(e=>t.filter(t=>!eT(e,t)).some(t=>e.y===t.y))?"horizontal":"vertical"),d=r.getAttribute("data-sanity-drag-group"),h=!!r.getAttribute("data-sanity-drag-minima
226p-disable"),f=!!r.getAttribute("data-sanity-drag-prevent-default"),p=r.getAttribute("data-unstable_sanity-drag-document-height"),m=r.getAttribute("data-unstable_sanity-drag-group-height"),g=null,y=eD(n),v=document.body,{minYScaled:b,scaleFactor:x}=function(e,t){let n=t||eI(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:i}=eI(e.map(e=>eP(e,r,{x:window.innerWidth/2,y:0})));return{scaleFactor:r,minYScaled:i-100*r}}(u,m?~~m:null),w=!1,S=!1,k=!0;eF||(eW={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}},eH=p?~~p:document.documentElement.scrollHeight);let E=setInterval(()=>{u=i.map(e=>eA(e.elements.element))},150),C=()=>{x>=1||(o({type:"overlay/dragUpdateSkeleton",skeleton:eL(eU,r,x)}),o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eN(v,x,b,o,150).then(()=>{setTimeout(()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:ez(u)})},300)}))},j=e=>{Math.abs(e.deltaY)>=10&&x<1&&!eF&&!S&&!h&&k&&(o({type:"overlay/dragToggleMinimapPrompt",display:!0}),S=!0),!e.shiftKey||eF||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eF=!0,setTimeout(()=>{C()},50))},A=e=>{if(e.preventDefault(),eB=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}}(eU=eD(e)),4>Math.abs(eM(eU,y)))return;if(!w){let e=ez(u),t=eL(eU,r,1);o({type:"overlay/dragStart",flow:c}),o({type:"overlay/dragUpdateSkeleton",skeleton:t}),o({type:"overlay/dragUpdateGroupRect",groupRect:e}),w=!0,s()}o({type:"overlay/dragUpdateCursorPosition",x:eU.x,y:eU.y}),!e.shiftKey||eF||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eF=!0,setTimeout(()=>{C()},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:eR(r,t,n),right:eR(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:eR(r,t,n),bottom:eR(i,t,n)}}}(eU,u,c);JSON.stringify(g)!==JSON.stringify(t)&&o({type:"overlay/dragUpdateInsertPosition",insertPosition:e$(i,g=t,c)})},_=()=>{k=!1,o({type:"overlay/dragEnd",target:a,insertPosition:g?e$(i,g,c):null,dragGroup:d,flow:c,preventInsertDefault:f}),S&&o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eF||(clearInterval(E),l(),I(),P()),R()},T=e=>{"Shift"===e.key&&eF&&(eF=!1,o({type:"overlay/dragUpdateSkeleton",skeleton:eL(eU,r,1/x)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eV(eB.y,v,eH,o,150,eW)},50),o({type:"overlay/dragUpdateGroupRect",groupRect:null}),k||(clearInterval(E),R(),I(),P(),l()))},M=()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eV(eB.y,v,eH,o,150,eW).then(()=>{eF=!1})},50),clearInterval(E),R(),I(),P(),l()},R=()=>{window.removeEventListener("mousemove",A),window.removeEventListener("wheel",j),window.removeEventListener("mouseup",_)},P=()=>{window.removeEventListener("keyup",T)},I=()=>{window.removeEventListener("blur",M)};window.addEventListener("blur",M),window.addEventListener("keyup",T),window.addEventListener("wheel",j),window.addEventListener("mousemove",A),window.addEventListener("mouseup",_)}({element:b,handler:e,mouseEvent:t,overlayGroup:a,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]")||(m.push(b),e({type:"element/mouseenter",id:E,rect:eA(b)}),w(b))},mouseleave(n){function r(){m.pop();let t=g();if(e({type:"element/mouseleave",id:E}),t){w(t);let n=s.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:eA(t)})}S(b)}let{relatedTarget:i}=n,o=eY(i),a=t.contains(o);if(eG(o)&&a)return function e(t){let n=i=>{let{relatedTarget:o}=i;eY(o)?o&&eG(o)&&(t.removeEventListener("mouseleave",n),e(o)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(o);r()}},E=ej(),C={type:c,id:E,elements:d,sanity:f,handlers:k};l.add(b),u.set(x,b),a.set(E,b),s.set(b,C),h?.observe(b),e({type:"element/register",elementType:c,id:E,element:b,rect:eA(b),sanity:f,dragDisabled:!!b.getAttribute("data-sanity-drag-disable"),targets:y.map(e=>({sanity:e.sanity,element:e.elements.element}))}),o&&v(C)}(d)}}function E(t){let n=s.get(t);if(n){let{id:r,handlers:i}=n;y(t,i),d.unobserve(t),s.delete(t),l.delete(t),a.delete(r),e({type:"element/unregister",id:r})}}function C(t){let n=s.get(t);n&&e({type:"element/updateRect",id:n.id,rect:eA(t)})}function j(e){if(o)for(let t of e){let{target:e}=t,n=eG(e)&&s.get(e);n&&(t.isIntersecting?v(n):x(n))}}function A(t){let n=eY(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}m=[],e({type:"overlay/blur"})}function _(){m=[],e({type:"overlay/reset-mouse-state"})}function T(){for(let e of l)C(e)}function M(t){"Escape"===t.key&&(m=[],e({type:"overlay/blur"}))}function R(e){let{target:t}=e;if(!(t===window.document||!eG(t)))for(let e of l)t.contains(e)&&C(e)}function P(){o||(h=new IntersectionObserver(j,{threshold:.3}
226),l.forEach(e=>h.observe(e)),e({type:"overlay/activate"}),o=!0)}function I(){o&&(h?.disconnect(),l.forEach(e=>{let t=s.get(e);t&&x(t)}),e({type:"overlay/deactivate"}),o=!1)}function O(t){let{id:n}=t.detail,r=a.get(n);if(!r)return;let i=s.get(r)?.sanity;i&&e({type:"element/click",id:n,sanity:i})}return window.document.fonts.ready.then(()=>{for(let e of l)C(e)}),window.addEventListener("click",A),window.addEventListener("contextmenu",A),window.addEventListener("sanity-overlay/exclusive-plugin-closed",_),window.addEventListener("sanity-overlay/label-click",O),window.addEventListener("keydown",M),window.addEventListener("resize",T),window.addEventListener("scroll",R,{capture:!0,passive:!0}),d=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(eG(e)){let t=u.get(e);if(!t)return;C(t)}}}),(f=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,eG(o))){let e=o.parentElement?.closest("[data-sanity-edit-group]")||null;k({childNodes:[eG(e)?e:o]})}}if(n)for(let e of l)e.isConnected||E(e),s.get(e)?.type!=="group"||e.hasAttribute("data-sanity-edit-group")||E(e)})).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),k(document.body),P(),{activate:P,deactivate:I,destroy:function(){window.removeEventListener("click",A),window.removeEventListener("contextmenu",A),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",_),window.removeEventListener("sanity-overlay/label-click",O),window.removeEventListener("keydown",M),window.removeEventListener("resize",T),window.removeEventListener("scroll",R),f.disconnect(),d.disconnect(),l.forEach(e=>{E(e)}),a.clear(),l.clear(),m=[],I()}}}({handler:t,overlayElement:e,inFrame:n,inPopUp:r,optimisticActorReady:l}),()=>{s.current?.destroy(),s.current=void 0}},o=[e,t,n,r,l],a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=l,a[5]=i,a[6]=o):(i=a[5],o=a[6]),(0,y.useEffect)(i,o),s}(d,t,s,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,y.useEffect)(n,r),null},sT=e=>{let t,n,r,i,o,a,s,l,u,c,d,h,f,g,v,b,w,S,k,E,C,j,A,_,T;let M=(0,m.c)(76),{comlink:R,comlinkStatus:P,componentResolver:I,inFrame:O,inPopUp:$,zIndex:D}=e,L=(0,x.Bj)();M[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},M[0]=t):t=M[0];let[z,V]=(0,y.useReducer)(sc,t),{contextMenu:F,dragInsertPosition:B,dragShowMinimap:U,dragShowMinimapPrompt:H,dragSkeleton:W,elements:G,isDragging:Y,perspective:q,wasMaybeCollapsed:Z,dragMinimapTransition:K,dragGroupRect:Q}=z,[J,ee]=(0,y.useState)(null),[et,en]=(0,y.useState)(!0);M[1]!==R?(n=()=>{let e=[R?.on("presentation/focus",e=>{V({type:"presentation/focus",data:e})}),R?.on("presentation/blur",e=>{V({type:"presentation/blur",data:e})}),R?.on("presentation/toggle-overlay",()=>{en(sI)})].filter(Boolean);return()=>e.forEach(sO)},r=[R],M[1]=R,M[2]=n,M[3]=r):(n=M[2],r=M[3]),(0,y.useEffect)(n,r),function(e,t){let n,r;let i=(0,m.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(sw);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,y.useEffect)(n,r)}(R,V),function(e,t,n){let r,i,o;let a=(0,m.c)(7),s=(0,y.useRef)(void 0);a[0]!==e?(r=(t,n)=>{e?.post("visual-editing/documents",{documents:t,perspective:n})},a[0]=e,a[1]=r):r=a[1];let l=r;a[2]!==t||a[3]!==n||a[4]!==l?(i=()=>{let e=t.map(sE).filter(sk),r=new Set(e.map(sS));if(!s.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,s.current.nodeIds)||n!==s.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}});s.current={nodeIds:r,perspective:n},l(t,n)}},o=[t,n,l],a[2]=t,a[3]=n,a[4]=l,a[5]=i,a[6]=o):(i=a[5],o=a[6]),(0,y.useEffect)(i,o)}(R,G,q),M[4]!==J?(i=(e,t)=>{J&&(J.style.setProperty("--drag-preview-x",`${e}px`),J.style.setProperty("--drag-preview-y",`${t-window.scrollY}px`))},M[4]=J,M[5]=i):i=M[5];let er=i;M[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=e=>{sR(e)&&en(sD)},t=e=>
226{sR(e)&&en(sL),["mod","\\"].every(t=>sM[t]?e[sM[t]]:e.key===t.toUpperCase())&&en(sN)};return window.addEventListener("click",s$),window.addEventListener("keydown",t),window.addEventListener("keyup",e),()=>{window.removeEventListener("click",s$),window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}},a=[en],M[6]=o,M[7]=a):(o=M[6],a=M[7]),(0,y.useEffect)(o,a);let[ei,eo]=(0,y.useState)(!1),[ea,es]=(0,y.useState)(!1),el=(0,y.useRef)(void 0);M[8]!==et?(s=()=>{if(et)return sj(()=>{eo(!0),sj(()=>{es(!0),el.current=setTimeout(()=>{es(!1),eo(!1)},1500)})});el.current&&(clearTimeout(el.current),eo(!1),es(!1))},l=[et],M[8]=et,M[9]=s,M[10]=l):(s=M[9],l=M[10]),(0,y.useEffect)(s,l),M[11]!==G?(c=G.flatMap(sz),M[11]=G,M[12]=c):c=M[12],u=c,M[13]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{V({type:"overlay/blur"})},M[13]=d):d=M[13];let eu=d,ec=X()!==N;h=ec?I:void 0;e:{let t;if((O||$)&&"connected"!==P||Y){let e;M[14]===Symbol.for("react.memo_cache_sentinel")?(e=[],M[14]=e):e=M[14],f=e;break e}M[15]!==R||M[16]!==h||M[17]!==K||M[18]!==U||M[19]!==G||M[20]!==O||M[21]!==Y||M[22]!==ec||M[23]!==e.plugins||M[24]!==Z?(t=G.filter(sV).map(t=>{let{id:n,element:r,focused:i,hovered:o,rect:a,sanity:s,dragDisabled:l,targets:u,elementType:c}=t,d=!l&&!!r.getAttribute("data-sanity")&&ec&&G.some(e=>"id"in e.sanity&&"id"in s&&e3(e.sanity,s)&&e.sanity.path!==s.path);return(0,p.jsx)(a1,{comlink:R,componentResolver:h,plugins:e.plugins,element:r,enableScrollIntoView:!Y&&!K&&!U,id:n,focused:i,hovered:o,node:s,rect:a,showActions:!O,draggable:d,isDragging:Y||K,wasMaybeCollapsed:i&&Z,targets:u,elementType:c},n)}),M[15]=R,M[16]=h,M[17]=K,M[18]=U,M[19]=G,M[20]=O,M[21]=Y,M[22]=ec,M[23]=e.plugins,M[24]=Z,M[25]=t):t=M[25],f=t}let ed=f,eh=L?"dark":"light",ef=ea?"":void 0,ep=ei?"":void 0;return M[26]!==u||M[27]!==q?(g=(0,p.jsx)(sA,{documentIds:u,perspective:q}),M[26]=u,M[27]=q,M[28]=g):g=M[28],M[29]!==R||M[30]!==O||M[31]!==$||M[32]!==et||M[33]!==J||M[34]!==er?(v=(0,p.jsx)(s_,{comlink:R,dispatch:V,inFrame:O,inPopUp:$,onDrag:er,overlayEnabled:et,rootElement:J}),M[29]=R,M[30]=O,M[31]=$,M[32]=et,M[33]=J,M[34]=er,M[35]=v):v=M[35],M[36]!==F?(b=F&&(0,p.jsx)(aU,{...F,onDismiss:eu}),M[36]=F,M[37]=b):b=M[37],M[38]!==Q||M[39]!==B||M[40]!==K||M[41]!==H||M[42]!==Y?(w=Y&&!K&&(0,p.jsxs)(p.Fragment,{children:[B&&(0,p.jsx)(sn,{dragInsertPosition:B}),H&&(0,p.jsx)(sl,{}),Q&&(0,p.jsx)(st,{dragGroupRect:Q})]}),M[38]=Q,M[39]=B,M[40]=K,M[41]=H,M[42]=Y,M[43]=w):w=M[43],M[44]!==W||M[45]!==Y?(S=Y&&W&&(0,p.jsx)(si,{skeleton:W}),M[44]=W,M[45]=Y,M[46]=S):S=M[46],M[47]!==ed||M[48]!==ef||M[49]!==ep||M[50]!==g||M[51]!==v||M[52]!==b||M[53]!==w||M[54]!==S||M[55]!==D?(k=(0,p.jsxs)(sC,{"data-fading-out":ef,"data-overlays":ep,ref:ee,$zIndex:D,children:[g,v,b,ed,w,S]}),M[47]=ed,M[48]=ef,M[49]=ep,M[50]=g,M[51]=v,M[52]=b,M[53]=w,M[54]=S,M[55]=D,M[56]=k):k=M[56],M[57]!==R||M[58]!==k?(E=(0,p.jsx)(sy,{comlink:R,children:k}),M[57]=R,M[58]=k,M[59]=E):E=M[59],M[60]!==R||M[61]!==E?(C=(0,p.jsx)(sd,{comlink:R,children:E}),M[60]=R,M[61]=E,M[62]=C):C=M[62],M[63]!==R||M[64]!==G||M[65]!==C?(j=(0,p.jsx)(sp,{comlink:R,elements:G,children:C}),M[63]=R,M[64]=G,M[65]=C,M[66]=j):j=M[66],M[67]!==J||M[68]!==j?(A=(0,p.jsx)(x.li,{children:(0,p.jsx)(x.Xp,{element:J,children:j})}),M[67]=J,M[68]=j,M[69]=A):A=M[69],M[70]!==eh||M[71]!==A?(_=(0,p.jsx)(x.f6,{scheme:eh,theme:x.Lg,tone:"transparent",children:A}),M[70]=eh,M[71]=A,M[72]=_):_=M[72],M[73]!==R||M[74]!==_?(T=(0,p.jsx)(sx,{comlink:R,children:_}),M[73]=R,M[74]=_,M[75]=T):T=M[75],T},sM={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function sR(e){return"Alt"===e.key}function sP(e,t){return e.filter(e=>e!==t)}function sI(e){return!e}function sO(e){return e()}function s$(e){let t=e.target;if(((0,x.bg)(t)||(0,x.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 sD(e){return!e}function sL(e){return!e}function sN(e){return!e}function sz(e){return"id"in e.sanity?[e.sanity.id]:[]}function sV(e){return e.activated||e.focused}let sF=e=>{let t,n;let r=(0,m.c)(4),{comlink:i,refresh:o}=e,a=(0,y.useRef)(0),s=(0,y.useRef)(0);return r[0]!==i||r[1]!==o?(t=()=>i.on("presentation/refresh",e=>{if("manual"===e.source){clearTimeout(a.current);
226let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e);let n=!1;a.current=window.setTimeout(()=>{i.post("visual-editing/refreshed",e),n=!0},3e3),t?.finally?.(()=>{n||(clearTimeout(a.current),i.post("visual-editing/refreshed",e))})}else if("mutation"===e.source){clearTimeout(s.current);let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e),s.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,y.useEffect)(t,n),null};function sB(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 sU(){console.warn("[@sanity/visual-editing] Package version mismatch detected: Please update your Sanity studio to prevent potential compatibility issues.")}function sH(){}let sW=e=>{let t,n,r,i,o,a,s,l;let u=(0,m.c)(23),{components:c,plugins:d,history:h,portal:f,refresh:b,zIndex:x}=e,w=void 0===f||f,[S,k]=(0,y.useState)(null),[E,C]=(0,y.useState)(null);u[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{k((0,g.el)()),C((0,g.Ax)())},n=[],u[0]=t,u[1]=n):(t=u[0],n=u[1]),(0,y.useEffect)(t,n);let[j,A]=(0,y.useState)(null);u[2]!==w?(r=()=>{if(!1===w)return;let e=document.createElement("sanity-visual-editing");return document.documentElement.appendChild(e),A(e),()=>{A(null),document.documentElement.contains(e)&&document.documentElement.removeChild(e)}},i=[w],u[2]=w,u[3]=r,u[4]=i):(r=u[3],i=u[4]),(0,y.useEffect)(r,i);let[_,T]=function(e){let t,n,r,i,o;let a=(0,m.c)(9),s=void 0===e||e,[l,u]=(0,y.useState)(),[c,d]=(0,y.useState)("idle");return a[0]!==s?(t=()=>{if(!s)return;let e=(0,nM.dS)({name:"visual-editing",connectTo:"presentation"},(0,nM.zB)().provide({actors:(0,g.XP)()})),t=e.onStatus(()=>d("connected"),"connected");u(e);let n=e.start();return()=>{t(),n(),u(void 0)}},n=[s],a[0]=s,a[1]=t,a[2]=n):(t=a[1],n=a[2]),(0,y.useEffect)(t,n),a[3]!==c?(r=()=>{if("connected"===c)return;let e=new AbortController;return window.addEventListener("message",sB,{signal:e.signal}),()=>{e.abort()}},i=[c],a[3]=c,a[4]=r,a[5]=i):(r=a[4],i=a[5]),(0,y.useEffect)(r,i),a[6]!==l||a[7]!==c?(o=[l,c],a[6]=l,a[7]=c,a[8]=o):o=a[8],o}(!0===S||!0===E);!function(e){let t,n;let r=(0,m.c)(3);r[0]!==e?(t=()=>{if(!e)return;let t=function(e){let t=new nP.t(1),n=new nI.x;return e.fetch("visual-editing/snapshot-welcome",void 0,{suppressWarnings:!0}).then(e=>{t.next(e.event)}).catch(()=>{}
226),e.on("presentation/snapshot-event",e=>{"reconnect"===e.event.type&&t.next(e.event),"mutation"===e.event.type&&n.next(e.event)}),(0,nO.T)(t,n)}(e),n=a_(e),r=(0,nR.c)(n,{input:{client:{withConfig:sH},sharedListener:t}});r.start();let i=new AbortController;return e.fetch("visual-editing/features",void 0,{signal:i.signal,suppressWarnings:!0}).then(e=>{e.features.optimistic&&function(e){for(let t of(z=e,V))t()}(r)}).catch(sU),()=>{r.stop(),i.abort()}},n=[e],r[0]=e,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,y.useEffect)(t,n)}("connected"===T?_:void 0),u[5]!==_||u[6]!==T||u[7]!==c||u[8]!==S||u[9]!==E||u[10]!==d||u[11]!==x?(o=null!==S&&null!==E&&(0,p.jsx)(sT,{comlink:_,comlinkStatus:T,componentResolver:c,plugins:d,inFrame:S,inPopUp:E,zIndex:x}),u[5]=_,u[6]=T,u[7]=c,u[8]=S,u[9]=E,u[10]=d,u[11]=x,u[12]=o):o=u[12],u[13]!==_||u[14]!==h||u[15]!==b?(a=_&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(aT,{comlink:_,history:h}),(0,p.jsx)(aM,{comlink:_}),b&&(0,p.jsx)(sF,{comlink:_,refresh:b})]}),u[13]=_,u[14]=h,u[15]=b,u[16]=a):a=u[16],u[17]!==o||u[18]!==a?(s=(0,p.jsxs)(p.Fragment,{children:[o,a]}),u[17]=o,u[18]=a,u[19]=s):s=u[19];let M=s;return!1!==w&&j?(u[20]!==M||u[21]!==j?(l=(0,v.createPortal)(M,j),u[20]=M,u[21]=j,u[22]=l):l=u[22],l):M};sW.displayName="VisualEditing";var sG=n(99376);n(83079);var sY=(0,n(12119).$)("3c0f8e73ffbb299868581cd0db07db16ef578872");function sq(e){let t=e.indexOf("#"),n=e.indexOf("?"),r=n>-1&&(t<0||n<t);return r||t>-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}function sX(e,t){if(!function(e,t){if("string"!=typeof e)return!1;let{pathname:n}=sq(e);return n===t||n.startsWith(`${t}/`)}(e,t))return e;let n=e.slice(t.length);return n.startsWith("/")?n:`/${n}`}let sZ=(e,t)=>{let{pathname:n,query:r,hash:i}=sq(e);return t?n.endsWith("/")?`${n}${r}${i}`:`${n}/${r}${i}`:`${n.replace(/\/$/,"")||"/"}${r}${i}`};function sK(e){let{basePath:t="",plugins:n,components:r,refresh:i,trailingSlash:o=!1,zIndex:a}=e,s=(0,sG.useRouter)(),l=(0,y.useRef)(s),[u,c]=(0,y.useState)();(0,y.useEffect)(()=>{l.current=s},[s]);let d=(0,y.useMemo)(()=>({subscribe:e=>(c(()=>e),()=>c(void 0)),update:e=>{switch(e.type){case"push":return l.current.push(sX(e.url,t));case"pop":return l.current.back();case"replace":return l.current.replace(sX(e.url,t));default:throw Error(`Unknown update type: ${e.type}`)}}}),[t]),h=(0,sG.usePathname)(),f=(0,sG.useSearchParams)();(0,y.useEffect)(()=>{u&&u({type:"push",url:sZ(function(e,t){if(!e.startsWith("/")||!t)return e;if("/"===e&&t)return t;let{pathname:n,query:r,hash:i}=sq(e);return`${t}${n}${r}${i}`}(`${h}${f?.size?`?${f}`:""}`,t),o)})},[t,u,h,f,o]);let m=(0,y.useCallback)(e=>{if(i)return i(e);switch(e.source){case"manual":return e.livePreviewEnabled?(console.debug("Live preview is setup, calling router.refresh() to refresh the server components without refetching cached data"),l.current.refresh(),Promise.resolve()):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),sY());case"mutation":return e.livePreviewEnabled?(console.debug("Live preview is setup, mutation is skipped assuming its handled by the live preview"),!1):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),sY());default:throw Error("Unknown refresh source",{cause:e})}},[i]);return(0,p.jsx)(sW,{plugins:n,components:r,history:d,portal:!0,refresh:m,zIndex:a})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.