PageSourceSearch

https://qualloy.com/_next/static/chunks/7005.c0f3a35c3b3c8188.js

js qualloy.com collected 2026-10-06 18:05:42 UTC 429,928 bytes, 362 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7005],{3730:(e,t,n)=>{"use strict";n.d(t,{UE:()=>e_,RK:()=>eC,ll:()=>eS,rD:()=>eM,__:()=>ek,UU:()=>eT,jD:()=>eA,cY:()=>eE,BN:()=>ej});let r=["top","right","bottom","left"],i=r.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),o=Math.min,a=Math.max,s=Math.round,l=Math.floor,u=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function h(e,t){return"function"==typeof e?e(t):e}function f(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function m(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}let y=new Set(["top","bottom"]);function v(e){return y.has(f(e))?"y":"x"}function b(e,t,n){void 0===n&&(n=!1);let r=p(e),i=m(v(e)),o=g(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=C(a)),[a,C(a)]}function x(e){return e.replace(/start|end/g,e=>d[e])}let w=["left","right"],S=["right","left"],k=["top","bottom"],E=["bottom","top"];function C(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function j(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function T(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function A(e,t,n){let r,{reference:i,floating:o}=e,a=v(t),s=m(v(t)),l=g(s),u=f(t),c="y"===a,d=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,y=i[l]/2-o[l]/2;switch(u){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:h};break;case"left":r={x:i.x-o.width,y:h};break;default:r={x:i.x,y:i.y}}switch(p(t)){case"start":r[s]-=y*(n&&c?-1:1);break;case"end":r[s]+=y*(n&&c?-1:1)}return r}let _=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=A(u,r,l),h=r,f={},p=0;for(let n=0;n<s.length;n++){let{name:o,fn:m}=s[n],{x:g,y:y,data:v,reset:b}=await m({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:f,re
1cts:u,platform:a,elements:{reference:e,floating:t}});c=null!=g?g:c,d=null!=y?y:d,f={...f,[o]:{...f[o],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:c,y:d}=A(u,h,l)),n=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:f}};async function M(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=h(t,e),m=j(p),g=s[f?"floating"===d?"reference":"floating":d],y=T(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v="floating"===d?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,b=await (null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),x=await (null==o.isElement?void 0:o.isElement(b))&&await (null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},w=T(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-w.top+m.top)/x.y,bottom:(w.bottom-y.bottom+m.bottom)/x.y,left:(y.left-w.left+m.left)/x.x,right:(w.right-y.right+m.right)/x.x}}function P(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function R(e){return r.some(t=>e[t]>=0)}let I=new Set(["left","top"]);async function O(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=f(n),s=p(n),l="y"===v(n),u=I.has(a)?-1:1,c=o&&l?-1:1,d=h(t,e),{mainAxis:m,crossAxis:g,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof y&&(g="end"===s?-1*y:y),l?{x:g*c,y:m*u}:{x:m*u,y:g*c}}function $(){return"undefined"!=typeof window}function D(e){return z(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function N(e){var t;return null==(t=(z(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function z(e){return!!$()&&(e instanceof Node||e instanceof L(e).Node)}function V(e){return!!$()&&(e instanceof Element||e instanceof L(e).Element)}function F(e){return!!$()&&(e instanceof HTMLElement||e instanceof L(e).HTMLElement)}function B(e){return!!$()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}let U=new Set(["inline","contents"]);function H(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=et(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!U.has(i)}let W=new Set(["table","td","th"]),Y=[":popover-open",":modal"];function G(e){return Y.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let q=["transform","translate","scale","rotate","perspective"],X=["transform","translate","scale","rotate","perspective","filter"],K=["paint","layout","strict","content"];function Z(e){let t=J(),n=V(e)?et(e):e;return q.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||X.some(e=>(n.willChange||"").includes(e))||K.some(e=>(n.contain||"").includes(e))}function J(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let Q=new Set(["html","body","#document"]);function ee(e){return Q.has(D(e))}function et(e){return L(e).getComputedStyle(e)}function en(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if("html"===D(e))return e;let t=e.assignedSlot||e.parentNode||B(e)&&e.host||N(e);return B(t)?t.host:t}function ei(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=er(t);return ee(n)?t.ownerDocument?t.ownerDocument.body:t.body:F(n)&&H(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=L(i);if(o){let e=eo(a);
1return t.concat(a,a.visualViewport||[],H(i)?i:[],e&&n?ei(e):[])}return t.concat(i,ei(i,[],n))}function eo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ea(e){let t=et(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=F(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=s(n)!==o||s(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function es(e){return V(e)?e:e.contextElement}function el(e){let t=es(e);if(!F(t))return u(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ea(t),a=(o?s(n.width):n.width)/r,l=(o?s(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}let eu=u(0);function ec(e){let t=L(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eu}function ed(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),a=es(e),s=u(1);t&&(r?V(r)&&(s=el(r)):s=el(e));let l=(void 0===(i=n)&&(i=!1),r&&(!i||r===L(a))&&i)?ec(a):u(0),c=(o.left+l.x)/s.x,d=(o.top+l.y)/s.y,h=o.width/s.x,f=o.height/s.y;if(a){let e=L(a),t=r&&V(r)?L(r):r,n=e,i=eo(n);for(;i&&r&&t!==n;){let e=el(i),t=i.getBoundingClientRect(),r=et(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,d*=e.y,h*=e.x,f*=e.y,c+=o,d+=a,i=eo(n=L(i))}}return T({width:h,height:f,x:c,y:d})}function eh(e,t){let n=en(e).scrollLeft;return t?t.left+n:ed(N(e)).left+n}function ef(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eh(e,n),y:n.top+t.scrollTop}}let ep=new Set(["absolute","fixed"]);function em(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=L(e),r=N(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=J();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}let u=eh(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else u<=25&&(o+=u);return{width:o,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){let t=N(e),n=en(e),r=e.ownerDocument.body,i=a(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=a(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+eh(e),l=-n.scrollTop;return"rtl"===et(r).direction&&(s+=a(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:l}}(N(e));else if(V(t))r=function(e,t){let n=ed(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=F(e)?el(e):u(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y;return{width:a,height:s,x:i*o.x,y:r*o.y}}(t,n);else{let n=ec(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return T(r)}function eg(e){return"static"===et(e).position}function ey(e,t){if(!F(e)||"fixed"===et(e).position)return null;if(t)return t(e);let n=e.offsetParent;return N(e)===n&&(n=n.ownerDocument.body),n}function ev(e,t){var n;let r=L(e);if(G(e))return r;if(!F(e)){let t=er(e);for(;t&&!ee(t);){if(V(t)&&!eg(t))return t;t=er(t)}return r}let i=ey(e,t);for(;i&&(n=i,W.has(D(n)))&&eg(i);)i=ey(i,t);return i&&ee(i)&&eg(i)&&!Z(i)?r:i||function(e){let t=er(e);for(;F(t)&&!ee(t);){if(Z(t))return t;if(G(t))break;t=er(t)}return null}(e)||r}let eb=async function(e){let t=this.getOffsetParent||ev,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=F(t),i=N(t),o="fixed"===n,a=ed(e,!0,o,t),s={scrollLeft:0,scrollTop:0},l=u(0);if(r||!r&&!o)if(("body"!==D(t)||H(i))&&(s=en(t)),r){let e=ed(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=eh(i));o&&!r&&i&&(l.x=eh(i));let c=!i||r||o?u(0):ef(i,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ex={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,a=N(r),s=!!t&&G(t.floating);if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=u(1),d=u(0),h=F(r);if((h||!h&&!o)&&(("body"!==D(r)||H(a))&&(l=en(r)),F(r))){let e=ed(r);c=el(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let f=!a||h||o?u(0):ef(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}},getDocumentElement:N,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,s=[..."clippingAncestors"===n?G(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=ei(e,[],!1).filter(e=>V(e)&&"body"!==D(e)),i=null,o="fixed"===et(e).position,a=o?er(e):e;for(;V(a)&&!ee(a);){let t=et(a),n=Z(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&!!i&&ep.has(i.position)||H(a)&&!n&&function e(t,n){let r=er(t);return!(r===n||!V(r)||ee(r))&&("fixed"===et(r).position||e(r,n))}(e,a))?r=r.filter(e=>e!==a):i=t,a=er(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=s[0],u=s.reduce((e,n)=>{let r=em(t,n,i);return e.top=a(r.top,e.top),e.right=o(r.right,e.right),e.bottom=o(r.bottom,e.bottom),e.left=a(r.left,e.left),e},em(t,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:ev,getElementRects:eb,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=ea(e);return{width:t,height:n}},getScale:el,isElement:V,isRTL:function(e){return"rtl"===et(e).direction}};function ew(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eS(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:h=!1}=r,f=es(e),p=s||u?[...f?ei(f):[],...ei(t)]:[];
1p.forEach(e=>{s&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let m=f&&d?function(e,t){let n,r=null,i=N(e);function s(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function u(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),s();let h=e.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=h;if(c||t(),!m||!g)return;let y=l(p),v=l(i.clientWidth-(f+m)),b={rootMargin:-y+"px "+-v+"px "+-l(i.clientHeight-(p+g))+"px "+-l(f)+"px",threshold:a(0,o(1,d))||1},x=!0;function w(t){let r=t[0].intersectionRatio;if(r!==d){if(!x)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||ew(h,e.getBoundingClientRect())||u(),x=!1}try{r=new IntersectionObserver(w,{...b,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(w,b)}r.observe(e)}(!0),s}(f,n):null,g=-1,y=null;c&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),f&&!h&&y.observe(f),y.observe(t));let v=h?ed(e):null;return h&&function t(){let r=ed(e);v&&!ew(v,r)&&n(),v=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{s&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,h&&cancelAnimationFrame(i)}}let ek=M,eE=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:o,placement:a,middlewareData:s}=t,l=await O(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},eC=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o,a;let{rects:s,middlewareData:l,placement:u,platform:c,elements:d}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=i,autoAlignment:v=!0,...w}=h(e,t),S=void 0!==g||y===i?((a=g||null)?[...y.filter(e=>p(e)===a),...y.filter(e=>p(e)!==a)]:y.filter(e=>f(e)===e)).filter(e=>!a||p(e)===a||!!v&&x(e)!==e):y,k=await M(t,w),E=(null==(n=l.autoPlacement)?void 0:n.index)||0,C=S[E];if(null==C)return{};let j=b(C,s,await (null==c.isRTL?void 0:c.isRTL(d.floating)));if(u!==C)return{reset:{placement:S[0]}};let T=[k[f(C)],k[j[0]],k[j[1]]],A=[...(null==(r=l.autoPlacement)?void 0:r.overflows)||[],{placement:C,overflows:T}],_=S[E+1];if(_)return{data:{index:E+1,overflows:A},reset:{placement:_}};let P=A.map(e=>{let t=p(e.placement);return[e.placement,t&&m?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),R=(null==(o=P.filter(e=>e[2].slice(0,p(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||P[0][0];return R!==u?{data:{index:E+1,overflows:A},reset:{placement:R}}:{}}}},ej=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=h(e,t),d={x:n,y:r},p=await M(t,c),g=v(f(i)),y=m(g),b=d[y],x=d[g];if(s){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=b+p[e],r=b-p[t];b=a(n,o(b,r))}if(l){let e="y"===g?"top":"left",t="y"===g?"bottom":"right",n=x+p[e],r=x-p[t];x=a(n,o(x,r))}let w=u.fn({...t,[y]:b,[g]:x});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[y]:s,[g]:l}}}}}},eT=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o,a;let{placement:s,middlewareData:l,rects:u,initialPlacement:c,platform:d,elements:m}=t,{mainAxis:g=!0,crossAxis:y=!0,fallbackPlacements:j,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:_=!0,...P}=h(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};let R=f(s),I=v(c),O=f(c)===c,$=await (null==d.isRTL?void 0:d.isRTL(m.floating)),D=j||(O||!_?[C(c)]:function(e){let t=C(e);return[x(e),t,x(t)]}(c)),L="none"!==A;!j&&L&&D.push(...function(e,t,n,r){let i=p(e),o=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?S:w;return t?w:S;case"left":case"right":return t?k:E;default:return[]}}(f(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(x)))),o}(c,_,A,$));let N=[c,...D],z=await M(t,P),V=[],F=(null==(r=l.flip)?void 0:r.overflows)||[];if(g&&V.push(z[R]),y){let e=b(s,u,$);V.push(z[e[0]],z[e[1]])}if(F=[...F,{placement:s,overflows:V}],!V.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=N[e];if(t&&("alignment"!==y||I===v(t)||F.every(e=>v(e.placement)!==I||e.overflows[0]>0)))return{data:{index:e,overflows:F},reset:{placement:t}};let n=null==(o=F.filter(e=>e.overflows[0]<=0).sort((e,t)=>
1e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(T){case"bestFit":{let e=null==(a=F.filter(e=>{if(L){let t=v(e.placement);return t===I||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(n=e);break}case"initialPlacement":n=c}if(s!==n)return{reset:{placement:n}}}return{}}}},eA=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...i}=h(e,t);switch(r){case"referenceHidden":{let e=P(await M(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:R(e)}}}case"escaped":{let e=P(await M(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:R(e)}}}default:return{}}}}},e_=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:i,rects:s,platform:l,elements:u,middlewareData:c}=t,{element:d,padding:f=0}=h(e,t)||{};if(null==d)return{};let y=j(f),b={x:n,y:r},x=m(v(i)),w=g(x),S=await l.getDimensions(d),k="y"===x,E=k?"clientHeight":"clientWidth",C=s.reference[w]+s.reference[x]-b[x]-s.floating[w],T=b[x]-s.reference[x],A=await (null==l.getOffsetParent?void 0:l.getOffsetParent(d)),_=A?A[E]:0;_&&await (null==l.isElement?void 0:l.isElement(A))||(_=u.floating[E]||s.floating[w]);let M=_/2-S[w]/2-1,P=o(y[k?"top":"left"],M),R=o(y[k?"bottom":"right"],M),I=_-S[w]-R,O=_/2-S[w]/2+(C/2-T/2),$=a(P,o(O,I)),D=!c.arrow&&null!=p(i)&&O!==$&&s.reference[w]/2-(O<P?P:R)-S[w]/2<0,L=D?O<P?O-P:O-I:0;return{[x]:b[x]+L,data:{[x]:$,centerOffset:O-$-L,...D&&{alignmentOffset:L}},reset:D}}}),eM=(e,t,n)=>{let r=new Map,i={platform:ex,...n},o={...i.platform,_c:r};return _(e,t,{...i,platform:o})}},7199:(e,t,n)=>{var r=n(36786),i=n(47275),o=n(16382),a=n(48545),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}},7240:(e,t,n)=>{"use strict";n.d(t,{B:()=>r});let r="undefined"!=typeof window},10904:(e,t,n)=>{var r=n(97989),i=n(15318),o=n(87247),a=n(41921);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}}},13231:(e,t,n)=>{e.exports=n(86187)({À:"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"})},14418: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="(?:"+h+"|"+u+")",m="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",g="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",v="[\\ufe0e\\ufe0f]?",b="(?:\\u200d(?:"+["[^"+t+"]",c,d].join("|")+")"+v+y+")*",x="(?:"+["["+n+"]",c,d].join("|")+")"+(v+y+b),w=RegExp([h+"?"+l+"+"+m+"(?="+[s,h,"$"].join("|")+")",p+"+"+g+"(?="+[s,h+f,"$"].join("|")+")",h+"?"+f+"+"+m,h+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",x].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},15318:e=>{var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},16382:e=>{e.exports=Array.isArray},18257:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});let r=(0,n(7620).createContext)({})},18956:(e,t,n)=>{"use strict";e.exports=n(52952)},26106:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var r=n(7620);let i=n(7240).B?r.useLayoutEffect:r.useEffect},27015:(e,t,n)=>{e.exports=n(10904)("toUpperCase")},27523: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}},33560:(e,t,n)=>{"use strict";n.d(t,{tb:()=>W});var r,i,o=[],a="ResizeObserver loop completed with undelivered notifications.",s=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:a}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=a),window.dispatchEvent(e)};!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(r||(r={}));var l=function(e){return Object.freeze(e)},u=function(e,t){this.inlineSize=e,this.blockSize=t,l(this)},c=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,l(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}(),d=function(e){return e instanceof SVGElement&&"getBBox"in e},h=function(e){if(d(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)},f=function(e){if(e instanceof Element)return!0;var t,n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},p=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;
1case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},m="undefined"!=typeof window?window:{},g=new WeakMap,y=/auto|scroll/,v=/^tb|vertical/,b=/msie|trident/i.test(m.navigator&&m.navigator.userAgent),x=function(e){return parseFloat(e||"0")},w=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new u((n?t:e)||0,(n?e:t)||0)},S=l({devicePixelContentBoxSize:w(),borderBoxSize:w(),contentBoxSize:w(),contentRect:new c(0,0,0,0)}),k=function(e,t){if(void 0===t&&(t=!1),g.has(e)&&!t)return g.get(e);if(h(e))return g.set(e,S),S;var n=getComputedStyle(e),r=d(e)&&e.ownerSVGElement&&e.getBBox(),i=!b&&"border-box"===n.boxSizing,o=v.test(n.writingMode||""),a=!r&&y.test(n.overflowY||""),s=!r&&y.test(n.overflowX||""),u=r?0:x(n.paddingTop),f=r?0:x(n.paddingRight),p=r?0:x(n.paddingBottom),m=r?0:x(n.paddingLeft),k=r?0:x(n.borderTopWidth),E=r?0:x(n.borderRightWidth),C=r?0:x(n.borderBottomWidth),j=r?0:x(n.borderLeftWidth),T=m+f,A=u+p,_=j+E,M=k+C,P=s?e.offsetHeight-M-e.clientHeight:0,R=a?e.offsetWidth-_-e.clientWidth:0,I=r?r.width:x(n.width)-(i?T+_:0)-R,O=r?r.height:x(n.height)-(i?A+M:0)-P,$=I+T+R+_,D=O+A+P+M,L=l({devicePixelContentBoxSize:w(Math.round(I*devicePixelRatio),Math.round(O*devicePixelRatio),o),borderBoxSize:w($,D,o),contentBoxSize:w(I,O,o),contentRect:new c(m,u,I,O)});return g.set(e,L),L},E=function(e,t,n){var i=k(e,n),o=i.borderBoxSize,a=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(t){case r.DEVICE_PIXEL_CONTENT_BOX:return s;case r.BORDER_BOX:return o;default:return a}},C=function(e){var t=k(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=l([t.borderBoxSize]),this.contentBoxSize=l([t.contentBoxSize]),this.devicePixelContentBoxSize=l([t.devicePixelContentBoxSize])},j=function(e){if(h(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},T=function(){var e=1/0,t=[];o.forEach(function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach(function(t){var n=new C(t.target),i=j(t.target);r.push(n),t.lastReportedSize=E(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},A=function(e){o.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(j(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},_=function(){var e=0;for(A(0);o.some(function(e){return e.activeTargets.length>0});)A(e=T());return o.some(function(e){return e.skippedTargets.length>0})&&s(),e>0},M=[],P=function(e){if(!i){var t=0,n=document.createTextNode("");new MutationObserver(function(){return M.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),i=function(){n.textContent="".concat(t?t--:t++)}}M.push(e),i()},R=function(e){P(function(){requestAnimationFrame(e)})},I=0,O={attributes:!0,characterData:!0,childList:!0,subtree:!0},$=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],D=function(e){return void 0===e&&(e=0),Date.now()+e},L=!1,N=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!L){L=!0;var n=D(e);R(function(){var r=!1;try{r=_()}finally{if(L=!1,e=n-D(),!I)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,O)};document.body?t():m.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),$.forEach(function(t){return m.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),$.forEach(function(t){return m.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),z=function(e){!I&&e>0&&N.start(),(I+=e)||N.stop()},V=function(){function e(e,t){this.target=e,this.observedBox=t||r.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=E(this.target,this.observedBox,!0);return d(e=this.target)||p(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),F=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},B=new WeakMap,U=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return -1},H=function(){function e(){}return e.connect=function(e,t){var n=new F(e,t);B.set(e,n)},e.observe=function(e,t,n){var r=B.get(e),i=0===r.observationTargets.length;0>U(r.observationTargets,t)&&(i&&o.push(r),r.observationTargets.push(new V(t,n&&n.box)),z(1),N.schedule())},e.unobserve=function(e,t){var n=B.get(e),r=U(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&o.splice(o.indexOf(n),1),n.observationTargets.splice(r,1),z(-1))},e.disconnect=function(e){var t=this,n=B.get(e);
1n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),W=function(){function e(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");H.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(!f(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");H.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(!f(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");H.unobserve(this,e)},e.prototype.disconnect=function(){H.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()},36786:(e,t,n)=>{e.exports=n(38126).Symbol},38126:(e,t,n)=>{var r=n(58379),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=r||i||Function("return this")()},38615:(e,t,n)=>{var r=n(13231),i=n(41921),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,"")}},39913:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},41921:(e,t,n)=>{var r=n(7199);e.exports=function(e){return null==e?"":r(e)}},43561:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},45860:(e,t,n)=>{var r=n(36786),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}},46392:(e,t,n)=>{"use strict";n.d(t,{me:()=>ed,sR:()=>ef,JW:()=>g});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={transparent:{lightest:"hsl(240, 100%, 95%)",lighter:"hsl(240, 100%, 70%)",light:"hsl(240, 100%, 65%)",base
1:"hsl(240, 100%, 50%)",dark:"hsl(240, 100%, 35%)",darker:"hsl(240, 100%, 20%)",darkest:"hsl(240, 100%, 5%)"},primary:{lightest:"hsl(240, 100%, 95%)",lighter:"hsl(240, 100%, 70%)",light:"hsl(240, 100%, 65%)",base:"hsl(240, 100%, 50%)",dark:"hsl(240, 100%, 35%)",darker:"hsl(240, 100%, 20%)",darkest:"hsl(240, 100%, 5%)"},positive:{lightest:"hsl(120, 100%, 95%)",lighter:"hsl(120, 100%, 70%)",light:"hsl(120, 100%, 65%)",base:"hsl(120, 100%, 50%)",dark:"hsl(120, 100%, 35%)",darker:"hsl(120, 100%, 20%)",darkest:"hsl(120, 100%, 5%)"},caution:{lightest:"hsl(60, 100%, 95%)",lighter:"hsl(60, 100%, 70%)",light:"hsl(60, 100%, 65%)",base:"hsl(60, 100%, 50%)",dark:"hsl(60, 100%, 35%)",darker:"hsl(60, 100%, 20%)",darkest:"hsl(60, 100%, 5%)"},critical:{lightest:"hsl(0, 100%, 95%)",lighter:"hsl(0, 100%, 70%)",light:"hsl(0, 100%, 65%)",base:"hsl(0, 100%, 50%)",dark:"hsl(0, 100%, 35%)",darker:"hsl(0, 100%, 20%)",darkest:"hsl(0, 100%, 5%)"}};a.transparent.darkest,a.transparent.lightest,a.transparent.lightest,a.transparent.darkest,a.transparent.darker,a.transparent.lighter,a.transparent.base,a.transparent.base,a.primary.darkest,a.primary.lightest,a.primary.lightest,a.primary.darkest,a.primary.darker,a.primary.lighter,a.primary.base,a.primary.base,a.positive.darkest,a.positive.lightest,a.positive.lightest,a.positive.darkest,a.positive.darker,a.positive.lighter,a.positive.base,a.positive.base,a.caution.darkest,a.caution.lightest,a.caution.lightest,a.caution.darkest,a.caution.darker,a.caution.lighter,a.caution.base,a.caution.base,a.critical.darkest,a.critical.lightest,a.critical.lightest,a.critical.darkest,a.critical.darker,a.critical.lighter,a.critical.base,a.critical.base;let s={avatar:{sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},button:{textWeight:"medium",border:{width:1},focusRing:{offset:-1,width:1}},card:{border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},container:[320,640,960,1280,1600,1920],media:[360,600,900,1200,1800,2400],layer:{dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},radius:[0,1,3,6,9,12,21],shadow:[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-2],penumbra:[0,6,10,0],ambient:[0,1,18,1]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:[0,4,8,12,20,32,52,84,136,220],input:{border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}},radio:{size:17,markSize:9,focusRing:{offset:-1,width:1}},switch:{width:25,height:17,padding:5,transitionDurationMs:150,transitionTimingFunction:"ease-out",focusRing:{offset:1,width:1}},select:{focusRing:{offset:-1,width:1}},text:{focusRing:{offset:-1,width:1}}},style:{button:{root:{transition:"background-color 100ms,border-color 100ms,color 100ms"}}}},l={code:{family:"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:19,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:22,iconSize:33,lineHeight:31,letterSpacing:0}]},heading:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:700,medium:800,semibold:900,bold:900},sizes:[{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:17,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:21,iconSize:33,lineHeight:29,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:27,iconSize:41,lineHeight:35,letterSpacing:0},{ascenderHeight:9.5,descenderHeight:8.5,fontSize:33,iconSize:49,lineHeight:41,letterSpacing:0},{ascenderHeight:10.5,descenderHeight:9.5,fontSize:38,iconSize:53,lineHeight:47,letterSpacing:0}]},label:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", system-ui, sans-serif',weights:{regular:600,medium:700,semibold:800,bold:900},sizes:[{ascenderHeight:2,descenderHeight:2,fontSize:8.1,iconSize:13,lineHeight:10,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:9.5,iconSize:15,lineHeight:11,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:10.8,iconSize:17,lineHeight:12,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:12.25,iconSize:19,lineHeight:13,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:13.6,iconSize:21,lineHeight:14,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:15,iconSize:23,lineHeight:15,letterSpacing:.5}]},text:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:15,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:18,iconSize:29,lineHeight:27,letterSpacing:0}
1,{ascenderHeight:8,descenderHeight:8,fontSize:21,iconSize:33,lineHeight:31,letterSpacing:0}]}},u=new WeakMap;function c(e){let t=u.get(e);if(t)return t;let n=h(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:d(e,e.button.default),ghost:d(e,e.button.ghost),bleed:d(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:f(e.input.default),invalid:f(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:d(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 u.set(e,r),r}function d(e,t){return{default:{enabled:h(e,t.default.enabled),hovered:h(e,t.default.hovered),pressed:h(e,t.default.pressed),selected:h(e,t.default.selected),disabled:h(e,t.default.disabled)},neutral:{enabled:h(e,t.default.enabled),hovered:h(e,t.default.hovered),pressed:h(e,t.default.pressed),selected:h(e,t.default.selected),disabled:h(e,t.default.disabled)},primary:{enabled:h(e,t.primary.enabled),hovered:h(e,t.primary.hovered),pressed:h(e,t.primary.pressed),selected:h(e,t.primary.selected),disabled:h(e,t.primary.disabled)},suggest:{enabled:h(e,t.primary.enabled),hovered:h(e,t.primary.hovered),pressed:h(e,t.primary.pressed),selected:h(e,t.primary.selected),disabled:h(e,t.primary.disabled)},positive:{enabled:h(e,t.positive.enabled),hovered:h(e,t.positive.hovered),pressed:h(e,t.positive.pressed),selected:h(e,t.positive.selected),disabled:h(e,t.positive.disabled)},caution:{enabled:h(e,t.caution.enabled),hovered:h(e,t.caution.hovered),pressed:h(e,t.caution.pressed),selected:h(e,t.caution.selected),disabled:h(e,t.caution.disabled)},critical:{enabled:h(e,t.critical.enabled),hovered:h(e,t.critical.hovered),pressed:h(e,t.critical.pressed),selected:h(e,t.critical.selected),disabled:h(e,t.critical.disabled)}}}function h(e,t){return{...t,avatar:{gray:{bg:e.spot.gray,fg:e.base.bg},blue:{bg:e.spot.blue,fg:e.base.bg},purple:{bg:e.spot.purple,fg:e.base.bg},magenta:{bg:e.spot.magenta,fg:e.base.bg},red:{bg:e.spot.red,fg:e.base.bg},orange:{bg:e.spot.orange,fg:e.base.bg},yellow:{bg:e.spot.yellow,fg:e.base.bg},green:{bg:e.spot.green,fg:e.base.bg},cyan:{bg:e.spot.cyan,fg:e.base.bg}},badge:{default:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,dot:e.muted.default.enabled.muted.fg,icon:e.muted.default.enabled.muted.fg},neutral:{bg:e.muted.transparent.enabled.bg,fg:e.muted.transparent.enabled.fg,dot:e.muted.transparent.enabled.muted.fg,icon:e.muted.transparent.enabled.muted.fg},primary:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},suggest:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},positive:{bg:e.muted.positive.enabled.bg,fg:e.muted.positive.enabled.fg,dot:e.muted.positive.enabled.muted.fg,icon:e.muted.positive.enabled.muted.fg},caution:{bg:e.muted.caution.enabled.bg,fg:e.muted.caution.enabled.fg,dot:e.muted.caution.enabled.muted.fg,icon:e.muted.caution.enabled.muted.fg},critical:{bg:e.muted.critical.enabled.bg,fg:e.muted.critical.enabled.fg,dot:e.muted.critical.enabled.muted.fg,icon:e.muted.critical.enabled.muted.fg}},kbd:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,border:e.muted.default.enabled.border},muted:{...e.muted.default.enabled.muted,bg:t.bg2||t.bg},skeleton:{from:t.skeleton?.from||t.border,to:t.skeleton?.to||t.border}}}function f(e){return{enabled:p(e.enabled),disabled:p(e.disabled),readOnly:p(e.readOnly),hovered:p(e.hovered)}}function p(e){return{bg:e.bg,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let m=new WeakMap;function g(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=m.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...s.avatar,...e.sanity.avatar},button:{...s.button,...e.sanity.button},card:s.card,color:c(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...s.input,...e.sanity.input,checkbox:{...s.input.checkbox,...e.sanity.input.checkbox},radio:{...s.input.radio,...e.sanity.input.radio},switch:{...s.input.switch,...e.sanity.input.switch}},layer:e.sanity.layer??s.layer,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return m.set(e,n),n}function y(e){return 2===e._version}let v=new WeakMap,b=new WeakMap;function x(e){let t=b.get(e);if(t)return t;
1let{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:w(i.light.transparent),default:w(i.light.default),primary:w(i.light.primary),positive:w(i.light.positive),caution:w(i.light.caution),critical:w(i.light.critical)},dark:{transparent:w(i.dark.transparent),default:w(i.dark.default),primary:w(i.dark.primary),positive:w(i.dark.positive),caution:w(i.dark.caution),critical:w(i.dark.critical)}},focusRing:s.text.focusRing,fonts:a,input:s,media:l,radius:u,shadows:c,space:d,styles:h,v2:e}}function w(e){return{base:{bg:e.bg,fg:e.fg,border:e.border,focusRing:e.focusRing,shadow:e.shadow},button:e.button,card:e.selectable.default,dark:e._dark,input:{default:S(e.input.default),invalid:S(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 S(e){return{enabled:k(e.enabled),disabled:k(e.disabled),readOnly:k(e.readOnly),hovered:k(e.hovered)}}function k(e){return{bg:e.bg,bg2:e.muted.bg,border:e.border,fg:e.fg,placeholder:e.placeholder}}let E=["multiply","screen"],C=["transparent","default","neutral","primary","suggest","positive","caution","critical"],j=["default","neutral","primary","suggest","positive","caution","critical"],T=["enabled","hovered","pressed","selected","disabled"],A=["default","ghost","bleed"],_=["default","invali
1d"],M=["enabled","hovered","readOnly","disabled"];function P(e){return i.includes(e)}function R(e){return/^\d+%$/.test(e)}function I(e){var t;let n=e.split("/"),i=n.shift()||"",[o,a]=i.split(" ");if(P(o)){let e=n.shift()||"";return R(a)?{type:"color",tint:o,mix:Number(a.slice(0,-1))/100}:O(e)?{type:"color",tint:o,opacity:Number(e)}:{type:"color",tint:o}}if("black"===(t=o)||"white"===t){let e=n.shift()||"";return R(a)?{type:"color",key:o,mix:Number(a.slice(0,-1))/100}:O(e)?{type:"color",key:o,opacity:Number(e)}:{type:"color",key:o}}if(r.includes(o)){let[e,t]=(i=n.shift()||"").split(" ");if(P(e)){let r=n.shift()||"";return R(t)?{type:"color",hue:o,tint:e,mix:Number(t.slice(0,-1))/100}:O(r)?{type:"color",hue:o,tint:e,opacity:Number(r)}:{type:"color",hue:o,tint:e}}return{type:"hue",value:o}}if(E.includes(o))return{type:"blendMode",value:o}}function O(e){return"0"===e||/^0\.[0-9]+$/.test(e)||"1"===e}[...r],[...C],[...j],[...T],[..._],[...M];let $=["500","500"];function D(e,t=$){var n;let r,{hue:i,scheme:o}=e,a=I(t[+("light"!==o)]);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 L={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 N(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}function z(...e){let t=e.filter(Boolean);return 0===t.length?{}:t.reduce(V,{})}function V(e,t){for(let n of Object.keys(t)){let r=e[n],i=t[n];N(r)&&N(i)?e[n]=z(r,i):e[n]=i}return e}function F(e,t){let{scheme:n}=e,r={};for(let e of C)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)],_dark:"dark"===n,accent:{fg:D(o,i?.accent?.fg)},avatar:B({scheme:n},i),backdrop:D(o,i?.backdrop),badge:H(i?.badge,{scheme:n},t),bg:D(o,i?.bg),border:D(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 j)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:i,tone:o}=e,a={};for(let e of T)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)],accent:{fg:D(d,l?.accent?.fg)},avatar:B({scheme:o},l),badge:H(l?.badge,{scheme:o},t),bg:D(d,l?.bg),border:D(d,l?.border),code:{bg:D(d,l?.code?.bg),fg:D(d,l?.code?.fg)},fg:D(d,l?.fg),icon:D(d,l?.icon),muted:{bg:D(d,l?.muted?.bg),fg:D(d,l?.muted?.fg)},kbd:{bg:D(d,l?.kbd?.bg),fg:D(d,l?.kbd?.fg),border:D(d,l?.kbd?.border)},link:{fg:D(d,l?.link?.fg)},skeleton:{from:D(d,l?.skeleton?.from),to:D(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:D(o,i?.code?.bg),fg:D(o,i?.code?.fg)},fg:D(o,i?.fg),focusRing:D(o,i?.focusRing),icon:D(o,i?.icon),input:function(e,t){let{scheme:n,tone:r}=e;return{default:W({mode:"default",scheme:n,tone:r},t),invalid:W({mode:"invalid",scheme:n,tone:r},t)}}({scheme:n,tone:r},t),kbd:{bg:D(o,i?.kbd?.bg),fg:D(o,i?.kbd?.fg),border:D(o,i?.kbd?.border)},link:{fg:D(o,i?.link?.fg)},muted:{bg:D(o,i?.muted?.bg),fg:D(o,i?.muted?.fg)},selectable:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of j)i[e]=function(e,t){let{cardTone:n,scheme:r,tone:i}=e,o={};for(let e of T)o[e]=function(e,t){let{cardTone:n,scheme:r,state:i,tone:o}=e,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)],accent:{fg:D(c,s?.accent?.fg)},avatar:B({scheme:r},s),badge:H(s?.badge,{scheme:r},t),bg:D(c,s?.bg),border:D(c,s?.border),code:{bg:D(c,s?.code?.bg),fg:D(c,s?.code?.fg)},fg:D(c,s?.fg),icon:D(c,s?.icon),muted:{bg:D(c,s?.muted?.bg),fg:D(c,s?.muted?.fg)},kbd:{bg:D(c,s?.kbd?.bg),fg:D(c,s?.kbd?.fg),border:D(c,s?.kbd?.border)},link:{fg:D(c,s?.link?.fg)},skeleton:{from:D(c,s?.skeleton?.from),to:D(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:D(o,i?.shadow?.outline),umbra:D(o,i?.shadow?.umbra),penumbra:D(o,i?.shadow?.penumbra),ambient:D(o,i?.shadow?.ambient)}}
1({scheme:n,tone:r},t),skeleton:{from:D(o,i?.skeleton?.from),to:D(o,i?.skeleton?.to)},syntax:function(e,t){let{scheme:n}=e,r=t?.color?.syntax,i={hue:"gray",scheme:n};return{atrule:D(i,r?.atrule),attrName:D(i,r?.attrName),attrValue:D(i,r?.attrValue),attribute:D(i,r?.attribute),boolean:D(i,r?.boolean),builtin:D(i,r?.builtin),cdata:D(i,r?.cdata),char:D(i,r?.char),class:D(i,r?.class),className:D(i,r?.className),comment:D(i,r?.comment),constant:D(i,r?.constant),deleted:D(i,r?.deleted),doctype:D(i,r?.doctype),entity:D(i,r?.entity),function:D(i,r?.function),hexcode:D(i,r?.hexcode),id:D(i,r?.id),important:D(i,r?.important),inserted:D(i,r?.inserted),keyword:D(i,r?.keyword),number:D(i,r?.number),operator:D(i,r?.operator),prolog:D(i,r?.prolog),property:D(i,r?.property),pseudoClass:D(i,r?.pseudoClass),pseudoElement:D(i,r?.pseudoElement),punctuation:D(i,r?.punctuation),regex:D(i,r?.regex),selector:D(i,r?.selector),string:D(i,r?.string),symbol:D(i,r?.symbol),tag:D(i,r?.tag),unit:D(i,r?.unit),url:D(i,r?.url),variable:D(i,r?.variable)}}({scheme:n},t)}}({scheme:n,tone:e},t);return r}function B(e,t){let{scheme:n}=e;return{gray:U({color:"gray",scheme:n},t),blue:U({color:"blue",scheme:n},t),purple:U({color:"purple",scheme:n},t),magenta:U({color:"magenta",scheme:n},t),red:U({color:"red",scheme:n},t),orange:U({color:"orange",scheme:n},t),yellow:U({color:"yellow",scheme:n},t),green:U({color:"green",scheme:n},t),cyan:U({color:"cyan",scheme:n},t)}}function U(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)],bg:D(o,i?.bg),fg:D(o,i?.fg)}}function H(e,t,n){let{scheme:r}=t,i={};for(let t of j)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:D(a,o?.bg),fg:D(a,o?.fg),dot:D(a,o?.dot),icon:D(a,o?.icon)}}(e,{scheme:r,tone:t},n);return i}function W(e,t){let{mode:n,scheme:r,tone:i}=e;return{enabled:Y({mode:n,scheme:r,state:"enabled",cardTone:i},t),hovered:Y({mode:n,scheme:r,state:"hovered",cardTone:i},t),readOnly:Y({mode:n,scheme:r,state:"readOnly",cardTone:i},t),disabled:Y({mode:n,scheme:r,state:"disabled",cardTone:i},t)}}function Y(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)],bg:D(c,s?.bg),border:D(c,s?.border),fg:D(c,s?.fg),muted:{bg:D(c,s?.muted?.bg)},placeholder:D(c,s?.placeholder)}}function G(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function q(e,t,n,r,i){var o;return n*(1-(o=G((i-e)/(t-e))))+r*o}function X(e){return Math.round(e)}function K(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=X(G(Math.round(e.r),0,255)),n=X(G(Math.round(e.g),0,255)),r=X(G(Math.round(e.b),0,255));return"a"in e?`rgba(${t},${n},${r},${e.a})`:"#"+(0x1000000+(t<<16)+(n<<8)+r).toString(16).slice(1)}let J=/hsl\(\s*(\d+)\s*,\s*((\d+(?:\.\d+)?)%)\s*,\s*((\d+(?:\.\d+)?)%)\s*\)/i;function Q(e){if(!e)return{r:0,g:0,b:0};if("string"!=typeof e)throw Error("parseColor: expected a string");if("#"===e[0]&&(4===e.length||7===e.length)&&function(e){for(let t of e)if(-1==="0123456789ABCDEFabcdef".indexOf(t))return!1;return!0}(e.slice(1)))return K(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=J.exec(e);if(!t)throw Error(`parseHsl: string is not a HSL color: "${e}"`);return{h:parseInt(t[1]),s:parseFloat(t[3]),l:parseFloat(t[5])}}(e));if(e.startsWith("rgba(")){let t=e.replace(/rgba\(|\)/g,"").split(",");return{r:parseInt(t[0]),g:parseInt(t[1]),b:parseInt(t[2]),a:parseFloat(t[3])}}throw Error(`parseColor: unexpected color format: "${e}"`)}let ee=[0,255];function et(e,t){let{bg:n,blendMode:r,colorPalette:i}=t;if("white"===n)throw Error("Cannot blend with white background");let o=I(e);if(!o||"color"!==o.type)throw Error(`Invalid color token value: ${e}`);let a="";if("black"===o.key&&(a=en(i.black)),"white"===o.key&&(a=en(i.white)),o.hue&&o.tint&&(a=en(i[o.hue][o.tint])),!a)throw Error(`Invalid color token value: ${e}`);let s=a,l={blendMode:r,bg:n,black:en(i.black),white:en(i.white)};try{if(a=function(e,t){var n,r,i,o,a,s;let{blendMode:l}=t,u=Q(e),c=Q(t.black),d=Q(t.white),h=t.bg?Q(t.bg):"multiply"===l?d:c,f={r:[c.r,d.r],g:[c.g,d.g],b:[c.b,d.b]},p={r:G(q(...f.r,...ee,h.r),...ee),g:G(q(...f.g,...ee,h.g),...ee),b:G(q(...f.b,...ee,h.b),...ee)},m={r:G(q(...f.r,...ee,u.r),...ee),g:G(q(...f.g,...ee,u.g),...ee),b:G(q(...f.b,...ee,u.b),...ee)},g="multiply"===l?{r:255*(p.r/255*(m.r/255)),g:255*(p.g/255*(m.g/255)),b:255*(p.b/255*(m.b/255))}:{r:255*((n=p.r/255)+(r=m.r/255)-n*r),g:255*((i=p.g/255)+(o=m.g/255)-i*o),b:255*((a=p.b/255)+(s=m.b/255)-a*s)};return Z({r:G(q(...ee,...f.r,g.r),...f.r),g:G(q(...ee,...f.g,g.g),...f.g),b:G(q(...ee,...f.b,g.b),...f.b)})}(a,l),n&&void 0!==o.mix){var u,c,d,h,f,p,m;let e=K(n),t=K(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 en(e){return"string"==typeof e?e:e.hex}function er(e,t){let n=Object.entries(t),[,r]=n.find(([e])=>"transparent"===e),[,i]=n.find(([e])=>"default"===e),o=ei(r,{colorPalette:e}),a=ei(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,ei(n,{bg:s,colorPalette:e})])])}function ei(e,t){var n,r,i,o;let{colorPalette:a,bg:s}=t,l=e._blend||"multiply",u=et(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:es(n.default,r),ghost:es(n.ghost,r),bleed:es(n.bleed,r)}),h=function(e,t){let n={};for(let o of j){var r,i;n[o]=(r=e[o],i=t,{enabled:el(r.enabled,i),hovered:el(r.hovered,i),pressed:el(r.pressed,i),selected:el(r.selected,i),disabled:el(r.disabled,i)})}return n}(e.selectable,{colorPalette:a,baseBg:u,blendMode:l}),f={outline:et(e.shadow.outline,c),umbra:et(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),penumbra:et(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),ambient:et(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}})};return{_blend:l,_dark:e._dark,accent:{fg:et(e.accent.fg,c)},avatar:eo(e.avatar,{baseBg:u,colorPalette:a,blendMode:l}),backdrop:et(e.backdrop,c),badge:ea(e.badge,{baseBg:u,colorPalette:a,blendMode:l}),bg:u,border:et(e.border,c),button:d,code:{bg:et(e.code.bg,c),fg:et(e.code.fg,c)},fg:et(e.fg,c),focusRing:et(e.focusRing,c),icon:et(e.icon,c),input:(i=e.input,o={baseBg:u,colorPalette:a,blendMode:l},{default:eu(i.default,o),invalid:eu(i.invalid,o)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=et(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:o,blendMode:r,colorPalette:i};return{bg:o,fg:et(e.fg,a),border:et(e.border,a)}}(e.kbd,{baseBg:u,colorPalette:a,blendMode:l}),link:{fg:et(e.link.fg,c)},muted:{bg:et(e.muted.bg,c),fg:et(e.muted.fg,c)},shadow:f,skeleton:{from:et(e.skeleton.from,c),to:et(e.skeleton.to,c)},syntax:function(e,t){let{colorPalette:n,baseBg:r,blendMode:i}=t,o={colorPalette:n,bg:r,blendMode:i};return{atrule:et(e.atrule,o),attrName:et(e.attrName,o),attrValue:et(e.attrValue,o),attribute:et(e.attribute,o),boolean:et(e.boolean,o),builtin:et(e.builtin,o),cdata:et(e.cdata,o),char:et(e.char,o),class:et(e.class,o),className:et(e.className,o),comment:et(e.comment,o),constant:et(e.constant,o),deleted:et(e.deleted,o),doctype:et(e.doctype,o),entity:et(e.entity,o),function:et(e.function,o),hexcode:et(e.hexcode,o),id:et(e.id,o),important:et(e.important,o),inserted:et(e.inserted,o),keyword:et(e.keyword,o),number:et(e.number,o),operator:et(e.operator,o),prolog:et(e.prolog,o),property:et(e.property,o),pseudoClass:et(e.pseudoClass,o),pseudoElement:et(e.pseudoElement,o),punctuation:et(e.punctuation,o),regex:et(e.regex,o),selector:et(e.selector,o),string:et(e.string,o),symbol:et(e.symbol,o),tag:et(e.tag,o),unit:et(e.unit,o),url:et(e.url,o),variable:et(e.variable,o)}}(e.syntax,{baseBg:u,colorPalette:a,blendMode:l}),selectable:h}}function eo(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=et(e.bg,{bg:n,blendMode:r,colorPalette:i});return{_blend:o,bg:a,fg:et(e.fg,{bg:a,blendMode:o,colorPalette:i})}}(e[i],t);return n}function ea(e,t){let n={};for(let r of j)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=et(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:o,blendMode:r,colorPalette:i};return{bg:o,dot:et(e.dot,a),fg:et(e.fg,a),icon:et(e.icon,a)}}(e[r],t);return n}function es(e,t){let n={};for(let o of j){var r,i;n[o]=(r=e[o],i=t,{enabled:el(r.enabled,i),hovered:el(r.hovered,i),pressed:el(r.pressed,i),selected:el(r.selected,i),disabled:el(r.disabled,i)})}return n}function el(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=et(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:a,blendMode:o,colorPalette:i};
1return{_blend:o,accent:{fg:et(e.accent.fg,s)},avatar:eo(e.avatar,{baseBg:a,colorPalette:i,blendMode:o}),badge:ea(e.badge,{baseBg:a,colorPalette:i,blendMode:o}),bg:a,border:et(e.border,s),code:{bg:et(e.code.bg,s),fg:et(e.code.fg,s)},fg:et(e.fg,s),icon:et(e.icon,s),link:{fg:et(e.link.fg,s)},muted:{bg:et(e.muted.bg,s),fg:et(e.muted.fg,s)},kbd:{bg:et(e.kbd.bg,s),fg:et(e.kbd.fg,s),border:et(e.kbd.border,s)},skeleton:{from:et(e.skeleton?.from,s),to:et(e.skeleton?.to,s)}}}function eu(e,t){return{enabled:ec(e.enabled,t),hovered:ec(e.hovered,t),readOnly:ec(e.readOnly,t),disabled:ec(e.disabled,t)}}function ec(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=et(e.bg,{colorPalette:i,bg:n,blendMode:r}),s={colorPalette:i,bg:a,blendMode:o};return{_blend:o,bg:a,border:et(e.border,s),fg:et(e.fg,s),muted:{bg:et(e.muted.bg,s)},placeholder:et(e.placeholder,s)}}function ed(e){let t=function(e){let t={color:function(e){let t=z(L,e);return{base:function(e){let t={};for(let n of C)t[n]=function(e,t){let n=z(e?.base?.["*"],e?.base?.[t]),i=n._hue||e?.base?.[t]?._hue||"gray";return{...n,_hue:i,avatar:r.reduce((e,t)=>({...e,[t]:z({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:j.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 j)n[i]=function(e,t,n){let i={};for(let o of T)i[o]=function(e,t,n,i){let o=z(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]:z({_hue:t},o.avatar?.["*"],o.avatar?.[t])}),{}),badge:j.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 M)n[r]=function(e,t,n){let r=z(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 j)t[n]=function(e,t){let n={_hue:e?.selectable?.[t]?._hue||e?.base?.[t]?._hue};for(let i of T)n[i]=function(e,t,n){let i=z(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]:z({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:j.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:F({scheme:"light"},t),dark:F({scheme:"dark"},t)}}(e);return x({_version:2,avatar:e?.avatar??s.avatar,button:e?.button??s.button,card:e?.card??s.card,color:function(e,t){let n=t?.palette??o;return{light:er(n,e.light),dark:er(n,e.dark)}}(t,e),container:e?.container??s.container,font:e?.font??l,input:e?.input??s.input,layer:e?.layer??s.layer,media:e?.media??s.media,radius:e?.radius??s.radius,shadow:e?.shadow??s.shadow,space:e?.space??s.space,style:e?.style??s.style})}let eh=new Map;function ef(e,t,n){var r;let i=function(e,t,n){let r=eh.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=y(e)?x(e):e,a=y(e)?e:function(e){if(e.v2)return e.v2;let t=v.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,fonts:a,input:l,layer:u,media:d,radius:h,shadows:f,space:p,styles:m}=e,g={_version:2,avatar:{...s.avatar,...n},button:{...s.button,...r},card:s.card,color:{light:{transparent:c(i.light.transparent),default:c(i.light.default),neutral:c(i.light.transparent),primary:c(i.light.primary),suggest:c(i.light.primary),positive:c(i.light.positive),caution:c(i.light.caution),critical:c(i.light.critical)},dark:{transparent:c(i.dark.transparent),default:c(i.dark.default),neutral:c(i.dark.transparent),primary:c(i.dark.primary),suggest:c(i.dark.primary),positive:c(i.dark.positive),caution:c(i.dark.caution),critical:c(i.dark.critical)}},container:o,font:a,input:{...s.input,...l,checkbox:{...s.input.checkbox,...l.checkbox},radio:{...s.input.radio,...l.radio},switch:{...s.input.switch,...l.switch}},layer:u??s.layer,media:d,radius:h,shadow:f,space:p,style:m};return v.set(e,g),g}(e),l=o.color[t]||o.color.light,u=l[n]||l.default,d=o.layer||s.layer,h=a.color[t]||a.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=a.layer||s.layer,m={sanity:{...o,color:u,layer:d,v2:{...a,_resolved:!0,color:f,layer:p}}};return function(e,t,n,r){eh.has(t)||eh.set(t,new Map);let i=eh.get(t);i.has(n)||i.set(n,new WeakMap),i.get(n).set(e,r)}(e,t,n,m),m}},47275: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}},48545:(e,t,n)=>{var r=n(81863),i=n(39913);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},48805: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}},50489:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});let r=(0,n(7620).createContext)(null)},52952:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case h:case g:case m:case l:return e;default:return t}}case i:return t}}}function S(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return S(e)||w(e)===c},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===h||e.$$typeof===v||e.$$typeof===b||e.$$typeof===x||e.$$typeof===y)},t.typeOf=w},53085: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)||[]}},55086:(e,t,n)=>{"use strict";let r;n.d(t,{P:()=>of});var i=n(7620);let o=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],a=new Set(o),s=e=>180*e/Math.PI,l=e=>c(s(Math.atan2(e[1],e[0]))),u={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:l,rotateZ:l,skewX:e=>s(Math.atan(e[1])),skewY:e=>s(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},c=e=>((e%=360)<0&&(e+=360),e),d=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),h=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),f={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:d,scaleY:h,scale:e=>(d(e)+h(e))/2,rotateX:e=>c(s(Math.atan2(e[6],e[5]))),rotateY:e=>c(s(Math.atan2(-e[2],e[0]))),rotateZ:l,rotate:l,skewX:e=>s(Math.atan(e[4])),skewY:e=>s(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function p(e){return+!!e.includes("scale")}function m(e,t){let n,r;if(!e||"none"===e)return p(t);let i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(i)n=f,r=i;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=u,r=t}if(!r)return p(t);let o=n[t],a=r[1].split(",").map(g);return"function"==typeof o?o(a):a[o]}function g(e){return parseFloat(e.trim())}let y=e=>t=>"string"==typeof t&&t.startsWith(e),v=y("--"),b=y("var(--"),x=e=>!!b(e)&&w.test(e.split("/*")[0].trim()),w=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function S({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}let k=(e,t,n)=>e+(t-e)*n;function E(e){return void 0===e||1===e}function C({scale:e,scaleX:t,scaleY:n}){return!E(e)||!E(t)||!E(n)}function j(e){return C(e)||T(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function T(e){var t,n;
1return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function A(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function _(e,t=0,n=1,r,i){e.min=A(e.min,t,n,r,i),e.max=A(e.max,t,n,r,i)}function M(e,{x:t,y:n}){_(e.x,t.translate,t.scale,t.originPoint),_(e.y,n.translate,n.scale,n.originPoint)}function P(e,t){e.min=e.min+t,e.max=e.max+t}function R(e,t,n,r,i=.5){let o=k(e.min,e.max,i);_(e,t,n,o,r)}function I(e,t){R(e.x,t.x,t.scaleX,t.scale,t.originX),R(e.y,t.y,t.scaleY,t.scale,t.originY)}function O(e,t){return S(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))}let $=new Set(["width","height","top","left","right","bottom",...o]),D=(e,t,n)=>n>t?t:n<e?e:n,L={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},N={...L,transform:e=>D(0,1,e)},z={...L,default:1},V=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),F=V("deg"),B=V("%"),U=V("px"),H=V("vh"),W=V("vw"),Y={...B,parse:e=>B.parse(e)/100,transform:e=>B.transform(100*e)},G=e=>t=>t.test(e),q=[L,U,B,F,W,H,{test:e=>"auto"===e,parse:e=>e}],X=e=>q.find(G(e)),K=()=>{},Z=()=>{},J=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Q=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ee=e=>e===L||e===U,et=new Set(["x","y","z"]),en=o.filter(e=>!et.has(e)),er={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>m(t,"x"),y:(e,{transform:t})=>m(t,"y")};er.translateX=er.x,er.translateY=er.y;let ei=e=>e,eo={},ea=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],es={value:null,addProjectionMetrics:null};function el(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=ea.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,i=!1,o=!1,a=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){a.has(t)&&(c.schedule(t),e()),l++,t(s)}let c={schedule:(e,t=!1,o=!1)=>{let s=o&&i?n:r;return t&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{if(s=e,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&es.value&&es.value.frameloop[t].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(e))}};return c}(o,t?n:void 0),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=a,m=()=>{let o=eo.useManualTiming?i.timestamp:performance.now();n=!1,eo.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,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))};return{schedule:ea.reduce((t,o)=>{let s=a[o];return t[o]=(t,o=!1,a=!1)=>(!n&&(n=!0,r=!0,i.isProcessing||e(m)),s.schedule(t,o,a)),t},{}),cancel:e=>{for(let t=0;t<ea.length;t++)a[ea[t]].cancel(e)},state:i,steps:a}}let{schedule:eu,cancel:ec,state:ed,steps:eh}=el("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ei,!0),ef=new Set,ep=!1,em=!1,eg=!1;function ey(){if(em){let e=Array.from(ef).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 en.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(+!!n.startsWith("scale")))}),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)})}em=!1,ep=!1,ef.forEach(e=>e.complete(eg)),ef.clear()}function ev(){ef.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(em=!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?(ef.add(this),ep||(ep=!0,eu.read(ev),eu.resolveKeyframes(ey))):(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])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ef.delete(this)}cancel(){"scheduled"===this.state&&(ef.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let ex=e=>/^0[^.\s]+$/u.test(e),ew=e=>Math.round(1e5*e)/1e5,eS=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,ek=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eE=(e,t)=>n=>!!("string"==typeof n&&ek.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),eC=(e,t,n)=>r=>{if("string"!=typeof r)return r;let[i,o,a,s]=r.match(eS);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},ej={...L,transform:e=>Math.round(D(0,255,e))},eT={test:eE("rgb","red"),parse:eC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ej.transform(e)+", "+ej.transform(t)+", "+ej.transform(n)+", "+ew(N.transform(r))+")"},eA={test:eE("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alph
1a:i?parseInt(i,16)/255:1}},transform:eT.transform},e_={test:eE("hsl","hue"),parse:eC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+B.transform(ew(t))+", "+B.transform(ew(n))+", "+ew(N.transform(r))+")"},eM={test:e=>eT.test(e)||eA.test(e)||e_.test(e),parse:e=>eT.test(e)?eT.parse(e):e_.test(e)?e_.parse(e):eA.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?eT.transform(e):e_.transform(e),getAnimatableNone:e=>{let t=eM.parse(e);return t.alpha=0,eM.transform(t)}},eP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,eR="number",eI="color",eO=/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 e$(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,a=t.replace(eO,e=>(eM.test(e)?(r.color.push(o),i.push(eI),n.push(eM.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(eR),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:a,indexes:r,types:i}}function eD(e){return e$(e).values}function eL(e){let{split:t,types:n}=e$(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){let t=n[o];t===eR?i+=ew(e[o]):t===eI?i+=eM.transform(e[o]):i+=e[o]}return i}}let eN=e=>"number"==typeof e?0:eM.test(e)?eM.getAnimatableNone(e):e,ez={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(eS)?.length||0)+(e.match(eP)?.length||0)>0},parse:eD,createTransformer:eL,getAnimatableNone:function(e){let t=eD(e);return eL(e)(t.map(eN))}},eV=new Set(["brightness","contrast","saturate","opacity"]);function eF(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(eS)||[];if(!r)return e;let i=n.replace(r,""),o=+!!eV.has(t);return r!==n&&(o*=100),t+"("+o+i+")"}let eB=/\b([a-z-]*)\(.*?\)/gu,eU={...ez,getAnimatableNone:e=>{let t=e.match(eB);return t?t.map(eF).join(" "):e}},eH={...L,transform:Math.round},eW={borderWidth:U,borderTopWidth:U,borderRightWidth:U,borderBottomWidth:U,borderLeftWidth:U,borderRadius:U,radius:U,borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomRightRadius:U,borderBottomLeftRadius:U,width:U,maxWidth:U,height:U,maxHeight:U,top:U,right:U,bottom:U,left:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,backgroundPositionX:U,backgroundPositionY:U,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scale:z,scaleX:z,scaleY:z,scaleZ:z,skew:F,skewX:F,skewY:F,distance:U,translateX:U,translateY:U,translateZ:U,x:U,y:U,z:U,perspective:U,transformPerspective:U,opacity:N,originX:Y,originY:Y,originZ:U,zIndex:eH,fillOpacity:N,strokeOpacity:N,numOctaves:eH},eY={...eW,color:eM,backgroundColor:eM,outlineColor:eM,fill:eM,stroke:eM,borderColor:eM,borderTopColor:eM,borderRightColor:eM,borderBottomColor:eM,borderLeftColor:eM,filter:eU,WebkitFilter:e
1U},eG=e=>eY[e];function eq(e,t){let n=eG(e);return n!==eU&&(n=ez),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let eX=new Set(["auto","none","0"]);class eK 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&&x(r=r.trim())){let i=function e(t,n,r=1){Z(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=Q.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 J(e)?parseFloat(e):e}return x(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(),!$.has(n)||2!==e.length)return;let[r,i]=e,o=X(r),a=X(i);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 er[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||ex(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&&!eX.has(t)&&e$(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=eq(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=er[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]=er[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 eZ=e=>!!(e&&e.getVelocity);function eJ(){r=void 0}let eQ={now:()=>(void 0===r&&eQ.set(ed.isProcessing||eo.useManualTiming?ed.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(eJ)}};function e0(e,t){-1===e.indexOf(t)&&e.push(t)}function e1(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class e2{constructor(){this.subscriptions=[]}add(e){return e0(this.subscriptions,e),()=>e1(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 e5={current:void 0};class e3{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=eQ.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=eQ.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(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 e2);let n=this.events[e].add(t);return"change"===e?()=>{n(),eu.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return e5.current&&e5.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=eQ.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}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 e4(e,t){return new e3(e,t)}let e6=[...q,eM,ez],{schedule:e8}=el(queueMicrotask,!1),e9={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"]},e7={};for(let e in e9)e7[e]={isEnabled:t=>e9[e].some(e=>!!t[e])};let te=()=>({translate:0,scale:1,origin:0,originPoint:0}),tt=()=>({x:te(),y:te()}),tn=()=>({min:0,max:0}),tr=()=>({x:tn(),y:tn()});var ti=n(7240);let to={current:null},ta={current:!1},ts=new WeakMap;function tl(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tu(e){return"string"==typeof e||Array.isArray(e)}let tc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],td=["initial",...tc];function th(e){return tl(e.animate)||td.some(t=>tu(e[t]))}function tf(e){return!!(th(e)||e.variants)}function tp(e){let t=[{},{}];
1return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function tm(e,t,n,r){if("function"==typeof t){let[i,o]=tp(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]=tp(r);t=t(void 0!==n?n:e.custom,i,o)}return t}let tg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ty{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=eb,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=eQ.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,eu.render(this.render,!1,!0))};let{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=th(t),this.isVariantNode=tf(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in c){let t=c[e];void 0!==s[e]&&eZ(t)&&t.set(s[e])}}mount(e){this.current=e,ts.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),ta.current||function(){if(ta.current=!0,ti.B)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>to.current=e.matches;e.addEventListener("change",t),t()}else to.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||to.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),ec(this.notifyUpdate),ec(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let n;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let r=a.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&eu.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),n&&n(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in e7){let t=e7[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):tr()}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<tg.length;t++){let n=tg[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(eZ(i))e.addValue(r,i);else if(eZ(o))e.addValue(r,e4(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,e4(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}
1addVariantChild(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=e4(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];if(null!=n){if("string"==typeof n&&(J(n)||ex(n)))n=parseFloat(n);else{let r;r=n,!e6.find(G(r))&&ez.test(t)&&(n=eq(e,t))}this.setBaseTarget(e,eZ(n)?n.get():n)}return eZ(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let r=tm(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||eZ(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 e2),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){e8.render(this.render)}}class tv extends ty{constructor(){super(...arguments),this.KeyframeResolver=eK}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[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;eZ(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}let tb=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tx={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tw=o.length;function tS(e,t,n){let{style:r,vars:i,transformOrigin:s}=e,l=!1,u=!1;for(let e in t){let n=t[e];if(a.has(e)){l=!0;continue}if(v(e)){i[e]=n;continue}{let t=tb(n,eW[e]);e.startsWith("origin")?(u=!0,s[e]=t):r[e]=t}}if(!t.transform&&(l||n?r.transform=function(e,t,n){let r="",i=!0;for(let a=0;a<tw;a++){let s=o[a],l=e[s];if(void 0===l)continue;let u=!0;if(!(u="number"==typeof l?l===+!!s.startsWith("scale"):0===parseFloat(l))||n){let e=tb(l,eW[s]);if(!u){i=!1;let t=tx[s]||s;r+=`${t}(${e}) `}n&&(t[s]=e)}}return 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}=s;r.transformOrigin=`${e} ${t} ${n}`}}function tk(e,{style:t,vars:n},r,i){let o,a=e.style;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function tE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let tC={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!U.test(e))return e;else e=parseFloat(e);let n=tE(e,t.target.x),r=tE(e,t.target.y);return`${n}% ${r}%`}},tj={borderRadius:{...tC,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tC,borderTopRightRadius:tC,borderBottomLeftRadius:tC,borderBottomRightRadius:tC,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=ez.parse(e);if(r.length>5)return e;let i=ez.createTransformer(e),o=+("number"!=typeof r[0]),a=n.x.scale*t.x,s=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=s;let l=k(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 tT(e,{layout:t,layoutId:n}){return a.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!tj[e]||"opacity"===e)}function tA(e,t,n){let{style:r}=e,i={};for(let o in r)(eZ(r[o])||t.style&&eZ(t.style[o])||tT(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}class t_ extends tv{constructor(){super(...arguments),this.type="html",this.renderInstance=tk}readValueFromInstance(e,t){if(a.has(t))return this.projection?.isProjecting?p(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return m(n,t)})(e,t);{let n=window.getComputedStyle(e),r=(v(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return O(e,t)}build(e,t,n){tS(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return tA(e,t,n)}}let tM=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),tP={offset:"stroke-dashoffset",array:"stroke-dasharray"},tR={offset:"strokeDashoffset",array:"strokeDasharray"};function tI(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s}
1,l,u,c){if(tS(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;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),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?tP:tR;e[o.offset]=U.transform(-r);let a=U.transform(t),s=U.transform(n);e[o.array]=`${a} ${s}`}(d,i,o,a,!1)}let tO=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"]),t$=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tD(e,t,n){let r=tA(e,t,n);for(let n in e)(eZ(e[n])||eZ(t[n]))&&(r[-1!==o.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}class tL extends tv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=tr}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(a.has(t)){let e=eG(t);return e&&e.default||0}return t=tO.has(t)?t:tM(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return tD(e,t,n)}
1build(e,t,n){tI(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){for(let n in tk(e,t,void 0,r),t.attrs)e.setAttribute(tO.has(n)?n:tM(n),t.attrs[n])}mount(e){this.isSVGTag=t$(e.tagName),super.mount(e)}}let tN=["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 tz(e){if("string"!=typeof e||e.includes("-"));else if(tN.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var tV=n(54568),tF=n(18257);let tB=(0,i.createContext)({strict:!1});var tU=n(77512);let tH=(0,i.createContext)({});function tW(e){return Array.isArray(e)?e.join(" "):e}let tY=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function tG(e,t,n){for(let r in t)eZ(t[r])||tT(r,n)||(e[r]=t[r])}let tq=()=>({...tY(),attrs:{}}),tX=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tK(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tX.has(e)}let tZ=e=>!tK(e);try{!function(e){"function"==typeof e&&(tZ=t=>t.startsWith("on")?!tK(t):e(t))}(require("@emotion/is-prop-valid").default)}catch{}var tJ=n(50489),tQ=n(70081);function t0(e){return eZ(e)?e.get():e}let t1=e=>(t,n)=>{let r=(0,i.useContext)(tH),o=(0,i.useContext)(tJ.t),a=()=>(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]=t0(o[e]);let{initial:a,animate:s}=e,l=th(e),u=tf(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&&!tl(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=tm(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}(t,n,r,i),renderState:o()}})(e,t,r,o);return n?a():(0,tQ.M)(a)},t2=t1({scrapeMotionValuesFromProps:tA,createRenderState:tY}),t5=t1({scrapeMotionValuesFromProps:tD,createRenderState:tq}),t3=Symbol.for("motionComponentSymbol");function t4(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let t6="data-"+tM("framerAppearId"),t8=(0,i.createContext)({});var t9=n(26106);function t7(e){var t,n;let{forwardMotionProps:r=!1}=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){for(let t in e)e7[t]={...e7[t],...e[t]}}(o);let s=tz(e)?t5:t2;function l(t,n){var o;let l,u={...(0,i.useContext)(tU.Q),...t,layoutId:function(e){let{layoutId:t}=e,n=(0,i.useContext)(tF.L).id;return n&&void 0!==t?n+"-"+t:t}(t)},{isStatic:c}=u,d=function(e){let{initial:t,animate:n}=function(e,t){if(th(e)){let{initial:t,animate:n}=e;return{initial:!1===t||tu(t)?t:void 0,animate:tu(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,i.useContext)(tH));return(0,i.useMemo)(()=>({initial:t,animate:n}),[tW(t),tW(n)])}(t),h=s(t,c);if(!c&&ti.B){(0,i.useContext)(tB).strict;let t=function(e){let{drag:t,layout:n}=e7;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}}(u);l=t.MeasureLayout,d.visualElement=function(e,t,n,r,o){var a,s,l,u;let{visualElement:c}=(0,i.useContext)(tH),d=(0,i.useContext)(tB),h=(0,i.useContext)(tJ.t),f=(0,i.useContext)(tU.Q).reducedMotion,p=(0,i.useRef)(null);r=r||d.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:f}));let m=p.current,g=(0,i.useContext)(t8);m&&!m.projection&&o&&("html"===m.type||"svg"===m.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&t4(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}(p.current,n,o,g);let y=(0,i.useRef)(!1);(0,i.useInsertionEffect)(()=>{m&&y.current&&m.update(n,h)});let v=n[t6],b=(0,i.useRef)(!!v&&!(null==(a=(s=window).MotionHandoffIsComplete)?void 0:a.call(s,v))&&(null==(l=(u=window).MotionHasOptimisedAnimation)?void 0:l.call(u,v)));return(0,t9.E)(()=>{m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),(0,i.useEffect)(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var e,t;null==(e=(t=window).MotionHandoffMarkAsComplete)||e.call(t,v)}),b.current=!1),m.enteringChildren=void 0)}),m}(e,h,u,a,t.ProjectionNode)}return(0,tV.jsxs)(tH.Provider,{value:d,children:[l&&d.visualElement?(0,tV.jsx)(l,{visualElement:d.visualElement,...u}):null,function(e,t,n,r,o){let{latestValues:a}=r,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=(tz(e)?function(e,t,n,r){let o=(0,i.useMemo)(()=>{let n=tq();return tI(n,t,t$(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};tG(t,e.style,e),o.style={...t,...o.style}}return o}:function(e,t){let n={},r=function(e,t){let n=e.style||{},r={};return tG(r,n,e),Object.assign(r,function(e,t){let{transformTemplate:n}=e;return(0,i.useMemo)(()=>{let e=tY();return tS(e,t,n),Object.assign({},e.vars,e.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTa
1p||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n})(t,a,o,e),u=function(e,t,n){let r={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(tZ(i)||!0===n&&tK(i)||!t&&!tK(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,s),c=e!==i.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=(0,i.useMemo)(()=>eZ(d)?d.get():d,[d]);return(0,i.createElement)(e,{...c,children:h})}(e,t,(o=d.visualElement,(0,i.useCallback)(e=>{e&&h.onMount&&h.onMount(e),o&&(e?o.mount(e):o.unmount()),n&&("function"==typeof n?n(e):t4(n)&&(n.current=e))},[o])),h,c,r)]})}l.displayName="motion.".concat("string"==typeof e?e:"create(".concat(null!=(n=null!=(t=e.displayName)?t:e.name)?n:"",")"));let u=(0,i.forwardRef)(l);return u[t3]=e,u}function ne(e,t,n){let r=e.getProps();return tm(r,t,void 0!==n?n:r.custom,e)}function nt(e,t){return e?.[t]??e?.default??e}let nn=e=>Array.isArray(e);function nr(e,t){let n=e.getValue("willChange");if(eZ(n)&&n.add)return n.add(t);if(!n&&eo.WillChange){let n=new eo.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function ni(e){e.duration=0,e.type="keyframes"}let no=(e,t)=>n=>t(e(n)),na=(...e)=>e.reduce(no),ns=e=>1e3*e,nl={layout:0,mainThread:0,waapi:0};function nu(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 nc(e,t){return n=>n>0?t:e}let nd=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},nh=[eA,eT,e_];function nf(e){let t=nh.find(t=>t.test(e));if(K(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===e_&&(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=nu(s,r,e+1/3),o=nu(s,r,e),a=nu(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 np=(e,t)=>{let n=nf(e),r=nf(t);if(!n||!r)return nc(e,t);let i={...n};return e=>(i.red=nd(n.red,r.red,e),i.green=nd(n.green,r.green,e),i.blue=nd(n.blue,r.blue,e),i.alpha=k(n.alpha,r.alpha,e),eT.transform(i))},nm=new Set(["none","hidden"]);function ng(e,t){return n=>k(e,t,n)}function ny(e){return"number"==typeof e?ng:"string"==typeof e?x(e)?nc:eM.test(e)?np:nx:Array.isArray(e)?nv:"object"==typeof e?eM.test(e)?np:nb:nc}function nv(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>ny(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function nb(e,t){let n={...e,...t},r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=ny(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}let nx=(e,t)=>{let n=ez.createTransformer(t),r=e$(e),i=e$(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?nm.has(e)&&!i.values.length||nm.has(t)&&!r.values.length?function(e,t){return nm.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):na(nv(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):(K(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),nc(e,t))};function nw(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?k(e,t,n):ny(e)(e,t)}let nS=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>eu.update(t,e),stop:()=>ec(t),now:()=>ed.isProcessing?ed.timestamp:eQ.now()}},nk=(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)})`};function nE(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}function nC(e,t,n){var r,i;let o=Math.max(t-5,0);return r=n-e(o),(i=t-o)?1e3/i*r:0}let nj={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 nT(e,t){return e*Math.sqrt(1-t*t)}let nA=["duration","bounce"],n_=["stiffness","damping","mass"];function nM(e,t){return t.some(t=>void 0!==e[t])}function nP(e=nj.visualDuration,t=nj.bounce){let n,r="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:i,restDelta:o}=r,a=r.keyframes[0],s=r.keyframes[r.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:c,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=function(e){let t={velocity:nj.velocity,stiffness:nj.stiffness,damping:nj.damping,mass:nj.mass,isResolvedFromDuration:!1,...e};if(!nM(e,n_)&&nM(e,nA))if(e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),r=n*n,i=2*D(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:nj.mass,stiffness:r,damping:i}}else{let n=function({duration:e=nj.duration,bounce:t=nj.bounce,velocity:n=nj.velocity,mass:r=nj.mass}){let i,o;K(e<=ns(nj.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=D(nj.minDamping,nj.maxDamping,a),e=D(nj.minDuration,nj.maxDuration,e/1e3),a<1?(i=t=>{let r=t*a,i=r*e;return .001-(r-n)/nT(t,a)*Math.exp(-i)},o=t=>{let r=t*a*e,o=Math.pow(a,2)*Math.pow(t,2)*e,s=Math.exp(-r),l=nT(Math.pow(t,2),a);return(r*n+n-o)*s*(-i(t)+.001>0?-1:1)/l}):(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=ns(e),isNaN(s))return{stiffness:nj.stiffness,damping:nj.damping,duration:e};{let t=Math.pow(s,2)*r;
1return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);(t={...t,...n,mass:nj.mass}).isResolvedFromDuration=!0}return t}({...r,velocity:-((r.velocity||0)/1e3)}),m=f||0,g=c/(2*Math.sqrt(u*d)),y=s-a,v=Math.sqrt(u/d)/1e3,b=5>Math.abs(y);if(i||(i=b?nj.restSpeed.granular:nj.restSpeed.default),o||(o=b?nj.restDelta.granular:nj.restDelta.default),g<1){let e=nT(v,g);n=t=>s-Math.exp(-g*v*t)*((m+g*v*y)/e*Math.sin(e*t)+y*Math.cos(e*t))}else if(1===g)n=e=>s-Math.exp(-v*e)*(y+(m+v*y)*e);else{let e=v*Math.sqrt(g*g-1);n=t=>{let n=Math.exp(-g*v*t),r=Math.min(e*t,300);return s-n*((m+g*v*y)*Math.sinh(r)+e*y*Math.cosh(r))/e}}let x={calculatedDuration:p&&h||null,next:e=>{let t=n(e);if(p)l.done=e>=h;else{let r=0===e?m:0;g<1&&(r=0===e?ns(m):nC(n,e,t));let a=Math.abs(s-t)<=o;l.done=Math.abs(r)<=i&&a}return l.value=l.done?s:t,l},toString:()=>{let e=Math.min(nE(x),2e4),t=nk(t=>x.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return x}function nR({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,f=e[0],p={done:!1,value:f},m=n*t,g=f+m,y=void 0===a?g:a(g);y!==g&&(m=y-f);let v=e=>-m*Math.exp(-e/r),b=e=>y+v(e),x=e=>{let t=v(e),n=b(e);p.done=Math.abs(t)<=u,p.value=p.done?y:n},w=e=>{let t;if(t=p.value,void 0!==s&&t<s||void 0!==l&&t>l){var n;d=e,h=nP({keyframes:[p.value,(n=p.value,void 0===s?l:void 0===l||Math.abs(s-n)<Math.abs(l-n)?s:l)],velocity:nC(b,e,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:c})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return(h||void 0!==d||(t=!0,x(e),w(e)),void 0!==d&&e>=d)?h.next(e-d):(t||x(e),p)}}}nP.applyToOptions=e=>{let t=function(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(nE(r),2e4);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:i/1e3}}(e,100,nP);return e.ease=t.ease,e.duration=ns(t.duration),e.type="keyframes",e};let nI=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function nO(e,t,n,r){return e===t&&n===r?ei:i=>0===i||1===i?i:nI(function(e,t,n,r,i){let o,a,s=0;do(o=nI(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a;while(Math.abs(o)>1e-7&&++s<12);return a}(i,0,1,e,n),t,r)}let n$=nO(.42,0,1,1),nD=nO(0,0,.58,1),nL=nO(.42,0,.58,1),nN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,nz=e=>t=>1-e(1-t),nV=nO(.33,1.53,.69,.99),nF=nz(nV),nB=nN(nF),nU=e=>(e*=2)<1?.5*nF(e):.5*(2-Math.pow(2,-10*(e-1))),nH=e=>1-Math.sin(Math.acos(e)),nW=nz(nH),nY=nN(nH),nG=e=>Array.isArray(e)&&"number"==typeof e[0],nq={linear:ei,easeIn:n$,easeInOut:nL,easeOut:nD,circIn:nH,circInOut:nY,circOut:nW,backIn:nF,backInOut:nB,backOut:nV,anticipate:nU},nX=e=>{if(nG(e)){Z(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,r,i]=e;return nO(t,n,r,i)}return"string"==typeof e?(Z(void 0!==nq[e],`Invalid easing type '${e}'`,"invalid-easing-type"),nq[e]):e},nK=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r};function nZ({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){var i;let o=Array.isArray(r)&&"number"!=typeof r[0]?r.map(nX):nX(r),a={done:!1,value:t[0]},s=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if(Z(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||eo.mix||nw,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);t&&(o=na(Array.isArray(t)?t[n]||ei:t,o)),r.push(o)}return r}(t,r,i),l=s.length,u=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=nK(e[r],e[r+1],n);return s[r](i)};return n?t=>u(D(e[0],e[o-1],t)):u}((i=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=nK(0,t,r);e.push(k(n,1,i))}}(t,e.length-1),t}(t),i.map(t=>t*e)),t,{ease:Array.isArray(o)?o:t.map(()=>o||nL).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}let nJ=e=>null!==e;function nQ(e,{repeat:t,repeatType:n="loop"},r,i=1){let o=e.filter(nJ),a=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return a&&void 0!==r?r:o[a]}let n0={decay:nR,inertia:nR,tween:nZ,keyframes:nZ,spring:nP};function n1(e){"string"==typeof e.type&&(e.type=n0[e.type])}class n2{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 n5=e=>e/100;class n3 extends n2{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==eQ.now()&&this.tick(eQ.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},nl.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;n1(e);let{type:t=nZ,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e,{keyframes:a}=e,s=t||nZ;s!==nZ&&"number"!=typeof a[0]&&(this.mixKeyframes=na(n5,nw(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=nE(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{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);let{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:h,type:f,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,b=n;if(c){let e=Math.min(this.currentTime,r)/a,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,c+1))%2&&("reverse"===d?(n=1-n,h&&(n-=h
1/a)):"mirror"===d&&(b=o)),v=D(0,1,n)*a}let x=y?{done:!1,value:u[0]}:b.next(v);i&&(x.value=i(x.value));let{done:w}=x;y||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&f!==nR&&(x.value=nQ(u,this.options,m,this.speed)),p&&p(x.value),S&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=ns(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(eQ.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=nS,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(eQ.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,nl.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function n4(e){let t;return()=>(void 0===t&&(t=e()),t)}let n6=n4(()=>void 0!==window.ScrollTimeline),n8={},n9=function(e,t){let n=n4(e);return()=>n8[t]??n()}(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),n7=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,re={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:n7([0,.65,.55,1]),circOut:n7([.55,0,1,.45]),backIn:n7([.31,.01,.66,-.59]),backOut:n7([.33,1.53,.69,.99])};function rt(e){return"function"==typeof e&&"applyToOptions"in e}class rn extends n2{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!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,Z("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return rt(e)&&n9()?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?n9()?nk(t,n):"ease-out":nG(t)?n7(t):Array.isArray(t)?t.map(t=>e(t,n)||re.easeOut):re[t]}(s,i);Array.isArray(d)&&(c.easing=d),es.value&&nl.waapi++;let h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};u&&(h.pseudoElement=u);let f=e.animate(c,h);return es.value&&f.finished.finally(()=>{nl.waapi--}),f}(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=nQ(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){this.finishedTime=null,this.animation.currentTime=ns(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&n6())?(this.animation.timeline=e,ei):t(this)}}let rr={anticipate:nU,backInOut:nB,circInOut:nY};class ri extends rn{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in rr&&(e.ease=rr[e.ease])}(e),n1(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let a=new n3({...o,autoplay:!1}),s=ns(this.finishedTime??this.time);t.setWithVelocity(a.sample(s-10).value,a.sample(s).value,10),a.stop()}}let ro=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(ez.test(e)||"0"===e)&&!e.startsWith("url(")),ra=new Set(["opacity","clipPath","filter","transform"]),rs=n4(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class rl extends n2{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=eQ.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:
1o,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){this.keyframeResolver=void 0;let{name:i,type:o,velocity:a,delay:s,isHandoff:l,onUpdate:u}=n;this.resolvedAt=eQ.now(),!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],a=ro(i,t),s=ro(o,t);return K(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||rt(n))&&r)}(e,i,o,a)&&((eo.instantAnimations||!s)&&u?.(nQ(e,n,t)),e[0]=e[e.length-1],ni(n),n.repeat=0);let c={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:l}=t.owner.getProps();return rs()&&n&&ra.has(n)&&("transform"!==n||!l)&&!s&&!r&&"mirror"!==i&&0!==o&&"inertia"!==a}(c)?new ri({...c,element:c.motionValue.owner.current}):new n3(c);d.finished.then(()=>this.notifyFinished()).catch(ei),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}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(),eg=!0,ev(),ey(),eg=!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 ru=e=>null!==e,rc={type:"spring",stiffness:500,damping:25,restSpeed:10},rd={type:"keyframes",duration:.8},rh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rf=(e,t,n,r={},i,o)=>s=>{let l=nt(r,e)||{},u=l.delay||r.delay||0,{elapsed:c=0}=r;c-=ns(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(l)&&Object.assign(d,((e,{keyframes:t})=>t.length>2?rd:a.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:rc:rh)(e,d)),d.duration&&(d.duration=ns(d.duration)),d.repeatDelay&&(d.repeatDelay=ns(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if(!1!==d.type&&(0!==d.duration||d.repeatDelay)||(ni(d),0===d.delay&&(h=!0)),(eo.instantAnimations||eo.skipAnimations)&&(h=!0,ni(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!o&&void 0!==t.get()){let e=function(e,{repeat:t,repeatType:n="loop"},r){let i=e.filter(ru),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return i[o]}(d.keyframes,l);if(void 0!==e)return void eu.update(()=>{d.onUpdate(e),d.onComplete()})}return l.isSync?new n3(d):new rl(d)};function rp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(o=r);let l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(void 0===i||u&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(u,t))continue;let a={delay:n,...nt(o||{},t)},c=r.get();if(void 0!==c&&!r.isAnimating&&!Array.isArray(i)&&i===c&&!a.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=e.props[t6];if(n){let e=window.MotionHandoffAnimation(n,t,eu);null!==e&&(a.startTime=e,d=!0)}}nr(e,t),r.start(rf(t,r,i,e.shouldReduceMotion&&$.has(t)?{type:!1}:a,e,d));let h=r.animation;h&&l.push(h)}return a&&Promise.all(l).then(()=>{eu.update(()=>{a&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=ne(e,t)||{};for(let t in i={...i,...n}){var o;let n=nn(o=i[t])?o[o.length-1]||0:o;e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,e4(n))}}(e,a)})}),l}function rm(e,t,n,r=0,i=1){let o=Array.from(e).sort((e,t)=>
1e.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 rg(e,t,n={}){let r=ne(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(rp(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(rg(l,t,{...a,delay:n+("function"==typeof r?0:r)+rm(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())}}function ry(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 rv=td.length,rb=[...tc].reverse(),rx=tc.length;function rw(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rS(){return{animate:rw(!0),whileInView:rw(),whileHover:rw(),whileTap:rw(),whileDrag:rw(),whileFocus:rw(),exit:rw()}}class rk{constructor(e){this.isMounted=!1,this.node=e}update(){}}class rE extends rk{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=>rg(e,t,n)));else if("string"==typeof t)r=rg(e,t,n);else{let i="function"==typeof t?ne(e,t,n.custom):t;r=Promise.all(rp(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=rS(),r=!0,i=t=>(n,r)=>{let i=ne(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(o){let{props:a}=e,s=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<rv;e++){let r=td[e],i=t.props[r];(tu(i)||!1===i)&&(n[r]=i)}return n}(e.parent)||{},l=[],u=new Set,c={},d=1/0;for(let t=0;t<rx;t++){var h,f;let p=rb[t],m=n[p],g=void 0!==a[p]?a[p]:s[p],y=tu(g),v=p===o?m.isActive:null;!1===v&&(d=t);let b=g===s[p]&&g!==a[p]&&y;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),m.protectedKeys={...c},!m.isActive&&null===v||!g&&!m.prevProp||tl(g)||"boolean"==typeof g)continue;let x=(h=m.prevProp,"string"==typeof(f=g)?f!==h:!!Array.isArray(f)&&!ry(f,h)),w=x||p===o&&m.isActive&&!b&&y||t>d&&y,S=!1,k=Array.isArray(g)?g:[g],E=k.reduce(i(p),{});!1===v&&(E={});let{prevResolvedValues:C={}}=m,j={...C,...E},T=t=>{w=!0,u.has(t)&&(S=!0,u.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(!c.hasOwnProperty(e))(nn(t)&&nn(n)?ry(t,n):t===n)?void 0!==t&&u.has(e)?T(e):m.protectedKeys[e]=!0:null!=t?T(e):u.add(e)}m.prevProp=g,m.prevResolvedValues=E,m.isActive&&(c={...c,...E}),r&&e.blockInitialAnimation&&(w=!1);let A=b&&x,_=!A||S;w&&_&&l.push(...k.map(t=>{let n={type:p};if("string"==typeof t&&r&&!A&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=ne(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=rm(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if("boolean"!=typeof a.initial){let n=ne(e,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=rS()}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();tl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let rC=0;class rj extends rk{constructor(){super(...arguments),this.id=rC++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>
1{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}let rT={x:!1,y:!1};function rA(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}let r_=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function rM(e){return{point:{x:e.pageX,y:e.pageY}}}function rP(e,t,n,r){return rA(e,t,e=>r_(e)&&n(e,rM(e)),r)}function rR(e){return e.max-e.min}function rI(e,t,n,r=.5){e.origin=r,e.originPoint=k(t.min,t.max,e.origin),e.scale=rR(n)/rR(t),e.translate=k(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 rO(e,t,n,r){rI(e.x,t.x,n.x,r?r.originX:void 0),rI(e.y,t.y,n.y,r?r.originY:void 0)}function r$(e,t,n){e.min=n.min+t.min,e.max=e.min+rR(t)}function rD(e,t,n){e.min=t.min-n.min,e.max=e.min+rR(t)}function rL(e,t,n){rD(e.x,t.x,n.x),rD(e.y,t.y,n.y)}function rN(e){return[e("x"),e("y")]}let rz=({current:e})=>e?e.ownerDocument.defaultView:null,rV=(e,t)=>Math.abs(e-t);class rF{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=rH(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){return Math.sqrt(rV(e.x,t.x)**2+rV(e.y,t.y)**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=ed;this.history.push({...r,timestamp:i});let{onStart:o,onMove:a}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=rB(t,this.transformPagePoint),eu.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=rH("pointercancel"===e.type?this.lastMoveEventInfo:rB(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!r_(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;let a=rB(rM(e),this.transformPagePoint),{point:s}=a,{timestamp:l}=ed;this.history=[{...s,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,rH(a,this.history)),this.removeListeners=na(rP(this.contextWindow,"pointermove",this.handlePointerMove),rP(this.contextWindow,"pointerup",this.handlePointerUp),rP(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ec(this.updatePoint)}}function rB(e,t){return t?{point:t(e.point)}:e}function rU(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rH({point:e},t){return{point:e,delta:rU(e,rW(t)),offset:rU(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=rW(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ns(.1)));)n--;if(!r)return{x:0,y:0};let o=(i.timestamp-r.timestamp)/1e3;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 rW(e){return e[e.length-1]}function rY(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 rG(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 rq(e,t,n){return{min:rX(e,t),max:rX(e,n)}}function rX(e,t){return"number"==typeof e?e:e[t]||0}let rK=new WeakMap;class rZ{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=tr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let i=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(rM(e).point)},o=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"
1y"===e)if(rT[e])return null;else return rT[e]=!0,()=>{rT[e]=!1};return rT.x||rT.y?null:(rT.x=rT.y=!0,()=>{rT.x=rT.y=!1})}(n),!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),rN(e=>{let t=this.getAxisMotionValue(e).get()||0;if(B.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=rR(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&eu.postRender(()=>i(e,t)),nr(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},a=(e,t)=>{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,t=10){let 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&&o(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>rN(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new rF(e,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:rz(this.visualElement)})}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&&eu.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!rJ(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?k(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?k(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&t4(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:rY(e.x,n,i),y:rY(e.y,t,r)}}(n.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:rq(e,"left","right"),y:rq(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&rN(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t4(t))return!1;let r=t.current;Z(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=function(e,t,n){let r=O(e,n),{scroll:i}=t;return i&&(P(r.x,i.offset.x),P(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a=(e=i.layout.layoutBox,{x:rG(e.x,o.x),y:rG(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=S(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(rN(a=>{if(!rJ(a,t,this.currentDirection))return;let l=s&&s[a]||{};o&&(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 nr(this.visualElement,e),n.start(rf(e,n,0,t,this.visualElement,!1))}stopAnimation(){rN(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){rN(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){rN(t=>{let{drag:n}=this.getProps();if(!rJ(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];i.set(e[t]-k(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!t4(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};rN(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();r[e]=function(e,t){let n=.5,r=rR(e),i=rR(t);return i>r?n=nK(t.min,t.max-r,e.min):r>i&&(n=nK(e.min,e.max-i,t.min)),D(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),rN(t=>{if(!rJ(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(k(i,o,r[t]))})}addListeners(){if(!this.visualElement.current)return;rK.set(this.visualElement,this);let e=rP(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:n=!0}
1=this.getProps();t&&n&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();t4(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),eu.read(t);let i=rA(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rN(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),r(),o&&o()}}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}}}function rJ(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}class rQ extends rk{constructor(e){super(e),this.removeGroupControls=ei,this.removeListeners=ei,this.controls=new rZ(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ei}unmount(){this.removeGroupControls(),this.removeListeners()}}let r0=e=>(t,n)=>{e&&eu.postRender(()=>e(t,n))};class r1 extends rk{constructor(){super(...arguments),this.removePointerDownListener=ei}onPointerDown(e){this.session=new rF(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rz(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:r0(e),onStart:r0(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&eu.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=rP(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var r2=n(79718);let r5={hasAnimatedSinceResize:!0,hasEverUpdated:!1},r3=!1;class r4 extends i.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),r3&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),r5.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,r3=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||eu.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),e8.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r3=!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 r6(e){let[t,n]=(0,r2.xQ)(),r=(0,i.useContext)(tF.L);return(0,tV.jsx)(r4,{...e,layoutGroup:r,switchLayoutGroup:(0,i.useContext)(t8),isPresent:t,safeToRemove:n})}var r8=n(97843);function r9(e){return(0,r8.G)(e)&&"ownerSVGElement"in e}let r7=(e,t)=>e.depth-t.depth;class ie{constructor(){this.children=[],this.isDirty=!1}add(e){e0(this.children,e),this.isDirty=!0}remove(e){e1(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(r7),this.isDirty=!1,this.children.forEach(e)}}let it=["TopLeft","TopRight","BottomLeft","BottomRight"],ir=it.length,ii=e=>"string"==typeof e?parseFloat(e):e,io=e=>"number"==typeof e||U.test(e);function ia(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let is=iu(0,.5,nW),il=iu(.5,.95,ei);function iu(e,t,n){return r=>r<e?0:r>t?1:n(nK(e,t,r))}function ic(e,t){e.min=t.min,e.max=t.max}function id(e,t){ic(e.x,t.x),ic(e.y,t.y)}function ih(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ip(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 im(e,t,[n,r,i],o,a){!function(e,t=0,n=1,r=.5,i,o=e,a=e){if(B.test(t)&&(t=parseFloat(t),t=k(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=k(o.min,o.max,r);
1e===o&&(s-=t),e.min=ip(e.min,t,n,s,i),e.max=ip(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,o,a)}let ig=["x","scaleX","originX"],iy=["y","scaleY","originY"];function iv(e,t,n,r){im(e.x,t,ig,n?n.x:void 0,r?r.x:void 0),im(e.y,t,iy,n?n.y:void 0,r?r.y:void 0)}function ib(e){return 0===e.translate&&1===e.scale}function ix(e){return ib(e.x)&&ib(e.y)}function iw(e,t){return e.min===t.min&&e.max===t.max}function iS(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ik(e,t){return iS(e.x,t.x)&&iS(e.y,t.y)}function iE(e){return rR(e.x)/rR(e.y)}function iC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ij{constructor(){this.members=[]}add(e){e0(this.members,e),e.scheduleRender()}remove(e){if(e1(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t,n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let iT={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},iA=["","X","Y","Z"],i_=0;function iM(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=i_++,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,es.value&&(iT.nodes=iT.calculatedTargetDeltas=iT.calculatedProjections=0),this.nodes.forEach(iO),this.nodes.forEach(iF),this.nodes.forEach(iB),this.nodes.forEach(i$),es.addProjectionMetrics&&es.addProjectionMetrics(iT)},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 ie)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new e2),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=r9(t)&&!(r9(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,r=0,i=()=>this.root.updateBlockedByResize=!1;eu.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=eQ.now(),r=({timestamp:t})=>{let i=t-n;i>=250&&(ec(r),e(i-250))};return eu.setup(r,!0),()=>ec(r)}(i,250),r5.hasAnimatedSinceResize&&(r5.hasAnimatedSinceResize=!1,this.nodes.forEac
1h(iV)))})}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()||iq,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!ik(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={...nt(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||iV(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(),ec(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(iU),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[t6];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",eu,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(iL);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(iN);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(iz),this.nodes.forEach(iR),this.nodes.forEach(iI)):this.nodes.forEach(iN),this.clearAllSnapshots();let e=eQ.now();ed.delta=D(0,1e3/60,e-ed.timestamp),ed.timestamp=e,ed.isProcessing=!0,eh.update.process(ed),eh.preRender.process(ed),eh.render.process(ed),ed.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,e8.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(iD),this.sharedNodes.forEach(iH)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eu.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eu.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||rR(this.snapshot.measuredBox.x)||rR(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=tr(),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&&!ix(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||j(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)),iZ((t=r).x),iZ(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return tr();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(iQ))){let{scroll:e}=this.root;e&&(P(t.x,e.offset.x),P(t.y,e.offset.y))}return t}removeElementScroll(e){let t=tr();if(id(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&&id(t,e),P(t.x,i.offset.x),P(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=tr();id(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&I(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),j(r.latestValues)&&I(n,r.latestValues)}return j(this.latestValues)&&I(n,this.latestValues),n}removeTransform(e){let t=tr();id(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!j(n.latestValues))continue;C(n.latestValues)&&n.updateSnapshot();let r=tr();id(r,n.measurePageBox()),iv(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return j(this.latestValues)&&iv(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!==ed.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=ed.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=tr(),this.targetWithTransforms=tr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,s,l;this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,r$(a.x,s.x,l.x),r$(a.y,s.y,l.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):id(this.target,this.layout.layoutBox),M(this.target,this.targetDelta)):id(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),es.value&&iT.calculatedTargetDeltas++}}getClosestProjectingParent(){if(!(!this.parent||C(this.parent.latestValues)||T(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return 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=tr(),this.relativeTargetOrigin=tr(),rL(this.relativeTargetOrigin,t,n),id(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===ed.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;id(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){let i,o,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&&I(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,M(e,o)),r&&j(i.latestValues)&&I(e,i.latestValues))}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=tr());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(ih(this.prevProjectionDelta.x,this.projectionDelta.x),ih(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rO(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&iC(this.projectionDelta.x,this.prevProjectionDelta.x)&&iC(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),es.value&&iT.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=tt(),this.projectionDelta=tt(),this.projectionDeltaWithTransform=tt()}setAnimationOrigin(e,t=!1){let n,r=this.snapshot,i=r?r.latestValues:{},o={...this.latestValues},a=tt();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=tr(),l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),c=!u||u.members.length<=1,d=!!(l&&!c&&!0===this.options.crossfade&&!this.path.some(iG));this.animationProgress=0,this.mixTargetDelta=t=>{let r=t/1e3;if(iW(a.x,e.x,r),iW(a.y,e.y,r),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,h,f,p,m,g;rL(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f=this.relativeTarget,p=this.relativeTargetOrigin,m=s,g=r,iY(f.x,p.x,m.x,g),iY(f.y,p.y,m.y,g),n&&(u=this.relativeTarget,h=n,iw(u.x,h.x)&&iw(u.y,h.y))&&(this.isProjectionDirty=!1),n||(n=tr()),id(n,this.relativeTarget)}l&&(this.animationValues=o,function(e,t,n,r,i,o){i?(e.opacity=k(0,n.opacity??1,is(r)),e.opacityExit=k(t.o
1pacity??1,0,il(r))):o&&(e.opacity=k(t.opacity??1,n.opacity??1,r));for(let i=0;i<ir;i++){let o=`border${it[i]}Radius`,a=ia(t,o),s=ia(n,o);(void 0!==a||void 0!==s)&&(a||(a=0),s||(s=0),0===a||0===s||io(a)===io(s)?(e[o]=Math.max(k(ii(a),ii(s),r),0),(B.test(s)||B.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=k(t.rotate||0,n.rotate||0,r))}(o,i,this.latestValues,r,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ec(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=eu.update(()=>{r5.hasAnimatedSinceResize=!0,nl.layout++,this.motionValue||(this.motionValue=e4(0)),this.currentAnimation=function(e,t,n){let r=eZ(e)?e:e4(e);return r.start(rf("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{nl.layout--},onComplete:()=>{nl.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&iJ(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||tr();let t=rR(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=rR(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}id(t,n),I(t,i),rO(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ij),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&&iM("z",e,r,this.animationValues);for(let t=0;t<iA.length;t++)iM(`rotate${iA[t]}`,e,r,this.animationValues),iM(`skew${iA[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=t0(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=t0(t?.pointerEvents)||""),this.hasProjected&&!j(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,rotateX:i,rotateY:o,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}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,tj){if(void 0===i[t])continue;let{correct:n,applyTo:a,isCSSVariable:s}=tj[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?t0(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(iL),this.root.sharedNodes.clear()}}}function iR(e){e.updateLayout()}function iI(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;"size"===i?rN(e=>{let r=o?t.measuredBox[e]:t.layoutBox[e],i=rR(r);r.min=n[e].min,r.max=r.min+i}):iJ(i,t.layoutBox,n)&&rN(r=>{let i=o?t.measuredBox[r]:t.layoutBox[r],a=rR(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=tt();rO(a,n,t.layoutBox);let s=tt();o?rO(s,e.applyTransform(r,!0),t.measuredBox):rO(s,n,t.layoutBox);let l=!ix(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=tr();rL(a,t.layoutBox,i.layoutBox);let s=tr();rL(s,n,o.layoutBox),ik(a,s)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,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 iO(e){es.value&&iT.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 i$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function iD(e){e.clearSnapshot()}function iL(e){e.clearMeasurements()}function iN(e){e.isLayoutDirty=!1}function iz(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function iV(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iF(e){e.resolveTargetDelta()}function iB(e){e.calcProjection()}function iU(e){e.resetSkewAndRotation()}function iH(e){e.removeLeadSnapshot()}function iW(e,t,n){e.translate=k(t.translate,0,n),e.scale=k(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function iY(e,t,n,r){e.min=k(t.min,n.min,r),e.max=k(t.max,n.max,r)}function iG(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let iq={duration:.45,ease:[.4,0,.1,1]},iX=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),iK=iX("applewebkit/")&&!iX("chrome/")?Math.round:ei;function iZ(e){e.min=iK(e.min),e.max=iK(e.max)}function iJ(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(iE(t)-iE(n)))}function iQ(e){return e!==e.root&&e.scroll?.wasRoot}let i0=iP({attachResizeListener:(e,t)=>rA(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),i1={current:void 0},i2=iP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!i1.current){let e=new i0({});e.mount(window),e.setOptions({layoutScroll:!0}),i1.current=e}return i1.current},resetTransform:(e,t)=>
1{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function i5(e,t){let n=function(e,t,n){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,n=(void 0)??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function i3(e){return!("touch"===e.pointerType||rT.x||rT.y)}function i4(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&eu.postRender(()=>i(t,rM(t)))}class i6 extends rk{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=i5(e,n),a=e=>{if(!i3(e))return;let{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;let o=e=>{i3(e)&&(r(e),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,i)};return r.forEach(e=>{e.addEventListener("pointerenter",a,i)}),o}(e,(e,t)=>(i4(this.node,t,"Start"),e=>i4(this.node,e,"End"))))}unmount(){}}class i8 extends rk{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=na(rA(this.node.current,"focus",()=>this.onFocus()),rA(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var i9=n(68227);let i7=(e,t)=>!!t&&(e===t||i7(e,t.parentElement)),oe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),ot=new WeakSet;function on(e){return t=>{"Enter"===t.key&&e(t)}}function or(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function oi(e){return r_(e)&&!(rT.x||rT.y)}function oo(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&&eu.postRender(()=>i(t,rM(t)))}class oa extends rk{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=i5(e,n),a=e=>{let r=e.currentTarget;if(!oi(e))return;ot.add(r);let o=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),ot.has(r)&&ot.delete(r),oi(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{a(e,r===window||r===document||n.useGlobalTarget||i7(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{((n.useGlobalTarget?window:e).addEventListener("pointerdown",a,i),(0,i9.s)(e))&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let r=on(()=>{if(ot.has(n))return;or(n,"down");let e=on(()=>{or(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>or(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),oe.has(e.tagName)||-1!==e.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(oo(this.node,t,"Start"),(e,{success:t})=>oo(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}let os=new WeakMap,ol=new WeakMap,ou=e=>{let t=os.get(e.target);t&&t(e)},oc=e=>{e.forEach(ou)},od={some:0,all:1};class oh extends rk{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:od[r]},a=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)};var s=this.node.current;let l=function({root:e,...t}){let n=e||document;ol.has(n)||ol.set(n,{});let r=ol.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(oc,{root:e,...t})),r[i]}(o);return os.set(s,a),l.observe(s),()=>{os.delete(s),l.unobserve(s)}}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}let of=function(e,t){if("undefined"==typeof Proxy)return t7;let n=new Map,r=(n,r)=>t7(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,t7(o,void 0,e,t)),n.get(o))})}({animation:{Feature:rE},exit:{Feature:rj},inView:{Feature:oh},tap:{Feature:oa},focus:{Feature:i8},hover:{Feature:i6},pan:{Feature:r1},drag:{Feature:rQ,ProjectionNode:i2,MeasureLayout:r6},layout:{ProjectionNode:i2,MeasureLayout:r6}},(e,t)=>tz(e)?new tL(t):new t_(t,{allowProjection:e!==i.Fragment}))},55202:e=>{e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;
1if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(i=n?n.call(r,c,d,u):void 0)||void 0===i&&c!==d)return!1}return!0}},58250:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},58379:(e,t,n)=>{e.exports="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},60292:(e,t,n)=>{var r=n(48805),i=n(38615),o=n(92534),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},64805:e=>{e.exports=function(e){return e.split("")}},68227:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});var r=n(97843);function i(e){return(0,r.G)(e)&&"offsetHeight"in e}},69893:(e,t,n)=>{"use strict";let r;n.r(t),n.d(t,{default:()=>sz});var i,o,a,s,l,u=n(54568),c=n(74607),d=n(2990),h=n(7620),f=n(97509),p=n(56416),m=n(53962),g=n(87991);function y(e){return e.split(/[[.\]]/g).filter(Boolean).map(e=>{var t;return 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):v.test(t=e)?Number(t):t})}let v=/^-?\d+$/,b=/^[a-z_$]+/;function x(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&&b.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function w(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,r,i,o,a;return{type:"patch",id:e.patch.id,patches:[..."set"in(n=t=e.patch)?Object.keys(n.set).map(e=>({path:y(e),op:{type:"set",value:n.set[e]}})):[],..."setIfMissing"in(r=t)?Object.keys(r.setIfMissing).map(e=>({path:y(e),op:{type:"setIfMissing",value:r.setIfMissing[e]}})):[],..."unset"in(i=t)?i.unset.map(e=>({path:y(e),op:{type:"unset"}})):[],..."inc"in(o=t)?Object.keys(o.inc).map(e=>({path:y(e),op:{type:"inc",amount:o.inc[e]}})):[],..."inc"in(a=t)?Object.keys(a.dec).map(e=>({path:y(e),op:{type:"dec",amount:a.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let t=function(e){let t=S.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${S.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!t)throw Error("Insert patch missing position");let n=y(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 S=["before","replace","after"];function k(e){return C(e)}function E(e){return e.flatMap(k)}function C(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:[x(t)]};if("insert"===n.type)return{insert:{[n.position]:x([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[x(t)]:n.value}};if("inc"===n.type)return{inc:{[x(t)]:n.amount}};if("dec"===n.type)return{dec:{[x(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[x(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${x(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>x([...t,{_key:e._key}])),insert:{[n.position]:x([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[x(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>x(t.concat(e)))};if("replace"===n.type)return{insert:{replace:x(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[x(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}function j(e){return Array.isArray(e)?e:[e]}var T=Object.freeze({__proto__:null,decode:function(e){return w(e)},decodeAll:function(e){return e.map(w)},encode:k,encodeAll:E,encodeMutation:C,encodeTransaction:function(e){return{transactionId:e.id,mutations:E(e.mutations)}}});function A(e,t,n){return{type:"insert",referenceItem:n,position:t,items:j(e)}}function _(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function M(e){return{type:"remove",referenceItem:e}}
1function P(e,t){return{path:"string"==typeof e?y(e):e,op:t}}var R=n(19544);let I=(0,R.H6)(),O=I,$=new Set,D=/_key\s*==\s*['"](.*)['"]/,L=/^\d*:\d*$/;function N(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function z(e){return"string"==typeof e?D.test(e.trim()):"object"==typeof e&&"_key"in e}let V=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,F=/_key\s*==\s*['"](.*)['"]/;function B(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(V);if(!t)throw Error("Invalid path string");return t.map(U)}(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(N(t)){if(!Array.isArray(i))return n;i=i[t]}if(z(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 U(e){return N(e)?Number(e.replace(/[^\d]/g,"")):z(e)?{_key:e.match(F)[1]}:!function(e){if("string"==typeof e&&L.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 H(){return(0,h.useSyncExternalStore)(G,Y,W)}function W(){return I}function Y(){return O}function G(e){return $.add(e),()=>$.delete(e)}function q(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function X(e,t){let n=(0,d.Fk)(),r=(0,d.v$)();if(t===I||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let i=(0,p.T4)(e),o=(0,p.IM)(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,h=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:()=>h,publishedDoc:l,publishedId:o,get snapshot(){if(!c)throw Error(`Snapshot for document "${e}" not found`);return c}}}function K(){let e,t,n,r=(0,c.c)(7),i=H();r[0]!==i?(e=e=>({id:e,commit:()=>{let{draftDoc:t}=X(e,i);t.send({type:"submit"})},get:t=>{let{snapshot:n}=X(e,i);return t?B(n,t):n},getSnapshot:function(e,t){let{getSnapshot:n}=X(e,t);return n}(e,i),patch:async(t,n)=>{let r=X(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:j(c),...{}}]}),u&&("object"==typeof u&&"debounce"in u?q(()=>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}=X(e,i),{commit:o}=n||{},a=void 0===o||o;r.send({type:"mutate",mutations:t}),a&&("object"==typeof a&&"debounce"in a?q(()=>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 Z=(()=>{let e;return()=>{if(e)return e;e=[];for(let t=0;t<256;++t)e[t]=(t+256).toString(16).slice(1);return e}})();function J(e){let t=Z();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 Q(e){let t,n,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 ee(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:i}=Q(e),o=await t.getSnapshot(),a=B(o,r),s=B(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[P(r,_(l,l+1)),P(r,A(s,c,u))]}var et=n(89405);let en=(0,et.FsL)((0,et.YjP)(),(0,et.BpQ)(1)),er=(0,et.lqM)(en),ei=(0,et.Ikc)({baseUrl:en,dataset:er,id:en,path:en,projectId:er,tool:er,type:er,workspace:er,perspective:(0,et.NpB)((0,et.YjP)(),"drafts")}),eo=/^([\w-]+):(0|[1-9][0-9]*)$/,ea=/^([\w-]+):([0-9]+),([0-9]+)$/,es=/^([\w-]+):([\w-]+)$/,el=(0,et.FsL)((0,et.YjP)(),(0,et.BpQ)(1)),eu=(0,et.Ikc)({origin:el,href:el,data:(0,et.lqM)((0,et.g1P)((0,et.YjP)(),(0,et.L5J)()))});function ec(e){let t=(0,et.xLC)(ei,e);if(t.success)return t.output;let n=(0,et.xLC)(eu,e);if(n.success)try{let e=new URL(n.output.href,typeof document>"u"?"https://example.com":location.origin);return e.searchParams.size>
10?(0,et.qgA)(ei,Object.fromEntries(e.searchParams.entries())):n.output}catch(e){return console.error("Failed to parse sanity node",e),n.output}}var ed={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},eh={0:8203,1:8204,2:8205,3:65279},ef=[,,,,].fill(String.fromCodePoint(eh[0])).join(""),ep=Object.fromEntries(Object.entries(eh).map(e=>e.reverse())),em=Object.fromEntries(Object.entries(ed).map(e=>e.reverse())),eg=`${Object.values(ed).map(e=>`\\u{${e.toString(16)}}`).join("")}`,ey=RegExp(`[${eg}]{4,}`,"gu");let ev=[];for(let e=0;e<256;++e)ev.push((e+256).toString(16).slice(1));let eb=new Uint8Array(16);var ex={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ew(e,t,n){if(ex.randomUUID&&!e)return ex.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(eb)}();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(ev[e[t+0]]+ev[e[t+1]]+ev[e[t+2]]+ev[e[t+3]]+"-"+ev[e[t+4]]+ev[e[t+5]]+"-"+ev[e[t+6]]+ev[e[t+7]]+"-"+ev[e[t+8]]+ev[e[t+9]]+"-"+ev[e[t+10]]+ev[e[t+11]]+ev[e[t+12]]+ev[e[t+13]]+ev[e[t+14]]+ev[e[t+15]]).toLowerCase()}(i)}function eS(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function ek(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 eE(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function eC(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function ej(e,t,n){let r,i,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,ek(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)=>eC(t,{x:e.x1,y:e.y1})-eC(n,{x:e.x1,y:e.y1}))}(e,ek(a,Math.min(a.w,a.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?eC(o,e)<eC(o,r)&&(r=e,i=a):(r=e,i=a)}}return i||null}function eT(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 eA(e){let t=Math.max(0,Math.min(...e.map(e=>e.y))),n=Math.min(document.body.scrollHeight,Math.max(...e.map(e=>e.y+e.h)));return{min:t,max:n,height:n-t}}function e_(e,t){return t.find(t=>eE(eS(t.elements.element),e))?.sanity}function eM(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:e_(t.left,e)}:null,right:t.right?{rect:t.right,sanity:e_(t.right,e)}:null}:{top:t.top?{rect:t.top,sanity:e_(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:e_(t.bottom,e)}:null}}function eP(e){let t=document.body.getBoundingClientRect();return{x:Math.max(t.x,Math.min(e.clientX,t.x+t.width)),y:e.clientY+window.scrollY}}function eR(e,t,n){let r=eS(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=eT(eS(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 eI(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 eO(e){let t=function(e){let t=Math.max(0,Math.min(...e.map(e=>e.x))),n=Math.min(document.body.offsetWidth,Math.max(...e.map(e=>e.x+e.w)));return{min:t,max:n,width:n-t}}(e),n=eA(e),r=t.min>8&&t.min+t.width<=window.innerWidth-8,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 e$(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 eD=!1,eL={y:0},eN={x:0,y:0},ez=typeof document>
1"u"?0:document.documentElement.scrollHeight,eV=null,eF=e=>e instanceof HTMLElement||e instanceof SVGElement,eB=e=>e&&eF(e)?e.dataset?.sanityOverlayElement?e:eB(e.parentElement):null;function eU(e){return ey.lastIndex=0,ey.test(e)}function eH(e,t=!1){return eU(e)?function(e,t=!1){try{let n=function(e){let t=e.match(ey);if(t)return function(e,t=!1){let n=Array.from(e);if(n.length%2==0){if(n.length%4||!e.startsWith(ef))return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${em[e[2*t].codePointAt(0)]}${em[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=>ep[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}function eW(e){return"path"in e}function eY(e){if(!e.length||!e.map(e=>eW(e)).every((e,t,n)=>e===n[0]))return;if(!eW(e[0]))return e[0];let t=e.filter(eW),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)=>t===r[n]?[...e,t]:[],[]).reverse().join(".")}(n.path,i.path)}}return n}function eG(e){let t=e.lastIndexOf(".");return e.substring(t,e.length).includes("[")}function eq(e){if(!eG(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function eX(e,t){return!!eG(e.path)&&!!eG(t.path)&&eq(e.path)===eq(t.path)}function eK(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!eW(t)||!eG(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&&eW(o.sanity)&&eX(t,o.sanity)&&(null===i||i===s)&&l&&e.push(o),e},[]);return o.length<=1?null:o}let eZ=(0,h.createContext)(null);var eJ=n(68744),eQ=n(81715),e0=n(18956);function e1(e){let t=function e(t){var n;return!!(n=t)&&("object"==typeof n||"function"==typeof n)&&("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 e2(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 e5="all-items",e3={gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))"};function e4(e){let t,n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w=(0,c.c)(54),S=void 0===e.showIcons||e.showIcons,k=void 0===e.filter||"auto"===e.filter?e.schemaTypes.length>5:e.filter;w[0]!==e.groups||w[1]!==e.labels?(t=e.groups?[{name:e5,title:e.labels["insert-menu.filter.all-items"],selected:!0},...e.groups.map(e9)]:[],w[0]=e.groups,w[1]=e.labels,w[2]=t):t=w[2],w[3]!==e.views?(n=e.views??[{name:"list"}],w[3]=e.views,w[4]=n):n=w[4],w[5]!==n?(r=n.map(e8),w[5]=n,w[6]=r):r=w[6],w[7]!==t||w[8]!==r?(i={query:"",groups:t,views:r},w[7]=t,w[8]=r,w[9]=i):i=w[9];let[E,C]=(0,h.useReducer)(e2,i);if(w[10]!==e||w[11]!==k||w[12]!==S||w[13]!==E.groups||w[14]!==E.query||w[15]!==E.views){var j,T,A;let t,n,r,i=(j=e.schemaTypes,T=E.query,A=E.groups,j.filter(e=>(function(e,t){let n=t.find(e=>e.selected);return!n||n.name===e5||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,T))),c=E.views.find(e6),h=k||E.views.length>1,v=E.groups&&E.groups.length>0,b=h||v;s=m.W1,y=0,a=m.so,f="column",p="fill",w[25]!==b?(t=b?{style:{borderBottom:"1px solid var(--card-border-color)"},paddingBottom:1}:{},w[25]=b,w[26]=t):t=w[26],w[27]!==e.labels||w[28]!==k||w[29]!==h||w[30]!==E.query||w[31]!==E.views?(n=h?(0,u.jsxs)(m.so,{flex:"none",align:"center",paddingTop:1,paddingX:1,gap:1,children:[k?(0,u.jsx)(m.az,{flex:1,children:(0,u.jsx)(m.ks,{autoFocus:!0,border:!1,fontSize:1,icon:eJ.WIv,onChange:e=>{C({type:"change query",query:e.target.value})},placeholder:e.labels["insert-menu.search.placeholder"],value:E.query})}):null,E.views.length>1?(0,u.jsx)(m.az,{flex:"none",children:(0,u.jsx)(tt,{views:E.views,onToggle:e=>{C({type:"toggle view",name:e})},labels:e.labels})}):null]}):null,w[27]=e.labels,w[28]=k,w[29]=h,w[30]=E.query,w[31]=E.views,w[32]=n):n=w[32],w[33]!==v||w[34]!==E.groups?(r=v?(0,u.jsx)(m.az,{paddingTop:1,paddingX:1,children:(0,u.jsx)(m.wb,{space:1,children:E.groups.map(e=>(0,u.jsx)(m.oz,{id:`${e.name}-tab`,"aria-controls":`${e.name}-panel`,label:e.title??eQ(e.name),selected:e.selected,onClick:()=>{C({type:"select group",name:e.name})}},e.name))})}):null,w[33]=v,w[34]=E.groups,w[35]=r):r=w[35],w[36]!==t||w[37]!==n||w[38]!==r?(g=(0,u.jsxs)(m.az,{...t,children:[n,r]}),w[36]=t,w[37]=n,w[38]=r,w[39]=g):g=w[39],o=m.az,l=1,d=0===i.length?(0,u.jsx)(m.az,{padding:2,children:(0,u.jsx)(m.EY,{muted:!0,size:1,children:e.labels["insert-menu.search.no-results"]})}):c?"grid"===c.name?(0,u.jsx)(m.xA,{autoRows:"auto",flex:1,gap:1,style:e3,children:i.map(t=>(0,u.jsx)(tr,{icon:S?e1(t):void 0,onClick:()=>{e.onSelect(t)},previewImageUrl:c.previewImageUrl?.(t.name),schemaType:t}
1,t.name))}):(0,u.jsx)(m.BJ,{flex:1,space:1,children:i.map(t=>(0,u.jsx)(m.Dr,{icon:S?e1(t):void 0,onClick:()=>{e.onSelect(t)},text:t.title??eQ(t.name)},t.name))}):null,w[10]=e,w[11]=k,w[12]=S,w[13]=E.groups,w[14]=E.query,w[15]=E.views,w[16]=o,w[17]=a,w[18]=s,w[19]=l,w[20]=d,w[21]=f,w[22]=p,w[23]=g,w[24]=y}else o=w[16],a=w[17],s=w[18],l=w[19],d=w[20],f=w[21],p=w[22],g=w[23],y=w[24];return w[40]!==o||w[41]!==l||w[42]!==d?(v=(0,u.jsx)(o,{padding:l,children:d}),w[40]=o,w[41]=l,w[42]=d,w[43]=v):v=w[43],w[44]!==a||w[45]!==v||w[46]!==f||w[47]!==p||w[48]!==g?(b=(0,u.jsxs)(a,{direction:f,height:p,children:[g,v]}),w[44]=a,w[45]=v,w[46]=f,w[47]=p,w[48]=g,w[49]=b):b=w[49],w[50]!==s||w[51]!==b||w[52]!==y?(x=(0,u.jsx)(s,{padding:y,children:b}),w[50]=s,w[51]=b,w[52]=y,w[53]=x):x=w[53],x}function e6(e){return e.selected}function e8(e,t){return{...e,selected:0===t}}function e9(e){return{...e,selected:!1}}let e7={grid:eJ.jxC,list:eJ.r$9},te={grid:"insert-menu.toggle-grid-view.tooltip",list:"insert-menu.toggle-list-view.tooltip"};function tt(e){let t,n,r,i,o=(0,c.c)(11),a=e.views.findIndex(tn),s=e.views[a+1]??e.views[0],l=e.labels[te[s.name]];o[0]!==l?(t=(0,u.jsx)(m.EY,{size:1,children:l}),o[0]=l,o[1]=t):t=o[1];let d=e7[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]!==d||o[6]!==n?(r=(0,u.jsx)(m.$n,{mode:"bleed",icon:d,onClick:n}),o[5]=d,o[6]=n,o[7]=r):r=o[7],o[8]!==t||o[9]!==r?(i=(0,u.jsx)(m.m_,{content:t,placement:"top",portal:!0,children:r}),o[8]=t,o[9]=r,o[10]=i):i=o[10],i}function tn(e){return e.selected}function tr(e){let t,n,r,i,o,a,s,l,d,f=(0,c.c)(19),[p,g]=(0,h.useState)(!1),y=e.icon;f[0]===Symbol.for("react.memo_cache_sentinel")?(t={overflow:"hidden"},f[0]=t):t=f[0],f[1]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:"var(--card-muted-bg-color)",paddingBottom:"66.6%",position:"relative"},f[1]=n):n=f[1],f[2]!==y?(r=(0,e0.isValidElementType)(y)?(0,u.jsx)(m.so,{align:"center",justify:"center",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,u.jsx)(m.EY,{size:1,children:(0,u.jsx)(y,{})})}):null,f[2]=y,f[3]=r):r=f[3],f[4]!==p||f[5]!==e.previewImageUrl?(i=!e.previewImageUrl||p?null:(0,u.jsx)("img",{src:e.previewImageUrl,style:{objectFit:"contain",width:"100%",height:"100%",position:"absolute",inset:0},onError:()=>{g(!0)}}),f[4]=p,f[5]=e.previewImageUrl,f[6]=i):i=f[6],f[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,u.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}}),f[7]=o):o=f[7],f[8]!==r||f[9]!==i?(a=(0,u.jsxs)(m.az,{flex:"none",style:n,children:[r,i,o]}),f[8]=r,f[9]=i,f[10]=a):a=f[10];let v=e.schemaType.title??e.schemaType.name;return f[11]!==v?(s=(0,u.jsx)(m.az,{flex:1,padding:2,children:(0,u.jsx)(m.EY,{size:1,weight:"medium",children:v})}),f[11]=v,f[12]=s):s=f[12],f[13]!==a||f[14]!==s?(l=(0,u.jsxs)(m.so,{direction:"column",gap:1,padding:1,children:[a,s]}),f[13]=a,f[14]=s,f[15]=l):l=f[15],f[16]!==e.onClick||f[17]!==l?(d=(0,u.jsx)(m.Dr,{padding:0,radius:2,onClick:e.onClick,style:t,children:l}),f[16]=e.onClick,f[17]=l,f[18]=d):d=f[18],d}function ti(e){if(!e)return(0,u.jsx)(eJ.XRf,{});if("string"===e.type)return(0,u.jsx)(eJ.H3M,{});if("number"===e.type)return(0,u.jsx)(eJ.bZn,{});let{value:t}=e;if("icon"in e&&e.icon)return(0,u.jsx)("div",{dangerouslySetInnerHTML:{__html:e.icon}});let{type:n}=t;if("string"===n)return(0,u.jsx)(eJ.H3M,{});if("boolean"===n)return(0,u.jsx)(eJ.Dee,{});if("number"===n)return(0,u.jsx)(eJ.bZn,{});if("array"===n||"union"===n)return(Array.isArray(t.of)?t.of:[t.of]).some(e=>"name"in e&&"block"===e.name)?(0,u.jsx)(eJ.a1,{}):(0,u.jsx)(eJ.Ss4,{});if("object"===n){if("image"===e.name)return(0,u.jsx)(eJ.xfq,{});if("block"===e.name)return(0,u.jsx)(eJ.H3M,{})}return(0,u.jsx)(eJ.XRf,{})}let to=(0,g.AH)`
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`,ta=g.I4.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&&to}
27`,ts=g.I4.div`
28  background: transparent;
29  height: 100%;
30  inset: 0;
31  position: absolute;
32  width: 100%;
33`,tl=e=>{let t,n=(0,c.c)(2);return n[0]!==e?(t=(0,u.jsx)(m.ZL,{children:(0,u.jsx)(tu,{...e})}),n[0]=e,n[1]=t):t=n[1],t},tu=e=>{let t,n,r=(0,c.c)(7),{children:i,onDismiss:o,setBoundaryElement:a,blockScroll:s}=e,l=void 0===s||s;return r[0]!==o?(t=(0,u.jsx)(ts,{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,u.jsxs)(ta,{"data-sanity-overlay-element":!0,ref:a,onClick:tc,$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 tc(e){e.stopPropagation()}function td(e){return{type:"log",name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}let th={"Visual Editing Drag Sequence Completed":td({name:"Visual Editing Drag Sequence Completed",description:"An array is successfully reordered using drag and drop.",version:1}),"Visual Editing Drag Minimap Enabled":td({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":td({name:"Visual Editing Context Menu Item Removed",description:"An item is removed using the Context Menu.",version:1}),"Visual Editing Context Menu Item Duplicated":td({name:"Visual Editing Context Menu Item Duplicated",description:"An item is duplicated using the Context Menu.",version:1}),"Visual Editing Context Menu Item Moved":td({name:"Visual Editing Context Menu Item Moved",description:"An item is moved using the Context Menu.",version:1}),"Visual Editing Context Menu Item Inserted":td({name:"Visual Editing Context Menu Item Inserted",description:"An item is inserted using the Context Menu.",version:1}),"Visual Editing Insert Menu Item Inserted":td({name:"Visual Editing Insert Menu Item Inserted",description:"An item is inserted using the Insert Menu.",version:1}),"Visual Editing Overlay Clicked":td({name:"Visual Editing Overlay Clicked",description:"An Overlay is clicked.",version:1})},tf=(0,h.createContext)(void 0);function tp(){let e=(0,h.useContext)(tf);if(!e)throw Error("Telemetry context is missing");return e}let tm={"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"},tg=e=>{let t,n,r,i,o=(0,c.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(ty),o[2]=l.views,o[3]=n):n=o[3];let d=n;return o[4]!==a.of?(r=a.of.map(tv),o[4]=a.of,o[5]=r):r=o[5],o[6]!==l||o[7]!==s||o[8]!==r||o[9]!==d?(i=(0,u.jsx)(e4,{...l,labels:tm,schemaTypes:r,onSelect:s,views:d}),o[6]=l,o[7]=s,o[8]=r,o[9]=d,o[10]=i):i=o[10],i};function ty(e){return"grid"===e.name?{...e,previewImageUrl:t=>e.previewImageUrls?.[t]}:e}function tv(e){return{...e,icon:ti(e)}}let tb=e=>{let t,n,r,i,o,a=(0,c.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,u.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 tx=n(96880),tw=n(46392),tS=n(55086);function tk(e){if(!(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex")||((0,m.nY)(e)?!!e.href&&"ignore"!==e.rel:(0,m.A3)(e)?"hidden"
33!==e.type&&"file"!==e.type&&!e.disabled:!!((0,m.WE)(e)||(0,m.q4)(e)||(0,m.QY)(e))&&!e.disabled)))return!1;try{e.focus()}catch{}return document.activeElement===e}function tE(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if((0,m.sb)(n)&&(tk(n)||tE(n)))return!0}return!1}n(91879);let tC=g.I4.div.withConfig({displayName:"StyledAutocomplete",componentId:"sc-1igauft-0"})`line-height:0;`,tj=(0,g.I4)(m.az).withConfig({displayName:"ListBox",componentId:"sc-1igauft-1"})`& > ul{list-style:none;padding:0;margin:0;}`,tT=(0,g.i7)`
34  from {
35    transform: rotate(0deg);
36  }
37
38  to {
39    transform: rotate(360deg);
40  }
41`,tA=(0,g.I4)(eJ.Nl1).withConfig({displayName:"AnimatedSpinnerIcon",componentId:"sc-1igauft-2"})`animation:${tT} 500ms linear infinite;`;function t_(e){let t,n,r,i=(0,tx.c)(11),{children:o,id:a,onSelect:s,selected:l,value:c}=e;i[0]!==s||i[1]!==c?(t=()=>{setTimeout(()=>{s(c)},0)},i[0]=s,i[1]=c,i[2]=t):t=i[2];let d=t;i[3]!==d?(n=e=>{"Enter"!==e.key||(0,m.zd)(e.currentTarget)||d()},i[3]=d,i[4]=n):n=i[4];let h=n;return i[5]!==o||i[6]!==d||i[7]!==h||i[8]!==a||i[9]!==l?(r=(0,u.jsx)("li",{"aria-selected":l,"data-ui":"AutocompleteOption",id:a,role:"option",onClick:d,onKeyDown:h,children:o}),i[5]=o,i[6]=d,i[7]=h,i[8]=a,i[9]=l,i[10]=r):r=i[10],r}function tM(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 tP=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],tR=["bottom-start","top-start"],tI=(e,t)=>t?t.value:e,tO=(e,t)=>t.value.toLowerCase().indexOf(e.toLowerCase())>-1;(0,h.forwardRef)(function(e,t){let{border:n=!0,customValidity:r,disabled:i,filterOption:o,fontSize:a=2,icon:s,id:l,listBox:c=m.sU,loading:d,onBlur:f,onChange:p,onFocus:g,onQueryChange:y,onSelect:v,openButton:b,openOnFocus:x,options:w,padding:S=3,popover:k=m.sU,prefix:E,radius:C=2,readOnly:j,relatedElements:T,renderOption:A,renderPopover:_,renderValue:M=tI,suffix:P,value:R,...I}=e,[O,$]=(0,h.useReducer)(tM,{activeValue:R||null,focused:!1,listFocused:!1,query:null,value:R||null}),{activeValue:D,focused:L,listFocused:N,query:z,value:V}=O,F=(0,h.useCallback)(({value:e})=>(0,u.jsx)(m.Zp,{"data-as":"button",padding:S,radius:2,tone:"inherit",children:(0,u.jsx)(m.EY,{size:a,textOverflow:"ellipsis",children:e})}),[a,S]),B="function"==typeof A?A:F,U="function"==typeof o?o:tO,H=(0,h.useRef)(null),W=(0,h.useRef)(null),Y=(0,h.useRef)(null),G=(0,h.useRef)(null),q=(0,h.useRef)(!1),X=(0,h.useRef)(V),K=(0,h.useRef)(R),Z=(0,h.useRef)(!1);(0,h.useImperativeHandle)(t,()=>Y.current);let J=`${l}-listbox`,Q=Array.isArray(w)?w:m.Ml,ee=(0,m.KC)(S),et=(0,h.useMemo)(()=>null!==V?Q.find(e=>e.value===V):void 0,[Q,V]),en=(0,h.useMemo)(()=>Q.filter(e=>!z||U(z,e)),[U,Q,z]),er=en.length,ei=D?`${l}-option-${D}`:void 0,eo=null!==z&&d||L&&null!==z,ea=(0,h.useCallback)(e=>{setTimeout(()=>{if(Z.current)return;let t=(T||[]).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"}),Z.current=!1,y&&y(null),f&&f(e))},0)},[f,y,T]),es=(0,h.useCallback)(e=>{let t=G.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,h.useCallback)(e=>{$({type:"value/change",value:e}),Z.current=!1,v&&v(e),X.current=e,p&&p(e),y&&y(null),Y.current?.focus()},[p,v,y]),eu=(0,h.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"}),Z.current=!1,y&&y(null),Y.current?.focus();return}let t=e.target,n=G.current;
41if((n===t||n?.contains(t))&&!tP.includes(e.key))return void Y.current?.focus()},[D,en,er,y]),ec=(0,h.useCallback)(e=>{let t=e.currentTarget.value;$({type:"input/change",query:t}),y&&y(t)},[y]),ed=(0,h.useCallback)(()=>{$({type:"root/open",query:V?M(V,et):""})},[et,M,V]),eh=(0,h.useCallback)(e=>{L||($({type:"input/focus"}),g&&g(e),x&&ed())},[L,g,x,ed]),ef=(0,h.useCallback)(()=>{Z.current=!0},[]),ep=(0,h.useCallback)(()=>{Z.current=!1},[]),em=(0,h.useCallback)(()=>{$({type:"root/clear"}),X.current="",p&&p(""),y&&y(null),Y.current?.focus()},[p,y]),eg=(0,h.useCallback)(()=>{$({type:"input/focus"})},[]);(0,h.useEffect)(()=>{if(R!==K.current){K.current=R,void 0!==R&&($({type:"value/change",value:R}),X.current=R);return}R!==X.current&&(X.current=R||null,$({type:"value/change",value:R||null}))},[R]),(0,h.useEffect)(()=>{!L&&X.current&&$({type:"root/setActiveValue",value:X.current})},[L]),(0,h.useEffect)(()=>{let e=G.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;tE(r)}}},[D,en]);let ey=(0,h.useMemo)(()=>{if(!d&&!i&&V)return{"aria-label":"Clear",onFocus:eg}},[i,eg,d,V]),ev=(0,h.useMemo)(()=>ee.map(e=>0===e?0:1===e||2===e?1:e-2),[ee]),eb=(0,h.useMemo)(()=>ee.map(e=>Math.max(e-1,0)),[ee]),ex=(0,h.useMemo)(()=>"object"==typeof b?b:m.sU,[b]),ew=(0,h.useCallback)(e=>{ed(),ex.onClick&&ex.onClick(e),function(e){requestAnimationFrame(e)}(()=>Y.current?.focus())},[ex,ed]),eS=(0,h.useMemo)(()=>i||j||!b?void 0:(0,u.jsx)(m.az,{"aria-hidden":eo,padding:ev,children:(0,u.jsx)(m.$n,{"aria-label":"Open",disabled:eo,fontSize:a,icon:eJ.D3D,mode:"bleed",padding:eb,...ex,onClick:ew})}),[i,eo,a,ew,b,ev,eb,ex,j]),ek=(0,h.useMemo)(()=>null===z?null!==V?M(V,et):"":z,[et,z,M,V]),eE=(0,u.jsx)(m.ks,{...I,"aria-activedescendant":ei,"aria-autocomplete":"list","aria-expanded":eo,"aria-owns":J,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border:n,clearButton:ey,customValidity:r,disabled:i,fontSize:a,icon:s,iconRight:d&&tA,id:l,inputMode:"search",onChange:ec,onClear:em,onFocus:eh,padding:ee,prefix:E,radius:C,readOnly:j,ref:Y,role:"combobox",spellCheck:!1,suffix:P||eS,value:ek}),eC=(0,h.useCallback)(e=>{"Tab"===e.key&&N&&Y.current?.focus()},[N]),ej=(0,h.useMemo)(()=>0===en.length?null:(0,u.jsx)(tj,{"data-ui":"AutoComplete__results",onKeyDown:eC,padding:1,...c,tabIndex:-1,children:(0,u.jsx)(m.BJ,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:J,ref:G,role:"listbox",space:1,children:en.map(e=>{let t=null!==D?e.value===D:et===e;return(0,u.jsx)(t_,{id:`${l}-option-${e.value}`,onSelect:el,selected:t,value:e.value,children:(0,h.cloneElement)(B(e),{disabled:d,selected:t,tabIndex:N&&t?0:-1})},e.value)})})}),[D,et,en,el,eC,l,c,J,N,d,B]),eT=(0,h.useMemo)(()=>_?_({content:ej,hidden:!eo,inputElement:Y.current,onMouseEnter:ef,onMouseLeave:ep},W):0===er?null:(0,u.jsx)(m.AM,{arrow:!1,constrainSize:!0,content:ej,fallbackPlacements:tR,matchReferenceWidth:!0,onMouseEnter:ef,onMouseLeave:ep,open:eo,overflow:"auto",placement:"bottom-start",portal:!0,radius:C,ref:W,referenceElement:Y.current,...k}),[ej,eo,er,ef,ep,k,C,_]);return(0,u.jsxs)(tC,{"data-ui":"Autocomplete",onBlur:ea,onFocus:es,onKeyDown:eu,ref:H,children:[eE,eT]})}).displayName="ForwardRef(Autocomplete)";let t$=g.I4.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;`,tD=(0,g.I4)(m.$n).withConfig({displayName:"ExpandButton",componentId:"sc-1es8h8q-1"})`appearance:none;margin:-4px;`;(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,c,d,f,p,g,y=(0,tx.c)(44);y[0]!==e?({children:n,maxLength:r,separator:o,space:a,...i}=e,y[0]=e,y[1]=n,y[2]=r,y[3]=i,y[4]=o,y[5]=a):(n=y[1],r=y[2],i=y[3],o=y[4],a=y[5]);let v=(0,m.KC)(void 0===a?2:a),[b,x]=(0,h.useState)(!1),w=(0,h.useRef)(null),S=(0,h.useRef)(null);y[6]===Symbol.for("react.memo_cache_sentinel")?(s=()=>x(!1),y[6]=s):s=y[6];let k=s;y[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>x(!0),y[7]=l):l=y[7];let E=l;y[8]===Symbol.for("react.memo_cache_sentinel")?(c=()=>[w.current,S.current],y[8]=c):c=y[8],(0,m.PR)(k,c),y[9]!==n?(d=h.Children.toArray(n).filter(h.isValidElement),y[9]=n,y[10]=d):d=y[10];let C=d;e:{let e=C.length;if(r&&e>r){let t,n=Math.ceil(r/2),i=Math.floor(r/2);if(y[11]!==i||y[12]!==n||y[13]!==e||y[14]!==b||y[15]!==C||y[16]!==v){let r,o,a,s,l=C.slice(0,n-1);y[18]!==i||y[19]!==n||y[20]!==e||y[21]!==C?(r=C.slice(n-1,e-i),y[18]=i,y[19]=n,y[20]=e,y[21]=C,y[22]=r):r=y[22],y[23]!==v||y[24]!==r?(o=(0,u.jsx)(m.BJ,{as:"ol",overflow:"auto",padding:v,space:v,children:r}),y[23]=v,y[24]=r,y[25]=o):o=y[25];let c=b?k:E;y[26]!==b||y[27]!==c?(a=(0,u.jsx)(tD,{fontSize:1,mode:"bleed",onClick:c,padding:1,ref:w,selected:b,text:"…"}),y[26]=b,y[27]=c,y[28]=a):a=y[28],y[29]!==b||y[30]!==a||y[31]!==o?(s=(0,u.jsx)(m.AM,{constrainSize:!0,content:o,open:b,placement:"top",portal:!0,ref:S,children:a},"button"),y[29]=b,y[30]=a,y[31]=o,y[32]=s):s=y[32],t=[...l,s,...C.slice(e-i)],y[11]=i,y[12]=n,y[13]=e,y[14]=b,y[
4115]=C,y[16]=v,y[17]=t}else t=y[17];f=t;break e}f=C}let j=f;if(y[33]!==j||y[34]!==o||y[35]!==v){let e;y[37]!==o||y[38]!==v?(e=(e,t)=>(0,u.jsxs)(h.Fragment,{children:[t>0&&(0,u.jsx)(m.az,{"aria-hidden":!0,as:"li",paddingX:v,children:o||(0,u.jsx)(m.EY,{muted:!0,children:"/"})}),(0,u.jsx)(m.az,{as:"li",children:e})]},t),y[37]=o,y[38]=v,y[39]=e):e=y[39],p=j.map(e),y[33]=j,y[34]=o,y[35]=v,y[36]=p}else p=y[36];return y[40]!==t||y[41]!==i||y[42]!==p?(g=(0,u.jsx)(t$,{"data-ui":"Breadcrumbs",...i,ref:t,children:p}),y[40]=t,y[41]=i,y[42]=p,y[43]=g):g=y[43],g}).displayName="ForwardRef(Breadcrumbs)";let tL=(0,m.bz)("@sanity/ui/context/dialog",{version:0});function tN(e,t,n){return!e||!t||(0,m.Q3)(e,n)||(0,m.Q3)(t,n)}let tz=(0,g.I4)(m.Wd).withConfig({displayName:"StyledDialog",componentId:"sc-4n4xb3-0"})(m.l_,function({theme:e}){let{color:t}=(0,tw.JW)(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,tw.JW)(e.theme);return(0,m.U1)(t,e.$position,e=>({"&&":{position:e}}))},function(e){return e.$animate?(0,g.AH)`
42    @keyframes zoomIn {
43      from {
44        opacity: 0;
45        transform: scale(0.95);
46      }
47      to {
48        opacity: 1;
49        transform: scale(1);
50      }
51    }
52    @keyframes fadeIn {
53      from {
54        opacity: 0;
55      }
56      to {
57        opacity: 1;
58      }
59    }
60
61    animation: fadeIn 200ms ease-out;
62    // Animates the dialog card.
63    & > [data-ui='DialogCard'] {
64      animation: zoomIn 200ms ease-out;
65    }
66  `:(0,g.AH)``}),tV=(0,g.I4)(m.mc).withConfig({displayName:"DialogContainer",componentId:"sc-4n4xb3-1"})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`,tF=(0,g.I4)(m.Zp).withConfig({displayName:"DialogCardRoot",componentId:"sc-4n4xb3-2"})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`,tB=(0,g.I4)(m.so).withConfig({displayName:"DialogLayout",componentId:"sc-4n4xb3-3"})`flex:1;min-height:0;width:100%;`,tU=(0,g.I4)(m.az).withConfig({displayName:"DialogHeader",componentId:"sc-4n4xb3-4"})`position:relative;z-index:2;`,tH=(0,g.I4)(m.az).withConfig({displayName:"DialogContent",componentId:"sc-4n4xb3-5"})`position:relative;z-index:1;overflow:auto;outline:none;`,tW=(0,g.I4)(m.az).withConfig({displayName:"DialogFooter",componentId:"sc-4n4xb3-6"})`position:relative;z-index:3;`,tY=(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,c,d,f,p,g,y,v=(0,tx.c)(38),{__unstable_autoFocus:b,__unstable_hideCloseButton:x,children:w,contentRef:S,footer:k,header:E,id:C,onClickOutside:j,onClose:T,portal:A,radius:_,scheme:M,shadow:P,width:R}=e,I=(0,m.WP)(),O=A?I.elements?.[A]||null:I.element,$=(0,m.$w)().element,D=(0,m.KC)(_),L=(0,m.KC)(P),N=(0,m.KC)(R),z=(0,h.useRef)(null),V=(0,h.useRef)(null),{isTopLayer:F}=(0,m.Z4)(),B=`${C}_label`,U=!!T&&!1===x,H=!!E||U;return v[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>z.current,v[0]=n):n=v[0],(0,h.useImperativeHandle)(t,n),v[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>V.current,v[1]=r):r=v[1],(0,h.useImperativeHandle)(S,r),v[2]!==b?(i=()=>{b&&z.current&&tE(z.current)},o=[b,z],v[2]=b,v[3]=i,v[4]=o):(i=v[3],o=v[4]),(0,h.useEffect)(i,o),v[5]!==$||v[6]!==F||v[7]!==T||v[8]!==O?(a=e=>{if(!F||!T)return;let t=document.activeElement;t&&!tN($,O,t)||"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),T())},v[5]=$,v[6]=F,v[7]=T,v[8]=O,v[9]=a):a=v[9],(0,m.Pm)(a),v[10]!==$||v[11]!==F||v[12]!==j||v[13]!==O?(s=F&&j&&(e=>{let t=e.target;t&&!tN($,O,t)||j()}),v[10]=$,v[11]=F,v[12]=j,v[13]=O,v[14]=s):s=v[14],v[15]===Symbol.for("react.memo_cache_sentinel")?(l=()=>[z.current],v[15]=l):l=v[15],(0,m.PR)(s,l),v[16]!==E||v[17]!==B||v[18]!==T||v[19]!==U||v[20]!==H?(c=H&&(0,u.jsx)(tU,{children:(0,u.jsxs)(m.so,{align:"flex-start",padding:3,children:[(0,u.jsx)(m.az,{flex:1,padding:2,children:E&&(0,u.jsx)(m.EY,{id:B,size:1,weight:"semibold",children:E})}),U&&(0,u.jsx)(m.az,{flex:"none",children:(0,u.jsx)(m.$n,{"aria-label":"Close dialog",disabled:!T,icon:eJ.USm,mode:"bleed",onClick:T,padding:2})})]})}),v[16]=E,v[17]=B,v[18]=T,v[19]=U,v[20]=H,v[21]=c):c=v[21],v[22]!==w?(d=(0,u.jsx)(tH,{flex:1,ref:V,tabIndex:-1,
66children:w}),v[22]=w,v[23]=d):d=v[23],v[24]!==k?(f=k&&(0,u.jsx)(tW,{children:k}),v[24]=k,v[25]=f):f=v[25],v[26]!==c||v[27]!==d||v[28]!==f?(p=(0,u.jsxs)(tB,{direction:"column",children:[c,d,f]}),v[26]=c,v[27]=d,v[28]=f,v[29]=p):p=v[29],v[30]!==D||v[31]!==M||v[32]!==L||v[33]!==p?(g=(0,u.jsx)(tF,{radius:D,ref:z,scheme:M,shadow:L,children:p}),v[30]=D,v[31]=M,v[32]=L,v[33]=p,v[34]=g):g=v[34],v[35]!==g||v[36]!==N?(y=(0,u.jsx)(tV,{"data-ui":"DialogCard",width:N,children:g}),v[35]=g,v[36]=N,v[37]=y):y=v[37],y});tY.displayName="ForwardRef(DialogCard)",(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,c,d,f,p,g,y,v,b,x,w,S,k,E,C,j,T,A,_,M,P,R,I=(0,tx.c)(60),O=(0,h.useContext)(tL),{layer:$}=(0,m.M4)();I[0]!==e?({__unstable_autoFocus:b,__unstable_hideCloseButton:x,cardRadius:w,cardShadow:S,children:i,contentRef:o,footer:a,header:s,id:l,onActivate:c,onClickOutside:d,onClose:f,onFocus:p,padding:k,portal:g,position:n,scheme:v,width:E,zOffset:r,animate:C,...y}=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]=c,I[9]=d,I[10]=f,I[11]=p,I[12]=g,I[13]=y,I[14]=v,I[15]=b,I[16]=x,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],c=I[8],d=I[9],f=I[10],p=I[11],g=I[12],y=I[13],v=I[14],b=I[15],x=I[16],w=I[17],S=I[18],k=I[19],E=I[20],C=I[21]);let D=void 0===b||b,L=void 0!==x&&x,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,m.jt)()&&B,Y=(0,m.WP)(),G=g?Y.elements?.[g]||null:Y.element,q=(0,m.$w)().element,X=(0,m.KC)(N),K=(0,m.KC)(V),Z=(0,m.KC)(U),J=(0,m.KC)(F),Q=(0,m.KC)(H),ee=(0,h.useRef)(null),et=(0,h.useRef)(null),en=(0,h.useRef)(null),er=(0,h.useRef)(null);I[22]!==p?(j=e=>{p?.(e);let t=e.target,n=en.current;return n&&t===ee.current?void function e(t){for(let n=t.childNodes.length-1;n>=0;n--){let r=t.childNodes[n];if((0,m.sb)(r)&&(tk(r)||e(r)))return!0}return!1}(n):n&&t===et.current?void tE(n):void((0,m.sb)(e.target)&&(er.current=e.target))},I[22]=p,I[23]=j):j=I[23];let ei=j,eo=`${l}_label`,ea=(0,h.useRef)(void 0);I[24]!==q||I[25]!==G?(T=()=>{ea.current&&clearTimeout(ea.current),ea.current=setTimeout(()=>{let e=document.activeElement;if(e&&!tN(q,G,e)){let e=er.current;if(!e||!document.body.contains(e)){let e=en.current;e&&tE(e);return}
66e.focus()}},0)},I[24]=q,I[25]=G,I[26]=T):T=I[26];let es=T;return I[27]===Symbol.for("react.memo_cache_sentinel")?(A=(0,u.jsx)("div",{ref:ee,tabIndex:0}),I[27]=A):A=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]!==d||I[38]!==f||I[39]!==g||I[40]!==v||I[41]!==J?(_=(0,u.jsx)(tY,{__unstable_autoFocus:D,__unstable_hideCloseButton:L,contentRef:o,footer:a,header:s,id:l,onClickOutside:d,onClose:f,portal:g,radius:X,ref:en,scheme:v,shadow:z,width:J,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]=d,I[38]=f,I[39]=g,I[40]=v,I[41]=J,I[42]=_):_=I[42],I[43]===Symbol.for("react.memo_cache_sentinel")?(M=(0,u.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]!==c||I[50]!==K||I[51]!==Z||I[52]!==t||I[53]!==y||I[54]!==_||I[55]!==Q?(P=(0,u.jsxs)(tz,{...y,$animate:W,$padding:K,$position:Z,"aria-labelledby":eo,"aria-modal":!0,"data-ui":"Dialog",id:l,onActivate:c,onClick:es,onFocus:ei,ref:t,role:"dialog",zOffset:Q,children:[A,_,M]}),I[44]=W,I[45]=ei,I[46]=es,I[47]=l,I[48]=eo,I[49]=c,I[50]=K,I[51]=Z,I[52]=t,I[53]=y,I[54]=_,I[55]=Q,I[56]=P):P=I[56],I[57]!==g||I[58]!==P?(R=(0,u.jsx)(m.ZL,{__unstable_name:g,children:P}),I[57]=g,I[58]=P,I[59]=R):R=I[59],R}).displayName="ForwardRef(Dialog)";let tG=(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,c,d,f,p,g,y,v,b,x,w,S,k,E,C,j,T,A=(0,tx.c)(62),{__unstable_disableRestoreFocusOnClose:_,boundaryElement:M,button:P,id:R,menu:I,onClose:O,onOpen:$,placement:D,popoverScheme:L,portal:N,popover:z,popoverRadius:V,preventOverflow:F}=e,B=void 0!==_&&_,U=void 0===N||N,[H,W]=(0,h.useState)(!1),[Y,G]=(0,h.useState)(null),[q,X]=(0,h.useState)(null);A[0]===Symbol.for("react.memo_cache_sentinel")?(n=[],A[0]=n):n=A[0];let[K,Z]=(0,h.useState)(n),J=(0,h.useRef)(H);A[1]!==$||A[2]!==H?(r=()=>{$&&H&&!J.current&&$()},i=[$,H],A[1]=$,A[2]=H,A[3]=r,A[4]=i):(r=A[3],i=A[4]),(0,h.useEffect)(r,i),A[5]!==O||A[6]!==H?(o=()=>{O&&!H&&J.current&&O()},a=[O,H],A[5]=O,A[6]=H,A[7]=o,A[8]=a):(o=A[7],a=A[8]),(0,h.useEffect)(o,a),A[9]!==H?(s=()=>{J.current=H},l=[H],A[9]=H,A[10]=s,A[11]=l):(s=A[10],l=A[11]),(0,h.useEffect)(s,l),A[12]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{W(tq),G(null)},A[12]=c):c=A[12];let Q=c;A[13]!==H?(d=e=>{H&&e.preventDefault()},A[13]=H,A[14]=d):d=A[14];let ee=d;A[15]===Symbol.for("react.memo_cache_sentinel")?(f=e=>{if("ArrowDown"===e.key||"Enter"===e.key||" "===e.key){e.preventDefault(),W(!0),G("first");return}if("ArrowUp"===e.key){e.preventDefault(),W(!0),G("last");return}},A[15]=f):f=A[15];let et=f;A[16]!==q||A[17]!==K?(p=e=>{let t=e.target;if(t instanceof Node&&!(q&&(t===q||q.contains(t)))){for(let e of K)if(t===e||e.contains(t))return;W(!1)}},A[16]=q,A[17]=K,A[18]=p):p=A[18];let en=p;A[19]!==q||A[20]!==B?(g=()=>{W(!1),!B&&q&&q.focus()},A[19]=q,A[20]=B,A[21]=g):g=A[21];let er=g;A[22]!==K?(y=e=>{let t=e.relatedTarget;if(t instanceof Node){for(let e of K)if(e===t||e.contains(t))return;W(!1)}},A[22]=K,A[23]=y):y=A[23];let ei=y;A[24]!==q||A[25]!==B?(v=()=>{W(!1),!B&&q&&q.focus()},A[24]=q,A[25]=B,A[26]=v):v=A[26];let eo=v;A[27]===Symbol.for("react.memo_cache_sentinel")?(b=e=>(Z(t=>t.concat([e])),()=>Z(t=>t.filter(t=>t!==e))),A[27]=b):b=A[27];let ea=b;A[28]!==q||A[29]!==ei||A[30]!==eo||A[31]!==en||A[32]!==er||A[33]!==R||A[34]!==I||A[35]!==Y?(x=I&&(0,h.cloneElement)(I,{"aria-labelledby":R,onBlurCapture:ei,onClickOutside:en,onEscape:er,onItemClick:eo,originElement:q,registerElement:ea,shouldFocus:Y}),A[28]=q,A[29]=ei,A[30]=eo,A[31]=en,A[32]=er,A[33]=R,A[34]=I,A[35]=Y,A[36]=x):x=A[36];let es=x;A[37]!==P||A[38]!==ee||A[39]!==R||A[40]!==H?(w=P&&(0,h.cloneElement)(P,{"data-ui":"MenuButton",id:R,onClick:Q,onKeyDown:et,onMouseDown:ee,"aria-haspopup":!0,"aria-expanded":H,ref:X,selected:P.props.selected??H}),A[37]=P,A[38]=ee,A[39]=R,A[40]=H,A[41]=w):w=A[41];let el=w;A[42]!==q?(S=()=>q,k=[q],A[42]=q,A[43]=S,A[44]=k):(S=A[43],k=A[44]),(0,h.useImperativeHandle)(t,S,k),A[45]!==z?(E=z||{},A[45]=z,A[46]=E):E=A[46],A[47]!==M||A[48]!==D||A[49]!==V||A[50]!==L||A[51]!==U||A[52]!==F||A[53]!==E?(C={boundaryElement:M,overflow:"auto",placement:D,portal:U,preventOverflow:F,radius:V,scheme:L,...E},A[47]=M,A[48]=D,A[49]=V,A[50]=L,A[51]=U,A[52]=F,A[53]=E,A[54]=C):C=A[54];let eu=C;return A[55]!==el?(j=el||(0,u.jsx)(u.Fragment,{}),A[55]=el,A[56]=j):j=A[56],A[57]!==es||A[58]!==H||A[59]!==eu||A[60]!==j?(T=(0,u.jsx)(m.AM,{"data-ui":"MenuButton__popover",...eu,content:es,open:H,children:j}
66),A[57]=es,A[58]=H,A[59]=eu,A[60]=j,A[61]=T):T=A[61],T});function tq(e){return!e}tG.displayName="ForwardRef(MenuButton)";let tX=(0,g.i7)`
67  0% {
68    background-position: 100%;
69  }
70  100% {
71    background-position: -100%;
72  }
73`,tK=(0,g.AH)`
74  background-image: linear-gradient(
75    to right,
76    var(--card-skeleton-color-from),
77    var(--card-skeleton-color-to),
78    var(--card-skeleton-color-from),
79    var(--card-skeleton-color-from),
80    var(--card-skeleton-color-from)
81  );
82  background-position: 100%;
83  background-size: 200% 100%;
84  background-attachment: fixed;
85  animation-name: ${tX};
86  animation-timing-function: ease-in-out;
87  animation-iteration-count: infinite;
88  animation-duration: 2000ms;
89`,tZ=(0,g.AH)`
90  opacity: ${({$visible:e})=>+!!e};
91  transition: opacity 200ms ease-in;
92
93  @media screen and (prefers-reduced-motion: no-preference) {
94    ${({$animated:e})=>e?tK:(0,g.AH)`
95            background-color: var(--card-skeleton-color-from);
96          `}
97  }
98
99  @media screen and (prefers-reduced-motion: reduce) {
100    background-color: var(--card-skeleton-color-from);
101  }
102`,tJ=(0,g.I4)(m.az).withConfig({displayName:"StyledSkeleton",componentId:"sc-ebtpni-0"})(m.gK,tZ),tQ=(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,c=(0,tx.c)(14);c[0]!==e?({animated:o,delay:n,radius:r,...i}=e,c[0]=e,c[1]=n,c[2]=r,c[3]=i,c[4]=o):(n=c[1],r=c[2],i=c[3],o=c[4]);let d=void 0!==o&&o,[f,p]=(0,h.useState)(!n);c[5]!==n?(a=()=>{if(!n)return p(!0);let e=setTimeout(()=>{p(!0)},n);return()=>{clearTimeout(e)}},s=[n],c[5]=n,c[6]=a,c[7]=s):(a=c[6],s=c[7]),(0,h.useEffect)(a,s);let g=(0,m.KC)(r);return c[8]!==d||c[9]!==t||c[10]!==i||c[11]!==g||c[12]!==f?(l=(0,u.jsx)(tJ,{...i,$animated:d,$radius:g,$visible:f,ref:t}),c[8]=d,c[9]=t,c[10]=i,c[11]=g,c[12]=f,c[13]=l):l=c[13],l});tQ.displayName="ForwardRef(Skeleton)";let t0=(0,g.I4)(tQ).withConfig({displayName:"StyledSkeleton",componentId:"sc-2p7a1v-0"})(e=>{let{$size:t,$style:n}=e,{font:r,media:i}=(0,tw.JW)(e.theme),o=r[n];return(0,m.U1)(i,t,e=>{let t=o.sizes[e];return{height:t.lineHeight-t.ascenderHeight-t.descenderHeight}})});(0,h.forwardRef)(function(e,t){let n,r,i,o=(0,tx.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,m.KC)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,u.jsx)(t0,{...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,h.forwardRef)(function(e,t){let n,r,i,o=(0,tx.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,m.KC)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,u.jsx)(t0,{...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,h.forwardRef)(function(e,t){let n,r,i,o=(0,tx.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,m.KC)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,u.jsx)(t0,{...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,h.forwardRef)(function(e,t){let n,r,i,o=(0,tx.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,m.KC)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,u.jsx)(t0,{...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,h.forwardRef)(function(e,t){let n,r,i,o=(0,tx.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,u.jsx)(m.az,{"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 t1={error:"critical",warning:"caution",success:"positive",info:"neutral"},t2={error:"critical",warning:"caution",success:"positive",info:"neutral"},t5=(0,g.I4)(m.so).withConfig({displayName:"TextBox",componentId:"sc-1rr7rxo-0"})`overflow-x:auto;`,t3=(0,g.I4)(m.Zp).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);}`,t4=g.I4.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;`,t6=(0,g.I4)(m.Zp).withConfig({displayName:"LoadingBarMask",componentId:"sc-1rr7rxo-3"})`position:absolute;top:0;left:-${2}px;right:-${2}px;bottom:${2}px;z-index:1;`,t8=(0,g.I4)(m.Zp).withConfig({displayName:"LoadingBarProgress",componentId:"sc-1rr7rxo-4"})`display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:${e=>{let{color:t}=(0,tw.JW)(e.theme);return t.button.default[e.tone].enabled.bg}};`,t9={error:"alert",warning:"alert",success:"alert",info:"alert"};function t7(e){let t,n,r,i,o,a,s,l,c,d,h,f,p,g,y,v,b,x,w,S,k=(0,tx.c)(50);k[0]!==e?({closable:t,description:n,duration:r,onClose:i,radius:s,title:l,status:a,updatedAt:c,...o}=e,k[0]=e,k[1]=t,k[2]=n,k[3]=r,k[4]=i,k[5]=o,k[6]=a,k[7]=s,k[8]=l,k[9]=c):(t=k[1],n=k[2],r=k[3],i=k[4],o=k[5],a=k[6],s=k[7],l=k[8],c=k[9]);let E=void 0===s?3:s,C=a?t1[a]:"default",j=a?t2[a]:"default",T=a?t9[a
102]:"status",A=.26*!(0,m.jt)();k[10]!==A?(d=A?{type:"spring",visualDuration:A,bounce:.25}:{duration:0},k[10]=A,k[11]=d):d=k[11];let _=d,M=r&&isFinite(r)&&r<20736e5;k[12]===Symbol.for("react.memo_cache_sentinel")?(h=["hidden","initial"],k[12]=h):h=k[12];let P=h;k[13]===Symbol.for("react.memo_cache_sentinel")?(f=["visible","slideIn"],k[13]=f):f=k[13];let R=f;k[14]===Symbol.for("react.memo_cache_sentinel")?(p=["hidden","slideOut"],k[14]=p):p=k[14];let I=p,O=M?"":void 0;return k[15]!==l?(g=l&&(0,u.jsx)(m.EY,{size:1,weight:"medium",children:l}),k[15]=l,k[16]=g):g=k[16],k[17]!==n||k[18]!==_?(y=n&&(0,u.jsx)(ni,{muted:!0,size:1,variants:nt,transition:_,children:n}),k[17]=n,k[18]=_,k[19]=y):y=k[19],k[20]!==g||k[21]!==y?(v=(0,u.jsx)(t5,{flex:1,padding:3,children:(0,u.jsxs)(m.BJ,{space:3,children:[g,y]})}),k[20]=g,k[21]=y,k[22]=v):v=k[22],k[23]!==j||k[24]!==t||k[25]!==i?(b=t&&(0,u.jsx)(m.az,{padding:1,children:(0,u.jsx)(m.$n,{as:"button",icon:eJ.USm,mode:"bleed",padding:2,tone:j,onClick:i,style:{verticalAlign:"top"}})}),k[23]=j,k[24]=t,k[25]=i,k[26]=b):b=k[26],k[27]!==v||k[28]!==b||k[29]!==_?(x=(0,u.jsxs)(nr,{align:"flex-start",variants:nt,transition:_,children:[v,b]}),k[27]=v,k[28]=b,k[29]=_,k[30]=x):x=k[30],k[31]!==C||k[32]!==r||k[33]!==M||k[34]!==i||k[35]!==E||k[36]!==_||k[37]!==c||k[38]!==A?(w=M&&(0,u.jsxs)(no,{variants:nt,transition:_,children:[(0,u.jsx)(t6,{tone:C,radius:E}),(0,u.jsx)(na,{tone:C,initial:{scaleX:0},animate:{scaleX:1},transition:{delay:A,duration:r/1e3,ease:"linear"},onAnimationComplete:i},`progress-${c}`)]}),k[31]=C,k[32]=r,k[33]=M,k[34]=i,k[35]=E,k[36]=_,k[37]=c,k[38]=A,k[39]=w):w=k[39],k[40]!==C||k[41]!==E||k[42]!==o||k[43]!==T||k[44]!==x||k[45]!==w||k[46]!==O||k[47]!==_||k[48]!==A?(S=(0,u.jsxs)(nn,{"data-ui":"Toast",role:T,...o,"data-has-duration":O,custom:A,radius:E,shadow:2,tone:C,forwardedAs:"li",layout:"position",variants:ne,initial:P,animate:R,exit:I,transition:_,children:[x,w]}),k[40]=C,k[41]=E,k[42]=o,k[43]=T,k[44]=x,k[45]=w,k[46]=O,k[47]=_,k[48]=A,k[49]=S):S=k[49],S}t7.displayName="Toast";let ne={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}},nt={initial:{willChange:"transform"},hidden:{opacity:0},visible:{opacity:1}},nn=tS.P.create(t3),nr=tS.P.create(m.so),ni=tS.P.create(m.EY),no=tS.P.create(t4),na=tS.P.create(t8);(0,m.bz)("@sanity/ui/context/toast",null);(0,g.I4)(m.xA).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%;`;function ns(e){if("treeitem"===e.getAttribute("role")&&e.focus(),"none"===e.getAttribute("role")){let t=e.firstChild;t&&t instanceof HTMLElement&&t.focus()}}let nl=(0,m.bz)("@sanity/ui/context/tree",null);function nu(){let e=(0,h.useContext)(nl);if(!e)throw Error("Tree: missing context value");return e}(0,h.memo)((0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,c,d,f,p,g,y,v,b,x,w,S,k,E,C,j=(0,tx.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 T=void 0===o?1:o,A=(0,h.useRef)(null),[_,M]=(0,h.useState)(null),P=(0,h.useRef)(_);j[5]===Symbol.for("react.memo_cache_sentinel")?(a=[],j[5]=a):a=j[5];let R=a;j[6]===Symbol.for("react.memo_cache_sentinel")?(s=[],j[6]=s):s=j[6];let[I,O]=(0,h.useState)(s);j[7]===Symbol.for("react.memo_cache_sentinel")?(l={},j[7]=l):l=j[7];let[$,D]=(0,h.useState)(l),L=(0,h.useRef)($);j[8]===Symbol.for("react.memo_cache_sentinel")?(c=()=>A.current,j[8]=c):c=j[8],(0,h.useImperativeHandle)(t,c),j[9]!==_?(d=()=>{P.current=_},f=[_],j[9]=_,j[10]=d,j[11]=f):(d=j[10],f=j[11]),(0,h.useEffect)(d,f),j[12]!==$?(p=()=>{L.current=$},g=[$],j[12]=$,j[13]=p,j[14]=g):(p=j[13],g=j[14]),(0,h.useEffect)(p,g),j[15]===Symbol.for("react.memo_cache_sentinel")?(y=(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]=y):y=j[15];let N=y;j[16]===Symbol.for("react.memo_cache_sentinel")?(v=(e,t)=>{D(n=>{let r=n[e];return r?{...n,[e]:{...r,expanded:t}}:n})},j[16]=v):v=j[16];let z=v,V=_||I[0]||null;j[17]!==T||j[18]!==$||j[19]!==V?(b={version:0,focusedElement:V,level:0,path:R,registerItem:N,setExpanded:z,setFocusedElement:M,space:T,state:$}
102,j[17]=T,j[18]=$,j[19]=V,j[20]=b):b=j[20];let F=b;j[21]!==I?(x=e=>{if(P.current){if("ArrowDown"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),i=t.slice(r),o=t.length;for(let t=1;t<o;t+=1){if(!i[t])continue;let n=i[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let o=[],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,P.current);t&&(ns(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,P.current);t&&(ns(t),M(t));return}if("ArrowLeft"===e.key){e.preventDefault();let t=P.current.getAttribute("data-tree-key");if(!t)return;let n=L.current[t];if(!n)return;if(n.expanded)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=P.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]=x):x=j[22];let B=x;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=()=>{A.current&&O(Array.from(A.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,h.useEffect)(S,k),j[28]!==n||j[29]!==U||j[30]!==B||j[31]!==i||j[32]!==T?(E=(0,u.jsx)(m.BJ,{as:"ul","data-ui":"Tree",...i,onFocus:U,onKeyDown:B,ref:A,role:"tree",space:T,children:n}),j[28]=n,j[29]=U,j[30]=B,j[31]=i,j[32]=T,j[33]=E):E=j[33],j[34]!==F||j[35]!==E?(C=(0,u.jsx)(nl.Provider,{value:F,children:E}),j[34]=F,j[35]=E,j[36]=C):C=j[36],C})).displayName="Memo(ForwardRef(Tree))";let nc=(0,h.memo)(function(e){let t,n,r,i,o=(0,tx.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=nu(),l=!a;return o[4]!==t||o[5]!==n||o[6]!==l||o[7]!==s.space?(i=(0,u.jsx)(m.BJ,{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}),nd=(0,h.memo)(g.I4.li.withConfig({displayName:"StyledTreeItem",componentId:"sc-iiskig-0"})(function(){return(0,g.AH)`
103    &[role='none'] > [role='treeitem'] {
104      outline: none;
105      cursor: default;
106      border-radius: 3px;
107
108      background-color: var(--card-bg-color);
109      color: var(--treeitem-fg-color);
110
111      &:focus {
112        position: relative;
113      }
114    }
115
116    &[role='treeitem'] {
117      outline: none;
118
119      & > div {
120        cursor: default;
121        border-radius: 3px;
122
123        background-color: var(--card-bg-color);
124        color: var(--treeitem-fg-color);
125      }
126
127      &:focus > div {
128        position: relative;
129      }
130    }
131  `},function(e){let{color:t}=(0,tw.JW)(e.theme),n=t.selectable.default;return(0,g.AH)`
132    &[role='none'] {
133      & > [role='treeitem'] {
134        ${(0,m.g5)(t,n.enabled)}
135      }
136
137      &[data-selected] > [role='treeitem'] {
138        ${(0,m.g5)(t,n.pressed)}
139      }
140
141      @media (hover: hover) {
142        &:not([data-selected]) > [role='treeitem']:not(:focus):hover {
143          ${(0,m.g5)(t,n.hovered)}
144        }
145
146        & > [role='treeitem']:focus {
147          ${(0,m.g5)(t,n.selected)}
148        }
149      }
150    }
151
152    &[role='treeitem'] {
153      & > [data-ui='TreeItem__box'] {
154        ${(0,m.g5)(t,n.enabled)}
155      }
156
157      &[data-selected] > [data-ui='TreeItem__box'] {
158        ${(0,m.g5)(t,n.pressed)}
159      }
160
161      @media (hover: hover) {
162        &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {
163          ${(0,m.g5)(t,n.hovered)}
164        }
165
166        &:focus > [data-ui='TreeItem__box'] {
167          ${(0,m.g5)(t,n.selected)}
168        }
169      }
170    }
171  `})),nh=(0,g.I4)(m.az).attrs({forwardedAs:"a"}).withConfig({displayName:"TreeItemBox",componentId:"sc-iiskig-1"})(function(e){let{$level:t}=e,{space:n}=(0,tw.JW)(e.theme);return(0,g.AH)`
172    padding-left: ${(0,m.D0)(n[2]*t)};
173
174    &[data-as='a'] {
175      text-decoration: none;
176    }
177  `}),nf=(0,g.I4)(m.EY).withConfig({displayName:"ToggleArrowText",componentId:"sc-iiskig-2"})`& > svg{transition:transform 100ms;}`;(0,h.memo)(function(e){let{children:t,expanded:n=!1,fontSize:r=1,href:i,icon:o,id:a,linkAs:s,muted:l,onClick:c,padding:d=2,selected:f=!1,space:p=2,text:g,weight:y,...v}=e,b=(0,h.useRef)(null),x=(0,h.useRef)(null),w=nu(),{path:S,registerItem:k,setExpanded:E,setFocusedElement:C}=w,j=(0,h.useId)(),T=a||j,A=(0,h.useMemo)(()=>S.concat([T||""]),[T,S]),_=A.join("/"),M=w.state[_],P=w.focusedElement===b.current,R=M?.expanded===void 0?n:M?.expanded||!1,I=w.focusedElement&&w.focusedElement===b.current?0:-1,O=(0,h.useMemo)(()=>({...w,level:w.level+1,path:A}),[A,w]),$=(0,h.useCallback)(e=>{c&&c(e);let t=e.target;t instanceof HTMLElement&&("TreeItem"===t.getAttribute("data-ui")||t.closest('[data-ui="TreeItem__box"]'))&&(e.stopPropagation(),E(_,!R
177),C(b.current))},[R,_,c,E,C]),D=(0,h.useCallback)(e=>{P&&"Enter"===e.key&&(x.current||b.current)?.click()},[P]);(0,h.useEffect)(()=>{if(b.current)return k(b.current,A.join("/"),R,f)},[R,A,k,f]);let L=(0,u.jsxs)(m.so,{padding:d,children:[(0,u.jsxs)(m.az,{marginRight:p,style:{visibility:o||t?"visible":"hidden",pointerEvents:"none"},children:[o&&(0,u.jsx)(m.EY,{muted:l,size:r,weight:y,children:(0,u.jsx)(o,{})}),!o&&(0,u.jsx)(nf,{muted:l,size:r,weight:y,children:(0,u.jsx)(eJ.nVd,{style:{transform:R?"rotate(90deg)":void 0}})})]}),(0,u.jsx)(m.az,{flex:1,children:(0,u.jsx)(m.EY,{muted:l,size:r,textOverflow:"ellipsis",weight:y,children:g})})]});return i?(0,u.jsxs)(nd,{"data-selected":f?"":void 0,"data-tree-id":T,"data-tree-key":_,"data-ui":"TreeItem",...v,onClick:$,ref:b,role:"none",children:[(0,u.jsx)(nh,{$level:w.level,"aria-expanded":R,as:s,"data-ui":"TreeItem__box",href:i,ref:x,role:"treeitem",tabIndex:I,children:L}),(0,u.jsx)(nl.Provider,{value:O,children:t&&(0,u.jsx)(nc,{hidden:!R,children:t})})]}):(0,u.jsxs)(nd,{"data-selected":f?"":void 0,"data-ui":"TreeItem","data-tree-id":T,"data-tree-key":_,...v,"aria-expanded":R,onClick:$,onKeyDown:D,ref:b,role:"treeitem",tabIndex:I,children:[(0,u.jsx)(nh,{$level:w.level,as:"div","data-ui":"TreeItem__box",children:L}
177),(0,u.jsx)(nl.Provider,{value:O,children:t&&(0,u.jsx)(nc,{expanded:R,children:t})})]})}).displayName="Memo(TreeItem)";let np=e=>"object"==typeof e&&null!=e&&1===e.nodeType,nm=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,ng=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return nm(n.overflowY,t)||nm(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},ny=(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,nv=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},nb=(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(!np(e))throw TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,f=[],p=e;for(;np(p)&&d(p);){if((p=nv(p))===h){f.push(p);break}null!=p&&p===document.body&&ng(p)&&!ng(document.documentElement)||null!=p&&ng(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:T,left:A}=(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),_="start"===s||"nearest"===s?w-C:"end"===s?k+T:w+b/2-C+T,M="center"===l?E+x/2-A+j:"end"===l?S+j:E-A,P=[];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&&!ng(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),T=parseInt(d.borderBottomWidth,10),A=0,R=0,I="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-j:0,O="offsetHeight"in t?t.offsetHeight-t.clientHeight-C-T: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)A="start"===s?_:"end"===s?_-g:"nearest"===s?ny(v,v+g,g,C,T,v+_,v+_+b,b):_-g/2,R="start"===l?M:"center"===l?M-m/2:"end"===l?M-m:ny(y,y+m,m,p,j,y+M,y+M+x,x),A=Math.max(0,A+v),R=Math.max(0,R+y);else{A="start"===s?_-i-C:"end"===s?_-u+T+O:"nearest"===s?ny(i,u,n,C,T+O,_,_+b,b):_-(i+n/2)+O/2,R="start"===l?M-c-p:"center"===l?M-(c+r/2)+I/2:"end"===l?M-o+j+I:ny(c,o,r,p,j+I,M,M+x,x);let{scrollLeft:e,scrollTop:a}=t;A=0===D?0:Math.max(0,Math.min(a+A/D,t.scrollHeight-n/D+O)),R=0===$?0:Math.max(0,Math.min(e+R/$,t.scrollWidth-r/$+I)),_+=a-A,M+=e-R}P.push({el:t,top:A,left:R})}return P};var nx=n(75560),nw=n(96482),nS=n(8394),nk=n(88813),nE=n(74435);function nC(e){let[t,n]=e;return[t,n]}function nj(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;l+=e,(0===e||n.substring(a-l)===r.substring(0,l))&&(s=l,l++)}return s}function nT(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 nA(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 n_(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343}function nM(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=nN(o,a,{checkLines:!1,deadline:i}),c=nN(s,l,{checkLines:!1,deadline:i});return u.concat(c)}function nP(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=nT(e.slice(n),t.slice(i)),c=nA(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 nR=Object.defineProperty,nI=Object.getOwnPropertySymbols,nO=Object.prototype.hasOwnProperty,n$=Object.prototype.propertyIsEnumerable,nD=(e,t,n)=>t in e?nR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function nL(e,t,n){if(null===e||null===t)throw Error("Null input. (diff)");let r=nN(e,t,function(e){let t;var n,r={checkLines:!0,deadline:(n=e.timeout||1,t=1,"u">typeof n&&(t=n<=0?Number.MAX_VALUE:n),Date.now()+1e3*t)},i=e;for(var o in i||(i={}))nO.call(i,o)&&nD(r,o,i[o]);if(nI)for(var o of nI(i))n$.call(i,o)&&nD(r,o,i[o]);return r}(n||{}));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&&nF(e,t,1),n_(i)&&0===n&&nF(e,t,-1)}for(let t=0;t<e.length;t++)0===e[t][1].length&&e.splice(t,1)}(r),r}function nN(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let o=nT(r,i),a=r.substring(0,o);o=nA(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;
177let c=nP(l,u,Math.ceil(l.length/4)),d=nP(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=nN(e,r,n),l=nN(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(`
178`,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=nN(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=nB(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=nN(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,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 nM(e,t,p,y,n)}}for(let d=-m+f;d<=m-p;d+=2){let h,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;if(a>=(h=r-h))return nM(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=nX(l)}function nz(e,t,n){return 1===n?e+t:t+e}function nV(e,t){return 1===t?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function nF(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}else if(-1===r){null===s&&(s=l);continue}else if(0===r){if(null===a&&null===s){let[r,i]=nV(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]=nV(e[a][1],o),[l]=nV(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]=nV(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 nB(e){let t=e.map(e=>nC(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=nX(t)),t=nq(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=nj(e,n),i=nj(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 nU=/[^a-zA-Z0-9]/,nH=/\s/,nW=/[\r\n]/,nY=/\n\r?\n$/,nG=/^\r?\n\r?\n/;function nq(e){let t=e.map(e=>nC(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(nU),o=r.match(nU),a=i&&n.match(nH),s=o&&r.match(nH),l=a&&n.match(nW),u=s&&r.match(nW),c=l&&e.match(nY),d=u&&t.match(nG);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=nA(e,i
178);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 nX(e){let t=e.map(e=>nC(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=nT(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=nA(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=nX(t)),t}var nK=Object.defineProperty,nZ=Object.getOwnPropertySymbols,nJ=Object.prototype.hasOwnProperty,nQ=Object.prototype.propertyIsEnumerable,n0=(e,t,n)=>t in e?nK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,n1=(e,t)=>{for(var n in t||(t={}))nJ.call(t,n)&&n0(e,n,t[n]);if(nZ)for(var n of nZ(t))nQ.call(t,n)&&n0(e,n,t[n]);return e};let n2={threshold:.5,distance:1e3};function n5(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=n1(n1({},n2),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 n3(e){let t=[];for(let n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function n4(e){let t=[];for(let n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function n6(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 n8(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+=n9(r)}return t}function n9(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function n7(e,t){return{diffs:[],start1:e,start2:t,utf8Start1:e,utf8Start2:t,length1:0,length2:0,utf8Length1:0,utf8Length2:0}}var re=Object.defineProperty,rt=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,ri=(e,t,n)=>t in e?re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ro=(e,t)=>{for(var n in t||(t={}))rn.call(t,n)&&ri(e,n,t[n]);
178if(rt)for(var n of rt(t))rr.call(t,n)&&ri(e,n,t[n]);return e};let ra={margin:4};function rs(e={}){return ro(ro({},ra),e)}function rl(e,t,n){if(0===t.length)return[];let r=[],i=n7(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=n8(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&&(ru(i,c,n),r.push(i),i=n7(-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&&(ru(i,c,n),r.push(i)),r}function ru(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&&n_(t[o])&&o--;let a=t.substring(o,e.start2);a&&e.diffs.unshift([0,a]);let s=a.length,l=n8(a),u=e.start2+e.length1+i;u<t.length&&n_(t[u])&&u++;let c=t.substring(e.start2+e.length1,u);c&&e.diffs.push([0,c]);let d=c.length,h=n8(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 rc=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;function rd(e){return parseInt(e,10)}function rh(e){let t,n,r,{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} @@
179`];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])}
180`}return u.join("").replace(/%20/g," ")}var rf="object"==typeof global&&global&&global.Object===Object&&global,rp="object"==typeof self&&self&&self.Object===Object&&self,rm=rf||rp||Function("return this")(),rg=rm.Symbol,ry=Object.prototype,rv=ry.hasOwnProperty,rb=ry.toString,rx=rg?rg.toStringTag:void 0;let rw=function(e){var t=rv.call(e,rx),n=e[rx];try{e[rx]=void 0;var r=!0}catch(e){}var i=rb.call(e);return r&&(t?e[rx]=n:delete e[rx]),i};var rS=Object.prototype.toString,rk=rg?rg.toStringTag:void 0;let rE=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":rk&&rk in Object(e)?rw(e):rS.call(e)},rC=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},rj=function(e){if(!rC(e))return!1;var t=rE(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var rT=rm["__core-js_shared__"],rA=function(){var e=/[^.]+$/.exec(rT&&rT.keys&&rT.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),r_=Function.prototype.toString;let rM=function(e){if(null!=e){try{return r_.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var rP=/^\[object .+?Constructor\]$/,rR=Object.prototype,rI=Function.prototype.toString,rO=rR.hasOwnProperty,r$=RegExp("^"+rI.call(rO).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let rD=function(e){return!!rC(e)&&(!rA||!(rA in e))&&(rj(e)?r$:rP).test(rM(e))},rL=function(e,t){var n=null==e?void 0:e[t];return rD(n)?n:void 0};var rN=function(){try{var e=rL(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let rz=function(e,t,n){"__proto__"==t&&rN?rN(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},rV=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},rF=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},rB=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},rU=function(e){return null!=e&&"object"==typeof e},rH=function(e){return rU(e)&&"[object Arguments]"==rE(e)};var rW=Object.prototype,rY=rW.hasOwnProperty,rG=rW.propertyIsEnumerable,rq=rH(function(){return arguments}())?rH:function(e){return rU(e)&&rY.call(e,"callee")&&!rG.call(e,"callee")},rX=Array.isArray,rK="object"==typeof exports&&exports&&!exports.nodeType&&exports,rZ=rK&&"object"==typeof module&&module&&!module.nodeType&&module,rJ=rZ&&rZ.exports===rK?rm.Buffer:void 0;let rQ=(rJ?rJ.isBuffer:void 0)||function(){return!1};var r0=/^(?:0|[1-9]\d*)$/;let r1=function(e,t){var n=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&r0.test(e))&&e>-1&&e%1==0&&e<t},r2=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff};var r5={};
180r5["[object Float32Array]"]=r5["[object Float64Array]"]=r5["[object Int8Array]"]=r5["[object Int16Array]"]=r5["[object Int32Array]"]=r5["[object Uint8Array]"]=r5["[object Uint8ClampedArray]"]=r5["[object Uint16Array]"]=r5["[object Uint32Array]"]=!0,r5["[object Arguments]"]=r5["[object Array]"]=r5["[object ArrayBuffer]"]=r5["[object Boolean]"]=r5["[object DataView]"]=r5["[object Date]"]=r5["[object Error]"]=r5["[object Function]"]=r5["[object Map]"]=r5["[object Number]"]=r5["[object Object]"]=r5["[object RegExp]"]=r5["[object Set]"]=r5["[object String]"]=r5["[object WeakMap]"]=!1;var r3="object"==typeof exports&&exports&&!exports.nodeType&&exports,r4=r3&&"object"==typeof module&&module&&!module.nodeType&&module,r6=r4&&r4.exports===r3&&rf.process,r8=function(){try{var e=r4&&r4.require&&r4.require("util").types;if(e)return e;return r6&&r6.binding&&r6.binding("util")}catch(e){}}(),r9=r8&&r8.isTypedArray,r7=r9?function(e){return r9(e)}:function(e){return rU(e)&&r2(e.length)&&!!r5[rE(e)]},ie=Object.prototype.hasOwnProperty;let it=function(e,t){var n=rX(e),r=!n&&rq(e),i=!n&&!r&&rQ(e),o=!n&&!r&&!i&&r7(e),a=n||r||i||o,s=a?rB(e.length,String):[],l=s.length;for(var u in e)(t||ie.call(e,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||r1(u,l)))&&s.push(u);return s};var ir=Object.prototype;let ii=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ir)};var io=(a=Object.keys,s=Object,function(e){return a(s(e))}),ia=Object.prototype.hasOwnProperty;let is=function(e){if(!ii(e))return io(e);var t=[];for(var n in Object(e))ia.call(e,n)&&"constructor"!=n&&t.push(n);return t},il=function(e){return null!=e&&r2(e.length)&&!rj(e)},iu=function(e){return il(e)?it(e):is(e)};var ic=(i=function(e,t){return e&&rF(e,t,iu)},function(e,t){if(null==e)return e;if(!il(e))return i(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e});let id=function(e,t,n,r){return ic(e,function(e,i,o){t(r,e,n(e),o)}),r},ih=function(e,t){return e===t||e!=e&&t!=t},ip=function(e,t){for(var n=e.length;n--;)if(ih(e[n][0],t))return n;return -1};var im=Array.prototype.splice;function ig(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])}}ig.prototype.clear=function(){this.__data__=[],this.size=0},ig.prototype.delete=function(e){var t=this.__data__,n=ip(t,e);return!(n<0)&&(n==t.length-1?t.pop():im.call(t,n,1),--this.size,!0)},ig.prototype.get=function(e){var t=this.__data__,n=ip(t,e);return n<0?void 0:t[n][1]},ig.prototype.has=function(e){return ip(this.__data__,e)>-1},ig.prototype.set=function(e,t){var n=this.__data__,r=ip(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var iy=rL(rm,"Map"),iv=rL(Object,"create"),ib=Object.prototype.hasOwnProperty,ix=Object.prototype.hasOwnProperty;function iw(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])}}iw.prototype.clear=function(){this.__data__=iv?iv(null):{},this.size=0},iw.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},iw.prototype.get=function(e){var t=this.__data__;if(iv){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ib.call(t,e)?t[e]:void 0},iw.prototype.has=function(e){var t=this.__data__;return iv?void 0!==t[e]:ix.call(t,e)},iw.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=iv&&void 0===t?"__lodash_hash_undefined__":t,this};let iS=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},ik=function(e,t){var n=e.__data__;return iS(t)?n["string"==typeof t?"string":"hash"]:n.map};function iE(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 iC(e){var t=this.__data__=new ig(e);this.size=t.size}function ij(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new iE;++t<n;)this.add(e[t])}iE.prototype.clear=function(){this.size=0,this.__data__={hash:new iw,map:new(iy||ig),string:new iw}},iE.prototype.delete=function(e){var t=ik(this,e).delete(e);return this.size-=!!t,t},iE.prototype.get=function(e){return ik(this,e).get(e)},iE.prototype.has=function(e){return ik(this,e).has(e)},iE.prototype.set=function(e,t){var n=ik(this,e),r=n.size;return n.set(e,t),this.size+=+(n.size!=r),this},iC.prototype.clear=function(){this.__data__=new ig,this.size=0},iC.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},iC.prototype.get=function(e){return this.__data__.get(e)},iC.prototype.has=function(e){return this.__data__.has(e)},iC.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ig){var r=n.__data__;if(!iy||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new iE(r)}
180return n.set(e,t),this.size=n.size,this},ij.prototype.add=ij.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ij.prototype.has=function(e){return this.__data__.has(e)};let iT=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},iA=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 ij: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(!iT(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};var i_=rm.Uint8Array;let iM=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},iP=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n};var iR=rg?rg.prototype:void 0,iI=iR?iR.valueOf:void 0;let iO=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 i_(e),new i_(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return ih(+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=iM;case"[object Set]":var l=1&r;if(s||(s=iP),e.size!=t.size&&!l)break;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=iA(s(e),s(t),r,i,o,a);return a.delete(e),c;case"[object Symbol]":if(iI)return iI.call(e)==iI.call(t)}return!1},i$=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},iD=function(e,t,n){var r=t(e);return rX(e)?r:i$(r,n(e))},iL=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};var iN=Object.prototype.propertyIsEnumerable,iz=Object.getOwnPropertySymbols,iV=iz?function(e){return null==e?[]:iL(iz(e=Object(e)),function(t){return iN.call(e,t)})}:function(){return[]};let iF=function(e){return iD(e,iu,iV)};var iB=Object.prototype.hasOwnProperty;let iU=function(e,t,n,r,i,o){var a=1&n,s=iF(e),l=s.length;if(l!=iF(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:iB.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};var iH=rL(rm,"DataView"),iW=rL(rm,"Promise"),iY=rL(rm,"Set"),iG=rL(rm,"WeakMap"),iq="[object Map]",iX="[object Promise]",iK="[object Set]",iZ="[object WeakMap]",iJ="[object DataView]",iQ=rM(iH),i0=rM(iy),i1=rM(iW),i2=rM(iY),i5=rM(iG),i3=rE;(iH&&i3(new iH(new ArrayBuffer(1)))!=iJ||iy&&i3(new iy)!=iq||iW&&i3(iW.resolve())!=iX||iY&&i3(new iY)!=iK||iG&&i3(new iG)!=iZ)&&(i3=function(e){var t=rE(e),n="[object Object]"==t?e.constructor:void 0,r=n?rM(n):"";if(r)switch(r){case iQ:return iJ;case i0:return iq;case i1:return iX;case i2:return iK;case i5:return iZ}return t});let i4=i3;var i6="[object Arguments]",i8="[object Array]",i9="[object Object]",i7=Object.prototype.hasOwnProperty;let oe=function(e,t,n,r,i,o){var a=rX(e),s=rX(t),l=a?i8:i4(e),u=s?i8:i4(t);l=l==i6?i9:l,u=u==i6?i9:u;var c=l==i9,d=u==i9,h=l==u;if(h&&rQ(e)){if(!rQ(t))return!1;a=!0,c=!1}if(h&&!c)return o||(o=new iC),a||r7(e)?iA(e,t,n,r,i,o):iO(e,t,l,n,r,i,o);if(!(1&n)){var f=c&&i7.call(e,"__wrapped__"),p=d&&i7.call(t,"__wrapped__");
180if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new iC),i(m,g,n,r,o)}}return!!h&&(o||(o=new iC),iU(e,t,n,r,i,o))},ot=function e(t,n,r,i,o){return t===n||(null!=t&&null!=n&&(rU(t)||rU(n))?oe(t,n,r,i,e,o):t!=t&&n!=n)},on=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 iC;if(r)var h=r(u,c,l,e,t,d);if(!(void 0===h?ot(c,u,3,r,d):h))return!1}}return!0},or=function(e){return e==e&&!rC(e)},oi=function(e){for(var t=iu(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,or(i)]}return t},oo=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},oa=function(e){var t=oi(e);return 1==t.length&&t[0][2]?oo(t[0][0],t[0][1]):function(n){return n===e||on(n,e,t)}},os=function(e){return"symbol"==typeof e||rU(e)&&"[object Symbol]"==rE(e)};var ol=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ou=/^\w*$/;let oc=function(e,t){if(rX(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||os(e))||ou.test(e)||!ol.test(e)||null!=t&&e in Object(t)};function od(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(od.Cache||iE),n}od.Cache=iE;var oh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,of=/\\(\\)?/g,op=function(e){var t=od(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(oh,function(e,n,r,i){t.push(r?i.replace(of,"$1"):n||e)}),t});let om=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};var og=1/0,oy=rg?rg.prototype:void 0,ov=oy?oy.toString:void 0;let ob=function e(t){if("string"==typeof t)return t;if(rX(t))return om(t,e)+"";if(os(t))return ov?ov.call(t):"";var n=t+"";return"0"==n&&1/t==-og?"-0":n},ox=function(e,t){return rX(e)?e:oc(e,t)?[e]:op(null==e?"":ob(e))};var ow=1/0;let oS=function(e){if("string"==typeof e||os(e))return e;var t=e+"";return"0"==t&&1/e==-ow?"-0":t},ok=function(e,t){t=ox(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[oS(t[n++])];return n&&n==r?e:void 0},oE=function(e,t,n){var r=null==e?void 0:ok(e,t);return void 0===r?n:r},oC=function(e,t){return null!=e&&t in Object(e)},oj=function(e,t,n){t=ox(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=oS(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&r2(i)&&r1(a,i)&&(rX(e)||rq(e))},oT=function(e){return e},oA=function(e){var t;return oc(e)?(t=oS(e),function(e){return null==e?void 0:e[t]}):function(t){return ok(t,e)}},o_=function(e){if("function"==typeof e)return e;if(null==e)return oT;if("object"==typeof e){var t,n;return rX(e)?(t=e[0],n=e[1],oc(t)&&or(n)?oo(oS(t),n):function(e){var r=oE(e,t);return void 0===r&&r===n?null!=e&&oj(e,t,oC):ot(n,r,3)}):oa(e)}return oA(e)};var oM=Object.prototype.hasOwnProperty,oP=(o=function(e,t,n){oM.call(e,n)?e[n].push(t):rz(e,n,[t])},function(e,t){return(rX(e)?rV:id)(e,o,o_(t,2),{})});let oR=["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 oI{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=oR[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 oO(e){return e>>16?4:e>>11?3:e>>7?2:1}function o$(e,t,n=0){let r=n,i=0;for(i=n;r<t;
180i++){let t=oO(e.codePointAt(i));4===t&&i++,r+=t}return i}class oD{wrap(e){return e}finalize(e){return Array.isArray(e)?e:e.data}markChanged(e){return e}objectGetKeys(e){return Object.keys(e)}objectGetField(e,t){return e[t]}arrayGetElement(e,t){return e[t]}copyObject(e){let t={type:"object",data:{}};if(null!==e)for(let[n,r]of Object.entries(e))t.data[n]=r;return t}copyArray(e){return null===e?[]:e.slice()}copyString(e){return{type:"string",data:null===e?"":e}}objectSetField(e,t,n){e.data[t]=n}objectDeleteField(e,t){delete e.data[t]}arrayAppendValue(e,t){e.push(t)}arrayAppendSlice(e,t,n,r){e.push(...t.slice(n,r))}stringAppendSlice(e,t,n,r){let i=o$(t,n),o=o$(t,r,i);e.data+=t.slice(i,o)}stringAppendValue(e,t){e.data+=t}}var oL=n(58782),oN=n(41101),oz=n(72909),oV=n(51599),oF=n(4916),oB=n(17867),oU=n(64132),oH=1,oW={};function oY(e){return e in oW&&(delete oW[e],!0)}var oG={setImmediate:function(e){var t=oH++;return oW[t]=!0,l||(l=Promise.resolve()),l.then(function(){return oY(t)&&e()}),t},clearImmediate:function(e){oY(e)}},oq=oG.setImmediate,oX=oG.clearImmediate,oK={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=oK.delegate;return((null==n?void 0:n.setImmediate)||oq).apply(void 0,(0,oB.fX)([],(0,oB.zs)(e)))},clearImmediate:function(e){var t=oK.delegate;return((null==t?void 0:t.clearImmediate)||oX)(e)},delegate:void 0},oZ=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return(0,oB.C6)(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=oK.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.id)!==n&&(oK.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(oU.R),oJ=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,oB.C6)(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(86722).q))(oZ),oQ=n(95580),o0=n(61768),o1=n(85948);function o2(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 o5=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function o3(e){return"string"==typeof e?._key}function o4(e){return"object"==typeof e&&"_key"in e&&"string"==typeof e._key}function o6(e){return"number"==typeof e||o4(e)}function o8(e,t){if(0===e.length)return t;let n=t;for(let t of e){if(o6(t)){if(!Array.isArray(n))return;if(o4(t)){n=n.find(e=>e._key===t._key);continue}n=n[t];continue}n=n[t]}return n}let o9=/^[a-z_$]+/;function o7(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:o4(e)?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&o9.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function ae(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function at(e,t){if("number"==typeof t){var n=e.length,r=t;if(0===n&&(-1===r||0===r))return 0;let i=r<0?n+r:r;return i>=n||i<0?null:i}if(o4(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 an(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function ar(e,t){var n;if(!Array.isArray(t))throw TypeError('Cannot apply "insert()" on non-array value');let r=at(t,e.referenceItem);if(null===r)throw Error(`Found no matching array element to insert ${e.position}`);return 0===t.length?e.items:an(t,(n=e.position,"before"===n?r:r+1),0,e.
180items)}let ai=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);var ao=Object.freeze({__proto__:null,assign:function(e,t){if(!ae(t))throw TypeError('Cannot apply "assign()" on non-object value');return!function(e){for(let t in e)if(ai(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+=n9(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=>nC(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=n7(i-a.length,o-a.length),l=!0;if(""!==a){let e=n8(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=n8(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=n8(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=n4(s.diffs)).substring(a.length-t);let u=n3(r.diffs).substring(0,t),c=n8(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=n3(i[e].diffs),o,s=-1;if(n.length>32?-1!==(o=n5(r,n.substring(0,32),t))&&(-1===(s=n5(r,n.substring(n.length-32),t+n.length-32))||o>=s)&&(o=-1):o=n5(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)+n4(i[e].diffs)+r.substring(o+n.length);else{let t=nL(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=nq(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=n6(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+n6(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(`
181`),r=0;for(;r<n.length;){let e=n[r].match(rc);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=n7(rd(e[1]),rd(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=rd(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=rd(e[4]),i.length2=i.utf8Length2),r++;r<n.length;){let e,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=n8(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:ar,remove:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "remove()" on non-array value');let n=at(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return an(t,n,1,[])},replace:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "replace()" on non-array value');let n=at(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return an(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(!ae(t))throw TypeError('Cannot apply "unassign()" on non-object value');return 0===e.keys.length?t:function(e,t){let n={...e};for(let e of t)delete n[e];return n}(t,e.keys)},unset:function(e){},upsert:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "upsert()" on non-array value');
181if(0===e.items.length)return t;let n=[],r=[];if(e.items.forEach((e,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 ar({type:"insert",items:r,referenceItem:e.referenceItem,position:e.position},i)}});function aa(e,t){return e.reduce((e,t)=>as(t,e),t)}function as(e,t){return function e(t,n,r){if(!(t.length>0)){if(!(n.type in ao))throw Error(`Invalid operation type: "${n.type}"`);return ao[n.type](n,r)}let[i,...o]=t;if(o6(i)&&Array.isArray(r)){var a=i,s=o,l=n,u=r;let t=at(u,a);if(null===t||-1===t)return u;let c=u[t],d=e(s,l,c);return d===c?u:an(u,t,1,[d])}if("string"==typeof i&&ae(r)){var c=i,d=o,h=n,f=r;let t=f[c];if(void 0===t&&d.length>0)return f;let a=e(d,h,t);return a===t?f:{...f,[c]:a}}throw Error(`Cannot apply operation of type "${n.type}" to path ${o7(t)} on ${typeof r} value`)}(e.path,e.op,t)}function al(e){return"_id"in e}function au(e,t){return t.reduce((e,t)=>{let n=ac(e,t);if("error"===n.status)throw Error(n.message);return"noop"===n.status?e:n.after},e)}function ac(e,t){if("create"===t.type)return function(e,t){var n;if(e)return{status:"error",message:"Document already exist"};let r=(n=t.document,al(n)?n:{...n,_id:o5()});return{status:"created",id:r._id,after:r}}(e,t);if("createIfNotExists"===t.type){return n=e,al((r=t).document)?n?{status:"noop"}:{status:"created",id:r.document._id,after:r.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"}}if("delete"===t.type){return i=e,o=t,i?o.id!==i._id?{status:"error",message:"Delete mutation targeted wrong document"}:{status:"deleted",id:o.id,before:i,after:void 0}:{status:"noop"}}if("createOrReplace"===t.type){return a=e,al((s=t).document)?a?{status:"updated",id:s.document._id,before:a,after:s.document}:{status:"created",id:s.document._id,after:s.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"}}if("patch"===t.type){var n,r,i,o,a,s,l=e,u=t;if(!l)return{status:"error",message:"Cannot apply patch on nonexistent document"};let c=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 aa(e.patches,t)}(u,l);return l===c?{status:"noop"}:{status:"updated",id:u.id,before:l,after:c}}throw Error(`Invalid mutation type: ${t.type}`)}function ad(e,t,n){let r=[];for(let n of e.slice().reverse()){if(t(n))return r;r.push(n)}return r.reverse()}function ah(e,t){return o7(e)===o7(t)}function af(e,t){let n=e;return t.reduce((e,t)=>{let r=n;if(n=as(t,n),"set"===t.op.type&&"string"==typeof t.op.value){let n=o8(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=nL(e,t,{checkLines:!0});return n.length>2&&(n=function(e,t=4){let n=e.map(e=>nC(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,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=nX(n)),n}(n=nB(n))),rl(e,n,rs(void 0))}if(e&&Array.isArray(e)&&typeof t>"u")return rl(n3(e),e,rs(void 0));if("string"==typeof e&&t&&Array.isArray(t))return rl(e,t,rs(n));throw Error("Unknown call format to make()")})(n,t.op.value).map(rh).join("")}};return e.flatMap(e=>ah(e.path,t.path)&&"diffMatchPatch"===e.op.type?[]:e).concat(r)}}return e.push(t),e},[])}function ap(e,t,n,r){let i=t,o=r.map(t=>{let n=t.mutations.flatMap(t=>{if(o2(t)!==e)return[];let n=i;return i=au(i,[t]),n&&"patch"===t.type?{type:"dmpified",mutation:{...t,dmpPatches:af(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=aa(t.mutation.dmpPatches,a),n.push(t)}catch{console.warn("Failed to apply dmp patch, falling back to original");try{a=aa(t.mutation.original,a),n.push(t)}catch(t){throw Error(`Failed to apply patch for document "${e}": ${t.message}`)}}else a=au(a,[t])})}),[r.map(t=>({...t,mutations:t.mutations.map(t=>"patch"!==t.type||o2(t)!==e?t:{...t,patches:t.patches.map(e=>"set"!==e.op.type?e:{...e,op:{...e.op,value:o8(e.path,a)}})})})),a]}function am(e){var t=e;if("create"===t.type||"createIfNotExists"===t.type||"createOrReplace"===t.type)return{[t.type]:t.document};
181if("delete"===t.type)return{delete:{id:t.id}};let n=t.options?.ifRevision;return t.patches.map(e=>({patch:{id:t.id,...n&&{ifRevisionID:n},...function(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[o7(t)]};if("insert"===n.type)return{insert:{[n.position]:o7([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[o7(t)]:n.value}};if("inc"===n.type)return{inc:{[o7(t)]:n.amount}};if("dec"===n.type)return{dec:{[o7(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[o7(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${o7(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>o7([...t,{_key:e._key}])),insert:{[n.position]:o7([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[o7(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>o7(t.concat(e)))};if("replace"===n.type)return{insert:{replace:o7(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[o7(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(e)}}))}function ag(e){let t=e.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation","reconnect"],includeResult:!1,includePreviousRevision:!1,visibility:"transaction",effectFormat:"mendoza",includeMutations:!1}).pipe((0,oL.u)({resetOnRefCountZero:!0})),n=t.pipe((0,oN.p)(e=>"reconnect"===e.type)),r=t.pipe((0,oN.p)(e=>"welcome"===e.type)),i=t.pipe((0,oN.p)(e=>"mutation"===e.type)),o=(0,nE.h)(r,n).pipe((0,oz.t)({bufferSize:1,refCount:!0})).pipe((0,oN.p)(e=>"welcome"===e.type));return(0,nE.h)(o,i,n)}let ay=(0,oQ.mj)({types:{},actions:{"assign error to context":(0,o0.a)({error:({event:e})=>e}),"clear error from context":(0,o0.a)({error:void 0}),"connect to server-sent events":(0,nw.r)({type:"connect"}),"listen to server-sent events":(0,nw.b)("server-sent events",{id:"listener",input:({context:e})=>({listener:e.sharedListener||ag(e.client),id:e.id})}),"stop listening to server-sent events":(0,nw.s)("listener"),"buffer remote mutation events":(0,o0.a)({mutationEvents:({event:e,context:t})=>((0,oQ.DT)(e,"mutation"),[...t.mutationEvents,e])}),"restore stashed changes":(0,o0.a)({stagedChanges:({event:e,context:t})=>((0,oQ.DT)(e,"xstate.done.actor.submitTransactions"),t.stashedChanges),stashedChanges:[]}),"rebase fetched remote snapshot":(0,o1.e)(({enqueue:e})=>{e.assign(({event:e,context:t})=>{(0,oQ.DT)(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=av(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]=ap(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,o0.a)(({event:e,context:t})=>{(0,oQ.DT)(e,"mutation");let n=t.remote;if(e.transactionId===n?._rev)return{};let r=av(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]=ap(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,o0.a)({fetchRemoteSnapshotAttempts:({context:e})=>e.fetchRemoteSnapshotAttempts+1}),"reset fetch attempts":(0,o0.a)({fetchRemoteSnapshotAttempts:0}),"increment submit attempts":(0,o0.a)({submitTransactionsAttempts:({context:e})=>e.submitTransactionsAttempts+1}),"reset submit attempts":(0,o0.a)({submitTransactionsAttempts:0}),"stage mutation":(0,o0.a)({stagedChanges:({event:e,context:t})=>((0,oQ.DT)(e,"mutate"),[...t.stagedChanges,{transaction:!1,mutations:e.mutations}])}),"stash mutation":(0,o0.a)({stashedChanges:({event:e,context:t})=>((0,oQ.DT)(e,"mutate"),[...t.stashedChanges,{transaction:!1,mutations:e.mutations}])}),"rebase local snapshot":(0,o1.e)(({enqueue:e})=>{e.assign({local:({event:e,context:t})=>{(0,oQ.DT)(e,"mutate");let n=new Map;
181return 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=o2(r);if(!e)throw Error("Unable to get document id from mutation");let i=n[e]?.after||t.get(e),o=ac(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,o1.b)(({context:e})=>({type:"pristine",id:e.id})),"send sync event to parent":(0,o1.b)(({context:e})=>({type:"sync",id:e.id,document:e.remote})),"send mutation event to parent":(0,o1.b)(({context:e,event:t})=>((0,oQ.DT)(t,"mutation"),{type:"mutation",id:e.id,previousRev:t.previousRev,resultRev:t.resultRev,effects:t.effects}))},actors:{"server-sent events":(0,R.OX)(({input:e})=>{let{listener:t,id:n}=e;return(0,oV.v)(()=>t).pipe((0,oN.p)(e=>"welcome"===e.type||"reconnect"===e.type||"mutation"===e.type&&e.documentId===n),(0,oF.Q)(oJ))}),"fetch remote snapshot":(0,R.Sx)(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,R.Sx)(async({input:e,signal:t})=>{let{client:n,transactions:r}=e;for(let e of r){if(t.aborted)return;await n.dataRequest("mutate",function(e){return{transactionId:e.id,mutations:e.mutations.flatMap(am)}}(e),{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=[];return 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(oP(e.mutations,o2)).flatMap(e=>{var t,n;return(0===(n=0===(t=e).length?t:t.reduce((e,t)=>
181"delete"===t.type?[t]:(e.push(t),e),[])).length?n:n.reduce((e,t)=>("createIfNotExists"!==t.type?e.push(t):ad(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,i;return n=e,i=function(e,t){if(t<0||t>=e.length)throw Error("Index out of bounds");return e[t]}(r,t),o3(n)&&o3(i)?n._key===i._key:"number"==typeof n?Number(n)===Number(i):n===i}))});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)&&ah(e.path,t.path)})||e.unshift(t),e),[]).reduce((e,t)=>("setIfMissing"!==t.op.type?e.push(t):ad(e,e=>"unset"===e.op.type).find(e=>"setIfMissing"===e.op.type&&ah(e.path,t.path))||e.push(t),e),[])})})).map(e=>{var n;return{...e,mutations:(n=t,e.mutations.map((e,t)=>{var r,i;return"patch"===e.type?(r=n.get(e.id),i=e,r?{...i,patches:af(r,i.patches)}:i):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 av(e,t,n){var r;let i=(r=function(e){if(!e)return null;let{_rev:t,...n}=e;return n}(e),new oI(new oD,r,t).process());return i?Object.assign(i,{_rev:n}):null}let ab=(0,oQ.mj)({types:{},actions:{"emit sync event":(0,o1.a)(({event:e})=>((0,oQ.DT)(e,"sync"),e)),"emit mutation event":(0,o1.a)(({event:e})=>((0,oQ.DT)(e,"mutation"),e)),"emit rebased event":(0,o1.a)(({event:e})=>((0,oQ.DT)(e,["rebased.local","rebased.remote"]),e)),"emit pristine event":(0,o1.a)(({event:e})=>((0,oQ.DT)(e,["pristine"]),e)),"add document actor":(0,o0.a)({documents:({context:e,event:t,spawn:n})=>{(0,oQ.DT)(t,"observe");let r=t.documentId;return e.documents[r]?e.documents:{...e.documents,[r]:n("documentMutatorMachine",{input
181:{id:r,client:e.client,sharedListener:e.sharedListener||ag(e.client)},id:r})}}}),"stop remote snapshot":(0,nw.s)(({context:e,event:t})=>((0,oQ.DT)(t,"unobserve"),e.documents[t.documentId])),"remove remote snapshot from context":(0,o0.a)({documents:({context:e,event:t})=>{if((0,oQ.DT)(t,"unobserve"),!e.documents[t.documentId])return e.documents;let{[t.documentId]:n,...r}=e.documents;return r}})},actors:{documentMutatorMachine:ay}}).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:{}}}),ax=e=>{let t,n,r,i,o=(0,c.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,h.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,h.useEffect)(r,i),null},aw=e=>{let t,n,r=(0,c.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,h.useEffect)(t,n),null};function aS(e){let t=new CustomEvent("sanity/dragEnd",{detail:e,cancelable:!0});window.dispatchEvent(t)}let ak=(0,h.createContext)(null);function aE(){let e=(0,h.useContext)(ak);if(!e)throw Error("Schema context is missing");return e}function aC(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}=Q(e);return[P(r,A([{_type:t,_key:J()}],n,{_key:i}))]})(e,n,r))}function aj(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Duplicate",icon:eJ.TdU,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}=Q(e);return[P(r,A({...B(t,e.path),_key:J()},n,{_key:i}))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Duplicated"}]:[]}function aT(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Remove",icon:eJ.YPx,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}=Q(e),i=B(t,n).findIndex(e=>e._key===r);return[P(n,_(i,i+1))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Removed"}]:[]}async function aA(e,t=!0){let{node:n,doc:r}=e;if(!r)return[];let i=[],o=[],[a,s,l,u]=await Promise.all([ee(n,r,"previous"),ee(n,r,"next"),ee(n,r,"first"),ee(n,r,"last")]);return l.length&&o.push({type:"action",label:"To top",icon:eJ.VQ$,action:()=>r.patch(l),telemetryEvent:"Visual Editing Context Menu Item Moved"}),a.length&&o.push({type:"action",label:"Up",icon:eJ.Kpk,action:()=>r.patch(a),telemetryEvent:"Visual Editing Context Menu Item Moved"}),s.length&&o.push({type:"action",label:"Down",icon:eJ.ZLN,action:()=>r.patch(s),telemetryEvent:"Visual Editing Context Menu Item Moved"}),u.length&&o.push({type:"action",label:"To bottom",icon:eJ.wvk,action:()=>r.patch(u),telemetryEvent:"Visual Editing Context Menu Item Moved"}),o.length&&(i.push({type:"group",label:"Move",icon:eJ.ycB,items:o}),t&&i.push({type:"divider"})),i}async function a_(e){let{node:t,field:n,doc:r}=e,i=[];return i.push(...aj(e)),i.push(...aT(e)),i.push(...await aA(e)),i.push({type:"action",label:"Insert before",icon:eJ.SKY,action:aC(t,r,n.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i.push({type:"action",label:"Insert after",icon:eJ.amD,action:aC(t,r,n.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i}let aM=e=>{let t,n,r,i,o,a=(0,c.c)(12),{label:s,parent:l,width:d,onSelect:h,boundaryElement:f}=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]!==f||a[3]!==d?(r={arrow:!1,constrainSize:!0,floatingBoundary:f,padding:0,placement:"right-start",fallbackPlacements:t,preventOverflow:!0,width:d,__unstable_margins:n},a[2]=f,a[3]=d,a[4]=r):r=a[4],a[5]!==h||a[6]!==l?(i=(0,u.jsx)(tg,{node:l,onSelect:h}),a[5]=h,a[6]=l,a[7]=i):i=a[7],a[8]!==s||a[9]!==r||a[10]!==i?(o=(0,u.jsx)(m.rX,{fontSize:1,icon:eJ.amD,padding:2,popover:r,space
181:2,text:s,children:i}),a[8]=s,a[9]=r,a[10]=i,a[11]=o):o=a[11],o};async function aP(e){let{doc:t,node:n,parent:r}=e,i=[];if(i.push(...aj(e)),i.push(...aT(e)),i.push(...await aA(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,u.jsx)(aM,{label:"Insert before",onSelect:e=>{aC(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,u.jsx)(aM,{label:"Insert after",onSelect:e=>{aC(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:eJ.SKY,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",icon:ti(e),label:"block"===e.name?"Paragraph":e.title||e.name,action:aC(n,t,e.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))}),i.push({type:"group",label:"Insert after",icon:eJ.amD,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",label:"block"===e.name?"Paragraph":e.title||e.name,icon:ti(e),action:aC(n,t,e.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))});return i}let aR=[-4,4,-4,4];function aI(e){let t,n=(0,c.c)(27),{node:r,onDismiss:i,boundaryElement:o}=e,a=tp();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,u.jsx)(m.Nj,{}),n[4]=e):e=n[4],e}if("action"===r.type){let e,t=!r.action;return n[5]!==r.hotkeys||n[6]!==r.icon||n[7]!==r.label||n[8]!==s||n[9]!==t?(e=(0,u.jsx)(m.Dr,{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,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:aR},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,u.jsx)(aI,{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,u.jsx)(m.rX,{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,{component:t}=r;return n[23]!==t||n[24]!==o||n[25]!==a?(e=(0,u.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 aO=e=>{let t,n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w,S,k=(0,c.c)(43),{node:E,onDismiss:C,position:j}=e,{x:T,y:A}=j,[_,M]=(0,h.useState)(null),{getField:P}=aE(),{getDocument:R}=K();k[0]!==P||k[1]!==E?(t=P(E),k[0]=P,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,h.useState)(void 0);k[3]!==I||k[4]!==R||k[5]!==E||k[6]!==O?(r=()=>{(async()=>{let e=R(E.id);e&&D(await function(e){let{node:t,field:n,parent:r,doc:i}=e;return n?.type==="arrayItem"?a_({node:t,field:n,doc:i}):r?.type==="union"?aP({node:t,parent:r,doc:i}):Promise.resolve([])}({node:E,field:I,parent:O,doc:e}))})()},i=[I,E,O,R],k[3]=I,k[4]=R,k[5]=E,k[6]=O,k[7]=r,k[8]=i):(r=k[7],i=k[8]),(0,h.useEffect)(r,i),k[9]!==T||k[10]!==A?(a={getBoundingClientRect:()=>({bottom:A,left:T,right:T,top:A,width:0,height:0})},k[9]=T,k[10]=A,k[11]=a):a=k[11],o=a,k[12]!==I?(l=ti(I),k[12]=I,k[13]=l):l=k[13],s=l,k[14]===Symbol.for("react.memo_cache_sentinel")?(d={minWidth:120,maxWidth:160},k[14]=d):d=k[14],k[15]!==s||k[16]!==$?(f=(0,u.jsx)(m.az,{flex:"none",children:$?(0,u.jsx)(m.EY,{size:1,children:s}):(0,u.jsx)(m.y$,{size:1})}),k[15]=s,k[16]=$,k[17]=f):f=k[17];let L=$?n:"Loading...";k[18]!==L?(p=(0,u.jsx)(m.BJ,{flex:1,space:2,children:(0,u.jsx)(m.EY,{size:1,weight:"semibold",children:L})}),k[18]=L,k[19]=p):p=k[19],k[20]!==f||k[21]!==p?(g=(0,u.jsxs)(m.so,{gap:2,padding:2,children:[f,p]}),k[20]=f,k[21]=p,k[22]=g):g=k[22],k[23]!==_||k[24]!==$||k[25]!==C?(y=$&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(m.Nj,{}),$.map((e,t)=>(0,u.jsx)(aI,{node:e,onDismiss:C,boundaryElement:_},t))]}),k[23]=_,k[24]=$,k[25]=C,k[26]=y):y=k[26],k[27]!==g||k[28]!==y?(v=(0,u.jsxs)(m.W1,{style:d,children:[g,y]}),k[27]=g,k[28]=y,k[29]=v):v=k[29];let N=`${T}-${A}`;return k[30]!==T||k[31]!==A?(b={position:"absolute",left:T,top:A},k[30]=T,k[31]=A,k[32]=b):b=k[32],k[33]!==N||k[34]!==b?(x=(0,u.jsx)("div",{style:b},N),k[33]=N,k[34]=b,k[35]=x):x=k[35],k[36]!==o||k[37]!==v||k[38]!==x?(w=(0,u.jsx)(m.AM,{__unstable_margins:aR,arrow:!1,open:!0,placement:"right-start",referenceElement:o,content:v,children:x}),k[36]=o,k[37]=v,k[38]=x,k[39]=w):w=k[39],k[40]!==C||k[41]!==w?(S=(0,u.jsx)(tl,{setBoundaryElement:M,onDismiss:C,children:w}),k[40]=C,k[41]=w,k[42]=S):S=k[42],S},a$=(0,h.createContext)(null),aD=(0,g.I4)(m.Zp)`
182  background-color: var(--overlay-bg);
183  border-radius: 3px;
184  pointer-events: none;
185  position: absolute;
186  will-change: transform;
187  box-shadow: var(--overlay-box-shadow);
188  transition: none;
189
190  --overlay-bg: transparent;
191  --overlay-box-shadow: inset 0 0 0 1px transparent;
192
193  [data-overlays] & {
194    --overlay-bg: color-mix(in srgb, transparent 95%, var(--card-focus-ring-color));
195    --overlay-box-shadow: inset 0 0 0 2px
196      color-mix(in srgb, transparent 50%, var(--card-focus-ring-color));
197  }
198
199  [data-fading-out] & {
200    transition:
201      box-shadow 1550ms,
202      background-color 1550ms;
203
204    --overlay-bg: rgba(0, 0, 255, 0);
205    --overlay-box-shadow: inset 0 0 0 1px transparent;
206  }
207
208  &[data-focused] {
209    --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color);
210  }
211
212  &[data-hovered]:not([data-focused]) {
213    transition: none;
214    --overlay-box-shadow: inset 0 0 0 2px var(--card-focus-ring-color);
215  }
216
217  /* [data-unmounted] & {
218    --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color);
219  } */
220
221  :link {
222    text-decoration: none;
223  }
224`,aL=(0,g.I4)(m.so)`
225  bottom: 100%;
226  cursor: pointer;
227  pointer-events: none;
228  position: absolute;
229  right: 0;
230
231  [data-hovered]:not([data-menu-open]) & {
232    pointer-events: all;
233  }
234
235  [data-flipped] & {
236    bottom: auto;
237    top: 100%;
238  }
239`,aN=(0,g.I4)(m.so)`
240  top: 100%;
241  cursor: pointer;
242  pointer-events: none;
243  position: absolute;
244  left: 0;
245
246  gap: 4px;
247  padding: 4px 0;
248  flex-wrap: wrap;
249
250  [data-hovered]:not([data-menu-open]) & {
251    pointer-events: all;
252  }
253
254  [data-flipped] & {
255    top: calc(100% + 2rem);
256  }
257`,az=(0,g.I4)(m.so)`
258  margin: -0.5rem;
259
260  [data-hovered]:not([data-menu-open]) & {
261    pointer-events: all;
262  }
263`,aV=(0,g.I4)(m.so)`
264  bottom: 100%;
265  cursor: pointer;
266  pointer-events: none;
267  position: absolute;
268  left: 0;
269
270  [data-hovered]:not([data-menu-open]) & {
271    pointer-events: all;
272  }
273
274  [data-flipped] & {
275    bottom: auto;
276    top: 100%;
277  }
278`,aF=(0,g.I4)(m.Zp)`
279  cursor: pointer;
280  background-color: var(--card-focus-ring-color);
281  right: 0;
282  border-radius: 3px;
283
284  & [data-ui='Text'] {
285    color: #fff;
286    white-space: nowrap;
287  }
288`,aB=(0,g.I4)(m.so)`
289  display: flex;
290  align-items: center;
291  background-color: var(--card-focus-ring-color);
292  right: 0;
293  border-radius: 3px;
294  & [data-ui='Text'],
295  & [data-sanity-icon] {
296    color: #fff;
297    white-space: nowrap;
298  }
299`,aU=g.I4.div`
300  position: absolute;
301  inset: 0;
302  pointer-events: all;
303`,aH=e=>{let t,n,r,i,o,a,s,l,d,f,g,y,v,b,x,w,S,k,E=(0,c.c)(59),{id:C,element:j,focused:T,componentResolver:A,node:_,showActions:M,draggable:P,targets:R,elementType:I,comlink:O,onActivateExclusivePlugin:$,onMenuOpenChange:D}=e,{getField:L,getType:N}=aE();E[0]!==N||E[1]!==_?(t=N(_),E[0]=N,E[1]=_,E[2]=t):t=E[2];let z=t;E[3]!==_?(n="path"in _?function(e){let{id:t,type:n,path:r,baseUrl:i,tool:o,workspace:a}=e;return(0,p.iz)({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}(p.C.fromString(r)):[]})}(_):_.href,E[3]=_,E[4]=n):n=E[4];let V=n,F=function(){let e=(0,h.useContext)(a$);if(!e)throw Error("Preview Snapshots context is missing");return e}();e:{let e;if(!("path"in _)){r=void 0;break e}E[5]!==_||E[6]!==F?(e=F.find(e=>e._id===_.id)?.title,E[5]=_,E[6]=F,E[7]=e):e=E[7],r=e}let B=r;E[8]!==j||E[9]!==T||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:!!T,node:e,parent:i,type:o}},E[8]=j,E[9]=T,E[10]=L,E[11]=N,E[12]=o):o=E[12];let U=o;if(E[13]!==I||E[14]!==U||E[15]!==_?(a="element"===I?U(_):void 0,E[13]=I,E[14]=U,E[15]=_,E[16]=a):a=E[16],E[17]!==U||E[18]!==R){let e;E[20]!==U?(e=e=>U(e.sanity,e.element),E[20]=U,E[21]=e):e=E[21],s=R.map(e).filter(aq),E[17]=U,E[18]=R,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,r=(0,c.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((0,h.isValidElement)(o)){n=o;break e}i=(Array.isArray(o)?o:[o]).map(aY),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,A),W=function(e,t){let n,r=(0,c.c)(5);if(r[0]!==e||r[1]!==t){let i;r[3]!==t?(i=e=>{let n={id:ew(),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);
303E[25]!==z?(d=z?.icon?(0,u.jsx)("div",{dangerouslySetInnerHTML:{__html:z.icon}}):(0,u.jsx)(eJ.pyG,{}),E[25]=z,E[26]=d):d=E[26];let Y=d,G=(0,h.useId)();E[27]!==W?(f=W?.some(aX),E[27]=W,E[28]=f):f=E[28];let q=f||W?.length>1;E[29]!==C?(g=()=>{window.dispatchEvent(new CustomEvent("sanity-overlay/label-click",{detail:{id:C}}))},E[29]=C,E[30]=g):g=E[30];let X=g;return E[31]!==V||E[32]!==M?(y=M?(0,u.jsx)(aL,{gap:1,paddingY:1,children:(0,u.jsx)(aG,{href:V})}):null,E[31]=V,E[32]=M,E[33]=y):y=E[33],E[34]!==O||E[35]!==P||E[36]!==X||E[37]!==Y||E[38]!==G||E[39]!==W||E[40]!==$||E[41]!==D||E[42]!==q||E[43]!==B?(v=(B||q)&&(0,u.jsx)(aV,{gap:1,paddingY:1,onClick:X,children:(0,u.jsxs)(aB,{gap:2,padding:2,children:[P&&(0,u.jsx)(m.az,{marginRight:1,children:(0,u.jsx)(m.EY,{className:"drag-handle",size:0,children:(0,u.jsx)(eJ.GG1,{})})}),(0,u.jsx)(m.EY,{size:0,children:Y}),B&&(0,u.jsx)(m.EY,{size:1,weight:"medium",children:B}),q&&(0,u.jsx)(m.az,{paddingLeft:2,onClick:aK,children:(0,u.jsx)(az,{children:(0,u.jsx)(tG,{id:G,popover:{animate:!0,placement:"bottom-start",constrainSize:!0,tone:"default"},onOpen:()=>{D?.(!0)},onClose:()=>{D?.(!1)},button:(0,u.jsx)(m.$n,{icon:eJ.Lz$,tone:"primary",padding:2}),menu:(0,u.jsx)(m.W1,{paddingY:0,children:(0,u.jsx)(tb,{children:W?.map((e,t)=>(0,u.jsxs)(h.Fragment,{children:[(0,u.jsxs)(m.BJ,{role:"group",paddingY:1,space:0,children:[(0,u.jsx)(m.Dr,{paddingY:2,text:(0,u.jsx)(m.az,{paddingY:2,children:(0,u.jsx)(m.EY,{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?(0,u.jsx)(m.Dr,{paddingY:2,icon:t.icon||(0,u.jsx)(eJ.gP2,{}),text:(0,u.jsx)(m.az,{paddingY:2,children:(0,u.jsx)(m.EY,{size:1,children:t.title||t.name})}),onClick:()=>$?.(t,e.context)},t.name):null)]}),t<W.length-1&&(0,u.jsx)(m.Nj,{})]},e.id))})})})})})]})}),E[34]=O,E[35]=P,E[36]=X,E[37]=Y,E[38]=G,E[39]=W,E[40]=$,E[41]=D,E[42]=q,E[43]=B,E[44]=v):v=E[44],E[45]!==W?(b=W?.map(aZ),E[45]=W,E[46]=b):b=E[46],E[47]!==b?(x=(0,u.jsx)(aN,{children:b}),E[47]=b,E[48]=x):x=E[48],E[49]!==y||E[50]!==v||E[51]!==x?(w=(0,u.jsxs)(tb,{children:[y,v,x]}),E[49]=y,E[50]=v,E[51]=x,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,u.jsx)(n,{PointerEvents:tb,...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,u.jsxs)(u.Fragment,{children:[w,S]}),E[56]=w,E[57]=S,E[58]=k):k=E[58],k},aW=(0,h.memo)(function(e){let t,n,r,i,o,a,s,l,d,f,p,m,g,y,v=(0,c.c)(38),{draggable:b,focused:x,hovered:w,rect:S,wasMaybeCollapsed:k,enableScrollIntoView:E}=e,C=(0,h.useRef)(null),j=(0,h.useRef)(!1),T=`${S.w}px`,A=`${S.h}px`,_=`translate(${S.x}px, ${S.y}px)`;v[0]!==T||v[1]!==A||v[2]!==_?(n={width:T,height:A,transform:_},v[0]=T,v[1]=A,v[2]=_,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(nb(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:i,top:o,left:a}of nb(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){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,h.useEffect)(r,i);let[M,P]=(0,h.useState)(!1);v[9]!==w?(o=()=>
303{if(!C.current||!w)return;let e=new IntersectionObserver(e=>{let[t]=e;P(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,h.useEffect)(o,a);let[R,I]=(0,h.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=R?.plugin.component,[L,N]=(0,h.useState)(!1);v[16]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{N(!1)},v[16]=d):d=v[16],v[17]!==w?(f=[w],v[17]=w,v[18]=f):f=v[18],(0,h.useEffect)(d,f),v[19]!==D||v[20]!==L?(p=L||D?(0,u.jsx)(tu,{onDismiss:O,blockScroll:L}):null,v[19]=D,v[20]=L,v[21]=p):p=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]!==R||v[24]!==w||v[25]!==e?(m=D?(0,u.jsx)(aU,{"data-sanity-overlay-element":!0,onClick:aJ,children:(0,u.jsx)(D,{...R.context,closeExclusiveView:O})}):w?(0,u.jsx)(aH,{...e,onActivateExclusivePlugin:$,onMenuOpenChange:N}):null,v[22]=D,v[23]=R,v[24]=w,v[25]=e,v[26]=m):m=v[26],v[27]!==t||v[28]!==z||v[29]!==V||v[30]!==F||v[31]!==B||v[32]!==U||v[33]!==m?(g=(0,u.jsx)(aD,{"data-focused":z,"data-hovered":V,"data-flipped":F,"data-draggable":B,"data-menu-open":U,ref:C,style:t,children:m}),v[27]=t,v[28]=z,v[29]=V,v[30]=F,v[31]=B,v[32]=U,v[33]=m,v[34]=g):g=v[34],v[35]!==p||v[36]!==g?(y=(0,u.jsxs)(u.Fragment,{children:[p,g]}),v[35]=p,v[36]=g,v[37]=y):y=v[37],y});function aY(e){return"object"==typeof e&&"component"in e?e:{component:e,props:{}}}let aG=(0,h.memo)(function(e){let t,n,r,i,o=(0,c.c)(6),a=(0,h.useSyncExternalStore)(aQ,a0);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,u.jsx)(aF,{padding:2,children:(0,u.jsx)(m.EY,{size:1,weight:"medium",children:"Open in Studio"})}),o[3]=r):r=o[3],o[4]!==t?(i=(0,u.jsx)(m.az,{as:"a",href:t,target:"_blank",rel:"noopener noreferrer",children:r}),o[4]=t,o[5]=i):i=o[5],i});function aq(e){return void 0!==e}function aX(e){return e.exclusive.length>0}function aK(e){e.stopPropagation()}function aZ(e){return(0,u.jsx)(h.Fragment,{children:e.hud.map(t=>{let n=t.component;return n?(0,u.jsx)(n,{...e.context},t.name):null})},e.id)}function aJ(e){e.stopPropagation()}function aQ(e){let t=()=>e();return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}function a0(){return window.location.href}let a1=e=>{let t,n=(0,c.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,u.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},a2=e=>{let t,n=(0,c.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 d=`${s}px`,h=`${l}px`,f=`translate(${o}px, ${a}px)`;return n[0]!==d||n[1]!==h||n[2]!==f?(t=(0,u.jsx)("div",{style:{position:"absolute",width:d,height:h,transform:f,background:"#556bfc",border:"2px s
303olid white",borderRadius:"999px",zIndex:"999999"}}),n[0]=d,n[1]=h,n[2]=f,n[3]=t):t=n[3],t},a5=g.I4.div`
304  --drag-preview-opacity: 0.98;
305  --drag-preview-skeleton-stroke: #ffffff;
306
307  @media (prefers-color-scheme: dark) {
308    --drag-preview-skeleton-stroke: #383d51;
309  }
310
311  position: fixed;
312  display: grid;
313  transform: ${({$scaleFactor:e,$width:t,$height:n})=>`translate(calc(var(--drag-preview-x) - ${t/2}px), calc(var(--drag-preview-y) - ${n/2}px)) scale(${e})`};
314  width: ${({$width:e})=>`${e}px`};
315  height: ${({$height:e})=>`${e}px`};
316  z-index: 9999999;
317  opacity: var(--drag-preview-opacity);
318  cursor: move;
319
320  .drag-preview-content-wrapper {
321    position: relative;
322    width: 100%;
323    height: 100%;
324    container-type: inline-size;
325  }
326
327  [data-ui='card'] {
328    position: relative;
329    width: 100%;
330    height: 100%;
331  }
332
333  .drag-preview-skeleton {
334    position: absolute;
335    inset: 0;
336
337    rect {
338      stroke: var(--drag-preview-skeleton-stroke);
339    }
340  }
341
342  .drag-preview-handle {
343    position: absolute;
344    top: 4cqmin;
345    left: 4cqmin;
346    width: 6cqmin;
347    fill: var(--drag-preview-handle-fill);
348  }
349`,a3=e=>{let t,n,r,i,o,a,s,l,d,h,f,p,g,y,v,b,x,w,S,k,E,C=(0,c.c)(50),{skeleton:j}=e,T=Math.min(j.maxWidth,window.innerWidth/2),A=j.w>T?T/j.w:1,_=j.offsetX*A,M=j.offsetY*A,P=(0,m.Xy)(),R=(0,m.M4)(),I=R.radius[~~function(e,t,n,r,i){var o;return o=(e-0)*(i-1)/1920+1,o<r?r:o>i?i:o}(j.w,0,0,1,R.radius.length-2)];if(C[0]!==_||C[1]!==M||C[2]!==P||C[3]!==I||C[4]!==A||C[5]!==j.childRects||C[6]!==j.h||C[7]!==j.w){let e=j.childRects.filter(a4),u=j.childRects.filter(a6);n=a5,i=j.w,o=j.h,a=_,s=M,l=A,t=m.Zp,p=I,g=4,y="hidden",v="transparent",b=P?"dark":"light",f="drag-preview-content-wrapper",d="drag-preview-skeleton",h=`0 0 ${j.w} ${j.h}`,r=[...e,...u],C[0]=_,C[1]=M,C[2]=P,C[3]=I,C[4]=A,C[5]=j.childRects,C[6]=j.h,C[7]=j.w,C[8]=t,C[9]=n,C[10]=r,C[11]=i,C[12]=o,C[13]=a,C[14]=s,C[15]=l,C[16]=d,C[17]=h,C[18]=f,C[19]=p,C[20]=g,C[21]=y,C[22]=v,C[23]=b}else t=C[8],n=C[9],r=C[10],i=C[11],o=C[12],a=C[13],s=C[14],l=C[15],d=C[16],h=C[17],f=C[18],p=C[19],g=C[20],y=C[21],v=C[22],b=C[23];return C[24]!==r||C[25]!==R.color?(x=r.map((e,t)=>(0,u.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:R.color.skeleton.from},t)),C[24]=r,C[25]=R.color,C[26]=x):x=C[26],C[27]!==x||C[28]!==d||C[29]!==h?(w=(0,u.jsx)("svg",{className:d,viewBox:h,children:x}),C[27]=x,C[28]=d,C[29]=h,C[30]=w):w=C[30],C[31]!==w||C[32]!==f?(S=(0,u.jsx)("div",{className:f,children:w}),C[31]=w,C[32]=f,C[33]=S):S=C[33],C[34]!==t||C[35]!==S||C[36]!==p||C[37]!==g||C[38]!==y||C[39]!==v||C[40]!==b?(k=(0,u.jsx)(t,{radius:p,shadow:g,overflow:y,tone:v,scheme:b,children:S}),C[34]=t,C[35]=S,C[36]=p,C[37]=g,C[38]=y,C[39]=v,C[40]=b,C[41]=k):k=C[41],C[42]!==n||C[43]!==i||C[44]!==o||C[45]!==a||C[46]!==s||C[47]!==l||C[48]!==k?(E=(0,u.jsx)(n,{$width:i,$height:o,$offsetX:a,$offsetY:s,$scaleFactor:l,children:k}),C[42]=n,C[43]=i,C[44]=o,C[45]=a,C[46]=s,C[47]=l,C[48]=k,C[49]=E):E=C[49],E};function a4(e){return"IMG"===e.tagName}function a6(e){return"IMG"!==e.tagName}let a8=(0,g.I4)(m.Zp)`
350  position: fixed;
351  bottom: 2rem;
352  left: 2rem;
353`,a9=()=>{let e,t,n=(0,c.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,u.jsx)(a8,{padding:2,shadow:2,radius:2,style:e,children:(0,u.jsxs)(m.so,{align:"center",gap:2,children:[(0,u.jsx)(m.qW,{keys:["Shift"]}),(0,u.jsx)(m.EY,{size:1,children:"Zoom Out"}),(0,u.jsx)(eJ.mSu,{})]})}),n[1]=t):t=n[1],t};function a7(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:((e,t)=>{let{type:n}=t;switch(n){case"element/register":return e.find(e=>e.id===t.id)?e:[...e,{id:t.id,activated:!1,element:t.element,focused:!1,hovered:!1,rect:t.rect,sanity:t.sanity,dragDisabled:t.dragDisabled,targets:t.targets,elementType:t.elementType}];case"element/activate":return e.map(e=>e.id===t.id?{...e,activated:!0}:e);case"element/update":return e.map(e=>e.id===t.id?{...e,sanity:t.sanity,rect:t.rect,targets:t.targets,elementType:t.elementType}:e);case"element/unregister":return e.filter(e=>e.id!==t.id);case"element/deactivate":return e.map(e=>e.id===t.id?{...e,activated:!1,hovered:!1}:e);case"element/mouseenter":return e.map(e=>e.id===t.id?{...e,rect:t.rect,hovered:!0}:{...e,hovered:!1});case"element/mouseleave":return e.map(e=>e.id===t.id?{...e,hovered:!1}:e);case"element/updateRect":return e.map(e=>e.id===t.id?{...e,rect:t.rect}:e);case"element/click":return e.map(e=>({...e,focused:e.id===t.id&&"clicked"}));case"overlay/reset-mouse-state":return e.map(e=>({...e,focused:!1,hovered:!1}));case"overlay/blur":return e.map(e=>({...e,focused:!1}));case"presentation/blur":return e.map(e=>({...e,focused:!1}));case"presentation/focus":{let n=e.find(e=>"clicked"===e.focused);return e.map(e=>
353{let r="path"in e.sanity&&e.sanity.id===t.data.id&&e.sanity.path===t.data.path;return n&&e===n&&r?e:{...e,focused:r&&n?"duplicate":r}})}default:return e}})(e.elements,t),dragInsertPosition:s,dragSkeleton:c,dragGroupRect:h,isDragging:a,focusPath:i,perspective:o,wasMaybeCollapsed:f,dragShowMinimap:l,dragShowMinimapPrompt:u,dragMinimapTransition:d}}let se=function(e){let t,n,r,i,o,a,s,l=(0,c.c)(13),{comlink:d,children:f}=e;l[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],l[0]=t):t=l[0];let[p,m]=(0,h.useState)(t);l[1]!==d?(n=async e=>{if(d)try{let t=await d.fetch("visual-editing/preview-snapshots",void 0,{signal:e,suppressWarnings:!0});m(t.snapshots)}catch{}},l[1]=d,l[2]=n):n=l[2];let g=n;return l[3]!==d||l[4]!==g?(r=()=>{if(!d)return;let e=new AbortController,t=d.onStatus(()=>{g(e.signal)},"connected");return()=>{e.abort(),t()}},i=[d,g],l[3]=d,l[4]=g,l[5]=r,l[6]=i):(r=l[5],i=l[6]),(0,h.useEffect)(r,i),l[7]!==d?(o=()=>d?.on("presentation/preview-snapshots",e=>{m(e.snapshots)}),a=[d],l[7]=d,l[8]=o,l[9]=a):(o=l[8],a=l[9]),(0,h.useEffect)(o,a),l[10]!==f||l[11]!==p?(s=(0,u.jsx)(a$.Provider,{value:p,children:f}),l[10]=f,l[11]=p,l[12]=s):s=l[12],s};function st(e){return"document"===e.type}function sn(e){return"type"===e.type}let sr=function(e){let t,n,r,i,o,a,s,l,d,f,p,m,g=(0,c.c)(22),{comlink:y,children:v,elements:b}=e;g[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,g[0]=t):t=g[0];let[x,w]=(0,h.useState)(t),[S,k]=(0,h.useState)(null);g[1]!==y?(n=()=>{if(!y)return;let e=async function(e){if(y)try{let t=await y.fetch("visual-editing/schema",void 0,{signal:e,suppressWarnings:!0});k(t.schema)}catch{}},t=new AbortController,n=y.onStatus(()=>{e(t.signal)},"connected");return()=>{t.abort(),n()}},r=[y],g[1]=y,g[2]=n,g[3]=r):(n=g[2],r=g[3]),(0,h.useEffect)(n,r),g[4]===Symbol.for("react.memo_cache_sentinel")?(i=[],g[4]=i):i=g[4];let E=(0,h.useRef)(i),C=(0,h.useDeferredValue)(b);g[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},[]),g[5]=C,g[6]=o):o=g[6];let j=o,T=(0,h.useRef)(null);g[7]!==y||g[8]!==j?(a=()=>{if(!j.length||!y)return;let e=async(e,t)=>{let n=E.current;try{E.current=e;let n=await y.fetch("visual-editing/schema-union-types",{paths:e},{signal:t,suppressWarnings:!0});if(t.aborted)return;w(n.types),T.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}))&&(T.current?.abort(),T.current=new AbortController,e(j,T.current.signal))},s=[y,j],g[7]=y,g[8]=j,g[9]=a,g[10]=s):(a=g[9],s=g[10]),(0,h.useEffect)(a,s),g[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")?st:sn).find(e=>e.name===n)},g[11]=S,g[12]=l):l=g[12];let A=l;g[13]!==A||g[14]!==x?(d=e=>{if(!("path"in e))return{field:void 0,parent:void 0};let t=A(e);if(!t)return{field:void 0,parent:void 0};let n=e.path.split(".").flatMap(si);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(A(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}}},g[13]=A,g[14]=x,g[15]=d):d=g[15];let _=d;return g[16]!==_||g[17]!==A?(p={getField:_,getType:A},g[16]=_,g[17]=A,g[18]=p):p=g[18],f=p,g[19]!==v||g[20]!==f?(m=(0,u.jsx)(ak.Provider,{value:f,children:v}),g[19]=v,g[20]=f,g[21]=m):m=g[21],m};function si(e){return e.includes("[")?e.split(/(\[.+\])/,2):[e]}let so=(e=>{let t=e,n=new Set;return{getState:()=>t,setState:e=>
353{t=e(t),n.forEach(e=>e())},subscribe:e=>(n.add(e),()=>n.delete(e))}})({}),sa=e=>{let t,n,r,i,o,a,s,l=(0,c.c)(11),{comlink:d,children:f}=e;return l[0]!==d?(t=()=>d?.on("presentation/shared-state",ss),n=[d],l[0]=d,l[1]=t,l[2]=n):(t=l[1],n=l[2]),(0,h.useEffect)(t,n),l[3]!==d?(r=()=>{(async function(){let e=await d?.fetch("visual-editing/shared-state",void 0,{suppressWarnings:!0});e&&so.setState(()=>e.state)})().catch(sl)},i=[d],l[3]=d,l[4]=r,l[5]=i):(r=l[4],i=l[5]),(0,h.useEffect)(r,i),l[6]!==d?(a={comlink:d,store:so},l[6]=d,l[7]=a):a=l[7],o=a,l[8]!==f||l[9]!==o?(s=(0,u.jsx)(eZ.Provider,{value:o,children:f}),l[8]=f,l[9]=o,l[10]=s):s=l[10],s};function ss(e){"value"in e?so.setState(t=>({...t,[e.key]:e.value})):so.setState(t=>Object.fromEntries(Object.entries(t).filter(t=>{let[n]=t;return n!==e.key})))}function sl(e){console.debug(e),console.warn("[@sanity/visual-editing]: Failed to fetch shared state. Check your version of `sanity` is up-to-date")}let su=e=>{let t,n,r=(0,c.c)(5),{children:i,comlink:o}=e;r[0]!==o?(t=(e,t)=>{if(!o)return;let n=th[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,u.jsx)(tf.Provider,{value:a,children:i}),r[2]=i,r[3]=a,r[4]=n):n=r[4],n};function sc(){}function sd(e){return e.id}function sh(e){return!!e}function sf(e){let{sanity:t}=e;return t&&"id"in t?t:null}let sp=g.I4.div`
354  background-color: transparent;
355  direction: ltr;
356  inset: 0;
357  pointer-events: none;
358  position: absolute;
359  width: 100%;
360  height: 100%;
361  z-index: ${({$zIndex:e})=>e??"9999999"};
362`;function sm(e){let t,n;return t=requestAnimationFrame(()=>{n=requestAnimationFrame(e)}),()=>{void 0!==t&&cancelAnimationFrame(t),void 0!==n&&cancelAnimationFrame(n)}}let sg=e=>{let t,n,r,i,o,a=(0,c.c)(8),{documentIds:s}=e;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],a[0]=t):t=a[0];let[l,u]=(0,h.useState)(t);a[1]!==s?(n=()=>{u(e=>{let t=Array.from(new Set(s));return e.length===t.length&&e.reduce(sw,t)?.length===0?e:t})},r=[s],a[1]=s,a[2]=n,a[3]=r):(n=a[2],r=a[3]),(0,h.useEffect)(n,r);let d=H();return a[4]!==d||a[5]!==l?(i=()=>{for(let e of l)d.send({type:"observe",documentId:(0,p.T4)(e)}),d.send({type:"observe",documentId:(0,p.IM)(e)});return()=>{for(let e of l)d.send({type:"unobserve",documentId:(0,p.T4)(e)}),d.send({type:"unobserve",documentId:(0,p.IM)(e)})}},o=[d,l],a[4]=d,a[5]=l,a[6]=i,a[7]=o):(i=a[6],o=a[7]),(0,h.useEffect)(i,o),null},sy=e=>{let t,n,r,i=(0,c.c)(12),{comlink:o,dispatch:a,inFrame:s,inPopUp:l,onDrag:u,overlayEnabled:d,rootElement:f}=e,{dispatchDragEndEvent:m}=function(){let e,t,n,r=(0,c.c)(4),{getDocument:i}=K();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}=Q(n),{path:l,key:u}=Q(t);l&&u&&u!==a&&e.patch(async e=>{let{getSnapshot:t}=e,i=B(await t(),n.path);return s?[P(l,M({_key:a})),P(l,A(i,r,{_key:u}))]:[P(l,M(~~a)),P(l,A(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,h.useEffect)(e,t),r[3]===Symbol.for("react.memo_cache_sentinel")?(n={dispatchDragEndEvent:aS},r[3]=n):n=r[3],n}(),g=tp();i[0]!==o||i[1]!==a||i[2]!==m||i[3]!==u||i[4]!==g?(t=e=>{if("element/click"===e.type){let{sanity:t}=e;o?.post("visual-editing/focus",t),g("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;m({insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}),t&&g("Visual Editing Drag Sequence Completed",null)}else if("overlay/dragUpdateCursorPosition"===e.type)return void u(e.x,e.y);else if("overlay/dragToggleMinimap"===e.type&&!0===e.display)g("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]=m,i[3]=u,i[4]=g,i[5]=t):t=i[5];let y=function(e,t,n,r){let i,o,a=(0,c.c)(7),s=(0,h.useRef)(void 0),l=H()!==I;return a[0]!==e||a[1]!==t||a[2]!==n||a[3]!==r||a[4]!==l?(i=()=>
362{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,m=!1,g=[],y=()=>g[g.length-1];function v(e,t){e.removeEventListener("click",t.click,{capture:!0}),e.removeEventListener("contextmenu",t.contextmenu,{capture:!0}),e.removeEventListener("mousemove",t.mousemove,{capture:!0}),e.removeEventListener("mousedown",t.mousedown,{capture:!0}),e.removeEventListener("mouseenter",t.mouseenter),e.removeEventListener("mouseleave",t.mouseleave)}function b({id:t,elements:n,handlers:r}){let{element: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;v(i,r),d.unobserve(o),g=g.filter(e=>e!==i),e({type:"element/deactivate",id:t})}function w(t){if(!(!n&&!r||!i))for(let n of g){if(t===n){let n=s.get(t)?.sanity;if(!n||!eW(n))return;if(eK(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 ec(e);try{let t=JSON.parse(e);return ec(t)}catch{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=p.C.toString(function(e){let t=[];for(let n of e.split(".")){let e=eo.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=ea.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=es.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,et.is)(ei,t))return t;return}}(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(t.nodeType===Node.ELEMENT_NODE&&t.dataset?.sanityEditTarget!==void 0){let n=eY(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=eH(o);return e?r(i,e,"stega-text",!0):void 0}else if(t.nodeType===Node.ELEMENT_NODE){if("SCRIPT"===t.tagName||"SANITY-VISUAL-EDITING"===t.tagName)return;if(t.dataset?.sanity)return r(t,t.dataset.sanity,"data-attribute",!!(t.textContent&&eU(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&eU(t.textContent)));if("IMG"===t.tagName){let e=eH(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if("TIME"===t.tagName){let e=eH(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if("SVG"===t.tagName.toUpperCase()){if(!t.ariaLabel)return;let e=eH(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(i),s=o;if(i.nodeType===Node.ELEMENT_NODE&&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(i.nodeType===Node.ELEMENT_NODE&&"IMG"!==i.tagName&&"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:eY(e.targets.map(({s
362anity: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:eS(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:p}){let{element:v,measureElement:x}=d,k={click(t){let r=t.target;if(v===y()&&v.contains(r)){n&&(t.preventDefault(),t.stopPropagation());let r=s.get(v)?.sanity;r&&!m&&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;v===y()&&v.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!==g.at(-1)||v.getAttribute("data-sanity-drag-disable")||!n&&!r||!i)return;let o=s.get(v)?.sanity;if(!o||!eW(o)||!eG(o.path))return;let a=eK(v,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=>eS(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=u).some(e=>t.filter(t=>!eE(e,t)).some(t=>e.y===t.y))?"horizontal":"vertical"),d=r.getAttribute("data-sanity-drag-group"),h=!!r.getAttribute("data-sanity-drag-minimap-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=eP(n),v=document.body,{minYScaled:b,scaleFactor:x}=function(e,t){let n=t||eA(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:i}=eA(e.map(e=>eT(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;eD||(eV={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}},ez=p?~~p:document.documentElement.scrollHeight);let E=setInterval(()=>{u=i.map(e=>eS(e.elements.element))},150),C=()=>{x>=1||(o({type:"overlay/dragUpdateSkeleton",skeleton:eR(eN,r,x)}),o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eI(v,x,b,o,150).then(()=>{setTimeout(()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:eO(u)})},300)}))},j=e=>{Math.abs(e.deltaY)>=10&&x<1&&!eD&&!S&&!h&&k&&(o({type:"overlay/dragToggleMinimapPrompt",display:!0}),S=!0),!e.shiftKey||eD||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eD=!0,setTimeout(()=>{C()},50))},T=e=>{if(e.preventDefault(),eL=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}}(eN=eP(e)),4>Math.abs(eC(eN,y)))return;if(!w){let e=eO(u),t=eR(eN,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:eN.x,y:eN.y}),!e.shiftKey||eD||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eD=!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:ej(r,t,n),right:ej(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:ej(r,t,n),bottom:ej(i,t,n)}}}(eN,u,c);JSON.stringify(g)!==JSON.stringify(t)&&o({type:"overlay/dragUpdateInsertPosition",insertPosition:eM(i,g=t,c)})},A=()=>{k=!1,o({type:"overlay/dragEnd",target:a,insertPosition:g?eM(i,g,c):null,dragGroup:d,flow:c,preventInsertDefault:f}),S&&o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eD||(clearInterval(E),l(),I(),R()),P()},_=e=>{"Shift"===e.key&&eD&&(eD=!1,o({type:"overlay/dragUpdateSkeleton",skeleton:eR(eN,r,1/x)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{e$(eL.y,v,ez,o,150,eV)},50),o({type:"overlay/dragUpdateGroupRect",groupRect:null}),k||(clearInterval(E),P(),I(),R(),l()))},M=()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{e$(eL.y,v,ez,o,150,eV).then(()=>{eD=!1})},50),clearInterval(E),P(),I(),R(),l()},P=()=>{window.removeEventListener("mousemove",T),window.removeEventListener("wheel",j),window.removeEventListener("mouseup",A)},R=()=>{window.removeEventListener("keyup",_)},I=()=>{window.removeEventListener("blur",M)};window.addEventListener("blur",M),window.addEventListener("keyup",_),window.addEventListener("wheel",j),window.addEventListener("mousemove",T),window.addEventListener("mouseup",A)}({element:v,handler:e,mouseEvent:t,overlayGroup:a,target:o,onSequenceStart:()=>{m=!0},onSequenceEnd:()=>{setTimeout(()=>{m=!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")&&v.closest("[data-vercel-edit-info]")||v.closest("[data-vercel-edit-target]")||(g.push(v),e({type:"element/mouseenter",id:E,rect:eS(v)}),w(v))},mouseleave(n){function r(){g.pop();let t=y();if(e({type:"element/mouseleave",id:E}),t){w(t);let n=s.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:eS(t)})}S(v)}let{relatedTarget:i}=n,o=eB(i),a=t.contains(o);if(eF(o)&&a)return function e(t){let n=i=>{let{relatedTarget:o}=i;eB(o)?o&&eF(o)&&(t.removeEventListener("mouseleave",n),e(o)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(o);r()}},E=ew(),C={type:c,id:E,elements:d,sanity:f,handlers:k};l.add(v),u.set(x,v),a.set(E,v),s.set(v,C),h?.observe(v),e({type:"element/register",elementType:c,id:E,element:v,rect:eS(v),sanity:f,dragDisabled:!!v.getAttribute("data-sanity-drag-disable"),targets:p.map(e=>({sanity:e.sanity,element:e.elements.element}))}),o&&b(C)}(d)}}function E(t){let n=s.get(t);if(n){let{id:r,handlers:i}=n;v(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:eS(t)})}function j(e){if(o)for(let t of e){let{target:e}=t,n=eF(e)&&s.get(e);n&&(t.isIntersecting?b(n):x(n))}}function T(t){let n=eB(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}g=[],e({type:"overlay/blur"})}function A(){g=[],e({type:"overlay/reset-mouse-state"})}function _(){for(let e of l)C(e)}function M(t){"Escape"===t.key&&(g=[],e({type:"overlay/blur"}))}function P(e){let{target:t}=e;if(!(t===window.document||!eF(t)))for(let e of l)t.contains(e)&&C(e)}function R(){o||(h=new IntersectionObserver(j,{threshold:.3}
362),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",T),window.addEventListener("contextmenu",T),window.addEventListener("sanity-overlay/exclusive-plugin-closed",A),window.addEventListener("sanity-overlay/label-click",O),window.addEventListener("keydown",M),window.addEventListener("resize",_),window.addEventListener("scroll",P,{capture:!0,passive:!0}),d=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(eF(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,eF(o))){let e=o.parentElement?.closest("[data-sanity-edit-group]")||null;k({childNodes:[eF(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),R(),{activate:R,deactivate:I,destroy:function(){window.removeEventListener("click",T),window.removeEventListener("contextmenu",T),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",A),window.removeEventListener("sanity-overlay/label-click",O),window.removeEventListener("keydown",M),window.removeEventListener("resize",_),window.removeEventListener("scroll",P),f.disconnect(),d.disconnect(),l.forEach(e=>{E(e)}),a.clear(),l.clear(),g=[],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,h.useEffect)(i,o),s}(f,t,s,l);return i[6]!==y.current||i[7]!==d?(n=()=>{d?y.current?.activate():y.current?.deactivate()},i[6]=y.current,i[7]=d,i[8]=n):n=i[8],i[9]!==y||i[10]!==d?(r=[y,d],i[9]=y,i[10]=d,i[11]=r):r=i[11],(0,h.useEffect)(n,r),null},sv=e=>{let t,n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w,S,k,E,C,j,T,A,_,M=(0,c.c)(76),{comlink:P,comlinkStatus:R,componentResolver:O,inFrame:$,inPopUp:D,zIndex:L}=e,N=(0,m.Xy)();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,h.useReducer)(a7,t),{contextMenu:F,dragInsertPosition:B,dragShowMinimap:U,dragShowMinimapPrompt:W,dragSkeleton:Y,elements:G,isDragging:q,perspective:X,wasMaybeCollapsed:K,dragMinimapTransition:Z,dragGroupRect:J}=z,[Q,ee]=(0,h.useState)(null),[et,en]=(0,h.useState)(!0);M[1]!==P?(n=()=>{let e=[P?.on("presentation/focus",e=>{V({type:"presentation/focus",data:e})}),P?.on("presentation/blur",e=>{V({type:"presentation/blur",data:e})}),P?.on("presentation/toggle-overlay",()=>{en(sS)})].filter(Boolean);return()=>e.forEach(sk)},r=[P],M[1]=P,M[2]=n,M[3]=r):(n=M[2],r=M[3]),(0,h.useEffect)(n,r),function(e,t){let n,r,i=(0,c.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(sc);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,h.useEffect)(n,r)}(P,V),function(e,t,n){let r,i,o,a=(0,c.c)(7),s=(0,h.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(sf).filter(sh),r=new Set(e.map(sd));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,h.useEffect)(i,o)}(P,G,X),M[4]!==Q?(i=(e,t)=>{Q&&(Q.style.setProperty("--drag-preview-x",`${e}px`),Q.style.setProperty("--drag-preview-y",`${t-window.scrollY}px`))},M[4]=Q,M[5]=i):i=M[5];let er=i;M[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=e=>{sx(e)&&en(sC)},t=e=>{sx(e)&&en(sj),function(e,t){return e.every(e=>sb[e]?t[sb[e]]:t.key===e.toUpperCase())}(["mod","\\"],e)&&en(sT)};
362return window.addEventListener("click",sE),window.addEventListener("keydown",t),window.addEventListener("keyup",e),()=>{window.removeEventListener("click",sE),window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}},a=[en],M[6]=o,M[7]=a):(o=M[6],a=M[7]),(0,h.useEffect)(o,a);let[ei,eo]=(0,h.useState)(!1),[ea,es]=(0,h.useState)(!1),el=(0,h.useRef)(void 0);M[8]!==et?(s=()=>{if(et)return sm(()=>{eo(!0),sm(()=>{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,h.useEffect)(s,l),M[11]!==G?(f=G.flatMap(sA),M[11]=G,M[12]=f):f=M[12],d=f,M[13]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{V({type:"overlay/blur"})},M[13]=p):p=M[13];let eu=p,ec=H()!==I;g=ec?O:void 0;e:{let t;if(($||D)&&"connected"!==R||q){let e;M[14]===Symbol.for("react.memo_cache_sentinel")?(e=[],M[14]=e):e=M[14],y=e;break e}M[15]!==P||M[16]!==g||M[17]!==Z||M[18]!==U||M[19]!==G||M[20]!==$||M[21]!==q||M[22]!==ec||M[23]!==e.plugins||M[24]!==K?(t=G.filter(s_).map(t=>{let{id:n,element:r,focused:i,hovered:o,rect:a,sanity:s,dragDisabled:l,targets:c,elementType:d}=t,h=!l&&!!r.getAttribute("data-sanity")&&ec&&G.some(e=>"id"in e.sanity&&"id"in s&&eX(e.sanity,s)&&e.sanity.path!==s.path);return(0,u.jsx)(aW,{comlink:P,componentResolver:g,plugins:e.plugins,element:r,enableScrollIntoView:!q&&!Z&&!U,id:n,focused:i,hovered:o,node:s,rect:a,showActions:!$,draggable:h,isDragging:q||Z,wasMaybeCollapsed:i&&K,targets:c,elementType:d},n)}),M[15]=P,M[16]=g,M[17]=Z,M[18]=U,M[19]=G,M[20]=$,M[21]=q,M[22]=ec,M[23]=e.plugins,M[24]=K,M[25]=t):t=M[25],y=t}let ed=y,eh=N?"dark":"light",ef=ea?"":void 0,ep=ei?"":void 0;return M[26]!==d||M[27]!==X?(v=(0,u.jsx)(sg,{documentIds:d,perspective:X}),M[26]=d,M[27]=X,M[28]=v):v=M[28],M[29]!==P||M[30]!==$||M[31]!==D||M[32]!==et||M[33]!==Q||M[34]!==er?(b=(0,u.jsx)(sy,{comlink:P,dispatch:V,inFrame:$,inPopUp:D,onDrag:er,overlayEnabled:et,rootElement:Q}),M[29]=P,M[30]=$,M[31]=D,M[32]=et,M[33]=Q,M[34]=er,M[35]=b):b=M[35],M[36]!==F?(x=F&&(0,u.jsx)(aO,{...F,onDismiss:eu}),M[36]=F,M[37]=x):x=M[37],M[38]!==J||M[39]!==B||M[40]!==Z||M[41]!==W||M[42]!==q?(w=q&&!Z&&(0,u.jsxs)(u.Fragment,{children:[B&&(0,u.jsx)(a2,{dragInsertPosition:B}),W&&(0,u.jsx)(a9,{}),J&&(0,u.jsx)(a1,{dragGroupRect:J})]}),M[38]=J,M[39]=B,M[40]=Z,M[41]=W,M[42]=q,M[43]=w):w=M[43],M[44]!==Y||M[45]!==q?(S=q&&Y&&(0,u.jsx)(a3,{skeleton:Y}),M[44]=Y,M[45]=q,M[46]=S):S=M[46],M[47]!==ed||M[48]!==ef||M[49]!==ep||M[50]!==v||M[51]!==b||M[52]!==x||M[53]!==w||M[54]!==S||M[55]!==L?(k=(0,u.jsxs)(sp,{"data-fading-out":ef,"data-overlays":ep,ref:ee,$zIndex:L,children:[v,b,x,ed,w,S]}),M[47]=ed,M[48]=ef,M[49]=ep,M[50]=v,M[51]=b,M[52]=x,M[53]=w,M[54]=S,M[55]=L,M[56]=k):k=M[56],M[57]!==P||M[58]!==k?(E=(0,u.jsx)(sa,{comlink:P,children:k}),M[57]=P,M[58]=k,M[59]=E):E=M[59],M[60]!==P||M[61]!==E?(C=(0,u.jsx)(se,{comlink:P,children:E}),M[60]=P,M[61]=E,M[62]=C):C=M[62],M[63]!==P||M[64]!==G||M[65]!==C?(j=(0,u.jsx)(sr,{comlink:P,elements:G,children:C}),M[63]=P,M[64]=G,M[65]=C,M[66]=j):j=M[66],M[67]!==Q||M[68]!==j?(T=(0,u.jsx)(m.XS,{children:(0,u.jsx)(m.GD,{element:Q,children:j})}),M[67]=Q,M[68]=j,M[69]=T):T=M[69],M[70]!==eh||M[71]!==T?(A=(0,u.jsx)(m.NP,{scheme:eh,theme:m.Qx,tone:"transparent",children:T}),M[70]=eh,M[71]=T,M[72]=A):A=M[72],M[73]!==P||M[74]!==A?(_=(0,u.jsx)(su,{comlink:P,children:A}),M[73]=P,M[74]=A,M[75]=_):_=M[75],_},sb={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function sx(e){return"Alt"===e.key}function sw(e,t){return e.filter(e=>e!==t)}function sS(e){return!e}function sk(e){return e()}function sE(e){let t=e.target;if(((0,m.nY)(t)||(0,m.sb)(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 sC(e){return!e}function sj(e){return!e}function sT(e){return!e}function sA(e){return"id"in e.sanity?[e.sanity.id]:[]}function s_(e){return e.activated||e.focused}let sM=e=>{let t,n,r=(0,c.c)(4),{comlink:i,refresh:o}=e,a=(0,h.useRef)(0),s=(0,h.useRef)(0);return r[0]!==i||r[1]!==o?(t=()=>i.on("presentation/refresh",e=>{if("manual"===e.source){clearTimeout(a.current);
362let 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,h.useEffect)(t,n),null};function sP(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 sR(){console.warn("[@sanity/visual-editing] Package version mismatch detected: Please update your Sanity studio to prevent potential compatibility issues.")}function sI(){}let sO=e=>{let t,n,r,i,o,a,s,l,p=(0,c.c)(23),{components:m,plugins:g,history:y,portal:v,refresh:b,zIndex:x}=e,w=void 0===v||v,[S,k]=(0,h.useState)(null),[E,C]=(0,h.useState)(null);p[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{k((0,d.Fk)()),C((0,d.v$)())},n=[],p[0]=t,p[1]=n):(t=p[0],n=p[1]),(0,h.useEffect)(t,n);let[j,A]=(0,h.useState)(null);p[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],p[2]=w,p[3]=r,p[4]=i):(r=p[3],i=p[4]),(0,h.useEffect)(r,i);let[_,M]=function(e){let t,n,r,i,o,a=(0,c.c)(9),s=void 0===e||e,[l,u]=(0,h.useState)(),[f,p]=(0,h.useState)("idle");return a[0]!==s?(t=()=>{if(!s)return;let e=(0,nx.RM)({name:"visual-editing",connectTo:"presentation"},(0,nx.Uc)().provide({actors:(0,d.jF)()})),t=e.onStatus(()=>p("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,h.useEffect)(t,n),a[3]!==f?(r=()=>{if("connected"===f)return;let e=new AbortController;return window.addEventListener("message",sP,{signal:e.signal}),()=>{e.abort()}},i=[f],a[3]=f,a[4]=r,a[5]=i):(r=a[4],i=a[5]),(0,h.useEffect)(r,i),a[6]!==l||a[7]!==f?(o=[l,f],a[6]=l,a[7]=f,a[8]=o):o=a[8],o}(!0===S||!0===E);!function(e){let t,n,r=(0,c.c)(3);r[0]!==e?(t=()=>{if(!e)return;let t=function(e){let t=new nS.m(1),n=new nk.B;return e.fetch("visual-editing/snapshot-welcome",void 0,{suppressWarnings:!0}).then(e=>{t.next(e.event)}).catch(()=>{}
362),e.on("presentation/snapshot-event",e=>{"reconnect"===e.event.type&&t.next(e.event),"mutation"===e.event.type&&n.next(e.event)}),(0,nE.h)(t,n)}(e),n=ab.provide({actors:{documentMutatorMachine:(e=>{let t=(0,R.Sx)(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,R.Sx)(async({input:t})=>{let{transactions:n}=t;for(let t of n){let n=T.encodeTransaction(t);return e.post("visual-editing/mutate",n)}});return ay.provide({actions:{"send sync event to parent":(0,o1.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}})})(e)}}),r=(0,nw.c)(n,{input:{client:{withConfig:sI},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(O=e,$))t()}(r)}).catch(sR),()=>{r.stop(),i.abort()}},n=[e],r[0]=e,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,h.useEffect)(t,n)}("connected"===M?_:void 0),p[5]!==_||p[6]!==M||p[7]!==m||p[8]!==S||p[9]!==E||p[10]!==g||p[11]!==x?(o=null!==S&&null!==E&&(0,u.jsx)(sv,{comlink:_,comlinkStatus:M,componentResolver:m,plugins:g,inFrame:S,inPopUp:E,zIndex:x}),p[5]=_,p[6]=M,p[7]=m,p[8]=S,p[9]=E,p[10]=g,p[11]=x,p[12]=o):o=p[12],p[13]!==_||p[14]!==y||p[15]!==b?(a=_&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ax,{comlink:_,history:y}),(0,u.jsx)(aw,{comlink:_}),b&&(0,u.jsx)(sM,{comlink:_,refresh:b})]}),p[13]=_,p[14]=y,p[15]=b,p[16]=a):a=p[16],p[17]!==o||p[18]!==a?(s=(0,u.jsxs)(u.Fragment,{children:[o,a]}),p[17]=o,p[18]=a,p[19]=s):s=p[19];let P=s;return!1!==w&&j?(p[20]!==P||p[21]!==j?(l=(0,f.createPortal)(P,j),p[20]=P,p[21]=j,p[22]=l):l=p[22],l):P};sO.displayName="VisualEditing";var s$=n(27541),sD=n(57453);function sL(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 sN(e,t){if(!function(e,t){if("string"!=typeof e)return!1;let{pathname:n}=sL(e);return n===t||n.startsWith(`${t}/`)}(e,t))return e;let n=e.slice(t.length);return n.startsWith("/")?n:`/${n}`}function sz(e){let{basePath:t="",plugins:n,components:r,refresh:i,trailingSlash:o=!1,zIndex:a}=e,s=(0,s$.useRouter)(),l=(0,h.useRef)(s),[c,d]=(0,h.useState)();(0,h.useEffect)(()=>{l.current=s},[s]);let f=(0,h.useMemo)(()=>({subscribe:e=>(d(()=>e),()=>d(void 0)),update:e=>{switch(e.type){case"push":return l.current.push(sN(e.url,t));case"pop":return l.current.back();case"replace":return l.current.replace(sN(e.url,t));default:throw Error(`Unknown update type: ${e.type}`)}}}),[t]),p=(0,s$.usePathname)(),m=(0,s$.useSearchParams)();(0,h.useEffect)(()=>{c&&c({type:"push",url:((e,t)=>{let{pathname:n,query:r,hash:i}=sL(e);return t?n.endsWith("/")?`${n}${r}${i}`:`${n}/${r}${i}`:`${n.replace(/\/$/,"")||"/"}${r}${i}`})(function(e,t){if(!e.startsWith("/")||!t)return e;if("/"===e&&t)return t;let{pathname:n,query:r,hash:i}=sL(e);return`${t}${n}${r}${i}`}(`${p}${m?.size?`?${m}`:""}`,t),o)})},[t,c,p,m,o]);let g=(0,h.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"),(0,sD.q)());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"),(0,sD.q)());default:throw Error("Unknown refresh source",{cause:e})}},[i]);return(0,u.jsx)(sO,{plugins:n,components:r,history:f,portal:!0,refresh:g,zIndex:a})}},70081:(e,t,n)=>{"use strict";n.d(t,{M:()=>i});var r=n(7620);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},74607:(e,t,n)=>{"use strict";var r,i,o=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of l(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e},h={};((e,t)=>
362{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(h,{$dispatcherGuard:()=>E,$makeReadOnly:()=>j,$reset:()=>C,$structuralCheck:()=>P,c:()=>b,clearRenderCounterRegistry:()=>A,renderCounterRegistry:()=>T,useRenderCounter:()=>_}),e.exports=d(a({},"__esModule",{value:!0}),h);var f=((e,t,n)=>(n=null!=e?o(u(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)))(n(7620)),{useRef:p,useEffect:m,isValidElement:g}=f,y=null!=(r=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?r:f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.memo_cache_sentinel"),b="function"==typeof(null==(i=f.__COMPILER_RUNTIME)?void 0:i.c)?f.__COMPILER_RUNTIME.c:function(e){return f.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=v;return t[v]=!0,t},[])},x={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{x[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 w=null;function S(e){return y.ReactCurrentDispatcher.current=e,y.ReactCurrentDispatcher.current}x.useMemoCache=e=>{if(null!=w)return w.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var k=[];function E(e){let t=y.ReactCurrentDispatcher.current;if(0===e){if(k.push(t),1===k.length&&(w=t),t===x)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");S(x)}else if(1===e){let e=k.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===k.length&&(w=null),S(e)}else if(2===e)k.push(t),S(w);else if(3===e){let e=k.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");S(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function C(e){for(let t=0;t<e.length;t++)e[t]=v}function j(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var T=new Map;function A(){for(let e of T.values())e.forEach(e=>{e.count=0})}function _(e){let t=p(null);null!=t.current&&(t.current.count+=1),m(()=>{if(null==t.current){let n,r={count:0};null==(n=T.get(e))&&(n=new Set,T.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=T.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var M=new Set;function P(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}`;M.has(l)||(M.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)){if(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(g(t)||g(n))g(t)!==g(n)?a(`type ${g(t)?"React element":"object"}`,`type ${g(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}
362`,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)}},77512:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});let r=(0,n(7620).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},79506:(e,t,n)=>{"use strict";n.d(t,{BN:()=>f,RK:()=>m,UE:()=>y,UU:()=>p,cY:()=>h,jD:()=>g,we:()=>d});var r=n(3730),i=n(7620),o=n(97509),a="undefined"!=typeof document?i.useLayoutEffect:function(){};function s(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!s(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!s(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function l(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u(e,t){let n=l(e);return Math.round(t*n)/n}function c(e){let t=i.useRef(e);return a(()=>{t.current=e}),t}function d(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:d=[],platform:h,elements:{reference:f,floating:p}={},transform:m=!0,whileElementsMounted:g,open:y}=e,[v,b]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,w]=i.useState(d);s(x,d)||w(d);let[S,k]=i.useState(null),[E,C]=i.useState(null),j=i.useCallback(e=>{e!==M.current&&(M.current=e,k(e))},[]),T=i.useCallback(e=>{e!==P.current&&(P.current=e,C(e))},[]),A=f||S,_=p||E,M=i.useRef(null),P=i.useRef(null),R=i.useRef(v),I=null!=g,O=c(g),$=c(h),D=c(y),L=i.useCallback(()=>{if(!M.current||!P.current)return;let e={placement:t,strategy:n,middleware:x};$.current&&(e.platform=$.current),(0,r.rD)(M.current,P.current,e).then(e=>{let t={...e,isPositioned:!1!==D.current};N.current&&!s(R.current,t)&&(R.current=t,o.flushSync(()=>{b(t)}))})},[x,t,n,$,D]);a(()=>{!1===y&&R.current.isPositioned&&(R.current.isPositioned=!1,b(e=>({...e,isPositioned:!1})))},[y]);let N=i.useRef(!1);a(()=>(N.current=!0,()=>{N.current=!1}),[]),a(()=>{if(A&&(M.current=A),_&&(P.current=_),A&&_){if(O.current)return O.current(A,_,L);L()}},[A,_,L,O,I]);let z=i.useMemo(()=>({reference:M,floating:P,setReference:j,setFloating:T}),[j,T]),V=i.useMemo(()=>({reference:A,floating:_}),[A,_]),F=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!V.floating)return e;let t=u(V.floating,v.x),r=u(V.floating,v.y);return m?{...e,transform:"translate("+t+"px, "+r+"px)",...l(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,m,V.floating,v.x,v.y]);return i.useMemo(()=>({...v,update:L,refs:z,elements:V,floatingStyles:F}),[v,L,z,V,F])}let h=(e,t)=>({...(0,r.cY)(e),options:[e,t]}),f=(e,t)=>({...(0,r.BN)(e),options:[e,t]}),p=(e,t)=>({...(0,r.UU)(e),options:[e,t]}),m=(e,t)=>({...(0,r.RK)(e),options:[e,t]}),g=(e,t)=>({...(0,r.jD)(e),options:[e,t]}),y=(e,t)=>({...(e=>({name:"arrow",options:e,fn(t){let{element:n,padding:i}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.UE)({element:n.current,padding:i}).fn(t):{}:n?(0,r.UE)({element:n,padding:i}).fn(t):{}}}))(e),options:[e,t]})},79718:(e,t,n)=>{"use strict";n.d(t,{xQ:()=>o});var r=n(7620),i=n(50489);function o(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,r.useContext)(i.t);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]}},81715:(e,t,n)=>{var r=n(60292),i=n(27015);e.exports=r(function(e,t,n){return e+(n?" ":"")+i(t)})},81863:(e,t,n)=>{var r=n(36786),i=n(45860),o=n(43561),a=r?r.toStringTag:void 0;
362e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},86187:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},87247:(e,t,n)=>{var r=n(64805),i=n(15318),o=n(53085);e.exports=function(e){return i(e)?o(e):r(e)}},87991:(e,t,n)=>{"use strict";n.d(t,{NP:()=>to,AH:()=>tc,i7:()=>tf,I4:()=>th,DP:()=>ti});var r=n(17867),i=n(7620),o=n(55202),a=n.n(o),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,T=0,A=0,_=0,M="";function P(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 R(e,t){return g(P("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function I(e){for(;e.root;)e=R(e.root,{children:[e]});k(e,e.siblings)}function O(){return _=A<T?x(M,A++):0,j++,10===_&&(j=1,C++),_}function $(){return x(M,A)}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=A-1,n=function e(t){for(;O();)switch(_){case t:return A;case 34:case 39:34!==t&&39!==t&&e(_);break;case 40:41===t&&e(t);break;case 92:O()}return A}(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 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 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return u+t+t;case 4789:return l+t+t;case 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;
vendor: 11,546 bytes, line 362
362case 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"),/s.+-b[^;]+/,"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([R(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(R(e,{props:[v(t,/:(read-\w+)/,":"+l+"$1")]})),I(R(e,{props:[t]})),g(e,{props:E(n,r)});break;case"::placeholder":I(R(e,{props:[v(t,/:(plac\w+)/,":"+u+"input-$1")]})),I(R(e,{props:[v(t,/:(plac\w+)/,":"+l+"$1")]})),I(R(e,{props:[v(t,/:(plac\w+)/,s+"input-$1")]})),I(R(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 P(e,t,n,0===i?d:s,l,u,c,h)}function B(e,t,n,r,i){return P(e,t,n,h,w(e,0,r),w(e,r+1,-1),r,i)}var U={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},H=n(40459),W=void 0!==H&&void 0!==H.env&&(H.env.REACT_APP_SC_ATTR||H.env.SC_ATTR)||"data-styled",Y="active",G="data-styled-version",q="6.1.17",X="/*!sc*/\n",K="undefined"!=typeof window&&"HTMLElement"in window,Z=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==H&&void 0!==H.env&&void 0!==H.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==H.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==H.env.REACT_APP_SC_DISABLE_SPEEDY&&H.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==H&&void 0!==H.env&&void 0!==H.env.SC_DISABLE_SPEEDY&&""!==H.env.SC_DISABLE_SPEEDY&&"false"!==H.env.SC_DISABLE_SPEEDY&&H.env.SC_DISABLE_SPEEDY),J=Object.freeze([]),Q=Object.freeze({}),ee=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),et=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,en=/(^-|-$)/g;function er(e){return e.replace(et,"-").replace(en,"")}var ei=/(a)(d)/gi,eo=function(e){return String.fromCharCode(e+(e>25?39:97))};function ea(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=eo(t%52)+n;return(eo(t%52)+n).replace(ei,"$1-$2")}var es,el=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},eu=function(e){return el(5381,e)};function ec(e){return"string"==typeof e}var ed="function"==typeof Symbol&&Symbol.for,eh=ed?Symbol.for("react.memo"):60115,ef=ed?Symbol.for("react.forward_ref"):60112,ep={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},em={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},eg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ey=((es={})[ef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},es[eh]=eg,es);function ev(e){return("type"in e&&e.type.$$typeof)===eh?eg:"$$typeof"in e?ey[e.$$typeof]:ep}var eb=Object.defineProperty,ex=Object.getOwnPropertyNames,ew=Object.getOwnPropertySymbols,eS=Object.getOwnPropertyDescriptor,ek=Object.getPrototypeOf,eE=Object.prototype;function eC(e){return"function"==typeof e}function ej(e){return"object"==typeof e&&"styledComponentId"in e}function eT(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function eA(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function e_(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eM(e,t){Object.defineProperty(e,"toString",{value:t})}function eP(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var eR=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw eP(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),s=(o=0,t.length);o<s;o++)this.tag.insertRule(a,t[o])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o<i;o++)t+="".concat(this.tag.getRule(o)).concat(X);return t},e}(),eI=new Map,eO=new Map,e$=1,eD=function(e){if(eI.has(e))return eI.get(e);for(;eO.has(e$);)e$++;var t=e$++;return eI.set(e,t),eO.set(t,e),t},eL=function(e,t){e$=t+1,eI.set(e,t),eO.set(t,e)},eN="style[".concat(W,"][").concat(G,'="').concat(q,'"]'),ez=new RegExp("^".concat(W,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),eV=function(e,t,n){for(var r,i=n.split(","),o=0,a=i.length;o<a;o++)(r=i[o])&&e.registerName(t,r)},eF=function(e,t){for(var n,r=(null!=(n=t.textContent)?n:"").split(X),i=[],o=0,a=r.length;o<a;o++){var s=r[o].trim();if(s){var l=s.match(ez);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&(eL(c,u),eV(e,c,l[3]),e.getTag().insertRules(u,i)),i.length=0}else i.push(s)}}},eB=function(e){for(var t=document.querySelectorAll(eN),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(W)!==Y&&(eF(e,i),i.parentNode&&i.parentNode.removeChild(i))}},eU=function(e){var t,r=document.head,i=e||r,o=document.createElement("style"),a=(t=Array.from(i.querySelectorAll("style[".concat(W,"]"))))[t.length-1],s=void 0!==a?a.nextSibling:null;o.setAttribute(W,Y),o.setAttribute(G,q);var l=n.nc;return l&&o.setAttribute("nonce",l),i.insertBefore(o,s),o},eH=function(){function e(e){this.element=eU(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}throw eP(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),eW=function(){function e(e){this.element=eU(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),eY=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),eG=K,eq={isServer:!K,useCSSOMInjection:!Z},eX=function(){function e(e,t,n){void 0===e&&(e=Q),void 0===t&&(t={});var i=this;this.options=(0,r.Cl)((0,r.Cl)({},eq),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&K&&eG&&(eG=!1,eB(this)),eM(this,function(){for(var e=i.getTag(),t=e.length,n="",r=0;r<t;r++)!function(t){var r=eO.get(t);if(void 0===r)return;var o=i.names.get(r),a=e.getGroup(t);
362if(void 0!==o&&o.size&&0!==a.length){var s="".concat(W,".g").concat(t,'[id="').concat(r,'"]'),l="";void 0!==o&&o.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),n+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(X)}}(r);return n})}return e.registerId=function(e){return eD(e)},e.prototype.rehydrate=function(){!this.server&&K&&eB(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e((0,r.Cl)((0,r.Cl)({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){var e,t,n;return this.tag||(this.tag=(t=(e=this.options).useCSSOMInjection,n=e.target,new eR(e.isServer?new eY(n):t?new eH(n):new eW(n))))},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(eD(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(eD(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(eD(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),eK=/&/g,eZ=/^\s*\/\/.*$/gm;function eJ(e){var t,n,r,i=void 0===e?Q:e,o=i.options,a=void 0===o?Q:o,s=i.plugins,l=void 0===s?J:s,u=function(e,r,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,"").length>0?".".concat(t):e},h=l.slice();h.push(function(e){e.type===d&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(eK,n).replace(r,u))}),a.prefix&&h.push(V),h.push(z);var f=function(e,i,o,s){void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s="&"),t=s,n=i,r=RegExp("\\".concat(n,"\\b"),"g");var l,u,d,f,g,y,E=e.replace(eZ,""),R=(g=function e(t,n,r,i,o,a,s,l,u){for(var d,h,f,g,y=0,E=0,T=s,R=0,I=0,N=0,z=1,V=1,U=1,H=0,W="",Y=o,G=a,q=i,X=W;V;)switch(N=H,H=O()){case 40:if(108!=N&&58==x(X,T-1)){-1!=b(X+=v(L(H),"&","&\f"),"&\f",p(y?l[y-1]:0))&&(U=-1);break}case 34:case 39:case 91:X+=L(H);break;case 9:case 10:case 13:case 32:X+=function(e){for(;_=$();)if(_<33)O();else break;return D(e)>2||D(_)>3?"":" "}(N);break;case 92:X+=function(e,t){for(var n;--t&&O()&&!(_<48)&&!(_>102)&&(!(_>57)||!(_<65))&&(!(_>70)||!(_<97)););return n=A+(t<6&&32==$()&&32==O()),w(M,e,n)}(A-1,7);continue;case 47:switch($()){case 42:case 47:k((d=function(e,t){for(;O();)if(e+_===57)break;else if(e+_===84&&47===$())break;return"/*"+w(M,t,A-1)+"*"+m(47===e?e:O())}(O(),A),h=n,f=r,g=u,P(d,h,f,c,m(_),w(d,2,-2),0,g)),u);break;default:X+="/"}break;case 123*z:l[y++]=S(X)*U;case 125*z:case 59:case 0:switch(H){case 0:case 125:V=0;case 59+E:-1==U&&(X=v(X,/\f/g,"")),I>0&&S(X)-T&&k(I>32?B(X+";",i,r,T-1,u):B(v(X," ","")+";",i,r,T-2,u),u);break;case 59:X+=";";default:if(k(q=F(X,n,r,y,E,o,l,W,Y=[],G=[],T,a),a),123===H)if(0===E)e(X,n,q,q,Y,a,T,l,G);else switch(99===R&&110===x(X,3)?100:R){case 100:case 108:case 109:case 115:e(t,q,q,i&&k(F(t,q,q,0,0,o,l,W,o,Y=[],T,G),G),o,G,T,l,i?Y:G);break;default:e(X,q,q,q,[""],G,0,l,G)}}y=E=I=0,z=U=1,W=X="",T=s;break;case 58:T=1+S(X),I=N;default:if(z<1){if(123==H)--z;else if(125==H&&0==z++&&125==(_=A>0?x(M,--A):0,j--,10===_&&(j=1,C--),_))continue}switch(X+=m(H),H*z){case 38:U=E>0?1:(X+="\f",-1);break;case 44:l[y++]=(S(X)-1)*U,U=1;break;case 64:45===$()&&(X+=L(O())),R=$(),E=T=S(W=X+=function(e){for(;!D($());)O();return w(M,e,A)}(A)),H++;break;case 45:45===N&&2==S(X)&&(z=0)}}return a}("",null,null,null,[""],(f=d=o||i?"".concat(o," ").concat(i," { ").concat(E," }"):E,C=j=1,T=S(M=f),A=0,d=[]),0,[0],d),M="",g);a.namespace&&(R=function e(t,n){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(n," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(n," ")),t.props=t.props.map(function(e){return"".concat(n," ").concat(e)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=e(t.children,n)),t})}(R,a.namespace));var I=[];return N(R,(u=(l=h.concat((y=function(e){return I.push(e)},function(e){!e.root&&(e=e.return)&&y(e)}))).length,function(e,t,n,r){for(var i="",o=0;o<u;o++)i+=l[o](e,t,n,r)||"";return i})),I};return f.hash=l.length?l.reduce(function(e,t){return t.name||eP(15),el(e,t.name)},5381).toString():"",f}var eQ=new eX,e0=eJ(),e1=i.createContext({shouldForwardProp:void 0,styleSheet:eQ,stylis:e0}),e2=(e1.Consumer,i.createContext(void 0));function e5(){return(0,i.useContext)(e1)}function e3(e){var t=(0,i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=e5().styleSheet,s=(0,i.useMemo)(function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,o]),l=(0,i.useMemo)(function(){return eJ({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,i.useEffect)(function(){a()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,i.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:s,stylis:l}},[e.shouldForwardProp,s,l]);return i.createElement(e1.Provider,{value:u},i.createElement(e2.Provider,{value:l},e.children))}var e4=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=e0);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,eM(this,function(){throw eP(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=e0),this.name+e.hash},e}();function e6(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;r>="A"&&r<="Z"?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var e8=function(e){return null==e||!1===e||""===e},e9=function(e){var t=[];for(var n in e){var i=e[n];e.hasOwnProperty(n)&&!e8(i)&&(Array.isArray(i)&&i.isCss||eC(i)?t.push("".concat(e6(n),":"),i,";"):e_(i)?t.push.apply(t,(0,r.fX)((0,r.fX)(["".concat(n," {")],e9(i),!1),["}"],!1)):t.push("".concat(e6(n),": ").concat(null==i||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||n in U||n.startsWith("--")?String(i).trim():"".concat(i,"px"),";")))}return t};function e7(e,t,n,r){if(e8(e))return[];if(ej(e))return[".".concat(e.styledComponentId)];if(eC(e))return!eC(e)||e.prototype&&e.prototype.isReactComponent||!t?[e]:e7(e(t),t,n,r);
362return e instanceof e4?n?(e.inject(n,r),[e.getName(r)]):[e]:e_(e)?e9(e):Array.isArray(e)?Array.prototype.concat.apply(J,e.map(function(e){return e7(e,t,n,r)})):[e.toString()]}function te(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(eC(n)&&!ej(n))return!1}return!0}var tt=eu(q),tn=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&te(e),this.componentId=t,this.baseHash=el(tt,t),this.baseStyle=n,eX.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=eT(r,this.staticRulesId);else{var i=eA(e7(this.rules,e,t,n)),o=ea(el(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,o)){var a=n(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}r=eT(r,o),this.staticRulesId=o}else{for(var s=el(this.baseHash,n.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=eA(e7(c,e,t,n));s=el(s,d+u),l+=d}}if(l){var h=ea(s>>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),r=eT(r,h)}}return r},e}(),tr=i.createContext(void 0);function ti(){var e=(0,i.useContext)(tr);if(!e)throw eP(18);return e}function to(e){var t=i.useContext(tr),n=(0,i.useMemo)(function(){var n=e.theme;if(!n)throw eP(14);if(eC(n))return n(t);if(Array.isArray(n)||"object"!=typeof n)throw eP(8);return t?(0,r.Cl)((0,r.Cl)({},t),n):n},[e.theme,t]);return e.children?i.createElement(tr.Provider,{value:n},e.children):null}tr.Consumer;var ta={};function ts(e,t,n){var o,a,s,l,u=ej(e),c=!ec(e),d=t.attrs,h=void 0===d?J:d,f=t.componentId,p=void 0===f?(o=t.displayName,a=t.parentComponentId,ta[s="string"!=typeof o?"sc":er(o)]=(ta[s]||0)+1,l="".concat(s,"-").concat(ea(eu(q+s+ta[s])>>>0)),a?"".concat(a,"-").concat(l):l):f,m=t.displayName,g=void 0===m?ec(e)?"styled.".concat(e):"Styled(".concat(e.displayName||e.name||"Component",")"):m,y=t.displayName&&t.componentId?"".concat(er(t.displayName),"-").concat(t.componentId):t.componentId||p,v=u&&e.attrs?e.attrs.concat(h).filter(Boolean):h,b=t.shouldForwardProp;if(u&&e.shouldForwardProp){var x=e.shouldForwardProp;if(t.shouldForwardProp){var w=t.shouldForwardProp;b=function(e,t){return x(e,t)&&w(e,t)}}else b=x}var S=new tn(n,y,u?e.componentStyle:void 0);function k(e,t){return function(e,t,n){var o,a,s=e.attrs,l=e.componentStyle,u=e.defaultProps,c=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=i.useContext(tr),p=e5(),m=e.shouldForwardProp||p.shouldForwardProp,g=(void 0===(o=u)&&(o=Q),t.theme!==o.theme&&t.theme||f||o.theme||Q),y=function(e,t,n){for(var i,o=(0,r.Cl)((0,r.Cl)({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var s=eC(i=e[a])?i(o):i;for(var l in s)o[l]="className"===l?eT(o[l],s[l]):"style"===l?(0,r.Cl)((0,r.Cl)({},o[l]),s[l]):s[l]}return t.className&&(o.className=eT(o.className,t.className)),o}(s,t,g),v=y.as||h,b={};for(var x in y)void 0===y[x]||"$"===x[0]||"as"===x||"theme"===x&&y.theme===g||("forwardedAs"===x?b.as=y.forwardedAs:m&&!m(x,v)||(b[x]=y[x]));var w=(a=e5(),l.generateAndInjectStyles(y,a.styleSheet,a.stylis)),S=eT(c,d);return w&&(S+=" "+w),y.className&&(S+=" "+y.className),b[ec(v)&&!ee.has(v)?"class":"className"]=S,n&&(b.ref=n),(0,i.createElement)(v,b)}(E,e,t)}k.displayName=g;var E=i.forwardRef(k);return E.attrs=v,E.componentStyle=S,E.displayName=g,E.shouldForwardProp=b,E.foldedComponentIds=u?eT(e.foldedComponentIds,e.styledComponentId):"",E.styledComponentId=y,E.target=u?e.target:e,Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=u?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)!function e(t,n,r){if(void 0===r&&(r=!1),!r&&!e_(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(var i=0;i<n.length;i++)t[i]=e(t[i],n[i]);else if(e_(n))for(var i in n)t[i]=e(t[i],n[i]);return t}(e,t[r],!0);return e}({},e.defaultProps,t):t}}),eM(E,function(){return".".concat(E.styledComponentId)}),c&&function e(t,n,r){if("string"!=typeof n){if(eE){var i=ek(n);i&&i!==eE&&e(t,i,r)}var o=ex(n);
362ew&&(o=o.concat(ew(n)));for(var a=ev(t),s=ev(n),l=0;l<o.length;++l){var u=o[l];if(!(u in em||r&&r[u]||s&&u in s||a&&u in a)){var c=eS(n,u);try{eb(t,u,c)}catch(e){}}}}return t}(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function tl(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}var tu=function(e){return Object.assign(e,{isCss:!0})};function tc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return eC(e)||e_(e)?tu(e7(tl(J,(0,r.fX)([e],t,!0)))):0===t.length&&1===e.length&&"string"==typeof e[0]?e7(e):tu(e7(tl(e,t)))}var td=function(e){return function e(t,n,i){if(void 0===i&&(i=Q),!n)throw eP(1,n);var o=function(e){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return t(n,i,tc.apply(void 0,(0,r.fX)([e],o,!1)))};return o.attrs=function(o){return e(t,n,(0,r.Cl)((0,r.Cl)({},i),{attrs:Array.prototype.concat(i.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return e(t,n,(0,r.Cl)((0,r.Cl)({},i),o))},o}(ts,e)},th=td;function tf(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=eA(tc.apply(void 0,(0,r.fX)([e],t,!1)));return new e4(ea(eu(i)>>>0),i)}ee.forEach(function(e){th[e]=td(e)}),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=te(e),eX.registerId(this.componentId+1)}e.prototype.createStyles=function(e,t,n,r){var i=r(eA(e7(this.rules,t,n,r)),""),o=this.componentId+e;n.insertRules(o,o,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&eX.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=n.nc,i=eA([r&&'nonce="'.concat(r,'"'),"".concat(W,'="true"'),"".concat(G,'="').concat(q,'"')].filter(Boolean)," ");return"<style ".concat(i,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw eP(2);return e._emitSheetCSS()}
362,this.getStyleElement=function(){if(e.sealed)throw eP(2);var t,o=e.instance.toString();if(!o)return[];var a=((t={})[W]="",t[G]=q,t.dangerouslySetInnerHTML={__html:o},t),s=n.nc;return s&&(a.nonce=s),[i.createElement("style",(0,r.Cl)({},a,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new eX({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw eP(2);return i.createElement(e3,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw eP(3)}}()},91879:(e,t,n)=>{"use strict";n.d(t,{N:()=>b});var r=n(54568),i=n(7620),o=n(18257),a=n(70081),s=n(26106),l=n(50489),u=n(68227),c=n(77512);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(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=(0,u.s)(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function f(e){let{children:t,isPresent:n,anchorX:o,root:a}=e,s=(0,i.useId)(),l=(0,i.useRef)(null),u=(0,i.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:f}=(0,i.useContext)(c.Q),p=function(...e){return i.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=d(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():d(e[t],null)}}}}(...e),e)}(l,null==t?void 0:t.ref);return(0,i.useInsertionEffect)(()=>{let{width:e,height:t,top:r,left:i,right:c}=u.current;if(n||!l.current||!e||!t)return;l.current.dataset.motionPopId=s;let d=document.createElement("style");f&&(d.nonce=f);let h=null!=a?a:document.head;return h.appendChild(d),d.sheet&&d.sheet.insertRule('\n          [data-motion-pop-id="'.concat(s,'"] {\n            position: absolute !important;\n            width: ').concat(e,"px !important;\n            height: ").concat(t,"px !important;\n            ").concat("left"===o?"left: ".concat(i):"right: ".concat(c),"px !important;\n            top: ").concat(r,"px !important;\n          }\n        ")),()=>{h.contains(d)&&h.removeChild(d)}},[n]),(0,r.jsx)(h,{isPresent:n,childRef:l,sizeRef:u,children:i.cloneElement(t,{ref:p})})}let p=e=>{let{children:t,initial:n,isPresent:o,onExitComplete:s,custom:u,presenceAffectsLayout:c,mode:d,anchorX:h,root:p}=e,g=(0,a.M)(m),y=(0,i.useId)(),v=!0,b=(0,i.useMemo)(()=>(v=!1,{id:y,initial:n,isPresent:o,custom:u,onExitComplete:e=>{for(let t of(g.set(e,!0),g.values()))if(!t)return;s&&s()},register:e=>(g.set(e,!1),()=>g.delete(e))}),[o,g,s]);return c&&v&&(b={...b}),(0,i.useMemo)(()=>{g.forEach((e,t)=>g.set(t,!1))},[o]),i.useEffect(()=>{o||g.size||!s||s()},[o]),"popLayout"===d&&(t=(0,r.jsx)(f,{isPresent:o,anchorX:h,root:p,children:t})),(0,r.jsx)(l.t.Provider,{value:b,children:t})};function m(){return new Map}var g=n(79718);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",root:m}=e,[b,x]=(0,g.xQ)(h),w=(0,i.useMemo)(()=>v(t),[t]),S=h&&!b?[]:w.map(y),k=(0,i.useRef)(!0),E=(0,i.useRef)(w),C=(0,a.M)(()=>new Map),[j,T]=(0,i.useState)(w),[A,_]=(0,i.useState)(w);(0,s.E)(()=>{k.current=!1,E.current=w;for(let e=0;e<A.length;e++){let t=y(A[e]);S.includes(t)?C.delete(t):!0!==C.get(t)&&C.set(t,!1)}},[A,S.length,S.join("-")]);let M=[];if(w!==j){let e=[...w];for(let t=0;t<A.length;t++){let n=A[t],r=y(n);S.includes(r)||(e.splice(t,0,n),M.push(n))}return"wait"===d&&M.length&&(e=M),_(v(e)),T(w),null}let{forceRender:P}=(0,i.useContext)(o.L);return(0,r.jsx)(r.Fragment,{children:A.map(e=>{let t=y(e),i=(!h||!!b)&&(w===A||S.includes(t));return(0,r.jsx)(p,{isPresent:i,initial:(!k.current||!!l)&&void 0,custom:n,presenceAffectsLayout:c,mode:d,root:m,onExitComplete:i?void 0:()=>{if(!C.has(t))return;C.set(t,!0);let e=!0;C.forEach(t=>{t||(e=!1)}),e&&(null==P||P(),_(E.current),h&&(null==x||x()),u&&u())},anchorX:f,children:e},t)})})}},92534:(e,t,n)=>{var r=n(58250),i=n(98733),o=n(41921),a=n(14418);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)||[]}},96880:(e,t,n)=>{"use strict";var r,i,o=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of l(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e},h={};((e,t)=>
362{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(h,{$dispatcherGuard:()=>E,$makeReadOnly:()=>j,$reset:()=>C,$structuralCheck:()=>P,c:()=>b,clearRenderCounterRegistry:()=>A,renderCounterRegistry:()=>T,useRenderCounter:()=>_}),e.exports=d(a({},"__esModule",{value:!0}),h);var f=((e,t,n)=>(n=null!=e?o(u(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)))(n(7620)),{useRef:p,useEffect:m,isValidElement:g}=f,y=null!=(r=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?r:f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.memo_cache_sentinel"),b="function"==typeof(null==(i=f.__COMPILER_RUNTIME)?void 0:i.c)?f.__COMPILER_RUNTIME.c:function(e){return f.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=v;return t[v]=!0,t},[])},x={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{x[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 w=null;function S(e){return y.ReactCurrentDispatcher.current=e,y.ReactCurrentDispatcher.current}x.useMemoCache=e=>{if(null!=w)return w.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var k=[];function E(e){let t=y.ReactCurrentDispatcher.current;if(0===e){if(k.push(t),1===k.length&&(w=t),t===x)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");S(x)}else if(1===e){let e=k.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===k.length&&(w=null),S(e)}else if(2===e)k.push(t),S(w);else if(3===e){let e=k.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");S(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function C(e){for(let t=0;t<e.length;t++)e[t]=v}function j(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var T=new Map;function A(){for(let e of T.values())e.forEach(e=>{e.count=0})}function _(e){let t=p(null);null!=t.current&&(t.current.count+=1),m(()=>{if(null==t.current){let n,r={count:0};null==(n=T.get(e))&&(n=new Set,T.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=T.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var M=new Set;function P(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}`;M.has(l)||(M.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)){if(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(g(t)||g(n))g(t)!==g(n)?a(`type ${g(t)?"React element":"object"}`,`type ${g(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}
362`,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)}},97843:(e,t,n)=>{"use strict";function r(e){return"object"==typeof e&&null!==e}n.d(t,{G:()=>r})},97989:(e,t,n)=>{var r=n(27523);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)}},98733: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)}}}]);

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.