1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9053],{1033:(e,t,n)=>{var r=n(16789),i=n(98219),o=n(10056),s=n(44170),a=n(34099),l=n(46770),u=n(31254);e.exports=function(e,t){return s(e)&&a(t)?l(u(e),t):function(n){var s=i(n,e);return void 0===s&&s===t?o(n,e):r(t,s,3)}}},1676:(e,t,n)=>{"use strict";function r(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}n.d(t,{L:()=>r})},1739:e=>{e.exports=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}},2653:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var r=n(1521);let i=r.createContext(!0);function o(){throw Error("A function wrapped in useEffectEvent can't be called during rendering.")}function s(e){let t=r.useRef(o);return r.useInsertionEffect(()=>{t.current=e},[e]),(...e)=>((()=>{try{return r.use(i)}catch{return!1}})()&&o(),(0,t.current)(...e))}},2960:(e,t,n)=>{var r=n(39030),i=n(2998),o=n(58118),s=o&&o.isTypedArray;e.exports=s?i(s):r},2998:e=>{e.exports=function(e){return function(t){return e(t)}}},3348:(e,t,n)=>{var r=n(74833),i=n(96211),o=n(95422),s=n(74034),a=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:a).test(s(e))}},3381:(e,t,n)=>{"use strict";function r(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}n.d(t,{o:()=>r})},3873:(e,t,n)=>{var r=n(47026),i=n(74063),o=n(75383),s=n(14636),a=n(14950),l=n(44876),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,d,h){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||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+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 f=a;case"[object Set]":var p=1&r;if(f||(f=l),e.size!=t.size&&!p)break;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=s(f(e),f(t),r,u,d,h);return h.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},5338:(e,t,n)=>{var r=n(42926);e.exports=function(e,t,n,i){return r(e,function(e,r,o){t(i,e,n(e),o)}),i}},7585:(e,t,n)=>{e.exports=n(73764)(Object.keys,Object)},8570:(e,t,n)=>{var r=n(75383);e.exports=function(e,t){for(var n=e.length;n--;
1)if(r(e[n][0],t))return n;return -1}},9235:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});let r=(0,n(1521).createContext)({})},9291:(e,t,n)=>{e.exports=n(67533)(n(67374),"Promise")},9943:(e,t,n)=>{"use strict";n.d(t,{M:()=>i});var r=n(1521);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},9984:(e,t,n)=>{var r=n(24798),i=n(48552),o=n(44170),s=n(31254);e.exports=function(e){return o(e)?r(s(e)):i(e)}},10056:(e,t,n)=>{var r=n(43398),i=n(50021);e.exports=function(e,t){return null!=e&&i(e,t,r)}},10686:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case s:case o:case c:case d:case p:return e;default:switch(e=e&&e.$$typeof){case l:case u:case f:case h:case a:return e;default:return t}}case r:return t}}}t.ContextConsumer=a,t.ContextProvider=l,t.Element=n,t.ForwardRef=u,t.Fragment=i,t.Lazy=f,t.Memo=h,t.Portal=r,t.Profiler=s,t.StrictMode=o,t.Suspense=c,t.SuspenseList=d,t.isContextConsumer=function(e){return g(e)===a},t.isContextProvider=function(e){return g(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return g(e)===u},t.isFragment=function(e){return g(e)===i},t.isLazy=function(e){return g(e)===f},t.isMemo=function(e){return g(e)===h},t.isPortal=function(e){return g(e)===r},t.isProfiler=function(e){return g(e)===s},t.isStrictMode=function(e){return g(e)===o},t.isSuspense=function(e){return g(e)===c},t.isSuspenseList=function(e){return g(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===o||e===c||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===l||e.$$typeof===a||e.$$typeof===u||e.$$typeof===m||void 0!==e.getModuleId)||!1},t.typeOf=g},11026:(e,t,n)=>{"use strict";n.d(t,{Ms:()=>y,vU:()=>f});var r=n(46715),i=n(43734),o=n(33575),s=n(92427),a=n(13031),l=n(93222),u=c("C",void 0,void 0);function c(e,t,n){return{kind:e,value:t,error:n}}var d=n(33847),h=n(63571),f=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,(0,o.Uv)(t)&&t.add(n)):n.destination=x,n}return(0,r.C6)(t,e),t.create=function(e,t,n){return new y(e,t,n)},t.prototype.next=function(e){this.isStopped?b(c("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?b(c("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?b(u,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(o.yU),p=Function.prototype.bind;function m(e,t){return p.call(e,t)}var g=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){v(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){v(e)}else v(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){v(e)}},e}(),y=function(e){function t(t,n,r){var o,a,l=e.call(this)||this;return(0,i.T)(t)||!t?o={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:l&&s.$.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return l.unsubscribe()},o={next:t.next&&m(t.next,a),error:t.error&&m(t.error,a),complete:t.complete&&m(t.complete,a)}):o=t,l.destination=new g(o),l}return(0,r.C6)(t,e),t}(f);function v(e){s.$.useDeprecatedSynchronousErrorHandling?(0,h.l)(e):(0,a.m)(e)}function b(e,t){var n=s.$.onStoppedNotification;n&&d.f.setTimeout(function(){return n(e,t)})}var x={closed:!0,next:l.l,error:function(e){throw e},complete:l.l}},12664:e=>{e.exports=function(){return!1}},13031:(e,t,n)=>{"use strict";n.d(t,{m:()=>
1o});var r=n(92427),i=n(33847);function o(e){i.f.setTimeout(function(){var t=r.$.onUnhandledError;if(t)t(e);else throw e})}},13251:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(43734);function i(e){return(0,r.T)(null==e?void 0:e.then)}},13750:(e,t,n)=>{"use strict";n.d(t,{N:()=>b});var r=n(73365),i=n(1521),o=n(9235),s=n(9943),a=n(31011),l=n(32719),u=n(85545),c=n(83246);function d(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class h extends i.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,u.s)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,n=(0,u.s)(e)&&e.offsetWidth||0,r=(0,u.s)(e)&&e.offsetHeight||0,i=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(i.height),o.width=parseFloat(i.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function f({children:e,isPresent:t,anchorX:n,anchorY:o,root:s,pop:a}){let l=(0,i.useId)(),u=(0,i.useRef)(null),p=(0,i.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:m}=(0,i.useContext)(c.Q),g=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)}(u,e.props?.ref??e?.ref);return(0,i.useInsertionEffect)(()=>{let{width:e,height:r,top:i,left:c,right:d,bottom:h,direction:f}=p.current;if(t||!1===a||!u.current||!e||!r)return;let g="rtl"===f,y="left"===n?g?`right: ${d}`:`left: ${c}`:g?`left: ${c}`:`right: ${d}`,v="bottom"===o?`bottom: ${h}`:`top: ${i}`;u.current.dataset.motionPopId=l;let b=document.createElement("style");m&&(b.nonce=m);let x=s??document.head;return x.appendChild(b),b.sheet&&b.sheet.insertRule(` 2 [data-motion-pop-id="${l}"] { 3 position: absolute !important; 4 width: ${e}px !important; 5 height: ${r}px !important; 6 ${y}px !important; 7 ${v}px !important; 8 } 9 `),()=>{u.current?.removeAttribute("data-motion-pop-id"),x.contains(b)&&x.removeChild(b)}},[t]),(0,r.jsx)(h,{isPresent:t,childRef:u,sizeRef:p,pop:a,children:!1===a?e:i.cloneElement(e,{ref:g})})}let p=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:u,presenceAffectsLayout:c,mode:d,anchorX:h,anchorY:p,root:g})=>{let y=(0,s.M)(m),v=(0,i.useId)(),b=(0,i.useRef)(n),x=(0,i.useRef)(o);(0,a.E)(()=>{b.current=n,x.current=o});let w=!0,S=(0,i.useMemo)(()=>(w=!1,{id:v,initial:t,isPresent:n,custom:u,onExitComplete:e=>{for(let t of(y.set(e,!0),y.values()))if(!t)return;o&&o()},register:e=>(y.set(e,!1),()=>{y.delete(e),b.current||y.size||x.current?.()})}),[n,y,o]);return c&&w&&(S={...S}),(0,i.useMemo)(()=>{y.forEach((e,t)=>y.set(t,!1))},[n]),i.useEffect(()=>{n||y.size||!o||o()},[n]),e=(0,r.jsx)(f,{pop:"popLayout"===d,isPresent:n,anchorX:h,anchorY:p,root:g,children:e}),(0,r.jsx)(l.t.Provider,{value:S,children:e})};function m(){return new Map}var g=n(85656);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=({children:e,custom:t,initial:n=!0,onExitComplete:l,presenceAffectsLayout:u=!0,mode:c="sync",propagate:d=!1,anchorX:h="left",anchorY:f="top",root:m})=>{let[b,x]=(0,g.xQ)(d),w=(0,i.useMemo)(()=>v(e),[e]),S=d&&!b?[]:w.map(y),k=(0,i.useRef)(!0),E=(0,i.useRef)(w),_=(0,s.M)(()=>new Map),T=(0,i.useRef)(new Set),[j,A]=(0,i.useState)(w),[C,I]=(0,i.useState)(w);(0,a.E)(()=>{k.current=!1,E.current=w;for(let e=0;e<C.length;e++){let t=y(C[e]);S.includes(t)?(_.delete(t),T.current.delete(t)):!0!==_.get(t)&&_.set(t,!1)}},[C,S.length,S.join("-")]);let M=[];if(w!==j){let e=[...w];for(let t=0;t<C.length;t++){let n=C[t],r=y(n);S.includes(r)||(e.splice(t,0,n),M.push(n))}return"wait"===c&&M.length&&(e=M),I(v(e)),A(w),null}let{forceRender:P}=(0,i.useContext)(o.L);return(0,r.jsx)(r.Fragment,{children:C.map(e=>{let i=y(e),o=(!d||!!b)&&(w===C||S.includes(i));return(0,r.jsx)(p,{isPresent:o,initial:(!k.current||!!n)&&void 0,custom:t,presenceAffectsLayout:u,mode:c,root:m,onExitComplete:o?void 0:()=>
9{if(T.current.has(i)||!_.has(i))return;T.current.add(i),_.set(i,!0);let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(P?.(),I(E.current),d&&x?.(),l&&l())},anchorX:h,anchorY:f,children:e},i)})})}},14523:(e,t,n)=>{e.exports=n(67533)(n(67374),"DataView")},14617:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},14636:(e,t,n)=>{var r=n(40324),i=n(1739),o=n(92028);e.exports=function(e,t,n,s,a,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),f=l.get(t);if(h&&f)return h==t&&f==e;var p=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p<c;){var y=e[p],v=t[p];if(s)var b=u?s(v,y,p,t,e,l):s(y,v,p,e,t,l);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!i(t,function(e,t){if(!o(g,t)&&(y===e||a(y,e,n,s,l)))return g.push(t)})){m=!1;break}}else if(!(y===v||a(y,v,n,s,l))){m=!1;break}}return l.delete(e),l.delete(t),m}},14950:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},16789:(e,t,n)=>{var r=n(44083),i=n(36777);e.exports=function e(t,n,o,s,a){return t===n||(null!=t&&null!=n&&(i(t)||i(n))?r(t,n,o,s,e,a):t!=t&&n!=n)}},17453:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(83903),i=n(83529);function o(e,t){return(0,r.N)(function(n,r){var o=0;n.subscribe((0,i._)(r,function(n){return e.call(t,n,o++)&&r.next(n)}))})}},18464:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(11026),i=n(33575),o=n(39359),s=n(62474),a=n(92427),l=n(43734),u=n(63571),c=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var o=this,s=!function(e){return e&&e instanceof r.vU||e&&(0,l.T)(e.next)&&(0,l.T)(e.error)&&(0,l.T)(e.complete)&&(0,i.Uv)(e)}(e)?new r.Ms(e,t,n):e;return(0,u.Y)(function(){var e=o.operator,t=o.source;s.add(e?e.call(s,t):t?o._subscribe(s):o._trySubscribe(s))}),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=d(t))(function(t,i){var o=new r.Ms({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});n.subscribe(o)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[o.s]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,s.m)(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=d(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function d(e){var t;return null!=(t=null!=e?e:a.$.Promise)?t:Promise}}
9,18504:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});var r=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},18586:(e,t,n)=>{var r=n(70825),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},19456:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},19468:(e,t,n)=>{"use strict";function r(e){return e}n.d(t,{D:()=>r})},21057:(e,t,n)=>{var r=n(82527);e.exports=function(e){return null==e?"":r(e)}},21278:(e,t,n)=>{var r=n(67500),i=n(45768),o=n(24690);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},22316:(e,t,n)=>{var r=n(8570);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},22416:(e,t,n)=>{var r=n(50879),i=n(53086);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},22954:(e,t,n)=>{var r=n(26636);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this}},23939:(e,t,n)=>{var r=n(24690);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},24566:(e,t,n)=>{"use strict";let r;n.d(t,{V2:()=>L,FS:()=>F,IM:()=>H,Tx:()=>B,Rr:()=>U,vd:()=>V,_K:()=>z,CC:()=>N,RM:()=>Y,Uc:()=>q,tP:()=>W});let i="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),o=new Uint8Array(16),s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));let a=function(e,t,n){if(i&&!t&&!e)return i();var a=e,l=n;let u=(a=a||{}).random??a.rng?.()??function(){if(!r){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(o)}();if(u.length<16)throw Error("Random bytes length must be >= 16");if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,t){if((l=l||0)<0||l+16>t.length)throw RangeError(`UUID byte range ${l}:${l+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[l+e]=u[e];return t}return function(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}(u)};var l=n(83165),u=n(72789),c=n(77201),d=n(29511),h=n(29083),f=n(42351),p=n(46715),m=n(60375),g=n(18464),y=n(70206),v=n(18504),b=n(43734),x=n(44099),w=Array.isArray,S=["addListener","removeListener"],k=["addEventListener","removeEventListener"],E=["on","off"];function _(e,t,n,r){if((0,b.T)(n)&&(r=n,n=void 0),r){return _(e,t,n).pipe((i=r,(0,x.T)(function(e){return w(e)?i.apply(void 0,(0,p.fX)([],(0,p.zs)(e))):i(e)})))}var i,o,s,a,l=(0,p.zs)((o=e,(0,b.T)(o.addEventListener)&&(0,b.T)(o.removeEventListener))?k.map(function(r){return function(i){return e[r](t,i,n)}}):(s=e,(0,b.T)(s.addListener)&&(0,b.T)(s.removeListener))?S.map(T(e,t)):(a=e,(0,b.T)(a.on)&&(0,b.T)(a.off))?E.map(T(e,t)):[],2),u=l[0],c=l[1];if(!u&&(0,v.X)(e))return(0,y.Z)(function(e){return _(e,t,n)})((0,m.Tg)(e));if(!u)throw TypeError("Invalid event target");return new g.c(function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return u(t),function(){return c(t)}})}function T(e,t){return function(n){return function(r){return e[n](t,r)}}}var j=n(62474),A=n(17453),C=n(83903),I=n(83529),M=n(3381),P=n(57638);function R(e){return e<=0?function(){return P.w}:(0,C.N)(function(t,n){var r=0;t.subscribe((0,I._)(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}var O=n(93222);let $=e=>({context:t})=>{let{count:n,include:r,exclude:i,responseType:o="message.received"}=e;return{count:n,domain:t.domain,from:t.connectTo,include:r?Array.isArray(r)?r:[r]:[],exclude:i?Array.isArray(i)?i:[i]:[],responseType:o,target:t.target,to:t.name}},D=(0,f.v)(()=>_(window,"message")),N=e=>(0,l.OX)(({input:t})=>{var n,r,i;let o;return D.pipe(e?(0,x.T)(e):(0,j.F)(),(0,A.p)(e=>{let{data:n}=e;
9return(!t.include.length||t.include.includes(n.type))&&(!t.exclude.length||!t.exclude.includes(n.type))&&n.domain===t.domain&&n.from===t.from&&n.to===t.to&&(!t.target||e.source===t.target)}),(0,x.T)((o=t.responseType,e=>({type:o,message:e}))),t.count?(0,j.F)((n=t.count,void 0===r&&(r=null),r=null!=r?r:n,(0,C.N)(function(e,t){var i=[],o=0;e.subscribe((0,I._)(t,function(e){var s,a,l,u,c=null;o++%r==0&&i.push([]);try{for(var d=(0,p.Ju)(i),h=d.next();!h.done;h=d.next()){var f=h.value;f.push(e),n<=f.length&&(c=null!=c?c:[]).push(f)}}catch(e){s={error:e}}finally{try{h&&!h.done&&(a=d.return)&&a.call(d)}finally{if(s)throw s.error}}if(c)try{for(var m=(0,p.Ju)(c),g=m.next();!g.done;g=m.next()){var f=g.value;(0,M.o)(i,f),t.next(f)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(u=m.return)&&u.call(m)}finally{if(l)throw l.error}}},function(){var e,n;try{for(var r=(0,p.Ju)(i),o=r.next();!o.done;o=r.next()){var s=o.value;t.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}t.complete()},void 0,function(){i=null}))})),(i=e=>e,(0,b.T)(void 0)?(0,y.Z)(i,void 0,1):(0,y.Z)(i,1)),R(t.count)):(0,j.F)())}),L="sanity/comlink",z="comlink/response",V="comlink/heartbeat",F="comlink/disconnect",B="comlink/handshake/syn",U="comlink/handshake/syn-ack",H="comlink/handshake/ack",W=()=>(0,u.mj)({types:{},actors:{listen:(0,l.OX)(({input:e})=>{let t,n=e.signal?_(e.signal,"abort").pipe((t=`Request ${e.requestId} aborted`,e=>e.pipe(R(1),(0,x.T)(()=>{throw Error(t)})))):P.w;return _(window,"message").pipe((0,A.p)(t=>t.data?.type===z&&t.data?.responseTo===e.requestId&&!!t.source&&e.sources.has(t.source)),R(e.sources.size),(0,C.N)(function(e,t){(0,m.Tg)(n).subscribe((0,I._)(t,function(){return t.complete()},O.l)),t.closed||e.subscribe(t)}))})},actions:{"send message":({context:e},t)=>{let{sources:n,targetOrigin:r}=e,{message:i}=t;n.forEach(e=>{e.postMessage(i,{targetOrigin:r})})},"on success":(0,c.s)(({context:e})=>e.parentRef,({context:e,self:t})=>(e.response&&e.resolvable?.resolve(e.response),{type:"request.success",requestId:t.id,response:e.response,responseTo:e.responseTo})),"on fail":(0,c.s)(({context:e})=>e.parentRef,({context:e,self:t})=>(e.suppressWarnings||console.warn(`[@sanity/comlink] Received no response to message '${e.type}' on client '${e.from}' (ID: '${e.id}').`),e.resolvable?.reject(Error("No response received")),{type:"request.failed",requestId:t.id})),"on abort":(0,c.s)(({context:e})=>e.parentRef,({context:e,self:t})=>(e.resolvable?.reject(Error("Request aborted")),{type:"request.aborted",requestId:t.id}))},guards:{expectsResponse:({context:e})=>e.expectResponse},delays:{initialTimeout:0,responseTimeout:({context:e})=>e.responseTimeout??3e3}}).createMachine({context:({input:e})=>({channelId:e.channelId,data:e.data,domain:e.domain,expectResponse:e.expectResponse??!1,from:e.from,id:`msg-${a()}`,parentRef:e.parentRef,resolvable:e.resolvable,response:null,responseTimeout:e.responseTimeout,responseTo:e.responseTo,signal:e.signal,sources:e.sources instanceof Set?e.sources:new Set([e.sources]),suppressWarnings:e.suppressWarnings,targetOrigin:e.targetOrigin,to:e.to,type:e.type}),initial:"idle",on:{abort:".aborted"},states:{idle:{after:{initialTimeout:[{target:"sending"}]}},sending:{entry:{type:"send message",params:({context:e})=>{let{channelId:t,data:n,domain:r,from:i,id:o,responseTo:s,to:a,type:l}=e;return{message:{channelId:t,data:n,domain:r,from:i,id:o,to:a,type:l,responseTo:s}}}},always:[{guard:"expectsResponse",target:"awaiting"},"success"]},awaiting:{invoke:{id:"listen for response",src:"listen",input:({context:e})=>({requestId:e.id,sources:e.sources,signal:e.signal}),onError:"aborted"},after:{responseTimeout:"failed"},on:{message:{actions:(0,d.a)({response:({event:e})=>e.data.data,responseTo:({event:e})=>e.data.responseTo}),target:"success"}}},failed:{type:"final",entry:"on fail"},success:{type:"final",entry:"on success"},aborted:{type:"final",entry:"on abort"}},output:({context:e,self:t})=>({requestId:t.id,response:e.response,responseTo:e.responseTo})});(0,l.SP)(({sendBack:e,input:t})=>{let n=()=>{e(t.event)};t.immediate&&n();let r=setInterval(n,t.interval);return()=>{clearInterval(r)}});let q=()=>(0,u.mj)({types:{},actors:{requestMachine:W(),listen:N()},actions:{"buffer handshake":(0,d.a)({handshakeBuffer:({event:e,context:t})=>((0,u.DT)(e,"message.received"),[...t.handshakeBuffer,e])}),"buffer message":(0,c.e)(({enqueue:e})=>{e.assign({buffer:({event:e,context:t})=>((0,u.DT)(e,"post"),[...t.buffer,{data:e.data,resolvable:e.resolvable,options:e.options}])}),e.emit(({event:e})=>((0,u.DT)(e,"post"),{type:"buffer.added",message:e.data}))}),"create request":(0,d.a)({requests:({context:e,event:t,self:n,spawn:r})=>{(0,u.DT)(t,"request");let i=(Array.isArray(t.data)?t.data:[t.data]).map(t=>r("requestMachine",{id:`req-${a()}`,input:{channelId:e.channelId,data:t.data,domain:e.domain,expectResponse:t.expectResponse,from:e.name,parentRef:n,resolvable:t.resolvable,responseTimeout:t.options?.responseTimeout,responseTo:t.responseTo,signal:t.options?.signal,sources:e.target,suppressWarnings:t.o
9ptions?.suppressWarnings,targetOrigin:e.targetOrigin,to:e.connectTo,type:t.type}}));return[...e.requests,...i]}}),"emit heartbeat":(0,c.a)(()=>({type:"heartbeat"})),"emit received message":(0,c.e)(({enqueue:e})=>{e.emit(({event:e})=>((0,u.DT)(e,"message.received"),{type:"message",message:e.message.data}))}),"emit status":(0,c.a)((e,t)=>({type:"status",status:t.status})),"post message":(0,h.r)(({event:e})=>((0,u.DT)(e,"post"),{type:"request",data:{data:e.data.data,expectResponse:!!e.resolvable,type:e.data.type,resolvable:e.resolvable,options:e.options}})),"process pending handshakes":(0,c.e)(({context:e,enqueue:t})=>{e.handshakeBuffer.forEach(e=>t.raise(e)),t.assign({handshakeBuffer:[]})}),"remove request":(0,c.e)(({context:e,enqueue:t,event:n})=>{(0,u.DT)(n,["request.success","request.failed","request.aborted"]),(0,h.s)(n.requestId),t.assign({requests:e.requests.filter(({id:e})=>e!==n.requestId)})}),"send response":(0,h.r)(({event:e})=>((0,u.DT)(e,["message.received","heartbeat.received"]),{type:"request",data:{type:z,responseTo:e.message.data.id,data:void 0}})),"send handshake syn ack":(0,h.r)({type:"request",data:{type:U}}),"send pending messages":(0,c.e)(({enqueue:e})=>{e.raise(({context:e})=>({type:"request",data:e.buffer.map(({data:e,resolvable:t,options:n})=>({data:e.data,type:e.type,expectResponse:!!t,resolvable:t,options:n}))})),e.emit(({context:e})=>({type:"buffer.flushed",messages:e.buffer.map(({data:e})=>e)})),e.assign({buffer:[]})}),"set connection config":(0,d.a)({channelId:({event:e})=>((0,u.DT)(e,"handshake.syn"),e.message.data.channelId),target:({event:e})=>((0,u.DT)(e,"handshake.syn"),e.message.source||void 0),targetOrigin:({event:e})=>((0,u.DT)(e,"handshake.syn"),e.message.origin)})},guards:{hasSource:({context:e})=>null!==e.target}}).createMachine({id:"node",context:({input:e})=>({buffer:[],channelId:null,connectTo:e.connectTo,domain:e.domain??L,handshakeBuffer:[],name:e.name,requests:[],target:void 0,targetOrigin:null}),invoke:{id:"listen for handshake syn",src:"listen",input:$({include:B,responseType:"handshake.syn"})},on:{"request.success":{actions:"remove request"},"request.failed":{actions:"remove request"},"request.aborted":{actions:"remove request"},"handshake.syn":{actions:"set connection config",target:".handshaking"}},initial:"idle",states:{idle:{entry:[{type:"emit status",params:{status:"idle"}}],on:{post:{actions:"buffer message"}}},handshaking:{guard:"hasSource",entry:["send handshake syn ack",{type:"emit status",params:{status:"handshaking"}}],invoke:[{id:"listen for handshake ack",src:"listen",input:$({include:H,count:1,responseType:"handshake.complete"}),onDone:"connected"},{id:"listen for disconnect",src:"listen",input:$({include:F,count:1,responseType:"disconnect"})},{id:"listen for messages",src:"listen",input:$({exclude:[F,B,H,V,z]})}],on:{request:{actions:"create request"},post:{actions:"buffer message"},"message.received":{actions:"buffer handshake"},disconnect:{target:"idle"}}},connected:{entry:["process pending handshakes","send pending messages",{type:"emit status",params:{status:"connected"}}],invoke:[{id:"listen for messages",src:"listen",input:$({exclude:[F,B,H,V,z]})},{id:"listen for heartbeat",src:"listen",input:$({include:V,responseType:"heartbeat.received"})},{id:"listen for disconnect",src:"listen",input:$({include:F,count:1,responseType:"disconnect"})}],on:{request:{actions:"create request"},post:{actions:"post message"},disconnect:{target:"idle"},"message.received":{actions:["send response","emit received message"]},"heartbeat.received":{actions:["send response","emit heartbeat"]}}}}}),Y=(e,t=q())=>{let n,r=(0,h.c)(t,{input:e}),i=new Map,o=new Map;r.on("message",({message:e})=>{let t=i.get(e.type);if(t)return void t.forEach(t=>t(e.data));let n=o.get(e.type);n?n.add(e):o.set(e.type,new Set([e]))});let s=()=>{r.stop()};return{actor:r,fetch:(e,t,n)=>{let i,o,{responseTimeout:s=1e4,signal:a,suppressWarnings:l}=n||{},u="function"==typeof Promise.withResolvers?Promise.withResolvers():{promise:new Promise((e,t)=>{i=e,o=t}),resolve:i,reject:o};return r.send({type:"post",data:{type:e,data:t},resolvable:u,options:{responseTimeout:s,signal:a,suppressWarnings:l}}),u.promise},machine:t,on:(e,t,n)=>{let r=i.get(e)||new Set;i.has(e)||i.set(e,r),r.add(t);let s=o.get(e);if(s){let r=n?.replay??1;Array.from(s).slice(-r).forEach(({data:e})=>t(e)),o.delete(e)}return()=>{r.delete(t)}},onStatus:(e,t)=>{let i=r.on("status",r=>{n=r.status,t&&r.status!==t||e(r.status)});return n&&e(n),()=>i.unsubscribe()},post:(e,t)=>
9{r.send({type:"post",data:{type:e,data:t}})},start:()=>(r.start(),s),stop:s}}},24690:(e,t,n)=>{var r=n(49995),i=n(45877),o=n(25078),s=n(24786),a=n(22954);function l(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])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},24786:(e,t,n)=>{var r=n(26636);e.exports=function(e){return r(this,e).has(e)}},24798:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},25078:(e,t,n)=>{var r=n(26636);e.exports=function(e){return r(this,e).get(e)}},25368:(e,t,n)=>{var r=n(62926),i=n(16789);e.exports=function(e,t,n,o){var s=n.length,a=s,l=!o;if(null==e)return!a;for(e=Object(e);s--;){var u=n[s];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<a;){var c=(u=n[s])[0],d=e[c],h=u[1];if(l&&u[2]){if(void 0===d&&!(c in e))return!1}else{var f=new r;if(o)var p=o(d,h,c,e,t,f);if(!(void 0===p?i(h,d,3,o,f):p))return!1}}return!0}},25611: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}},26383:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},26468:(e,t,n)=>{var r=n(47026),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},26470:e=>{e.exports=function(e){return this.__data__.has(e)}},26636:(e,t,n)=>{var r=n(51329);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},26796:(e,t,n)=>{"use strict";e.exports=n(10686)},29083:(e,t,n)=>{"use strict";var r;n.d(t,{$:()=>I,B:()=>er,C:()=>w,D:()=>en,E:()=>W,F:()=>E,G:()=>et,H:()=>eo,I:()=>ee,J:()=>ei,K:()=>eT,L:()=>X,M:()=>eP,N:()=>s,O:()=>J,P:()=>function e(t,n,r,i){if("string"==typeof n){let e;return(e=ec(t,n).next(r,i))&&e.length?e:t.next(r,i)}if(1===Object.keys(n).length){let o,s;return(s=e(ec(t,(o=Object.keys(n))[0]),n[o[0]],r,i))&&s.length?s:t.next(r,i)}let o=[];for(let s of Object.keys(n)){let a=n[s];if(!a)continue;let l=e(ec(t,s),a,r,i);l&&o.push(...l)}return o.length?o:t.next(r,i)},Q:()=>eS,R:()=>m,S:()=>o,T:()=>Q,U:()=>ed,V:()=>eO,W:()=>_,X:()=>u,Y:()=>l,Z:()=>d,_:()=>M,a0:()=>eR,b:()=>N,c:()=>O,d:()=>V,e:()=>ek,f:()=>h,g:()=>ev,m:()=>T,q:()=>eh,r:()=>eN,s:()=>U,t:()=>v,z:()=>y});class i{constructor(e){this._process=e,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(e){let t={value:e,next:null};if(this._current){this._last.next=t,this._last=t;return}this._current=t,this._last=t,this._active&&this.flush()}flush(){for(;this._current;){let e=this._current;this._process(e.value),this._current=e.next}this._last=null}}let o=".",s="",a="xstate.init",l="xstate.error",u="xstate.stop";function c(e,t){return{type:`xstate.done.state.${e}`,output:t}}function d(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function h(e){return{type:a,input:e}}function f(e){setTimeout(()=>{throw e})}let p="function"==typeof Symbol&&Symbol.observable||"@@observable";function m(e){if(x(e))return e;let t=[],n="";for(let r=0;r<e.length;r++){switch(e.charCodeAt(r)){case 92:n+=e[r+1],r++;continue;case 46:t.push(n),n="";continue}n+=e[r]}return t.push(n),t}function g(e){var t;return(t=e)&&"object"==typeof t&&"machine"in t&&"value"in t?e.value:"string"!=typeof e?e:function(e){if(1===e.length)return e[0];let t={},n=t;for(let t=0;t<e.length-1;t++)if(t===e.length-2)n[e[t]]=e[t+1];else{let r=n;n={},r[e[t]]=n}return t}(m(e))}function y(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let o=r[i];n[o]=t(e[o],o,e,i)}return n}function v(e){var t;return void 0===e?[]:x(t=e)?t:[t]}function b(e,t,n,r){return"function"==typeof e?e({context:t,event:n,self:r}):e}function x(e){return Array.isArray(e)}function w(e){var t;return(x(t=e)?t:[t]).map(e=>void 0===e||"string"==typeof e?{target:e}:e)}function S(e){if(void 0!==e&&""!==e)return v(e)}function k(e,t,n){let r="object"==typeof e,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}function E(e,t){return`${t}.${e}`}function _(e,t){let n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];let[,r,i]=n,o=e.getStateNodeById(i).config.invoke;return(Array.isArray(o)?o[r]:o).src}function T(e,t){if(t===e||"*"===t)return!0;
9if(!t.endsWith(".*"))return!1;let n=t.split("."),r=e.split(".");for(let e=0;e<n.length;e++){let t=n[e],i=r[e];if("*"===t)return e===n.length-1;if(t!==i)return!1}return!0}function j(e,t){return`${e.sessionId}.${t}`}let A=0,C=!1,I=1,M=((r={})[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped",r),P={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};class R{constructor(e,t){this.logic=e,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new i(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=M.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this.systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const n={...P,...t},{clock:r,logger:o,parent:s,syncSnapshot:a,id:l,systemId:u,inspect:c}=n;this.system=s?s.system:function(e,t){let n=new Map,r=new Map,i=new WeakMap,o=new Set,s={},{clock:a,logger:l}=t,u={schedule:(e,t,n,r,i=Math.random().toString(36).slice(2))=>{let o={source:e,target:t,event:n,delay:r,id:i,startedAt:Date.now()},l=j(e,i);c._snapshot._scheduledEvents[l]=o;let u=a.setTimeout(()=>{delete s[l],delete c._snapshot._scheduledEvents[l],c._relay(e,t,n)},r);s[l]=u},cancel:(e,t)=>{let n=j(e,t),r=s[n];delete s[n],delete c._snapshot._scheduledEvents[n],void 0!==r&&a.clearTimeout(r)},cancelAll:e=>{for(let t in c._snapshot._scheduledEvents){let n=c._snapshot._scheduledEvents[t];n.source===e&&u.cancel(e,n.id)}}},c={_snapshot:{_scheduledEvents:(t?.snapshot&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${A++}`,_register:(e,t)=>(n.set(e,t),e),_unregister:e=>{n.delete(e.sessionId);let t=i.get(e);void 0!==t&&(r.delete(t),i.delete(e))},get:e=>r.get(e),getAll:()=>Object.fromEntries(r.entries()),_set:(e,t)=>{let n=r.get(e);if(n&&n!==t)throw Error(`Actor with system ID '${e}' already exists.`);r.set(e,t),i.set(t,e)},inspect:e=>{let t=k(e);return o.add(t),{unsubscribe(){o.delete(t)}}},_sendInspectionEvent:t=>{if(!o.size)return;let n={...t,rootId:e.sessionId};o.forEach(e=>e.next?.(n))},_relay:(e,t,n)=>{c._sendInspectionEvent({type:"@xstate.event",sourceRef:e,actorRef:t,event:n}),t._send(n)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...c._snapshot._scheduledEvents}}),start:()=>{let e=c._snapshot._scheduledEvents;for(let t in c._snapshot._scheduledEvents={},e){let{source:n,target:r,event:i,delay:o,id:s}=e[t];u.schedule(n,r,i,o,s)}},_clock:a,_logger:l};return c}(this,{clock:r,logger:o}),c&&!s&&this.system.inspect(k(c)),this.sessionId=this.system._bookId(),this.id=l??this.sessionId,this.logger=t?.logger??this.system._logger,this.clock=t?.clock??this.system._clock,this._parent=s,this._syncSnapshot=a,this.options=n,this.src=n.src??e,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:e=>{this._deferred.push(e)},system:this.system,stopChild:e=>{if(e._parent!==this)throw Error(`Cannot stop child actor ${e.id} of ${this.id} because it is not a child`);e._stop()},emit:e=>{let t=this.eventListeners.get(e.type),n=this.eventListeners.get("*");if(t||n)for(let r of[...t?t.values():[],...n?n.values():[]])try{r(e)}catch(e){f(e)}},actionExecutor:e=>{let t=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:e.type,params:e.params}}),!e.exec)return;let t=C;try{C=!0,e.exec(e.info,e.params)}finally{C=t}};this._processingStatus===M.Running?t():this._deferred.push(t)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),u&&(this.systemId=u,this.system._set(u,this)),this._initState(t?.snapshot??t?.state),u&&"active"!==this._snapshot.status&&this.system._unregister(this)}_initState(e){try{this._snapshot=e?this.logic.restoreSnapshot?this.logic.restoreSnapshot(e,this._actorScope):e:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(e){this._snapshot={status:"error",output:void 0,error:e}}}update(e,t){let n;for(this._snapshot=e;n=this._deferred.shift();)try{n()}catch(t){this._deferred.length=0,this._snapshot={...e,status:"error",error:t}}switch(this._snapshot.status){case"active":for(let t of this.observers)try{t.next?.(e)}catch(e){f(e)}break;case"done":var r;for(let t of this.observers)try{t.next?.(e)}catch(e){f(e)}this._stopProcedure(),this._complete(),this._doneEvent=(r=this.id,{type:`xstate.done.actor.${r}`,output:this._snapshot.output,actorId:r}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:t,snapshot:e})}subscribe(e,t,n){let r=k(e,t,n);if(this._processingStatus!==M.Stopped)this.observers.add(r);else switch(this._snapshot.status){case"done":try{r.complete?.()}catch(e){f(e)}break;case"error":{let e=this._snapshot.error;if(r.error)try{r.error(e)}catch(e){f(e)}else f(e)}}return{unsubscribe:()=>{this.observers.delete(r)}}}on(e,t){let n=this.eventListeners.get(e);n||(n=new Set,this.eventListeners.set(e,n));let r=t.bind(void 0);return n.add(r),{unsubscribe:()=>{n.delete(r)}}}select(e,t=Object.is){return{subscribe:n=>{let r=k(n),i=e(this.getSnapshot());return this.subscribe(n=>{let o=e(n);t(i,o)||(i=o,r.next?.(o))})},get:()=>e(this.getSnapshot())}}
9start(){if(this._processingStatus===M.Running)return this;this._syncSnapshot&&this.subscribe({next:e=>{"active"===e.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:e})},error:()=>{}}),this.system._register(this.sessionId,this),this.systemId&&this.system._set(this.systemId,this),this._processingStatus=M.Running;let e=h(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:e}),this._snapshot.status){case"done":return this.update(this._snapshot,e),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(e){return this._snapshot={...this._snapshot,status:"error",error:e},this._error(e),this}return this.update(this._snapshot,e),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(e){let t,n;try{t=this.logic.transition(this._snapshot,e,this._actorScope)}catch(e){n={err:e}}if(n){let{err:e}=n;this._snapshot={...this._snapshot,status:"error",error:e},this._error(e);return}this.update(t,e),e.type===u&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===M.Stopped||((this.mailbox.clear(),this._processingStatus===M.NotStarted)?this._processingStatus=M.Stopped:this.mailbox.enqueue({type:u})),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let e of this.observers)try{e.complete?.()}catch(e){f(e)}this.observers.clear(),this.eventListeners.clear()}_reportError(e){if(!this.observers.size){this._parent||f(e),this.eventListeners.clear();return}let t=!1;for(let n of this.observers){let r=n.error;t||=!r;try{r?.(e)}catch(e){f(e)}}this.observers.clear(),this.eventListeners.clear(),t&&f(e)}_error(e){this._stopProcedure(),this._reportError(e),this._parent&&this.system._relay(this,this._parent,d(this.id,e))}_stopProcedure(){return this._processingStatus!==M.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new i(this._process.bind(this)),this._processingStatus=M.Stopped,this.system._unregister(this)),this}_send(e){this._processingStatus!==M.Stopped&&this.mailbox.enqueue(e)}send(e){this.system._relay(void 0,this,e)}attachDevTools(){let{devTools:e}=this.options;e&&("function"==typeof e?e:e=>{if("u"<typeof window)return;let t=function(){let e="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:void 0!==n.g?n.g:void 0;if(e.__xstate__)return e.__xstate__}();t&&t.register(e)})(this)}toJSON(){return{xstate$$type:I,id:this.id}}getPersistedSnapshot(e){return this.logic.getPersistedSnapshot(this._snapshot,e)}[p](){return this}getSnapshot(){return this._snapshot}}function O(e,...[t]){return new R(e,t)}function $(e,t,n,r,{sendId:i}){return[t,{sendId:"function"==typeof i?i(n,r):i},void 0]}function D(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t.sendId)})}function N(e){function t(e,t){}return t.type="xstate.cancel",t.sendId=e,t.resolve=$,t.execute=D,t}function L(e,t,n,r,{id:i,systemId:o,src:s,input:a,syncSnapshot:l}){let u,c,d="string"==typeof s?_(t.machine,s):s,h="function"==typeof i?i(n):i;return d&&(c="function"==typeof a?a({context:t.context,event:n.event,self:e.self}):a,u=O(d,{id:h,src:s,parent:e.self,syncSnapshot:l,systemId:o,input:c})),[eR(t,{children:{...t.children,[h]:u}}),{id:i,systemId:o,actorRef:u,src:s,input:c},void 0]}function z(e,{actorRef:t}){t&&e.defer(()=>{t._processingStatus!==M.Stopped&&t.start()})}function V(...[e,{id:t,systemId:n,input:r,syncSnapshot:i=!1}={}]){function o(e,t){}return o.type="xstate.spawnChild",o.id=t,o.systemId=n,o.src=e,o.input=r,o.syncSnapshot=i,o.resolve=L,o.execute=z,o}function F(e,t,n,r,{actorRef:i}){let o="function"==typeof i?i(n,r):i,s="string"==typeof o?t.children[o]:o,a=t.children;return s&&(a={...a},delete a[s.id]),[eR(t,{children:a}),s,void 0]}function B(e,t){if(t){if(!function e(t,n){let r=n.getSnapshot();if(r&&"children"in r)for(let n of Object.values(r.children))e(t,n);t.system._unregister(n)}(e,t),t._processingStatus!==M.Running)return void e.stopChild(t);e.defer(()=>{e.stopChild(t)})}}function U(e){function t(e,t){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=F,t.execute=B,t}function H(e,{context:t,event:n},{guards:r}){return r.every(r=>W(r,t,n,e))}function W(e,t,n,r){let{machine:i}=r,o="function"==typeof e,s=o?e:i.implementations.guards["string"==typeof e?e:e.type];if(!o&&!s)throw Error(`Guard '${"string"==typeof e?e:e.type}' is not implemented.'.`);if("function"!=typeof s)return W(s,t,n,r);let a={context:t,event:n},l=o||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:t,event:n}):e.params:void 0;return"check"in s?s.check(r,a,s):s(a,l)}function q(e){return"atomic"===e.type||"final"===e.type}function Y(e){return Object.values(e.states).filter(e=>"history"!==e.type)}function G(e,t){let n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function X(e){let t=new Set(e),n=K(t);for(let e of t)if("compound"!==e.type||n.get(e)&&n.get(e).length){if("parallel"===e.type){for(let n of Y(e))if("history"!==n.type&&!t.has(n))for(let e of el(n))t.add(e)}}
9else el(e).forEach(e=>t.add(e));for(let e of t){let n=e.parent;for(;n;)t.add(n),n=n.parent}return t}function K(e){let t=new Map;for(let n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function Z(e,t){return function e(t,n){let r=n.get(t);if(!r)return{};if("compound"===t.type){let e=r[0];if(!e)return{};if(q(e))return e.key}let i={};for(let t of r)i[t.key]=e(t,n);return i}(e,K(X(t)))}function J(e,t){return"compound"===t.type?Y(t).some(t=>"final"===t.type&&e.has(t)):"parallel"===t.type?Y(t).every(t=>J(e,t)):"final"===t.type}let Q=e=>"#"===e[0];function ee(e,t){let n=e.transitions.get(t),r=[...e.transitions.keys()].filter(e=>e!==t&&T(t,e)).sort((e,t)=>t.length-e.length).flatMap(t=>e.transitions.get(t));return n?[...n,...r]:r}function et(e){let t=e.config.after;return t?Object.keys(t).flatMap(n=>{var r;let i,o,s=t[n],a=Number.isNaN(+n)?n:+n,l=(r=e.id,o=(i={type:`xstate.after.${a}.${r}`}).type,e.entry.push(eN(i,{id:o,delay:a})),e.exit.push(N(o)),o);return v("string"==typeof s?{target:s}:s).map(e=>({...e,event:l,delay:a}))}).map(t=>{let{delay:n}=t;return{...en(e,t.event,t),delay:n}}):[]}function en(e,t,n){let r=S(n.target),i=n.reenter??!1,s=function(e,t){if(void 0!==t)return t.map(t=>{if("string"!=typeof t)return t;if(Q(t))return e.machine.getStateNodeById(t);let n=t[0]===o;if(n&&!e.parent)return ed(e,t.slice(1));let r=n?e.key+t:t;if(e.parent)try{return ed(e.parent,r)}catch(t){throw Error(`Invalid transition definition for state node '${e.id}': 10${t.message}`)}throw Error(`Invalid target: "${t}" is not a valid target from the root node. Did you mean ".${t}"?`)})}(e,r),a={...n,actions:v(n.actions),guard:n.guard,target:s,source:e,reenter
10:i,eventType:t,toJSON:()=>({...a,source:`#${e.id}`,target:s?s.map(e=>`#${e.id}`):void 0})};return a}function er(e){let t=new Map;if(e.config.on)for(let n of Object.keys(e.config.on)){if(n===s)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let r=e.config.on[n];t.set(n,w(r).map(t=>en(e,n,t)))}if(e.config.onDone){let n=`xstate.done.state.${e.id}`;t.set(n,w(e.config.onDone).map(t=>en(e,n,t)))}for(let n of e.invoke){if(n.onDone){let r=`xstate.done.actor.${n.id}`;t.set(r,w(n.onDone).map(t=>en(e,r,t)))}if(n.onError){let r=`xstate.error.actor.${n.id}`;t.set(r,w(n.onError).map(t=>en(e,r,t)))}if(n.onSnapshot){let r=`xstate.snapshot.${n.id}`;t.set(r,w(n.onSnapshot).map(t=>en(e,r,t)))}}for(let n of e.after){let e=t.get(n.eventType);e||(e=[],t.set(n.eventType,e)),e.push(n)}return t}function ei(e){let t=[],n=r=>{Object.values(r).forEach(r=>{if(r.config.route&&r.config.id){let n=r.config.id,i=r.config.route.guard,o=({event:e})=>e.to===`#${n}`,s={...r.config.route,guard:i?function(e){function t(e,t){return!1}return t.check=H,t.guards=e,t}([o,i]):o,target:`#${n}`};t.push(en(e,"xstate.route",s))}r.states&&n(r.states)})};n(e.states),t.length>0&&e.transitions.set("xstate.route",t)}function eo(e,t){let n="string"==typeof t?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw Error(`Initial state node "${t}" not found on parent state node #${e.id}`);let r={source:e,actions:t&&"string"!=typeof t?v(t.actions):[],eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r}function es(e){let t=S(e.config.target);return t?{target:t.map(t=>"string"==typeof t?ed(e.parent,t):t)}:e.parent.initial}function ea(e){return"history"===e.type}function el(e){let t=eu(e);for(let n of t)for(let r of G(n,e))t.add(r);return t}function eu(e){let t=new Set;return!function e(n){if(!t.has(n)){if(t.add(n),"compound"===n.type)e(n.initial.target[0]);else if("parallel"===n.type)for(let t of Y(n))e(t)}}(e),t}function ec(e,t){if(Q(t))return e.machine.getStateNodeById(t);if(!e.states)throw Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);let n=e.states[t];if(!n)throw Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function ed(e,t){if("string"==typeof t&&Q(t))try{return e.machine.getStateNodeById(t)}catch{}let n=m(t).slice(),r=e;for(;n.length;){let e=n.shift();if(!e.length)break;r=ec(r,e)}return r}function eh(e,t){if("string"==typeof t){let n=e.states[t];if(!n)throw Error(`State '${t}' does not exist on '${e.id}'`);return[e,n]}let n=Object.keys(t),r=n.map(t=>ec(e,t)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((n,r)=>{let i=ec(e,r);if(!i)return n;let o=eh(i,t[r]);return n.concat(o)},[]))}function ef(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function ep(e,t,n){let r=new Set;for(let i of e){let e=!1,o=new Set;for(let s of r)if(function(e,t){let n=new Set(e),r=new Set(t);for(let e of n)if(r.has(e))return!0;for(let e of r)if(n.has(e))return!0;return!1}(ey([i],t,n),ey([s],t,n)))if(ef(i.source,s.source))o.add(s);else{e=!0;break}if(!e){for(let e of o)r.delete(e);r.add(i)}}return Array.from(r)}function em(e,t){if(!e.target)return[];let n=new Set;for(let r of e.target)if(ea(r))if(t[r.id])for(let e of t[r.id])n.add(e);else for(let e of em(es(r),t))n.add(e);else n.add(r);return[...n]}function eg(e,t){let n=em(e,t);if(!n)return;if(!e.reenter&&n.every(t=>t===e.source||ef(t,e.source)))return e.source;let r=function(e){let[t,...n]=e;for(let e of G(t,void 0))if(n.every(t=>ef(t,e)))return e}(n.concat(e.source));return r||(e.reenter?void 0:e.source.machine.root)}function ey(e,t,n){let r=new Set;for(let i of e)if(i.target?.length){let e=eg(i,n);for(let n of(i.reenter&&i.source===e&&r.add(e),t))ef(n,e)&&r.add(n)}return[...r]}function ev(e,t,n,r,i){return eb([{target:[...eu(e)],source:e,reenter
10:!0,actions:[],eventType:null,toJSON:null}],t,n,r,!0,i)}function eb(e,t,n,r,i,o){let s=[];if(!e.length)return[t,s];let a=n.actionExecutor;n.actionExecutor=e=>{s.push(e),a(e)};try{let a=new Set(t._nodes),l=t.historyValue,u=ep(e,a,l),d=t;i||([d,l]=function(e,t,n,r,i,o,s,a){let l,u=e,c=ey(r,i,o);for(let e of(c.sort((e,t)=>t.order-e.order),c))for(let t of function(e){return Object.keys(e.states).map(t=>e.states[t]).filter(e=>"history"===e.type)}(e)){let n;n="deep"===t.history?t=>q(t)&&ef(t,e):t=>t.parent===e,(l??={...o})[t.id]=Array.from(i).filter(n)}for(let e of c)u=eS(u,t,n,[...e.exit,...e.invoke.map(e=>U(e.id))],s,void 0),i.delete(e);return[u,l||o]}(d,r,n,u,a,l,o,n.actionExecutor)),d=eS(d,r,n,u.flatMap(e=>e.actions),o,void 0),d=function(e,t,n,r,i,o,s,a){let l=e,u=new Set,d=new Set;(function(e,t,n,r){for(let i of e){let e=eg(i,t);for(let o of i.target||[])!ea(o)&&(i.source!==o||i.source!==e||i.reenter)&&(r.add(o),n.add(o)),ex(o,t,n,r);for(let o of em(i,t)){let s=G(o,e);e?.type==="parallel"&&s.push(e),ew(r,t,n,s,!i.source.parent&&i.reenter?void 0:e)}}})(r,s,d,u),a&&d.add(e.machine.root);let h=new Set;for(let e of[...u].sort((e,t)=>e.order-t.order)){i.add(e);let r=[];for(let t of(r.push(...e.entry),e.invoke))r.push(V(t.src,{...t,syncSnapshot:!!t.onSnapshot}));if(d.has(e)){let t=e.initial.actions;r.push(...t)}if(l=eS(l,t,n,r,o,e.invoke.map(e=>e.id)),"final"===e.type){let r=e.parent,s=r?.type==="parallel"?r:r?.parent,a=s||e;for(r?.type==="compound"&&o.push(c(r.id,void 0!==e.output?b(e.output,l.context,t,n.self):void 0));s?.type==="parallel"&&!h.has(s)&&J(i,s);)h.add(s),o.push(c(s.id)),a=s,s=s.parent;if(s)continue;l=eR(l,{status:"done",output:function(e,t,n,r,i){if(void 0===r.output)return;let o=c(i.id,void 0!==i.output&&i.parent?b(i.output,e.context,t,n.self):void 0);return b(r.output,e.context,o,n.self)}(l,t,n,l.machine.root,a)})}}return l}(d,r,n,u,a,o,l,i);let h=[...a];"done"===d.status&&(d=eS(d,r,n,h.sort((e,t)=>t.order-e.order).flatMap(e=>e.exit),o,void 0));try{if(l===t.historyValue&&function(e,t){if(e.length!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(t._nodes,a))return[d,s];return[eR(d,{_nodes:h,historyValue:l}),s]}catch(e){throw e}}finally{n.actionExecutor=a}}function ex(e,t,n,r){var i,o,s,a;if(ea(e))if(t[e.id]){let s=t[e.id];for(let e of s)r.add(e),ex(e,t,n,r);for(let a of s){i=a,o=e.parent,ew(r,t,n,G(i,o))}}else{let i=es(e);for(let o of i.target)r.add(o),i===e.parent?.initial&&n.add(e.parent),ex(o,t,n,r);for(let o of i.target){s=o,a=e.parent,ew(r,t,n,G(s,a))}}else if("compound"===e.type){let[i]=e.initial.target;ea(i)||(r.add(i),n.add(i)),ex(i,t,n,r),ew(r,t,n,G(i,e))}else if("parallel"===e.type)for(let i of Y(e).filter(e=>!ea(e)))[...r].some(e=>ef(e,i))||(ea(i)||(r.add(i),n.add(i)),ex(i,t,n,r))}function ew(e,t,n,r,i){for(let o of r)if((!i||ef(o,i))&&e.add(o),"parallel"===o.type)for(let r of Y(o).filter(e=>!ea(e)))[...e].some(e=>ef(e,r))||(e.add(r),ex(r,t,n,e))}function eS(e,t,n,r,i,o){let s=o?[]:void 0,a=function e(t,n,r,i,o,s){let{machine:a}=t,l=t;for(let t of i){var u;let i="function"==typeof t,c=i?t:(u="string"==typeof t?t:t.type,a.implementations.actions[u]),d={context:l.context,event:n,self:r.self,system:r.system},h=i||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:l.context,event:n}):t.params:void 0;if(!c||!("resolve"in c)){r.actionExecutor({type:"string"==typeof t?t:"object"==typeof t?t.type:t.name||"(anonymous)",info:d,params:h,exec:c}
10);continue}let[f,p,m]=c.resolve(r,l,d,h,c,o);l=f,"retryResolve"in c&&s?.push([c,p]),"execute"in c&&r.actionExecutor({type:c.type,info:d,params:p,exec:c.execute.bind(null,r,p)}),m&&(l=e(l,n,r,m,o,s))}return l}(e,t,n,r,{internalQueue:i,deferredActorIds:o},s);return s?.forEach(([e,t])=>{e.retryResolve(n,a,t)}),a}function ek(e,t,n,r){let i=e,o=[];function s(e,t,r){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:t,snapshot:e[0],_transitions:r}),o.push(e)}if(t.type===u)return s([i=eR(eE(i,t,n),{status:"stopped"}),[]],t,[]),{snapshot:i,microsteps:o};let l=t;if(l.type!==a){let t=l,a=t.type.startsWith("xstate.error.actor"),u=e_(t,i);if(a&&!u.length)return s([i=eR(e,{status:"error",error:t.error}),[]],t,[]),{snapshot:i,microsteps:o};let c=eb(u,e,n,l,!1,r);i=c[0],s(c,t,u)}let c=!0,d=e.machine.options?.maxIterations??1/0,h=0;for(;"active"===i.status;){if(++h>d)throw Error(`Infinite loop detected: the machine has processed more than ${d} microsteps without reaching a stable state. This usually happens when there's a cycle of transitions (e.g., eventless transitions or raised events causing state A -> B -> C -> A).`);let e=c?function(e,t){let n=new Set;for(let r of e._nodes.filter(q))e:for(let i of[r].concat(G(r,void 0)))if(i.always){for(let r of i.always)if(void 0===r.guard||W(r.guard,e.context,t,e)){n.add(r);break e}}return ep(Array.from(n),new Set(e._nodes),e.historyValue)}(i,l):[],t=e.length?i:void 0;if(!e.length){if(!r.length)break;e=e_(l=r.shift(),i)}let o=eb(e,i,n,l,!1,r);c=(i=o[0])!==t,s(o,l,e)}return"active"!==i.status&&eE(i,l,n),{snapshot:i,microsteps:o}}function eE(e,t,n){return eS(e,t,n,Object.values(e.children).map(e=>U(e)),[],void 0)}function e_(e,t){return t.machine.getTransitionData(t,e)}function eT(e,t){let n=X(eh(e,t));return Z(e,[...n])}let ej=function(e){return function e(t,n){let r=g(t),i=g(n);return"string"==typeof i?"string"==typeof r&&i===r:"string"==typeof r?r in i:Object.keys(r).every(t=>t in i&&e(r[t],i[t]))}(e,this.value)},eA=function(e){return this.tags.has(e)},eC=function(e){let t=this.machine.getTransitionData(this,e);return!!t?.length&&t.some(e=>void 0!==e.target||e.actions.length)},eI=function(){let{_nodes:e,tags:t,machine:n,getMeta:r,toJSON:i,can:o,hasTag:s,matches:a,...l}=this;return{...l,tags:Array.from(t)}},eM=function(){return this._nodes.reduce((e,t)=>(void 0!==t.meta&&(e[t.id]=t.meta),e),{})};function eP(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:Z(t.root,e._nodes),tags:new Set(e._nodes.flatMap(e=>e.tags)),children:e.children,historyValue:e.historyValue||{},matches:ej,hasTag:eA,can:eC,getMeta:eM,toJSON:eI}}function eR(e,t={}){return eP({...e,...t},e.machine)}function eO(e,t){let{_nodes:n,tags:r,machine:i,children:o,context:s,can:a,hasTag:l,matches:u,getMeta:c,toJSON:d,...h}=e,f={};for(let e in o){let n=o[e];f[e]={snapshot:n.getPersistedSnapshot(t),src:n.src,systemId:n.systemId,syncSnapshot:n._syncSnapshot}}return{...h,context:function e(t){let n;for(let r in t){let i=t[r];if(i&&"object"==typeof i)if("sessionId"in i&&"send"in i&&"ref"in i)(n??=Array.isArray(t)?t.slice():{...t})[r]={xstate$$type:I,id:i.id};else{let o=e(i);o!==i&&((n??=Array.isArray(t)?t.slice():{...t})[r]=o)}}return n??t}(s),children:f,historyValue:function(e){if("object"!=typeof e||null===e)return{};let t={};for(let n in e){let r=e[n];Array.isArray(r)&&(t[n]=r.map(e=>({id:e.id})))}return t}(h.historyValue)}}function e$(e,t,n,r,{event:i,id:o,delay:s},{internalQueue:a}){let l,u=t.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let c="function"==typeof i?i(n,r):i;if("string"==typeof s){let e=u&&u[s];l="function"==typeof e?e(n,r):e}else l="function"==typeof s?s(n,r):s;return"number"!=typeof l&&a.push(c),[t,{event:c,id:o,delay:l},void 0]}function eD(e,t){let{event:n,delay:r,id:i}=t;if("number"==typeof r)return void e.defer(()=>{let t=e.self;e.system.scheduler.schedule(t,t,n,r,i)})}function eN(e,t){function n(e,t){}return n.type="xstate.raise",n.event=e,n.id=t?.id,n.delay=t?.delay,n.resolve=e$,n.execute=eD,n}},29458:(e,t,n)=>{var r=n(14523),i=n(45768),o=n(9291),s=n(65558),a=n(58672),l=n(39463),u=n(74034),c="[object Map]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",m=u(r),g=u(i),y=u(o),v=u(s),b=u(a),x=l;
10(r&&x(new r(new ArrayBuffer(1)))!=p||i&&x(new i)!=c||o&&x(o.resolve())!=d||s&&x(new s)!=h||a&&x(new a)!=f)&&(x=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case m:return p;case g:return c;case y:return d;case v:return h;case b:return f}return t}),e.exports=x},29511:(e,t,n)=>{"use strict";n.d(t,{a:()=>o});var r=n(29083);function i(e,t,n,o,{assignment:s}){if(!t.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let a={},l={context:t.context,event:n.event,spawn:function(e,{machine:t,context:n},i,o){return(s,a)=>{let l=((s,a)=>{if("string"!=typeof s)return(0,r.c)(s,{id:a?.id,parent:e.self,syncSnapshot:a?.syncSnapshot,input:a?.input,src:s,systemId:a?.systemId});{let l=(0,r.W)(t,s);if(!l)throw Error(`Actor logic '${s}' not implemented in machine '${t.id}'`);let u=(0,r.c)(l,{id:a?.id,parent:e.self,syncSnapshot:a?.syncSnapshot,input:"function"==typeof a?.input?a.input({context:n,event:i,self:e.self}):a?.input,src:s,systemId:a?.systemId});return o[u.id]=u,u}})(s,a);return o[l.id]=l,e.defer(()=>{l._processingStatus!==r._.Stopped&&l.start()}),l}}(e,t,n.event,a),self:e.self,system:e.system},u={};if("function"==typeof s)u=s(l,o);else for(let e of Object.keys(s)){let t=s[e];u[e]="function"==typeof t?t(l,o):t}let c=Object.assign({},t.context,u);return[(0,r.a0)(t,{context:c,children:Object.keys(a).length?{...t.children,...a}:t.children}),void 0,void 0]}function o(e){function t(e,t){}return t.type="xstate.assign",t.assignment=e,t.resolve=i,t}},30662:(e,t,n)=>{e.exports=n(68018)()},31011:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var r=n(1521);let i="u">typeof window?r.useLayoutEffect:r.useEffect},31254:(e,t,n)=>{var r=n(98881),i=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},31379:e=>{e.exports=function(e){return e}},32005:(e,t,n)=>{var r=n(88079),i=n(87511),o=Object.prototype.hasOwnProperty;e.exports=i(function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])})},32501:(e,t,n)=>{var r=n(69500),i=n(86519),o=n(73481);e.exports=function(e){return o(e)?r(e):i(e)}},32719:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});let r=(0,n(1521).createContext)(null)},33575:(e,t,n)=>{"use strict";n.d(t,{Kn:()=>l,yU:()=>a,Uv:()=>u});var r=n(46715),i=n(43734),o=(0,n(1676).L)(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}),s=n(3381),a=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,n,s,a,l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var u=(0,r.Ju)(l),d=u.next();!d.done;d=u.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else l.remove(this);var h=this.initialTeardown;if((0,i.T)(h))try{h()}catch(e){a=e instanceof o?e.errors:[e]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var p=(0,r.Ju)(f),m=p.next();!m.done;m=p.next()){var g=m.value;try{c(g)}catch(e){a=null!=a?a:[],e instanceof o?a=(0,r.fX)((0,r.fX)([],(0,r.zs)(a)),(0,r.zs)(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{m&&!m.done&&(s=p.return)&&s.call(p)}finally{if(n)throw n.error}}}if(a)throw new o(a)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)c(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(n=this._finalizers)?n:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&(0,s.o)(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&(0,s.o)(n,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),l=a.EMPTY;function u(e){return e instanceof a||e&&"closed"in e&&(0,i.T)(e.remove)&&(0,i.T)(e.add)&&(0,i.T)(e.unsubscribe)}function c(e){(0,i.T)(e)?e():e.unsubscribe()}},33847:(e,t,n)=>{"use strict";n.d(t,{f:()=>i});var r=n(46715),i={setTimeout:function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var s=i.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,(0,r.fX)([e,t],(0,r.zs)(n))):setTimeout.apply(void 0,(0,r.fX)([e,t],(0,r.zs)(n)))},clearTimeout:function(e){var t=i.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}}
10,34099:(e,t,n)=>{var r=n(95422);e.exports=function(e){return e==e&&!r(e)}},34167:(e,t,n)=>{var r=n(23939);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},36190:(e,t,n)=>{var r=n(70825),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},36322:(e,t,n)=>{var r=n(91037),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:i.call(t,h)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=l;++d<c;){var y=e[h=u[d]],v=t[h];if(o)var b=l?o(v,y,h,t,e,a):o(y,v,h,e,t,a);if(!(void 0===b?y===v||s(y,v,n,o,a):b)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var x=e.constructor,w=t.constructor;x!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w)&&(m=!1)}return a.delete(e),a.delete(t),m}},36777:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},36845:(e,t,n)=>{var r=n(53742),i=n(31254);e.exports=function(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},39030:(e,t,n)=>{var r=n(39463),i=n(78089),o=n(36777),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},39359:(e,t,n)=>{"use strict";n.d(t,{s:()=>r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},39463:(e,t,n)=>{var r=n(47026),i=n(26468),o=n(71561),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},40324:(e,t,n)=>{var r=n(24690),i=n(60147),o=n(90684);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},42351:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=n(18464),i=n(60375);function o(e){return new r.c(function(t){(0,i.Tg)(e()).subscribe(t)})}},42926:(e,t,n)=>{var r=n(78022);e.exports=n(57178)(r)},43398:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},43734:(e,t,n)=>{"use strict";function r(e){return"function"==typeof e}n.d(t,{T:()=>r})},44083:(e,t,n)=>{var r=n(62926),i=n(14636),o=n(3873),s=n(36322),a=n(29458),l=n(53086),u=n(83147),c=n(2960),d="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,y){var v=l(e),b=l(t),x=v?h:a(e),w=b?h:a(t);x=x==d?f:x,w=w==d?f:w;var S=x==f,k=w==f,E=x==w;if(E&&u(e)){if(!u(t))return!1;v=!0,S=!1}if(E&&!S)return y||(y=new r),v||c(e)?i(e,t,n,m,g,y):o(e,t,x,n,m,g,y);if(!(1&n)){var _=S&&p.call(e,"__wrapped__"),T=k&&p.call(t,"__wrapped__");
10if(_||T){var j=_?e.value():e,A=T?t.value():t;return y||(y=new r),g(j,A,n,m,y)}}return!!E&&(y||(y=new r),s(e,t,n,m,g,y))}},44099:(e,t,n)=>{"use strict";n.d(t,{T:()=>o});var r=n(83903),i=n(83529);function o(e,t){return(0,r.N)(function(n,r){var o=0;n.subscribe((0,i._)(r,function(n){r.next(e.call(t,n,o++))}))})}},44170:(e,t,n)=>{var r=n(53086),i=n(98881),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},44181:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},44876:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},45768:(e,t,n)=>{e.exports=n(67533)(n(67374),"Map")},45877:(e,t,n)=>{var r=n(26636);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=!!t,t}},46015:(e,t,n)=>{"use strict";e.exports=n(65631)},46452:(e,t,n)=>{"use strict";n.d(t,{tb:()=>q});var r,i,o,s=[],a="ResizeObserver loop completed with undelivered notifications.",l=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:a}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=a),window.dispatchEvent(e)};(r=i||(i={})).BORDER_BOX="border-box",r.CONTENT_BOX="content-box",r.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box";var u=function(e){return Object.freeze(e)},c=function(e,t){this.inlineSize=e,this.blockSize=t,u(this)},d=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,u(this)}return e.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),h=function(e){return e instanceof SVGElement&&"getBBox"in e},f=function(e){if(h(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e.offsetWidth,o=e.offsetHeight;return!(i||o||e.getClientRects().length)},p=function(e){if(e instanceof Element)return!0;var t,n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},m=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},g="u">typeof window?window:{},y=new WeakMap,v=/auto|scroll/,b=/^tb|vertical/,x=/msie|trident/i.test(g.navigator&&g.navigator.userAgent),w=function(e){return parseFloat(e||"0")},S=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new c((n?t:e)||0,(n?e:t)||0)},k=u({devicePixelContentBoxSize:S(),borderBoxSize:S(),contentBoxSize:S(),contentRect:new d(0,0,0,0)}),E=function(e,t){if(void 0===t&&(t=!1),y.has(e)&&!t)return y.get(e);if(f(e))return y.set(e,k),k;var n=getComputedStyle(e),r=h(e)&&e.ownerSVGElement&&e.getBBox(),i=!x&&"border-box"===n.boxSizing,o=b.test(n.writingMode||""),s=!r&&v.test(n.overflowY||""),a=!r&&v.test(n.overflowX||""),l=r?0:w(n.paddingTop),c=r?0:w(n.paddingRight),p=r?0:w(n.paddingBottom),m=r?0:w(n.paddingLeft),g=r?0:w(n.borderTopWidth),E=r?0:w(n.borderRightWidth),_=r?0:w(n.borderBottomWidth),T=r?0:w(n.borderLeftWidth),j=m+c,A=l+p,C=T+E,I=g+_,M=a?e.offsetHeight-I-e.clientHeight:0,P=s?e.offsetWidth-C-e.clientWidth:0,R=r?r.width:w(n.width)-(i?j+C:0)-P,O=r?r.height:w(n.height)-(i?A+I:0)-M,$=R+j+P+C,D=O+A+M+I,N=u({devicePixelContentBoxSize:S(Math.round(R*devicePixelRatio),Math.round(O*devicePixelRatio),o),borderBoxSize:S($,D,o),contentBoxSize:S(R,O,o),contentRect:new d(m,l,R,O)});return y.set(e,N),N},_=function(e,t,n){var r=E(e,n),o=r.borderBoxSize,s=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case i.DEVICE_PIXEL_CONTENT_BOX:return a;case i.BORDER_BOX:return o;default:return s}},T=function(e){var t=E(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=u([t.borderBoxSize]),this.contentBoxSize=u([t.contentBoxSize]),this.devicePixelContentBoxSize=u([t.devicePixelContentBoxSize])},j=function(e){if(f(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},A=function(){var e=1/0,t=[];
10s.forEach(function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach(function(t){var n=new T(t.target),i=j(t.target);r.push(n),t.lastReportedSize=_(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0;n<t.length;n++)(0,t[n])();return e},C=function(e){s.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(j(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},I=function(){var e=0;for(C(0);s.some(function(e){return e.activeTargets.length>0});)C(e=A());return s.some(function(e){return e.skippedTargets.length>0})&&l(),e>0},M=[],P=function(e){if(!o){var t=0,n=document.createTextNode("");new MutationObserver(function(){return M.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),o=function(){n.textContent="".concat(t?t--:t++)}}M.push(e),o()},R=function(e){P(function(){requestAnimationFrame(e)})},O=0,$={attributes:!0,characterData:!0,childList:!0,subtree:!0},D=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],N=function(e){return void 0===e&&(e=0),Date.now()+e},L=!1,z=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!L){L=!0;var n=N(e);R(function(){var r=!1;try{r=I()}finally{if(L=!1,e=n-N(),!O)return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,$)};document.body?t():g.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),D.forEach(function(t){return g.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),D.forEach(function(t){return g.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),V=function(e){!O&&e>0&&z.start(),(O+=e)||z.stop()},F=function(){function e(e,t){this.target=e,this.observedBox=t||i.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=_(this.target,this.observedBox,!0);return h(e=this.target)||m(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),B=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},U=new WeakMap,H=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return -1},W=function(){function e(){}return e.connect=function(e,t){var n=new B(e,t);U.set(e,n)},e.observe=function(e,t,n){var r=U.get(e),i=0===r.observationTargets.length;0>H(r.observationTargets,t)&&(i&&s.push(r),r.observationTargets.push(new F(t,n&&n.box)),V(1),z.schedule())},e.unobserve=function(e,t){var n=U.get(e),r=H(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&s.splice(s.indexOf(n),1),n.observationTargets.splice(r,1),V(-1))},e.disconnect=function(e){var t=this,n=U.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),q=function(){function e(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");W.connect(this,e)}return e.prototype.observe=function(e,t){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");W.observe(this,e,t)},e.prototype.unobserve=function(e){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");W.unobserve(this,e)},e.prototype.disconnect=function(){W.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()},46715:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>
10d,C6:()=>i,Ju:()=>a,N3:()=>c,YH:()=>s,fX:()=>u,sH:()=>o,xN:()=>h,zs:()=>l});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})}function s(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){var u=[a,l];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function a(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function u(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function c(e){return this instanceof c?(this.v=e,this):new c(e)}function d(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||a(e,t)})},t&&(r[e]=t(r[e])))}function a(e,t){try{var n;(n=i[e](t)).value instanceof c?Promise.resolve(n.value.v).then(l,u):d(o[0][2],n)}catch(e){d(o[0][3],e)}}function l(e){a("next",e)}function u(e){a("throw",e)}function d(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function h(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=a(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){var o,s,a;o=r,s=i,a=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:a})},s)})}}}"function"==typeof SuppressedError&&SuppressedError},46770:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},47026:(e,t,n)=>{e.exports=n(67374).Symbol}
10,48258:e=>{e.exports=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}},48552:(e,t,n)=>{var r=n(36845);e.exports=function(e){return function(t){return r(t,e)}}},48624:(e,t,n)=>{"use strict";n.d(t,{T:()=>i});var r=n(43734);function i(e){return Symbol.asyncIterator&&(0,r.T)(null==e?void 0:e[Symbol.asyncIterator])}},48919:(e,t,n)=>{var r=n(8570),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},49995:(e,t,n)=>{var r=n(75238),i=n(67500),o=n(45768);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},50021:(e,t,n)=>{var r=n(53742),i=n(90379),o=n(53086),s=n(59858),a=n(78089),l=n(31254);e.exports=function(e,t,n){t=r(t,e);for(var u=-1,c=t.length,d=!1;++u<c;){var h=l(t[u]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++u!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(h,c)&&(o(e)||i(e))}},50286:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(39359),i=n(43734);function o(e){return(0,i.T)(e[r.s])}},50879:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},51329:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},52062:(e,t,n)=>{"use strict";n.d(t,{Fk:()=>u,jF:()=>l,v$:()=>c});var r=n(24566);let i={"handshake/syn":r.Tx,"handshake/syn-ack":r.Rr,"handshake/ack":r.IM,"channel/response":r._K,"channel/heartbeat":r.vd,"channel/disconnect":r.FS,"overlay/focus":"visual-editing/focus","overlay/navigate":"visual-editing/navigate","overlay/toggle":"visual-editing/toggle","presentation/toggleOverlay":"presentation/toggle-overlay"},o={[r.Tx]:"handshake/syn",[r.Rr]:"handshake/syn-ack",[r.IM]:"handshake/ack",[r._K]:"channel/response",[r.vd]:"channel/heartbeat",[r.FS]:"channel/disconnect","visual-editing/focus":"overlay/focus","visual-editing/navigate":"overlay/navigate","visual-editing/toggle":"overlay/toggle","presentation/toggle-overlay":"presentation/toggleOverlay"},s=e=>{let{data:t}=e;return t&&"object"==typeof t&&"domain"in t&&"type"in t&&"from"in t&&"to"in t&&("sanity/channels"===t.domain&&(t.domain=r.V2),"overlays"===t.to&&(t.to="visual-editing"),"overlays"===t.from&&(t.from="visual-editing"),t.channelId=t.connectionId,delete t.connectionId,t.type=i[t.type]??t.type),e},a=({context:e},t)=>{let{sources:n,targetOrigin:i}=e,s=(e=>{let{channelId:t,...n}=e,i={...n,connectionId:t};return i.domain===r.V2&&(i.domain="sanity/channels"),"visual-editing"===i.to&&(i.to="overlays"),"visual-editing"===i.from&&(i.from="overlays"),i.type=o[i.type]??i.type,"channel/response"===i.type&&i.responseTo&&!i.data&&(i.data={responseTo:i.responseTo}),("handshake/syn"===i.type||"handshake/syn-ack"===i.type||"handshake/ack"===i.type)&&(i.data={id:i.connectionId}),i})(t.message);n.forEach(e=>{e.postMessage(s,{targetOrigin:i})})},l=()=>({listen:(0,r.CC)(s),requestMachine:(0,r.tP)().provide({actions:{"send message":a}})});function u(){return window.self!==window.top}function c(){return!!window.opener}},53086:e=>{e.exports=Array.isArray},53742:(e,t,n)=>{var r=n(53086),i=n(44170),o=n(85333),s=n(21057);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},55919:(e,t,n)=>{var r=n(34099),i=n(32501);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],s=e[o];t[n]=[o,s,r(s)]}return t}},56605:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});let r=e=>"object"==typeof e&&null!==e},57039:(e,t,n)=>{var r=n(67500);e.exports=function(){this.__data__=new r,this.size=0}},57178:(e,t,n)=>{var r=n(73481);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,s=t?o:-1,a=Object(n);(t?s--:++s<o)&&!1!==i(a[s],s,a););return n}}},57638:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});var r=new(n(18464)).c(function(e){return e.complete()})},58118:(e,t,n)=>{e=n.nmd(e);var r=n(74283),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}
10,58672:(e,t,n)=>{e.exports=n(67533)(n(67374),"WeakMap")},59858:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},60147:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},60375:(e,t,n)=>{"use strict";n.d(t,{Tg:()=>m});var r=n(46715),i=n(18504),o=n(13251),s=n(18464),a=n(50286),l=n(48624),u=n(88542),c=n(98644),d=n(71733),h=n(43734),f=n(13031),p=n(39359);function m(e){if(e instanceof s.c)return e;if(null!=e){var t,n,m,y,v;if((0,a.l)(e)){return t=e,new s.c(function(e){var n=t[p.s]();if((0,h.T)(n.subscribe))return n.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if((0,i.X)(e)){return n=e,new s.c(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}if((0,o.y)(e)){return m=e,new s.c(function(e){m.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,f.m)})}if((0,l.T)(e))return g(e);if((0,c.x)(e)){return y=e,new s.c(function(e){var t,n;try{for(var i=(0,r.Ju)(y),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.next(s),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}if((0,d.U)(e)){return v=e,g((0,d.C)(v))}}throw(0,u.L)(e)}function g(e){return new s.c(function(t){(function(e,t){var n,i,o,s;return(0,r.sH)(this,void 0,void 0,function(){var a;return(0,r.YH)(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=(0,r.xN)(e),l.label=1;case 1:return[4,n.next()];case 2:if((i=l.sent()).done)return[3,4];if(a=i.value,t.next(a),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o={error:l.sent()},[3,11];case 6:if(l.trys.push([6,,9,10]),!(i&&!i.done&&(s=n.return)))return[3,8];return[4,s.call(n)];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}}
10,61942:(e,t,n)=>{var r=n(70576),i=n(1033),o=n(31379),s=n(53086),a=n(9984);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?i(e[0],e[1]):r(e):a(e)}},62474:(e,t,n)=>{"use strict";n.d(t,{F:()=>i,m:()=>o});var r=n(19468);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)}function o(e){return 0===e.length?r.D:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}},62926:(e,t,n)=>{var r=n(67500),i=n(57039),o=n(67793),s=n(98098),a=n(26470),l=n(21278);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=l,e.exports=u},63535:(e,t,n)=>{"use strict";let r,i,o;var s,a,l=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,h=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of d(t))f.call(e,i)||i===n||u(e,i,{get:()=>t[i],enumerable:!(r=c(t,i))||r.enumerable});return e},m={},g={$dispatcherGuard:()=>C,$makeReadOnly:()=>M,$reset:()=>I,$structuralCheck:()=>D,c:()=>E,clearRenderCounterRegistry:()=>R,renderCounterRegistry:()=>P,useRenderCounter:()=>O};for(var y in g)u(m,y,{get:g[y],enumerable:!0});e.exports=p(u({},"__esModule",{value:!0}),m);var v=(o=null!=(r=n(1521))?l(h(r)):{},p(!i&&r&&r.__esModule?o:u(o,"default",{value:r,enumerable:!0}),r)),{useRef:b,useEffect:x,isValidElement:w}=v,S=null!=(s=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?s:v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.memo_cache_sentinel"),E="function"==typeof(null==(a=v.__COMPILER_RUNTIME)?void 0:a.c)?v.__COMPILER_RUNTIME.c:function(e){return v.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=k;return t[k]=!0,t},[])},_={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{_[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 T=null;function j(e){return S.ReactCurrentDispatcher.current=e,S.ReactCurrentDispatcher.current}_.useMemoCache=e=>{if(null!=T)return T.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var A=[];function C(e){let t=S.ReactCurrentDispatcher.current;if(0===e){if(A.push(t),1===A.length&&(T=t),t===_)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.");j(_)}else if(1===e){let e=A.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===A.length&&(T=null),j(e)}else if(2===e)A.push(t),j(T);else if(3===e){let e=A.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");j(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function I(e){for(let t=0;t<e.length;t++)e[t]=k}function M(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var P=new Map;function R(){for(let e of P.values())e.forEach(e=>{e.count=0})}function O(e){let t=b(null);null!=t.current&&(t.current.count+=1),x(()=>{if(null==t.current){let n,r={count:0};null==(n=P.get(e))&&(n=new Set,P.set(e,n)),n.add(r),t.current=r}return()=>{var n;let r;null!==t.current&&(n=t.current,null!=(r=P.get(e))&&r.delete(n))}})}var $=new Set;function D(e,t,n,r,i,o){function s(e,t,s,a){let l=`${r}:${o} [${i}] ${n}${s} changed from ${e} to ${t} at depth ${a}`;$.has(l)||($.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)){if(t!==n)if(typeof t!=typeof n)s(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),a=Array.isArray(n);if(null===t&&null!==n)s("null",`type ${typeof n}`,r,i);else if(null===n)s(`type ${typeof t}`,"null",r,i);else if(t instanceof Map)if(n instanceof Map)if(t.size!==n.size)s(`Map instance with size ${t.size}`,`Map instance with size ${n.size}
10`,r,i);else for(let[o,a]of t)n.has(o)?e(a,n.get(o),`${r}.get(${o})`,i+1):s(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i);else s("Map instance","other value",r,i);else if(n instanceof Map)s("other value","Map instance",r,i);else if(t instanceof Set)if(n instanceof Set)if(t.size!==n.size)s(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(let e of n)t.has(e)||s(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i);else s("Set instance","other value",r,i);else if(n instanceof Set)s("other value","Set instance",r,i);else if(o||a)if(o!==a)s(`type ${o?"array":"object"}`,`type ${a?"array":"object"}`,r,i);else if(t.length!==n.length)s(`array with length ${t.length}`,`array with length ${n.length}`,r,i);else for(let o=0;o<t.length;o++)e(t[o],n[o],`${r}[${o}]`,i+1);else if(w(t)||w(n))w(t)!==w(n)?s(`type ${w(t)?"React element":"object"}`,`type ${w(n)?"React element":"object"}`,r,i):t.type!==n.type?s(`React element of type ${t.type}`,`React element of type ${n.type}`,r,i):e(t.props,n.props,`[props of ${r}]`,i+1);else{for(let e in n)e in t||s(`object without key ${e}`,`object with key ${e}`,r,i);for(let o in t)o in n?e(t[o],n[o],`${r}.${o}`,i+1):s(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&s(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&s(t,n,r,i)}}}(e,t,"",0)}},63571:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o,l:()=>s});var r=n(92427),i=null;function o(e){if(r.$.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var n=i,o=n.errorThrown,s=n.error;if(i=null,o)throw s}}else e()}function s(e){r.$.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},64838:(e,t,n)=>{var r=n(70825);e.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},65518:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");t.Hy=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===o||e===c||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===l||e.$$typeof===a||e.$$typeof===u||e.$$typeof===m||void 0!==e.getModuleId)||!1}},65558:(e,t,n)=>{e.exports=n(67533)(n(67374),"Set")},65631:(e,t,n)=>{"use strict";var r=n(1521).__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.c=function(e){return r.H.useMemoCache(e)}},67374:(e,t,n)=>{var r=n(74283),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=r||i||Function("return this")()},67500:(e,t,n)=>{var r=n(75254),i=n(48919),o=n(91344),s=n(90756),a=n(22316);function l(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])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},67533:(e,t,n)=>{var r=n(3348),i=n(26383);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},67793:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},68018:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}},69011:(e,t,n)=>{var r=n(44181),i=n(71874),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;e.exports=s?function(e){return null==e?[]:r(s(e=Object(e)),function(t){return o.call(e,t)})}:i},69500:(e,t,n)=>{var r=n(84591),i=n(90379),o=n(53086),s=n(83147),a=n(59858),l=n(2960),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),d=!n&&!c&&s(e),h=!n&&!c&&!
10d&&l(e),f=n||c||d||h,p=f?r(e.length,String):[],m=p.length;for(var g in e)(t||u.call(e,g))&&!(f&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&p.push(g);return p}},70206:(e,t,n)=>{"use strict";n.d(t,{Z:()=>function e(t,n,l){return(void 0===l&&(l=1/0),(0,a.T)(n))?e(function(e,o){return(0,r.T)(function(t,r){return n(e,t,o,r)})((0,i.Tg)(t(e,o)))},l):("number"==typeof n&&(l=n),(0,o.N)(function(e,n){var r,o,a,u,c,d,h,f;return r=l,o=[],a=0,u=0,c=!1,d=function(){!c||o.length||a||n.complete()},h=function(e){return a<r?f(e):o.push(e)},f=function(e){a++;var l=!1;(0,i.Tg)(t(e,u++)).subscribe((0,s._)(n,function(e){n.next(e)},function(){l=!0},void 0,function(){if(l)try{for(a--;o.length&&a<r;)!function(){var e=o.shift();f(e)}();d()}catch(e){n.error(e)}}))},e.subscribe((0,s._)(n,h,function(){c=!0,d()})),function(){}}))}});var r=n(44099),i=n(60375),o=n(83903),s=(n(84096),n(83529)),a=n(43734)},70576:(e,t,n)=>{var r=n(25368),i=n(55919),o=n(46770);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},70825:(e,t,n)=>{e.exports=n(67533)(Object,"create")},71187:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(29717),i=n(90025),o=n(73365),s=n(1521);function a(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 l(e,t){if(!function(e,t){if("string"!=typeof e)return!1;let{pathname:n}=a(e);return n===t||n.startsWith(`${t}/`)}(e,t))return e;let n=e.slice(t.length);return n.startsWith("/")?n:`/${n}`}function u(e){let{basePath:t="",plugins:n,components:u,refresh:c,trailingSlash:d=!1,zIndex:h,onPerspectiveChange:f}=e,p=(0,r.useRouter)(),[m,g]=(0,s.useState)(),y=(0,s.useMemo)(()=>({subscribe:e=>(g(()=>e),()=>g(void 0)),update:e=>{switch(e.type){case"push":return p.push(l(e.url,t));case"pop":return p.back();case"replace":return p.replace(l(e.url,t));default:throw Error("Unknown update type",{cause:e})}}}),[t,p]),v=(0,r.usePathname)(),b=(0,r.useSearchParams)();(0,s.useEffect)(()=>{m&&m({type:"push",url:((e,t)=>{let{pathname:n,query:r,hash:i}=a(e);if(t)return n.endsWith("/")?`${n}${r}${i}`:`${n}/${r}${i}`;return`${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}=a(e);return`${t}${n}${r}${i}`}(`${v}${b?.size?`?${b.toString()}`:""}`,t),d)})},[t,m,v,b,d]);let x=(0,s.useCallback)(e=>{switch(e.source){case"manual":p.refresh();break;case"mutation":return console.debug('<VisualEditing /> refresh called with source "mutation", if you want automatic refresh when this happens, or silence this message, provide your own handler to the refresh prop'),!1;default:throw Error("Unknown refresh source",{cause:e})}return new Promise(e=>setTimeout(e,1e3))},[p]);return(0,o.jsx)(i.FV,{plugins:n,components:u,history:y,portal:!0,refresh:c??x,onPerspectiveChange:f,zIndex:h})}},71561:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},71596:(e,t,n)=>{var r=n(67533);e.exports=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},71733:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,U:()=>s});var r=n(46715),i=n(43734);function o(e){return(0,r.AQ)(this,arguments,function(){var t,n,i;return(0,r.YH)(this,function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,(0,r.N3)(t.read())];case 3:if(i=(n=o.sent()).value,!n.done)return[3,5];return[4,(0,r.N3)(void 0)];case 4:return[2,o.sent()];case 5:return[4,(0,r.N3)(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function s(e){return(0,i.T)(null==e?void 0:e.getReader)}},71874:e=>{e.exports=function(){return[]}},72789:(e,t,n)=>{"use strict";n.d(t,{DT:()=>h,mj:()=>function e({schemas:t,actors:n,actions:o,guards:s,delays:a}){return{assign:i.a,sendTo:d.s,raise:r.r,log:d.l,cancel:r.b,stopChild:r.s,enqueueActions:d.e,emit:d.a,spawnChild:r.d,createStateConfig:e=>e,createAction:e=>e,createMachine:e=>new c({...e,schemas:t},{actors:n,actions:o,guards:s,delays:a}),extend:r=>e({schemas:t,actors:n,actions:{...o,...r.actions},guards:{...s,...r.guards},delays:{...a,...r.delays}})}}});var r=n(29083),i=n(29511);let o=new WeakMap;function s(e,t,n){let r=o.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},o.set(e,r)),r[t]}let a={},l=e=>"string"==typeof e?{type:e}:"function"==typeof e?"resolve"in e?{type:e.type}:{type:e.name}:e;class u{constructor(e,t){if(this.config=e,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=t._parent,this.key=t._key,this.machine=t._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(r.S),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?(0,r.z)(this.config.states,(e,t)=>new u(e,{_parent:this,_key:t,_machine:this.machine})):a,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for c
10ompound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=!0===this.config.history?"shallow":this.config.history||!1,this.entry=(0,r.t)(this.config.entry).slice(),this.exit=(0,r.t)(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=(0,r.t)(e.tags).slice()}_initialize(){this.transitions=(0,r.B)(this),this.config.always&&(this.always=(0,r.C)(this.config.always).map(e=>(0,r.D)(this,r.N,e))),Object.keys(this.states).forEach(e=>{this.states[e]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(l),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(e=>`#${e.id}`),source:`#${this.id}`,actions:this.initial.actions.map(l),eventType:null})}:void 0,history:this.history,states:(0,r.z)(this.states,e=>e.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(e=>({...e,actions:e.actions.map(l)})),entry:this.entry.map(l),exit:this.exit.map(l),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return s(this,"invoke",()=>(0,r.t)(this.config.invoke).map((e,t)=>{let{src:n,systemId:i}=e,o=e.id??(0,r.F)(this.id,t),s="string"==typeof n?n:`xstate.invoke.${(0,r.F)(this.id,t)}`;return{...e,src:s,id:o,systemId:i,toJSON(){let{onDone:t,onError:n,...r}=e;return{...r,type:"xstate.invoke",src:s,id:o}}}}))}get on(){return s(this,"on",()=>[...this.transitions].flatMap(([e,t])=>t.map(t=>[e,t])).reduce((e,[t,n])=>(e[t]=e[t]||[],e[t].push(n),e),{}))}get after(){return s(this,"delayedTransitions",()=>(0,r.G)(this))}get initial(){return s(this,"initial",()=>(0,r.H)(this,this.config.initial))}next(e,t){let n,i=t.type,o=[];for(let a of s(this,`candidates-${i}`,()=>(0,r.I)(this,i))){let{guard:s}=a,l=e.context,u=!1;try{u=!s||(0,r.E)(s,l,t,e)}catch(t){let e="string"==typeof s?s:"object"==typeof s?s.type:void 0;throw Error(`Unable to evaluate guard ${e?`'${e}' `:""}in transition for event '${i}' in state node '${this.id}': 11${t.message}`)}if(u){o.push(...a.actions),n=a;break}}return n?[n]:void 0}get events(){return s(this,"events",()=>{let{states:e}=this,t=new Set(this.ownEvents);if(e)for(let n of Object.keys(e)){let r=e[n];if(r.states)for(let e of r.events)t.add(`${e}`)}return Array.from(t)})}get ownEvents(){return Array.from(new Set(Object.keys(Object.fromEntries(this.transitions)).filter(e=>this.transitions.get(e).some(e=>!(!e.target&&!e.actions.length&&!e.reenter)))))}}class c{constructor(e,t){this.config=e,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.options=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=e.id||"(machine)",this.implementations={actors:t?.actors??{},actions:t?.actions??{},delays:t?.delays??{},guards:t?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.options={maxIterations:1/0,...this.config.options},this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new u(e,{_key:this.id,_machine:this}),this.root._initialize(),(0,r.J)(this.root),this.states=this.root.states,this.events=this.root.events}provide(e){let{actions:t,guards:n,actors:r,delays:i}=this.implementations;return new c(this.config,{actions:{...t,...e.actions},guards:{...n,...e.guards},actors:{...r,...e.actors},delays:{...i,...e.delays}})}resolveState(e){let t=(0,r.K)(this.root,e.value),n=(0,r.L)((0,r.q)(this.root,t));return(0,r.M)({_nodes:[...n],context:e.context||{},children:{},status:(0,r.O)(n,this.root)?"done":e.status||"active",output:e.output,error:e.error,historyValue:e.historyValue},this)}transition(e,t,n){return(0,r.e)(e,t,n,[]).snapshot}microstep(e,t,n){return(0,r.e)(e,t,n,[]).microsteps.map(([e])=>e)}getTransitionData(e,t){return(0,r.P)(this.root,e.value,e,t)||[]}_getPreInitialState(e,t,n){let{context:o}=this.config,s=(0,r.M)({context:"function"!=typeof o&&o?o:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof o?(0,r.Q)(s,t,e,[(0,i.a)(({spawn:e,event:t,self:n})=>o({spawn:e,input:t.input,self:n}))],n,void 0):s}getInitialSnapshot(e,t){let n=(0,r.f)(t),i=[],o=this._getPreInitialState(e,n,i),[s]=(0,r.g)(this.root,o,e,n,i),{snapshot:a}=(0,r.e)(s,n,e,i);return a}
11start(e){Object.values(e.children).forEach(e=>{"active"===e.getSnapshot().status&&e.start()})}getStateNodeById(e){let t=(0,r.R)(e),n=t.slice(1),i=(0,r.T)(t[0])?t[0].slice(1):t[0],o=this.idMap.get(i);if(!o)throw Error(`Child state node '#${i}' does not exist on machine '${this.id}'`);return(0,r.U)(o,n)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(e,t){return(0,r.V)(e,t)}restoreSnapshot(e,t){let n={},i=e.children;Object.keys(i).forEach(e=>{let o=i[e],s=o.snapshot,a=o.src,l="string"==typeof a?(0,r.W)(this,a):a;if(!l)return;let u=(0,r.c)(l,{id:e,parent:t.self,syncSnapshot:o.syncSnapshot,snapshot:s,src:a,systemId:o.systemId});n[e]=u});let o=function(e,t){if(!t||"object"!=typeof t)return{};let n={};for(let r in t)for(let i of t[r]){let t=function(e,t){if(t instanceof u)return t;try{return e.machine.getStateNodeById(t.id)}catch{}}(e,i);t&&(n[r]??=[],n[r].push(t))}return n}(this.root,e.historyValue),s=(0,r.M)({...e,children:n,_nodes:Array.from((0,r.L)((0,r.q)(this.root,e.value))),historyValue:o},this),a=new Set;return!function e(t,n){if(!a.has(t))for(let i in a.add(t),t){let o=t[i];if(o&&"object"==typeof o){if("xstate$$type"in o&&o.xstate$$type===r.$){t[i]=n[o.id];continue}e(o,n)}}}(s.context,n),s}}var d=n(77201);function h(e,t){let n=(0,r.t)(t);if(!n.some(t=>(0,r.m)(e.type,t))){let t=1===n.length?`type matching "${n[0]}"`:`one of types matching "${n.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(e)} to have ${t}`)}}},73481:(e,t,n)=>{var r=n(74833),i=n(78089);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},73764:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},74034:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},74063:(e,t,n)=>{e.exports=n(67374).Uint8Array},74283:(e,t,n)=>{e.exports="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},74833:(e,t,n)=>{var r=n(39463),i=n(95422);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},75238:(e,t,n)=>{var r=n(94279),i=n(14617),o=n(18586),s=n(36190),a=n(64838);function l(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])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},75254:e=>{e.exports=function(){this.__data__=[],this.size=0}},75383:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},77201:(e,t,n)=>{"use strict";n.d(t,{a:()=>l,b:()=>p,e:()=>g,l:()=>b,s:()=>f});var r,i=n(29083),o=n(29511);function s(e,t,n,r,{event:i}){return[t,{event:"function"==typeof i?i(n,r):i},void 0]}function a(e,{event:t}){e.defer(()=>e.emit(t))}function l(e){function t(e,t){}return t.type="xstate.emit",t.event=e,t.resolve=s,t.execute=a,t}let u=((r={}).Parent="#_parent",r.Internal="#_internal",r);function c(e,t,n,r,{to:i,event:o,id:s,delay:a},l){let d,h,f=t.machine.implementations.delays;if("string"==typeof o)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${o}" }) instead`);let p="function"==typeof o?o(n,r):o;if("string"==typeof a){let e=f&&f[a];d="function"==typeof e?e(n,r):e}else d="function"==typeof a?a(n,r):a;let m="function"==typeof i?i(n,r):i;if("string"==typeof m){if(!(h=m===u.Parent?e.self._parent:m===u.Internal?e.self:m.startsWith("#_")?t.children[m.slice(2)]:l.deferredActorIds?.includes(m)?m:t.children[m]))throw Error(`Unable to send event to actor '${m}' from machine '${t.machine.id}'.`)}else h=m||e.self;return[t,{to:h,targetId:"string"==typeof m?m:void 0,event:p,id:s,delay:d},void 0]}function d(e,t,n){"string"==typeof n.to&&(n.to=t.children[n.to])}function h(e,t){e.defer(()=>{let{to:n,event:r,delay:o,id:s}=t;"number"==typeof o?e.system.scheduler.schedule(e.self,n,r,o,s):e.system._relay(e.self,n,r.type===i.Y?(0,i.Z)(e.self.id,r.data):r)})}function f(e,t,n){function r(e,t){}return r.type="xstate.sendTo",r.to=e,r.event=t,r.id=n?.id,r.delay=n?.delay,r.resolve=c,r.retryResolve=d,r.execute=h,r}function p(e,t){return f(u.Parent,e,t)}
11function m(e,t,n,r,{collect:s}){let a=[],u=function(e){a.push(e)};return u.assign=(...e)=>{a.push((0,o.a)(...e))},u.cancel=(...e)=>{a.push((0,i.b)(...e))},u.raise=(...e)=>{a.push((0,i.r)(...e))},u.sendTo=(...e)=>{a.push(f(...e))},u.sendParent=(...e)=>{a.push(p(...e))},u.spawnChild=(...e)=>{a.push((0,i.d)(...e))},u.stopChild=(...e)=>{a.push((0,i.s)(...e))},u.emit=(...e)=>{a.push(l(...e))},s({context:n.context,event:n.event,enqueue:u,check:e=>(0,i.E)(e,t.context,n.event,t),self:e.self,system:e.system},r),[t,void 0,a]}function g(e){function t(e,t){}return t.type="xstate.enqueueActions",t.collect=e,t.resolve=m,t}function y(e,t,n,r,{value:i,label:o}){return[t,{value:"function"==typeof i?i(n,r):i,label:o},void 0]}function v({logger:e},{value:t,label:n}){n?e(n,t):e(t)}function b(e=({context:e,event:t})=>({context:e,event:t}),t){function n(e,t){}return n.type="xstate.log",n.value=e,n.label=t,n.resolve=y,n.execute=v,n}},78022:(e,t,n)=>{var r=n(30662),i=n(32501);e.exports=function(e,t){return e&&r(e,t,i)}},78089:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},81535:(e,t,n)=>{"use strict";n.d(t,{NP:()=>ts,AH:()=>tf,i7:()=>ty,I4:()=>tm,DP:()=>to});var r,i,o,s=n(1521),a="-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 _=1,T=1,j=0,A=0,C=0,I="";function M(e,t,n,r,i,o,s,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:_,column:T,length:s,return:"",siblings:a}}function P(e,t){return g(M("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function R(e){for(;e.root;)e=P(e.root,{children:[e]});k(e,e.siblings)}function O(){return C=A<j?x(I,A++):0,T++,10===C&&(T=1,_++),C}function $(){return x(I,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 N(e){var t,n;return(t=A-1,n=function e(t){for(;O();)switch(C){case t:return A;case 34:case 39:34!==t&&39!==t&&e(C);break;case 40:41===t&&e(t);break;case 92:O()}return A}(91===e?e+2:40===e?e+1:e),w(I,t,n)).trim()}function L(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function z(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case h:return e.return=e.return||e.value;case c:return"";case f:return e.return=e.value+"{"+L(e.children,r)+"}";case d:if(!S(e.value=e.props.join(",")))return""}return S(n=L(e.children,r))?e.return=e.value+"{"+n+"}":""}function V(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:e.return=function e(t,n,r){var i;switch(i=n,45^x(t,0)?(((i<<2^x(t,0))<<2^x(t,1))<<2^x(t,2))<<2^x(t,3):0){case 5103:return u+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return u+t+t;case 4855:return u+t.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+t;case 4789:return l+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return u+t+l+t+a+t+t;case 5936:switch(x(t,n+11)){case 114:return u+t+a+v(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
11case 108:return u+t+a+v(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return u+t+a+v(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return u+t+a+t+t;case 6165:return u+t+a+"flex-"+t+t;case 5187:return u+t+v(t,/(\w+).+(:[^]+)/,u+"box-$1$2"+a+"flex-$1$2")+t;case 5443:return u+t+a+"flex-item-"+v(t,/flex-|-self/g,"")+(y(t,/flex-|baseline/)?"":a+"grid-row-"+v(t,/flex-|-self/g,""))+t;case 4675:return u+t+a+"flex-line-pack"+v(t,/align-content|flex-|-self/g,"")+t;case 5548:return u+t+a+v(t,"shrink","negative")+t;case 5292:return u+t+a+v(t,"basis","preferred-size")+t;case 6060:return u+"box-"+v(t,"-grow","")+u+t+a+v(t,"grow","positive")+t;case 4554:return u+v(t,/([^-])(transform)/g,"$1"+u+"$2")+t;case 6187:return v(v(v(t,/(zoom-|grab)/,u+"$1"),/(image-set)/,u+"$1"),t,"")+t;case 5495:case 3959:return v(t,/(image-set\([^]*)/,u+"$1$`$1");case 4968:return v(v(t,/(.+:)(flex-)?(.*)/,u+"box-pack:$3"+a+"flex-pack:$3"),/space-between/,"justify")+u+t+t;case 4200:if(!y(t,/flex-|baseline/))return a+"grid-column-align"+w(t,n)+t;break;case 2592:case 3360:return a+v(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,y(e.props,/grid-\w+-end/)}))return~b(t+(r=r[n].value),"span",0)?t:a+v(t,"-start","")+t+a+"grid-row-span:"+(~b(r,"span",0)?y(r,/\d+/):y(r,/\d+/)-y(t,/\d+/))+";";return a+v(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return y(e.props,/grid-\w+-start/)})?t:a+v(v(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return v(t,/(.+)-inline(.+)/,u+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(S(t)-1-n>6)switch(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,s,l){return a+n+":"+r+l+(i?a+n+"-span:"+(o?s:s-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"+a+"$2box$3")+t;case 100:return v(t,":",":"+a)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return v(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n);return;case f:return L([P(e,{value:v(e.value,"@","@"+u)})],r);case d:if(e.length){var i,o;return i=n=e.props,o=function(t){switch(y(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":R(P(e,{props:[v(t,/:(read-\w+)/,":"+l+"$1")]})),R(P(e,{props:[t]})),g(e,{props:E(n,r)});break;case"::placeholder":R(P(e,{props:[v(t,/:(plac\w+)/,":"+u+"input-$1")]})),R(P(e,{props:[v(t,/:(plac\w+)/,":"+l+"$1")]})),R(P(e,{props:[v(t,/:(plac\w+)/,a+"input-$1")]})),R(P(e,{props:[t]})),g(e,{props:E(n,r)})}return""},i.map(o).join("")}}}function F(e,t,n,r,i,o,s,a,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=s[y])),E=e;S<g;++S)(E=(b>0?m[S]+" "+k:v(k,/&\f/g,m[S])).trim())&&(l[x++]=E);return M(e,t,n,0===i?d:a,l,u,c,h)}function B(e,t,n,r,i){return M(e,t,n,h,w(e,0,r),w(e,r+1,-1),r,i)}var U=n(70636);let H=void 0!==U&&void 0!==U.env&&(U.env.REACT_APP_SC_ATTR||U.env.SC_ATTR)||"data-styled",W="active",q="data-styled-version",Y="6.4.1",G="/*!sc*/\n",X="u">typeof window&&"u">typeof document;function K(e){if(void 0!==U&&void 0!==U.env){let t=U.env[e];if(void 0!==t&&""!==t)return"false"!==t}}let Z=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!=(i=null!=(r=K("REACT_APP_SC_DISABLE_SPEEDY"))?r:K("SC_DISABLE_SPEEDY"))?i:void 0===U||void 0===U.env),J="sc-keyframes-";function Q(e,...t){return Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let ee=new Map,et=new Map,en=1,er=e=>{if(ee.has(e))return ee.get(e);for(;et.has(en);)en++;let t=en++;return ee.set(e,t),et.set(t,e),t},ei=e=>et.get(e),eo=(e,t)=>{en=t+1,ee.set(e,t),et.set(t,e)},es=Object.freeze([]),ea=Object.freeze({}),el=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,eu=/(^-|-$)/g;function ec(e){return e.replace(el,"-").replace(eu,"")}
11let ed=/(a)(d)/gi,eh=e=>String.fromCharCode(e+(e>25?39:97));function ef(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=eh(t%52)+n;return(eh(t%52)+n).replace(ed,"$1-$2")}let ep=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e};function em(e){return ef(ep(5381,e)>>>0)}function eg(e){return"string"==typeof e}let ey=Symbol.for("react.memo"),ev=Symbol.for("react.forward_ref"),eb={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},ex={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ew={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eS={[ev]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[ey]:ew};function ek(e){return("type"in e&&e.type.$$typeof)===ey?ew:"$$typeof"in e?eS[e.$$typeof]:eb}let eE=Object.defineProperty,e_=Object.getOwnPropertyNames,eT=Object.getOwnPropertySymbols,ej=Object.getOwnPropertyDescriptor,eA=Object.getPrototypeOf,eC=Object.prototype;function eI(e){return"function"==typeof e}function eM(e){return"object"==typeof e&&"styledComponentId"in e}function eP(e,t){return e&&t?e+" "+t:e||t||""}function eR(e,t){return e.join(t||"")}function eO(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function e$(e,t){Object.defineProperty(e,"toString",{value:t})}let eD=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){let t=this.groupSizes,n=t.length,r=n;for(;e>=r;)if((r<<=1)<0)throw Q(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,o=t.length;i<o;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){let t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;let n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;e<i;e++)t+=this.tag.getRule(e)+G;return t}},eN=`style[${H}][${q}="${Y}"]`,eL=RegExp(`^${H}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),ez=e=>"u">typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,eV=e=>{if(!e)return document;if(ez(e))return e;if("getRootNode"in e){let t=e.getRootNode();if(ez(t))return t}return document},eF=(e,t,n)=>{let r,i=n.split(",");for(let n=0,o=i.length;n<o;n++)(r=i[n])&&e.registerName(t,r)},eB=(e,t)=>{var n;let r=(null!=(n=t.textContent)?n:"").split(G),i=[];for(let t=0,n=r.length;t<n;t++){let n=r[t].trim();if(!n)continue;let o=n.match(eL);if(o){let t=0|parseInt(o[1],10),n=o[2];0!==t&&(eo(n,t),eF(e,n,o[3]),e.getTag().insertRules(t,i)),i.length=0}else i.push(n)}},eU=e=>{let t=eV(e.options.target).querySelectorAll(eN);for(let n=0,r=t.length;n<r;n++){let r=t[n];r&&r.getAttribute(H)!==W&&(eB(e,r),r.parentNode&&r.parentNode.removeChild(r))}},eH=!1,eW=(e,t)=>{let r,i=document.head,o=e||i,s=document.createElement("style"),a=(r=Array.from(o.querySelectorAll(`style[${H}]`)))[r.length-1],l=void 0!==a?a.nextSibling:null;s.setAttribute(H,W),s.setAttribute(q,Y);let u=t||function(){if(!1!==eH)return eH;if("u">typeof document){let e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return eH=e.nonce||e.getAttribute("content")||void 0;let t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return eH=t.getAttribute("content")||void 0}return eH=n.nc}();return u&&s.setAttribute("nonce",u),o.insertBefore(s,l),s},eq=class{constructor(e,t){this.element=eW(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;let n=null!=(t=e.getRootNode().styleSheets)?t:document.styleSheets;for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r.ownerNode===e)return r}throw Q(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){let t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}}
11,eY=class{constructor(e,t){this.element=eW(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){let n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}},eG=X,eX={isServer:!X,useCSSOMInjection:!Z};class eK{static registerId(e){return er(e)}constructor(e=ea,t={},n){this.options=Object.assign(Object.assign({},eX),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&X&&eG&&(eG=!1,eU(this)),e$(this,()=>(e=>{let t=e.getTag(),{length:n}=t,r="";for(let i=0;i<n;i++){let n=ei(i);if(void 0===n)continue;let o=e.names.get(n);if(void 0===o||!o.size)continue;let s=t.getGroup(i);if(0===s.length)continue;let a=H+".g"+i+'[id="'+n+'"]',l="";for(let e of o)e.length>0&&(l+=e+",");r+=s+a+'{content:"'+l+'"}'+G}return r})(this))}rehydrate(){!this.server&&X&&eU(this)}reconstructWithOptions(e,t=!0){let n=new eK(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&X&&e.target!==this.options.target&&eV(this.options.target)!==eV(e.target)&&eU(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=new eD((({useCSSOMInjection:e,target:t,nonce:n})=>e?new eq(t,n):new eY(t,n))(this.options)))}hasNameForId(e,t){var n,r;return null!=(r=null==(n=this.names.get(e))?void 0:n.has(t))&&r}registerName(e,t){er(e),e.startsWith(J)&&this.keyframeIds.add(e);let n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(er(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(er(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}let eZ=new WeakSet,eJ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function eQ(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}let e0=Symbol.for("sc-keyframes");function e1(e){return eI(e)&&!(e.prototype&&e.prototype.isReactComponent)}let e2=e=>null==e||!1===e||""===e,e3=Symbol.for("react.client.reference");function e5(e){return e.$$typeof===e3}function e4(e,t,n,r,i=[]){if(e2(e))return i;let o=typeof e;if("string"===o)return i.push(e),i;if("function"===o)return e5(e)?i:e1(e)&&t?e4(e(t),t,n,r,i):(i.push(e),i);if(Array.isArray(e)){for(let o=0;o<e.length;o++)e4(e[o],t,n,r,i);return i}return eM(e)?i.push(`.${e.styledComponentId}`):"object"==typeof e&&null!==e&&e0 in e?n?(e.inject(n,r),i.push(e.getName(r))):i.push(e):e5(e)||(eO(e)?function e(t,n){for(let r in t){let i=t[r];t.hasOwnProperty(r)&&!e2(i)&&(Array.isArray(i)&&eZ.has(i)||eI(i)?n.push(eQ(r)+":",i,";"):eO(i)?(n.push(r+" {"),e(i,n),n.push("}")):n.push(eQ(r)+": "+(null==i||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in eJ||r.startsWith("--")?String(i).trim():i+"px")+";"))}}(e,i):i.push(e.toString())),i}let e6=ep(5381,Y);class e7{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=ep(e6,t),this.baseStyle=n,eK.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let i="";for(let r=0;r<this.rules.length;r++){let o=this.rules[r];if("string"==typeof o)i+=o;else if(o)if(e1(o)){let r=o(e);"string"==typeof r?i+=r:null!=r&&!1!==r&&(i+=eR(e4(r,e,t,n)))}else i+=eR(e4(o,e,t,n))}
11if(i){this.dynamicNameCache||(this.dynamicNameCache=new Map);let e=n.hash?n.hash+i:i,o=this.dynamicNameCache.get(e);if(!o){if(o=ef(ep(ep(this.baseHash,n.hash),i)>>>0),this.dynamicNameCache.size>=200){let e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,o)}if(!t.hasNameForId(this.componentId,o)){let e=n(i,"."+o,void 0,this.componentId);t.insertRules(this.componentId,o,e)}r=eP(r,o)}}return r}}let e8=/&/g;function e9(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function te(e){let t=e.length,n="",r=0,i=0,o=0,s=!1,a=!1;for(let l=0;l<t;l++){let u=e.charCodeAt(l);if(0!==o||s||47!==u||42!==e.charCodeAt(l+1))if(s)42===u&&47===e.charCodeAt(l+1)&&(s=!1,l++);else if(34!==u&&39!==u||e9(e,l)){if(0===o)if(123===u)i++;else if(125===u){if(--i<0){a=!0;let n=l+1;for(;n<t;){let t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,i=0,l=n-1,r=n;continue}0===i&&(n+=e.substring(r,l+1),r=l+1)}else 59===u&&0===i&&(n+=e.substring(r,l+1),r=l+1)}else 0===o?o=u:o===u&&(o=0);else s=!0,l++}return a||0!==i||0!==o?(r<t&&0===i&&0===o&&(n+=e.substring(r)),n):e}let tt=new eK,tn=function({options:e=ea,plugins:t=es}=ea){var n,r,i;let o,s,a,l=(e,t,n)=>n.startsWith(s)&&n.endsWith(s)&&n.replaceAll(s,"").length>0?`.${o}`:e,u=t.slice();u.push(e=>{e.type===d&&e.value.includes("&")&&(a||(a=RegExp(`\\${s}\\b`,"g")),e.props[0]=e.props[0].replace(e8,s).replace(a,l))}),e.prefix&&u.push(V),u.push(z);let h=[],f=(i=(r=u.concat((n=e=>h.push(e),function(e){!e.root&&(e=e.return)&&n(e)}))).length,function(e,t,n,o){for(var s="",a=0;a<i;a++)s+=r[a](e,t,n,o)||"";return s}),g=(t,n="",r="",i="&")=>{var l,u,d;o=i,s=n,a=void 0;let g=function(e){let t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return te(e);let r=e.length,i="",o=0,s=0,a=0,l=0,u=0,c=!1;for(;s<r;){let t=e.charCodeAt(s);if(34!==t&&39!==t||e9(e,s))if(0===a)if(47===t&&s+1<r&&42===e.charCodeAt(s+1)){for(s+=2;s+1<r&&(42!==e.charCodeAt(s)||47!==e.charCodeAt(s+1));)s++;s+=2}else if(40!==t)if(41!==t)if(l>0)s++;else if(42===t&&s+1<r&&47===e.charCodeAt(s+1))i+=e.substring(o,s),s+=2,o=s,c=!0;else if(47===t&&s+1<r&&47===e.charCodeAt(s+1)){for(i+=e.substring(o,s);s<r&&10!==e.charCodeAt(s);)s++;o=s,c=!0}else 123===t?u++:125===t&&u--,s++;else l>0&&l--,s++;else l++,s++;else s++;else 0===a?a=t:a===t&&(a=0),s++}return c?(o<r&&(i+=e.substring(o)),0===u?i:te(i)):0===u?e:te(e)}(t),y=(d=function e(t,n,r,i,o,s,a,l,u){for(var d,h,f,g,y=0,E=0,j=a,P=0,R=0,L=0,z=1,V=1,U=1,H=0,W="",q=o,Y=s,G=i,X=W;V;)switch(L=H,H=O()){case 40:if(108!=L&&58==x(X,j-1)){-1!=b(X+=v(N(H),"&","&\f"),"&\f",p(y?l[y-1]:0))&&(U=-1);break}case 34:case 39:case 91:X+=N(H);break;case 9:case 10:case 13:case 32:X+=function(e){for(;C=$();)if(C<33)O();else break;return D(e)>2||D(C)>3?"":" "}(L);break;case 92:X+=function(e,t){for(var n;--t&&O()&&!(C<48)&&!(C>102)&&(!(C>57)||!(C<65))&&(!(C>70)||!(C<97)););return n=A+(t<6&&32==$()&&32==O()),w(I,e,n)}(A-1,7);continue;case 47:switch($()){case 42:case 47:k((d=function(e,t){for(;O();)if(e+C===57)break;else if(e+C===84&&47===$())break;return"/*"+w(I,t,A-1)+"*"+m(47===e?e:O())}(O(),A),h=n,f=r,g=u,M(d,h,f,c,m(C),w(d,2,-2),0,g)),u),(5==D(L||1)||5==D($()||1))&&S(X)&&" "!==w(X,-1,void 0)&&(X+=" ");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,"")),R>0&&(S(X)-j||0===z&&47===L)&&k(R>32?B(X+";",i,r,j-1,u):B(v(X," ","")+";",i,r,j-2,u),u);break;case 59:X+=";";default:if(k(G=F(X,n,r,y,E,o,l,W,q=[],Y=[],j,s),s),123===H)if(0===E)e(X,n,G,G,q,s,j,l,Y);else{switch(P){case 99:if(110===x(X,3))break;case 108:if(97===x(X,2))break;default:E=0;case 100:case 109:case 115:}E?e(t,G,G,i&&k(F(t,G,G,0,0,o,l,W,o,q=[],j,Y),Y),o,Y,j,l,i?q:Y):e(X,G,G,G,[""],Y,0,l,Y)}}y=E=R=0,z=U=1,W=X="",j=a;break;case 58:j=1+S(X),R=L;default:if(z<1){if(123==H)--z;else if(125==H&&0==z++&&125==(C=A>0?x(I,--A):0,T--,10===C&&(T=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+=N(O())),P=$(),E=j=S(W=X+=function(e){for(;!D($());)O();return w(I,e,A)}(A)),H++;break;case 45:45===L&&2==S(X)&&(z=0)}}return s}("",null,null,null,[""],(u=l=r||n?r+" "+n+" { "+g+" }":g,_=T=1,j=S(I=u),A=0,l=[]),0,[0],l),I="",d);return e.namespace&&(y=function e(t,n){let r=n+" ",i=","+r;for(let o=0;o<t.length;o++){let s=t[o];if("rule"===s.type){s.value=(r+s.value).replaceAll(",",i);let e=s.props,t=[];for(let n=0;n<e.length;n++)t[n]=r+e[n];s.props=t}Array.isArray(s.children)&&"@keyframes"!==s.type&&e(s.children,n)}return t}(y,e.namespace)),h=[],L(y,f),h},y=5381;for(let e=0;e<t.length;e++)t[e].name||Q(15),y=ep(y,t[e].name);return(null==e?void 0:e.namespace)&&(y=ep(y,e.namespace)),(null==e?void 0:e.prefix)&&(y=ep(y,"p")),g.hash=5381!==y?y.toString():"",g}(),tr=s.createContext({shouldForwardProp:void 0,styleSheet:tt,stylis:tn,stylisPlugins:void 0});tr.Consumer;let ti=s.createContext(void 0);function to(){let e=s.useContext(ti);if(!e)throw Q(18);return e}function ts(e){let t=s.useContext(ti),n=s.useMemo(()=>(function(e,t){if(!e)throw Q(14);if(eI(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw Q(8);return t?Object.assign(Object.assign({},t),e):e})(e.theme,t),[e.theme,t]);return e.children?s.createElement(ti.Provider,{value:n},e.children):null}ti.Consumer;let ta=Object.prototype.hasOwnProperty,tl={};function tu(e,t,n){var r,i;let o,a,l=eM(e),u=!eg(e),{attrs:c=es,componentId:d=(r=t.displayName,i=t.parentComponentId,tl[o="str
11ing"!=typeof r?"sc":ec(r)]=(tl[o]||0)+1,a=o+"-"+em(Y+o+tl[o]),i?i+"-"+a:a),displayName:h=eg(e)?`styled.${e}`:`Styled(${e.displayName||e.name||"Component"})`}=t,f=t.displayName&&t.componentId?ec(t.displayName)+"-"+t.componentId:t.componentId||d,p=l&&e.attrs?e.attrs.concat(c).filter(Boolean):c,{shouldForwardProp:m}=t;if(l&&e.shouldForwardProp){let n=e.shouldForwardProp;if(t.shouldForwardProp){let e=t.shouldForwardProp;m=(t,r)=>n(t,r)&&e(t,r)}else m=n}let g=new e7(n,f,l?e.componentStyle:void 0);function y(e,t){return function(e,t,n){let r,i,{attrs:o,componentStyle:a,defaultProps:l,foldedComponentIds:u,styledComponentId:c,target:d}=e,h=s.useContext(ti),f=s.useContext(tr),p=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n=ea){return e.theme!==n.theme&&e.theme||t||n.theme}(t,h,l)||ea;{let e=s.useRef(null),n=e.current;if(null!==n&&n[1]===m&&n[2]===f.styleSheet&&n[3]===f.stylis&&n[7]===a&&function(e,t,n){let r=0;for(let n in t)if(ta.call(t,n)&&(r++,e[n]!==t[n]))return!1;return r===n}(n[0],t,n[4]))r=n[5],i=n[6];else{var g,y,v;r=function(e,t,n){let r=Object.assign(Object.assign({},t),{className:void 0,theme:n}),i=e.length>1;for(let n=0;n<e.length;n++){let o=e[n],s=eI(o)?o(i?Object.assign({},r):r):o;for(let e in s)"className"===e?r.className=eP(r.className,s[e]):"style"===e?r.style=Object.assign(Object.assign({},r.style),s[e]):e in t&&void 0===t[e]||(r[e]=s[e])}return"className"in t&&"string"==typeof t.className&&(r.className=eP(r.className,t.className)),r}(o,t,m),g=r,y=f.styleSheet,v=f.stylis,i=a.generateAndInjectStyles(g,y,v);let n=0;for(let e in t)ta.call(t,e)&&n++;e.current=[t,m,f.styleSheet,f.stylis,n,r,i,a]}}let b=r.as||d,x=function(e,t,n,r){let i={};for(let o in e)void 0===e[o]||"$"===o[0]||"as"===o||"theme"===o&&e.theme===n||("forwardedAs"===o?i.as=e.forwardedAs:r&&!r(o,t)||(i[o]=e[o]));return i}(r,b,m,p),w=eP(u,c);return i&&(w+=" "+i),r.className&&(w+=" "+r.className),x[eg(b)&&b.includes("-")?"class":"className"]=w,n&&(x.ref=n),(0,s.createElement)(b,x)}(v,e,t)}y.displayName=h;let v=s.forwardRef(y);return v.attrs=p,v.componentStyle=g,v.displayName=h,v.shouldForwardProp=m,v.foldedComponentIds=l?eP(e.foldedComponentIds,e.styledComponentId):"",v.styledComponentId=f,v.target=l?e.target:e,Object.defineProperty(v,"defaultProps",{get(){return this._foldedDefaultProps},set(t){this._foldedDefaultProps=l?function(e,...t){for(let n of t)!function e(t,n,r=!1){if(!r&&!eO(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(let r=0;r<n.length;r++)t[r]=e(t[r],n[r]);else if(eO(n))for(let r in n)t[r]=e(t[r],n[r]);return t}(e,n,!0);return e}({},e.defaultProps,t):t}}),e$(v,()=>`.${v.styledComponentId}`),u&&function e(t,n,r){if("string"!=typeof n){let i=eA(n);i&&i!==eC&&e(t,i,r);let o=e_(n).concat(eT(n)),s=ek(t),a=ek(n);for(let e=0;e<o.length;++e){let i=o[e];if(!(i in ex||r&&r[i]||a&&i in a||s&&i in s)){let e=ej(n,i);try{eE(t,i,e)}catch(e){}}}}return t}(v,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),v}var tc=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function td(e,t){let n=[e[0]];for(let r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}let th=e=>(eZ.add(e),e);function tf(e,...t){return eI(e)||eO(e)?th(e4(td(es,[e,...t]))):0===t.length&&1===e.length&&"string"==typeof e[0]?e4(e):th(e4(td(e,t)))}let tp=e=>(function e(t,n,r=ea){if(!n)throw Q(1,n);let i=(e,...i)=>t(n,r,tf(e,...i));return i.attrs=i=>e(t,n,Object.assign(Object.assign({}
11,r),{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)})),i.withConfig=i=>e(t,n,Object.assign(Object.assign({},r),i)),i})(tu,e),tm=tp;tc.forEach(e=>{tm[e]=tp(e)});class tg{constructor(e,t){this[o]=!0,this.inject=(e,t=tn)=>{let n=this.getName(t);if(!e.hasNameForId(this.id,n)){let r=t(this.rules,n,"@keyframes");e.insertRules(this.id,n,r)}},this.name=e,this.id=J+e,this.rules=t,er(this.id),e$(this,()=>{throw Q(12,String(this.name))})}getName(e=tn){return e.hash?this.name+ef(e.hash>>>0):this.name}}function ty(e,...t){let n=eR(tf(e,...t));return new tg(em(n),n)}o=e0},82527:(e,t,n)=>{var r=n(47026),i=n(25611),o=n(53086),s=n(98881),a=1/0,l=r?r.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-a?"-0":n}},83147:(e,t,n)=>{e=n.nmd(e);var r=n(67374),i=n(12664),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,l=a?a.isBuffer:void 0;e.exports=l||i},83165:(e,t,n)=>{"use strict";n.d(t,{H6:()=>g,OX:()=>c,SP:()=>a,Sx:()=>p});var r,i,o=n(29083);let s=new WeakMap;function a(e){return{config:e,start:(t,n)=>{let{self:r,system:i,emit:o}=n,a={receivers:void 0,dispose:void 0};s.set(r,a),a.dispose=e({input:t.input,system:i,self:r,sendBack:e=>{"stopped"!==r.getSnapshot().status&&r._parent&&i._relay(r,r._parent,e)},receive:e=>{a.receivers??=new Set,a.receivers.add(e)},emit:o})},transition:(e,t,n)=>{let r=s.get(n.self);return t.type===o.X?(e={...e,status:"stopped",error:void 0},s.delete(n.self),r.receivers?.clear(),r.dispose?.()):r.receivers?.forEach(e=>e(t)),e},getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,input:t}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e}}let l="xstate.observable.error",u="xstate.observable.complete";function c(e){return{config:e,transition:(e,t)=>{if("active"!==e.status)return e;switch(t.type){case l:return{...e,status:"error",error:t.data,input:void 0,_subscription:void 0};case u:return{...e,status:"done",input:void 0,_subscription:void 0};case o.X:return e._subscription.unsubscribe(),{...e,status:"stopped",input:void 0,_subscription:void 0};default:return e}},getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,context:void 0,input:t,_subscription:void 0}),start:(t,{self:n,system:r,emit:i})=>{"done"!==t.status&&(t._subscription=e({input:t.input,system:r,self:n,emit:i}).subscribe({next:e=>{n._parent&&r._relay(n,n._parent,e)},error:e=>{r._relay(n,n,{type:l,data:e})},complete:()=>{r._relay(n,n,{type:u})}}))},getPersistedSnapshot:({_subscription:e,...t})=>t,restoreSnapshot:e=>({...e,_subscription:void 0})}}let d="xstate.promise.resolve",h="xstate.promise.reject",f=new WeakMap;function p(e){return{config:e,transition:(e,t,n)=>{if("active"!==e.status)return e;switch(t.type){case d:{let n=t.data;return{...e,status:"done",output:n,input:void 0}}case h:return{...e,status:"error",error:t.data,input:void 0};case o.X:return f.get(n.self)?.abort(),f.delete(n.self),{...e,status:"stopped",input:void 0};default:return e}},start:(t,{self:n,system:r,emit:i})=>{if("active"!==t.status)return;let o=new AbortController;f.set(n,o),Promise.resolve(e({input:t.input,system:r,self:n,signal:o.signal,emit:i})).then(e=>{"active"===n.getSnapshot().status&&(f.delete(n),r._relay(n,n,{type:d,data:e}))},e=>{"active"===n.getSnapshot().status&&(f.delete(n),r._relay(n,n,{type:h,data:e}))})},getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,input:t}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e}}let m=(i=void 0,{config:r=e=>void 0,transition:(e,t,n)=>({...e,context:r(e.context,t,n)}),getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,context:"function"==typeof i?i({input:t}):i}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e});function g(){return(0,o.c)(m)}},83246:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});let r=(0,n(1521).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})}
11,83529:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(46715);function i(e,t,n,r,i){return new o(e,t,n,r,i)}var o=function(e){function t(t,n,r,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return(0,r.C6)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),n||null==(t=this.onFinalize)||t.call(this)}},t}(n(11026).vU)},83903:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(43734);function i(e){return function(t){if((0,r.T)(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}},84096:(e,t,n)=>{"use strict";function r(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}n.d(t,{N:()=>r})},84591:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},85333:(e,t,n)=>{var r=n(34167),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;e.exports=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t})},85545:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});var r=n(56605);function i(e){return(0,r.G)(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}},85656:(e,t,n)=>{"use strict";n.d(t,{xQ:()=>o});var r=n(1521),i=n(32719);function o(e=!0){let t=(0,r.useContext)(i.t);if(null===t)return[!0,null];let{isPresent:n,onExitComplete:s,register:a}=t,l=(0,r.useId)();(0,r.useEffect)(()=>{if(e)return a(l)},[e]);let u=(0,r.useCallback)(()=>e&&s&&s(l),[l,s,e]);return!n&&s?[!1,u]:[!0]}},86519:(e,t,n)=>{var r=n(19456),i=n(7585),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},87511:(e,t,n)=>{var r=n(48258),i=n(5338),o=n(61942),s=n(53086);e.exports=function(e,t){return function(n,a){var l=s(n)?r:i,u=t?t():{};return l(n,e,o(a,2),u)}}},88079:(e,t,n)=>{var r=n(71596);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},88542:(e,t,n)=>{"use strict";function r(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}n.d(t,{L:()=>r})},90025:(e,t,n)=>{"use strict";let r,i,o,s;n.d(t,{FV:()=>am,BQ:()=>o6,Jq:()=>o4,U:()=>o7});var a,l,u,c,d=n(73365),h=n(46015),f=n(52062),p=n(1521),m=n(98196);let g=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,y=/_key\s*==\s*['"](.*)['"]/,v=/^\d*:\d*$/;function b(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function x(e){return"string"==typeof e?y.test(e.trim()):"object"==typeof e&&"_key"in e}function w(e){if("string"==typeof e&&v.test(e))return!0;if(!Array.isArray(e)||2!==e.length)return!1;let[t,n]=e;return("number"==typeof t||""===t)&&("number"==typeof n||""===n)}function S(e){if(!Array.isArray(e))throw Error("Path is not an array");return e.reduce((e,t,n)=>{let r=typeof t;if("number"===r)return`${e}[${t}]`;if("string"===r)return`${e}${0===n?"":"."}${t}`;if(x(t)&&t._key)return`${e}[_key=="${t._key}"]`;if(Array.isArray(t)){let[n,r]=t;return`${e}[${n}:${r}]`}throw Error(`Unsupported path segment \`${JSON.stringify(t)}\``)},"")}function k(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(g);if(!t)throw Error("Invalid path string");return t.map(E)}function E(e){return b(e)?Number(e.replace(/[^\d]/g,"")):x(e)?{_key:e.match(y)[1]}:w(e)?function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e):e}var _=Object.freeze({__proto__:null,fromString:k,get:function(e,t,n){let r="string"==typeof t?k(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(b(t)){if(!Array.isArray(i))return n;i=i[t]}if(x(t)){if(!Array.isArray(i))return n;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),typeof i>"u")return n}return i}
11,isIndexSegment:b,isIndexTuple:w,isKeySegment:x,reKeySegment:y,toString:S});let T="drafts.";function j(e){return e.startsWith(T)}function A(e){return e.startsWith("versions.")}function C(e){return A(e)?T+I(e):j(e)?e:T+e}function I(e){return A(e)?e.split(".").slice(2).join("."):j(e)?e.slice(T.length):e}var M=n(10490),P=n(81535),R=n(95422);function O(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):$.test(t=e)?Number(t):t})}let $=/^-?\d+$/;function D(e){return"string"==typeof e?._key}function N(e){return"object"==typeof e&&"_key"in e&&"string"==typeof e._key}function L(e){return"number"==typeof e||N(e)}let z=/^[a-z_$]+/;function V(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:N(e)?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&z.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function F(e){return Array.isArray(e)?e:[e]}function B(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,s,a;return{type:"patch",id:e.patch.id,patches:[..."set"in(n=t=e.patch)?Object.keys(n.set).map(e=>({path:O(e),op:{type:"set",value:n.set[e]}})):[],..."setIfMissing"in(r=t)?Object.keys(r.setIfMissing).map(e=>({path:O(e),op:{type:"setIfMissing",value:r.setIfMissing[e]}})):[],..."unset"in(i=t)?i.unset.map(e=>({path:O(e),op:{type:"unset"}})):[],..."inc"in(o=t)?Object.keys(o.inc).map(e=>({path:O(e),op:{type:"inc",amount:o.inc[e]}})):[],..."inc"in(s=t)?Object.keys(s.dec).map(e=>({path:O(e),op:{type:"dec",amount:s.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let t=function(e){let t=U.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${U.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!t)throw Error("Insert patch missing position");let n=O(e.insert[t]),r=n.pop();return[{path:n,op:{type:"insert",position:t,referenceItem:r,items:e.insert.items}}]}(t),..."diffMatchPatch"in(a=t)?Object.keys(a.diffMatchPatch).map(e=>({path:O(e),op:{type:"diffMatchPatch",value:a.diffMatchPatch[e]}})):[]]}}throw Error(`Unknown mutation: ${JSON.stringify(e)}`)}let U=["before","replace","after"];function H(e){return Y(e)}function W(e){return e.flatMap(H)}function q(e){return{transactionId:e.id,mutations:W(e.mutations)}}function Y(e){switch(e.type){case"create":case"createIfNotExists":case"createOrReplace":return{[e.type]:e.document};case"delete":return{delete:{id:e.id}};case"patch":{let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...G(n)}}))}}}function G(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[V(t)]};if("insert"===n.type)return{insert:{[n.position]:V([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[V(t)]:n.value}};if("inc"===n.type)return{inc:{[V(t)]:n.amount}};if("dec"===n.type)return{dec:{[V(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[V(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${V(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>V([...t,{_key:e._key}])),insert:{[n.position]:V([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[V(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>V(t.concat(e)))};if("replace"===n.type)return{insert:{replace:V(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[V(t.concat(n.referenceItem))]};throw"insertIfMissing"===n.type?Error("Patch type insertIfMissing is not supported by Sanity"):Error(`Unknown operation type ${n.type}`)}
11function X(e,t){return{path:"string"==typeof e?O(e):e,op:t}}function K(e,t,n){return{type:"insert",referenceItem:n,position:t,items:F(e)}}function Z(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function J(e){return{type:"remove",referenceItem:e}}var Q=Object.freeze({__proto__:null,decode:function(e){return B(e)},decodeAll:function(e){return e.map(B)},encode:H,encodeAll:W,encodeMutation:Y,encodePatch:G,encodeTransaction:q}),ee=n(83165);let et=(0,ee.H6)(),en=et,er=new Set,ei=/_key\s*==\s*['"](.*)['"]/,eo=/^\d*:\d*$/;function es(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function ea(e){return"string"==typeof e?ei.test(e.trim()):"object"==typeof e&&"_key"in e}let el=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eu=/_key\s*==\s*['"](.*)['"]/;function ec(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(el);if(!t)throw Error("Invalid path string");return t.map(ed)}(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(es(t)){if(!Array.isArray(i))return n;i=i[t]}if(ea(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 ed(e){return es(e)?Number(e.replace(/[^\d]/g,"")):ea(e)?{_key:e.match(eu)[1]}:!function(e){if("string"==typeof e&&eo.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 eh(){return(0,p.useSyncExternalStore)(em,ep,ef)}function ef(){return et}function ep(){return en}function em(e){return er.add(e),()=>er.delete(e)}function eg(){let e,t=(0,h.c)(2),n=eh();return t[0]!==n?(e=n===et,t[0]=n,t[1]=e):e=t[1],!e}function ey(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function ev(e,t){let n=(0,f.Fk)(),r=(0,f.v$)();if(t===et||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let i=C(e),o=I(e),s=t.getSnapshot().context?.documents,a=s?.[i],l=s?.[o],u=a||l;if(!u)throw Error(`Document "${e}" not found`);let c=a.getSnapshot().context?.local||l.getSnapshot().context?.local,d=new Promise(e=>{if(c)e(c);else{let t=u.on("ready",n=>{let{snapshot:r}=n;e(r||null),t.unsubscribe()})}});return{draftDoc:a,draftId:i,getSnapshot:()=>d,publishedDoc:l,publishedId:o,get snapshot(){if(!c)throw Error(`Snapshot for document "${e}" not found`);return c}}}function eb(){let e,t,n,r=(0,h.c)(7),i=eh();r[0]!==i?(e=e=>({id:e,commit:()=>{let{draftDoc:t}=ev(e,i);t.send({type:"submit"})},get:t=>{let{snapshot:n}=ev(e,i);return t?ec(n,t):n},getSnapshot:function(e,t){let{getSnapshot:n}=ev(e,t);return n}(e,i),patch:async(t,n)=>{let r=ev(e,i),{draftDoc:o,draftId:s,getSnapshot:a,publishedId:l}=r,{commit:u=!0}=n||{},c=await ("function"==typeof t?t({draftId:s,publishedId:l,get snapshot(){return r.snapshot},getSnapshot:a}):t),d=await a();if(!d)throw Error(`Snapshot for document "${e}" not found`);o.send({type:"mutate",mutations:[{type:"createIfNotExists",document:{...d,_id:s}},{type:"patch",id:s,patches:F(c),...{}}]}),u&&("object"==typeof u&&"debounce"in u?ey(()=>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}=ev(e,i),{commit:o}=n||{},s=void 0===o||o;r.send({type:"mutate",mutations:t}),s&&("object"==typeof s&&"debounce"in s?ey(()=>r.send({type:"submit"}),s.debounce)():r.send({type:"submit"}))},r[2]=i,r[3]=t):t=r[3];let s=t;return r[4]!==o||r[5]!==s?(n={getDocument:o,mutateDocument:s},r[4]=o,r[5]=s,r[6]=n):n=r[6],n}function ex(e){let t=(()=>{if(i)return i;i=[];for(let e=0;e<256;++e)i[e]=(e+256).toString(16).slice(1);return i})();return(function(e=16){let t=new Uint8Array(e);return crypto.getRandomValues(t),t})(e).reduce((e,n)=>e+t[n],"").slice(0,e)}function ew(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 s=r.lastIndexOf("["),a=r.substring(0,s);if(o.includes("_key")){let e=o.indexOf('"')+1,r=o.indexOf('"',e);t=o.substring(e,r),n=!0}else{let e=o.indexOf("[")+1,r=o.indexOf("]",e);t=o.substring(e,r),n=!1}if(!a||!t)throw Error("Invalid path");return{path:a,key:t,hasExplicitKey:n}}
11async function eS(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:i}=ew(e),o=await t.getSnapshot(),s=ec(o,r),a=ec(o,e.path),l=s.findIndex(e=>e._key===i),u=-1,c="before";if("first"===n){if(0===l)return[];u=0,c="before"}else if("last"===n){if(l===s.length-1)return[];u=-1,c="after"}else if("next"===n){if(l===s.length-1)return[];u=l,c="after"}else if("previous"===n){if(0===l)return[];u=l-1,c="before"}return[X(r,Z(l,l+1)),X(r,K(a,c,u))]}var ek=n(71533);let eE=(0,ek.FsL)((0,ek.YjP)(),(0,ek.BpQ)(1)),e_=(0,ek.lqM)(eE),eT=(0,ek.Ikc)({baseUrl:eE,dataset:e_,id:eE,path:eE,projectId:e_,tool:e_,type:e_,workspace:e_,perspective:(0,ek.NpB)((0,ek.YjP)(),"drafts")}),ej=/^([\w-]+):(0|[1-9][0-9]*)$/,eA=/^([\w-]+):([0-9]+),([0-9]+)$/,eC=/^([\w-]+):([\w-]+)$/,eI=(0,ek.FsL)((0,ek.YjP)(),(0,ek.BpQ)(1)),eM=(0,ek.Ikc)({origin:eI,href:eI,data:(0,ek.lqM)((0,ek.g1P)((0,ek.YjP)(),(0,ek.L5J)()))});function eP(e){let t=(0,ek.xLC)(eT,e);if(t.success)return t.output;let n=(0,ek.xLC)(eM,e);if(n.success)try{let e=new URL(n.output.href,typeof document>"u"?"https://example.com":location.origin);return e.searchParams.size>0?(0,ek.qgA)(eT,Object.fromEntries(e.searchParams.entries())):n.output}catch(e){return console.error("Failed to parse sanity node",e),n.output}}var eR={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},eO={0:8203,1:8204,2:8205,3:65279},e$={0:String.fromCodePoint(eO[0]),1:String.fromCodePoint(eO[1]),2:String.fromCodePoint(eO[2]),3:String.fromCodePoint(eO[3])},eD=[,,,,].fill(String.fromCodePoint(eO[0])).join(""),eN=Object.fromEntries(Object.entries(e$).map(e=>[e[1],+e[0]])),eL=Object.fromEntries(Object.entries(eR).map(e=>e.reverse())),ez=`${Object.values(eR).map(e=>`\\u{${e.toString(16)}}`).join("")}`,eV=RegExp(`[${ez}]{4,}`,"gu");let eF=[];for(let e=0;e<256;++e)eF.push((e+256).toString(16).slice(1));let eB=new Uint8Array(16);var eU="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);function eH(e,t,n){return eU&&!e?eU():function(e){let t=(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(t.length<16)throw Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(eF[e[t+0]]+eF[e[t+1]]+eF[e[t+2]]+eF[e[t+3]]+"-"+eF[e[t+4]]+eF[e[t+5]]+"-"+eF[e[t+6]]+eF[e[t+7]]+"-"+eF[e[t+8]]+eF[e[t+9]]+"-"+eF[e[t+10]]+eF[e[t+11]]+eF[e[t+12]]+eF[e[t+13]]+eF[e[t+14]]+eF[e[t+15]]).toLowerCase()}(t)}(e)}function eW(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function eq(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 eY(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function eG(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function eX(e,t,n){let r,i,o={x:e.x1,y:e.y1};if(t.some(e=>{var t;let r,i;return t=eq(e,Math.min(e.w,e.h)/10,"horizontal"===n?"x":"y"),r=o.x>=t.x&&o.x<=t.x+t.w,i=o.y>=t.y&&o.y<=t.y+t.h,r&&i}))return null;for(let s of t){let t=function(e,t){let n=[{x1:t.x,y1:t.y,x2:t.x+t.w,y2:t.y},{x1:t.x+t.w,y1:t.y,x2:t.x+t.w,y2:t.y+t.h},{x1:t.x+t.w,y1:t.y+t.h,x2:t.x,y2:t.y+t.h},{x1:t.x,y1:t.y+t.h,x2:t.x,y2:t.y}],r=[];for(let t=0;t<n.length;t++){let i=function(e,t){let{x1:n,y1:r,x2:i,y2:o}=e,{x1:s,y1:a,x2:l,y2:u}=t;if(n===i&&r===o||s===l&&a===u)return!1;let c=(u-a)*(i-n)-(l-s)*(o-r);if(0===c)return!1;let d=((l-s)*(r-a)-(u-a)*(n-s))/c,h=((i-n)*(r-a)-(o-r)*(n-s))/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)=>eG(t,{x:e.x1,y:e.y1})-eG(n,{x:e.x1,y:e.y1}))}(e,eq(s,Math.min(s.w,s.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?eG(o,e)<eG(o,r)&&(r=e,i=s):(r=e,i=s)}}return i||null}function eK(e,t,n){let{x:r,y:i,w:o,h:s}=e,{x:a,y:l}=n;return{x:a+(r-a)*t,y:l+(i-l)*t,w:o*t,h:s*t}}function eZ(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 eJ(e,t){return t.find(t=>eY(eW(t.elements.element),e))?.sanity}function eQ(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:eJ(t.left,e)}:null,right:t.right?{rect:t.right,sanity:eJ(t.right,e)}:null}:{top:t.top?{rect:t.top,sanity:eJ(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:eJ(t.bottom,e)}:null}}function e0(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 e1(e,t,n){let r=eW(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=eK(eW(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 e2(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 e3(e){let t,n,r=(t=Math.max(0,Math.min(...e.map(e=>e.x))),{min:t,max:n=Math.min(document.body.offsetWidth,Math.max(...e.map(e=>e.x+e.w))),width:n-t}),i=eZ(e),o=r.min>8&&r.min+r.width<=window.innerWidth-8,s=i.min>8&&i.min+i.height<=document.body.scrollHeight-8,a=o&&s;return{x:a?r.min-8:r.min,y:a?i.min-8:i.min,w:a?r.width+16:r.width,h:a?i.height+16:i.height}}async function e5(e,t,n,r,i,o){return new Promise(s=>{if(1===new DOMMatrix(window.getComputedStyle(t).transform).a)return;let a=n-window.innerHeight,l=scrollY;(e-=window.innerHeight/2)<0&&(e=0),t.addEventListener("transitionend",()=>{t.style.transition="none",t.style.transform="none",scrollTo({top:e,behavior:"instant"}),setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!1})},2*i),s()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),t.style.transform=`translateY(${Math.max(l-e,-a+l)}px) scale(1)`,o&&(document.body.style.overflow=o.body.overflow,document.body.style.height=o.body.height,document.documentElement.style.overflow=o.documentElement.overflow,document.documentElement.style.height=o.documentElement.height)})}let e4=!1,e6={y:0},e7={x:0,y:0},e8=typeof document>"u"?0:document.documentElement.scrollHeight,e9=null,te=e=>e instanceof HTMLElement||e instanceof SVGElement,tt=e=>e&&te(e)?e.dataset?.sanityOverlayElement?e:tt(e.parentElement):null;function tn(e){return eV.lastIndex=0,eV.test(e)}function tr(e,t=!1){return tn(e)?function(e,t=!1){try{let n=function(e){let t=e.match(eV);if(t)return function(e,t=!1){let n=Array.from(e),r=1/0,i=-1;for(let e=0;e<n.length;++e)n[e]===eD[0]&&n[e+1]===eD[1]&&n[e+2]===eD[2]&&n[e+3]===eD[3]&&(r=Math.min(r,e),i=Math.max(i,e));if(-1===i)return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${eL[e[2*t].codePointAt(0)]}${eL[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let i=[],o=[r.join("")],s=10;for(;o.length;){let e=o.shift();try{if(i.push(JSON.parse(e)),t)break}catch(r){if(!s--)throw r;let t=+(null==(n=r.message.match(/\sposition\s(\d+)$/))?void 0:n[1]);if(!t)throw r;o.unshift(e.substring(0,t),e.substring(t))}}return i}(n,t);for(let e=r;e<=i;++e)if(!((n.length-e)%4))try{let r=n.slice(e+4),i=new Uint8Array(r.length/4);for(let e=0;e<i.length;e++)i[e]=eN[r[4*e]]<<6|eN[r[4*e+1]]<<4|eN[r[4*e+2]]<<2|eN[r[4*e+3]];let o=new TextDecoder().decode(i);if(t){let e=o.indexOf("\0");return -1===e&&(e=o.length),[JSON.parse(o.slice(0,e))]}
11return o.split("\0").filter(Boolean).map(e=>JSON.parse(e))}catch{}return[]}(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 ti(e){return"path"in e}function to(e){if(!e.length||!e.map(e=>ti(e)).every((e,t,n)=>e===n[0]))return;if(!ti(e[0]))return e[0];let t=e.filter(ti),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 ts(e){let t=e.lastIndexOf(".");return e.substring(t,e.length).includes("[")}function ta(e){if(!ts(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function tl(e,t){return!!ts(e.path)&&!!ts(t.path)&&ta(e.path)===ta(t.path)}function tu(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!ti(t)||!ts(t.path))return null;let i=e.getAttribute("data-sanity-drag-group"),o=[...n].reduce((e,n)=>{let o=r.get(n),s=n.getAttribute("data-sanity-drag-disable"),a=n.getAttribute("data-sanity-drag-group"),l=null!==n.getAttribute("data-sanity");return o?.sanity&&!s&&ti(o.sanity)&&tl(t,o.sanity)&&(null===i||i===a)&&l&&e.push(o),e},[]);return o.length<=1?null:o}let tc=(0,p.createContext)(null);var td=n(12440);let th=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};var tf=(a={Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"},function(e){return null==a?void 0:a[e]}),tp="object"==typeof global&&global&&global.Object===Object&&global,tm="object"==typeof self&&self&&self.Object===Object&&self,tg=(tp||tm||Function("return this")()).Symbol;let ty=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 tv=Array.isArray,tb=Object.prototype,tx=tb.hasOwnProperty,tw=tb.toString,tS=tg?tg.toStringTag:void 0;let tk=function(e){var t=tx.call(e,tS),n=e[tS];try{e[tS]=void 0;var r=!0}catch(e){}var i=tw.call(e);return r&&(t?e[tS]=n:delete e[tS]),i};var tE=Object.prototype.toString,t_=tg?tg.toStringTag:void 0;let tT=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":t_&&t_ in Object(e)?tk(e):tE.call(e)},tj=function(e){return"symbol"==typeof e||null!=e&&"object"==typeof e&&"[object Symbol]"==tT(e)};var tA=1/0,tC=tg?tg.prototype:void 0,tI=tC?tC.toString:void 0;let tM=function e(t){if("string"==typeof t)return t;if(tv(t))return ty(t,e)+"";if(tj(t))return tI?tI.call(t):"";var n=t+"";return"0"==n&&1/t==-tA?"-0":n},tP=function(e){return null==e?"":tM(e)};
11var tR=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tO=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),t$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tD=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tN="\\ud800-\\udfff",tL="\\u2700-\\u27bf",tz="a-z\\xdf-\\xf6\\xf8-\\xff",tV="A-Z\\xc0-\\xd6\\xd8-\\xde",tF="\\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",tB="['â]",tU="["+tF+"]",tH="["+tz+"]",tW="[^"+tN+tF+"\\d+"+tL+tz+tV+"]",tq="(?:\\ud83c[\\udde6-\\uddff]){2}",tY="[\\ud800-\\udbff][\\udc00-\\udfff]",tG="["+tV+"]",tX="(?:"+tH+"|"+tW+")",tK="(?:"+tG+"|"+tW+")",tZ="(?:"+tB+"(?:d|ll|m|re|s|t|ve))?",tJ="(?:"+tB+"(?:D|LL|M|RE|S|T|VE))?",tQ="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",t0="[\\ufe0e\\ufe0f]?",t1="(?:\\u200d(?:"+["[^"+tN+"]",tq,tY].join("|")+")"+t0+tQ+")*",t2="(?:"+["["+tL+"]",tq,tY].join("|")+")"+(t0+tQ+t1),t3=RegExp([tG+"?"+tH+"+"+tZ+"(?="+[tU,tG,"$"].join("|")+")",tK+"+"+tJ+"(?="+[tU,tG+tX,"$"].join("|")+")",tG+"?"+tX+"+"+tZ,tG+"+"+tJ,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",t2].join("|"),"g");let t5=function(e,t,n){if(e=tP(e),void 0===(t=n?void 0:t)){var r;return(r=e,tD.test(r))?e.match(t3)||[]:e.match(t$)||[]}return e.match(t)||[]};var t4=RegExp("['â]","g");let t6=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},t7=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:t6(e,t,n)};var t8=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");let t9=function(e){return t8.test(e)};var ne="\\ud800-\\udfff",nt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",nn="\\ud83c[\\udffb-\\udfff]",nr="[^"+ne+"]",ni="(?:\\ud83c[\\udde6-\\uddff]){2}",no="[\\ud800-\\udbff][\\udc00-\\udfff]",ns="(?:"+nt+"|"+nn+")?",na="[\\ufe0e\\ufe0f]?",nl="(?:\\u200d(?:"+[nr,ni,no].join("|")+")"+na+ns+")*",nu=RegExp(nn+"(?="+nn+")|"+("(?:"+[nr+nt+"?",nt,ni,no,"["+ne+"]"].join("|"))+")"+(na+ns+nl),"g");let nc=function(e){var t,n=t9(e=tP(e))?t9(t=e)?t.match(nu)||[]:t.split(""):void 0,r=n?n[0]:e.charAt(0),i=n?t7(n,1).join(""):e.slice(1);return r.toUpperCase()+i};var nd=(l=function(e,t,n){return e+(n?" ":"")+nc(t)},function(e){var t;return th(t5(((t=tP(t=e))&&t.replace(tR,tf).replace(tO,"")).replace(t4,"")),l,"")}),nh=n(65518);function nf(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 np(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 nm="all-items",ng={gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))",alignItems:"start"};function ny(e){let t,n,r,i,o,s,a,l,u,c,f,m,g,y,v,b,x=(0,h.c)(54),w=void 0===e.showIcons||e.showIcons,S=void 0===e.filter||"auto"===e.filter?e.schemaTypes.length>5:e.filter;x[0]!==e.groups||x[1]!==e.labels?(t=e.groups?[{name:nm,title:e.labels["insert-menu.filter.all-items"],selected:!0},...e.groups.map(nx)]:[],x[0]=e.groups,x[1]=e.labels,x[2]=t):t=x[2],x[3]!==e.views?(n=e.views??[{name:"list"}],x[3]=e.views,x[4]=n):n=x[4],x[5]!==n?(r=n.map(nb),x[5]=n,x[6]=r):r=x[6],x[7]!==t||x[8]!==r?(i={query:"",groups:t,views:r},x[7]=t,x[8]=r,x[9]=i):i=x[9];let[k,E]=(0,p.useReducer)(np,i);if(x[10]!==e||x[11]!==S||x[12]!==w||x[13]!==k.groups||x[14]!==k.query||x[15]!==k.views){var _,T,j;let t,n,r,i=(_=e.schemaTypes,T=k.query,j=k.groups,_.filter(e=>{var t,n;let r,i;return t=e,(!(r=j.find(e=>e.selected))||r.name===nm||r.of?.includes(t.name))&&(n=e,i=T.trim().toLowerCase(),n.title?n.title?.toLowerCase().includes(i):n.name.includes(i))})),h=k.views.find(nv),p=S||k.views.length>1,y=k.groups&&k.groups.length>0,v=p||y;a=M.W1,g=0,s=M.so,c="column",f="fill",x[25]!==v?(t=v?{style:{borderBottom:"1px solid var(--card-border-color)"},paddingBottom:1}:{},x[25]=v,x[26]=t):t=x[26],x[27]!==e.labels||x[28]!==S||x[29]!==p||x[30]!==k.query||x[31]!==k.views?(n=p?(0,d.jsxs)(M.so,{flex:"none",align:"center",paddingTop:1,paddingX:1,gap:1,children:[S?(0,d.jsx)(M.az,{flex:1,children:(0,d.jsx)(M.ks,{autoFocus:!0,border:!1,fontSize:1,icon:td.WIv,onChange:e=>{E({type:"change query",query:e.target.value})},placeholder:e.labels["insert-menu.search.placeholder"],value:k.query})}):null,k.views.length>1?(0,d.jsx)(M.az,{flex:"none",children:(0,d.jsx)(nk,{views:k.views,onToggle:e=>{E({type:"toggle view",name:e})},labels:e.labels})}):null]}):null,x[27]=e.labels,x[28]=S,x[29]=p,x[30]=k.query,x[31]=k.views,x[32]=n):n=x[32],x[33]!==y||x[34]!==k.groups?(r=y?(0,d.jsx)(M.az,{paddingTop:1,paddingX:1,children:(0,d.jsx)(M.wb,{space:1,children:k.groups.map(e=>(0,d.jsx)(M.oz,{id:`${e.name}-tab`,"aria-controls":`${e.name}-panel`,label:e.title??nd(e.name),selected:e.selected,onClick:()=>{E({type:"select group",name:e.name})}},e.name))})}):null,x[33]=y,x[34]=k.groups,x[35]=r):r=x[35],x[36]!==t||x[37]!==n||x[38]!==r?(m=(0,d.jsxs)(M.az,{...t,children:[n,r]}),x[36]=t,x[37]=n,x[38]=r,x[39]=m):m=x[39],o=M.az,l=1,u=0===i.length?(0,d.jsx)(M.az,{padding:2,children:(0,d.jsx)(M.EY,{muted:!0,size:1,children:e.labels["insert-menu.search.no-results"]})}):h?"grid"===h.name?(0,d.jsx)(M.xA,{autoRows:"auto",flex:1,gap:1,style:ng,children:i.map(t=>(0,d.jsx)(n_,{icon:w?nf(t):void 0,onClick:()=>{e.onSelect(t)},previewImageUrl:h.previewImageUrl?.(t.name),schemaType:t}
11,t.name))}):(0,d.jsx)(M.BJ,{flex:1,space:1,children:i.map(t=>(0,d.jsx)(M.Dr,{icon:w?nf(t):void 0,onClick:()=>{e.onSelect(t)},text:t.title??nd(t.name)},t.name))}):null,x[10]=e,x[11]=S,x[12]=w,x[13]=k.groups,x[14]=k.query,x[15]=k.views,x[16]=o,x[17]=s,x[18]=a,x[19]=l,x[20]=u,x[21]=c,x[22]=f,x[23]=m,x[24]=g}else o=x[16],s=x[17],a=x[18],l=x[19],u=x[20],c=x[21],f=x[22],m=x[23],g=x[24];return x[40]!==o||x[41]!==l||x[42]!==u?(y=(0,d.jsx)(o,{padding:l,children:u}),x[40]=o,x[41]=l,x[42]=u,x[43]=y):y=x[43],x[44]!==s||x[45]!==y||x[46]!==c||x[47]!==f||x[48]!==m?(v=(0,d.jsxs)(s,{direction:c,height:f,children:[m,y]}),x[44]=s,x[45]=y,x[46]=c,x[47]=f,x[48]=m,x[49]=v):v=x[49],x[50]!==a||x[51]!==v||x[52]!==g?(b=(0,d.jsx)(a,{padding:g,children:v}),x[50]=a,x[51]=v,x[52]=g,x[53]=b):b=x[53],b}function nv(e){return e.selected}function nb(e,t){return{...e,selected:0===t}}function nx(e){return{...e,selected:!1}}let nw={grid:td.jxC,list:td.r$9},nS={grid:"insert-menu.toggle-grid-view.tooltip",list:"insert-menu.toggle-list-view.tooltip"};function nk(e){let t,n,r,i,o=(0,h.c)(11),s=e.views.findIndex(nE),a=e.views[s+1]??e.views[0],l=e.labels[nS[a.name]];o[0]!==l?(t=(0,d.jsx)(M.EY,{size:1,children:l}),o[0]=l,o[1]=t):t=o[1];let u=nw[a.name];return o[2]!==a.name||o[3]!==e?(n=()=>{e.onToggle(a.name)},o[2]=a.name,o[3]=e,o[4]=n):n=o[4],o[5]!==u||o[6]!==n?(r=(0,d.jsx)(M.$n,{mode:"bleed",icon:u,onClick:n}),o[5]=u,o[6]=n,o[7]=r):r=o[7],o[8]!==t||o[9]!==r?(i=(0,d.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 nE(e){return e.selected}function n_(e){let t,n,r,i,o,s,a,l,u,c=(0,h.c)(20),[f,m]=(0,p.useState)(!1),g=e.icon,y=!!e.previewImageUrl&&!f;c[0]===Symbol.for("react.memo_cache_sentinel")?(t={overflow:"hidden"},c[0]=t):t=c[0],c[1]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:"var(--card-muted-bg-color)",paddingBottom:"66.6%",position:"relative"},c[1]=n):n=c[1],c[2]!==g||c[3]!==y?(r=(0,nh.Hy)(g)&&!y?(0,d.jsx)(M.so,{align:"center",justify:"center",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,d.jsx)(M.EY,{size:1,children:(0,d.jsx)(g,{})})}):null,c[2]=g,c[3]=y,c[4]=r):r=c[4],c[5]!==y||c[6]!==e.previewImageUrl?(i=y?(0,d.jsx)("img",{src:e.previewImageUrl,style:{objectFit:"contain",width:"100%",height:"100%",position:"absolute",inset:0},onError:()=>{m(!0)}}):null,c[5]=y,c[6]=e.previewImageUrl,c[7]=i):i=c[7],c[8]===Symbol.for("react.memo_cache_sentinel")?(o=(0,d.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",boxShadow:"inset 0 0 0 0.5px var(--card-fg-color)",opacity:.1}}),c[8]=o):o=c[8],c[9]!==r||c[10]!==i?(s=(0,d.jsxs)(M.az,{flex:"none",style:n,children:[r,i,o]}),c[9]=r,c[10]=i,c[11]=s):s=c[11];let v=e.schemaType.title??e.schemaType.name;return c[12]!==v?(a=(0,d.jsx)(M.az,{flex:"none",paddingX:2,paddingY:1,children:(0,d.jsx)(M.EY,{size:1,weight:"medium",children:v})}),c[12]=v,c[13]=a):a=c[13],c[14]!==s||c[15]!==a?(l=(0,d.jsxs)(M.so,{direction:"column",gap:1,padding:1,children:[s,a]}),c[14]=s,c[15]=a,c[16]=l):l=c[16],c[17]!==e.onClick||c[18]!==l?(u=(0,d.jsx)(M.Dr,{padding:0,radius:2,onClick:e.onClick,style:t,children:l}),c[17]=e.onClick,c[18]=l,c[19]=u):u=c[19],u}function nT(e){if(!e)return(0,d.jsx)(td.XRf,{});if("string"===e.type)return(0,d.jsx)(td.H3M,{});if("number"===e.type)return(0,d.jsx)(td.bZn,{});let{value:t}=e;if("icon"in e&&e.icon)return(0,d.jsx)("div",{dangerouslySetInnerHTML:{__html:e.icon}});let{type:n}=t;if("string"===n)return(0,d.jsx)(td.H3M,{});if("boolean"===n)return(0,d.jsx)(td.Dee,{});if("number"===n)return(0,d.jsx)(td.bZn,{});if("array"===n||"union"===n)return(Array.isArray(t.of)?t.of:[t.of]).some(e=>"name"in e&&"block"===e.name)?(0,d.jsx)(td.a1,{}):(0,d.jsx)(td.Ss4,{});if("object"===n){if("image"===e.name)return(0,d.jsx)(td.xfq,{});if("block"===e.name)return(0,d.jsx)(td.H3M,{})}return(0,d.jsx)(td.XRf,{})}let nj=(0,P.AH)` 12 overflow-y: scroll; 13 overscroll-behavior: contain; 14 -ms-overflow-style: none; 15 scrollbar-width: none; 16 17 &:before { 18 content: ''; 19 display: block; 20 height: calc(100% + 1px); 21 position: absolute; 22 top: 0; 23 width: 100%; 24 z-index: -1; 25 } 26`,nA=P.I4.div.withConfig({displayName:"PortalContainer",componentId:"sc-11pn4rs-0"})`height:100%;inset:0;pointer-events:all;position:fixed;width:100%;display:flex;justify-content:center;align-items:center;${e=>e.$blockScroll&&nj}
26`,nC=P.I4.div.withConfig({displayName:"PortalBackground",componentId:"sc-11pn4rs-1"})`background:transparent;height:100%;inset:0;position:absolute;width:100%;`,nI=e=>{let t,n=(0,h.c)(2);return n[0]!==e?(t=(0,d.jsx)(M.ZL,{children:(0,d.jsx)(nM,{...e})}),n[0]=e,n[1]=t):t=n[1],t},nM=e=>{let t,n,r=(0,h.c)(7),{children:i,onDismiss:o,setBoundaryElement:s,blockScroll:a}=e,l=void 0===a||a;return r[0]!==o?(t=(0,d.jsx)(nC,{onMouseDownCapture:()=>{o?.()}}),r[0]=o,r[1]=t):t=r[1],r[2]!==l||r[3]!==i||r[4]!==s||r[5]!==t?(n=(0,d.jsxs)(nA,{"data-sanity-overlay-element":!0,ref:s,onClick:nP,$blockScroll:l,children:[t,i]}),r[2]=l,r[3]=i,r[4]=s,r[5]=t,r[6]=n):n=r[6],n};function nP(e){e.stopPropagation()}function nR(e){return{type:"log",name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}let nO={"Visual Editing Drag Sequence Completed":nR({name:"Visual Editing Drag Sequence Completed",description:"An array is successfully reordered using drag and drop.",version:1}),"Visual Editing Drag Minimap Enabled":nR({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":nR({name:"Visual Editing Context Menu Item Removed",description:"An item is removed using the Context Menu.",version:1}),"Visual Editing Context Menu Item Duplicated":nR({name:"Visual Editing Context Menu Item Duplicated",description:"An item is duplicated using the Context Menu.",version:1}),"Visual Editing Context Menu Item Moved":nR({name:"Visual Editing Context Menu Item Moved",description:"An item is moved using the Context Menu.",version:1}),"Visual Editing Context Menu Item Inserted":nR({name:"Visual Editing Context Menu Item Inserted",description:"An item is inserted using the Context Menu.",version:1}),"Visual Editing Insert Menu Item Inserted":nR({name:"Visual Editing Insert Menu Item Inserted",description:"An item is inserted using the Insert Menu.",version:1}),"Visual Editing Overlay Clicked":nR({name:"Visual Editing Overlay Clicked",description:"An Overlay is clicked.",version:1})},n$=(0,p.createContext)(void 0);function nD(){let e=(0,p.useContext)(n$);if(!e)throw Error("Telemetry context is missing");return e}let nN={"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"},nL=e=>{let t,n,r,i,o=(0,h.c)(11),{node:s,onSelect:a}=e;o[0]!==s.options?.insertMenu?(t=s.options?.insertMenu||{},o[0]=s.options?.insertMenu,o[1]=t):t=o[1];let l=t;o[2]!==l.views?(n=l.views?.map(nz),o[2]=l.views,o[3]=n):n=o[3];let u=n;return o[4]!==s.of?(r=s.of.map(nV),o[4]=s.of,o[5]=r):r=o[5],o[6]!==l||o[7]!==a||o[8]!==r||o[9]!==u?(i=(0,d.jsx)(ny,{...l,labels:nN,schemaTypes:r,onSelect:a,views:u}),o[6]=l,o[7]=a,o[8]=r,o[9]=u,o[10]=i):i=o[10],i};function nz(e){return"grid"===e.name?{...e,previewImageUrl:t=>e.previewImageUrls?.[t]}:e}function nV(e){return{...e,icon:nT(e)}}let nF=e=>{let t,n,r,i,o,s=(0,h.c)(10);return s[0]!==e?({children:t,style:r,...n}=e,s[0]=e,s[1]=t,s[2]=n,s[3]=r):(t=s[1],n=s[2],r=s[3]),s[4]!==r?(i={...r,pointerEvents:"all"},s[4]=r,s[5]=i):i=s[5],s[6]!==t||s[7]!==n||s[8]!==i?(o=(0,d.jsx)("div",{style:i,"data-sanity-overlay-element":!0,...n,children:t}),s[6]=t,s[7]=n,s[8]=i,s[9]=o):o=s[9],o};var nB=n(63535),nU=n(91450),nH=n(98928);function nW(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"!==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 nq(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if((0,M.sb)(n)&&(nW(n)||nq(n)))return!0}return!1}n(13750);let nY=P.I4.div.withConfig({displayName:"StyledAutocomplete",componentId:"sc-1igauft-0"})`line-height:0;`,nG=(0,P.I4)(M.az).withConfig({displayName:"ListBox",componentId:"sc-1igauft-1"})`& > ul{list-style:none;padding:0;margin:0;}`,nX=(0,P.i7)` 27 from { 28 transform: rotate(0deg); 29 } 30 31 to { 32 transform: rotate(360deg); 33 } 34`,nK=(0,P.I4)(td.Nl1).withConfig({displayName:"AnimatedSpinnerIcon",componentId:"sc-1igauft-2"})`animation:${nX}
34 500ms linear infinite;`;function nZ(e){let t,n,r,i=(0,nB.c)(11),{children:o,id:s,onSelect:a,selected:l,value:u}=e;i[0]!==a||i[1]!==u?(t=()=>{setTimeout(()=>{a(u)},0)},i[0]=a,i[1]=u,i[2]=t):t=i[2];let c=t;i[3]!==c?(n=e=>{"Enter"!==e.key||(0,M.zd)(e.currentTarget)||c()},i[3]=c,i[4]=n):n=i[4];let h=n;return i[5]!==o||i[6]!==c||i[7]!==h||i[8]!==s||i[9]!==l?(r=(0,d.jsx)("li",{"aria-selected":l,"data-ui":"AutocompleteOption",id:s,role:"option",onClick:c,onKeyDown:h,children:o}),i[5]=o,i[6]=c,i[7]=h,i[8]=s,i[9]=l,i[10]=r):r=i[10],r}function nJ(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 nQ=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],n0=["bottom-start","top-start"],n1=(e,t)=>t?t.value:e,n2=(e,t)=>t.value.toLowerCase().indexOf(e.toLowerCase())>-1;function n3({renderPopover:e,content:t,hidden:n,inputElement:r,onMouseEnter:i,onMouseLeave:o,resultsPopoverElementRef:s}){return e({content:t,hidden:n,inputElement:r,onMouseEnter:i,onMouseLeave:o},s)}function n5(e){return 0===e?0:1===e||2===e?1:e-2}function n4(e){return Math.max(e-1,0)}(0,p.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,h,f,m,g,y,v,b,x,w,S,k,E,_,T,j,A,C,I,P,R,O,$,D,N,L,z,V,F,B,U,H,W,q,Y,G,X,K,Z,J,Q,ee,et,en,er,ei,eo,es,ea,el,eu,ec,ed,eh,ef,ep,em=(0,nB.c)(181);em[0]!==e?({border:_,customValidity:n,disabled:r,filterOption:i,fontSize:T,icon:o,id:s,listBox:j,loading:a,onBlur:l,onChange:u,onFocus:c,onQueryChange:h,onSelect:f,openButton:m,openOnFocus:g,options:y,padding:A,popover:C,prefix:v,radius:I,readOnly:b,relatedElements:x,renderOption:w,renderPopover:S,renderValue:P,suffix:E,value:R,...k}=e,em[0]=e,em[1]=n,em[2]=r,em[3]=i,em[4]=o,em[5]=s,em[6]=a,em[7]=l,em[8]=u,em[9]=c,em[10]=h,em[11]=f,em[12]=m,em[13]=g,em[14]=y,em[15]=v,em[16]=b,em[17]=x,em[18]=w,em[19]=S,em[20]=k,em[21]=E,em[22]=_,em[23]=T,em[24]=j,em[25]=A,em[26]=C,em[27]=I,em[28]=P,em[29]=R):(n=em[1],r=em[2],i=em[3],o=em[4],s=em[5],a=em[6],l=em[7],u=em[8],c=em[9],h=em[10],f=em[11],m=em[12],g=em[13],y=em[14],v=em[15],b=em[16],x=em[17],w=em[18],S=em[19],k=em[20],E=em[21],_=em[22],T=em[23],j=em[24],A=em[25],C=em[26],I=em[27],P=em[28],R=em[29]);let eg=void 0===_||_,ey=void 0===T?2:T,ev=void 0===j?M.sU:j,eb=void 0===A?3:A,ex=void 0===C?M.sU:C,ew=void 0===I?2:I,eS=void 0===P?n1:P,ek=R||null,eE=R||null;em[30]!==ek||em[31]!==eE?(O={activeValue:ek,focused:!1,listFocused:!1,query:null,value:eE},em[30]=ek,em[31]=eE,em[32]=O):O=em[32];let[e_,eT]=(0,p.useReducer)(nJ,O),{activeValue:ej,focused:eA,listFocused:eC,query:eI,value:eM}=e_;em[33]!==ey||em[34]!==eb?($=e=>{let{value:t}=e;return(0,d.jsx)(M.Zp,{"data-as":"button",padding:eb,radius:2,tone:"inherit",children:(0,d.jsx)(M.EY,{size:ey,textOverflow:"ellipsis",children:t})})},em[33]=ey,em[34]=eb,em[35]=$):$=em[35];let eP="function"==typeof w?w:$,eR="function"==typeof i?i:n2,eO=(0,p.useRef)(null),e$=(0,p.useRef)(null),eD=(0,p.useRef)(null),eN=(0,p.useRef)(null),[eL,ez]=(0,p.useState)(null);em[36]===Symbol.for("react.memo_cache_sentinel")?(D=e=>{(0,p.startTransition)(()=>ez(e))},em[36]=D):D=em[36];let eV=D,eF=(0,p.useRef)(!1),eB=(0,p.useRef)(eM),eU=(0,p.useRef)(R),eH=(0,p.useRef)(!1);em[37]!==eL?(N=()=>eL,L=[eL],em[37]=eL,em[38]=N,em[39]=L):(N=em[38],L=em[39]),(0,p.useImperativeHandle)(eD,N,L),em[40]!==eL?(z=()=>eL,V=[eL],em[40]=eL,em[41]=z,em[42]=V):(z=em[41],V=em[42]),(0,p.useImperativeHandle)(t,z,V);let eW=`${s}-listbox`,eq=Array.isArray(y)?y:M.Ml,eY=(0,M.GB)(eb);em[43]!==eq||em[44]!==eM?(F=null!==eM?eq.find(e=>e.value===eM):void 0,em[43]=eq,em[44]=eM,em[45]=F):F=em[45];let eG=F;if(em[46]!==eR||em[47]!==eq||em[48]!==eI){let e;em[50]!==eR||em[51]!==eI?(e=e=>!eI||eR(eI,e),em[50]=eR,em[51]=eI,em[52]=e):e=em[52],B=eq.filter(e),em[46]=eR,em[47]=eq,em[48]=eI,em[49]=B}else B=em[49];let eX=B,eK=eX.length,eZ=ej?`${s}-option-${ej}`:void 0,eJ=null!==eI&&a||eA&&null!==eI;em[53]!==l||em[54]!==h||em[55]!==x?(U=e=>{setTimeout(()=>{if(eH.current)return;let t=(x||[]).concat(eO.current?[eO.current]:[],e$.current?[e$.current]:[]),n=!1;if(document.activeElement){for(let e of t)if(e===document.activeElement||e.contains(document.activeElement)){n=!0;break}}!1===n&&(eT({type:"root/blur"}),eH.current=!1,h&&h(null),l&&l(e))},0)},em[53]=l,em[54]=h,em[55]=x,em[56]=U):U=em[56];let eQ=U;em[57]===Symbol.for("react.memo_cache_sentinel")?(H=e=>{let t=eN.current,n=e.target instanceof HTMLElement?e.target:null,r=t?.contains(n)||!1;r!==eF.current&&(eF.current=r,eT({type:"root/setListFocused",listFocused:r}))},em[57]=H):H=em[57];let e0=H;em[58]!==u||em[59]!==h||em[60]!==f?(W=e=>{eT({type:"value/change",value:e}),eH.current=!1,f&&f(e),eB.current=e,u&&u(e),h&&h(null),eD.current?.focus()},em[58]=u,em[59]=h,em[60]=f,em[61]=W):W=em[61];let e1=W;em[62]!==ej||em[63]!==eX||em[64]!==eK||em[65]!==h?(q=e=>{if("ArrowDown"===e.key){if(e.preventDefault(),!eK)return;let t=eX.find(e=>e.value===ej),n=t?eX.indexOf(t):-1,r=eX[(n+1)%eK];r&&eT({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("ArrowUp"===e.key){if(e.preventDefault(),!eK)return;let t=eX.find(e=>e.value===ej),n=t?eX.indexOf(t):-1,r=eX[-1===n?eK-1:(eK+n-1)%eK];r&&eT({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("Escape"===e.key){eT({type:"root/escape"}),eH.current=!1,h&&h(null),eD.current?.focus();return}let t=e.target,n=eN.current;
34if((n===t||n?.contains(t))&&!nQ.includes(e.key))return void eD.current?.focus()},em[62]=ej,em[63]=eX,em[64]=eK,em[65]=h,em[66]=q):q=em[66];let e2=q;em[67]!==h?(Y=e=>{let t=e.currentTarget.value;eT({type:"input/change",query:t}),h&&h(t)},em[67]=h,em[68]=Y):Y=em[68];let e3=Y;em[69]!==eG||em[70]!==eS||em[71]!==eM?(G=()=>{eT({type:"root/open",query:eM?eS(eM,eG):""})},em[69]=eG,em[70]=eS,em[71]=eM,em[72]=G):G=em[72];let e5=G;em[73]!==e5||em[74]!==eA||em[75]!==c||em[76]!==g?(X=e=>{eA||(eT({type:"input/focus"}),c&&c(e),g&&e5())},em[73]=e5,em[74]=eA,em[75]=c,em[76]=g,em[77]=X):X=em[77];let e4=X;em[78]===Symbol.for("react.memo_cache_sentinel")?(K=()=>{eH.current=!0},em[78]=K):K=em[78];let e6=K;em[79]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>{eH.current=!1},em[79]=Z):Z=em[79];let e7=Z;em[80]!==u||em[81]!==h?(J=()=>{eT({type:"root/clear"}),eB.current="",u&&u(""),h&&h(null),eD.current?.focus()},em[80]=u,em[81]=h,em[82]=J):J=em[82];let e8=J;em[83]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>{eT({type:"input/focus"})},em[83]=Q):Q=em[83];let e9=Q;em[84]!==R?(ee=()=>{if(R!==eU.current){eU.current=R,void 0!==R&&(eT({type:"value/change",value:R}),eB.current=R);return}R!==eB.current&&(eB.current=R||null,eT({type:"value/change",value:R||null}))},et=[R],em[84]=R,em[85]=ee,em[86]=et):(ee=em[85],et=em[86]),(0,p.useEffect)(ee,et),em[87]!==eA?(en=()=>{!eA&&eB.current&&eT({type:"root/setActiveValue",value:eB.current})},er=[eA],em[87]=eA,em[88]=en,em[89]=er):(en=em[88],er=em[89]),(0,p.useEffect)(en,er),em[90]!==ej||em[91]!==eX?(ei=()=>{let e=eN.current;if(!e)return;let t=eX.find(e=>e.value===ej);if(t){let n=eX.indexOf(t),r=e.childNodes[n];if(r){if(document.activeElement&&r.contains(document.activeElement))return;nq(r)}}},eo=[ej,eX],em[90]=ej,em[91]=eX,em[92]=ei,em[93]=eo):(ei=em[92],eo=em[93]),(0,p.useEffect)(ei,eo);t:{if(!a&&!r&&eM){let e;em[94]===Symbol.for("react.memo_cache_sentinel")?(e={"aria-label":"Clear",onFocus:e9},em[94]=e):e=em[94],es=e;break t}es=void 0}let te=es,tt=eY.map(n5),tn=eY.map(n4),tr="object"==typeof m?m:M.sU;em[95]!==e5||em[96]!==tr?(ea=e=>{e5(),tr.onClick&&tr.onClick(e),requestAnimationFrame(()=>eD.current?.focus())},em[95]=e5,em[96]=tr,em[97]=ea):ea=em[97];let ti=ea;em[98]!==r||em[99]!==eJ||em[100]!==ey||em[101]!==ti||em[102]!==m||em[103]!==tt||em[104]!==tn||em[105]!==tr||em[106]!==b?(el=r||b||!m?void 0:(0,d.jsx)(M.az,{"aria-hidden":eJ,padding:tt,children:(0,d.jsx)(M.$n,{"aria-label":"Open",disabled:eJ,fontSize:ey,icon:td.D3D,mode:"bleed",padding:tn,...tr,onClick:ti})}),em[98]=r,em[99]=eJ,em[100]=ey,em[101]=ti,em[102]=m,em[103]=tt,em[104]=tn,em[105]=tr,em[106]=b,em[107]=el):el=em[107];let to=el;n:{if(null===eI){if(null!==eM){let e;em[108]!==eG||em[109]!==eS||em[110]!==eM?(e=eS(eM,eG),em[108]=eG,em[109]=eS,em[110]=eM,em[111]=e):e
34=em[111],eu=e;break n}eu="";break n}eu=eI}let ts=eu;em[112]!==eC?(ec=e=>{"Tab"===e.key&&eC&&eD.current?.focus()},em[112]=eC,em[113]=ec):ec=em[113];let ta=ec;r:{let e,t,n;if(0===eX.length){ed=null;break r}if(em[114]!==ej||em[115]!==eG||em[116]!==eX||em[117]!==e1||em[118]!==s||em[119]!==eC||em[120]!==a||em[121]!==eP){let t;em[123]!==ej||em[124]!==eG||em[125]!==e1||em[126]!==s||em[127]!==eC||em[128]!==a||em[129]!==eP?(t=e=>{let t=null!==ej?e.value===ej:eG===e;return(0,d.jsx)(nZ,{id:`${s}-option-${e.value}`,onSelect:e1,selected:t,value:e.value,children:(0,p.cloneElement)(eP(e),{disabled:a,selected:t,tabIndex:eC&&t?0:-1})},e.value)},em[123]=ej,em[124]=eG,em[125]=e1,em[126]=s,em[127]=eC,em[128]=a,em[129]=eP,em[130]=t):t=em[130],e=eX.map(t),em[114]=ej,em[115]=eG,em[116]=eX,em[117]=e1,em[118]=s,em[119]=eC,em[120]=a,em[121]=eP,em[122]=e}else e=em[122];em[131]!==eW||em[132]!==e?(t=(0,d.jsx)(M.BJ,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:eW,ref:eN,role:"listbox",space:1,children:e}),em[131]=eW,em[132]=e,em[133]=t):t=em[133],em[134]!==ta||em[135]!==ev||em[136]!==t?(n=(0,d.jsx)(nG,{"data-ui":"AutoComplete__results",onKeyDown:ta,padding:1,...ev,tabIndex:-1,children:t}),em[134]=ta,em[135]=ev,em[136]=t,em[137]=n):n=em[137],ed=n}let tl=ed;i:{let e;if(S){let e,t=!eJ;em[138]!==tl||em[139]!==e6||em[140]!==e7||em[141]!==eL||em[142]!==S||em[143]!==t?(e=(0,d.jsx)(n3,{content:tl,hidden:t,inputElement:eL,onMouseEnter:e6,onMouseLeave:e7,resultsPopoverElementRef:e$,renderPopover:S}),em[138]=tl,em[139]=e6,em[140]=e7,em[141]=eL,em[142]=S,em[143]=t,em[144]=e):e=em[144],eh=e;break i}if(0===eK){eh=null;break i}em[145]!==tl||em[146]!==eJ||em[147]!==e6||em[148]!==e7||em[149]!==eL||em[150]!==ex||em[151]!==ew?(e=(0,d.jsx)(M.AM,{arrow:!1,constrainSize:!0,content:tl,fallbackPlacements:n0,matchReferenceWidth:!0,onMouseEnter:e6,onMouseLeave:e7,open:eJ,overflow:"auto",placement:"bottom-start",portal:!0,radius:ew,ref:e$,referenceElement:eL,...ex}),em[145]=tl,em[146]=eJ,em[147]=e6,em[148]=e7,em[149]=eL,em[150]=ex,em[151]=ew,em[152]=e):e=em[152],eh=e}let tu=eh,tc=a&&nK,th=E||to;return em[153]!==eZ||em[154]!==eg||em[155]!==te||em[156]!==n||em[157]!==r||em[158]!==eJ||em[159]!==ey||em[160]!==e8||em[161]!==e3||em[162]!==e4||em[163]!==o||em[164]!==s||em[165]!==ts||em[166]!==eW||em[167]!==eY||em[168]!==v||em[169]!==ew||em[170]!==b||em[171]!==k||em[172]!==tc||em[173]!==th?(ef=(0,d.jsx)(M.ks,{...k,"aria-activedescendant":eZ,"aria-autocomplete":"list","aria-expanded":eJ,"aria-owns":eW,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border:eg,clearButton:te,customValidity:n,disabled:r,fontSize:ey,icon:o,iconRight:tc,id:s,inputMode:"search",onChange:e3,onClear:e8,onFocus:e4,padding:eY,prefix:v,radius:ew,readOnly:b,ref:eV,role:"combobox",spellCheck:!1,suffix:th,value:ts}),em[153]=eZ,em[154]=eg,em[155]=te,em[156]=n,em[157]=r,em[158]=eJ,em[159]=ey,em[160]=e8,em[161]=e3,em[162]=e4,em[163]=o,em[164]=s,em[165]=ts,em[166]=eW,em[167]=eY,em[168]=v,em[169]=ew,em[170]=b,em[171]=k,em[172]=tc,em[173]=th,em[174]=ef):ef=em[174],em[175]!==eQ||em[176]!==e0||em[177]!==e2||em[178]!==tu||em[179]!==ef?(ep=(0,d.jsxs)(nY,{"data-ui":"Autocomplete",onBlur:eQ,onFocus:e0,onKeyDown:e2,ref:eO,children:[ef,tu]}),em[175]=eQ,em[176]=e0,em[177]=e2,em[178]=tu,em[179]=ef,em[180]=ep):ep=em[180],ep}).displayName="ForwardRef(Autocomplete)";let n6=P.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;`,n7=(0,P.I4)(M.$n).withConfig({displayName:"ExpandButton",componentId:"sc-1es8h8q-1"})`appearance:none;margin:-4px;`;(0,p.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,h,f,m,g,y=(0,nB.c)(29);y[0]!==e?({children:n,maxLength:r,separator:o,space:s,...i}=e,y[0]=e,y[1]=n,y[2]=r,y[3]=i,y[4]=o,y[5]=s):(n=y[1],r=y[2],i=y[3],o=y[4],s=y[5]);let v=void 0===s?2:s;y[6]!==v?(a=(0,M.GB)(v),y[6]=v,y[7]=a):a=y[7];let b=a,[x,w]=(0,p.useState)(!1),S=(0,p.useRef)(null),k=(0,p.useRef)(null);y[8]===Symbol.for("react.memo_cache_sentinel")?(l=()=>w(!1),y[8]=l):l=y[8];let E=l;y[9]===Symbol.for("react.memo_cache_sentinel")?(u=()=>w(!0),y[9]=u):u=y[9];let _=u;y[10]===Symbol.for("react.memo_cache_sentinel")?(c=()=>[S.current,k.current],y[10]=c):c=y[10],(0,M.PR)(E,c),y[11]!==n?(h=p.Children.toArray(n).filter(p.isValidElement),y[11]=n,y[12]=h):h=y[12];let T=h;y[13]!==r||y[14]!==x||y[15]!==T||y[16]!==b?(f={collapse:E,expand:_,expandElementRef:S,maxLength:r,open:x,popoverElementRef:k,rawItems:T,space:b},y[13]=r,y[14]=x,y[15]=T,y[16]=b,y[17]=f):f=y[17];let j=function(e){let t=(0,nB.c)(28),{collapse:n,expand:r,expandElementRef:i,maxLength:o,open:s,popoverElementRef:a,rawItems:l,space:u}=e,c=l.length;if(o&&c>o){let e,h=Math.ceil(o/2),f=Math.floor(o/2);if(t[0]!==f||t[1]!==h||t[2]!==n||t[3]!==r||t[4]!==i||t[5]!==c||t[6]!==s||t[7]!==a||t[8]!==l||t[9]!==u){let o,p,m,g,y=l.slice(0,h-1);t[11]!==f||t[12]!==h||t[13]!==c||t[14]!==l?(o=l.slice(h-1,c-f),t[11]=f,t[12]=h,t[13]=c,t[14]=l,t[15]=o):o=t[15],t[16]!==u||t[17]!==o?(p=(0,d.jsx)(M.BJ,{as:"ol",overflow:"auto",padding:u,space:u,children:o}
34),t[16]=u,t[17]=o,t[18]=p):p=t[18];let v=s?n:r;t[19]!==i||t[20]!==s||t[21]!==v?(m=(0,d.jsx)(n7,{fontSize:1,mode:"bleed",onClick:v,padding:1,ref:i,selected:s,text:"â¦"}),t[19]=i,t[20]=s,t[21]=v,t[22]=m):m=t[22],t[23]!==s||t[24]!==a||t[25]!==p||t[26]!==m?(g=(0,d.jsx)(M.AM,{constrainSize:!0,content:p,open:s,placement:"top",portal:!0,ref:a,children:m},"button"),t[23]=s,t[24]=a,t[25]=p,t[26]=m,t[27]=g):g=t[27],e=[...y,g,...l.slice(c-f)],t[0]=f,t[1]=h,t[2]=n,t[3]=r,t[4]=i,t[5]=c,t[6]=s,t[7]=a,t[8]=l,t[9]=u,t[10]=e}else e=t[10];return e}return l}(f);if(y[18]!==j||y[19]!==o||y[20]!==b){let e;y[22]!==o||y[23]!==b?(e=(e,t)=>(0,d.jsxs)(p.Fragment,{children:[t>0&&(0,d.jsx)(M.az,{"aria-hidden":!0,as:"li",paddingX:b,children:o||(0,d.jsx)(M.EY,{muted:!0,children:"/"})}),(0,d.jsx)(M.az,{as:"li",children:e})]},t),y[22]=o,y[23]=b,y[24]=e):e=y[24],m=j.map(e),y[18]=j,y[19]=o,y[20]=b,y[21]=m}else m=y[21];return y[25]!==t||y[26]!==i||y[27]!==m?(g=(0,d.jsx)(n6,{"data-ui":"Breadcrumbs",...i,ref:t,children:m}),y[25]=t,y[26]=i,y[27]=m,y[28]=g):g=y[28],g}).displayName="ForwardRef(Breadcrumbs)";let n8=(0,M.bz)("@sanity/ui/context/dialog",{version:0});function n9(e,t,n){return!e||!t||(0,M.Q3)(e,n)||(0,M.Q3)(t,n)}let re=(0,P.I4)(M.Wd).withConfig({displayName:"StyledDialog",componentId:"sc-4n4xb3-0"})(M.l_,function({theme:e}){let{color:t}=(0,nU.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,nU.JW)(e.theme);return(0,M.U1)(t,e.$position,e=>({"&&":{position:e}}))},function(e){return e.$animate?(0,P.AH)` 35 @keyframes zoomIn { 36 from { 37 opacity: 0; 38 transform: scale(0.95); 39 } 40 to { 41 opacity: 1; 42 transform: scale(1); 43 } 44 } 45 @keyframes fadeIn { 46 from { 47 opacity: 0; 48 } 49 to { 50 opacity: 1; 51 } 52 } 53 54 animation: fadeIn 200ms ease-out; 55 // Animates the dialog card. 56 & > [data-ui='DialogCard'] { 57 animation: zoomIn 200ms ease-out; 58 } 59 `:(0,P.AH)``}),rt=(0,P.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;`,rn=(0,P.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;`,rr=(0,P.I4)(M.so).withConfig({displayName:"DialogLayout",componentId:"sc-4n4xb3-3"})`flex:1;min-height:0;width:100%;`,ri=(0,P.I4)(M.az).withConfig({displayName:"DialogHeader",componentId:"sc-4n4xb3-4"})`position:relative;z-index:2;`,ro=(0,P.I4)(M.az).withConfig({displayName:"DialogContent",componentId:"sc-4n4xb3-5"})`position:relative;z-index:1;overflow:auto;outline:none;`,rs=(0,P.I4)(M.az).withConfig({displayName:"DialogFooter",componentId:"sc-4n4xb3-6"})`position:relative;z-index:3;`,ra=(0,p.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,h,f,m,g,y,v,b,x=(0,nB.c)(44),{__unstable_autoFocus:w,__unstable_hideCloseButton:S,children:k,contentRef:E,footer:_,header:T,id:j,onClickOutside:A,onClose:C,portal:I,radius:P,scheme:R,shadow:O,width:$}=e,D=(0,M.WP)(),N=I?D.elements?.[I]||null:D.element,L=(0,M.$w)().element;x[0]!==P?(n=(0,M.GB)(P),x[0]=P,x[1]=n):n=x[1];let z=n;x[2]!==O?(r=(0,M.GB)(O),x[2]=O,x[3]=r):r=x[3];let V=r;x[4]!==$?(i=(0,M.GB)($),x[4]=$,x[5]=i):i=x[5];let F=i,B=(0,p.useRef)(null),U=(0,p.useRef)(null),{isTopLayer:H}=(0,M.Z4)(),W=`${j}_label`,q=!!C&&!1===S,Y=!!T||q;return x[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>B.current,x[6]=o):o=x[6],(0,p.useImperativeHandle)(t,o),x[7]===Symbol.for("react.memo_cache_sentinel")?(s=()=>U.current,x[7]=s):s=x[7],(0,p.useImperativeHandle)(E,s),x[8]!==w?(a=()=>{w&&B.current&&nq(B.current)},l=[w,B],x[8]=w,x[9]=a,x[10]=l):(a=x[9],l=x[10]),(0,p.useEffect)(a,l),x[11]!==L||x[12]!==H||x[13]!==C||x[14]!==N?(u=e=>{if(!H||!C)return;let t=document.activeElement;t&&!n9(L,N,t)||"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),C())},x[11]=L,x[12]=H,x[13]=C,x[14]=N,x[15]=u):u=x[15],(0,M.Pm)(u),x[16]!==L||x[17]!==H||x[18]!==A||x[19]!==N?(c=H&&A&&(e=>{let t=e.target;t&&!n9(L,N,t)||A()}),x[16]=L,x[17]=H,x[18]=A,x[19]=N,x[20]=c):c=x[20],x[21]===Symbol.for("react.memo_cache_sentinel")?(h=()=>[B.current],x[21]=h):h=x[21],(0,M.PR)(c,h),x[22]!==T||x[23]!==W||x[24]!==C||x[25]!==q||x[26]!==Y?(f=Y&&(0,d.jsx)(ri,{children:(0,d.jsxs)(M.so,{align:"flex-start",padding:3,children:[(0,d.jsx)(M.az,{flex:1,padding:2,children:T&&(0,d.jsx)(M.EY,{id:W,size:1,weight:"semibold",children:T})}),q&&(0,d.jsx)(M.az,{flex:"none",children:(0,d.jsx)(M.$n,{"aria-label":"Close dialog",disabled:!C,icon:td.USm,mode:"bleed",onClick:C,padding:2})})]})}),x[22]=T,x[23]=W,x[24]=C,x[25]=q,x[26]=Y,x[27]=f):f=x[27],x[28]!==k?(m=(0,d.jsx)(ro,{flex:1,ref:U,tabIndex:-1,
59children:k}),x[28]=k,x[29]=m):m=x[29],x[30]!==_?(g=_&&(0,d.jsx)(rs,{children:_}),x[30]=_,x[31]=g):g=x[31],x[32]!==f||x[33]!==m||x[34]!==g?(y=(0,d.jsxs)(rr,{direction:"column",children:[f,m,g]}),x[32]=f,x[33]=m,x[34]=g,x[35]=y):y=x[35],x[36]!==z||x[37]!==R||x[38]!==V||x[39]!==y?(v=(0,d.jsx)(rn,{radius:z,ref:B,scheme:R,shadow:V,children:y}),x[36]=z,x[37]=R,x[38]=V,x[39]=y,x[40]=v):v=x[40],x[41]!==v||x[42]!==F?(b=(0,d.jsx)(rt,{"data-ui":"DialogCard",width:F,children:v}),x[41]=v,x[42]=F,x[43]=b):b=x[43],b});ra.displayName="ForwardRef(DialogCard)",(0,p.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,h,f,m,g,y,v,b,x,w,S,k,E,_,T,j,A,C,I,P,R,O,$,D,N,L=(0,nB.c)(70),z=(0,p.useContext)(n8),{layer:V}=(0,M.M4)();L[0]!==e?({__unstable_autoFocus:v,__unstable_hideCloseButton:b,cardRadius:x,cardShadow:w,children:i,contentRef:o,footer:s,header:a,id:l,onActivate:u,onClickOutside:c,onClose:h,onFocus:f,padding:S,portal:m,position:n,scheme:y,width:k,zOffset:r,animate:E,...g}=e,L[0]=e,L[1]=n,L[2]=r,L[3]=i,L[4]=o,L[5]=s,L[6]=a,L[7]=l,L[8]=u,L[9]=c,L[10]=h,L[11]=f,L[12]=m,L[13]=g,L[14]=y,L[15]=v,L[16]=b,L[17]=x,L[18]=w,L[19]=S,L[20]=k,L[21]=E):(n=L[1],r=L[2],i=L[3],o=L[4],s=L[5],a=L[6],l=L[7],u=L[8],c=L[9],h=L[10],f=L[11],m=L[12],g=L[13],y=L[14],v=L[15],b=L[16],x=L[17],w=L[18],S=L[19],k=L[20],E=L[21]);let F=void 0===v||v,B=void 0!==b&&b,U=void 0===x?4:x,H=void 0===w?3:w,W=void 0===S?3:S,q=void 0===k?0:k,Y=void 0!==E&&E,G=n??(z.position||"fixed"),X=r??(z.zOffset||V.dialog.zOffset),K=!(0,M.jt)()&&Y,Z=(0,M.WP)(),J=m?Z.elements?.[m]||null:Z.element,Q=(0,M.$w)().element;L[22]!==U?(_=(0,M.GB)(U),L[22]=U,L[23]=_):_=L[23];let ee=_;L[24]!==W?(T=(0,M.GB)(W),L[24]=W,L[25]=T):T=L[25];let et=T;L[26]!==G?(j=(0,M.GB)(G),L[26]=G,L[27]=j):j=L[27];let en=j;L[28]!==q?(A=(0,M.GB)(q),L[28]=q,L[29]=A):A=L[29];let er=A;L[30]!==X?(C=(0,M.GB)(X),L[30]=X,L[31]=C):C=L[31];let ei=C,eo=(0,p.useRef)(null),es=(0,p.useRef)(null),ea=(0,p.useRef)(null),el=(0,p.useRef)(null);L[32]!==f?(I=e=>{f?.(e);let t=e.target,n=ea.current;n&&t===eo.current?function e(t){for(let n=t.childNodes.length-1;n>=0;n--){let r=t.childNodes[n];if((0,M.sb)(r)&&(nW(r)||e(r)))return!0}return!1}(n):n&&t===es.current?nq(n):(0,M.sb)(e.target)&&(el.current=e.target)},L[32]=f,L[33]=I):I=L[33];let eu=I,ec=`${l}_label`,ed=(0,p.useRef)(void 0);L[34]!==Q||L[35]!==J?(P=()=>{ed.current&&clearTimeout(ed.current),ed.current=setTimeout(()=>{let e=document.activeElement;if(e&&!n9(Q,J,e)){let e=el.current;if(!e||!document.body.contains(e)){let e=ea.current;e&&nq(e);return}
59e.focus()}},0)},L[34]=Q,L[35]=J,L[36]=P):P=L[36];let eh=P;return L[37]===Symbol.for("react.memo_cache_sentinel")?(R=(0,d.jsx)("div",{ref:eo,tabIndex:0}),L[37]=R):R=L[37],L[38]!==F||L[39]!==ee||L[40]!==H||L[41]!==i||L[42]!==o||L[43]!==s||L[44]!==a||L[45]!==B||L[46]!==l||L[47]!==c||L[48]!==h||L[49]!==m||L[50]!==y||L[51]!==er?(O=(0,d.jsx)(ra,{__unstable_autoFocus:F,__unstable_hideCloseButton:B,contentRef:o,footer:s,header:a,id:l,onClickOutside:c,onClose:h,portal:m,radius:ee,ref:ea,scheme:y,shadow:H,width:er,children:i}),L[38]=F,L[39]=ee,L[40]=H,L[41]=i,L[42]=o,L[43]=s,L[44]=a,L[45]=B,L[46]=l,L[47]=c,L[48]=h,L[49]=m,L[50]=y,L[51]=er,L[52]=O):O=L[52],L[53]===Symbol.for("react.memo_cache_sentinel")?($=(0,d.jsx)("div",{ref:es,tabIndex:0}),L[53]=$):$=L[53],L[54]!==K||L[55]!==eu||L[56]!==eh||L[57]!==l||L[58]!==ec||L[59]!==u||L[60]!==et||L[61]!==en||L[62]!==t||L[63]!==g||L[64]!==O||L[65]!==ei?(D=(0,d.jsxs)(re,{...g,$animate:K,$padding:et,$position:en,"aria-labelledby":ec,"aria-modal":!0,"data-ui":"Dialog",id:l,onActivate:u,onClick:eh,onFocus:eu,ref:t,role:"dialog",zOffset:ei,children:[R,O,$]}),L[54]=K,L[55]=eu,L[56]=eh,L[57]=l,L[58]=ec,L[59]=u,L[60]=et,L[61]=en,L[62]=t,L[63]=g,L[64]=O,L[65]=ei,L[66]=D):D=L[66],L[67]!==m||L[68]!==D?(N=(0,d.jsx)(M.ZL,{__unstable_name:m,children:D}),L[67]=m,L[68]=D,L[69]=N):N=L[69],N}).displayName="ForwardRef(Dialog)";let rl=(0,p.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,h,f,m,g,y,v,b,x,w,S,k,E,_,T,j=(0,nB.c)(62),{__unstable_disableRestoreFocusOnClose:A,boundaryElement:C,button:I,id:P,menu:R,onClose:O,onOpen:$,placement:D,popoverScheme:N,portal:L,popover:z,popoverRadius:V,preventOverflow:F}=e,B=void 0!==A&&A,U=void 0===L||L,[H,W]=(0,p.useState)(!1),[q,Y]=(0,p.useState)(null),[G,X]=(0,p.useState)(null);j[0]===Symbol.for("react.memo_cache_sentinel")?(n=[],j[0]=n):n=j[0];let[K,Z]=(0,p.useState)(n),J=(0,p.useRef)(H);j[1]!==$||j[2]!==H?(r=()=>{$&&H&&!J.current&&$()},i=[$,H],j[1]=$,j[2]=H,j[3]=r,j[4]=i):(r=j[3],i=j[4]),(0,p.useEffect)(r,i),j[5]!==O||j[6]!==H?(o=()=>{O&&!H&&J.current&&O()},s=[O,H],j[5]=O,j[6]=H,j[7]=o,j[8]=s):(o=j[7],s=j[8]),(0,p.useEffect)(o,s),j[9]!==H?(a=()=>{J.current=H},l=[H],j[9]=H,j[10]=a,j[11]=l):(a=j[10],l=j[11]),(0,p.useEffect)(a,l),j[12]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{W(ru),Y(null)},j[12]=u):u=j[12];let Q=u;j[13]!==H?(c=e=>{H&&e.preventDefault()},j[13]=H,j[14]=c):c=j[14];let ee=c;j[15]===Symbol.for("react.memo_cache_sentinel")?(h=e=>{if("ArrowDown"===e.key||"Enter"===e.key||" "===e.key){e.preventDefault(),W(!0),Y("first");return}if("ArrowUp"===e.key){e.preventDefault(),W(!0),Y("last");return}},j[15]=h):h=j[15];let et=h;j[16]!==G||j[17]!==K?(f=e=>{let t=e.target;if(t instanceof Node&&!(G&&(t===G||G.contains(t)))){for(let e of K)if(t===e||e.contains(t))return;W(!1)}},j[16]=G,j[17]=K,j[18]=f):f=j[18];let en=f;j[19]!==G||j[20]!==B?(m=()=>{W(!1),!B&&G&&G.focus()},j[19]=G,j[20]=B,j[21]=m):m=j[21];let er=m;j[22]!==K?(g=e=>{let t=e.relatedTarget;if(t instanceof Node){for(let e of K)if(e===t||e.contains(t))return;W(!1)}},j[22]=K,j[23]=g):g=j[23];let ei=g;j[24]!==G||j[25]!==B?(y=()=>{W(!1),!B&&G&&G.focus()},j[24]=G,j[25]=B,j[26]=y):y=j[26];let eo=y;j[27]===Symbol.for("react.memo_cache_sentinel")?(v=e=>(Z(t=>t.concat([e])),()=>Z(t=>t.filter(t=>t!==e))),j[27]=v):v=j[27];let es=v;j[28]!==G||j[29]!==ei||j[30]!==eo||j[31]!==en||j[32]!==er||j[33]!==P||j[34]!==R||j[35]!==q?(b=R&&(0,p.cloneElement)(R,{"aria-labelledby":P,onBlurCapture:ei,onClickOutside:en,onEscape:er,onItemClick:eo,originElement:G,registerElement:es,shouldFocus:q}),j[28]=G,j[29]=ei,j[30]=eo,j[31]=en,j[32]=er,j[33]=P,j[34]=R,j[35]=q,j[36]=b):b=j[36];let ea=b;j[37]!==I||j[38]!==ee||j[39]!==P||j[40]!==H?(x=I&&(0,p.cloneElement)(I,{"data-ui":"MenuButton",id:P,onClick:Q,onKeyDown:et,onMouseDown:ee,"aria-haspopup":!0,"aria-expanded":H,ref:X,selected:I.props.selected??H}),j[37]=I,j[38]=ee,j[39]=P,j[40]=H,j[41]=x):x=j[41];let el=x;j[42]!==G?(w=()=>G,S=[G],j[42]=G,j[43]=w,j[44]=S):(w=j[43],S=j[44]),(0,p.useImperativeHandle)(t,w,S),j[45]!==z?(k=z||{},j[45]=z,j[46]=k):k=j[46],j[47]!==C||j[48]!==D||j[49]!==V||j[50]!==N||j[51]!==U||j[52]!==F||j[53]!==k?(E={boundaryElement:C,overflow:"auto",placement:D,portal:U,preventOverflow:F,radius:V,scheme:N,...k},j[47]=C,j[48]=D,j[49]=V,j[50]=N,j[51]=U,j[52]=F,j[53]=k,j[54]=E):E=j[54];let eu=E;return j[55]!==el?(_=el||(0,d.jsx)(d.Fragment,{}),j[55]=el,j[56]=_):_=j[56],j[57]!==ea||j[58]!==H||j[59]!==eu||j[60]!==_?(T=(0,d.jsx)(M.AM,{"data-ui":"MenuButton__popover",...eu,content:ea,open:H,children:_}),j[57]=ea,j[58]=H,j[59]=eu,j[60]=_,j[61]=T):T=j[61],T});function ru(e){return!e}rl.displayName="ForwardRef(MenuButton)";let rc=(0,P.i7)` 60 0% { 61 background-position: 100%; 62 } 63 100% { 64 background-position: -100%; 65 } 66`,rd=(0,P.AH)` 67 background-image: linear-gradient( 68 to right, 69 var(--card-skeleton-color-from), 70 var(--card-skeleton-color-to), 71 var(--card-skeleton-color-from), 72 var(--card-skeleton-color-from), 73 var(--card-skeleton-color-from) 74 ); 75 background-position: 100%; 76 background-size: 200% 100%; 77 background-attachment: fixed; 78 animation-name: ${rc}; 79 animation-timing-function: ease-in-out; 80 animation-iteration-count: infinite; 81 animation-duration: 2000ms; 82`,rh=(0,P.AH)` 83 opacity: ${({$visible:e})=>+!!e}; 84 transition: opacity 200ms ease-in; 85 86 @media screen and (prefers-reduced-motion: no-preference) { 87 ${({$animated:e})=>e?rd:(0,P.AH)` 88 background-color: var(--card-skeleton-color-from); 89 `} 90 } 91 92 @media screen and (prefers-reduced-motion: reduce) { 93 background-color: var(--card-skeleton-color-from); 94 } 95`,rf=(0,P.I4)(M.az).withConfig({displayName:"StyledSkeleton",componentId:"sc-ebtpni-0"})(M.gK,rh),rp=(0,p.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c=(0,nB.c)(16);c[0]!==e?({animated:o,delay:n,radius:r,...i}=e,c[0]=e,c[1]=n,c[2]=r,c[3]=i,c[4]=o):(n=c[1],r=c[2],i=c[3],o=c[4]);let h=void 0!==o&&o,[f,m]=(0,p.useState)(!n);c[5]!==n?(s=()=>
95{if(!n)return;let e=setTimeout(()=>{m(!0)},n);return()=>{clearTimeout(e)}},a=[n],c[5]=n,c[6]=s,c[7]=a):(s=c[6],a=c[7]),(0,p.useEffect)(s,a),c[8]!==r?(l=(0,M.GB)(r),c[8]=r,c[9]=l):l=c[9];let g=!n||f;return c[10]!==h||c[11]!==t||c[12]!==i||c[13]!==l||c[14]!==g?(u=(0,d.jsx)(rf,{...i,$animated:h,$radius:l,$visible:g,ref:t}),c[10]=h,c[11]=t,c[12]=i,c[13]=l,c[14]=g,c[15]=u):u=c[15],u});rp.displayName="ForwardRef(Skeleton)";let rm=(0,P.I4)(rp).withConfig({displayName:"StyledSkeleton",componentId:"sc-2p7a1v-0"})(e=>{let{$size:t,$style:n}=e,{font:r,media:i}=(0,nU.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,p.forwardRef)(function(e,t){let n,r,i,o,s=(0,nB.c)(9);s[0]!==e?({size:r,...n}=e,s[0]=e,s[1]=n,s[2]=r):(n=s[1],r=s[2]);let a=void 0===r?2:r;s[3]!==a?(i=(0,M.GB)(a),s[3]=a,s[4]=i):i=s[4];let l=i;return s[5]!==l||s[6]!==t||s[7]!==n?(o=(0,d.jsx)(rm,{...n,$size:l,ref:t,$style:"text"}),s[5]=l,s[6]=t,s[7]=n,s[8]=o):o=s[8],o}).displayName="ForwardRef(TextSkeleton)",(0,p.forwardRef)(function(e,t){let n,r,i,o,s=(0,nB.c)(9);s[0]!==e?({size:r,...n}=e,s[0]=e,s[1]=n,s[2]=r):(n=s[1],r=s[2]);let a=void 0===r?2:r;s[3]!==a?(i=(0,M.GB)(a),s[3]=a,s[4]=i):i=s[4];let l=i;return s[5]!==l||s[6]!==t||s[7]!==n?(o=(0,d.jsx)(rm,{...n,$size:l,ref:t,$style:"label"}),s[5]=l,s[6]=t,s[7]=n,s[8]=o):o=s[8],o}).displayName="ForwardRef(LabelSkeleton)",(0,p.forwardRef)(function(e,t){let n,r,i,o,s=(0,nB.c)(9);s[0]!==e?({size:r,...n}=e,s[0]=e,s[1]=n,s[2]=r):(n=s[1],r=s[2]);let a=void 0===r?2:r;s[3]!==a?(i=(0,M.GB)(a),s[3]=a,s[4]=i):i=s[4];let l=i;return s[5]!==l||s[6]!==t||s[7]!==n?(o=(0,d.jsx)(rm,{...n,$size:l,ref:t,$style:"heading"}),s[5]=l,s[6]=t,s[7]=n,s[8]=o):o=s[8],o}).displayName="ForwardRef(HeadingSkeleton)",(0,p.forwardRef)(function(e,t){let n,r,i,o,s=(0,nB.c)(9);s[0]!==e?({size:r,...n}=e,s[0]=e,s[1]=n,s[2]=r):(n=s[1],r=s[2]);let a=void 0===r?2:r;s[3]!==a?(i=(0,M.GB)(a),s[3]=a,s[4]=i):i=s[4];let l=i;return s[5]!==l||s[6]!==t||s[7]!==n?(o=(0,d.jsx)(rm,{...n,$size:l,ref:t,$style:"code"}),s[5]=l,s[6]=t,s[7]=n,s[8]=o):o=s[8],o}).displayName="ForwardRef(CodeSkeleton)",(0,p.forwardRef)(function(e,t){let n,r,i,o=(0,nB.c)(9);o[0]!==e?({flex:n,...r}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let s=void 0===e.tabIndex?0:e.tabIndex;return o[3]!==n||o[4]!==e.children||o[5]!==t||o[6]!==r||o[7]!==s?(i=(0,d.jsx)(M.az,{"data-ui":"TabPanel",...r,flex:n,ref:t,role:"tabpanel",tabIndex:s,children:e.children}),o[3]=n,o[4]=e.children,o[5]=t,o[6]=r,o[7]=s,o[8]=i):i=o[8],i}).displayName="ForwardRef(TabPanel)";let rg={error:"critical",warning:"caution",success:"positive",info:"neutral"},ry={error:"critical",warning:"caution",success:"positive",info:"neutral"},rv=(0,P.I4)(M.so).withConfig({displayName:"TextBox",componentId:"sc-1rr7rxo-0"})`overflow-x:auto;`,rb=(0,P.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);}`,rx=P.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;`,rw=(0,P.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;`,rS=(0,P.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,nU.JW)(e.theme);return t.button.default[e.tone].enabled.bg}};`,rk={error:"alert",warning:"alert",success:"alert",info:"alert"};function rE(e){let t,n,r,i,o,s,a,l,u,c,h,f,p,m,g,y,v,b,x,w,S=(0,nB.c)(50);S[0]!==e?({closable:t,description:n,duration:r,onClose:i,radius:a,title:l,status:s,updatedAt:u,...o}=e,S[0]=e,S[1]=t,S[2]=n,S[3]=r,S[4]=i,S[5]=o,S[6]=s,S[7]=a,S[8]=l,S[9]=u):(t=S[1],n=S[2],r=S[3],i=S[4],o=S[5],s=S[6],a=S[7],l=S[8],u=S[9]);let k=void 0===a?3:a,E=s?rg[s]:"default",_=s?ry[s]:"default",T=s?rk[s]:"status",j=.26*!(0,M.jt)();S[10]!==j?(c=j?{type:"spring",visualDuration:j,bounce:.25}:{duration:0},S[10]=j,S[11]=c):c=S[11];let A=c,C=r&&isFinite(r)&&r<20736e5;S[12]===Symbol.for("react.memo_cache_sentinel")?(h=["hidden","initial"],S[12]=h):h=S[12];let I=h;S[13]===Symbol.for("react.memo_cache_sentinel")?(f=["visible","slideIn"],S[13]=f):f=S[13];let P=f;S[14]===Symbol.for("react.memo_cache_sentinel")?(p=["hidden","slideOut"],S[14]=p):p=S[14];let R=p,O=C?"":void 0;return S[15]!==l?(m=l&&(0,d.jsx)(M.EY,{size:1,weight:"medium",children:l}),S[15]=l,S[16]=m):m=S[16],S[17]!==n||S[18]!==A?(g=n&&(0,d.jsx)(rC,{muted:!0,size:1,variants:rT,transition:A,children:n}),S[17]=n,S[18]=A,S[19]=g):g=S[19],S[20]!==m||S[21]!==g?(y=(0,d.jsx)(rv,{flex:1,padding:3,children:(0,d.jsxs)(M.BJ,{space:3,children:[m,g]})}),S[20]=m,S[21]=g,S[22]=y):y=S[22],S[23]!==_||S[24]!==t||S[25]!==i?(v=t&&(0,d.jsx)(M.az,{padding:1,children:(0,d.jsx)(M.$n,{as:"button",icon:td.USm,mode:"bleed",padding:2,tone:_,onClick:i,style:{verticalAlign:"top"}})}),S[23]=_,S[24]=t,S[25]=i,S[26]=v):v=S[26],S[27]!==y||S[28]!==v||S[29]!==A?(b=(0,d.jsxs)(rA,{align:"flex-start",variants:rT,transition:A,children:[y,v]}),S[27]=y,S[28]=v,S[29]=A,S[30]=b):b=S[30],S[31]!==E||S[32]!==r||S[33]!==C||S[34]!==i||S[35]!==k||S[36]!==A||S[37]!==u||S[38]!==j?(
95x=C&&(0,d.jsxs)(rI,{variants:rT,transition:A,children:[(0,d.jsx)(rw,{tone:E,radius:k}),(0,d.jsx)(rM,{tone:E,initial:{scaleX:0},animate:{scaleX:1},transition:{delay:j,duration:r/1e3,ease:"linear"},onAnimationComplete:i},`progress-${u}`)]}),S[31]=E,S[32]=r,S[33]=C,S[34]=i,S[35]=k,S[36]=A,S[37]=u,S[38]=j,S[39]=x):x=S[39],S[40]!==E||S[41]!==k||S[42]!==o||S[43]!==T||S[44]!==b||S[45]!==x||S[46]!==O||S[47]!==A||S[48]!==j?(w=(0,d.jsxs)(rj,{"data-ui":"Toast",role:T,...o,"data-has-duration":O,custom:j,radius:k,shadow:2,tone:E,forwardedAs:"li",layout:"position",variants:r_,initial:I,animate:P,exit:R,transition:A,children:[b,x]}),S[40]=E,S[41]=k,S[42]=o,S[43]=T,S[44]=b,S[45]=x,S[46]=O,S[47]=A,S[48]=j,S[49]=w):w=S[49],w}rE.displayName="Toast";let r_={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}},rT={initial:{willChange:"transform"},hidden:{opacity:0},visible:{opacity:1}},rj=nH.PY1.create(rb),rA=nH.PY1.create(M.so),rC=nH.PY1.create(M.EY),rI=nH.PY1.create(rx),rM=nH.PY1.create(rS);(0,M.bz)("@sanity/ui/context/toast",null);(0,P.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 rP(e){if("treeitem"===e.getAttribute("role")&&e.focus(),"none"===e.getAttribute("role")){let t=e.firstChild;t&&t instanceof HTMLElement&&t.focus()}}let rR=(0,M.bz)("@sanity/ui/context/tree",null);(0,p.forwardRef)(function(e,t){let n,r,i,o,s,a,l,u,c,h,f,m,g,y,v,b,x,w,S,k,E,_=(0,nB.c)(37);_[0]!==e?({children:n,space:o,onFocus:r,...i}=e,_[0]=e,_[1]=n,_[2]=r,_[3]=i,_[4]=o):(n=_[1],r=_[2],i=_[3],o=_[4]);let T=void 0===o?1:o,j=(0,p.useRef)(null),[A,C]=(0,p.useState)(null),I=(0,p.useRef)(A);_[5]===Symbol.for("react.memo_cache_sentinel")?(s=[],_[5]=s):s=_[5];let P=s;_[6]===Symbol.for("react.memo_cache_sentinel")?(a=[],_[6]=a):a=_[6];let[R,O]=(0,p.useState)(a);_[7]===Symbol.for("react.memo_cache_sentinel")?(l={},_[7]=l):l=_[7];let[$,D]=(0,p.useState)(l),N=(0,p.useRef)($);_[8]===Symbol.for("react.memo_cache_sentinel")?(u=()=>j.current,_[8]=u):u=_[8],(0,p.useImperativeHandle)(t,u),_[9]!==A?(c=()=>{I.current=A},h=[A],_[9]=A,_[10]=c,_[11]=h):(c=_[10],h=_[11]),(0,p.useEffect)(c,h),_[12]!==$?(f=()=>{N.current=$},m=[$],_[12]=$,_[13]=f,_[14]=m):(f=_[13],m=_[14]),(0,p.useEffect)(f,m),_[15]===Symbol.for("react.memo_cache_sentinel")?(g=(e,t,n,r)=>(D(r=>({...r,[t]:{element:e,expanded:n}})),r&&C(e),()=>{D(e=>{let n={...e};return delete n[t],n})}),_[15]=g):g=_[15];let L=g;_[16]===Symbol.for("react.memo_cache_sentinel")?(y=(e,t)=>{D(n=>{let r=n[e];return r?{...n,[e]:{...r,expanded:t}}:n})},_[16]=y):y=_[16];let z=y,V=A||R[0]||null;_[17]!==T||_[18]!==$||_[19]!==V?(v={version:0,focusedElement:V,level:0,path:P,registerItem:L,setExpanded:z,setFocusedElement:C,space:T,state:$},_[17]=T,_[18]=$,_[19]=V,_[20]=v):v=_[20];let F=v;_[21]!==R?(b=e=>{if(I.current){if("ArrowDown"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),i=t.slice(r),o=t.length;for(let t=1;t<o;t+=1){if(!i[t])continue;let n=i[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let o=[],s=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){s=!1;break}}if(s)return i[t]}return null}(N.current,R,I.current);t&&(rP(t),C(t));return}if("ArrowUp"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),i=t.slice(0,r),o=i.length;for(let t=o-1;t>=0;t-=1){let n=i[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let o=[],s=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){s=!1;break}}if(s)return i[t]}return null}(N.current,R,I.current);t&&(rP(t),C(t));return}if("ArrowLeft"===e.key){e.preventDefault();let t=I.current.getAttribute("data-tree-key");if(!t)return;let n=N.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&&N.current[n];r&&(r.element.focus(),C(r.element))}return}if("ArrowRight"===e.key){e.preventDefault();let t=I.current.getAttribute("data-tree-key");if(!t)return;N.current[t]?.expanded||D(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!0}}:e});return}}},_[21]=R,_[22]=b):b=_[22];let B=b;_[23]!==r?(x=e=>{C(e.target),r?.(e)},_[23]=r,_[24]=x):x=_[24];let U=x;return _[25]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{j.current&&O(Array.from(j.current.querySelectorAll('[data-ui="TreeItem"]')))},_[25]=w):w=_[25],_[26]!==n?(S=[n],_[26]=n,_[27]=S):S=_[27],(0,p.useEffect)(w,S),_[28]!==n||_[29]!==U||_[30]!==B||_[3
951]!==i||_[32]!==T?(k=(0,d.jsx)(M.BJ,{as:"ul","data-ui":"Tree",...i,onFocus:U,onKeyDown:B,ref:j,role:"tree",space:T,children:n}),_[28]=n,_[29]=U,_[30]=B,_[31]=i,_[32]=T,_[33]=k):k=_[33],_[34]!==F||_[35]!==k?(E=(0,d.jsx)(rR.Provider,{value:F,children:k}),_[34]=F,_[35]=k,_[36]=E):E=_[36],E}).displayName="ForwardRef(Tree)";(0,P.I4)(M.az).attrs({forwardedAs:"a"}).withConfig({displayName:"TreeItemBox",componentId:"sc-iiskig-1"})(function(e){let{$level:t}=e,{space:n}=(0,nU.JW)(e.theme);return(0,P.AH)` 96 padding-left: ${(0,M.D0)(n[2]*t)}; 97 98 &[data-as='a'] { 99 text-decoration: none; 100 } 101 `}),(0,P.I4)(M.EY).withConfig({displayName:"ToggleArrowText",componentId:"sc-iiskig-2"})`& > svg{transition:transform 100ms;}`;let rO=e=>"object"==typeof e&&null!=e&&1===e.nodeType,r$=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,rD=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n,r=getComputedStyle(e,null);return r$(r.overflowY,t)||r$(r.overflowX,t)||!!(n=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e))&&(n.clientHeight<e.scrollHeight||n.clientWidth<e.scrollWidth)}return!1},rN=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,rL=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},rz=(e,t)=>{var n,r,i,o;let s;if("u"<typeof document)return[];let{scrollMode:a,block:l,inline:u,boundary:c,skipOverflowHiddenElements:d}=t,h="function"==typeof c?c:e=>e!==c;if(!rO(e))throw TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,p=[],m=e;for(;rO(m)&&h(m);){if((m=rL(m))===f){p.push(m);break}null!=m&&m===document.body&&rD(m)&&!rD(document.documentElement)||null!=m&&rD(m,d)&&p.push(m)}let g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,y=null!=(o=null==(i=window.visualViewport)?void 0:i.height)?o:innerHeight,{scrollX:v,scrollY:b}=window,{height:x,width:w,top:S,right:k,bottom:E,left:_}=e.getBoundingClientRect(),{top:T,right:j,bottom:A,left:C}={top:parseFloat((s=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(s.scrollMarginRight)||0,bottom:parseFloat(s.scrollMarginBottom)||0,left:parseFloat(s.scrollMarginLeft)||0},I="start"===l||"nearest"===l?S-T:"end"===l?E+A:S+x/2-T+A,M="center"===u?_+w/2-C+j:"end"===u?k+j:_-C,P=[];for(let e=0;e<p.length;e++){let t=p[e],{height:n,width:r,top:i,right:o,bottom:s,left:c}=t.getBoundingClientRect();if("if-needed"===a&&S>=0&&_>=0&&E<=y&&k<=g&&(t===f&&!rD(t)||S>=i&&E<=s&&_>=c&&k<=o))break;let d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),m=parseInt(d.borderTopWidth,10),T=parseInt(d.borderRightWidth,10),j=parseInt(d.borderBottomWidth,10),A=0,C=0,R="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-T:0,O="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-j: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(f===t)A="start"===l?I:"end"===l?I-y:"nearest"===l?rN(b,b+y,y,m,j,b+I,b+I+x,x):I-y/2,C="start"===u?M:"center"===u?M-g/2:"end"===u?M-g:rN(v,v+g,g,h,T,v+M,v+M+w,w),A=Math.max(0,A+b),C=Math.max(0,C+v);else{A="start"===l?I-i-m:"end"===l?I-s+j+O:"nearest"===l?rN(i,s,n,m,j+O,I,I+x,x):I-(i+n/2)+O/2,C="start"===u?M-c-h:"center"===u?M-(c+r/2)+R/2:"end"===u?M-o+T+R:rN(c,o,r,h,T+R,M,M+w,w);let{scrollLeft:e,scrollTop:a}=t;A=0===D?0:Math.max(0,Math.min(a+A/D,t.scrollHeight-n/D+O)),C=0===$?0:Math.max(0,Math.min(e+C/$,t.scrollWidth-r/$+R)),I+=a-A,M+=e-C}P.push({el:t,top:A,left:C})}return P};var rV=n(24566),rF=n(29083),rB=n(46715),rU=n(18464),rH=n(33575),rW=(0,n(1676).L)(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rq=n(3381),rY=n(63571),rG=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,rB.C6)(t,e),t.prototype.lift=function(e){var t=new rX(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new rW},t.prototype.next=function(e){var t=this;(0,rY.Y)(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=(0,rB.Ju)(t.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;(0,rY.Y)(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;(0,rY.Y)(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0}
101,enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this.hasError,r=this.isStopped,i=this.observers;return n||r?rH.Kn:(this.currentObservers=null,i.push(e),new rH.yU(function(){t.currentObservers=null,(0,rq.o)(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,n=this.thrownError,r=this.isStopped;t?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new rU.c;return e.source=this,e},t.create=function(e,t){return new rX(e,t)},t}(rU.c),rX=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return(0,rB.C6)(t,e),t.prototype.next=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.next)||n.call(t,e)},t.prototype.error=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.error)||n.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!=(n=null==(t=this.source)?void 0:t.subscribe(e))?n:rH.Kn},t}(rG),rK={now:function(){return(rK.delegate||Date).now()},delegate:void 0},rZ=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=rK);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return(0,rB.C6)(t,e),t.prototype.next=function(t){var n=this.isStopped,r=this._buffer,i=this._infiniteTimeWindow,o=this._timestampProvider,s=this._windowTime;!n&&(r.push(t),i||r.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,n=this._buffer,r=this._infiniteTimeWindow,i=(r?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!r){for(var o=t.now(),s=0,a=1;a<n.length&&n[a]<=o;a+=2)s=a;s&&n.splice(0,s+1)}},t}(rG),rJ=n(70206),rQ=n(19468),r0=n(60375),r1=n(57638),r2=n(43734);function r3(e){return e[e.length-1]}var r5=n(84096),r4=n(83903),r6=n(83529);function r7(e,t){return void 0===t&&(t=0),(0,r4.N)(function(n,r){n.subscribe((0,r6._)(r,function(n){return(0,r5.N)(r,e,function(){return r.next(n)},t)},function(){return(0,r5.N)(r,e,function(){return r.complete()},t)},function(n){return(0,r5.N)(r,e,function(){return r.error(n)},t)}))})}function r8(e,t){return void 0===t&&(t=0),(0,r4.N)(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}var r9=n(97192);function ie(e,t){if(!e)throw Error("Iterable cannot be null");return new rU.c(function(n){(0,r5.N)(n,t,function(){var r=e[Symbol.asyncIterator]();(0,r5.N)(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}var it=n(50286),ir=n(13251),ii=n(18504),io=n(98644),is=n(48624),ia=n(88542),il=n(71733);function iu(){for(var e,t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=(e=r3(r))&&(0,r2.T)(e.schedule)?r.pop():void 0,s=(t=1/0,"number"==typeof r3(r)?r.pop():t);return r.length?1===r.length?(0,r0.Tg)(r[0]):(void 0===(n=s)&&(n=1/0),(0,rJ.Z)(rQ.D,n))(o?function(e,t){if(null!=e){if((0,it.l)(e))return(0,r0.Tg)(e).pipe(r8(t),r7(t));if((0,ii.X)(e))return new rU.c(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if((0,ir.y)(e))return(0,r0.Tg)(e).pipe(r8(t),r7(t));if((0,is.T)(e))return ie(e,t);if((0,io.x)(e))return new rU.c(function(n){var r;return(0,r5.N)(n,t,function(){r=e[r9.l](),(0,r5.N)(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return(0,r2.T)(null==r?void 0:r.return)&&r.return()}});if((0,il.U)(e))return ie((0,il.C)(e),t)}throw(0,ia.L)(e)}(r,o):(0,r0.Tg)(r)):r1.w}var ic=n(32005);function id(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function ih(e){let[t,n]=e;return[t,n]}function ip(e,t){let n=e,r=t,i=n.length,o=r.length;if(0===i||0===o)return 0;i>o?n=n.substring(i-o):i<o&&(r=r.substring(0,i));let s=Math.min(i,o);if(n===r)return s;let a=0,l=1;for(let e=0;-1!==e;){let t=n.substring(s-l);if(-1===(e=r.indexOf(t)))break;
101l+=e,(0===e||n.substring(s-l)===r.substring(0,l))&&(a=l,l++)}return a}function im(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 ig(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 iy(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343}function iv(e,t,n,r,i){let o=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),u=iT(o,s,{checkLines:!1,deadline:i}),c=iT(a,l,{checkLines:!1,deadline:i});return u.concat(c)}function ib(e,t,n){let r=e.slice(n,n+Math.floor(e.length/4)),i=-1,o="",s,a,l,u;for(;-1!==(i=t.indexOf(r,i+1));){let r=im(e.slice(n),t.slice(i)),c=ig(e.slice(0,n),t.slice(0,i));o.length<c+r&&(o=t.slice(i-c,i)+t.slice(i,i+r),s=e.slice(0,n-c),a=e.slice(n+r),l=t.slice(0,i-c),u=t.slice(i+r))}return 2*o.length>=e.length?[s||"",a||"",l||"",u||"",o||""]:null}var ix=Object.defineProperty,iw=Object.getOwnPropertySymbols,iS=Object.prototype.hasOwnProperty,ik=Object.prototype.propertyIsEnumerable,iE=(e,t,n)=>t in e?ix(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function i_(e,t,n){if(null===e||null===t)throw Error("Null input. (diff)");let r=iT(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={}))iS.call(i,o)&&iE(r,o,i[o]);if(iw)for(var o of iw(i))ik.call(i,o)&&iE(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&&iC(e,t,1),iy(i)&&0===n&&iC(e,t,-1)}for(let t=0;t<e.length;t++)0===e[t][1].length&&e.splice(t,1)}(r),r}function iT(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let o=im(r,i),s=r.substring(0,o);o=ig(r=r.substring(o),i=i.substring(o));let a=r.substring(r.length-o),l=function(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let i=e.length>t.length?e:t,o=e.length>t.length?t:e,s=i.indexOf(o);if(-1!==s)return r=[[1,i.substring(0,s)],[0,o],[1,i.substring(s+o.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(1===o.length)return[[-1,e],[1,t]];let a=function(e,t,n=1){let r,i,o,s,a;if(n<=0)return null;let l=e.length>t.length?e:t,u=e.length>t.length?t:e;if(l.length<4||2*u.length<l.length)return null;let c=ib(l,u,Math.ceil(l.length/4)),d=ib(l,u,Math.ceil(l.length/2));if(c&&d)r=c[4].length>d[4].length?c:d;else{if(!c&&!d)return null;d?c||(r=d):r=c}if(!r)throw Error("Unable to find a half match.");return e.length>t.length?(i=r[0],o=r[1],s=r[2],a=r[3]):(s=r[0],a=r[1],i=r[2],o=r[3]),[i,o,s,a,r[4]]}(e,t);if(a){let e=a[0],t=a[1],r=a[2],i=a[3],o=a[4],s=iT(e,r,n),l=iT(t,i,n);return s.concat([[0,o]],l)}return n.checkLines&&e.length>100&&t.length>100?function(e,t,n){let r=e,i=t,o=function(e,t){let n=[],r={};function i(e){let t="",i=0,s=-1,a=n.length;for(;s<e.length-1;){-1===(s=e.indexOf(` 102`,i))&&(s=e.length-1);let l=e.slice(i,s+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(a===o&&(l=e.slice(i),s=e.length),t+=String.fromCharCode(a),r[l]=a,n[a++]=l),i=s+1}return t}n[0]="";let o=4e4,s=i(e);return o=65535,{chars1:s,chars2:i(t),lineArray:n}}(r,i);r=o.chars1,i=o.chars2;let s=o.lineArray,a=iT(r,i,{checkLines:!1,deadline:n.deadline});(function(e,t){for(let n=0;n<e.length;n++){let r=e[n][1],i=[];for(let e=0;e<r.length;e++)i[e]=t[r.charCodeAt(e)];e[n][1]=i.join("")}})(a,s),(a=iI(a)).push([0,""]);let l=0,u=0,c=0,d="",h="";for(;l<a.length;){switch(a[l][0]){case 1:c++,h+=a[l][1];break;case -1:u++,d+=a[l][1];break;case 0:if(u>=1&&c>=1){a.splice(l-u-c,u+c),l=l-u-c;let e=iT(d,h,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)a.splice(l,0,e[t]);l+=e.length}c=0,u=0,d="",h="";break;default:throw Error("Unknown diff operation.")}l++}return a.pop(),a}(e,t,n):function(e,t,n){let r=e.length,i=t.length,o=Math.ceil((r+i)/2),s=2*o,a=Array(s),l=Array(s);for(let e=0;e<s;e++)a[e]=-1,l[e]=-1;a[o+1]=0,l[o+1]=0;let u=r-i,c=u%2!=0,d=0,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&&a[g-1]<a[g+1]?a[g+1]:a[g-1]+1)-f;for(;p<r&&y<i&&e.charAt(p)===t.charAt(y);)p++,y++;if(a[g]=p,p>r)h+=2;else if(y>i)d+=2;else if(c){let i=o+u-f;if(i>=0&&i<s&&-1!==l[i]&&p>=r-l[i])return iv(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<s&&-1!==a[i]){let s=a[i],l=o+s-i;if(s>=(h=r-h))return iv(e,t,s,l,n)}}}}return[[-1,e],[1,t]]}(e,t,n.deadline)}(r=r.substring(0,r.length-o),i=i.substring(0,i.length-o),n);return s&&l.unshift([0,s]),a&&l.push([0,a]),l=iN(l)}function ij(e,t,n){return 1===n?e+t:t+e}function iA(e,t){return 1===t?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function iC(e,t,n){var r,i;let o=1===n?-1:1,s=null,a=null,l=t+n;for(;l>=0&&l<e.length&&(null===s||null===a);l+=n){let[r,i]=e[l];
102if(0!==i.length){if(1===r){null===s&&(s=l);continue}else if(-1===r){null===a&&(a=l);continue}else if(0===r){if(null===s&&null===a){let[r,i]=iA(e[t][1],n);e[t][1]=r,e[l][1]=ij(e[l][1],i,o);return}break}}}if(null!==s&&null!==a&&(r=s,i=a,1===n?e[r][1][e[r][1].length-1]===e[i][1][e[i][1].length-1]:e[r][1][0]===e[i][1][0])){let[r,i]=iA(e[s][1],o),[l]=iA(e[a][1],o);e[s][1]=r,e[a][1]=l,e[t][1]=ij(e[t][1],i,n);return}let[u,c]=iA(e[t][1],n);e[t][1]=u,null===s?(e.splice(l,0,[1,c]),null!==a&&a>=l&&a++):e[s][1]=ij(e[s][1],c,o),null===a?e.splice(l,0,[-1,c]):e[a][1]=ij(e[a][1],c,o)}function iI(e){let t=e.map(e=>ih(e)),n=!1,r=[],i=0,o=null,s=0,a=0,l=0,u=0,c=0;for(;s<t.length;)0===t[s][0]?(r[i++]=s,a=u,l=c,u=0,c=0,o=t[s][1]):(1===t[s][0]?u+=t[s][1].length:c+=t[s][1].length,o&&o.length<=Math.max(a,l)&&o.length<=Math.max(u,c)&&(t.splice(r[i-1],0,[-1,o]),t[r[i-1]+1][0]=1,i--,s=--i>0?r[i-1]:-1,a=0,l=0,u=0,c=0,o=null,n=!0)),s++;for(n&&(t=iN(t)),t=iD(t),s=1;s<t.length;){if(-1===t[s-1][0]&&1===t[s][0]){let e=t[s-1][1],n=t[s][1],r=ip(e,n),i=ip(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(s,0,[0,n.substring(0,r)]),t[s-1][1]=e.substring(0,e.length-r),t[s+1][1]=n.substring(r),s++):(i>=e.length/2||i>=n.length/2)&&(t.splice(s,0,[0,e.substring(0,i)]),t[s-1][0]=1,t[s-1][1]=n.substring(0,n.length-i),t[s+1][0]=-1,t[s+1][1]=e.substring(i),s++),s++}s++}return t}let iM=/[^a-zA-Z0-9]/,iP=/\s/,iR=/[\r\n]/,iO=/\n\r?\n$/,i$=/^\r?\n\r?\n/;function iD(e){let t=e.map(e=>ih(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(iM),o=r.match(iM),s=i&&n.match(iP),a=o&&r.match(iP),l=s&&n.match(iR),u=a&&r.match(iR),c=l&&e.match(iO),d=u&&t.match(i$);return c||d?5:l||u?4:i&&!s&&a?3:s||a?2:i||o?1:0}let r=1;for(;r<t.length-1;){if(0===t[r-1][0]&&0===t[r+1][0]){let e=t[r-1][1],i=t[r][1],o=t[r+1][1],s=ig(e,i);if(s){let t=i.substring(i.length-s);e=e.substring(0,e.length-s),i=t+i.substring(0,i.length-s),o=t+o}let a=e,l=i,u=o,c=n(e,i)+n(i,o);for(;i.charAt(0)===o.charAt(0);){e+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);let t=n(e,i)+n(i,o);t>=c&&(c=t,a=e,l=i,u=o)}t[r-1][1]!==a&&(a?t[r-1][1]=a:(t.splice(r-1,1),r--),t[r][1]=l,u?t[r+1][1]=u:(t.splice(r+1,1),r--))}r++}return t}function iN(e){let t=e.map(e=>ih(e));t.push([0,""]);let n=0,r=0,i=0,o="",s="",a;for(;n<t.length;)switch(t[n][0]){case 1:i++,s+=t[n][1],n++;break;case -1:r++,o+=t[n][1],n++;break;case 0:r+i>1?(0!==r&&0!==i&&(0!==(a=im(s,o))&&(n-r-i>0&&0===t[n-r-i-1][0]?t[n-r-i-1][1]+=s.substring(0,a):(t.splice(0,0,[0,s.substring(0,a)]),n++),s=s.substring(a),o=o.substring(a)),0!==(a=ig(s,o))&&(t[n][1]=s.substring(s.length-a)+t[n][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a))),n-=r+i,t.splice(n,r+i),o.length&&(t.splice(n,0,[-1,o]),n++),s.length&&(t.splice(n,0,[1,s]),n++),n++):0!==n&&0===t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",s="";break;default:throw Error("Unknown diff operation")}""===t[t.length-1][1]&&t.pop();let l=!1;for(n=1;n<t.length-1;)0===t[n-1][0]&&0===t[n+1][0]&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),l=!0):t[n][1].substring(0,t[n+1][1].length)===t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),l=!0)),n++;return l&&(t=iN(t)),t}var iL=Object.defineProperty,iz=Object.getOwnPropertySymbols,iV=Object.prototype.hasOwnProperty,iF=Object.prototype.propertyIsEnumerable,iB=(e,t,n)=>t in e?iL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iU=(e,t)=>{for(var n in t||(t={}))iV.call(t,n)&&iB(e,n,t[n]);if(iz)for(var n of iz(t))iF.call(t,n)&&iB(e,n,t[n]);return e};let iH={threshold:.5,distance:1e3};function iW(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=iU(iU({},iH),r),o=function(e){let t={};for(let n=0;n<e.length;n++)t[e.charAt(n)]=0;for(let n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t}(t);function s(e,r){let o=e/t.length,s=Math.abs(n-r);return i.distance?o+s/i.distance:s?1:o}let a=i.threshold,l=e.indexOf(t,n);-1!==l&&(a=Math.min(s(0,l),a),-1!==(l=e.lastIndexOf(t,n+t.length))&&(a=Math.min(s(0,l),a)));let u=1<<t.length-1;l=-1;let c,d,h=t.length+e.length,f=[];for(let r=0;r<t.length;r++){for(c=0,d=h;c<d;)s(r,n+d)<=a?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=s(r,t-1);if(e<=a)if(a=e,(l=t-1)>n)i=Math.max(1,2*n-l);else break}}if(s(r+1,n)>a)break;f=m}return l}(e,t,i,r):-1}function iq(e){let t=[];for(let n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function iY(e){let t=[];for(let n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function iG(e,t){let n=0,r=0,i=0,o=0,s;for(s=0;s<e.length&&(1!==e[s][0]&&(n+=e[s][1].length),-1!==e[s][0]&&(r+=e[s][1].length),!(n>t));s++)i=n,o=r;return e.length!==s&&-1===e[s][0]?o:o+(t-i)}function iX(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+=iK(r)}return t}function iK(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function iZ(e,t){return{diffs:[],start1:e,start2:t,utf8Start1:e,utf8Start2:t,length1:0,length2:0,utf8Length1:0,utf8Length2:0}}var iJ=Object.defineProperty,iQ=Object.getOwnPropertySymbols,i0=Object.prototype.hasOwnProperty,i1=Object.prototype.propertyIsEnumerable,i2=(e,t,n
102)=>t in e?iJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,i3=(e,t)=>{for(var n in t||(t={}))i0.call(t,n)&&i2(e,n,t[n]);if(iQ)for(var n of iQ(t))i1.call(t,n)&&i2(e,n,t[n]);return e};let i5={margin:4};function i4(e={}){return i3(i3({},i5),e)}function i6(e,t,n){if(0===t.length)return[];let r=[],i=iZ(0,0),o=0,s=0,a=0,l=0,u=0,c=e,d=e;for(let e=0;e<t.length;e++){let h=t[e],[f,p]=h,m=p.length,g=iX(p);switch(!o&&0!==f&&(i.start1=s,i.start2=a,i.utf8Start1=l,i.utf8Start2=u),f){case 1:i.diffs[o++]=h,i.length2+=m,i.utf8Length2+=g,d=d.substring(0,a)+p+d.substring(a);break;case -1:i.length1+=m,i.utf8Length1+=g,i.diffs[o++]=h,d=d.substring(0,a)+d.substring(a+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&&(i7(i,c,n),r.push(i),i=iZ(-1,-1),o=0,c=d,s=a,l=u);break;default:throw Error("Unknown diff type")}1!==f&&(s+=m,l+=g),-1!==f&&(a+=m,u+=g)}return o&&(i7(i,c,n),r.push(i)),r}function i7(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&&iy(t[o])&&o--;let s=t.substring(o,e.start2);s&&e.diffs.unshift([0,s]);let a=s.length,l=iX(s),u=e.start2+e.length1+i;u<t.length&&iy(t[u])&&u++;let c=t.substring(e.start2+e.length1,u);c&&e.diffs.push([0,c]);let d=c.length,h=iX(c);e.start1-=a,e.start2-=a,e.utf8Start1-=l,e.utf8Start2-=l,e.length1+=a+d,e.length2+=a+d,e.utf8Length1+=l+h,e.utf8Length2+=l+h}let i8=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;function i9(e){return parseInt(e,10)}function oe(e){let t,n,r,{utf8Length1:i,utf8Length2:o,utf8Start1:s,utf8Start2:a,diffs:l}=e;t=0===i?`${s},0`:1===i?`${s+1}`:`${s+1},${i}`,n=0===o?`${a},0`:1===o?`${a+1}`:`${a+1},${o}`;let u=[`@@ -${t} +${n} @@ 103`];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])} 104`}return u.join("").replace(/%20/g," ")}function ot(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(N(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 on(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function or(e,t){let n={...e};for(let e of t)delete n[e];return n}function oi(e,t){var n;if(!Array.isArray(t))throw TypeError('Cannot apply "insert()" on non-array value');let r=ot(t,e.referenceItem);if(null===r)throw Error(`Found no matching array element to insert ${e.position}`);return 0===t.length?e.items:on(t,(n=e.position,"before"===n?r:r+1),0,e.items)}let oo=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);var os=Object.freeze({__proto__:null,assign:function(e,t){if(!id(t))throw TypeError('Cannot apply "assign()" on non-object value');return!function(e){for(let t in e)if(oo(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+=iK(e),e>65535?i+=2:i+=1}if(!n.allowExceedingIndices&&r!==e)throw Error("Failed to determine byte offset");return i}let s=[];for(let t of e)s.push({diffs:t.diffs.map(e=>ih(e)),start1:o(t.start1),start2:o(t.start2),utf8Start1:t.utf8Start1,utf8Start2:t.utf8Start2,length1:t.length1,length2:t.length2,utf8Length1:t.utf8Length1,utf8Length2:t.utf8Length2});return s}(e,r,{allowExceedingIndices:n.allowExceedingIndices}),o=n.margin||4,s=n.deleteThreshold||.4,a=function(e,t=4){let n="";for(let e=1;e<=t;e++)n+=String.fromCharCode(e);for(let n of e)n.start1+=t,n.start2+=t,n.utf8Start1+=t,n.utf8Start2+=t;let r=e[0],i=r.diffs;if(0===i.length||0!==i[0][0])i.unshift([0,n]),r.start1-=t,r.start2-=t,r.utf8Start1-=t,r.utf8Start2-=t,r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[0][1].length){let e=i[0][1].length,o=t-e;i[0][1]=n.substring(e)+i[0][1],r.start1-=o,r.start2-=o,r.utf8Start1-=o,r.utf8Start2-=o,r.length1+=o,r.length2+=o,r.utf8Length1+=o,r.utf8Length2+=o}if(0===(i=(r=e[e.length-1]).diffs).length||0!==i[i.length-1][0])i.push([0,n]),r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[i.length-1][1].length){let e=t-i[i.length-1][1].length;i[i.length-1][1]+=n.substring(0,e),r.length1+=e,r.length2+=e,r.utf8Length1+=e,r.utf8Length2+=e}return n}(i,o);r=a+r+a,function(e,t=4){for(let n=0;n<e.length;n++){if(e[n].length1<=32)continue;let r=e[n];e.splice(n--,1);let i=r.start1,o=r.start2,s="";for(;0!==r.diffs.length;){let a=iZ(i-s.length,o-s.length),l=!0;if(""!==s){let e=iX(s);a.length1=s.length,a.utf8Length1=e,a.length2=s.length,a.utf8Length2=e,a.diffs.push([0,s])}for(;0!==r.diffs.length&&a.length1<32-t;){let e=r.diffs[0][0],n=r.diffs[0][1],s=iX(n);if(1===e){a.length2+=n.length,a.utf8Length2+=s,o+=n.length;let e=r.diffs.shift();e&&a.diffs.push(e),l=!1}else -1===e&&1===a.diffs.length&&0===a.diffs[0][0]&&n.length>64?(a.length1+=n.length,a.utf8Length1+=s,i+=n.length,l=!1,a.diffs.push([e,n]),r.diffs.shift()):(s=iX(n=n.substring(0,32-a.length1-t)),a.length1+=n.length,a.utf8Length1+=s,i+=n.length,0===e?(a.length2+=n.length,a.utf8Length2+=s,o+=n.length):l=!1,a.diffs.push([e,n]),n===r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(n.length))}s=(s=iY(a.diffs)).substring(s.length-t);let u=iq(r.diffs).substring(0,t),c=iX(u);""!==u&&(a.length1+=u.length,a.length2+=u.length,a.utf8Length1+=c,a.utf8Length2+=c,0!==a.diffs.length&&0===a.diffs[a.diffs.length-1][0]?a.diffs[a.diffs.length-1][1]+=u:a.diffs.push([0,u])),l||e.splice(++n,0,a)}}}(i,o);let l=0,u=[];for(let e=0;e<i.length;e++){let t=i[e].start2+l,n=iq(i[e].diffs),o,a=-1;if(n.length>32?-1!==(o=iW(r,n.substring(0,32),t))&&(-1===(a=iW(r,n.substring(n.length-32),t+n.length-32))||o>=a)&&(o=-1):o=iW(r,n,t),-1===o)u[e]=!1,l-=i[e].length2-i[e].length1;else{let c;if(u[e]=!0,l=o-t,c=-1===a?r.substring(o,o+n.length):r.substring(o,a+32),n===c)r=r.substring(0,o)+iY(i[e].diffs)+r.substring(o+n.length);else{let t=i_(n,c,{checkLines:!1});if(n.length>32&&function(e){let t=0,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i][0],s=e[i][1];switch(o){case 1:n+=s.length;break;case -1:r+=s.length;break;case 0:t+=Math.max(n,r),n=0,r=0;break;default:throw Error("Unknown diff operation.")}}return t+Math.max(n,r)}(t)/n.length>s)u[e]=!1;else{t=iD(t);let n=0,s=0;for(let a=0;a<i[e].diffs.length;a++){let l=i[e].diffs[a];0!==l[0]&&(s=iG(t,n)),1===l[0]?r=r.substring(0,o+s)+l[1]+r.substring(o+s):-1===l[0]&&(r=r.substring(0,o+s)+r.
104substring(o+iG(t,n+l[1].length))),-1!==l[0]&&(n+=l[1].length)}}}}}return[r=r.substring(a.length,r.length-a.length),u]}(function(e){if(!e)return[];let t=[],n=e.split(` 105`),r=0;for(;r<n.length;){let e=n[r].match(i8);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=iZ(i9(e[1]),i9(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=i9(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=i9(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 s=iX(e)-e.length;if("-"===o)i.diffs.push([-1,e]),i.length1-=s;else if("+"===o)i.diffs.push([1,e]),i.length2-=s;else if(" "===o)i.diffs.push([0,e]),i.length1-=s,i.length2-=s;else throw Error(`Invalid patch mode "${o}" in: ${e}`);r++}}return t}(e.value),t)[0]},inc:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "inc()" on non-numeric value');return t+e.amount},insert:oi,insertIfMissing:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "insertIfMissing()" on non-array value');
105if(0===e.items.length)return t;let n=e.items.filter(e=>!t.find(t=>e._key===t?._key));return 0===n.length?t:oi({items:n,referenceItem:e.referenceItem,position:e.position},t)},remove:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "remove()" on non-array value');let n=ot(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return on(t,n,1,[])},replace:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "replace()" on non-array value');let n=ot(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return on(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(!id(t))throw TypeError('Cannot apply "unassign()" on non-object value');return 0===e.keys.length?t:or(t,e.keys)},unset:function(e){},upsert:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "upsert()" on non-array value');
105if(0===e.items.length)return t;let n={},r=[];e.items.forEach((e,i)=>{let o=t.findIndex(t=>t?._key===e._key);o>=0?n[o]=i:r.push(e)});let i=Object.keys(n);if(0===i.length&&0==r.length)return t;let o=[...t];for(let t of i){let r=Number(t);o[r]=e.items[n[r]]}return oi({items:r,referenceItem:e.referenceItem,position:e.position},o)}});function oa(e,t){return e.reduce((e,t)=>ol(t,e),t)}function ol(e,t){return function e(t,n,r){if(!(t.length>0)){if(!(n.type in os))throw Error(`Invalid operation type: "${n.type}"`);return os[n.type](n,r)}let[i,...o]=t;if(L(i)&&Array.isArray(r)){var s=i,a=o,l=n,u=r;let t=ot(u,s);if(null===t||-1===t)return u;let c=u[t],d=e(a,l,c);return d===c?u:on(u,t,1,void 0===d?[]:[d])}if("string"==typeof i&&id(r)){var c=i,d=o,h=n,f=r;let t=f[c];if(void 0===t&&d.length>0)return f;let s=e(d,h,t);return void 0===s?or(f,[c]):s===t?f:{...f,[c]:s}}throw Error(`Cannot apply operation of type "${n.type}" to path ${V(t)} on ${typeof r} value`)}(e.path,e.op,t)}function ou(e){return"_id"in e}function oc(e,t){if(0===e.length)return t;let n=t;for(let t of e){if(L(t)){if(!Array.isArray(n))return;if(N(t)){n=n.find(e=>e._key===t._key);continue}n=n[t];continue}n=n[t]}return n}let od=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};var oh=new Uint8Array(16);let of=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var op=[],om=0;om<256;++om)op.push((om+256).toString(16).substr(1));let og=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(op[e[t+0]]+op[e[t+1]]+op[e[t+2]]+op[e[t+3]]+"-"+op[e[t+4]]+op[e[t+5]]+"-"+op[e[t+6]]+op[e[t+7]]+"-"+op[e[t+8]]+op[e[t+9]]+"-"+op[e[t+10]]+op[e[t+11]]+op[e[t+12]]+op[e[t+13]]+op[e[t+14]]+op[e[t+15]]).toLowerCase();if(!("string"==typeof n&&of.test(n)))throw TypeError("Stringified UUID is invalid");return n},oy=function(e,t,n){var r=(e=e||{}).random||(e.rng||function(){if(!u&&!(u="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(oh)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return og(r)};function ov(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")}function ob(e,t){return t.reduce((e,t)=>{let n=ox(e,t);if("error"===n.status)throw Error(n.message);return"noop"===n.status?e:n.after},e)}function ox(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,ou(n)?n:{...n,_id:od()});return{status:"created",id:r._id,after:r}}(e,t);if("createIfNotExists"===t.type){return n=e,ou((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 s=e,ou((a=t).document)?s?{status:"updated",id:a.document._id,before:s,after:a.document}:{status:"created",id:a.document._id,after:a.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"}}if("patch"===t.type){var n,r,i,o,s,a,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 oa(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 ow(e,t,n){let r=[];for(let n of e.slice().reverse()){if(t(n))return r;r.push(n)}return r.reverse()}function oS(e,t){return V(e)===V(t)}function ok(e,t){let n=e;return t.reduce((e,t)=>
105{let r=n;if(n=ol(t,n),"set"===t.op.type&&"string"==typeof t.op.value){let n=oc(t.path,r);if("string"==typeof n){let r={...t,op:{type:"diffMatchPatch",value:(function(e,t){if("string"==typeof e&&"string"==typeof t){let n=i_(e,t,{checkLines:!0});return n.length>2&&(n=function(e,t=4){let n=e.map(e=>ih(e)),r=!1,i=[],o=0,s=null,a=0,l=!1,u=!1,c=!1,d=!1;for(;a<n.length;)0===n[a][0]?(n[a][1].length<t&&(c||d)?(i[o++]=a,l=c,u=d,s=n[a][1]):(o=0,s=null),c=!1,d=!1):(-1===n[a][0]?d=!0:c=!0,s&&(l&&u&&c&&d||s.length<t/2&&3===function(...e){return e.reduce((e,t)=>e+ +!!t,0)}(l,u,c,d))&&(n.splice(i[o-1],0,[-1,s]),n[i[o-1]+1][0]=1,o--,s=null,l&&u?(c=!0,d=!0,o=0):(a=--o>0?i[o-1]:-1,c=!1,d=!1),r=!0)),a++;return r&&(n=iN(n)),n}(n=iI(n))),i6(e,n,i4(void 0))}if(e&&Array.isArray(e)&&typeof t>"u")return i6(iq(e),e,i4(void 0));if("string"==typeof e&&t&&Array.isArray(t))return i6(e,t,i4(void 0));throw Error("Unknown call format to make()")})(n,t.op.value).map(oe).join("")}};return e.flatMap(e=>oS(e.path,t.path)&&"diffMatchPatch"===e.op.type?[]:e).concat(r)}}return e.push(t),e},[])}function oE(e,t,n,r){let i=t,o=r.map(t=>{let n=t.mutations.flatMap(t=>{if(ov(t)!==e)return[];let n=i;return i=ob(i,[t]),n&&"patch"===t.type?{type:"dmpified",mutation:{...t,dmpPatches:ok(n,t.patches),original:t.patches}}:t});return{...t,mutations:n}}),s=n;return o.map(t=>{let n=[];return t.mutations.forEach(t=>{if("dmpified"===t.type)try{s=oa(t.mutation.dmpPatches,s),n.push(t)}catch{console.warn("Failed to apply dmp patch, falling back to original");try{s=oa(t.mutation.original,s),n.push(t)}catch(t){throw Error(`Failed to apply patch for document "${e}": ${t.message}`,{cause:t})}}else s=ob(s,[t])})}),[r.map(t=>({...t,mutations:t.mutations.map(t=>"patch"!==t.type||ov(t)!==e?t:{...t,patches:t.patches.map(e=>"set"!==e.op.type?e:{...e,op:{...e.op,value:oc(e.path,s)}})})})),s]}let o_=["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 oT{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=o_[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 oj(e){return e>>16?4:e>>11?3:e>>7?2:1}function oA(e,t,n=0){let r=n,i=0;for(i=n;r<t;
105i++){let t=oj(e.codePointAt(i));4===t&&i++,r+=t}return i}class oC{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=oA(t,n),o=oA(t,r,i);e.data+=t.slice(i,o)}stringAppendValue(e,t){e.data+=t}}var oI=n(11026);function oM(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new rG}:t,r=e.resetOnError,i=void 0===r||r,o=e.resetOnComplete,s=void 0===o||o,a=e.resetOnRefCountZero,l=void 0===a||a;return function(e){var t,r,o,a=0,u=!1,c=!1,d=function(){null==r||r.unsubscribe(),r=void 0},h=function(){d(),t=o=void 0,u=c=!1},f=function(){var e=t;h(),null==e||e.unsubscribe()};return(0,r4.N)(function(e,p){a++,c||u||d();var m=o=null!=o?o:n();p.add(function(){0!=--a||c||u||(r=oP(f,l))}),m.subscribe(p),!t&&a>0&&(t=new oI.Ms({next:function(e){return m.next(e)},error:function(e){c=!0,d(),r=oP(h,i,e),m.error(e)},complete:function(){u=!0,d(),r=oP(h,s),m.complete()}}),(0,r0.Tg)(e).subscribe(t))})(e)}}function oP(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!0===t)return void e();if(!1!==t){var i=new oI.Ms({next:function(){i.unsubscribe(),e()}});return(0,r0.Tg)(t.apply(void 0,(0,rB.fX)([],(0,rB.zs)(n)))).subscribe(i)}}var oR=n(17453),oO=n(42351),o$=function(e){function t(t,n){return e.call(this)||this}return(0,rB.C6)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(rH.yU),oD={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=oD.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,rB.fX)([e,t],(0,rB.zs)(n))):setInterval.apply(void 0,(0,rB.fX)([e,t],(0,rB.zs)(n)))},clearInterval:function(e){var t=oD.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},oN=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return(0,rB.C6)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n,r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!=(n=this.id)?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),oD.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&oD.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,rq.o)(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o$),oL=1,oz={};function oV(e){return e in oz&&(delete oz[e],!0)}var oF=function(e){var t=oL++;return oz[t]=!0,c||(c=Promise.resolve()),c.then(function(){return oV(t)&&e()}),t},oB=function(e){oV(e)},oU={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=oU.delegate;return((null==n?void 0:n.setImmediate)||oF).apply(void 0,(0,rB.fX)([],(0,rB.zs)(e)))},clearImmediate:function(e){var t=oU.delegate;return((null==t?void 0:t.clearImmediate)||oB)(e)},delegate:void 0},oH=function(e){function t(t,n){var r=e.call(this,t,n)||this;
105return r.scheduler=t,r.work=n,r}return(0,rB.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=oU.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&&(oU.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(oN),oW=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=rK.now,e}(),oq=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,rB.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}(function(e){function t(t,n){void 0===n&&(n=oW.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,rB.C6)(t,e),t.prototype.flush=function(e){var t,n=this.actions;if(this._active)return void n.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}},t}(oW)))(oH),oY=n(72789),oG=n(29511),oX=n(77201);function oK(e){var t,n,r,i,o,s,a,l;let u=e.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation","reconnect"],includeResult:!1,includePreviousRevision:!1,visibility:"transaction",effectFormat:"mendoza",includeMutations:!1}).pipe(oM({resetOnRefCountZero:!0})),c=u.pipe((0,oR.p)(e=>"reconnect"===e.type)),d=u.pipe((0,oR.p)(e=>"welcome"===e.type)),h=u.pipe((0,oR.p)(e=>"mutation"===e.type)),f=iu(d,c).pipe((l=!1,t={bufferSize:1,refCount:!0},a=void 0===(i=t.bufferSize)?1/0:i,n=void 0===(o=t.windowTime)?1/0:o,l=void 0!==(s=t.refCount)&&s,r=t.scheduler,oM({connector:function(){return new rZ(a,n,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l}))).pipe((0,oR.p)(e=>"welcome"===e.type));return iu(f,h,c)}let oZ=(0,oY.mj)({types:{},actions:{"assign error to context":(0,oG.a)({error:({event:e})=>e}),"clear error from context":(0,oG.a)({error:void 0}),"connect to server-sent events":(0,rF.r)({type:"connect"}),"listen to server-sent events":(0,rF.d)("server-sent events",{id:"listener",input:({context:e})=>({listener:e.sharedListener||oK(e.client),id:e.id})}),"stop listening to server-sent events":(0,rF.s)("listener"),"buffer remote mutation events":(0,oG.a)({mutationEvents:({event:e,context:t})=>((0,oY.DT)(e,"mutation"),[...t.mutationEvents,e])}),"restore stashed changes":(0,oG.a)({stagedChanges:({event:e,context:t})=>((0,oY.DT)(e,"xstate.done.actor.submitTransactions"),t.stashedChanges),stashedChanges:[]}),"rebase fetched remote snapshot":(0,oX.e)(({enqueue:e})=>{e.assign(({event:e,context:t})=>{(0,oY.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=oJ(r,e.effects.apply,e.resultRev)));t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.id,r);let[o,s]=oE(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:s,stagedChanges:o,mutationEvents:[]}}),e.sendParent(({context:e})=>({type:"rebased.remote",id:e.id,document:e.remote}))}),"apply mendoza patch":(0,oG.a)(({event:e,context:t})=>{(0,oY.DT)(e,"mutation");let n=t.remote;if(e.transactionId===n?._rev)return{};let r=oJ(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]=oE(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,oG.a)({fetchRemoteSnapshotAttempts:({context:e})=>e.fetchRemoteSnapshotAttempts+1}),"reset fetch attempts":(0,oG.a)({fetchRemoteSnapshotAttempts:0}),"increment submit attempts":(0,oG.a)({submitTransactionsAttempts:({context:e})=>e.submitTransactionsAttempts+1}),"reset submit attempts":(0,oG.a)({submitTransactionsAttempts:0}),"stage mutation":(0,oG.a)({stagedChanges:({event:e,context:t})=>((0,oY.DT)(e,"mutate"),[...t.stagedChanges,{transaction:!1,mutations:e.mutations}])}),"stash mutation":(0,oG.a)({stashedChanges:({event:e,context:t})=>((0,oY.DT)(e,"mutate"),[...t.stashedChanges,{transaction:!1,mutations:e.mutations}])}),"rebase local snapshot":(0,oX.e)(({enqueue:e})=>{e.assign({local:({event:e,context:t})=>{var n;(0,oY.DT)(e,"mutate");let r=new Map;
105return t.local&&r.set(t.id,t.local),n=function(e,t){let n=Object.create(null);for(let r of e){let e=ov(r);if(!e)throw Error("Unable to get document id from mutation");let i=n[e]?.after||t.get(e),o=ox(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:[]}),t.set(e,o.after),n[e].after=o.after,n[e].muts.push(r))}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,r),n.forEach(e=>{("created"===e.status||"updated"===e.status)&&r.set(e.id,e.after),"deleted"===e.status&&r.delete(e.id)}),r.get(t.id)}}),e.sendParent(({context:e})=>({type:"rebased.local",id:e.id,document:e.local}))}),"send pristine event to parent":(0,oX.b)(({context:e})=>({type:"pristine",id:e.id})),"send sync event to parent":(0,oX.b)(({context:e})=>({type:"sync",id:e.id,document:e.remote})),"send mutation event to parent":(0,oX.b)(({context:e,event:t})=>((0,oY.DT)(t,"mutation"),{type:"mutation",id:e.id,previousRev:t.previousRev,resultRev:t.resultRev,effects:t.effects}))},actors:{"server-sent events":(0,ee.OX)(({input:e})=>{let{listener:t,id:n}=e;return(0,oO.v)(()=>t).pipe((0,oR.p)(e=>"welcome"===e.type||"reconnect"===e.type||"mutation"===e.type&&e.documentId===n),r7(oq))}),"fetch remote snapshot":(0,ee.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,ee.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",q(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})=>{var t,n;let r,i,o=new Map;return o.set(e.id,e.remote),{client:e.client,transactions:(t=e.stagedChanges,n=e=>!e.transaction,r=[],i=[],t.forEach(e=>{n(e)?i.push(e):(i.length>0&&r.push(i),i=[],r.push([e]))}),i.length>0&&r.push(i),r).flatMap(e=>({...e[0],mutations:e.flatMap(e=>e.mutations)})).map(e=>({...e,mutations:Object.values(ic(e.mutations,ov)).flatMap(e=>{var t,n;return(0===(n=0===(t=e).length?t:t.reduce((e,t)=>
105"delete"===t.type?[t]:(e.push(t),e),[])).length?n:n.reduce((e,t)=>("createIfNotExists"!==t.type?e.push(t):ow(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),D(n)&&D(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)&&oS(e.path,t.path)})||e.unshift(t),e),[]).reduce((e,t)=>("setIfMissing"!==t.op.type?e.push(t):ow(e,e=>"unset"===e.op.type).find(e=>"setIfMissing"===e.op.type&&oS(e.path,t.path))||e.push(t),e),[])})})).map(e=>{var t;return{...e,mutations:(t=o,e.mutations.map((e,n)=>{var r,i;if("patch"!==e.type)return e;let o=t.get(e.id);return o?(r=o,{...i=e,patches:ok(r,i.patches)}):e}))}}).map(e=>e.transaction&&void 0!==e.id?{id:e.id,mutations:e.mutations}:{id:oy(),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 oJ(e,t,n){var r;let i=(r=function(e){if(!e)return null;let{_rev:t,...n}=e;return n}(e),new oT(new oC,r,t).process());return i?Object.assign(i,{_rev:n}):null}let oQ=(0,oY.mj)({types:{},actions:{"emit sync event":(0,oX.a)(({event:e})=>((0,oY.DT)(e,"sync"),e)),"emit mutation event":(0,oX.a)(({event:e})=>((0,oY.DT)(e,"mutation"),e)),"emit rebased event":(0,oX.a)(({event:e})=>((0,oY.DT)(e,["rebased.local","rebased.remote"]),e)),"emit pristine event":(0,oX.a)(({event:e})=>((0,oY.DT)(e,["pristine"]),e)),"add document actor":(0,oG.a)({documents:({context:e,event:t,spawn:n})=>{(0,oY.DT)(t,"observe");let r=t.documentId;return e.documents[r]?e.documents:{...e.documents,[r]:n("documentMutatorMachine",{input
105:{id:r,client:e.client,sharedListener:e.sharedListener||oK(e.client)},id:r})}}}),"stop remote snapshot":(0,rF.s)(({context:e,event:t})=>((0,oY.DT)(t,"unobserve"),e.documents[t.documentId])),"remove remote snapshot from context":(0,oG.a)({documents:({context:e,event:t})=>{if((0,oY.DT)(t,"unobserve"),!e.documents[t.documentId])return e.documents;let{[t.documentId]:n,...r}=e.documents;return r}})},actors:{documentMutatorMachine:oZ}}).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:{}}}),o0=new Set,o1=null;function o2(e){if(o1!==e)for(let t of(o1=e,o0))t()}let o3=e=>{let t,n,r,i,o=(0,h.c)(8),{comlink:s,history:a}=e;return o[0]!==s||o[1]!==a?(t=()=>s?.on("presentation/navigate",e=>{a?.update(e)}),n=[s,a],o[0]=s,o[1]=a,o[2]=t,o[3]=n):(t=o[2],n=o[3]),(0,p.useEffect)(t,n),o[4]!==s||o[5]!==a?(r=()=>{if(a)return a.subscribe(e=>{e.title=e.title||document.title,s?.post("visual-editing/navigate",e)})},i=[s,a],o[4]=s,o[5]=a,o[6]=r,o[7]=i):(r=o[6],i=o[7]),(0,p.useEffect)(r,i),null},o5=new Set;function o4(e){for(let e of o5)e()}function o6(e,t){for(let e of o5)e()}function o7(e){for(let e of o5)e()}let o8=new Set;function o9(e){return o8.add(e),()=>o8.delete(e)}function se(){return!1}let st=e=>{let t,n,r=(0,h.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,p.useEffect)(t,n),null};function sn(e){let t=new CustomEvent("sanity/dragEnd",{detail:e,cancelable:!0});window.dispatchEvent(t)}let sr=(0,p.createContext)(null);function si(){let e=(0,p.useContext)(sr);if(!e)throw Error("Schema context is missing");return e}function so(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}=ew(e);return[X(r,K([{_type:t,_key:ex()}],n,{_key:i}))]})(e,n,r))}function ss(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Duplicate",icon:td.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}=ew(e);return[X(r,K({...ec(t,e.path),_key:ex()},n,{_key:i}))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Duplicated"}]:[]}function sa(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Remove",icon:td.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}=ew(e),i=ec(t,n).findIndex(e=>e._key===r);return[X(n,Z(i,i+1))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Removed"}]:[]}async function sl(e,t=!0){let{node:n,doc:r}=e;if(!r)return[];let i=[],o=[],[s,a,l,u]=await Promise.all([eS(n,r,"previous"),eS(n,r,"next"),eS(n,r,"first"),eS(n,r,"last")]);return l.length&&o.push({type:"action",label:"To top",icon:td.VQ$,action:()=>r.patch(l),telemetryEvent:"Visual Editing Context Menu Item Moved"}),s.length&&o.push({type:"action",label:"Up",icon:td.Kpk,action:()=>r.patch(s),telemetryEvent:"Visual Editing Context Menu Item Moved"}),a.length&&o.push({type:"action",label:"Down",icon:td.ZLN,action:()=>r.patch(a),telemetryEvent:"Visual Editing Context Menu Item Moved"}),u.length&&o.push({type:"action",label:"To bottom",icon:td.wvk,action:()=>r.patch(u),telemetryEvent:"Visual Editing Context Menu Item Moved"}),o.length&&(i.push({type:"group",label:"Move",icon:td.ycB,items:o}),t&&i.push({type:"divider"})),i}async function su(e){let{node:t,field:n,doc:r}=e,i=[];return i.push(...ss(e)),i.push(...sa(e)),i.push(...await sl(e)),i.push({type:"action",label:"Insert before",icon:td.SKY,action:so(t,r,n.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i.push({type:"action",label:"Insert after",icon:td.amD,action:so(t,r,n.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i}let sc=e=>{let t,n,r,i,o,s=(0,h.c)(12),{label:a,parent:l,width:u,onSelect:c,boundaryElement:f}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=["left-start","right","left","right-end","left-end","bottom","top"],s[0]=t):t=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(n=[4,4,4,4],s[1]=n):n=s[1],s[2]!==f||s[3]!==u?(r={arrow:!1,constrainSize:!0,floatingBoundary:f,padding:0,placement:"right-start",fallbackPlacements:t,preventOverflow:!0,width:u,__unstable_margins:n},s[2]=f,s[3]=u,s[4]=r):r=s[4],s[5]!==c||s[6]!==l?(i=(0,d.jsx)(nL,{node:l,onSelect:c}
105),s[5]=c,s[6]=l,s[7]=i):i=s[7],s[8]!==a||s[9]!==r||s[10]!==i?(o=(0,d.jsx)(M.rX,{fontSize:1,icon:td.amD,padding:2,popover:r,space:2,text:a,children:i}),s[8]=a,s[9]=r,s[10]=i,s[11]=o):o=s[11],o};async function sd(e){let{doc:t,node:n,parent:r}=e,i=[];if(i.push(...ss(e)),i.push(...sa(e)),i.push(...await sl(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,d.jsx)(sc,{label:"Insert before",onSelect:e=>{so(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,d.jsx)(sc,{label:"Insert after",onSelect:e=>{so(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:td.SKY,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",icon:nT(e),label:"block"===e.name?"Paragraph":e.title||e.name,action:so(n,t,e.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))}),i.push({type:"group",label:"Insert after",icon:td.amD,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",label:"block"===e.name?"Paragraph":e.title||e.name,icon:nT(e),action:so(n,t,e.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))});return i}let sh=[-4,4,-4,4];function sf(e){let t,n=(0,h.c)(27),{node:r,onDismiss:i,boundaryElement:o}=e,s=nD();n[0]!==r||n[1]!==i||n[2]!==s?(t=()=>{"action"===r.type&&(r.action?.(),i?.(),r.telemetryEvent&&s(r.telemetryEvent,null))},n[0]=r,n[1]=i,n[2]=s,n[3]=t):t=n[3];let a=t;if("divider"===r.type){let e;return n[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,d.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]!==a||n[9]!==t?(e=(0,d.jsx)(M.Dr,{fontSize:1,hotkeys:r.hotkeys,icon:r.icon,padding:2,space:2,text:r.label,disabled:t,onClick:a}),n[5]=r.hotkeys,n[6]=r.icon,n[7]=r.label,n[8]=a,n[9]=t,n[10]=e):e=n[10],e}if("group"===r.type){let e,t,s,a=r.icon;n[11]===Symbol.for("react.memo_cache_sentinel")?(e={arrow:!1,constrainSize:!0,placement:"right-start",fallbackPlacements:["left-start","right","left","right-end","left-end","bottom","top"],preventOverflow:!0,__unstable_margins:sh},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,d.jsx)(sf,{node:e,onDismiss:i,boundaryElement:o},t),n[16]=o,n[17]=i,n[18]=e):e=n[18],t=r.items.map(e),n[12]=o,n[13]=r.items,n[14]=i,n[15]=t}else t=n[15];return n[19]!==r.icon||n[20]!==r.label||n[21]!==t?(s=(0,d.jsx)(M.rX,{fontSize:1,icon:a,padding:2,popover:e,space:2,text:l,children:t}),n[19]=r.icon,n[20]=r.label,n[21]=t,n[22]=s):s=n[22],s}if("custom"===r.type){let e,{component:t}=r;return n[23]!==t||n[24]!==o||n[25]!==s?(e=(0,d.jsx)(t,{boundaryElement:o,sendTelemetry:s}),n[23]=t,n[24]=o,n[25]=s,n[26]=e):e=n[26],e}return null}let sp=e=>{let t,n,r,i,o,s,a,l,u,c,f,m,g,y,v,b=(0,h.c)(43),{node:x,onDismiss:w,position:S}=e,{x:k,y:E}=S,[_,T]=(0,p.useState)(null),{getField:j}=si(),{getDocument:A}=eb();b[0]!==j||b[1]!==x?(t=j(x),b[0]=j,b[1]=x,b[2]=t):t=b[2];let{field:C,parent:I}=t,P=C?.title||C?.name||"Unknown type",[R,O]=(0,p.useState)(void 0);b[3]!==C||b[4]!==A||b[5]!==x||b[6]!==I?(n=()=>{(async()=>{let e=A(x.id);e&&O(await function(e){let{node:t,field:n,parent:r,doc:i}=e;return n?.type==="arrayItem"?su({node:t,field:n,doc:i}):r?.type==="union"?sd({node:t,parent:r,doc:i}):Promise.resolve([])}({node:x,field:C,parent:I,doc:e}))})()},r=[C,x,I,A],b[3]=C,b[4]=A,b[5]=x,b[6]=I,b[7]=n,b[8]=r):(n=b[7],r=b[8]),(0,p.useEffect)(n,r),b[9]!==k||b[10]!==E?(i={getBoundingClientRect:()=>({bottom:E,left:k,right:k,top:E,width:0,height:0})},b[9]=k,b[10]=E,b[11]=i):i=b[11];let $=i;b[12]!==C?(o=nT(C),b[12]=C,b[13]=o):o=b[13];let D=o;b[14]===Symbol.for("react.memo_cache_sentinel")?(s={minWidth:120,maxWidth:160},b[14]=s):s=b[14],b[15]!==D||b[16]!==R?(a=(0,d.jsx)(M.az,{flex:"none",children:R?(0,d.jsx)(M.EY,{size:1,children:D}):(0,d.jsx)(M.y$,{size:1})}),b[15]=D,b[16]=R,b[17]=a):a=b[17];let N=R?P:"Loading...";b[18]!==N?(l=(0,d.jsx)(M.BJ,{flex:1,space:2,children:(0,d.jsx)(M.EY,{size:1,weight:"semibold",children:N})}),b[18]=N,b[19]=l):l=b[19],b[20]!==a||b[21]!==l?(u=(0,d.jsxs)(M.so,{gap:2,padding:2,children:[a,l]}),b[20]=a,b[21]=l,b[22]=u):u=b[22],b[23]!==_||b[24]!==R||b[25]!==w?(c=R&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(M.Nj,{}),R.map((e,t)=>(0,d.jsx)(sf,{node:e,onDismiss:w,boundaryElement:_},t))]}),b[23]=_,b[24]=R,b[25]=w,b[26]=c):c=b[26],b[27]!==u||b[28]!==c?(f=(0,d.jsxs)(M.W1,{style:s,children:[u,c]}),b[27]=u,b[28]=c,b[29]=f):f=b[29];let L=`${k}-${E}`;return b[30]!==k||b[31]!==E?(m={position:"absolute",left:k,top:E},b[30]=k,b[31]=E,b[32]=m):m=b[32],b[33]!==L||b[34]!==m?(g=(0,d.jsx)("div",{style:m},L),b[33]=L,b[34]=m,b[35]=g):g=b[35],b[36]!==$||b[37]!==f||b[38]!==g?(y=(0,d.jsx)(M.AM,{__unstable_margins:sh,arrow:!1,open:!0,placement:"right-start",referenceElement:$,content:f,children:g}),b[36]=$,b[37]=f,b[38]=g,b[39]=y):y=b[39],b[40]!==w||b[41]!==y?(v=(0,d.jsx)(nI,{setBoundaryElement:T,onDismiss:w,children:y}),b[40]=w,b[41]=y,b[42]=v):v=b[42],v},sm=(0,p.createContext)(null),sg=(0,P.I4)(M.Zp).withConfig({displayName:"Root",componentId:"sc-e95gnt-0"})`background-color:var(--overlay-bg);border-radius:3px;pointer-events:none;position:absolute;will-change:transform;
105box-shadow:var(--overlay-box-shadow);transition:none;--overlay-bg:transparent;--overlay-box-shadow:inset 0 0 0 1px transparent;[data-overlays] &{--overlay-bg:color-mix(in srgb,transparent 95%,var(--card-focus-ring-color));--overlay-box-shadow:inset 0 0 0 2px color-mix(in srgb,transparent 50%,var(--card-focus-ring-color));}[data-fading-out] &{transition:box-shadow 1550ms,background-color 1550ms;--overlay-bg:rgba(0,0,255,0);--overlay-box-shadow:inset 0 0 0 1px transparent;}&[data-focused]{--overlay-box-shadow:inset 0 0 0 1px var(--card-focus-ring-color);}&[data-hovered]:not([data-focused]){transition:none;--overlay-box-shadow:inset 0 0 0 2px var(--card-focus-ring-color);}:link{text-decoration:none;}`,sy=(0,P.I4)(M.so).withConfig({displayName:"Actions",componentId:"sc-e95gnt-1"})`bottom:100%;cursor:pointer;pointer-events:none;position:absolute;right:0;[data-hovered]:not([data-menu-open]) &{pointer-events:all;}[data-flipped] &{bottom:auto;top:100%;}`,sv=(0,P.I4)(M.so).withConfig({displayName:"HUD",componentId:"sc-e95gnt-2"})`top:100%;cursor:pointer;pointer-events:none;position:absolute;left:0;gap:4px;padding:4px 0;flex-wrap:wrap;[data-hovered]:not([data-menu-open]) &{pointer-events:all;}[data-flipped] &{top:calc(100% + 2rem);}`,sb=(0,P.I4)(M.so).withConfig({displayName:"MenuWrapper",componentId:"sc-e95gnt-3"})`margin:-0.5rem;[data-hovered]:not([data-menu-open]) &{pointer-events:all;}`,sx=(0,P.I4)(M.so).withConfig({displayName:"Tab",componentId:"sc-e95gnt-4"})`bottom:100%;cursor:pointer;pointer-events:none;position:absolute;left:0;[data-hovered]:not([data-menu-open]) &{pointer-events:all;}[data-flipped] &{bottom:auto;top:100%;}`,sw=(0,P.I4)(M.Zp).withConfig({displayName:"ActionOpen",componentId:"sc-e95gnt-5"})`cursor:pointer;background-color:var(--card-focus-ring-color);right:0;border-radius:3px;& [data-ui='Text']{color:#fff;white-space:nowrap;}`,sS=(0,P.I4)(M.so).withConfig({displayName:"Labels",componentId:"sc-e95gnt-6"})`display:flex;align-items:center;background-color:var(--card-focus-ring-color);right:0;border-radius:3px;& [data-ui='Text'],& [data-sanity-icon]{color:#fff;white-space:nowrap;}`,sk=P.I4.div.withConfig({displayName:"ExclusivePluginContainer",componentId:"sc-e95gnt-7"})`position:absolute;inset:0;pointer-events:all;`,sE=e=>{let t,n,r,i,o,s,a,l,u,c,f,m,g,y,v,b,x,w=(0,h.c)(60),{id:k,element:E,focused:T,componentResolver:C,node:P,showActions:R,draggable:O,targets:$,elementType:D,comlink:N,onActivateExclusivePlugin:L,onMenuOpenChange:z,inFrame:V}=e,{getField:F,getType:B}=si();w[0]!==B||w[1]!==P?(t=B(P),w[0]=B,w[1]=P,w[2]=t):t=w[2];let U=t;w[3]!==P?(n="path"in P?function(e){let{id:t,type:n,path:r,baseUrl:i,tool:o,workspace:s,perspective:a}=e,[l,u]=(function(e){let{baseUrl:t,workspace:n="default",tool:r="default",id:i,type:o,path:s,projectId:a,dataset:l}=e;if(!t)throw Error("baseUrl is required");if(!s)throw Error("path is required");if(!i)throw Error("id is required");if("/"!==t&&t.endsWith("/"))throw Error("baseUrl must not end with a slash");let u="default"===n?void 0:n,c="default"===r?void 0:r,d=I(i),h=Array.isArray(s)?S(s.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(""!==e._key)return{_key:e._key};if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)})):s,f=new URLSearchParams({baseUrl:t,id:d,type:o,path:h});if(u&&f.set("workspace",u),c&&f.set("tool",c),a&&f.set("projectId",a),l&&f.set("dataset",l),j(i)||A(i)){if(A(i)){let e=function(e){if(!A(e))return;let[t,n]=e.split(".");return n}(i);f.set("perspective",e)}}else f.set("perspective","published");let p=["/"===t?"":t];u&&p.push(u);let m=["mode=presentation",`id=${d}`,`type=${o}`,`path=${encodeURIComponent(h)}`];return c&&m.push(`tool=${c}`),p.push("intent","edit",`${m.join(";")}?${f}`),p.join("/")})({baseUrl:i,workspace:s,tool:o,type:n,id:t,path:r?function(e){let t="";for(let n of e){if("string"==typeof n){t&&(t+="."),t+=n;continue}if("number"==typeof n){t&&(t+=":"),t+=`${n}`;continue}if(null!==n&&Array.isArray(n)){t&&(t+=":"),t+=`${n.join(",")}}`;continue}if(n._key){t&&(t+=":"),t+=`${n._key}`;continue}}return t}(_.fromString(r)):[]}).split("?"),c=new URLSearchParams(u),d=a||c.get("perspective");return"drafts"===d?c.delete("perspective"):d&&c.set("perspective",d),`${l}?${c}`}(P):P.href,w[3]=P,w[4]=n):n=w[4];let H=n,W=function(){let e=(0,p.useContext)(sm);if(!e)throw Error("Preview Snapshots context is missing");return e}();t:{let e;if(!("path"in P)){r=void 0;break t}w[5]!==P||w[6]!==W?(e=W.find(e=>e._id===P.id)?.title,w[5]=P,w[6]=W,w[7]=e):e=w[7],r=e}let q=r;w[8]!==E||w[9]!==T||w[10]!==F||w[11]!==B?(i=function(e,t){let n=B(e),{field:r,parent:i}=F(e);if(!("id"in e)||!r||!n)return;let o=r.value.type;return{document:n,element:E,targetElement:t||E,field:r,focused:!!T,node:e,parent:i,type:o}},w[8]=E,w[9]=T,w[10]=F,w[11]=B,w[12]=i):i=w[12];let Y=i;if(w[13]!==D||w[14]!==Y||w[15]!==P?(o="element"===D?Y(P):void 0,w[13]=D,w[14]=Y,w[15]=P,w[16]=o):o=w[16],w[17]!==Y||w[18]!==$){let e;w[20]!==Y?(e=e=>Y(e.sanity,e.element),w[20]=Y,w[21]=e):e=w[21],s=$.map(e).filter(sA),w[17]=Y,w[18]=$,w[19]=s}else s=w[19];w[22]!==o||w[23]!==s?(a={legacyComponentContext:o,pluginContexts:s},w[22]=o,w[23]=s,w[24]=a):a=w[24];let G=a,X=function(e,t){let n,r=(0,h.c)(3);if(r[0]!==e||r[1]!==t){t:{if(!e){n=void 0;break t}let r=t?.(e);if(!r){n=void 0;break t}if((0,p.isValidElement)(r)){n=r;break t}n=(Array.isArray(r)?r:[r]).map(sT)}r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(G.legacyComponentContext,C),K=function(e,t){let n,r=(0,h.c)(5);if(r[0]!==e||r[1]!==t){let i;r[3]!==t?(i=e=>{let n={id:eH(),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}(G.pluginContexts,e.plugins);w[25]!==U?(l=U?.icon?(0,d.jsx)("div",{dangerouslySetInnerHTML:{__html:U.icon}}):(0,d.jsx)(td.pyG,{}),w[25]=U,w[26]=l):l=w[26];let Z=l,J=(0,p.useId)();w[27]!==K?(u=K?.some(sC),w[27]=K,w[28]=u):u=w[28];let Q=u||K?.length>1;w[29]!==k?(c=()=>{window.dispatchEvent(new CustomEvent("sanity-overlay/label-click",{detail:{id:k}}
105))},w[29]=k,w[30]=c):c=w[30];let ee=c;return w[31]!==H||w[32]!==V||w[33]!==R?(f=R?(0,d.jsx)(sy,{gap:1,paddingY:1,children:(0,d.jsx)(sj,{inFrame:V,href:H})}):null,w[31]=H,w[32]=V,w[33]=R,w[34]=f):f=w[34],w[35]!==N||w[36]!==O||w[37]!==ee||w[38]!==Z||w[39]!==J||w[40]!==K||w[41]!==L||w[42]!==z||w[43]!==Q||w[44]!==q?(m=(q||Q)&&(0,d.jsx)(sx,{gap:1,paddingY:1,onClick:ee,children:(0,d.jsxs)(sS,{gap:2,padding:2,children:[O&&(0,d.jsx)(M.az,{marginRight:1,children:(0,d.jsx)(M.EY,{className:"drag-handle",size:0,children:(0,d.jsx)(td.GG1,{})})}),(0,d.jsx)(M.EY,{size:0,children:Z}),q&&(0,d.jsx)(M.EY,{size:1,weight:"medium",children:q}),Q&&(0,d.jsx)(M.az,{paddingLeft:2,onClick:sI,children:(0,d.jsx)(sb,{children:(0,d.jsx)(rl,{id:J,popover:{animate:!0,placement:"bottom-start",constrainSize:!0,tone:"default"},onOpen:()=>{z?.(!0)},onClose:()=>{z?.(!1)},button:(0,d.jsx)(M.$n,{icon:td.Lz$,tone:"primary",padding:2}),menu:(0,d.jsx)(M.W1,{paddingY:0,children:(0,d.jsx)(nF,{children:K?.map((e,t)=>(0,d.jsxs)(p.Fragment,{children:[(0,d.jsxs)(M.BJ,{role:"group",paddingY:1,space:0,children:[(0,d.jsx)(M.Dr,{paddingY:2,text:(0,d.jsx)(M.az,{paddingY:2,children:(0,d.jsx)(M.EY,{muted:!0,size:1,style:{textTransform:"capitalize"},children:`${e.context.document.name}: ${e.context.field?.name}`})}),onClick:()=>{e.context.node&&N?.post("visual-editing/focus",e.context.node)}}),e.exclusive.map(t=>t.component?(0,d.jsx)(M.Dr,{paddingY:2,icon:t.icon||(0,d.jsx)(td.gP2,{}),text:(0,d.jsx)(M.az,{paddingY:2,children:(0,d.jsx)(M.EY,{size:1,children:t.title||t.name})}),onClick:()=>L?.(t,e.context)},t.name):null)]}),t<K.length-1&&(0,d.jsx)(M.Nj,{})]},e.id))})})})})})]})}),w[35]=N,w[36]=O,w[37]=ee,w[38]=Z,w[39]=J,w[40]=K,w[41]=L,w[42]=z,w[43]=Q,w[44]=q,w[45]=m):m=w[45],w[46]!==K?(g=K?.map(sM),w[46]=K,w[47]=g):g=w[47],w[48]!==g?(y=(0,d.jsx)(sv,{children:g}),w[48]=g,w[49]=y):y=w[49],w[50]!==f||w[51]!==m||w[52]!==y?(v=(0,d.jsxs)(nF,{children:[f,m,y]}),w[50]=f,w[51]=m,w[52]=y,w[53]=v):v=w[53],w[54]!==X||w[55]!==G.legacyComponentContext?(b=Array.isArray(X)?X.map((e,t)=>{let{component:n,props:r}=e;return(0,d.jsx)(n,{PointerEvents:nF,...G.legacyComponentContext,...r},t)}):X,w[54]=X,w[55]=G.legacyComponentContext,w[56]=b):b=w[56],w[57]!==v||w[58]!==b?(x=(0,d.jsxs)(d.Fragment,{children:[v,b]}),w[57]=v,w[58]=b,w[59]=x):x=w[59],x},s_=(0,p.memo)(function(e){let t,n,r,i,o,s,a,l,u,c,f,m,g,y=(0,h.c)(39),{draggable:v,focused:b,hovered:x,rect:w,wasMaybeCollapsed:S,enableScrollIntoView:k,inFrame:E}=e,_=(0,p.useRef)(null),T=(0,p.useRef)(!1),j=`${w.w}px`,A=`${w.h}px`,C=`translate(${w.x}px, ${w.y}px)`;y[0]!==j||y[1]!==A||y[2]!==C?(t={width:j,height:A,transform:C},y[0]=j,y[1]=A,y[2]=C,y[3]=t):t=y[3];let I=t;y[4]!==k||y[5]!==b||y[6]!==S?(n=()=>{if(!T.current&&!S&&!0===b&&_.current&&k){let e=_.current;!function(e,t){let n;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 r={top:parseFloat((n=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0};if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(rz(e,t));let i="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:n,top:o,left:s}of rz(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=o-r.top+r.bottom,t=s-r.left+r.right;n.scroll({top:e,left:t,behavior:i})}}(_.current,{behavior:t=>{0!==t.length&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},scrollMode:"if-needed",block:"center",inline:"nearest"})}T.current=!0===b},r=[b,S,k],y[4]=k,y[5]=b,y[6]=S,y[7]=n,y[8]=r):(n=y[7],r=y[8]),(0,p.useEffect)(n,r);let[M,P]=(0,p.useState)(!1);y[9]!==x?(i=()=>{if(!_.current||!x)return;let e=new IntersectionObserver(e=>{let[t]=e;P(t.boundingClientRect.top<0)},{threshold:1});return e.observe(_.current),()=>e.disconnect()},y[9]=x,y[10]=i):i=y[10],y[11]!==x||y[12]!==M?(o=[x,M],y[11]=x,y[12]=M,y[13]=o):o=y[13],(0,p.useEffect)(i,o);let[R,O]=(0,p.useState)(null);y[14]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{O(null),window.dispatchEvent(new CustomEvent("sanity-overlay/exclusive-plugin-closed"))},y[14]=s):s=y[14];let $=s;y[15]===Symbol.for("react.memo_cache_sentinel")?(a=(e,t)=>{O({plugin:e,context:t})},y[15]=a):a=y[15];let D=a,N=R?.plugin.component,[L,z]=(0,p.useState)(!1);y[16]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{(0,p.startTransition)(()=>z(!1))},y[16]=l):l=y[16],y[17]!==x?(u=[x],y[17]=x,y[18]=u):u=y[18],(0,p.useEffect)(l,u),y[19]!==N||y[20]!==L?(c=L||N?(0,d.jsx)(nM,{onDismiss:$,blockScroll:L}):null,y[19]=N,y[20]=L,y[21]=c):c=y[21];let V=b?"":void 0,F=x?"":void 0,B=M?"":void 0,U=v?"":void 0,H=L?"":void 0;return y[22]!==N||y[23]!==R||y[24]!==x||y[25]!==E||y[26]!==e?(f=N?(0,d.jsx)(sk,{"data-sanity-overlay-element":!0,onClick:sP,children:(0,d.jsx)(N,{...R.context,closeExclusiveView:$})}):x?(0,d.jsx)(sE,{...e,inFrame:E,onActivateExclusivePlugin:D,onMenuOpenChange:z}):null,y[22]=N,y[23]=R,y[24]=x,y[25]=E,y[26]=e,y[27]=f):f=y[27],y[28]!==I||y[29]!==V||y[30]!==F||y[31]!==B||y[32]!==U||y[33]!==H||y[34]!==f?(m=(0,d.jsx)(sg,{"data-focused":V,"data-hovered":F,"data-flipped":B,"data-draggable":U,"data-menu-open":H,ref:_,style:I,children:f}),y[28]=I,y[29]=V,y[30]=F,y[31]=B,y[32]=U,y[33]=H,y[34]=f,y[35]=m):m=y[35],y[36]!==c||y[37]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[c,m]}),y[36]=c,y[37]=m,y[38]=g):g=y[38],g});function sT(e){return"object"==typeof e&&"component"in e?e:{component:e,props:{}}}let sj=(0,p.memo)(function(e){let t,n,r,i=(0,h.c)(8),{inFrame:o}=e,s=(0,p.useSyncExternalStore)(sR,sO);i[0]!==e.href||i[1]!==s?(t=function e(t,n){try{let r=new URL(t,typeof location>"u"?void 0:location.origin);if(r.hash){let t=new URL(e(r.hash.slice(1),n));return`${r.origin}${r.pathname}${r.search}#${t.pathname}${t.search}`}return r.searchParams.set("preview",n),r.toString()}catch{return t}}(e.href,s),i[0]=e.href,i[1]=s,i[2]=t):t=i[2];let a=t,l=o?void 0:"_blank",u=o?"noopener":"noopener noreferrer";return i[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,d.jsx)(sw,{padding:2,children:(0,d.jsx)(M.EY,{size:1,weight:"medium",children:"Open in Studio"})}),i[3]=n):n=i[3],i[4]!==a||i[5]!==l||i[6]!==u?(r=(0,d.jsx)(M.az,{as:"a",href:a,target:l,rel:u,children:n}),i[4]=a,i[5]=l,i[6]=u,i[7]=r):r=i[7],r});function sA(e){return void 0!==e}function sC(e){return e.exclusive.length>0}function sI(e){e.stopPropagation()}function sM(e){return(0,d.jsx)(p.Fragment,{children:e.hud.map(t=>{let n=t.component;return n?(0,d.jsx)(n,{...e.context},t.name):null})},e.id)}function sP(e){e.stopPropagation()}function sR(e){let t=()=>e();return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}function sO(){return window.location.href}let s$=e=>{let t,n=(0,h.c)(5),{dragGroupRect:r}
105=e,i=`${r.y}px`,o=`${r.x}px`,s=`${r.w-1}px`,a=`${r.h-1}px`;return n[0]!==i||n[1]!==o||n[2]!==s||n[3]!==a?(t=(0,d.jsx)("div",{style:{position:"absolute",top:i,left:o,width:s,height:a,border:"1px dashed #f0709b",pointerEvents:"none"}}),n[0]=i,n[1]=o,n[2]=s,n[3]=a,n[4]=t):t=n[4],t},sD=e=>{let t,n=(0,h.c)(4),{dragInsertPosition:r}=e;if(null===r)return;let i=r?.left||r?.right?"horizontal":"vertical",o=0,s=0,a=0,l=0;if("horizontal"===i){let{left:e,right:t}=r;if(a=6,t&&e){let n=e.rect.x+e.rect.w,r=t.rect.x,i=.0125*Math.min(t.rect.h,e.rect.h);o=.5*n+.5*r-3,s=e.rect.y+i,l=Math.min(t.rect.h,e.rect.h)-2*i}else if(t&&!e){let e=.0125*t.rect.h;o=t.rect.x-3,s=t.rect.y+e,l=t.rect.h-2*e}else if(e&&!t){let t=.0125*e.rect.h;o=e.rect.x+e.rect.w-3,s=e.rect.y+t,l=e.rect.h-2*t}}else{let{bottom:e,top:t}=r;if(e&&t){let n=Math.min(t.rect.x,e.rect.x),r=t.rect.y+t.rect.h,i=e.rect.y,u=.0125*Math.min(e.rect.w,t.rect.w);l=6,o=n+u,s=.5*r+.5*i-3,a=Math.max(e.rect.w,t.rect.w)-2*u}else if(e&&!t){let t=.0125*e.rect.w;o=e.rect.x+t,s=e.rect.y-3,a=e.rect.w-2*t,l=6}else if(t&&!e){let e=.0125*t.rect.w;o=t.rect.x+e,s=t.rect.y+t.rect.h-3,a=t.rect.w-2*e,l=6}}let u=`${a}px`,c=`${l}px`,f=`translate(${o}px, ${s}px)`;return n[0]!==u||n[1]!==c||n[2]!==f?(t=(0,d.jsx)("div",{style:{position:"absolute",width:u,height:c,transform:f,background:"#556bfc",border:"2px solid white",borderRadius:"999px",zIndex:"999999"}}),n[0]=u,n[1]=c,n[2]=f,n[3]=t):t=n[3],t},sN=P.I4.div.withConfig({displayName:"Root",componentId:"sc-1vb3dia-0"})`--drag-preview-opacity:0.98;--drag-preview-skeleton-stroke:#ffffff;@media (prefers-color-scheme:dark){--drag-preview-skeleton-stroke:#383d51;}position:fixed;display:grid;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})`};width:${({$width:e})=>`${e}px`};height:${({$height:e})=>`${e}px`};z-index:9999999;opacity:var(--drag-preview-opacity);cursor:move;.drag-preview-content-wrapper{position:relative;width:100%;height:100%;container-type:inline-size;}[data-ui='card']{position:relative;width:100%;height:100%;}.drag-preview-skeleton{position:absolute;inset:0;rect{stroke:var(--drag-preview-skeleton-stroke);}}.drag-preview-handle{position:absolute;top:4cqmin;left:4cqmin;width:6cqmin;fill:var(--drag-preview-handle-fill);}`,sL=e=>{var t,n;let r,i,o,s,a,l,u,c,f,p,m,g,y,v,b,x,w,S,k,E,_,T=(0,h.c)(50),{skeleton:j}=e,A=Math.min(j.maxWidth,window.innerWidth/2),C=j.w>A?A/j.w:1,I=j.offsetX*C,P=j.offsetY*C,R=(0,M.Xy)(),O=(0,M.M4)(),$=O.radius[~~(n=(j.w-0)*((t=O.radius.length-2)-1)/1920+1,n<1?1:n>t?t:n)];if(T[0]!==I||T[1]!==P||T[2]!==R||T[3]!==$||T[4]!==C||T[5]!==j.childRects||T[6]!==j.h||T[7]!==j.w){let e=j.childRects.filter(sz),t=j.childRects.filter(sV);i=sN,s=j.w,a=j.h,l=I,u=P,c=C,r=M.Zp,g=$,y=4,v="hidden",b="transparent",x=R?"dark":"light",m="drag-preview-content-wrapper",f="drag-preview-skeleton",p=`0 0 ${j.w} ${j.h}`,o=[...e,...t],T[0]=I,T[1]=P,T[2]=R,T[3]=$,T[4]=C,T[5]=j.childRects,T[6]=j.h,T[7]=j.w,T[8]=r,T[9]=i,T[10]=o,T[11]=s,T[12]=a,T[13]=l,T[14]=u,T[15]=c,T[16]=f,T[17]=p,T[18]=m,T[19]=g,T[20]=y,T[21]=v,T[22]=b,T[23]=x}else r=T[8],i=T[9],o=T[10],s=T[11],a=T[12],l=T[13],u=T[14],c=T[15],f=T[16],p=T[17],m=T[18],g=T[19],y=T[20],v=T[21],b=T[22],x=T[23];return T[24]!==o||T[25]!==O.color?(w=o.map((e,t)=>(0,d.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:O.color.skeleton.from},t)),T[24]=o,T[25]=O.color,T[26]=w):w=T[26],T[27]!==w||T[28]!==f||T[29]!==p?(S=(0,d.jsx)("svg",{className:f,viewBox:p,children:w}),T[27]=w,T[28]=f,T[29]=p,T[30]=S):S=T[30],T[31]!==S||T[32]!==m?(k=(0,d.jsx)("div",{className:m,children:S}),T[31]=S,T[32]=m,T[33]=k):k=T[33],T[34]!==r||T[35]!==k||T[36]!==g||T[37]!==y||T[38]!==v||T[39]!==b||T[40]!==x?(E=(0,d.jsx)(r,{radius:g,shadow:y,overflow:v,tone:b,scheme:x,children:k}),T[34]=r,T[35]=k,T[36]=g,T[37]=y,T[38]=v,T[39]=b,T[40]=x,T[41]=E):E=T[41],T[42]!==i||T[43]!==s||T[44]!==a||T[45]!==l||T[46]!==u||T[47]!==c||T[48]!==E?(_=(0,d.jsx)(i,{$width:s,$height:a,$offsetX:l,$offsetY:u,$scaleFactor:c,children:E}),T[42]=i,T[43]=s,T[44]=a,T[45]=l,T[46]=u,T[47]=c,T[48]=E,T[49]=_):_=T[49],_};function sz(e){return"IMG"===e.tagName}function sV(e){return"IMG"!==e.tagName}let sF=(0,P.I4)(M.Zp).withConfig({displayName:"Root",componentId:"sc-1ys1jta-0"})`position:fixed;bottom:2rem;left:2rem;`,sB=()=>{let e,t,n=(0,h.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,d.jsx)(sF,{padding:2,shadow:2,radius:2,style:e,children:(0,d.jsxs)(M.so,{align:"center",gap:2,children:[(0,d.jsx)(M.qW,{keys:["Shift"]}),(0,d.jsx)(M.EY,{size:1,children:"Zoom Out"}),(0,d.jsx)(td.mSu,{})]})}),n[1]=t):t=n[1],t};function sU(e,t){let{type:n}=t,{contextMenu:r,focusPath:i,perspective:o,isDragging:s,dragInsertPosition:a,dragShowMinimap:l,dragShowMinimapPrompt:u,dragSkeleton:c,dragMinimapTransition:d,dragGroupRect: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&&(a=t.insertPosition),"overlay/dragStart"===n&&(s=!0),"overlay/dragUpdateSkeleton"===t.type&&(c=t.skeleton),"overlay/dragEnd"===n&&(s=!1),"overlay/dragToggleMinimapPrompt"===t.type&&(u=t.display),"overlay/dragStartMinimapTransition"===n&&(d=!0),"overlay/dragEndMinimapTransition"===n&&(d=!1),"overlay/dragUpdateGroupRect"===n&&(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=>
105{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:a,dragSkeleton:c,dragGroupRect:h,isDragging:s,focusPath:i,perspective:o,wasMaybeCollapsed:f,dragShowMinimap:l,dragShowMinimapPrompt:u,dragMinimapTransition:d}}let sH=function(e){let t,n,r,i,o,s,a,l=(0,h.c)(13),{comlink:u,children:c}=e;l[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],l[0]=t):t=l[0];let[f,m]=(0,p.useState)(t);l[1]!==u?(n=async e=>{if(u)try{let t=await u.fetch("visual-editing/preview-snapshots",void 0,{signal:e,suppressWarnings:!0});m(t.snapshots)}catch{}},l[1]=u,l[2]=n):n=l[2];let g=n;return l[3]!==u||l[4]!==g?(r=()=>{if(!u)return;let e=new AbortController,t=u.onStatus(()=>{g(e.signal)},"connected");return()=>{e.abort(),t()}},i=[u,g],l[3]=u,l[4]=g,l[5]=r,l[6]=i):(r=l[5],i=l[6]),(0,p.useEffect)(r,i),l[7]!==u?(o=()=>u?.on("presentation/preview-snapshots",e=>{m(e.snapshots)}),s=[u],l[7]=u,l[8]=o,l[9]=s):(o=l[8],s=l[9]),(0,p.useEffect)(o,s),l[10]!==c||l[11]!==f?(a=(0,d.jsx)(sm.Provider,{value:f,children:c}),l[10]=c,l[11]=f,l[12]=a):a=l[12],a};function sW(e){return"document"===e.type}function sq(e){return"type"===e.type}let sY=function(e){let t,n,r,i,o,s,a,l,u,c,f,m=(0,h.c)(22),{comlink:g,children:y,elements:v}=e;m[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,m[0]=t):t=m[0];let[b,x]=(0,p.useState)(t),[w,S]=(0,p.useState)(null);m[1]!==g?(n=()=>{if(!g)return;let e=async function(e){if(g)try{let t=await g.fetch("visual-editing/schema",void 0,{signal:e,suppressWarnings:!0});S(t.schema)}catch{}},t=new AbortController,n=g.onStatus(()=>{e(t.signal)},"connected");return()=>{t.abort(),n()}},r=[g],m[1]=g,m[2]=n,m[3]=r):(n=m[2],r=m[3]),(0,p.useEffect)(n,r),m[4]===Symbol.for("react.memo_cache_sentinel")?(i=[],m[4]=i):i=m[4];let k=(0,p.useRef)(i),E=(0,p.useDeferredValue)(v);m[5]!==E?(o=E.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},[]),m[5]=E,m[6]=o):o=m[6];let _=o,T=(0,p.useRef)(null);m[7]!==g||m[8]!==_?(s=()=>{if(!_.length||!g)return;let e=async(e,t)=>{let n=k.current;try{k.current=e;let n=await g.fetch("visual-editing/schema-union-types",{paths:e},{signal:t,suppressWarnings:!0});if(t.aborted)return;x(n.types),T.current=null}catch{}t.aborted&&(k.current=n)};_.some(e=>!k.current.find(t=>{let{id:n,path:r}=t;return n===e.id&&r===e.path}))&&(T.current?.abort(),T.current=new AbortController,e(_,T.current.signal))},a=[g,_],m[7]=g,m[8]=_,m[9]=s,m[10]=a):(s=m[9],a=m[10]),(0,p.useEffect)(s,a),m[11]!==w?(l=(e,t)=>{if(!w||"string"!=typeof e&&(!("path"in e)||!Array.isArray(w)))return;let n="string"==typeof e?e:e.type;return w.filter("document"===(t||"document")?sW:sq).find(e=>e.name===n)},m[11]=w,m[12]=l):l=m[12];let j=l;m[13]!==j||m[14]!==b?(u=e=>{if(!("path"in e))return{field:void 0,parent:void 0};let t=j(e);if(!t)return{field:void 0,parent:void 0};let n=e.path.split(".").flatMap(sG);try{return function t(n,r,i,o){let s=void 0===o?[]:o;if(!n)return{field:void 0,parent:void 0};let[a,...l]=r;if("fields"in n){let e=n.fields[a];if(!e&&"rest"in n)return t(n.rest,r,n,s);if(!l.length)return{field:e,parent:i};if(!e)throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...s,...r].join(".")}"`);return t(e.value,l,n,[...s,a])}if("array"===n.type)return t(n.of,r,n,s);if("arrayItem"===n.type)return l.length?t(n.value,l,n,[...s,a]):{field:n,parent:i};if("union"===n.type){let r=a.startsWith("[_key==")?b?.get(e.id)?.get([s.join("."),a].filter(Boolean).join("")):a;return t(n.of.find(e=>"unionOption"===e.type?e.name===r:e),l,n,[...s,a])}if("unionOption"===n.type)return a?t(n.value,r,n,s):{field:n,parent:i};if("inline"===n.type)return t(j(n.name,"type").value,r,n,s);throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...s,...r].join(".")}"`)}(t,n,void 0)}catch(e){return e instanceof Error&&console.warn(e.message),{field:void 0,parent:void 0}}},m[13]=j,m[14]=b,m[15]=u):u=m[15];let A=u;m[16]!==A||m[17]!==j?(c={getField:A,getType:j},m[16]=A,m[17]=j,m[18]=c):c=m[18];let C=c;return m[19]!==y||m[20]!==C?(f=(0,d.jsx)(sr.Provider,{value:C,children:y}),m[19]=y,m[20]=C,m[21]=f):f=m[21],f};function sG(e){return e.includes("[")?e.split(/(\[.+\])/,2):[e]}let sX=(o={},s=new Set,{getState:()=>o,setState:e=>
105{o=e(o),s.forEach(e=>e())},subscribe:e=>(s.add(e),()=>s.delete(e))}),sK=e=>{let t,n,r,i,o,s,a=(0,h.c)(11),{comlink:l,children:u}=e;a[0]!==l?(t=()=>l?.on("presentation/shared-state",sZ),n=[l],a[0]=l,a[1]=t,a[2]=n):(t=a[1],n=a[2]),(0,p.useEffect)(t,n),a[3]!==l?(r=()=>{(async function(){let e=await l?.fetch("visual-editing/shared-state",void 0,{suppressWarnings:!0});e&&sX.setState(()=>e.state)})().catch(sJ)},i=[l],a[3]=l,a[4]=r,a[5]=i):(r=a[4],i=a[5]),(0,p.useEffect)(r,i),a[6]!==l?(o={comlink:l,store:sX},a[6]=l,a[7]=o):o=a[7];let c=o;return a[8]!==u||a[9]!==c?(s=(0,d.jsx)(tc.Provider,{value:c,children:u}),a[8]=u,a[9]=c,a[10]=s):s=a[10],s};function sZ(e){"value"in e?sX.setState(t=>({...t,[e.key]:e.value})):sX.setState(t=>Object.fromEntries(Object.entries(t).filter(t=>{let[n]=t;return n!==e.key})))}function sJ(e){console.debug(e),console.warn("[@sanity/visual-editing]: Failed to fetch shared state. Check your version of `sanity` is up-to-date")}let sQ=e=>{let t,n,r=(0,h.c)(5),{children:i,comlink:o}=e;r[0]!==o?(t=(e,t)=>{if(!o)return;let n=nO[e];if(n)o.post("visual-editing/telemetry-log",{event:n,data:t});else throw Error(`Telemetry event: ${e} does not exist`)},r[0]=o,r[1]=t):t=r[1];let s=t;return r[2]!==i||r[3]!==s?(n=(0,d.jsx)(n$.Provider,{value:s,children:i}),r[2]=i,r[3]=s,r[4]=n):n=r[4],n};function s0(){}function s1(e){let{id:t,type:n,projectId:r,dataset:i}=e;return r&&i?{_id:t,_type:n,_projectId:r,_dataset:i}:{_id:t,_type:n}}function s2(e){return e.id}let s3=P.I4.div.withConfig({displayName:"Root",componentId:"sc-dwbgdv-0"})`background-color:transparent;direction:ltr;inset:0;pointer-events:none;position:absolute;width:100%;height:100%;z-index:${({$zIndex:e})=>e??"9999999"};`;function s5(e){let t,n;return t=requestAnimationFrame(()=>{n=requestAnimationFrame(e)}),()=>{void 0!==t&&cancelAnimationFrame(t),void 0!==n&&cancelAnimationFrame(n)}}let s4=e=>{let t,n,r,i,o,s=(0,h.c)(8),{documentIds:a}=e;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],s[0]=t):t=s[0];let[l,u]=(0,p.useState)(t);s[1]!==a?(n=()=>{(0,p.startTransition)(()=>u(e=>{let t=Array.from(new Set(a));return e.length===t.length&&e.reduce(au,t)?.length===0?e:t}))},r=[a],s[1]=a,s[2]=n,s[3]=r):(n=s[2],r=s[3]),(0,p.useEffect)(n,r);let c=eh();return s[4]!==c||s[5]!==l?(i=()=>{for(let e of l)c.send({type:"observe",documentId:C(e)}),c.send({type:"observe",documentId:I(e)});return()=>{for(let e of l)c.send({type:"unobserve",documentId:C(e)}),c.send({type:"unobserve",documentId:I(e)})}},o=[c,l],s[4]=c,s[5]=l,s[6]=i,s[7]=o):(i=s[6],o=s[7]),(0,p.useEffect)(i,o),null},s6=e=>{var t;let n,r,i,o,s,a,l,u,c=(0,h.c)(12),{comlink:d,dispatch:f,inFrame:m,inPopUp:g,onDrag:y,overlayEnabled:v,rootElement:b}=e,{dispatchDragEndEvent:x}=function(){let e,t,n,r=(0,h.c)(4),{getDocument:i}=eb();return r[0]!==i?(e=()=>{let e=e=>{let{insertPosition:t,target:n,preventInsertDefault:r}=e.detail;if(r)return;let o=function(e){if(e){let{top:t,right:n,bottom:r,left:i}=e;if(i||t)return{node:(i??t).sanity,position:"after"};if(n||r)return{node:(n??r).sanity,position:"before"}}}(t);if(o){let e=i(n.id),{node:t,position:r}=o,{key:s,hasExplicitKey:a}=ew(n),{path:l,key:u}=ew(t);l&&u&&u!==s&&e.patch(async e=>{let{getSnapshot:t}=e,i=ec(await t(),n.path);return a?[X(l,J({_key:s})),X(l,K(i,r,{_key:u}))]:[X(l,J(~~s)),X(l,K(i,r,u>s?~~u-1:~~u))]})}};return window.addEventListener("sanity/dragEnd",e),()=>{window.removeEventListener("sanity/dragEnd",e)}},t=[i],r[0]=i,r[1]=e,r[2]=t):(e=r[1],t=r[2]),(0,p.useEffect)(e,t),r[3]===Symbol.for("react.memo_cache_sentinel")?(n={dispatchDragEndEvent:sn},r[3]=n):n=r[3],n}(),w=nD();c[0]!==d||c[1]!==f||c[2]!==x||c[3]!==y||c[4]!==w?(n=e=>{if("element/click"===e.type){let{sanity:t}=e;d?.post("visual-editing/focus",t),w("Visual Editing Overlay Clicked",null)}else if("overlay/activate"===e.type)d?.post("visual-editing/toggle",{enabled:!0});else if("overlay/deactivate"===e.type)d?.post("visual-editing/toggle",{enabled:!1});else if("overlay/dragEnd"===e.type){let{insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}=e;x({insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}),t&&w("Visual Editing Drag Sequence Completed",null)}else if("overlay/dragUpdateCursorPosition"===e.type)return void y(e.x,e.y);else if("overlay/dragToggleMinimap"===e.type&&!0===e.display)w("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")}f(e)},c[0]=d,c[1]=f,c[2]=x,c[3]=y,c[4]=w,c[5]=n):n=c[5];let S=(t=n,a=(0,h.c)(7),l=(0,p.useRef)(void 0),u=eg(),a[0]!==b||a[1]!==t||a[2]!==m||a[3]!==g||a[4]!==u?(o=()=>
105{if(b)return l.current=function({handler:e,overlayElement:t,inFrame:n,inPopUp:r,optimisticActorReady:i}){let o=!1,s=new Map,a=new WeakMap,l=new Set,u=new WeakMap,c=new WeakMap,d,h,f,p=!1,m=[],g=()=>m[m.length-1];function y(e,t){e.removeEventListener("click",t.click,{capture:!0}),e.removeEventListener("contextmenu",t.contextmenu,{capture:!0}),e.removeEventListener("mousemove",t.mousemove,{capture:!0}),e.removeEventListener("mousedown",t.mousedown,{capture:!0}),e.removeEventListener("mouseenter",t.mouseenter),e.removeEventListener("mouseleave",t.mouseleave)}function v({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;i.addEventListener("click",r.click,{capture:!0}),i.addEventListener("contextmenu",r.contextmenu,{capture:!0}),i.addEventListener("mousemove",r.mousemove,{once:!0,capture:!0}),i.addEventListener("mousedown",r.mousedown,{capture:!0}),d.observe(o),e({type:"element/activate",id:t})}function b({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;y(i,r),d.unobserve(o),m=m.filter(e=>e!==i),e({type:"element/deactivate",id:t})}function x(t){if(!(!n&&!r||!i))for(let n of m){if(t===n){let n=a.get(t)?.sanity;if(!n||!ti(n))return;if(tu(t,n,l,a)){let n=t.style.cursor;n&&c.set(t,n),e({type:"overlay/setCursor",element:t,cursor:"move"});continue}}w(n)}}function w(t){let n=c.get(t);e({type:"overlay/setCursor",element:t,cursor:n})}function S(c){for(let d of function e(t){let n=[];function r(e,t,n,r){let i=function(e){if("object"==typeof e&&null!==e)return eP(e);try{let t=JSON.parse(e);return eP(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=_.toString(function(e){let t=[];for(let n of e.split(".")){let e=ej.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=eC.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,ek.is)(eT,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 s=function(t){let{nodeType:n,parentElement:i,textContent:o}=t;if(t.nodeType===Node.ELEMENT_NODE&&t.dataset?.sanityEditTarget!==void 0){let n=to(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=tr(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&&tn(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&tn(t.textContent)));if("IMG"===t.tagName){let e=tr(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if("TIME"===t.tagName){let e=tr(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if("SVG"===t.tagName.toUpperCase()){if(!t.ariaLabel)return;let e=tr(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(i),a=o;if(i.nodeType===Node.ELEMENT_NODE&&i.dataset?.sanityEditGroup!==void 0&&(a={type:"group",elements:{element:i,measureElement:i},targets:[]},n.push(a)),s){let e={elements:s.elements,sanity:s.sanity,reason:s.reason};a&&!s.preventGrouping?a.targets.push(e):n.push({elements:s.elements,type:"element",targets:[e]})}if(i.nodeType===Node.ELEMENT_NODE&&"IMG"!==i.tagName&&"SCRIPT"!==i.tagName&&"SANITY-VISUAL-EDITING"!==i.tagName)for(let e of i.childNodes)t(e,a)}(i,void 0);return n.map(e=>{if(0===e.targets.length&&"group"===e.type)return{...e,commonSanity:void 0};let t=1===e.targets.length?e.targets[0].sanity:to(e.targets.map(({s
105anity:e})=>e).filter(e=>void 0!==e))||e.targets[0].sanity;return t?{...e,commonSanity:t}:null}).filter(e=>null!==e)}(c)){if("group"===d.type){for(let e of d.targets){let t=a.get(e.elements.element);t&&"element"===t.type&&k(e.elements.element)}0===d.targets.length&&k(d.elements.element)}if(!d.commonSanity)continue;let{element:c}=d.elements;a.has(c)?function(t){let{element:n}=t.elements,r=a.get(n);r&&(a.set(n,{...r,sanity:t.commonSanity}),e({type:"element/update",elementType:r.type,id:r.id,rect:eW(n),sanity:t.commonSanity,targets:t.targets.map(e=>({sanity:e.sanity,element:e.elements.element}))}))}(d):function({type:c,elements:d,commonSanity:f,targets:y}){let{element:b,measureElement:S}=d,k={click(t){let r=t.target;if(b===g()&&b.contains(r)){n&&(t.preventDefault(),t.stopPropagation());let r=a.get(b)?.sanity;r&&!p&&e({type:"element/click",id:E,sanity:r})}},contextmenu(t){if(!("path"in f)||!n&&!r||!i||!f.path.split(".").pop()?.includes("[_key=="))return;let o=t.target;b===g()&&b.contains(o)&&((n||r)&&(t.preventDefault(),t.stopPropagation()),e({type:"element/contextmenu",id:E,position:{x:t.clientX,y:t.clientY},sanity:f}))},mousedown(t){if(t.preventDefault(),t.currentTarget!==m.at(-1)||b.getAttribute("data-sanity-drag-disable")||!n&&!r||!i)return;let o=a.get(b)?.sanity;if(!o||!ti(o)||!ts(o.path))return;let s=tu(b,f,l,a);s&&function(e){var t;let{mouseEvent:n,element:r,overlayGroup:i,handler:o,target:s,onSequenceStart:a,onSequenceEnd:l}=e;if(0!==n.button)return;window.focus();let u=i.map(e=>eW(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=u).some(e=>t.filter(t=>!eY(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=e0(n),v=document.body,{minYScaled:b,scaleFactor:x}=function(e,t){let n=t||eZ(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:i}=eZ(e.map(e=>eK(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;e4||(e9={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}},e8=p?~~p:document.documentElement.scrollHeight);let E=setInterval(()=>{u=i.map(e=>eW(e.elements.element))},150),_=()=>{x>=1||(o({type:"overlay/dragUpdateSkeleton",skeleton:e1(e7,r,x)}),o({type:"overlay/dragToggleMinimapPrompt",display:!1}),e2(v,x,b,o,150).then(()=>{setTimeout(()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:e3(u)})},300)}))},T=e=>{Math.abs(e.deltaY)>=10&&x<1&&!e4&&!S&&!h&&k&&(o({type:"overlay/dragToggleMinimapPrompt",display:!0}),S=!0),!e.shiftKey||e4||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),e4=!0,setTimeout(()=>{_()},50))},j=e=>{if(e.preventDefault(),e6=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}}(e7=e0(e)),4>Math.abs(eG(e7,y)))return;if(!w){let e=e3(u),t=e1(e7,r,1);o({type:"overlay/dragStart",flow:c}),o({type:"overlay/dragUpdateSkeleton",skeleton:t}),o({type:"overlay/dragUpdateGroupRect",groupRect:e}),w=!0,a()}o({type:"overlay/dragUpdateCursorPosition",x:e7.x,y:e7.y}),!e.shiftKey||e4||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),e4=!0,setTimeout(()=>{_()},50));let t=function(e,t,n){if("horizontal"===n){let r={x1:e.x,y1:e.y,x2:e.x-1e8,y2:e.y},i={x1:e.x,y1:e.y,x2:e.x+1e8,y2:e.y};return{left:eX(r,t,n),right:eX(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:eX(r,t,n),bottom:eX(i,t,n)}}}(e7,u,c);JSON.stringify(g)!==JSON.stringify(t)&&o({type:"overlay/dragUpdateInsertPosition",insertPosition:eQ(i,g=t,c)})},A=()=>{k=!1,o({type:"overlay/dragEnd",target:s,insertPosition:g?eQ(i,g,c):null,dragGroup:d,flow:c,preventInsertDefault:f}),S&&o({type:"overlay/dragToggleMinimapPrompt",display:!1}),e4||(clearInterval(E),l(),R(),P()),M()},C=e=>{"Shift"===e.key&&e4&&(e4=!1,o({type:"overlay/dragUpdateSkeleton",skeleton:e1(e7,r,1/x)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{e5(e6.y,v,e8,o,150,e9)},50),o({type:"overlay/dragUpdateGroupRect",groupRect:null}),k||(clearInterval(E),M(),R(),P(),l()))},I=()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{e5(e6.y,v,e8,o,150,e9).then(()=>{e4=!1})},50),clearInterval(E),M(),R(),P(),l()},M=()=>{window.removeEventListener("mousemove",j),window.removeEventListener("wheel",T),window.removeEventListener("mouseup",A)},P=()=>{window.removeEventListener("keyup",C)},R=()=>{window.removeEventListener("blur",I)};window.addEventListener("blur",I),window.addEventListener("keyup",C),window.addEventListener("wheel",T),window.addEventListener("mousemove",j),window.addEventListener("mouseup",A)}({element:b,handler:e,mouseEvent:t,overlayGroup:s,target:o,onSequenceStart:()=>{p=!0},onSequenceEnd:()=>{setTimeout(()=>{p=!1},250)}})},mousemove(e){k.mouseenter(e);let t=e.currentTarget;t&&(t.addEventListener("mouseenter",k.mouseenter),t.addEventListener("mouseleave",k.mouseleave))},mouseenter(){document.querySelector("vercel-live-feedback")&&b.closest("[data-vercel-edit-info]")||b.closest("[data-vercel-edit-target]")||(m.push(b),e({type:"element/mouseenter",id:E,rect:eW(b)}),x(b))},mouseleave(n){function r(){m.pop();let t=g();if(e({type:"element/mouseleave",id:E}),t){x(t);let n=a.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:eW(t)})}w(b)}let{relatedTarget:i}=n,o=tt(i),s=t.contains(o);if(te(o)&&s)return function e(t){let n=i=>{let{relatedTarget:o}=i;
105tt(o)?o&&te(o)&&(t.removeEventListener("mouseleave",n),e(o)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(o);r()}},E=eH(),_={type:c,id:E,elements:d,sanity:f,handlers:k};l.add(b),u.set(S,b),s.set(E,b),a.set(b,_),h?.observe(b),e({type:"element/register",elementType:c,id:E,element:b,rect:eW(b),sanity:f,dragDisabled:!!b.getAttribute("data-sanity-drag-disable"),targets:y.map(e=>({sanity:e.sanity,element:e.elements.element}))}),o&&v(_)}(d)}}function k(t){let n=a.get(t);if(n){let{id:r,handlers:i}=n;y(t,i),d.unobserve(t),a.delete(t),l.delete(t),s.delete(r),e({type:"element/unregister",id:r})}}function E(t){let n=a.get(t);n&&e({type:"element/updateRect",id:n.id,rect:eW(t)})}function T(e){if(o)for(let t of e){let{target:e}=t,n=te(e)&&a.get(e);n&&(t.isIntersecting?v(n):b(n))}}function j(t){let n=tt(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}m=[],e({type:"overlay/blur"})}function A(){m=[],e({type:"overlay/reset-mouse-state"})}function C(){for(let e of l)E(e)}function I(t){"Escape"===t.key&&(m=[],e({type:"overlay/blur"}))}function M(e){let{target:t}=e;if(!(t===window.document||!te(t)))for(let e of l)t.contains(e)&&E(e)}function P(){o||(h=new IntersectionObserver(T,{threshold:.3}),l.forEach(e=>h.observe(e)),e({type:"overlay/activate"}),o=!0)}function R(){o&&(h?.disconnect(),l.forEach(e=>{let t=a.get(e);t&&b(t)}),e({type:"overlay/deactivate"}),o=!1)}function O(t){let{id:n}=t.detail,r=s.get(n);if(!r)return;let i=a.get(r)?.sanity;i&&e({type:"element/click",id:n,sanity:i})}return window.document.fonts.ready.then(()=>{for(let e of l)E(e)}),window.addEventListener("click",j),window.addEventListener("contextmenu",j),window.addEventListener("sanity-overlay/exclusive-plugin-closed",A),window.addEventListener("sanity-overlay/label-click",O),window.addEventListener("keydown",I),window.addEventListener("resize",C),window.addEventListener("scroll",M,{capture:!0,passive:!0}),d=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(te(e)){let t=u.get(e);if(!t)return;E(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,te(o))){let e=o.parentElement?.closest("[data-sanity-edit-group]")||null;S({childNodes:[te(e)?e:o]})}}if(n)for(let e of l)e.isConnected||k(e),a.get(e)?.type!=="group"||e.hasAttribute("data-sanity-edit-group")||k(e)})).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),S(document.body),P(),{activate:P,deactivate:R,destroy:function(){window.removeEventListener("click",j),window.removeEventListener("contextmenu",j),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",A),window.removeEventListener("sanity-overlay/label-click",O),window.removeEventListener("keydown",I),window.removeEventListener("resize",C),window.removeEventListener("scroll",M),f.disconnect(),d.disconnect(),l.forEach(e=>{k(e)}),s.clear(),l.clear(),m=[],R()}}}({handler:t,overlayElement:b,inFrame:m,inPopUp:g,optimisticActorReady:u}),()=>{l.current?.destroy(),l.current=void 0}},s=[b,t,m,g,u],a[0]=b,a[1]=t,a[2]=m,a[3]=g,a[4]=u,a[5]=o,a[6]=s):(o=a[5],s=a[6]),(0,p.useEffect)(o,s),l);return c[6]!==S.current||c[7]!==v?(r=()=>{v?S.current?.activate():S.current?.deactivate()},c[6]=S.current,c[7]=v,c[8]=r):r=c[8],c[9]!==S||c[10]!==v?(i=[S,v],c[9]=S,c[10]=v,c[11]=i):i=c[11],(0,p.useEffect)(r,i),null};function s7(e){let t,n,r,i,o,s,a,l,u,c,f,m,g,y,v,b,x,w,S,k,E,_,T,j,A,C,I,P,R,O,$,D,N,L,z,V=(0,h.c)(77),{comlink:F,comlinkStatus:B,componentResolver:U,inFrame:H,inPopUp:W,zIndex:q,onPerspectiveChange:Y}=e,G=(0,M.Xy)();V[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},V[0]=t):t=V[0];let[X,K]=(0,p.useReducer)(sU,t),{contextMenu:Z,dragInsertPosition:J,dragShowMinimap:Q,dragShowMinimapPrompt:ee,dragSkeleton:et,elements:en,isDragging:er,perspective:ei,wasMaybeCollapsed:eo,dragMinimapTransition:es,dragGroupRect:ea}=X,[el,eu]=(0,p.useState)(null),[ec,ed]=(0,p.useState)(!0);V[1]!==F?(n=()=>{let e=[F?.on("presentation/focus",e=>{K({type:"presentation/focus",data:e})}),F?.on("presentation/blur",e=>{K({type:"presentation/blur",data:e})}),F?.on("presentation/toggle-overlay",()=>{ed(as)}
105)].filter(Boolean);return()=>e.forEach(ao)},r=[F],V[1]=F,V[2]=n,V[3]=r):(n=V[2],r=V[3]),(0,p.useEffect)(n,r),I=(0,h.c)(11),P=!!Y,I[0]!==K||I[1]!==Y?(j=e=>{K({type:"presentation/perspective",data:e}),Y?.(e.perspective)},I[0]=K,I[1]=Y,I[2]=j):j=I[2],R=(0,p.useEffectEvent)(j),I[3]!==F||I[4]!==R||I[5]!==P?(A=()=>{let e=new AbortController;F?.fetch("visual-editing/fetch-perspective",{handlesPerspectiveChange:P},{signal:e.signal,suppressWarnings:!0}).then(e=>{R(e)}).catch(s0);let t=F?.on("presentation/perspective",e=>{R(e)});return()=>{t?.(),e.abort()}},I[3]=F,I[4]=R,I[5]=P,I[6]=A):A=I[6],I[7]!==F||I[8]!==K||I[9]!==P?(C=[F,K,P],I[7]=F,I[8]=K,I[9]=P,I[10]=C):C=I[10],(0,p.useEffect)(A,C),N=(0,h.c)(7),L=(0,p.useRef)(void 0),N[0]!==F?(O=(e,t)=>{F?.post("visual-editing/documents",{documents:e,perspective:t})},N[0]=F,N[1]=O):O=N[1],z=O,N[2]!==en||N[3]!==ei||N[4]!==z?($=()=>{let e,t,n=(e=[...en].sort((e,t)=>{let n=e.rect.y-t.rect.y;return 0!==n?n:e.rect.x-t.rect.x}),t=new Set,e.reduce((e,n)=>{let{sanity:r}=n;return!(!r||!("id"in r)||t.has(r.id))&&(t.add(r.id),e.push(r)),e},[])),r=n.map(s2),i=L.current?.orderedIds;if(!i||i.length!==r.length||r.some((e,t)=>e!==i[t])||ei!==L.current?.perspective){let e=n.map(s1);L.current={orderedIds:r,perspective:ei},z(e,ei)}},D=[en,ei,z],N[2]=en,N[3]=ei,N[4]=z,N[5]=$,N[6]=D):($=N[5],D=N[6]),(0,p.useEffect)($,D),V[4]!==el?(i=(e,t)=>{el&&(el.style.setProperty("--drag-preview-x",`${e}px`),el.style.setProperty("--drag-preview-y",`${t-window.scrollY}px`))},V[4]=el,V[5]=i):i=V[5];let eh=i;V[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=!1,t=t=>{al(t)&&e&&(e=!1,ed(ar))},n=t=>{var n,r;if(al(t)){if(t.ctrlKey||t.metaKey||t.shiftKey)return;e||(e=!0,ed(an))}n=["mod","\\"],r=t,n.every(e=>aa[e]?r[aa[e]]:r.key===e.toUpperCase())&&ed(at)},r=()=>{e&&(e=!1,ed(ae))};return window.addEventListener("click",ai),window.addEventListener("keydown",n),window.addEventListener("keyup",t),window.addEventListener("blur",r),()=>{window.removeEventListener("click",ai),window.removeEventListener("keydown",n),window.removeEventListener("keyup",t),window.removeEventListener("blur",r)}},s=[ed],V[6]=o,V[7]=s):(o=V[6],s=V[7]),(0,p.useEffect)(o,s);let[ef,ep]=(0,p.useState)(!1),[em,ey]=(0,p.useState)(!1),ev=(0,p.useRef)(void 0);V[8]!==ec?(a=()=>{if(ec)return s5(()=>{ep(!0),s5(()=>{ey(!0),ev.current=setTimeout(()=>{ey(!1),ep(!1)},1500)})});ev.current&&(clearTimeout(ev.current),(0,p.startTransition)(()=>{ep(!1),ey(!1)}))},l=[ec],V[8]=ec,V[9]=a,V[10]=l):(a=V[9],l=V[10]),(0,p.useEffect)(a,l),V[11]!==en?(u=en.flatMap(s9),V[11]=en,V[12]=u):u=V[12];let eb=u;V[13]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{K({type:"overlay/blur"})},V[13]=c):c=V[13];let ex=c,ew=eg(),eS=ew?U:void 0,[ek,eE]=(0,p.useState)(!1);!ek&&H&&"connected"===B&&eE(!0);t:{let t;if(er){let e;V[14]===Symbol.for("react.memo_cache_sentinel")?(e=[],V[14]=e):e=V[14],f=e;break t}V[15]!==F||V[16]!==eS||V[17]!==es||V[18]!==Q||V[19]!==en||V[20]!==H||V[21]!==er||V[22]!==ew||V[23]!==e.plugins||V[24]!==ek||V[25]!==eo?(t=en.filter(s8).map(t=>{let{id:n,element:r,focused:i,hovered:o,rect:s,sanity:a,dragDisabled:l,targets:u,elementType:c}=t,h=!l&&!!r.getAttribute("data-sanity")&&ew&&en.some(e=>"id"in e.sanity&&"id"in a&&tl(e.sanity,a)&&e.sanity.path!==a.path);return(0,d.jsx)(s_,{comlink:F,componentResolver:eS,plugins:e.plugins,element:r,enableScrollIntoView:!er&&!es&&!Q,id:n,focused:i,hovered:o,node:a,rect:s,showActions:!ek,draggable:h,isDragging:er||es,wasMaybeCollapsed:i&&eo,targets:u,elementType:c,inFrame:H},n)}),V[15]=F,V[16]=eS,V[17]=es,V[18]=Q,V[19]=en,V[20]=H,V[21]=er,V[22]=ew,V[23]=e.plugins,V[24]=ek,V[25]=eo,V[26]=t):t=V[26],f=t}let e_=f,eT=G?"dark":"light",ej=em?"":void 0,eA=ef?"":void 0;return V[27]!==eb||V[28]!==ei?(m=(0,d.jsx)(s4,{documentIds:eb,perspective:ei}),V[27]=eb,V[28]=ei,V[29]=m):m=V[29],V[30]!==F||V[31]!==H||V[32]!==W||V[33]!==ec||V[34]!==el||V[35]!==eh?(g=(0,d.jsx)(s6,{comlink:F,dispatch:K,inFrame:H,inPopUp:W,onDrag:eh,overlayEnabled:ec,rootElement:el}),V[30]=F,V[31]=H,V[32]=W,V[33]=ec,V[34]=el,V[35]=eh,V[36]=g):g=V[36],V[37]!==Z?(y=Z&&(0,d.jsx)(sp,{...Z,onDismiss:ex}),V[37]=Z,V[38]=y):y=V[38],V[39]!==ea||V[40]!==J||V[41]!==es||V[42]!==ee||V[43]!==er?(v=er&&!es&&(0,d.jsxs)(d.Fragment,{children:[J&&(0,d.jsx)(sD,{dragInsertPosition:J}),ee&&(0,d.jsx)(sB,{}),ea&&(0,d.jsx)(s$,{dragGroupRect:ea})]}),V[39]=ea,V[40]=J,V[41]=es,V[42]=ee,V[43]=er,V[44]=v):v=V[44],V[45]!==et||V[46]!==er?(b=er&&et&&(0,d.jsx)(sL,{skeleton:et}
105),V[45]=et,V[46]=er,V[47]=b):b=V[47],V[48]!==e_||V[49]!==ej||V[50]!==eA||V[51]!==m||V[52]!==g||V[53]!==y||V[54]!==v||V[55]!==b||V[56]!==q?(x=(0,d.jsxs)(s3,{"data-fading-out":ej,"data-overlays":eA,ref:eu,$zIndex:q,children:[m,g,y,e_,v,b]}),V[48]=e_,V[49]=ej,V[50]=eA,V[51]=m,V[52]=g,V[53]=y,V[54]=v,V[55]=b,V[56]=q,V[57]=x):x=V[57],V[58]!==F||V[59]!==x?(w=(0,d.jsx)(sK,{comlink:F,children:x}),V[58]=F,V[59]=x,V[60]=w):w=V[60],V[61]!==F||V[62]!==w?(S=(0,d.jsx)(sH,{comlink:F,children:w}),V[61]=F,V[62]=w,V[63]=S):S=V[63],V[64]!==F||V[65]!==en||V[66]!==S?(k=(0,d.jsx)(sY,{comlink:F,elements:en,children:S}),V[64]=F,V[65]=en,V[66]=S,V[67]=k):k=V[67],V[68]!==el||V[69]!==k?(E=(0,d.jsx)(M.XS,{children:(0,d.jsx)(M.GD,{element:el,children:k})}),V[68]=el,V[69]=k,V[70]=E):E=V[70],V[71]!==eT||V[72]!==E?(_=(0,d.jsx)(M.NP,{scheme:eT,theme:M.Qx,tone:"transparent",children:E}),V[71]=eT,V[72]=E,V[73]=_):_=V[73],V[74]!==F||V[75]!==_?(T=(0,d.jsx)(sQ,{comlink:F,children:_}),V[74]=F,V[75]=_,V[76]=T):T=V[76],T}function s8(e){return e.activated||e.focused}function s9(e){return"id"in e.sanity?[e.sanity.id]:[]}function ae(e){return!e}function at(e){return!e}function an(e){return!e}function ar(e){return!e}function ai(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 ao(e){return e()}function as(e){return!e}let aa={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function al(e){return"Alt"===e.key}function au(e,t){return e.filter(e=>e!==t)}let ac=e=>{let t,n,r=(0,h.c)(4),{comlink:i,refresh:o}=e,s=(0,p.useRef)(0),a=(0,p.useRef)(0);return r[0]!==i||r[1]!==o?(t=()=>i.on("presentation/refresh",e=>{if("manual"===e.source){clearTimeout(s.current);let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e);let n=!1;s.current=window.setTimeout(()=>{i.post("visual-editing/refreshed",e),n=!0},3e3),t?.finally?.(()=>{n||(clearTimeout(s.current),i.post("visual-editing/refreshed",e))})}else if("mutation"===e.source){clearTimeout(a.current);let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e),a.current=window.setTimeout(()=>{let t=o(e);!1!==t&&(i.post("visual-editing/refreshing",e),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e))},1e3),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e)}}),n=[i,o],r[0]=i,r[1]=o,r[2]=t,r[3]=n):(t=r[2],n=r[3]),(0,p.useEffect)(t,n),null};function ad(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 ah(){console.warn("[@sanity/visual-editing] Package version mismatch detected: Please update your Sanity studio to prevent potential compatibility issues.")}function af(){}let ap=(0,p.lazy)(()=>n.e(2726).then(n.bind(n,62726))),am=e=>{var t;let n,r,i,o,s,a,l,u,c,g,y,v,b,x,w=(0,h.c)(33),{components:S,plugins:k,history:E,portal:_,refresh:T,zIndex:j,onPerspectiveChange:A}=e,C=void 0===_||_,[I,M]=(0,p.useState)(null),[P,R]=(0,p.useState)(null);w[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{(0,p.startTransition)(()=>{M((0,f.Fk)()),R((0,f.v$)())})},r=[],w[0]=n,w[1]=r):(n=w[0],r=w[1]),(0,p.useEffect)(n,r);let[O,$]=(0,p.useState)(null);w[2]!==C?(i=()=>{if(!1===C)return;let e=document.createElement("sanity-visual-editing");return document.documentElement.appendChild(e),(0,p.startTransition)(()=>$(e)),()=>{(0,p.startTransition)(()=>$(null)),document.documentElement.contains(e)&&document.documentElement.removeChild(e)}},o=[C],w[2]=C,w[3]=i,w[4]=o):(i=w[3],o=w[4]),(0,p.useEffect)(i,o);let[D,N]=function(e){let t,n,r,i,o,s=(0,h.c)(9),a=void 0===e||e,[l,u]=(0,p.useState)(),[c,d]=(0,p.useState)("idle");return s[0]!==a?(t=()=>{if(!a)return;let e=(0,rV.RM)({name:"visual-editing",connectTo:"presentation"},(0,rV.Uc)().provide({actors:(0,f.jF)()})),t=e.onStatus(()=>d("connected"),"connected");(0,p.startTransition)(()=>u(e));let n=e.start();return()=>{t(),n(),(0,p.startTransition)(()=>u(void 0))}},n=[a],s[0]=a,s[1]=t,s[2]=n):(t=s[1],n=s[2]),(0,p.useEffect)(t,n),s[3]!==c?(r=()=>{if("connected"===c)return;let e=new AbortController;return window.addEventListener("message",ad,{signal:e.signal}),()=>{e.abort()}},i=[c],s[3]=c,s[4]=r,s[5]=i):(r=s[4],i=s[5]),(0,p.useEffect)(r,i),s[6]!==l||s[7]!==c?(o=[l,c],s[6]=l,s[7]=c,s[8]=o):o=s[8],o}(!0===I||!0===P);t="connected"===N?D:void 0,(x=(0,h.c)(3))[0]!==t?(v=()=>{let e,n,r,i;if(!t)return;let o=(e=new rZ(1),n=new rG,t.fetch("visual-editing/snapshot-welcome",void 0,{suppressWarnings:!0}).then(t=>{e.next(t.event)}).catch(()=>{}
105),t.on("presentation/snapshot-event",t=>{"reconnect"===t.event.type&&e.next(t.event),"mutation"===t.event.type&&n.next(t.event)}),iu(e,n)),s=oQ.provide({actors:{documentMutatorMachine:(r=(0,ee.Sx)(async({input:e,signal:n})=>{let{id:r}=e,{snapshot:i}=await t.fetch("visual-editing/fetch-snapshot",{documentId:r},{signal:n});return i}),i=(0,ee.Sx)(async({input:e})=>{let{transactions:n}=e;for(let e of n){let n=Q.encodeTransaction(e);return t.post("visual-editing/mutate",n)}}),oZ.provide({actions:{"send sync event to parent":(0,oX.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":r,"submit mutations as transactions":i}}))}}),a=(0,rF.c)(s,{input:{client:{withConfig:af},sharedListener:o}});a.start();let l=new AbortController;return t.fetch("visual-editing/features",void 0,{signal:l.signal,suppressWarnings:!0}).then(e=>{e.features.optimistic&&function(e){for(let t of(en=e,er))t()}(a)}).catch(ah),()=>{a.stop(),l.abort()}},b=[t],x[0]=t,x[1]=v,x[2]=b):(v=x[1],b=x[2]),(0,p.useEffect)(v,b);let L=(0,p.useDeferredValue)((0,p.useSyncExternalStore)(o9,se,ag),!1);w[5]!==N||w[6]!==I||w[7]!==P?(s=()=>{if("connected"===N)o2(P?"presentation-window":"presentation-iframe");else if(I||P){let e=setTimeout(ay,1e3);return()=>{clearTimeout(e),o2(null)}}else o2("standalone");return av},a=[N,P,I],w[5]=N,w[6]=I,w[7]=P,w[8]=s,w[9]=a):(s=w[8],a=w[9]),(0,p.useEffect)(s,a),w[10]!==D||w[11]!==N||w[12]!==S||w[13]!==I||w[14]!==P||w[15]!==A||w[16]!==k||w[17]!==j?(l=null!==I&&null!==P&&(0,d.jsx)(s7,{comlink:D,comlinkStatus:N,componentResolver:S,onPerspectiveChange:A,plugins:k,inFrame:I,inPopUp:P,zIndex:j}),w[10]=D,w[11]=N,w[12]=S,w[13]=I,w[14]=P,w[15]=A,w[16]=k,w[17]=j,w[18]=l):l=w[18],w[19]!==D||w[20]!==E||w[21]!==T?(u=D&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o3,{comlink:D,history:E}),(0,d.jsx)(st,{comlink:D}),T&&(0,d.jsx)(ac,{comlink:D,refresh:T})]}),w[19]=D,w[20]=E,w[21]=T,w[22]=u):u=w[22],w[23]!==N||w[24]!==L?(c="connected"===N&&L&&(0,d.jsx)(p.Suspense,{children:(0,d.jsx)(ap,{})}),w[23]=N,w[24]=L,w[25]=c):c=w[25],w[26]!==l||w[27]!==u||w[28]!==c?(g=(0,d.jsxs)(d.Fragment,{children:[l,u,c]}),w[26]=l,w[27]=u,w[28]=c,w[29]=g):g=w[29];let z=g;return!1!==C&&O?(w[30]!==z||w[31]!==O?(y=(0,m.createPortal)(z,O),w[30]=z,w[31]=O,w[32]=y):y=w[32],y):z};function ag(){return!1}function ay(){return o2("standalone")}function av(){return o2(null)}am.displayName="VisualEditing"},90379:(e,t,n)=>{var r=n(95170),i=n(36777),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable;e.exports=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")}},90684:e=>{e.exports=function(e){return this.__data__.has(e)}},90756:(e,t,n)=>{var r=n(8570);e.exports=function(e){return r(this.__data__,e)>-1}},90890:(e,t,n)=>{e.exports=n(67374)["__core-js_shared__"]},91037:(e,t,n)=>{var r=n(22416),i=n(69011),o=n(32501);e.exports=function(e){return r(e,o,i)}},91344:(e,t,n)=>{var r=n(8570);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},91450:(e,t,n)=>{"use strict";n.d(t,{me:()=>ex,sR:()=>eS,JW:()=>_});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"}}},s={sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},a={textWeight:"medium",border:{width:1},focusRing:{offset:-1,width:1}},l={border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},u=[320,640,960,1280,1600,1920],c=[360,600,900,1200,1800,2400],d={dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},h=[0,1,3,6,9,12,21],f=[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]}],p=[0,4,8,12,20,32,52,84,136,220],m={border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}}
105,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}}},g={button:{root:{transition:"background-color 100ms,border-color 100ms,color 100ms"}}},y={code:{family:"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:19,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:22,iconSize:33,lineHeight:31,letterSpacing:0}]},heading:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:700,medium:800,semibold:900,bold:900},sizes:[{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:17,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:21,iconSize:33,lineHeight:29,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:27,iconSize:41,lineHeight:35,letterSpacing:0},{ascenderHeight:9.5,descenderHeight:8.5,fontSize:33,iconSize:49,lineHeight:41,letterSpacing:0},{ascenderHeight:10.5,descenderHeight:9.5,fontSize:38,iconSize:53,lineHeight:47,letterSpacing:0}]},label:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", system-ui, sans-serif',weights:{regular:600,medium:700,semibold:800,bold:900},sizes:[{ascenderHeight:2,descenderHeight:2,fontSize:8.1,iconSize:13,lineHeight:10,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:9.5,iconSize:15,lineHeight:11,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:10.8,iconSize:17,lineHeight:12,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:12.25,iconSize:19,lineHeight:13,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:13.6,iconSize:21,lineHeight:14,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:15,iconSize:23,lineHeight:15,letterSpacing:.5}]},text:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:15,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:18,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:21,iconSize:33,lineHeight:31,letterSpacing:0}]}},v=new WeakMap;function b(e){let t=v.get(e);if(t)return t;let n=w(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:x(e,e.button.default),ghost:x(e,e.button.ghost),bleed:x(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:S(e.input.default),invalid:S(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:x(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 v.set(e,r),r}function x(e,t){return{default:{enabled:w(e,t.default.enabled),hovered:w(e,t.default.hovered),pressed:w(e,t.default.pressed),selected:w(e,t.default.selected),disabled:w(e,t.default.disabled)},neutral:{enabled:w(e,t.default.enabled),hovered:w(e,t.default.hovered),pressed:w(e,t.default.pressed),selected:w(e,t.default.selected),disabled:w(e,t.default.disabled)},primary:{enabled:w(e,t.primary.enabled),hovered:w(e,t.primary.hovered),pressed:w(e,t.primary.pressed),selected:w(e,t.primary.selected),disabled:w(e,t.primary.disabled)},suggest:{enabled:w(e,t.primary.enabled),hovered:w(e,t.primary.hovered),pressed:w(e,t.primary.pressed),selected:w(e,t.primary.selected),disabled:w(e,t.primary.disabled)},positive:{enabled:w(e,t.positive.enabled),hovered:w(e,t.positive.hovered),pressed:w(e,t.positive.pressed),selected:w(e,t.positive.selected),disabled:w(e,t.positive.disabled)},caution:{enabled:w(e,t.caution.enabled),hovered:w(e,t.caution.hovered),pressed:w(e,t.caution.pressed),selected:w(e,t.caution.selected),disabled:w(e,t.caution.disabled)},critical:{enabled:w(e,t.critical.enabled),hovered:w(e,t.critical.hovered),pressed:w(e,t.critical.pressed),selected:w(e,t.critical.selected),disabled:w(e,t.critical.disabled)}}}function w(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}
105,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 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,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let E=new WeakMap;function _(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=E.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...s,...e.sanity.avatar},button:{...a,...e.sanity.button},card:l,color:b(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...m,...e.sanity.input,checkbox:{...m.checkbox,...e.sanity.input.checkbox},radio:{...m.radio,...e.sanity.input.radio},switch:{...m.switch,...e.sanity.input.switch}},layer:e.sanity.layer??d,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return E.set(e,n),n}function T(e){return 2===e._version}let j=new WeakMap,A=new WeakMap;function C(e){let t=A.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,font:s,input:a,media:l,radius:u,shadow:c,space:d,style:h}=e;return{_version:0,avatar:n,button:r,container:o,color:{light:{transparent:I(i.light.transparent),default:I(i.light.default),primary:I(i.light.primary),positive:I(i.light.positive),caution:I(i.light.caution),critical:I(i.light.critical)},dark:{transparent:I(i.dark.transparent),default:I(i.dark.default),primary:I(i.dark.primary),positive:I(i.dark.positive),caution:I(i.dark.caution),critical:I(i.dark.critical)}},focusRing:a.text.focusRing,fonts:s,input:a,media:l,radius:u,shadows:c,space:d,styles:h,v2:e}}function I(e){return{base:{bg:e.bg,fg:e.fg,border:e.border,focusRing:e.focu
105sRing,shadow:e.shadow},button:e.button,card:e.selectable.default,dark:e._dark,input:{default:M(e.input.default),invalid:M(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 M(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,bg2:e.muted.bg,border:e.border,fg:e.fg,placeholder:e.placeholder}}let R=["multiply","screen"],O=["transparent","default","neutral","primary","suggest","positive","caution","critical"],$=["default","neutral","primary","suggest","positive","caution","critical"],D=["enabled","hovered","pressed","selected","disabled"],N=["default","ghost","bleed"],L=["default","invalid"],z=["enabled","hovered","readOnly","disabled"];function V(e){return i.includes(e)}function F(e){return/^\d+%$/.test(e)}function B(e){var t;let n=e.split("/"),i=n.shift()||"",[o,s]=i.split(" ");if(V(o)){let e=n.shift()||"";return F(s)?{type:"color",tint:o,mix:Number(s.slice(0,-1))/100}:U(e)?{type:"color",tint:o,opacity:Number(e)}:{type:"color",tint:o}}if("black"===(t=o)||"white"===t){let e=n.shift()||"";return F(s)?{type:"color",key:o,mix:Number(s.slice(0,-1))/100}:U(e)?{type:"color",key:o,opacity:Number(e)}:{type:"color",key:o}}if(r.includes(o)){let[e,t]=(i=n.shift()||"").split(" ");if(V(e)){let r=n.shift()||"";return F(t)?{type:"color",hue:o,tint:e,mix:Number(t.slice(0,-1))/100}:U(r)?{type:"color",hue:o,tint:e,opacity:Number(r)}:{type:"color",hue:o,tint:e}}return{type:"hue",value:o}}if(R.includes(o))return{type:"blendMode",value:o}}function U(e){return"0"===e||/^0\.[0-9]+$/.test(e)||"1"===e}[...r],[...O],[...$],[...D],[...L],[...z];let H=["500","500"];function W(e,t=H){var n;let r,{hue:i,scheme:o}=e,s=B(t[+("light"!==o)]);if(!s||"color"!==s.type)throw Error(`Invalid color token: ${t[0]}`);return n={...s,hue:s.hue||i},r="",r="black"===n.key||"white"===n.key?n.key:`${n.hue}/${n.tint}`,void 0!==n.mix?`${r} ${100*n.mix}%`:(void 0!==n.opacity&&(r+=`/${n.opacity}`),r)}let q={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"]}}
105,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
105data:["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 Y(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}function G(...e){let t=e.filter(Boolean);return 0===t.length?{}:t.reduce(X,{})}function X(e,t){for(let n of Object.keys(t)){let r=e[n],i=t[n];Y(r)&&Y(i)?e[n]=G(r,i):e[n]=i}return e}function K(e,t){let{scheme:n}=e,r={};for(let e of O)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:W(o,i?.accent?.fg)},avatar:Z({scheme:n},i),backdrop:W(o,i?.backdrop),badge:Q(i?.badge,{scheme:n},t),bg:W(o,i?.bg),border:W(o,i?.border),button:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of N)i[e]=function(e,t){let{cardTone:n,mode:r,scheme:i}=e,o={};for(let e of $)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:i,tone:o}=e,s={};for(let e of D)s[e]=function(e,t){let{cardTone:n,mode:r,tone:i,scheme:o,state:s}=e,a=t?.color?.base?.[n],l=t?.color?.button?.[r]?.[i]?.[s],u=l?._hue||a?._hue||"gray",c=l?._blend||["screen","multiply"],d={hue:u,scheme:o};return{_blend:c[+("light"!==o)],accent:{fg:W(d,l?.accent?.fg)},avatar:Z({scheme:o},l),badge:Q(l?.badge,{scheme:o},t),bg:W(d,l?.bg),border:W(d,l?.border),code:{bg:W(d,l?.code?.bg),fg:W(d,l?.code?.fg)},fg:W(d,l?.fg),icon:W(d,l?.icon),muted:{bg:W(d,l?.muted?.bg),fg:W(d,l?.muted?.fg)},kbd:{bg:W(d,l?.kbd?.bg),fg:W(d,l?.kbd?.fg),border:W(d,l?.kbd?.border)},link:{fg:W(d,l?.link?.fg)},skeleton:{from:W(d,l?.skeleton?.from),to:W(d,l?.skeleton?.to)}}}({cardTone:n,mode:r,tone:o,scheme:i,state:e},t);return s}({cardTone:n,mode:r,scheme:i,tone:e},t);return o}({cardTone:r,scheme:n,mode:e},t);return i}({scheme:n,tone:r},t),code:{bg:W(o,i?.code?.bg),fg:W(o,i?.code?.fg)},fg:W(o,i?.fg),focusRing:W(o,i?.focusRing),icon:W(o,i?.icon),input:function(e,t){let{scheme:n,tone:r}=e;return{default:ee({mode:"default",scheme:n,tone:r},t),invalid:ee({mode:"invalid",scheme:n,tone:r},t)}}({scheme:n,tone:r},t),kbd:{bg:W(o,i?.kbd?.bg),fg:W(o,i?.kbd?.fg),border:W(o,i?.kbd?.border)},link:{fg:W(o,i?.link?.fg)},muted:{bg:W(o,i?.muted?.bg),fg:W(o,i?.muted?.fg)},selectable:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of $)i[e]=function(e,t){let{cardTone:n,scheme:r,tone:i}=e,o={};for(let e of D)o[e]=function(e,t){let{cardTone:n,scheme:r,state:i,tone:o}=e,s=t?.color?.base?.[n],a=t?.color?.selectable?.[o]?.[i],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:r};return{_blend:u[+("light"!==r)],accent:{fg:W(c,a?.accent?.fg)},avatar:Z({scheme:r},a),badge:Q(a?.badge,{scheme:r},t),bg:W(c,a?.bg),border:W(c,a?.border),code:{bg:W(c,a?.code?.bg),fg:W(c,a?.code?.fg)},fg:W(c,a?.fg),icon:W(c,a?.icon),muted:{bg:W(c,a?.muted?.bg),fg:W(c,a?.muted?.fg)},kbd:{bg:W(c,a?.kbd?.bg),fg:W(c,a?.kbd?.fg),border:W(c,a?.kbd?.border)},link:{fg:W(c,a?.link?.fg)},skeleton:{from:W(c,a?.skeleton?.from),to:W(c,a?.skeleton?.to)}}}({cardTone:n,tone:i,scheme:r,state:e},t);return o}({cardTone:r,scheme:n,tone:e},t);return i}({scheme:n,tone:r},t),shadow:function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{outline:W(o,i?.shadow?.outline),umbra:W(o,i?.shadow?.umbra),penumbra:W(o,i?.shadow?.penumbra),ambient:W(o,i?.shadow?.ambient)}}
105({scheme:n,tone:r},t),skeleton:{from:W(o,i?.skeleton?.from),to:W(o,i?.skeleton?.to)},syntax:function(e,t){let{scheme:n}=e,r=t?.color?.syntax,i={hue:"gray",scheme:n};return{atrule:W(i,r?.atrule),attrName:W(i,r?.attrName),attrValue:W(i,r?.attrValue),attribute:W(i,r?.attribute),boolean:W(i,r?.boolean),builtin:W(i,r?.builtin),cdata:W(i,r?.cdata),char:W(i,r?.char),class:W(i,r?.class),className:W(i,r?.className),comment:W(i,r?.comment),constant:W(i,r?.constant),deleted:W(i,r?.deleted),doctype:W(i,r?.doctype),entity:W(i,r?.entity),function:W(i,r?.function),hexcode:W(i,r?.hexcode),id:W(i,r?.id),important:W(i,r?.important),inserted:W(i,r?.inserted),keyword:W(i,r?.keyword),number:W(i,r?.number),operator:W(i,r?.operator),prolog:W(i,r?.prolog),property:W(i,r?.property),pseudoClass:W(i,r?.pseudoClass),pseudoElement:W(i,r?.pseudoElement),punctuation:W(i,r?.punctuation),regex:W(i,r?.regex),selector:W(i,r?.selector),string:W(i,r?.string),symbol:W(i,r?.symbol),tag:W(i,r?.tag),unit:W(i,r?.unit),url:W(i,r?.url),variable:W(i,r?.variable)}}({scheme:n},t)}}({scheme:n,tone:e},t);return r}function Z(e,t){let{scheme:n}=e;return{gray:J({color:"gray",scheme:n},t),blue:J({color:"blue",scheme:n},t),purple:J({color:"purple",scheme:n},t),magenta:J({color:"magenta",scheme:n},t),red:J({color:"red",scheme:n},t),orange:J({color:"orange",scheme:n},t),yellow:J({color:"yellow",scheme:n},t),green:J({color:"green",scheme:n},t),cyan:J({color:"cyan",scheme:n},t)}}function J(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:W(o,i?.bg),fg:W(o,i?.fg)}}function Q(e,t,n){let{scheme:r}=t,i={};for(let t of $)i[t]=function(e,t,n){let{scheme:r,tone:i}=t,o=e?.[i],s={hue:o?._hue||n?.color?.base?.[i]?._hue||"gray",scheme:r};return{bg:W(s,o?.bg),fg:W(s,o?.fg),dot:W(s,o?.dot),icon:W(s,o?.icon)}}(e,{scheme:r,tone:t},n);return i}function ee(e,t){let{mode:n,scheme:r,tone:i}=e;return{enabled:et({mode:n,scheme:r,state:"enabled",cardTone:i},t),hovered:et({mode:n,scheme:r,state:"hovered",cardTone:i},t),readOnly:et({mode:n,scheme:r,state:"readOnly",cardTone:i},t),disabled:et({mode:n,scheme:r,state:"disabled",cardTone:i},t)}}function et(e,t){let{cardTone:n,mode:r,scheme:i,state:o}=e,s=t?.color?.base?.[n],a=t?.color?.input?.[r]?.[o],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:i};return{_blend:u[+("light"!==i)],bg:W(c,a?.bg),border:W(c,a?.border),fg:W(c,a?.fg),muted:{bg:W(c,a?.muted?.bg)},placeholder:W(c,a?.placeholder)}}function en(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function er(e,t,n,r,i){var o;return n*(1-(o=en((i-e)/(t-e))))+r*o}function ei(e){return Math.round(e)}function eo(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 es(e){let t=ei(en(Math.round(e.r),0,255)),n=ei(en(Math.round(e.g),0,255)),r=ei(en(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 ea=/hsl\(\s*(\d+)\s*,\s*((\d+(?:\.\d+)?)%)\s*,\s*((\d+(?:\.\d+)?)%)\s*\)/i;function el(e){var t;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 eo(e);if(e.startsWith("hsl(")){let n,r,i,o,s,a,l,u;return n=(t=function(e){let t=ea.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)).s/100,o=(i=(1-Math.abs(2*(r=t.l/100)-1))*n)*(1-Math.abs(t.h/60%2-1)),s=r-i/2,a=0,l=0,u=0,0<=t.h&&t.h<60?(a=i,l=o,u=0):60<=t.h&&t.h<120?(a=o,l=i,u=0):120<=t.h&&t.h<180?(a=0,l=i,u=o):180<=t.h&&t.h<240?(a=0,l=o,u=i):240<=t.h&&t.h<300?(a=o,l=0,u=i):300<=t.h&&t.h<360&&(a=i,l=0,u=o),{r:Math.round((a+s)*255),g:Math.round((l+s)*255),b:Math.round((u+s)*255)}}if(e.startsWith("rgba(")){let t;return{r:parseInt((t=e.replace(/rgba\(|\)/g,"").split(","))[0]),g:parseInt(t[1]),b:parseInt(t[2]),a:parseFloat(t[3])}}throw Error(`parseColor: unexpected color format: "${e}"`)}let eu=[0,255];function ec(e,t){var n,r,i,o,s,a,l,u,c;let d,{bg:h,blendMode:f,colorPalette:p}=t;if("white"===h)throw Error("Cannot blend with white background");let m=B(e);if(!m||"color"!==m.type)throw Error(`Invalid color token value: ${e}`);let g="";if("black"===m.key&&(g=ed(p.black)),"white"===m.key&&(g=ed(p.white)),m.hue&&m.tint&&(g=ed(p[m.hue][m.tint])),!g)throw Error(`Invalid color token value: ${e}`);let y=g,v={blendMode:f,bg:h,black:ed(p.black),white:ed(p.white)};try{if(g=function(e,t){var n,r,i,o,s,a;let{blendMode:l}=t,u=el(e),c=el(t.black),d=el(t.white),h=t.bg?el(t.bg):"multiply"===l?d:c,f={r:[c.r,d.r],g:[c.g,d.g],b:[c.b,d.b]},p={r:en(er(...f.r,...eu,h.r),...eu),g:en(er(...f.g,...eu,h.g),...eu),b:en(er(...f.b,...eu,h.b),...eu)},m={r:en(er(...f.r,...eu,u.r),...eu),g:en(er(...f.g,...eu,u.g),...eu),b:en(er(...f.b,...eu,u.b),...eu)},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*((s=p.b/255)+(a=m.b/255)-s*a)};return es({r:en(er(...eu,...f.r,g.r),...f.r),g:en(er(...eu,...f.g,g.g),...f.g),b:en(er(...eu,...f.b,g.b),...f.b)})}(g,v),h&&void 0!==m.mix){let e=eo(h),t=eo(g);g=es((n=m.mix,{r:(r=e.r,i=t.r,r+(i-r)*n),g:(o=e.g,s=t.g,o+(s-o)*n),b:(a=e.b,l=t.b,a+(l-a)*n)}))}}catch(e){throw console.warn("could not blend",g,v),e}
105return"#aN"===g&&(console.warn(`invalid color token value: ${e}`),g=y),void 0!==m.opacity&&(u=g,c=m.opacity,d=el(u),g=`rgba(${d.r},${d.g},${d.b},${c})`),g}function ed(e){return"string"==typeof e?e:e.hex}function eh(e,t){let n=Object.entries(t),[,r]=n.find(([e])=>"transparent"===e),[,i]=n.find(([e])=>"default"===e),o=ef(r,{colorPalette:e}),s=ef(i,{colorPalette:e}),a=s.bg;if("white"===a)throw Error("Cannot blend with white background");return Object.fromEntries([["transparent",o],["default",s],...n.filter(([e])=>"default"!==e&&"transparent"!==e).map(([t,n])=>[t,ef(n,{bg:a,colorPalette:e})])])}function ef(e,t){var n,r,i,o;let{colorPalette:s,bg:a}=t,l=e._blend||"multiply",u=ec(e.bg,{colorPalette:s,bg:a,blendMode:l}),c={colorPalette:s,bg:u,blendMode:l},d=(n=e.button,r={baseBg:u,blendMode:l,colorPalette:s},{default:eg(n.default,r),ghost:eg(n.ghost,r),bleed:eg(n.bleed,r)}),h=function(e,t){let n={};for(let o of $){var r,i;n[o]=(r=e[o],i=t,{enabled:ey(r.enabled,i),hovered:ey(r.hovered,i),pressed:ey(r.pressed,i),selected:ey(r.selected,i),disabled:ey(r.disabled,i)})}return n}(e.selectable,{colorPalette:s,baseBg:u,blendMode:l}),f={outline:ec(e.shadow.outline,c),umbra:ec(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),penumbra:ec(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),ambient:ec(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}})};return{_blend:l,_dark:e._dark,accent:{fg:ec(e.accent.fg,c)},avatar:ep(e.avatar,{baseBg:u,colorPalette:s,blendMode:l}),backdrop:ec(e.backdrop,c),badge:em(e.badge,{baseBg:u,colorPalette:s,blendMode:l}),bg:u,border:ec(e.border,c),button:d,code:{bg:ec(e.code.bg,c),fg:ec(e.code.fg,c)},fg:ec(e.fg,c),focusRing:ec(e.focusRing,c),icon:ec(e.icon,c),input:(i=e.input,o={baseBg:u,colorPalette:s,blendMode:l},{default:ev(i.default,o),invalid:ev(i.invalid,o)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=ec(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,fg:ec(e.fg,s),border:ec(e.border,s)}}(e.kbd,{baseBg:u,colorPalette:s,blendMode:l}),link:{fg:ec(e.link.fg,c)},muted:{bg:ec(e.muted.bg,c),fg:ec(e.muted.fg,c)},shadow:f,skeleton:{from:ec(e.skeleton.from,c),to:ec(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:ec(e.atrule,o),attrName:ec(e.attrName,o),attrValue:ec(e.attrValue,o),attribute:ec(e.attribute,o),boolean:ec(e.boolean,o),builtin:ec(e.builtin,o),cdata:ec(e.cdata,o),char:ec(e.char,o),class:ec(e.class,o),className:ec(e.className,o),comment:ec(e.comment,o),constant:ec(e.constant,o),deleted:ec(e.deleted,o),doctype:ec(e.doctype,o),entity:ec(e.entity,o),function:ec(e.function,o),hexcode:ec(e.hexcode,o),id:ec(e.id,o),important:ec(e.important,o),inserted:ec(e.inserted,o),keyword:ec(e.keyword,o),number:ec(e.number,o),operator:ec(e.operator,o),prolog:ec(e.prolog,o),property:ec(e.property,o),pseudoClass:ec(e.pseudoClass,o),pseudoElement:ec(e.pseudoElement,o),punctuation:ec(e.punctuation,o),regex:ec(e.regex,o),selector:ec(e.selector,o),string:ec(e.string,o),symbol:ec(e.symbol,o),tag:ec(e.tag,o),unit:ec(e.unit,o),url:ec(e.url,o),variable:ec(e.variable,o)}}(e.syntax,{baseBg:u,colorPalette:s,blendMode:l}),selectable:h}}function ep(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",s=ec(e.bg,{bg:n,blendMode:r,colorPalette:i});return{_blend:o,bg:s,fg:ec(e.fg,{bg:s,blendMode:o,colorPalette:i})}}(e[i],t);return n}function em(e,t){let n={};for(let r of $)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=ec(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,dot:ec(e.dot,s),fg:ec(e.fg,s),icon:ec(e.icon,s)}}(e[r],t);return n}function eg(e,t){let n={};for(let o of $){var r,i;n[o]=(r=e[o],i=t,{enabled:ey(r.enabled,i),hovered:ey(r.hovered,i),pressed:ey(r.pressed,i),selected:ey(r.selected,i),disabled:ey(r.disabled,i)})}return n}function ey(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=ec(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:s,blendMode:o,colorPalette:i};return{_blend:o,accent:{fg:ec(e.accent.fg,a)},avatar:ep(e.avatar,{baseBg:s,colorPalette:i,blendMode:o}),badge:em(e.badge,{baseBg:s,colorPalette:i,blendMode:o}),bg:s,border:ec(e.border,a),code:{bg:ec(e.code.bg,a),fg:ec(e.code.fg,a)},fg:ec(e.fg,a),icon:ec(e.icon,a),link:{fg:ec(e.link.fg,a)},muted:{bg:ec(e.muted.bg,a),fg:ec(e.muted.fg,a)},kbd:{bg:ec(e.kbd.bg,a),fg:ec(e.kbd.fg,a),border:ec(e.kbd.border,a)},skeleton:{from:ec(e.skeleton?.from,a),to:ec(e.skeleton?.to,a)}}}function ev(e,t){return{enabled:eb(e.enabled,t),hovered:eb(e.hovered,t),readOnly:eb(e.readOnly,t),disabled:eb(e.disabled,t)}}function eb(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=ec(e.bg,{colorPalette:i,bg:n,blendMode:r}),a={colorPalette:i,bg:s,blendMode:o};return{_blend:o,bg:s,border:ec(e.border,a),fg:ec(e.fg,a),muted:{bg:ec(e.muted.bg,a)},placeholder:ec(e.placeholder,a)}}function ex(e){var t;let n,i,v,b=(t=e,{light:K({scheme:"light"}
105,i={color:{base:function(e){let t={};for(let n of O)t[n]=function(e,t){let n=G(e?.base?.["*"],e?.base?.[t]),i=n._hue||e?.base?.[t]?._hue||"gray";return{...n,_hue:i,avatar:r.reduce((e,t)=>({...e,[t]:G({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:$.reduce((t,r)=>({...t,[r]:{_hue:e?.base?.[r]?._hue||i,...n.badge?.["*"],...n.badge?.[r]}}),{})}}(e,n);return t}(n=G(q,t?.color)),button:function(e){let t={};for(let n of N)t[n]=function(e,t){let n={};for(let i of $)n[i]=function(e,t,n){let i={};for(let o of D)i[o]=function(e,t,n,i){let o=G(e?.button?.[n]?.["*"]?.["*"],e?.button?.[n]?.[t]?.["*"],e?.button?.[n]?.["*"]?.[i],e?.button?.[n]?.[t]?.[i]),s=o._hue||e?.base?.[t]?._hue;return{...o,_hue:s,avatar:r.reduce((e,t)=>({...e,[t]:G({_hue:t},o.avatar?.["*"],o.avatar?.[t])}),{}),badge:$.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||s,...o.badge?.["*"],...o.badge?.[n]}}),{})}}(e,n,t,o);return i}(e,t,i);return n}(e,n);return t}(n),input:function(e){let t={};for(let n of L)t[n]=function(e,t){let n={};for(let r of z)n[r]=function(e,t,n){let r=G(e?.input?.["*"]?.["*"],e?.
105input?.[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}(n),selectable:function(e){let t={};for(let n of $)t[n]=function(e,t){let n={_hue:e?.selectable?.[t]?._hue||e?.base?.[t]?._hue};for(let i of D)n[i]=function(e,t,n){let i=G(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]:G({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:$.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||o,...i.badge?.["*"],...i.badge?.[n]}}),{})}}(e,t,i);return n}(e,n);return t}(n),syntax:n.syntax}}),dark:K({scheme:"dark"},i)});return C({_version:2,avatar:e?.avatar??s,button:e?.button??a,card:e?.card??l,color:{light:eh(v=e?.palette??o,b.light),dark:eh(v,b.dark)},container:e?.container??u,font:e?.font??y,input:e?.input??m,layer:e?.layer??d,media:e?.media??c,radius:e?.radius??h,shadow:e?.shadow??f,space:e?.space??p,style:e?.style??g})}let ew=new Map;function eS(e,t,n){var r,i,o,u,c;let h,f=function(e,t,n){let r=ew.get(t);if(!r)return;let i=r.get(n);if(i)return i.get(e)}(e,t,n);if(f)return f;let p=T(e)?C(e):e,g=T(e)?e:function(e){if(e.v2)return e.v2;let t=j.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,fonts:u,input:c,layer:h,media:f,radius:p,shadows:g,space:y,styles:v}=e,x={_version:2,avatar:{...s,...n},button:{...a,...r},card:l,color:{light:{transparent:b(i.light.transparent),default:b(i.light.default),neutral:b(i.light.transparent),primary:b(i.light.primary),suggest:b(i.light.primary),positive:b(i.light.positive),caution:b(i.light.caution),critical:b(i.light.critical)},dark:{transparent:b(i.dark.transparent),default:b(i.dark.default),neutral:b(i.dark.transparent),primary:b(i.dark.primary),suggest:b(i.dark.primary),positive:b(i.dark.positive),caution:b(i.dark.caution),critical:b(i.dark.critical)}},container:o,font:u,input:{...m,...c,checkbox:{...m.checkbox,...c.checkbox},radio:{...m.radio,...c.radio},switch:{...m.switch,...c.switch}},layer:h??d,media:f,radius:p,shadow:g,space:y,style:v};return j.set(e,x),x}(e),y=p.color[t]||p.color.light,v=y[n]||y.default,x=p.layer||d,w=g.color[t]||g.color.light,S="neutral"in(r=w[n]||w.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}},k=g.layer||d,E={sanity:{...p,color:v,layer:x,v2:{...g,_resolved:!0,color:S,layer:k}}};return i=e,o=t,u=n,c=E,ew.has(o)||ew.set(o,new Map),(h=ew.get(o)).has(u)||h.set(u,new WeakMap),h.get(u).set(i,c),E}},92028:e=>{e.exports=function(e,t){return e.has(t)}},92427:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});var r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},93222:(e,t,n)=>{"use strict";function r(){}n.d(t,{l:()=>r})},94279:(e,t,n)=>{var r=n(70825);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},95170:(e,t,n)=>{var r=n(39463),i=n(36777);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},95422:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},96211:(e,t,n)=>{var r,i=n(90890),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},97192:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});var r="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},98098:e=>{e.exports=function(e){return this.__data__.get(e)}},98219:(e,t,n)=>{var r=n(36845);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},98644:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});var r=n(97192),i=n(43734);function o(e){return(0,i.T)(null==e?void 0:e[r.l])}},98881:(e,t,n)=>{var r=n(39463),i=n(36777);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}}
105,98928:(e,t,n)=>{"use strict";let r,i,o;n.d(t,{PY1:()=>oL});let s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],a=new Set([...s,"pathRotation"]),l=(e,t,n)=>n>t?t:n<e?e:n,u={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},c={...u,transform:e=>l(0,1,e)},d={...u,default:1},h=e=>Math.round(1e5*e)/1e5,f=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,p=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,m=(e,t)=>n=>!!("string"==typeof n&&p.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),g=(e,t,n)=>r=>{if("string"!=typeof r)return r;let[i,o,s,a]=r.match(f);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},y={...u,transform:e=>Math.round(l(0,255,e))},v={test:m("rgb","red"),parse:g("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+y.transform(e)+", "+y.transform(t)+", "+y.transform(n)+", "+h(c.transform(r))+")"},b={test:m("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:v.transform},x=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),w=x("deg"),S=x("%"),k=x("px"),E=x("vh"),_=x("vw"),T={...S,parse:e=>S.parse(e)/100,transform:e=>S.transform(100*e)},j={test:m("hsl","hue"),parse:g("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+S.transform(h(t))+", "+S.transform(h(n))+", "+h(c.transform(r))+")"},A={test:e=>v.test(e)||b.test(e)||j.test(e),parse:e=>v.test(e)?v.parse(e):j.test(e)?j.parse(e):b.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?v.transform(e):j.transform(e),getAnimatableNone:e=>{let t=A.parse(e);return t.alpha=0,A.transform(t)}},C=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,I="number",M="color",P=/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 R(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,s=t.replace(P,e=>(A.test(e)?(r.color.push(o),i.push(M),n.push(A.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(I),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:s,indexes:r,types:i}}function O({split:e,types:t}){let n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],void 0!==r[o]){let e=t[o];e===I?i+=h(r[o]):e===M?i+=A.transform(r[o]):i+=r[o]}return i}}let $={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(f)?.length||0)+(e.match(C)?.length||0)>0},parse:function(e){return R(e).values},createTransformer:function(e){return O(R(e))},getAnimatableNone:function(e){let t=R(e);return O(t)(t.values.map((e,n)=>((e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof e?0:A.test(e)?A.getAnimatableNone(e):e)(e,t.split[n])))}},D=new Set(["brightness","contrast","saturate","opacity"]);function N(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(f)||[];if(!r)return e;let i=n.replace(r,""),o=+!!D.has(t);return r!==n&&(o*=100),t+"("+o+i+")"}let L=/\b([a-z-]*)\(.*?\)/gu,z={...$,getAnimatableNone:e=>{let t=e.match(L);return t?t.map(N).join(" "):e}},V={...$,getAnimatableNone:e=>{let t=$.parse(e);return $.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},F={...u,transform:Math.round},B={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,inset:k,insetBlock:k,insetBlockStart:k,insetBlockEnd:k,insetInline:k,insetInlineStart:k,insetInlineEnd:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,paddingBlock:k,paddingBlockStart:k,paddingBlockEnd:k,paddingInline:k,paddingInlineStart:k,paddingInlineEnd:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,marginBlock:k,marginBlockStart:k,marginBlockEnd:k,marginInline:k,marginInlineStart:k,marginInlineEnd:k,fontSize:k,backgroundPositionX:k,backgroundPositionY:k,rotate:w,pathRotation:w,rotateX:w,rotateY:w,rotateZ:w,scale:d,scaleX:d,scaleY:d,scaleZ:d,skew:w,skewX:w,skewY:w,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:c,originX:T,originY:T,originZ:k,zIndex:F,fillOpacity:c,strokeOpacity:c,numOctaves:F},U={...B,color:A,backgroundColor:A,outlineColor:A,fill:A,stroke:A,borderColor:A,borderTopColor:A,borderRightColor:A,borderBottomColor:A,borderLeftColor:A,filter:z,WebkitFilter:z,mask:V,WebkitMask:V},H=e=>U[e],W=()=>({translate:0,scale:1,origin:0,originPoint:0}),q=()=>({x:W(),y:W()}),Y=()=>({min:0,max:0}),G=()=>({x:Y(),y:Y()}),X=e=>!!(e&&e.getVelocity),K=new Set(["width","height","top","left","right","bottom",...s]),Z=e=>t=>t.test(e),J=[u,k,S,w,_,E,{test:e=>"auto"===e,parse:e=>e}],Q=e=>J.find(Z(e));n(70636);let ee=()=>{},et=()=>{},en=e=>t=>"string"==typeof t&&t.startsWith(e),er=en("--"),ei=en("var(--"),eo=e=>!!ei(e)&&es.test(e.split("/*")[0].trim()),es=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ea(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let el=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,eu=e=>180*e/Math.PI,ec=e=>eh(eu(Math.atan2(e[1],e[0]))),ed={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ec,rotateZ:ec,skewX:e=>
105eu(Math.atan(e[1])),skewY:e=>eu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},eh=e=>((e%=360)<0&&(e+=360),e),ef=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ep=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),em={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ef,scaleY:ep,scale:e=>(ef(e)+ep(e))/2,rotateX:e=>eh(eu(Math.atan2(e[6],e[5]))),rotateY:e=>eh(eu(Math.atan2(-e[2],e[0]))),rotateZ:ec,rotate:ec,skewX:e=>eu(Math.atan(e[4])),skewY:e=>eu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eg(e){return+!!e.includes("scale")}function ey(e,t){let n,r;if(!e||"none"===e)return eg(t);let i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(i)n=em,r=i;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ed,r=t}if(!r)return eg(t);let o=n[t],s=r[1].split(",").map(ev);return"function"==typeof o?o(s):s[o]}function ev(e){return parseFloat(e.trim())}let eb=e=>e===u||e===k,ex=new Set(["x","y","z"]),ew=s.filter(e=>!ex.has(e)),eS={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ey(t,"x"),y:(e,{transform:t})=>ey(t,"y")};eS.translateX=eS.x,eS.translateY=eS.y;let ek=e=>e,eE={},e_=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eT(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=e_.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}let l={schedule:(e,i=!1,s=!1)=>{let a=s&&r?t:n;return i&&o.add(e),a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(e))}};return l}(o),e),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=s,m=()=>{let o=eE.useManualTiming,s=o?i.timestamp:performance.now();n=!1,o||(i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1)),i.timestamp=s,i.isProcessing=!0,a.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:e_.reduce((t,o)=>{let a=s[o];return t[o]=(t,o=!1,s=!1)=>(!n&&(n=!0,r=!0,i.isProcessing||e(m)),a.schedule(t,o,s)),t},{}),cancel:e=>{for(let t=0;t<e_.length;t++)s[e_[t]].cancel(e)},state:i,steps:s}}let{schedule:ej,cancel:eA,state:eC,steps:eI}=eT("u">typeof requestAnimationFrame?requestAnimationFrame:ek,!0),eM=new Set,eP=!1,eR=!1,eO=!1;function e$(){if(eR){let e=Array.from(eM).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>
105{let t,r=(t=[],ew.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(+!!n.startsWith("scale")))}),t);r.length&&(n.set(e,r),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)})}eR=!1,eP=!1,eM.forEach(e=>e.complete(eO)),eM.clear()}function eD(){eM.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eR=!0)})}class eN{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?(eM.add(this),eP||(eP=!0,ej.read(eD),ej.resolveKeyframes(e$))):(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),eM.delete(this)}cancel(){"scheduled"===this.state&&(eM.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let eL=new Set([z,V]);function ez(e,t){let n=H(e);return eL.has(n)||(n=$),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let eV=new Set(["auto","none","0"]);class eF extends eN{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&&eo(r=r.trim())){let i=function e(t,n,r=1){et(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=el.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}(t);if(!i)return;let s=window.getComputedStyle(n).getPropertyValue(i);if(s){let e=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return eo(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(),!K.has(n)||2!==e.length)return;let[r,i]=e,o=Q(r),s=Q(i);if(ea(r)!==ea(i)&&eS[n]){this.needsMeasurement=!0;return}if(o!==s)if(eb(o)&&eb(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else eS[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&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&&!eV.has(t)&&R(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=ez(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=eS[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]=eS[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
105h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}let eB=e=>1e3*e;function eU(e,t){-1===e.indexOf(t)&&e.push(t)}function eH(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class eW{constructor(){this.subscriptions=[]}add(e){return eU(this.subscriptions,e),()=>eH(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}}function eq(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}function eY(e){let t;return()=>(void 0===t&&(t=e()),t)}let eG={};function eX(e,t){let n=eY(e);return()=>eG[t]??n()}let eK=eX(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),eZ=e=>null!==e;function eJ(e,{repeat:t,repeatType:n="loop"},r,i=1){let o=e.filter(eZ),s=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return s&&void 0!==r?r:o[s]}class eQ{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 e0=e=>Array.isArray(e)&&"number"==typeof e[0],e1=eX(()=>{try{document.createElement("div").animate({opacity:0}
105,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),e2=(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)})`},e3=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,e5={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:e3([0,.65,.55,1]),circOut:e3([.55,0,1,.45]),backIn:e3([.31,.01,.66,-.59]),backOut:e3([.33,1.53,.69,.99])};function e4(e){return"function"==typeof e&&"applyToOptions"in e}class e6 extends eQ{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:s,onComplete:a}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,et("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return e4(e)&&e1()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?e1()?e2(t,n):"ease-out":e0(t)?e3(t):Array.isArray(t)?t.map(t=>e(t,n)||e5.easeOut):e5[t]}(a,i);Array.isArray(d)&&(c.easing=d);let h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=eJ(r,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(e),eq(t,n,e),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&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){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=eB(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&eK())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ek):r(this)}}let e7=new Set(["opacity","clipPath","filter","transform"]),{schedule:e8}=eT(queueMicrotask,!1);function e9(){r=void 0}let te={now:()=>(void 0===r&&te.set(eC.isProcessing||eE.useManualTiming?eC.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(e9)}},tt=(e,t)=>t?1e3/t*e:0,tn;class tr{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=te.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=te.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 eW);let n=this.events[e].add(t);return"change"===e?()=>{n(),ej.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)}
105setWithVelocity(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 tn&&tn.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=te.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return tt(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ti(e,t){return new tr(e,t)}let to=[...J,A,$],ts=new WeakMap;function ta(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tl(e){return"string"==typeof e||Array.isArray(e)}let tu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tc=["initial",...tu];function td(e){return ta(e.animate)||tc.some(t=>tl(e[t]))}function th(e){return!!(td(e)||e.variants)}let tf={current:null},tp={current:!1},tm="u">typeof window;function tg(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ty(e,t,n,r){if("function"==typeof t){let[i,o]=tg(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]=tg(r);t=t(void 0!==n?n:e.custom,i,o)}return t}let tv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tb={};class tx{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=eN,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=te.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ej.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=td(t),this.isVariantNode=th(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==l[e]&&X(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,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.forEac
105h((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(tp.current||function(){if(tp.current=!0,tm)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tf.current=e.matches;e.addEventListener("change",t),t()}else tf.current=!1}(),this.shouldReduceMotion=tf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),eA(this.notifyUpdate),eA(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let n;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&e7.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:o,duration:s}=t.accelerate,a=new e6({element:this.current,name:e,keyframes:r,times:i,ease:o,duration:eB(s)}),l=n(a);this.valueSubscriptions.set(e,()=>{l(),a.cancel()});return}let r=a.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ej.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),n&&n()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in tb){let t=tb[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):G()}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<tv.length;t++){let n=tv[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(X(i))e.addValue(r,i);else if(X(o))e.addValue(r,ti(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,ti(void 0!==t?t:i,{owner:e}))}}for(let r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=ti(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){let r,i;if("string"==typeof n&&(r=n,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r)||(i=n,/^0[^.\s]+$/u.test(i))))n=parseFloat(n);else{let r;r=n,!to.find(Z(r))&&$.test(t)&&(n=ez(e,t))}this.setBaseTarget(e,X(n)?n.get():n)}return X(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=ty(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||X(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 eW),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){e8.render(this.render)}}class tw extends tx{constructor(){super(...arguments),this.KeyframeResolver=eF}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;X(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function tS(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let tk=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},t_=s.length;function tT(e,t,n){let{style:r,vars:i,transformOrigin:o}=e,l=!1,u=!1;for(let e in t){let n=t[e];if(a.has(e)){l=!0;continue}if(er(e)){i[e]=n;continue}{let t=tk(n,B[e]);e.startsWith("origin")?(u=!0,o[e]=t):r[e]=t}}if(!t.transform&&(l||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<t_;o++){let a=s[o],l=e[a];if(void 0===l)continue;let u=!0;
105if("number"==typeof l)u=l===+!!a.startsWith("scale");else{let e=parseFloat(l);u=a.startsWith("scale")?1===e:0===e}if(!u||n){let e=tk(l,B[a]);if(!u){i=!1;let t=tE[a]||a;r+=`${t}(${e}) `}n&&(t[a]=e)}}let o=e.pathRotation;return o&&(i=!1,r+=`rotate(${tk(o,B.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),u){let{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}let tj={offset:"stroke-dashoffset",array:"stroke-dasharray"},tA={offset:"strokeDashoffset",array:"strokeDasharray"},tC=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tI(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,u,c){if(tT(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of(d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),tC))void 0!==d[e]&&(h[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;let o=i?tj:tA;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}(d,i,o,s,!1)}let tM=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"]),tP=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tR(e,{style:t,vars:n},r,i){let o,s=e.style;for(o in t)s[o]=t[o];for(o in i?.applyProjectionStyles(s,r),n)s.setProperty(o,n[o])}let tO=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function t$(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let tD={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!k.test(e))return e;else e=parseFloat(e);let n=t$(e,t.target.x),r=t$(e,t.target.y);return`${n}% ${r}%`}},tN=(e,t,n)=>e+(t-e)*n,tL={borderRadius:{...tD,applyTo:[...tO]},borderTopLeftRadius:tD,borderTopRightRadius:tD,borderBottomLeftRadius:tD,borderBottomRightRadius:tD,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=$.parse(e);if(r.length>5)return e;let i=$.createTransformer(e),o=+("number"!=typeof r[0]),s=n.x.scale*t.x,a=n.y.scale*t.y;r[0+o]/=s,r[1+o]/=a;let l=tN(s,a,.5);return"number"==typeof r[2+o]&&(r[2+o]/=l),"number"==typeof r[3+o]&&(r[3+o]/=l),i(r)}}};function tz(e,{layout:t,layoutId:n}){return a.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!tL[e]||"opacity"===e)}function tV(e,t,n){let r=e.style,i=t?.style,o={};if(!r)return o;for(let t in r)(X(r[t])||i&&X(i[t])||tz(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(o[t]=r[t]);return o}function tF(e,t,n){let r=tV(e,t,n);for(let n in e)(X(e[n])||X(t[n]))&&(r[-1!==s.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}class tB extends tw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(a.has(t)){let e=H(t);return e&&e.default||0}return t=tM.has(t)?t:tS(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return tF(e,t,n)}
105build(e,t,n){tI(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){for(let n in tR(e,t,void 0,r),t.attrs)e.setAttribute(tM.has(n)?n:tS(n),t.attrs[n])}mount(e){this.isSVGTag=tP(e.tagName),super.mount(e)}}function tU({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tH(e){return void 0===e||1===e}function tW({scale:e,scaleX:t,scaleY:n}){return!tH(e)||!tH(t)||!tH(n)}function tq(e){return tW(e)||tY(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tY(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function tG(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function tX(e,t=0,n=1,r,i){e.min=tG(e.min,t,n,r,i),e.max=tG(e.max,t,n,r,i)}function tK(e,{x:t,y:n}){tX(e.x,t.translate,t.scale,t.originPoint),tX(e.y,n.translate,n.scale,n.originPoint)}function tZ(e,t){e.min+=t,e.max+=t}function tJ(e,t,n,r,i=.5){let o=tN(e.min,e.max,i);tX(e,t,n,o,r)}function tQ(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function t0(e,t,n){let r=n??e;tJ(e.x,tQ(t.x,r.x),t.scaleX,t.scale,t.originX),tJ(e.y,tQ(t.y,r.y),t.scaleY,t.scale,t.originY)}function t1(e,t){return tU(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}class t2 extends tw{constructor(){super(...arguments),this.type="html",this.renderInstance=tR}readValueFromInstance(e,t){if(a.has(t))return this.projection?.isProjecting?eg(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return ey(n,t)})(e,t);{let n=window.getComputedStyle(e),r=(er(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return t1(e,t)}build(e,t,n){tT(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return tV(e,t,n)}}var t3,t5=n(1521);let t4=["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 t6(e){if("string"!=typeof e||e.includes("-"));else if(t4.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var t7=n(73365),t8=n(9235);let t9=(0,t5.createContext)({strict:!1});var ne=n(83246);let nt=(0,t5.createContext)({});function nn(e){return Array.isArray(e)?e.join(" "):e}let nr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ni(e,t,n){for(let r in t)X(t[r])||tz(r,n)||(e[r]=t[r])}let no=()=>({...nr(),attrs:{}}),ns=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function na(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ns.has(e)}let nl=e=>!na(e);try{t3=require("@emotion/is-prop-valid").default,"function"==typeof t3&&(nl=e=>e.startsWith("on")?!na(e):t3(e))}catch{}function nu(e){return X(e)?e.get():e}var nc=n(32719),nd=n(9943);let nh=e=>(t,n)=>{let r=(0,t5.useContext)(nt),i=(0,t5.useContext)(nc.t),o=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:function(e,t,n,r){let i={},o=r(e,{});for(let e in o)i[e]=nu(o[e]);let{initial:s,animate:a}=e,l=td(e),u=th(e);t&&u&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let c=!!n&&!1===n.initial,d=(c=c||!1===s)?a:s;if(d&&"boolean"!=typeof d&&!ta(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ty(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}(n,r,i,e),renderState:t()}})(e,t,r,i);return n?o():(0,nd.M)(o)},nf=nh({scrapeMotionValuesFromProps:tV,createRenderState:nr}),np=nh({scrapeMotionValuesFromProps:tF,createRenderState:no}),nm={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"]},ng=!1;function ny(){return!function(){if(ng)return;let e={};for(let t in nm)e[t]={isEnabled:e=>nm[t].some(t=>!!e[t])};tb=e,ng=!0}(),tb}let nv=Symbol.for("motionComponentSymbol"),nb="data-"+tS("framerAppearId"),nx=(0,t5.createContext)({});function nw(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}var nS=n(31011);function nk(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&function(e){let t=ny();for(let n in e)t[n]={...t[n],...e[n]};tb=t}(r);let o=n?"svg"===n:t6(e),s=o?np:nf;function a(n,r){var a;let l,u,c,d={...(0,t5.useContext)(ne.Q),...n,layoutId:function({layoutId:e}){let t=(0,t5.useContext)(t8.L).id;return t&&void 0!==e?t+"-"+e:e}(n)},{isStatic:h}=d,f=function(e){let{initial:t,animate:n}=function(e,t){if(td(e)){let{initial:t,animate:n}=e;return{initial:!1===t||tl(t)?t:void 0,animate:tl(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,t5.useContext)(nt));return(0,t5.useMemo)(()=>({initial:t,animate:n}),[nn(t),nn(n)])}(n),p=s(n,h);if(!h&&"u">typeof window){(0,t5.useContext)(t9).strict;let t=function(e){let{drag:t,layout:n}=ny();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}
105(d);l=t.MeasureLayout,f.visualElement=function(e,t,n,r,i,o){let{visualElement:s}=(0,t5.useContext)(nt),a=(0,t5.useContext)(t9),l=(0,t5.useContext)(nc.t),u=(0,t5.useContext)(ne.Q),c=u.reducedMotion,d=u.skipAnimations,h=(0,t5.useRef)(null),f=(0,t5.useRef)(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:o}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let p=h.current,m=(0,t5.useContext)(nx);p&&!p.projection&&i&&("html"===p.type||"svg"===p.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&nw(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(h.current,n,i,m);let g=(0,t5.useRef)(!1);(0,t5.useInsertionEffect)(()=>{p&&g.current&&p.update(n,l)});let y=n[nb],v=(0,t5.useRef)(!!y&&"u">typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return(0,nS.E)(()=>{f.current=!0,p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),(0,t5.useEffect)(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),p.enteringChildren=void 0)}),p}(e,p,d,i,t.ProjectionNode,o)}return(0,t7.jsxs)(nt.Provider,{value:f,children:[l&&f.visualElement?(0,t7.jsx)(l,{visualElement:f.visualElement,...d}):null,function(e,t,n,{latestValues:r},i,o=!1,s){let a=(s??t6(e)?function(e,t,n,r){let i=(0,t5.useMemo)(()=>{let n=no();return tI(n,t,tP(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};ni(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let n,r,i={},o=(n=e.style||{},ni(r={},n,e),Object.assign(r,function({transformTemplate:e},t){return(0,t5.useMemo)(()=>{let n=nr();return tT(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),r);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=o,i})(t,r,i,e),l=function(e,t,n){let r={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&!X(e[i])&&(nl(i)||!0===n&&na(i)||!t&&!na(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,o),u=e!==t5.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=(0,t5.useMemo)(()=>X(c)?c.get():c,[c]);return(0,t5.createElement)(e,{...u,children:d})}(e,n,(a=f.visualElement,u=(0,t5.useRef)(r),(0,t5.useInsertionEffect)(()=>{u.current=r}),c=(0,t5.useRef)(null),(0,t5.useCallback)(e=>{e&&p.onMount?.(e),a&&(e?a.mount(e):a.unmount());let t=u.current;if("function"==typeof t)if(e){let n=t(e);"function"==typeof n&&(c.current=n)}else c.current?(c.current(),c.current=null):t(e);else t&&(t.current=e)},[a])),p,h,t,o)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let l=(0,t5.forwardRef)(a);return l[nv]=e,l}class nE{constructor(e){this.isMounted=!1,this.node=e}update(){}}function n_(e,t,n){let r=e.getProps();return ty(r,t,void 0!==n?n:r.custom,e)}function nT(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function nj(e,t){let n=e?.[t]??e?.default??e;return n!==e?nT(n,e):n}let nA=e=>Array.isArray(e);function nC(e,t){let n=e.getValue("willChange");if(X(n)&&n.add)return n.add(t);if(!n&&eE.WillChange){let n=new eE.WillChange("auto");e.addValue("willChange",n),n.add(t)}}let nI=(...e)=>e.reduce((e,t)=>n=>t(e(n)));function nM(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 nP(e,t){return n=>n>0?t:e}let nR=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},nO=[b,v,j];function n$(e){let t=nO.find(t=>t.test(e));if(ee(!!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===j&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=nM(a,r,e+1/3),o=nM(a,r,e),s=nM(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(n)),n}let nD=(e,t)=>{let n=n$(e),r=n$(t);if(!n||!r)return nP(e,t);let i={...n};return e=>(i.red=nR(n.red,r.red,e),i.green=nR(n.green,r.green,e),i.blue=nR(n.blue,r.blue,e),i.alpha=tN(n.alpha,r.alpha,e),v.transform(i))},nN=new Set(["none","hidden"]);function nL(e,t){return n=>
105tN(e,t,n)}function nz(e){return"number"==typeof e?nL:"string"==typeof e?eo(e)?nP:A.test(e)?nD:nB:Array.isArray(e)?nV:"object"==typeof e?A.test(e)?nD:nF:nP}function nV(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>nz(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function nF(e,t){let n={...e,...t},r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=nz(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}let nB=(e,t)=>{let n=$.createTransformer(t),r=R(e),i=R(t);if(!(r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length))return ee(!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"),nP(e,t);if(nN.has(e)&&!i.values.length||nN.has(t)&&!r.values.length)return nN.has(e)?n=>n<=0?e:t:n=>n>=1?t:e;return nI(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],s=e.indexes[o][r[o]],a=e.values[s]??0;n[i]=a,r[o]++}return n}(r,i),i.values),n)};function nU(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?tN(e,t,n):nz(e)(e,t)}let nH=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ej.update(t,e),stop:()=>eA(t),now:()=>eC.isProcessing?eC.timestamp:te.now()}};function nW(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}let nq=.01,nY=2,nG=.005,nX=.5;function nK(e,t){return e*Math.sqrt(1-t*t)}let nZ=["duration","bounce"],nJ=["stiffness","damping","mass"];function nQ(e,t){return t.some(t=>void 0!==e[t])}function n0(e=.3,t=.3){let n,r,i,o,s,a,u="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:c,restDelta:d}=u,h=u.keyframes[0],f=u.keyframes[u.keyframes.length-1],p={done:!1,value:h},{stiffness:m,damping:g,mass:y,duration:v,velocity:b,isResolvedFromDuration:x}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!nQ(e,nJ)&&nQ(e,nZ))if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),r=n*n,i=2*l(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:1,stiffness:r,damping:i}}else{let n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:r=1}){let i,o;ee(e<=eB(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=l(.05,1,s),e=l(.01,10,e/1e3),s<1?(i=t=>{let r=t*s,i=r*e;return .001-(r-n)/nK(t,s)*Math.exp(-i)},o=t=>{let r=t*s*e,o=Math.pow(s,2)*Math.pow(t,2)*e,a=Math.exp(-r),l=nK(Math.pow(t,2),s);return(r*n+n-o)*a*(-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 a=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=eB(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:1}).isResolvedFromDuration=!0}return t}({...u,velocity:-((u.velocity||0)/1e3)}),w=b||0,S=g/(2*Math.sqrt(m*y)),k=f-h,E=Math.sqrt(m/y)/1e3,_=5>Math.abs(k);if(c||(c=_?nq:nY),d||(d=_?nG:nX),S<1)i=nK(E,S),o=(w+S*E*k)/i,n=e=>f-Math.exp(-S*E*e)*(o*Math.sin(i*e)+k*Math.cos(i*e)),s=S*E*o+k*i,a=S*E*k-o*i,r=e=>Math.exp(-S*E*e)*(s*Math.sin(i*e)+a*Math.cos(i*e));else if(1===S){n=e=>f-Math.exp(-E*e)*(k+(w+E*k)*e);let e=w+E*k;r=t=>Math.exp(-E*t)*(E*e*t-w)}else{let e=E*Math.sqrt(S*S-1);n=t=>{let n=Math.exp(-S*E*t),r=Math.min(e*t,300);return f-n*((w+S*E*k)*Math.sinh(r)+e*k*Math.cosh(r))/e};let t=(w+S*E*k)/e,i=S*E*t-k*e,o=S*E*k-t*e;r=t=>{let n=Math.exp(-S*E*t),r=Math.min(e*t,300);return n*(i*Math.sinh(r)+o*Math.cosh(r))}}let T={calculatedDuration:x&&v||null,velocity:e=>eB(r(e)),next:e=>{if(!x&&S<1){let t=Math.exp(-S*E*e),n=Math.sin(i*e),r=Math.cos(i*e),l=f-t*(o*n+k*r);return p.done=Math.abs(eB(t*(s*n+a*r)))<=c&&Math.abs(f-l)<=d,p.value=p.done?f:l,p}let t=n(e);return x?p.done=e>=v:p.done=Math.abs(eB(r(e)))<=c&&Math.abs(f-t)<=d,p.value=p.done?f:t,p},toString:()=>{let e=Math.min(nW(T),2e4),t=e2(t=>T.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return T}function n1(e,t,n){let r=Math.max(t-5,0);return tt(n-e(r),t-r)}function n2({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){let d,h,f=e[0],p={done:!1,value:f},m=n*t,g=f+m,y=void 0===s?g:s(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!==a&&t<a||void 0!==l&&t>l){var n;d=e,h=n0({keyframes:[p.value,(n=p.value,void 0===a?l:void 0===l||Math.abs(a-n)<Math.abs(l-n)?a:l)],velocity:n1(b,e,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:c})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;
105return(h||void 0!==d||(t=!0,x(e),w(e)),void 0!==d&&e>=d)?h.next(e-d):(t||x(e),p)}}}n0.applyToOptions=e=>{let t=function(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(nW(r),2e4);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:i/1e3}}(e,100,n0);return e.ease=t.ease,e.duration=eB(t.duration),e.type="keyframes",e};let n3=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function n5(e,t,n,r){return e===t&&n===r?ek:i=>0===i||1===i?i:n3(function(e,t,n,r,i){let o,s,a=0;do(o=n3(s=t+(n-t)/2,r,i)-e)>0?n=s:t=s;while(Math.abs(o)>1e-7&&++a<12);return s}(i,0,1,e,n),t,r)}let n4=n5(.42,0,1,1),n6=n5(0,0,.58,1),n7=n5(.42,0,.58,1),n8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,n9=e=>t=>1-e(1-t),re=n5(.33,1.53,.69,.99),rt=n9(re),rn=n8(rt),rr=e=>e>=1?1:(e*=2)<1?.5*rt(e):.5*(2-Math.pow(2,-10*(e-1))),ri=e=>1-Math.sin(Math.acos(e)),ro=n9(ri),rs=n8(ri),ra={linear:ek,easeIn:n4,easeInOut:n7,easeOut:n6,circIn:ri,circInOut:rs,circOut:ro,backIn:rt,backInOut:rn,backOut:re,anticipate:rr},rl=e=>{if(e0(e)){et(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,r,i]=e;return n5(t,n,r,i)}return"string"==typeof e?(et(void 0!==ra[e],`Invalid easing type '${e}'`,"invalid-easing-type"),ra[e]):e},ru=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1};function rc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){var i;let o,s=Array.isArray(r)&&"number"!=typeof r[0]?r.map(rl):rl(r),a={done:!1,value:t[0]},u=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if(et(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 s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=function(e,t,n){let r=[],i=n||eE.mix||nU,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);t&&(o=nI(Array.isArray(t)?t[n]||ek:t,o)),r.push(o)}return r}(t,r,i),u=a.length,c=n=>{if(s&&n<e[0])return t[0];let r=0;if(u>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ru(e[r],e[r+1],n);return a[r](i)};return n?t=>c(l(e[0],e[o-1],t)):c}((i=n&&n.length===t.length?n:(!function(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ru(0,t,r);e.push(tN(n,1,i))}}(o=[0],t.length-1),o),i.map(t=>t*e)),t,{ease:Array.isArray(s)?s:t.map(()=>s||n7).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(a.value=u(t),a.done=t>=e,a)}}let rd={decay:n2,inertia:n2,tween:rc,keyframes:rc,spring:n0};function rh(e){"string"==typeof e.type&&(e.type=rd[e.type])}let rf=e=>e/100;class rp extends eQ{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==te.now()&&this.tick(te.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;rh(e);let{type:t=rc,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e,{keyframes:s}=e,a=t||rc;a!==rc&&"number"!=typeof s[0]&&(this.mixKeyframes=nI(rf,nU(s[0],s[1])),s=[0,100]);let l=a({...e,keyframes:s});"mirror"===i&&(this.mirroredGenerator=a({...e,keyframes:[...s].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=nW(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let n,{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:u}=this;if(null===this.startTime)return r.next(0);let{delay:c=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:p,type:m,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let x=this.currentTime,w=r;if(h){let e=Math.min(this.currentTime,i)/a,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,h+1))%2&&("reverse"===f?(n=1-n,p&&(n-=p/a)):"mirror"===f&&(w=s)),x=l(0,1,n)*
105a}b?(this.delayState.value=d[0],n=this.delayState):n=w.next(x),o&&!b&&(n.value=o(n.value));let{done:S}=n;b||null===u||(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return k&&m!==n2&&(n.value=eJ(d,this.options,y,this.speed)),g&&g(n.value),k&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return 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=eB(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return n1(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(te.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=nH,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(te.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}let rm={anticipate:rr,backInOut:rn,circInOut:rs};class rg extends e6{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in rm&&(e.ease=rm[e.ease])}(e),rh(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new rp({...o,autoplay:!1}),a=Math.max(10,te.now()-this.startTime),u=l(0,10,a-10),c=s.sample(a).value,{name:d}=this.options;i&&d&&eq(i,d,c),t.setWithVelocity(s.sample(Math.max(0,a-u)).value,c,u),s.stop()}}let ry=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&($.test(e)||"0"===e)&&!e.startsWith("url("));function rv(e){e.duration=0,e.type="keyframes"}let rb=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,rx=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),rw=eY(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class rS extends eQ{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:s,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=te.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,name:a,motionValue:l,element:u,...c},h=u?.KeyframeResolver||eN;this.keyframeResolver=new h(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){let i;this.keyframeResolver=void 0;let{name:o,type:s,velocity:a,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=te.now();let d=!0;!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],s=ry(i,t),a=ry(o,t);return ee(s===a,`You are trying to animate ${t} from "${i}" to "${o}". "${s?o:i}" is not an animatable value.`,"value-not-animatable"),!!s&&!!a&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||e4(n))&&r)}(e,o,s,a)&&(d=!1,(eE.instantAnimations||!l)&&c?.(eJ(e,n,t)),e[0]=e[e.length-1],rv(n),n.repeat=0);let h={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=d&&!u&&function(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s,keyframes:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;
105let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return rw()&&n&&(e7.has(n)||rx.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&rb.test(e[t]))return!0;return!1}(a))&&("transform"!==n||!u)&&!l&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}(h),p=h.motionValue?.owner?.current;if(f)try{i=new rg({...h,element:p})}catch{i=new rp(h)}else i=new rp(h);i.finished.then(()=>{this.notifyFinished()}).catch(ek),this.pendingTimeline&&(this.stopTimeline=i.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=i}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),eO=!0,eD(),e$(),eO=!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 rk={type:"spring",stiffness:500,damping:25,restSpeed:10},rE={type:"keyframes",duration:.8},r_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rT=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),rj=(e,t,n,r={},i,o)=>s=>{let l=nj(r,e)||{},u=l.delay||r.delay||0,{elapsed:c=0}=r;c-=eB(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(e){for(let t in e)if(!rT.has(t))return!0;return!1}(l)&&Object.assign(d,((e,{keyframes:t})=>t.length>2?rE:a.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:rk:r_)(e,d)),d.duration&&(d.duration=eB(d.duration)),d.repeatDelay&&(d.repeatDelay=eB(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if(!1!==d.type&&(0!==d.duration||d.repeatDelay)||(rv(d),0===d.delay&&(h=!0)),(eE.instantAnimations||eE.skipAnimations||i?.shouldSkipAnimations||l.skipAnimations)&&(h=!0,rv(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!o&&void 0!==t.get()){let e=eJ(d.keyframes,l);if(void 0!==e)return void ej.update(()=>{d.onUpdate(e),d.onComplete()})}return l.isSync?new rp(d):new rS(d)};function rA(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:s,...a}=t,l=e.getDefaultTransition();o=o?nT(o,l):l;let u=o?.reduceMotion,c=o?.skipAnimations;r&&(o=r);let d=[],h=i&&e.animationState&&e.animationState.getState()[i],f=o?.path;for(let t in f&&f.animateVisualElement(e,a,o,n,d),a){let r=e.getValue(t,e.latestValues[t]??null),i=a[t];if(void 0===i||h&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(h,t))continue;let s={delay:n,...nj(o||{},t)};c&&(s.skipAnimations=!0);let l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(i)&&i===l&&!s.velocity){ej.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=e.props[nb];if(n){let e=window.MotionHandoffAnimation(n,t,ej);null!==e&&(s.startTime=e,f=!0)}}nC(e,t);let p=u??e.shouldReduceMotion;r.start(rj(t,r,i,p&&K.has(t)?{type:!1}:s,e,f));let m=r.animation;m&&d.push(m)}if(s){let t=()=>ej.update(()=>{s&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=n_(e,t)||{};for(let t in i={...i,...n}){var o;let n=nA(o=i[t])?o[o.length-1]||0:o;e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ti(n))}}(e,s)});d.length?Promise.all(d).then(t):t()}return d}function rC(e,t,n,r=0,i=1){let o=Array.from(e).sort((e,t)=>
105e.sortNodePosition(t)).indexOf(t),s=e.size,a=(s-1)*r;return"function"==typeof n?n(o,s):1===i?o*r:a-o*r}function rI(e,t,n={}){let r=n_(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(rA(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,i=0,o=1,s){let a=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),a.push(rI(l,t,{...s,delay:n+("function"==typeof r?0:r)+rC(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}(e,t,r,o,s,a,n)}:()=>Promise.resolve(),{when:a}=i;if(!a)return Promise.all([o(),s(n.delay)]);{let[e,t]="beforeChildren"===a?[o,s]:[s,o];return e().then(()=>t())}}let rM=tc.length;function rP(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 rR=[...tu].reverse(),rO=tu.length;function r$(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rD(){return{animate:r$(!0),whileInView:r$(),whileHover:r$(),whileTap:r$(),whileDrag:r$(),whileFocus:r$(),exit:r$()}}class rN extends nE{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=>rI(e,t,n)));else if("string"==typeof t)r=rI(e,t,n);else{let i="function"==typeof t?n_(e,t,n.custom):t;r=Promise.all(rA(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=rD(),r=!0,i=!1,o=t=>(n,r)=>{let i=n_(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 s(s){let{props:a}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<rM;e++){let r=tc[e],i=t.props[r];(tl(i)||!1===i)&&(n[r]=i)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<rO;t++){var f,p;let m=rR[t],g=n[m],y=void 0!==a[m]?a[m]:l[m],v=tl(y),b=m===s?g.isActive:null;!1===b&&(h=t);let x=y===l[m]&&y!==a[m]&&v;if(x&&(r||i)&&e.manuallyAnimateOnMount&&(x=!1),g.protectedKeys={...d},!g.isActive&&null===b||!y&&!g.prevProp||ta(y)||"boolean"==typeof y)continue;if("exit"===m&&g.isActive&&!0!==b){g.prevResolvedValues&&(d={...d,...g.prevResolvedValues});continue}let w=(f=g.prevProp,"string"==typeof(p=y)?p!==f:!!Array.isArray(p)&&!rP(p,f)),S=w||m===s&&g.isActive&&!x&&v||t>h&&v,k=!1,E=Array.isArray(y)?y:[y],_=E.reduce(o(m),{});!1===b&&(_={});let{prevResolvedValues:T={}}=g,j={...T,..._},A=t=>{S=!0,c.has(t)&&(k=!0,c.delete(t)),g.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in j){let t=_[e],n=T[e];if(!d.hasOwnProperty(e))(nA(t)&&nA(n)?!rP(t,n)||w:t!==n)?null!=t?A(e):c.add(e):void 0!==t&&c.has(e)?A(e):g.protectedKeys[e]=!0}g.prevProp=y,g.prevResolvedValues=_,g.isActive&&(d={...d,..._}),(r||i)&&e.blockInitialAnimation&&(S=!1);let C=x&&w,I=!C||k;S&&I&&u.push(...E.map(t=>{let n={type:m};if("string"==typeof t&&(r||i)&&!C&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=n_(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=rC(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof a.initial){let n=n_(e,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),u.push({animation:t})}let m=!!u.length;return r&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,i=!1,m?t(u):Promise.resolve()}return{animateChanges:s,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=s(t);for(let e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=rD(),i=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();ta(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 rL=0;class rz extends nE{constructor(){super(...arguments),this.id=rL++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){let n=n_(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>
105{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}let rV={x:!1,y:!1};function rF(e){return[e("x"),e("y")]}function rB(e){return e.max-e.min}function rU(e,t,n,r=.5){e.origin=r,e.originPoint=tN(t.min,t.max,e.origin),e.scale=rB(n)/rB(t),e.translate=tN(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 rH(e,t,n,r){rU(e.x,t.x,n.x,r?r.originX:void 0),rU(e.y,t.y,n.y,r?r.originY:void 0)}function rW(e,t,n,r=0){e.min=(r?tN(n.min,n.max,r):n.min)+t.min,e.max=e.min+rB(t)}function rq(e,t,n,r=0){let i=r?tN(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+rB(t)}function rY(e,t,n,r){rq(e.x,t.x,n.x,r?.x),rq(e.y,t.y,n.y,r?.y)}let rG=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),rX=new Set(["INPUT","SELECT","TEXTAREA"]);function rK(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var rZ=n(56605);function rJ(e){return(0,rZ.G)(e)&&"ownerSVGElement"in e}function rQ(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>null!=e)}let r0=new WeakMap,r1=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:rJ(r)&&"getBBox"in r?r.getBBox()[t]:r[n],r2=r1("inline","width","offsetWidth"),r3=r1("block","height","offsetHeight");function r5({target:e,borderBoxSize:t}){r0.get(e)?.forEach(n=>{n(e,{get width(){return r2(e,t)},get height(){return r3(e,t)}})})}function r4(e){e.forEach(r5)}let r6=new Set;function r7(e,t){let n;return"function"==typeof e?(r6.add(e),o||(o=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};r6.forEach(t=>t(e))},window.addEventListener("resize",o)),()=>{r6.delete(e),r6.size||"function"!=typeof o||(window.removeEventListener("resize",o),o=void 0)}):(!i&&"u">typeof ResizeObserver&&(i=new ResizeObserver(r4)),(n=rQ(e)).forEach(e=>{let n=r0.get(e);n||(n=new Set,r0.set(e,n)),n.add(t),i?.observe(e)}),()=>{n.forEach(e=>{let n=r0.get(e);n?.delete(t),n?.size||i?.unobserve(e)})})}let r8=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function r9(e){return{point:{x:e.pageX,y:e.pageY}}}function ie(e,t,n,r){return rK(e,t,e=>r8(e)&&n(e,r9(e)),r)}let it=({current:e})=>e?e.ownerDocument.defaultView:null,ir=(e,t)=>Math.abs(e-t),ii=new Set(["auto","scroll"]);class io{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=is(this.lastRawMoveEventInfo,this.transformPagePoint));let n=il(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,i=(e=n.offset,t={x:0,y:0},Math.sqrt(ir(e.x,t.x)**2+ir(e.y,t.y)**2)>=this.distanceThreshold);if(!r&&!i)return;let{point:o}=n,{timestamp:s}=eC;this.history.push({...o,timestamp:s});let{onStart:a,onMove:l}=this.handlers;r||(a&&a(this.lastMoveEvent,n),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,n)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=is(t,this.transformPagePoint),ej.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=il("pointercancel"===e.type?this.lastMoveEventInfo:is(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!r8(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const a=is(r9(e),this.transformPagePoint),{point:l}=a,{timestamp:u}=eC;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,il(a,this.history));const d={passive:!0,capture:!0};this.removeListeners=nI(ie(this.contextWindow,"pointermove",this.handlePointerMove,d),ie(this.contextWindow,"pointerup",this.handlePointerUp,d),ie(this.contextWindow,"pointercancel",this.handlePointerUp,d)),s&&this.startScrollTracking(s)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(ii.has(e.overflowX)||ii.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(0!==i.x||0!==i.y)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),ej.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),eA(this.updatePoint)}}function is(e,t){return t?{point:t(e.point)}:e}function ia(e,t){return{x:e.x-t.x,y:e.y-t.y}}function il({point:e},t){return{point:e,delta:ia(e,iu(t)),offset:ia(e,t[0]),velocity:function(e){if(e.length<2)return{x:0,y:0};let t=e.length-1,n=null,r=iu(e);for(;t>=0&&(n=e[t],!(r.timestamp-n.timestamp>eB(.1)));)t--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&r.timestamp-n.timestamp>2*eB(.1)&&(n=e[1]);let i=(r.timestamp-n.timestamp)/1e3;if(0===i)return{x:0,y:0};let o={x:(r.x-n.x)/i,y:(r.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(t)}}function iu(e){return e[e.length-1]}function ic(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function id(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}}
105function ih(e,t,n){return{min:ip(e,t),max:ip(e,n)}}function ip(e,t){return"number"==typeof e?e:e[t]||0}let im=new WeakMap;class ig{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=G(),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=>{t&&this.snapToCursor(r9(e).point),this.stopAnimation()},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||"y"===e)if(rV[e])return null;else return rV[e]=!0,()=>{rV[e]=!1};return rV.x||rV.y?null:(rV.x=rV.y=!0,()=>{rV.x=rV.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),rF(e=>{let t=this.getAxisMotionValue(e).get()||0;if(S.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=rB(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&ej.update(()=>i(e,t),!1,!0),nC(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},s=(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:s}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&ej.update(()=>o(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new io(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:it(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:s}=this.getProps();s&&ej.postRender(()=>s(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!iv(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?tN(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?tN(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&&nw(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:ic(e.x,n,i),y:ic(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:ih(e,"left","right"),y:ih(e,"top","bottom")}}(t),r!==this.constraints&&!nw(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&rF(e=>{var t,r;let i;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=n.layoutBox[e],r=this.constraints[e],i={},void 0!==r.min&&(i.min=r.min-t.min),void 0!==r.max&&(i.max=r.max-t.min),i))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nw(t))return!1;let r=t.current;et(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());let o=function(e,t,n){let r=t1(e,n),{scroll:i}=t;return i&&(tZ(r.x,i.offset.x),tZ(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),s=(e=i.layout.layoutBox,{x:id(e.x,o.x),y:id(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}}(s));this.hasMutatedConstraints=!!e,e&&(s=tU(e))}return s}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{};return Promise.all(rF(s=>{if(!iv(s,t,this.currentDirection))return;let l=a&&a[s]||{};(!0===o||o===s)&&(l={min:0,max:0});let u={type:"inertia",velocity:n?e[s]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,u)})).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return nC(this.visualElement,e),n.start(rj(e,n,0,t,this.visualElement,!1))}stopAnimation(){rF(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){rF(t=>{let{drag:n}=this.getProps();if(!iv(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.layoutBox[t],s=i.get()||0;i.set(e[t]-tN(n,o,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!nw(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};rF(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var n,i;let o,s,a,u=t.get();r[e]=(n={min:u,max:u},i=this.constraints[e],o=.5,s=rB(n),(a=rB(i))>s?o=ru(i.min,i.max-s,n.min):s>a&&(o=ru(n.min,n.max-a,i.min)),l(0,1,o))}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),rF(t=>{if(!iv(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(tN(i,o,r[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;im.set(this.visualElement,this);let t=this.visualElement.current,n=ie(t,"pointerdown",e=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=e.target,o=i!==t&&(rX.has(i.tagName)||!0===i.isContentEditable);n&&r&&!o&&this.start(e)}),r=()=>{var n,r,i;let o,s,{dragConstraints:a}=this.getProps();nw(a)&&a.current&&(this.constraints=this.resolveRefConstraints(),e||(n=t,r=a.current,o=r7(n,iy(i=()=>this.scalePositionWithinConstraints())),s=r7(r,iy(i)),e=()=>{o(),s()}))},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ej.read(r);let s=rK(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rF(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function iy(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function iv(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}class ib extends nE{constructor(e){super(e),this.removeGroupControls=ek,this.removeListeners=ek,this.controls=new ig(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ek}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let ix=e=>(t,n)=>{e&&ej.update(()=>e(t,n),!1,!0)};class iw extends nE{constructor(){super(...arguments),this.removePointerDownListener=ek}onPointerDown(e){this.session=new io(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:it(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ix(e),onStart:ix(t),onMove:ix(n),onEnd:(e,t)=>{delete this.session,r&&ej.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ie(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let iS={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var ik=n(85656);let iE=!1;class i_ extends t5.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),iE&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),iS.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),iE=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||ej.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),e8.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;iE=!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 iT(e){let[t,n]=(0,ik.xQ)(),r=(0,t5.useContext)(t8.L);return(0,t7.jsx)(i_,{...e,layoutGroup:r,switchLayoutGroup:(0,t5.useContext)(nx),isPresent:t,safeToRemove:n})}let ij=tO.length,iA=e=>"string"==typeof e?parseFloat(e):e,iC=e=>"number"==typeof e||k.test(e);function iI(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let iM=iR(0,.5,ro),iP=iR(.5,.95,ek);function iR(e,t,n){return r=>r<e?0:r>t?1:n(ru(e,t,r))}function iO(e,t){e.min=t.min,e.max=t.max}function i$(e,t){iO(e.x,t.x),iO(e.y,t.y)}function iD(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function iN(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}
105function iL(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){if(S.test(t)&&(t=parseFloat(t),t=tN(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=tN(o.min,o.max,r);e===o&&(a-=t),e.min=iN(e.min,t,n,a,i),e.max=iN(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}let iz=["x","scaleX","originX"],iV=["y","scaleY","originY"];function iF(e,t,n,r){iL(e.x,t,iz,n?n.x:void 0,r?r.x:void 0),iL(e.y,t,iV,n?n.y:void 0,r?r.y:void 0)}function iB(e){return 0===e.translate&&1===e.scale}function iU(e){return iB(e.x)&&iB(e.y)}function iH(e,t){return e.min===t.min&&e.max===t.max}function iW(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function iq(e,t){return iW(e.x,t.x)&&iW(e.y,t.y)}function iY(e){return rB(e.x)/rB(e.y)}function iG(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iX{constructor(){this.members=[]}add(e){eU(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&!1!==r.isConnected||n.snapshot||(eH(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(eH(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(void 0===r||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let iK=(e,t)=>e.depth-t.depth;class iZ{constructor(){this.children=[],this.isDirty=!1}add(e){eU(this.children,e),this.isDirty=!0}remove(e){eH(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(iK),this.isDirty=!1,this.children.forEach(e)}}let iJ=["","X","Y","Z"],iQ=0;function i0(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function i1({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=iQ++,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,this.nodes.forEach(i5),this.nodes.forEach(or),this.nodes.forEach(oi),this.nodes.forEach(i4)},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 iZ)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new eW),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=rJ(t)&&!(rJ(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;ej.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==r){let t,o;r=e,this.root.updateBlockedByResize=!0,n&&n(),t=te.now(),o=({timestamp:e})=>{let n=e-t;n>=250&&(eA(o),i(n-250))},ej.setup(o,!0),n=()=>eA(o),iS.hasAnimatedSinceResize&&(iS.hasAnimatedSinceResize=!1,this.nodes.forEac
105h(on))}})}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()||oc,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=i.getProps(),l=!this.targetLayout||!iq(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={...nj(o,"layout"),onPlay:s,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u,t.path)}else t||on(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(),eA(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(oo),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[nb];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",ej,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(i8),this.nodes.forEach(i7);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(i9);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(oe),this.nodes.forEach(ot),this.nodes.forEach(i2),this.nodes.forEach(i3)):this.nodes.forEach(i9),this.clearAllSnapshots();let e=te.now();eC.delta=l(0,1e3/60,e-eC.timestamp),eC.timestamp=e,eC.isProcessing=!0,eI.update.process(eC),eI.preRender.process(eC),eI.render.process(eC),eC.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,e8.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(i6),this.sharedNodes.forEach(os)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ej.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ej.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||rB(this.snapshot.measuredBox.x)||rB(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=G()),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&&!iU(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||tq(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)),of((t=r).x),of(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return G();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(om))){let{scroll:e}=this.root;e&&(tZ(t.x,e.offset.x),tZ(t.y,e.offset.y))}return t}removeElementScroll(e){let t=G();if(i$(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&&i$(t,e),tZ(t.x,i.offset.x),tZ(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||G();i$(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(tZ(r.x,-n.scroll.offset.x),tZ(r.y,-n.scroll.offset.y)),tq(n.latestValues)&&t0(r,n.latestValues,n.layout?.layoutBox)}return tq(this.latestValues)&&t0(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=G();i$(t,e);for(let e=0;e<this.path.length;e++){let n,r=this.path[e];tq(r.latestValues)&&(r.instance&&(tW(r.latestValues)&&r.updateSnapshot(),i$(n=G(),r.measurePageBox())),iF(t,r.latestValues,r.snapshot?.layoutBox,n))}return tq(this.latestValues)&&iF(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!==eC.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
105isTransformDirty),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=eC.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var s,a,l,u;this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,u=this.options.layoutAnchor||void 0,rW(s.x,a.x,l.x,u?.x),rW(s.y,a.y,l.y,u?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):i$(this.target,this.layout.layoutBox),tK(this.target,this.targetDelta)):i$(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||tW(this.parent.latestValues)||tY(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=G(),this.relativeTargetOrigin=G(),rY(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),i$(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===eC.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;i$(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){let i,o,s=n.length;if(s){t.x=t.y=1;for(let a=0;a<s;a++){o=(i=n[a]).projectionDelta;let{visualElement:s}=i.options;(!s||!s.props.style||"contents"!==s.props.style.display)&&(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(tZ(e.x,-i.scroll.offset.x),tZ(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,tK(e,o)),r&&tq(i.latestValues)&&t0(e,i.latestValues,i.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=G());let{target:a}=e;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(iD(this.prevProjectionDelta.x,this.projectionDelta.x),iD(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rH(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===s&&iG(this.projectionDelta.x,this.prevProjectionDelta.x)&&iG(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))}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=q(),this.projectionDelta=q(),this.projectionDeltaWithTransform=q()}setAnimationOrigin(e,t=!1,n){let r,i=this.snapshot,o=i?i.latestValues:{},s={...this.latestValues},a=q();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let l=G(),u=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),d=!c||c.members.length<=1,h=!!(u&&!d&&!0===this.options.crossfade&&!this.path.some(ou));this.animationProgress=0;let f=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,i=f?.(n);if(i?(a.x.translate=i.x,a.x.scale=tN(e.x.scale,1,n),a.x.origin=e.x.origin,a.x.originPoint=e.x.originPoint,a.y.translate=i.y,a.y.scale=tN(e.y.scale,1,n),a.y.origin=e.y.origin,a.y.originPoint=e.y.originPoint):(oa(a.x,e.x,n),oa(a.y,e.y,n)),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var c,p,m,g,y,v;rY(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),m=this.relativeTarget,g=this.relativeTargetOrigin,y=l,v=n,ol(m.x,g.x,y.x,v),ol(m.y,g.y,y.y,v),r&&(c=this.relativeTarget,p=r,
105iH(c.x,p.x)&&iH(c.y,p.y))&&(this.isProjectionDirty=!1),r||(r=G()),i$(r,this.relativeTarget)}u&&(this.animationValues=s,function(e,t,n,r,i,o){i?(e.opacity=tN(0,n.opacity??1,iM(r)),e.opacityExit=tN(t.opacity??1,0,iP(r))):o&&(e.opacity=tN(t.opacity??1,n.opacity??1,r));for(let i=0;i<ij;i++){let o=tO[i],s=iI(t,o),a=iI(n,o);(void 0!==s||void 0!==a)&&(s||(s=0),a||(a=0),0===s||0===a||iC(s)===iC(a)?(e[o]=Math.max(tN(iA(s),iA(a),r),0),(S.test(a)||S.test(s))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=tN(t.rotate||0,n.rotate||0,r))}(s,o,this.latestValues,n,h,d)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=s),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(eA(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ej.update(()=>{var t,n,r;let i;iS.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ti(0)),this.motionValue.jump(0,!1),this.currentAnimation=(t=this.motionValue,n=[0,1e3],r={...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}},(i=X(t)?t:ti(t)).start(rj("",i,n,r)),i.animation),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&&op(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||G();let t=rB(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=rB(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}i$(t,n),t0(t,i),rH(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new iX),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&&i0("z",e,r,this.animationValues);for(let t=0;t<iJ.length;t++)i0(`rotate${iJ[t]}`,e,r,this.animationValues),i0(`skew${iJ[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=nu(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=nu(t?.pointerEvents)||""),this.hasProjected&&!tq(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1);return}e.visibility="";let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();
105let o=function(e,t,n){let r="",i=e.x.translate/t.x,o=e.y.translate/t.y,s=n?.z||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:o,rotateY:s,skewX:a,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),o&&(r+=`rotateX(${o}deg) `),s&&(r+=`rotateY(${s}deg) `),a&&(r+=`skewX(${a}deg) `),l&&(r+=`skewY(${l}deg) `)}let a=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==a||1!==l)&&(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(o=n(i,o)),e.transform=o;let{x:s,y:a}=this.projectionDelta;for(let t in e.transformOrigin=`${100*s.origin}% ${100*a.origin}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0,tL){if(void 0===i[t])continue;let{correct:n,applyTo:s,isCSSVariable:a}=tL[t],l="none"===o?i[t]:n(i[t],r);if(s){let t=s.length;for(let n=0;n<t;n++)e[s[n]]=l}else a?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?nu(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(i7),this.root.sharedNodes.clear()}}}function i2(e){e.updateLayout()}function i3(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if("size"===i)rF(e=>{let r=o?t.measuredBox[e]:t.layoutBox[e],i=rB(r);r.min=n[e].min,r.max=r.min+i});else if("x"===i||"y"===i){let e="x"===i?"y":"x";iO(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else op(i,t.layoutBox,n)&&rF(r=>{let i=o?t.measuredBox[r]:t.layoutBox[r],s=rB(n[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});let s=q();rH(s,n,t.layoutBox);let a=q();o?rH(a,e.applyTransform(r,!0),t.measuredBox):rH(a,n,t.layoutBox);let l=!iU(s),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let s=e.options.layoutAnchor||void 0,a=G();rY(a,t.layoutBox,i.layoutBox,s);let l=G();rY(l,n,o.layoutBox,s),iq(a,l)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function i5(e){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 i4(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function i6(e){e.clearSnapshot()}function i7(e){e.clearMeasurements()}function i8(e){e.isLayoutDirty=!0,e.updateLayout()}function i9(e){e.isLayoutDirty=!1}function oe(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ot(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function on(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function or(e){e.resolveTargetDelta()}function oi(e){e.calcProjection()}function oo(e){e.resetSkewAndRotation()}function os(e){e.removeLeadSnapshot()}function oa(e,t,n){e.translate=tN(t.translate,0,n),e.scale=tN(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ol(e,t,n,r){e.min=tN(t.min,n.min,r),e.max=tN(t.max,n.max,r)}function ou(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let oc={duration:.45,ease:[.4,0,.1,1]},od=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),oh=od("applewebkit/")&&!od("chrome/")?Math.round:ek;function of(e){e.min=oh(e.min),e.max=oh(e.max)}function op(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(iY(t)-iY(n)))}function om(e){return e!==e.root&&e.scroll?.wasRoot}let og=i1({attachResizeListener:(e,t)=>rK(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),oy={current:void 0},ov=i1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oy.current){let e=new og({});e.mount(window),e.setOptions({layoutScroll:!0}),oy.current=e}return oy.current},resetTransform:(e,t)=>
105{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function ob(e,t){let n=rQ(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ox(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&ej.postRender(()=>i(t,r9(t)))}class ow extends nE{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=ob(e,n);return r.forEach(e=>{let n,r=!1,o=!1,s=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},a=e=>{r=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,s(e))},l=e=>{if("touch"!==e.pointerType){if(r){o=!0;return}s(e)}};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||rV.x||rV.y)return;o=!1;let s=t(e,r);"function"==typeof s&&(n=s,e.addEventListener("pointerleave",l,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",a,i)},i)}),o}(e,(e,t)=>(ox(this.node,t,"Start"),e=>ox(this.node,e,"End"))))}unmount(){}}class oS extends nE{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=nI(rK(this.node.current,"focus",()=>this.onFocus()),rK(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var ok=n(85545);let oE=(e,t)=>!!t&&(e===t||oE(e,t.parentElement)),o_=new WeakSet;function oT(e){return t=>{"Enter"===t.key&&e(t)}}function oj(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function oA(e){return r8(e)&&!(rV.x||rV.y)}let oC=new WeakSet;function oI(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&&ej.postRender(()=>i(t,r9(t)))}class oM extends nE{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[r,i,o]=ob(e,n),s=e=>{let r=e.currentTarget;if(!oA(e)||oC.has(e))return;o_.add(r),n.stopPropagation&&oC.add(e);let o=t(r,e),s={...i,capture:!0},a=(e,t)=>{window.removeEventListener("pointerup",l,s),window.removeEventListener("pointercancel",u,s),o_.has(r)&&o_.delete(r),oA(e)&&"function"==typeof o&&o(e,{success:t})},l=e=>{a(e,r===window||r===document||n.useGlobalTarget||oE(r,e.target))},u=e=>{a(e,!1)};window.addEventListener("pointerup",l,s),window.addEventListener("pointercancel",u,s)};return r.forEach(e=>{((n.useGlobalTarget?window:e).addEventListener("pointerdown",s,i),(0,ok.s)(e))&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let r=oT(()=>{if(o_.has(n))return;oj(n,"down");let e=oT(()=>{oj(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>oj(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),rG.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(oI(this.node,t,"Start"),(e,{success:t})=>oI(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}}let oP=new WeakMap,oR=new WeakMap,oO=e=>{let t=oP.get(e.target);t&&t(e)},o$=e=>{e.forEach(oO)},oD={some:0,all:1};class oN extends nE{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.stopObserver?.();let{viewport:n={}}=this.node.getProps(),{root:r,margin:i,amount:o="some",once:s}=n,a={root:r?r.current:void 0,rootMargin:i,threshold:"number"==typeof o?o:oD[o]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,s&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)};this.stopObserver=(e=this.node.current,t=function({root:e,...t}){let n=e||document;oR.has(n)||oR.set(n,{});let r=oR.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(o$,{root:e,...t})),r[i]}(a),oP.set(e,l),t.observe(e),()=>{oP.delete(e),t.unobserve(e)})}mount(){this.startObserver()}update(){if("u"<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(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}let oL=function(e,t){if("u"<typeof Proxy)return nk;let n=new Map,r=(n,r)=>nk(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,nk(o,void 0,e,t)),n.get(o))})}({animation:{Feature:rN},exit:{Feature:rz},inView:{Feature:oN},tap:{Feature:oM},focus:{Feature:oS},hover:{Feature:ow},pan:{Feature:iw},drag:{Feature:ib,ProjectionNode:ov,MeasureLayout:iT},layout:{ProjectionNode:ov,MeasureLayout:iT}},(e,t)=>
105t.isSVG??t6(e)?new tB(t):new t2(t,{allowProjection:e!==t5.Fragment}))}}]);
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.