@dendelion/paper-camp 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,208 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Ru=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oS={exports:{}},Nc={},aS={exports:{}},se={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Wa=Symbol.for("react.element"),_E=Symbol.for("react.portal"),CE=Symbol.for("react.fragment"),PE=Symbol.for("react.strict_mode"),TE=Symbol.for("react.profiler"),EE=Symbol.for("react.provider"),jE=Symbol.for("react.context"),AE=Symbol.for("react.forward_ref"),RE=Symbol.for("react.suspense"),LE=Symbol.for("react.memo"),ME=Symbol.for("react.lazy"),Iy=Symbol.iterator;function IE(e){return e===null||typeof e!="object"?null:(e=Iy&&e[Iy]||e["@@iterator"],typeof e=="function"?e:null)}var lS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uS=Object.assign,cS={};function oo(e,t,n){this.props=e,this.context=t,this.refs=cS,this.updater=n||lS}oo.prototype.isReactComponent={};oo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};oo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dS(){}dS.prototype=oo.prototype;function nm(e,t,n){this.props=e,this.context=t,this.refs=cS,this.updater=n||lS}var rm=nm.prototype=new dS;rm.constructor=nm;uS(rm,oo.prototype);rm.isPureReactComponent=!0;var Dy=Array.isArray,hS=Object.prototype.hasOwnProperty,im={current:null},fS={key:!0,ref:!0,__self:!0,__source:!0};function pS(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)hS.call(t,r)&&!fS.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Wa,type:e,key:s,ref:o,props:i,_owner:im.current}}function DE(e,t){return{$$typeof:Wa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function sm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wa}function NE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ny=/\/+/g;function Sd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?NE(""+e.key):t.toString(36)}function Yl(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Wa:case _E:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Sd(o,0):r,Dy(i)?(n="",e!=null&&(n=e.replace(Ny,"$&/")+"/"),Yl(i,t,n,"",function(u){return u})):i!=null&&(sm(i)&&(i=DE(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Ny,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Dy(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Sd(s,a);o+=Yl(s,t,n,l,i)}else if(l=IE(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Sd(s,a++),o+=Yl(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function cl(e,t,n){if(e==null)return e;var r=[],i=0;return Yl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function BE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _t={current:null},Xl={transition:null},FE={ReactCurrentDispatcher:_t,ReactCurrentBatchConfig:Xl,ReactCurrentOwner:im};function mS(){throw Error("act(...) is not supported in production builds of React.")}se.Children={map:cl,forEach:function(e,t,n){cl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return cl(e,function(){t++}),t},toArray:function(e){return cl(e,function(t){return t})||[]},only:function(e){if(!sm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Component=oo;se.Fragment=CE;se.Profiler=TE;se.PureComponent=nm;se.StrictMode=PE;se.Suspense=RE;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FE;se.act=mS;se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=uS({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=im.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)hS.call(t,l)&&!fS.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Wa,type:e.type,key:i,ref:s,props:r,_owner:o}};se.createContext=function(e){return e={$$typeof:jE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:EE,_context:e},e.Consumer=e};se.createElement=pS;se.createFactory=function(e){var t=pS.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:AE,render:e}};se.isValidElement=sm;se.lazy=function(e){return{$$typeof:ME,_payload:{_status:-1,_result:e},_init:BE}};se.memo=function(e,t){return{$$typeof:LE,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=Xl.transition;Xl.transition={};try{e()}finally{Xl.transition=t}};se.unstable_act=mS;se.useCallback=function(e,t){return _t.current.useCallback(e,t)};se.useContext=function(e){return _t.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return _t.current.useDeferredValue(e)};se.useEffect=function(e,t){return _t.current.useEffect(e,t)};se.useId=function(){return _t.current.useId()};se.useImperativeHandle=function(e,t,n){return _t.current.useImperativeHandle(e,t,n)};se.useInsertionEffect=function(e,t){return _t.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return _t.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return _t.current.useMemo(e,t)};se.useReducer=function(e,t,n){return _t.current.useReducer(e,t,n)};se.useRef=function(e){return _t.current.useRef(e)};se.useState=function(e){return _t.current.useState(e)};se.useSyncExternalStore=function(e,t,n){return _t.current.useSyncExternalStore(e,t,n)};se.useTransition=function(){return _t.current.useTransition()};se.version="18.3.1";aS.exports=se;var C=aS.exports;const Gi=Dc(C);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var VE=C,$E=Symbol.for("react.element"),zE=Symbol.for("react.fragment"),OE=Object.prototype.hasOwnProperty,UE=VE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,WE={key:!0,ref:!0,__self:!0,__source:!0};function gS(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)OE.call(t,r)&&!WE.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:$E,type:e,key:s,ref:o,props:i,_owner:UE.current}}Nc.Fragment=zE;Nc.jsx=gS;Nc.jsxs=gS;oS.exports=Nc;var g=oS.exports,yS={exports:{}},Yt={},vS={exports:{}},xS={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(D,z){var k=D.length;D.push(z);e:for(;0<k;){var U=k-1>>>1,Z=D[U];if(0<i(Z,z))D[U]=z,D[k]=Z,k=U;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var z=D[0],k=D.pop();if(k!==z){D[0]=k;e:for(var U=0,Z=D.length,A=Z>>>1;U<A;){var ue=2*(U+1)-1,pe=D[ue],he=ue+1,tt=D[he];if(0>i(pe,k))he<Z&&0>i(tt,pe)?(D[U]=tt,D[he]=k,U=he):(D[U]=pe,D[ue]=k,U=ue);else if(he<Z&&0>i(tt,k))D[U]=tt,D[he]=k,U=he;else break e}}return z}function i(D,z){var k=D.sortIndex-z.sortIndex;return k!==0?k:D.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,h=3,f=!1,p=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=D)r(u),z.sortIndex=z.expirationTime,t(l,z);else break;z=n(u)}}function b(D){if(y=!1,w(D),!p)if(n(l)!==null)p=!0,V(_);else{var z=n(u);z!==null&&W(b,z.startTime-D)}}function _(D,z){p=!1,y&&(y=!1,m(T),T=-1),f=!0;var k=h;try{for(w(z),d=n(l);d!==null&&(!(d.expirationTime>z)||D&&!L());){var U=d.callback;if(typeof U=="function"){d.callback=null,h=d.priorityLevel;var Z=U(d.expirationTime<=z);z=e.unstable_now(),typeof Z=="function"?d.callback=Z:d===n(l)&&r(l),w(z)}else r(l);d=n(l)}if(d!==null)var A=!0;else{var ue=n(u);ue!==null&&W(b,ue.startTime-z),A=!1}return A}finally{d=null,h=k,f=!1}}var S=!1,P=null,T=-1,j=5,E=-1;function L(){return!(e.unstable_now()-E<j)}function M(){if(P!==null){var D=e.unstable_now();E=D;var z=!0;try{z=P(!0,D)}finally{z?$():(S=!1,P=null)}}else S=!1}var $;if(typeof v=="function")$=function(){v(M)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,F=B.port2;B.port1.onmessage=M,$=function(){F.postMessage(null)}}else $=function(){x(M,0)};function V(D){P=D,S||(S=!0,$())}function W(D,z){T=x(function(){D(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){p||f||(p=!0,V(_))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(D){switch(h){case 1:case 2:case 3:var z=3;break;default:z=h}var k=h;h=z;try{return D()}finally{h=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var k=h;h=D;try{return z()}finally{h=k}},e.unstable_scheduleCallback=function(D,z,k){var U=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?U+k:U):k=U,D){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=k+Z,D={id:c++,callback:z,priorityLevel:D,startTime:k,expirationTime:Z,sortIndex:-1},k>U?(D.sortIndex=k,t(u,D),n(l)===null&&D===n(u)&&(y?(m(T),T=-1):y=!0,W(b,k-U))):(D.sortIndex=Z,t(l,D),p||f||(p=!0,V(_))),D},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(D){var z=h;return function(){var k=h;h=z;try{return D.apply(this,arguments)}finally{h=k}}}})(xS);vS.exports=xS;var HE=vS.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var KE=C,Gt=HE;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wS=new Set,pa={};function es(e,t){Ks(e,t),Ks(e+"Capture",t)}function Ks(e,t){for(pa[e]=t,e=0;e<t.length;e++)wS.add(t[e])}var hr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qh=Object.prototype.hasOwnProperty,GE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,By={},Fy={};function YE(e){return qh.call(Fy,e)?!0:qh.call(By,e)?!1:GE.test(e)?Fy[e]=!0:(By[e]=!0,!1)}function XE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function QE(e,t,n,r){if(t===null||typeof t>"u"||XE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ct(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var dt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){dt[e]=new Ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];dt[t]=new Ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){dt[e]=new Ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dt[e]=new Ct(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){dt[e]=new Ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){dt[e]=new Ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){dt[e]=new Ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){dt[e]=new Ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){dt[e]=new Ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var om=/[\-:]([a-z])/g;function am(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(om,am);dt[t]=new Ct(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(om,am);dt[t]=new Ct(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(om,am);dt[t]=new Ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){dt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!1,!1)});dt.xlinkHref=new Ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){dt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function lm(e,t,n,r){var i=dt.hasOwnProperty(t)?dt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(QE(t,n,i,r)&&(n=null),r||i===null?YE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var yr=KE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,dl=Symbol.for("react.element"),ys=Symbol.for("react.portal"),vs=Symbol.for("react.fragment"),um=Symbol.for("react.strict_mode"),Zh=Symbol.for("react.profiler"),SS=Symbol.for("react.provider"),bS=Symbol.for("react.context"),cm=Symbol.for("react.forward_ref"),Jh=Symbol.for("react.suspense"),ef=Symbol.for("react.suspense_list"),dm=Symbol.for("react.memo"),Dr=Symbol.for("react.lazy"),kS=Symbol.for("react.offscreen"),Vy=Symbol.iterator;function So(e){return e===null||typeof e!="object"?null:(e=Vy&&e[Vy]||e["@@iterator"],typeof e=="function"?e:null)}var De=Object.assign,bd;function zo(e){if(bd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);bd=t&&t[1]||""}return`
34
+ `+bd+e}var kd=!1;function _d(e,t){if(!e||kd)return"";kd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
+ `),s=r.stack.split(`
36
+ `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37
+ `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{kd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zo(e):""}function qE(e){switch(e.tag){case 5:return zo(e.type);case 16:return zo("Lazy");case 13:return zo("Suspense");case 19:return zo("SuspenseList");case 0:case 2:case 15:return e=_d(e.type,!1),e;case 11:return e=_d(e.type.render,!1),e;case 1:return e=_d(e.type,!0),e;default:return""}}function tf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vs:return"Fragment";case ys:return"Portal";case Zh:return"Profiler";case um:return"StrictMode";case Jh:return"Suspense";case ef:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bS:return(e.displayName||"Context")+".Consumer";case SS:return(e._context.displayName||"Context")+".Provider";case cm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dm:return t=e.displayName||null,t!==null?t:tf(e.type)||"Memo";case Dr:t=e._payload,e=e._init;try{return tf(e(t))}catch{}}return null}function ZE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tf(t);case 8:return t===um?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ii(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _S(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function JE(e){var t=_S(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hl(e){e._valueTracker||(e._valueTracker=JE(e))}function CS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_S(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nf(e,t){var n=t.checked;return De({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $y(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ii(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function PS(e,t){t=t.checked,t!=null&&lm(e,"checked",t,!1)}function rf(e,t){PS(e,t);var n=ii(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?sf(e,t.type,n):t.hasOwnProperty("defaultValue")&&sf(e,t.type,ii(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function sf(e,t,n){(t!=="number"||Lu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Oo=Array.isArray;function Ds(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ii(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function of(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(K(91));return De({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oy(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(K(92));if(Oo(n)){if(1<n.length)throw Error(K(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ii(n)}}function TS(e,t){var n=ii(t.value),r=ii(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Uy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ES(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function af(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ES(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var fl,jS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(fl=fl||document.createElement("div"),fl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=fl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ma(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ej=["Webkit","ms","Moz","O"];Object.keys(Yo).forEach(function(e){ej.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yo[t]=Yo[e]})});function AS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yo.hasOwnProperty(e)&&Yo[e]?(""+t).trim():t+"px"}function RS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=AS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var tj=De({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function lf(e,t){if(t){if(tj[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function uf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var cf=null;function hm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var df=null,Ns=null,Bs=null;function Wy(e){if(e=Ga(e)){if(typeof df!="function")throw Error(K(280));var t=e.stateNode;t&&(t=zc(t),df(e.stateNode,e.type,t))}}function LS(e){Ns?Bs?Bs.push(e):Bs=[e]:Ns=e}function MS(){if(Ns){var e=Ns,t=Bs;if(Bs=Ns=null,Wy(e),t)for(e=0;e<t.length;e++)Wy(t[e])}}function IS(e,t){return e(t)}function DS(){}var Cd=!1;function NS(e,t,n){if(Cd)return e(t,n);Cd=!0;try{return IS(e,t,n)}finally{Cd=!1,(Ns!==null||Bs!==null)&&(DS(),MS())}}function ga(e,t){var n=e.stateNode;if(n===null)return null;var r=zc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(K(231,t,typeof n));return n}var hf=!1;if(hr)try{var bo={};Object.defineProperty(bo,"passive",{get:function(){hf=!0}}),window.addEventListener("test",bo,bo),window.removeEventListener("test",bo,bo)}catch{hf=!1}function nj(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Xo=!1,Mu=null,Iu=!1,ff=null,rj={onError:function(e){Xo=!0,Mu=e}};function ij(e,t,n,r,i,s,o,a,l){Xo=!1,Mu=null,nj.apply(rj,arguments)}function sj(e,t,n,r,i,s,o,a,l){if(ij.apply(this,arguments),Xo){if(Xo){var u=Mu;Xo=!1,Mu=null}else throw Error(K(198));Iu||(Iu=!0,ff=u)}}function ts(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function BS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Hy(e){if(ts(e)!==e)throw Error(K(188))}function oj(e){var t=e.alternate;if(!t){if(t=ts(e),t===null)throw Error(K(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Hy(i),e;if(s===r)return Hy(i),t;s=s.sibling}throw Error(K(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(K(189))}}if(n.alternate!==r)throw Error(K(190))}if(n.tag!==3)throw Error(K(188));return n.stateNode.current===n?e:t}function FS(e){return e=oj(e),e!==null?VS(e):null}function VS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=VS(e);if(t!==null)return t;e=e.sibling}return null}var $S=Gt.unstable_scheduleCallback,Ky=Gt.unstable_cancelCallback,aj=Gt.unstable_shouldYield,lj=Gt.unstable_requestPaint,$e=Gt.unstable_now,uj=Gt.unstable_getCurrentPriorityLevel,fm=Gt.unstable_ImmediatePriority,zS=Gt.unstable_UserBlockingPriority,Du=Gt.unstable_NormalPriority,cj=Gt.unstable_LowPriority,OS=Gt.unstable_IdlePriority,Bc=null,Kn=null;function dj(e){if(Kn&&typeof Kn.onCommitFiberRoot=="function")try{Kn.onCommitFiberRoot(Bc,e,void 0,(e.current.flags&128)===128)}catch{}}var Pn=Math.clz32?Math.clz32:pj,hj=Math.log,fj=Math.LN2;function pj(e){return e>>>=0,e===0?32:31-(hj(e)/fj|0)|0}var pl=64,ml=4194304;function Uo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Nu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Uo(a):(s&=o,s!==0&&(r=Uo(s)))}else o=n&~i,o!==0?r=Uo(o):s!==0&&(r=Uo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Pn(t),i=1<<n,r|=e[n],t&=~i;return r}function mj(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gj(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Pn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=mj(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function pf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function US(){var e=pl;return pl<<=1,!(pl&4194240)&&(pl=64),e}function Pd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ha(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pn(t),e[t]=n}function yj(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Pn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function pm(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ye=0;function WS(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var HS,mm,KS,GS,YS,mf=!1,gl=[],Yr=null,Xr=null,Qr=null,ya=new Map,va=new Map,Fr=[],vj="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Gy(e,t){switch(e){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Xr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":ya.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":va.delete(t.pointerId)}}function ko(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ga(t),t!==null&&mm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function xj(e,t,n,r,i){switch(t){case"focusin":return Yr=ko(Yr,e,t,n,r,i),!0;case"dragenter":return Xr=ko(Xr,e,t,n,r,i),!0;case"mouseover":return Qr=ko(Qr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return ya.set(s,ko(ya.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,va.set(s,ko(va.get(s)||null,e,t,n,r,i)),!0}return!1}function XS(e){var t=Ei(e.target);if(t!==null){var n=ts(t);if(n!==null){if(t=n.tag,t===13){if(t=BS(n),t!==null){e.blockedOn=t,YS(e.priority,function(){KS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ql(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);cf=r,n.target.dispatchEvent(r),cf=null}else return t=Ga(n),t!==null&&mm(t),e.blockedOn=n,!1;t.shift()}return!0}function Yy(e,t,n){Ql(e)&&n.delete(t)}function wj(){mf=!1,Yr!==null&&Ql(Yr)&&(Yr=null),Xr!==null&&Ql(Xr)&&(Xr=null),Qr!==null&&Ql(Qr)&&(Qr=null),ya.forEach(Yy),va.forEach(Yy)}function _o(e,t){e.blockedOn===t&&(e.blockedOn=null,mf||(mf=!0,Gt.unstable_scheduleCallback(Gt.unstable_NormalPriority,wj)))}function xa(e){function t(i){return _o(i,e)}if(0<gl.length){_o(gl[0],e);for(var n=1;n<gl.length;n++){var r=gl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Yr!==null&&_o(Yr,e),Xr!==null&&_o(Xr,e),Qr!==null&&_o(Qr,e),ya.forEach(t),va.forEach(t),n=0;n<Fr.length;n++)r=Fr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Fr.length&&(n=Fr[0],n.blockedOn===null);)XS(n),n.blockedOn===null&&Fr.shift()}var Fs=yr.ReactCurrentBatchConfig,Bu=!0;function Sj(e,t,n,r){var i=ye,s=Fs.transition;Fs.transition=null;try{ye=1,gm(e,t,n,r)}finally{ye=i,Fs.transition=s}}function bj(e,t,n,r){var i=ye,s=Fs.transition;Fs.transition=null;try{ye=4,gm(e,t,n,r)}finally{ye=i,Fs.transition=s}}function gm(e,t,n,r){if(Bu){var i=gf(e,t,n,r);if(i===null)Nd(e,t,r,Fu,n),Gy(e,r);else if(xj(i,e,t,n,r))r.stopPropagation();else if(Gy(e,r),t&4&&-1<vj.indexOf(e)){for(;i!==null;){var s=Ga(i);if(s!==null&&HS(s),s=gf(e,t,n,r),s===null&&Nd(e,t,r,Fu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}var Fu=null;function gf(e,t,n,r){if(Fu=null,e=hm(r),e=Ei(e),e!==null)if(t=ts(e),t===null)e=null;else if(n=t.tag,n===13){if(e=BS(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Fu=e,null}function QS(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(uj()){case fm:return 1;case zS:return 4;case Du:case cj:return 16;case OS:return 536870912;default:return 16}default:return 16}}var $r=null,ym=null,ql=null;function qS(){if(ql)return ql;var e,t=ym,n=t.length,r,i="value"in $r?$r.value:$r.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return ql=i.slice(e,1<r?1-r:void 0)}function Zl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yl(){return!0}function Xy(){return!1}function Xt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?yl:Xy,this.isPropagationStopped=Xy,this}return De(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yl)},persist:function(){},isPersistent:yl}),t}var ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vm=Xt(ao),Ka=De({},ao,{view:0,detail:0}),kj=Xt(Ka),Td,Ed,Co,Fc=De({},Ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Co&&(Co&&e.type==="mousemove"?(Td=e.screenX-Co.screenX,Ed=e.screenY-Co.screenY):Ed=Td=0,Co=e),Td)},movementY:function(e){return"movementY"in e?e.movementY:Ed}}),Qy=Xt(Fc),_j=De({},Fc,{dataTransfer:0}),Cj=Xt(_j),Pj=De({},Ka,{relatedTarget:0}),jd=Xt(Pj),Tj=De({},ao,{animationName:0,elapsedTime:0,pseudoElement:0}),Ej=Xt(Tj),jj=De({},ao,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Aj=Xt(jj),Rj=De({},ao,{data:0}),qy=Xt(Rj),Lj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mj={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ij={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dj(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ij[e])?!!t[e]:!1}function xm(){return Dj}var Nj=De({},Ka,{key:function(e){if(e.key){var t=Lj[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Zl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xm,charCode:function(e){return e.type==="keypress"?Zl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Bj=Xt(Nj),Fj=De({},Fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zy=Xt(Fj),Vj=De({},Ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xm}),$j=Xt(Vj),zj=De({},ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),Oj=Xt(zj),Uj=De({},Fc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wj=Xt(Uj),Hj=[9,13,27,32],wm=hr&&"CompositionEvent"in window,Qo=null;hr&&"documentMode"in document&&(Qo=document.documentMode);var Kj=hr&&"TextEvent"in window&&!Qo,ZS=hr&&(!wm||Qo&&8<Qo&&11>=Qo),Jy=" ",ev=!1;function JS(e,t){switch(e){case"keyup":return Hj.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function Gj(e,t){switch(e){case"compositionend":return eb(t);case"keypress":return t.which!==32?null:(ev=!0,Jy);case"textInput":return e=t.data,e===Jy&&ev?null:e;default:return null}}function Yj(e,t){if(xs)return e==="compositionend"||!wm&&JS(e,t)?(e=qS(),ql=ym=$r=null,xs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ZS&&t.locale!=="ko"?null:t.data;default:return null}}var Xj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Xj[e.type]:t==="textarea"}function tb(e,t,n,r){LS(r),t=Vu(t,"onChange"),0<t.length&&(n=new vm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qo=null,wa=null;function Qj(e){hb(e,0)}function Vc(e){var t=bs(e);if(CS(t))return e}function qj(e,t){if(e==="change")return t}var nb=!1;if(hr){var Ad;if(hr){var Rd="oninput"in document;if(!Rd){var nv=document.createElement("div");nv.setAttribute("oninput","return;"),Rd=typeof nv.oninput=="function"}Ad=Rd}else Ad=!1;nb=Ad&&(!document.documentMode||9<document.documentMode)}function rv(){qo&&(qo.detachEvent("onpropertychange",rb),wa=qo=null)}function rb(e){if(e.propertyName==="value"&&Vc(wa)){var t=[];tb(t,wa,e,hm(e)),NS(Qj,t)}}function Zj(e,t,n){e==="focusin"?(rv(),qo=t,wa=n,qo.attachEvent("onpropertychange",rb)):e==="focusout"&&rv()}function Jj(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vc(wa)}function eA(e,t){if(e==="click")return Vc(t)}function tA(e,t){if(e==="input"||e==="change")return Vc(t)}function nA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rn=typeof Object.is=="function"?Object.is:nA;function Sa(e,t){if(Rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!qh.call(t,i)||!Rn(e[i],t[i]))return!1}return!0}function iv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sv(e,t){var n=iv(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=iv(n)}}function ib(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ib(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sb(){for(var e=window,t=Lu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lu(e.document)}return t}function Sm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function rA(e){var t=sb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ib(n.ownerDocument.documentElement,n)){if(r!==null&&Sm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=sv(n,s);var o=sv(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var iA=hr&&"documentMode"in document&&11>=document.documentMode,ws=null,yf=null,Zo=null,vf=!1;function ov(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vf||ws==null||ws!==Lu(r)||(r=ws,"selectionStart"in r&&Sm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zo&&Sa(Zo,r)||(Zo=r,r=Vu(yf,"onSelect"),0<r.length&&(t=new vm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ws)))}function vl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ss={animationend:vl("Animation","AnimationEnd"),animationiteration:vl("Animation","AnimationIteration"),animationstart:vl("Animation","AnimationStart"),transitionend:vl("Transition","TransitionEnd")},Ld={},ob={};hr&&(ob=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function $c(e){if(Ld[e])return Ld[e];if(!Ss[e])return e;var t=Ss[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ob)return Ld[e]=t[n];return e}var ab=$c("animationend"),lb=$c("animationiteration"),ub=$c("animationstart"),cb=$c("transitionend"),db=new Map,av="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ci(e,t){db.set(e,t),es(t,[e])}for(var Md=0;Md<av.length;Md++){var Id=av[Md],sA=Id.toLowerCase(),oA=Id[0].toUpperCase()+Id.slice(1);ci(sA,"on"+oA)}ci(ab,"onAnimationEnd");ci(lb,"onAnimationIteration");ci(ub,"onAnimationStart");ci("dblclick","onDoubleClick");ci("focusin","onFocus");ci("focusout","onBlur");ci(cb,"onTransitionEnd");Ks("onMouseEnter",["mouseout","mouseover"]);Ks("onMouseLeave",["mouseout","mouseover"]);Ks("onPointerEnter",["pointerout","pointerover"]);Ks("onPointerLeave",["pointerout","pointerover"]);es("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));es("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));es("onBeforeInput",["compositionend","keypress","textInput","paste"]);es("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));es("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));es("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),aA=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wo));function lv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,sj(r,t,void 0,e),e.currentTarget=null}function hb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;lv(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;lv(i,a,u),s=l}}}if(Iu)throw e=ff,Iu=!1,ff=null,e}function Ee(e,t){var n=t[kf];n===void 0&&(n=t[kf]=new Set);var r=e+"__bubble";n.has(r)||(fb(t,e,2,!1),n.add(r))}function Dd(e,t,n){var r=0;t&&(r|=4),fb(n,e,r,t)}var xl="_reactListening"+Math.random().toString(36).slice(2);function ba(e){if(!e[xl]){e[xl]=!0,wS.forEach(function(n){n!=="selectionchange"&&(aA.has(n)||Dd(n,!1,e),Dd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xl]||(t[xl]=!0,Dd("selectionchange",!1,t))}}function fb(e,t,n,r){switch(QS(t)){case 1:var i=Sj;break;case 4:i=bj;break;default:i=gm}n=i.bind(null,t,n,e),i=void 0,!hf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Nd(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Ei(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}NS(function(){var u=s,c=hm(n),d=[];e:{var h=db.get(e);if(h!==void 0){var f=vm,p=e;switch(e){case"keypress":if(Zl(n)===0)break e;case"keydown":case"keyup":f=Bj;break;case"focusin":p="focus",f=jd;break;case"focusout":p="blur",f=jd;break;case"beforeblur":case"afterblur":f=jd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Qy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Cj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=$j;break;case ab:case lb:case ub:f=Ej;break;case cb:f=Oj;break;case"scroll":f=kj;break;case"wheel":f=Wj;break;case"copy":case"cut":case"paste":f=Aj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Zy}var y=(t&4)!==0,x=!y&&e==="scroll",m=y?h!==null?h+"Capture":null:h;y=[];for(var v=u,w;v!==null;){w=v;var b=w.stateNode;if(w.tag===5&&b!==null&&(w=b,m!==null&&(b=ga(v,m),b!=null&&y.push(ka(v,b,w)))),x)break;v=v.return}0<y.length&&(h=new f(h,p,null,n,c),d.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",h&&n!==cf&&(p=n.relatedTarget||n.fromElement)&&(Ei(p)||p[fr]))break e;if((f||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,f?(p=n.relatedTarget||n.toElement,f=u,p=p?Ei(p):null,p!==null&&(x=ts(p),p!==x||p.tag!==5&&p.tag!==6)&&(p=null)):(f=null,p=u),f!==p)){if(y=Qy,b="onMouseLeave",m="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(y=Zy,b="onPointerLeave",m="onPointerEnter",v="pointer"),x=f==null?h:bs(f),w=p==null?h:bs(p),h=new y(b,v+"leave",f,n,c),h.target=x,h.relatedTarget=w,b=null,Ei(c)===u&&(y=new y(m,v+"enter",p,n,c),y.target=w,y.relatedTarget=x,b=y),x=b,f&&p)t:{for(y=f,m=p,v=0,w=y;w;w=os(w))v++;for(w=0,b=m;b;b=os(b))w++;for(;0<v-w;)y=os(y),v--;for(;0<w-v;)m=os(m),w--;for(;v--;){if(y===m||m!==null&&y===m.alternate)break t;y=os(y),m=os(m)}y=null}else y=null;f!==null&&uv(d,h,f,y,!1),p!==null&&x!==null&&uv(d,x,p,y,!0)}}e:{if(h=u?bs(u):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var _=qj;else if(tv(h))if(nb)_=tA;else{_=Jj;var S=Zj}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=eA);if(_&&(_=_(e,u))){tb(d,_,n,c);break e}S&&S(e,h,u),e==="focusout"&&(S=h._wrapperState)&&S.controlled&&h.type==="number"&&sf(h,"number",h.value)}switch(S=u?bs(u):window,e){case"focusin":(tv(S)||S.contentEditable==="true")&&(ws=S,yf=u,Zo=null);break;case"focusout":Zo=yf=ws=null;break;case"mousedown":vf=!0;break;case"contextmenu":case"mouseup":case"dragend":vf=!1,ov(d,n,c);break;case"selectionchange":if(iA)break;case"keydown":case"keyup":ov(d,n,c)}var P;if(wm)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else xs?JS(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(ZS&&n.locale!=="ko"&&(xs||T!=="onCompositionStart"?T==="onCompositionEnd"&&xs&&(P=qS()):($r=c,ym="value"in $r?$r.value:$r.textContent,xs=!0)),S=Vu(u,T),0<S.length&&(T=new qy(T,e,null,n,c),d.push({event:T,listeners:S}),P?T.data=P:(P=eb(n),P!==null&&(T.data=P)))),(P=Kj?Gj(e,n):Yj(e,n))&&(u=Vu(u,"onBeforeInput"),0<u.length&&(c=new qy("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=P))}hb(d,t)})}function ka(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ga(e,n),s!=null&&r.unshift(ka(e,s,i)),s=ga(e,t),s!=null&&r.push(ka(e,s,i))),e=e.return}return r}function os(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function uv(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=ga(n,s),l!=null&&o.unshift(ka(n,l,a))):i||(l=ga(n,s),l!=null&&o.push(ka(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var lA=/\r\n?/g,uA=/\u0000|\uFFFD/g;function cv(e){return(typeof e=="string"?e:""+e).replace(lA,`
38
+ `).replace(uA,"")}function wl(e,t,n){if(t=cv(t),cv(e)!==t&&n)throw Error(K(425))}function $u(){}var xf=null,wf=null;function Sf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bf=typeof setTimeout=="function"?setTimeout:void 0,cA=typeof clearTimeout=="function"?clearTimeout:void 0,dv=typeof Promise=="function"?Promise:void 0,dA=typeof queueMicrotask=="function"?queueMicrotask:typeof dv<"u"?function(e){return dv.resolve(null).then(e).catch(hA)}:bf;function hA(e){setTimeout(function(){throw e})}function Bd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),xa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);xa(t)}function qr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function hv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var lo=Math.random().toString(36).slice(2),Wn="__reactFiber$"+lo,_a="__reactProps$"+lo,fr="__reactContainer$"+lo,kf="__reactEvents$"+lo,fA="__reactListeners$"+lo,pA="__reactHandles$"+lo;function Ei(e){var t=e[Wn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fr]||n[Wn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hv(e);e!==null;){if(n=e[Wn])return n;e=hv(e)}return t}e=n,n=e.parentNode}return null}function Ga(e){return e=e[Wn]||e[fr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function bs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(K(33))}function zc(e){return e[_a]||null}var _f=[],ks=-1;function di(e){return{current:e}}function je(e){0>ks||(e.current=_f[ks],_f[ks]=null,ks--)}function _e(e,t){ks++,_f[ks]=e.current,e.current=t}var si={},gt=di(si),Rt=di(!1),Yi=si;function Gs(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Lt(e){return e=e.childContextTypes,e!=null}function zu(){je(Rt),je(gt)}function fv(e,t,n){if(gt.current!==si)throw Error(K(168));_e(gt,t),_e(Rt,n)}function pb(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(K(108,ZE(e)||"Unknown",i));return De({},n,r)}function Ou(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Yi=gt.current,_e(gt,e),_e(Rt,Rt.current),!0}function pv(e,t,n){var r=e.stateNode;if(!r)throw Error(K(169));n?(e=pb(e,t,Yi),r.__reactInternalMemoizedMergedChildContext=e,je(Rt),je(gt),_e(gt,e)):je(Rt),_e(Rt,n)}var or=null,Oc=!1,Fd=!1;function mb(e){or===null?or=[e]:or.push(e)}function mA(e){Oc=!0,mb(e)}function hi(){if(!Fd&&or!==null){Fd=!0;var e=0,t=ye;try{var n=or;for(ye=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}or=null,Oc=!1}catch(i){throw or!==null&&(or=or.slice(e+1)),$S(fm,hi),i}finally{ye=t,Fd=!1}}return null}var _s=[],Cs=0,Uu=null,Wu=0,tn=[],nn=0,Xi=null,ar=1,lr="";function ki(e,t){_s[Cs++]=Wu,_s[Cs++]=Uu,Uu=e,Wu=t}function gb(e,t,n){tn[nn++]=ar,tn[nn++]=lr,tn[nn++]=Xi,Xi=e;var r=ar;e=lr;var i=32-Pn(r)-1;r&=~(1<<i),n+=1;var s=32-Pn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ar=1<<32-Pn(t)+i|n<<i|r,lr=s+e}else ar=1<<s|n<<i|r,lr=e}function bm(e){e.return!==null&&(ki(e,1),gb(e,1,0))}function km(e){for(;e===Uu;)Uu=_s[--Cs],_s[Cs]=null,Wu=_s[--Cs],_s[Cs]=null;for(;e===Xi;)Xi=tn[--nn],tn[nn]=null,lr=tn[--nn],tn[nn]=null,ar=tn[--nn],tn[nn]=null}var Ht=null,Ot=null,Re=!1,_n=null;function yb(e,t){var n=sn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function mv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ht=e,Ot=qr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ht=e,Ot=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Xi!==null?{id:ar,overflow:lr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=sn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ht=e,Ot=null,!0):!1;default:return!1}}function Cf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pf(e){if(Re){var t=Ot;if(t){var n=t;if(!mv(e,t)){if(Cf(e))throw Error(K(418));t=qr(n.nextSibling);var r=Ht;t&&mv(e,t)?yb(r,n):(e.flags=e.flags&-4097|2,Re=!1,Ht=e)}}else{if(Cf(e))throw Error(K(418));e.flags=e.flags&-4097|2,Re=!1,Ht=e}}}function gv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ht=e}function Sl(e){if(e!==Ht)return!1;if(!Re)return gv(e),Re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Sf(e.type,e.memoizedProps)),t&&(t=Ot)){if(Cf(e))throw vb(),Error(K(418));for(;t;)yb(e,t),t=qr(t.nextSibling)}if(gv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(K(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ot=qr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ot=null}}else Ot=Ht?qr(e.stateNode.nextSibling):null;return!0}function vb(){for(var e=Ot;e;)e=qr(e.nextSibling)}function Ys(){Ot=Ht=null,Re=!1}function _m(e){_n===null?_n=[e]:_n.push(e)}var gA=yr.ReactCurrentBatchConfig;function Po(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(K(309));var r=n.stateNode}if(!r)throw Error(K(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(K(284));if(!n._owner)throw Error(K(290,e))}return e}function bl(e,t){throw e=Object.prototype.toString.call(t),Error(K(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yv(e){var t=e._init;return t(e._payload)}function xb(e){function t(m,v){if(e){var w=m.deletions;w===null?(m.deletions=[v],m.flags|=16):w.push(v)}}function n(m,v){if(!e)return null;for(;v!==null;)t(m,v),v=v.sibling;return null}function r(m,v){for(m=new Map;v!==null;)v.key!==null?m.set(v.key,v):m.set(v.index,v),v=v.sibling;return m}function i(m,v){return m=ti(m,v),m.index=0,m.sibling=null,m}function s(m,v,w){return m.index=w,e?(w=m.alternate,w!==null?(w=w.index,w<v?(m.flags|=2,v):w):(m.flags|=2,v)):(m.flags|=1048576,v)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,v,w,b){return v===null||v.tag!==6?(v=Hd(w,m.mode,b),v.return=m,v):(v=i(v,w),v.return=m,v)}function l(m,v,w,b){var _=w.type;return _===vs?c(m,v,w.props.children,b,w.key):v!==null&&(v.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Dr&&yv(_)===v.type)?(b=i(v,w.props),b.ref=Po(m,v,w),b.return=m,b):(b=su(w.type,w.key,w.props,null,m.mode,b),b.ref=Po(m,v,w),b.return=m,b)}function u(m,v,w,b){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=Kd(w,m.mode,b),v.return=m,v):(v=i(v,w.children||[]),v.return=m,v)}function c(m,v,w,b,_){return v===null||v.tag!==7?(v=Fi(w,m.mode,b,_),v.return=m,v):(v=i(v,w),v.return=m,v)}function d(m,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Hd(""+v,m.mode,w),v.return=m,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case dl:return w=su(v.type,v.key,v.props,null,m.mode,w),w.ref=Po(m,null,v),w.return=m,w;case ys:return v=Kd(v,m.mode,w),v.return=m,v;case Dr:var b=v._init;return d(m,b(v._payload),w)}if(Oo(v)||So(v))return v=Fi(v,m.mode,w,null),v.return=m,v;bl(m,v)}return null}function h(m,v,w,b){var _=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return _!==null?null:a(m,v,""+w,b);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case dl:return w.key===_?l(m,v,w,b):null;case ys:return w.key===_?u(m,v,w,b):null;case Dr:return _=w._init,h(m,v,_(w._payload),b)}if(Oo(w)||So(w))return _!==null?null:c(m,v,w,b,null);bl(m,w)}return null}function f(m,v,w,b,_){if(typeof b=="string"&&b!==""||typeof b=="number")return m=m.get(w)||null,a(v,m,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case dl:return m=m.get(b.key===null?w:b.key)||null,l(v,m,b,_);case ys:return m=m.get(b.key===null?w:b.key)||null,u(v,m,b,_);case Dr:var S=b._init;return f(m,v,w,S(b._payload),_)}if(Oo(b)||So(b))return m=m.get(w)||null,c(v,m,b,_,null);bl(v,b)}return null}function p(m,v,w,b){for(var _=null,S=null,P=v,T=v=0,j=null;P!==null&&T<w.length;T++){P.index>T?(j=P,P=null):j=P.sibling;var E=h(m,P,w[T],b);if(E===null){P===null&&(P=j);break}e&&P&&E.alternate===null&&t(m,P),v=s(E,v,T),S===null?_=E:S.sibling=E,S=E,P=j}if(T===w.length)return n(m,P),Re&&ki(m,T),_;if(P===null){for(;T<w.length;T++)P=d(m,w[T],b),P!==null&&(v=s(P,v,T),S===null?_=P:S.sibling=P,S=P);return Re&&ki(m,T),_}for(P=r(m,P);T<w.length;T++)j=f(P,m,T,w[T],b),j!==null&&(e&&j.alternate!==null&&P.delete(j.key===null?T:j.key),v=s(j,v,T),S===null?_=j:S.sibling=j,S=j);return e&&P.forEach(function(L){return t(m,L)}),Re&&ki(m,T),_}function y(m,v,w,b){var _=So(w);if(typeof _!="function")throw Error(K(150));if(w=_.call(w),w==null)throw Error(K(151));for(var S=_=null,P=v,T=v=0,j=null,E=w.next();P!==null&&!E.done;T++,E=w.next()){P.index>T?(j=P,P=null):j=P.sibling;var L=h(m,P,E.value,b);if(L===null){P===null&&(P=j);break}e&&P&&L.alternate===null&&t(m,P),v=s(L,v,T),S===null?_=L:S.sibling=L,S=L,P=j}if(E.done)return n(m,P),Re&&ki(m,T),_;if(P===null){for(;!E.done;T++,E=w.next())E=d(m,E.value,b),E!==null&&(v=s(E,v,T),S===null?_=E:S.sibling=E,S=E);return Re&&ki(m,T),_}for(P=r(m,P);!E.done;T++,E=w.next())E=f(P,m,T,E.value,b),E!==null&&(e&&E.alternate!==null&&P.delete(E.key===null?T:E.key),v=s(E,v,T),S===null?_=E:S.sibling=E,S=E);return e&&P.forEach(function(M){return t(m,M)}),Re&&ki(m,T),_}function x(m,v,w,b){if(typeof w=="object"&&w!==null&&w.type===vs&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case dl:e:{for(var _=w.key,S=v;S!==null;){if(S.key===_){if(_=w.type,_===vs){if(S.tag===7){n(m,S.sibling),v=i(S,w.props.children),v.return=m,m=v;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Dr&&yv(_)===S.type){n(m,S.sibling),v=i(S,w.props),v.ref=Po(m,S,w),v.return=m,m=v;break e}n(m,S);break}else t(m,S);S=S.sibling}w.type===vs?(v=Fi(w.props.children,m.mode,b,w.key),v.return=m,m=v):(b=su(w.type,w.key,w.props,null,m.mode,b),b.ref=Po(m,v,w),b.return=m,m=b)}return o(m);case ys:e:{for(S=w.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(m,v.sibling),v=i(v,w.children||[]),v.return=m,m=v;break e}else{n(m,v);break}else t(m,v);v=v.sibling}v=Kd(w,m.mode,b),v.return=m,m=v}return o(m);case Dr:return S=w._init,x(m,v,S(w._payload),b)}if(Oo(w))return p(m,v,w,b);if(So(w))return y(m,v,w,b);bl(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(m,v.sibling),v=i(v,w),v.return=m,m=v):(n(m,v),v=Hd(w,m.mode,b),v.return=m,m=v),o(m)):n(m,v)}return x}var Xs=xb(!0),wb=xb(!1),Hu=di(null),Ku=null,Ps=null,Cm=null;function Pm(){Cm=Ps=Ku=null}function Tm(e){var t=Hu.current;je(Hu),e._currentValue=t}function Tf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Vs(e,t){Ku=e,Cm=Ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function fn(e){var t=e._currentValue;if(Cm!==e)if(e={context:e,memoizedValue:t,next:null},Ps===null){if(Ku===null)throw Error(K(308));Ps=e,Ku.dependencies={lanes:0,firstContext:e}}else Ps=Ps.next=e;return t}var ji=null;function Em(e){ji===null?ji=[e]:ji.push(e)}function Sb(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Em(t)):(n.next=i.next,i.next=n),t.interleaved=n,pr(e,r)}function pr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Nr=!1;function jm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bb(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function cr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,de&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,pr(e,n)}return i=r.interleaved,i===null?(t.next=t,Em(r)):(t.next=i.next,i.next=t),r.interleaved=t,pr(e,n)}function Jl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pm(e,n)}}function vv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gu(e,t,n,r){var i=e.updateQueue;Nr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,c=u=l=null,a=s;do{var h=a.lane,f=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,y=a;switch(h=t,f=n,y.tag){case 1:if(p=y.payload,typeof p=="function"){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=y.payload,h=typeof p=="function"?p.call(f,d,h):p,h==null)break e;d=De({},d,h);break e;case 2:Nr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=f,l=d):c=c.next=f,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);qi|=o,e.lanes=o,e.memoizedState=d}}function xv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(K(191,i));i.call(r)}}}var Ya={},Gn=di(Ya),Ca=di(Ya),Pa=di(Ya);function Ai(e){if(e===Ya)throw Error(K(174));return e}function Am(e,t){switch(_e(Pa,t),_e(Ca,e),_e(Gn,Ya),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:af(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=af(t,e)}je(Gn),_e(Gn,t)}function Qs(){je(Gn),je(Ca),je(Pa)}function kb(e){Ai(Pa.current);var t=Ai(Gn.current),n=af(t,e.type);t!==n&&(_e(Ca,e),_e(Gn,n))}function Rm(e){Ca.current===e&&(je(Gn),je(Ca))}var Me=di(0);function Yu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vd=[];function Lm(){for(var e=0;e<Vd.length;e++)Vd[e]._workInProgressVersionPrimary=null;Vd.length=0}var eu=yr.ReactCurrentDispatcher,$d=yr.ReactCurrentBatchConfig,Qi=0,Ie=null,Je=null,nt=null,Xu=!1,Jo=!1,Ta=0,yA=0;function ht(){throw Error(K(321))}function Mm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rn(e[n],t[n]))return!1;return!0}function Im(e,t,n,r,i,s){if(Qi=s,Ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,eu.current=e===null||e.memoizedState===null?SA:bA,e=n(r,i),Jo){s=0;do{if(Jo=!1,Ta=0,25<=s)throw Error(K(301));s+=1,nt=Je=null,t.updateQueue=null,eu.current=kA,e=n(r,i)}while(Jo)}if(eu.current=Qu,t=Je!==null&&Je.next!==null,Qi=0,nt=Je=Ie=null,Xu=!1,t)throw Error(K(300));return e}function Dm(){var e=Ta!==0;return Ta=0,e}function Bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?Ie.memoizedState=nt=e:nt=nt.next=e,nt}function pn(){if(Je===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=nt===null?Ie.memoizedState:nt.next;if(t!==null)nt=t,Je=e;else{if(e===null)throw Error(K(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},nt===null?Ie.memoizedState=nt=e:nt=nt.next=e}return nt}function Ea(e,t){return typeof t=="function"?t(e):t}function zd(e){var t=pn(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=Je,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((Qi&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Ie.lanes|=c,qi|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Rn(r,t.memoizedState)||(jt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Ie.lanes|=s,qi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Od(e){var t=pn(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);Rn(s,t.memoizedState)||(jt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function _b(){}function Cb(e,t){var n=Ie,r=pn(),i=t(),s=!Rn(r.memoizedState,i);if(s&&(r.memoizedState=i,jt=!0),r=r.queue,Nm(Eb.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||nt!==null&&nt.memoizedState.tag&1){if(n.flags|=2048,ja(9,Tb.bind(null,n,r,i,t),void 0,null),rt===null)throw Error(K(349));Qi&30||Pb(n,t,i)}return i}function Pb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Tb(e,t,n,r){t.value=n,t.getSnapshot=r,jb(t)&&Ab(e)}function Eb(e,t,n){return n(function(){jb(t)&&Ab(e)})}function jb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rn(e,n)}catch{return!0}}function Ab(e){var t=pr(e,1);t!==null&&Tn(t,e,1,-1)}function wv(e){var t=Bn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:e},t.queue=e,e=e.dispatch=wA.bind(null,Ie,e),[t.memoizedState,e]}function ja(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Rb(){return pn().memoizedState}function tu(e,t,n,r){var i=Bn();Ie.flags|=e,i.memoizedState=ja(1|t,n,void 0,r===void 0?null:r)}function Uc(e,t,n,r){var i=pn();r=r===void 0?null:r;var s=void 0;if(Je!==null){var o=Je.memoizedState;if(s=o.destroy,r!==null&&Mm(r,o.deps)){i.memoizedState=ja(t,n,s,r);return}}Ie.flags|=e,i.memoizedState=ja(1|t,n,s,r)}function Sv(e,t){return tu(8390656,8,e,t)}function Nm(e,t){return Uc(2048,8,e,t)}function Lb(e,t){return Uc(4,2,e,t)}function Mb(e,t){return Uc(4,4,e,t)}function Ib(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Db(e,t,n){return n=n!=null?n.concat([e]):null,Uc(4,4,Ib.bind(null,t,e),n)}function Bm(){}function Nb(e,t){var n=pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Mm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Bb(e,t){var n=pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Mm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Fb(e,t,n){return Qi&21?(Rn(n,t)||(n=US(),Ie.lanes|=n,qi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jt=!0),e.memoizedState=n)}function vA(e,t){var n=ye;ye=n!==0&&4>n?n:4,e(!0);var r=$d.transition;$d.transition={};try{e(!1),t()}finally{ye=n,$d.transition=r}}function Vb(){return pn().memoizedState}function xA(e,t,n){var r=ei(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$b(e))zb(t,n);else if(n=Sb(e,t,n,r),n!==null){var i=kt();Tn(n,e,r,i),Ob(n,t,r)}}function wA(e,t,n){var r=ei(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($b(e))zb(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Rn(a,o)){var l=t.interleaved;l===null?(i.next=i,Em(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Sb(e,t,i,r),n!==null&&(i=kt(),Tn(n,e,r,i),Ob(n,t,r))}}function $b(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function zb(e,t){Jo=Xu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ob(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pm(e,n)}}var Qu={readContext:fn,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},SA={readContext:fn,useCallback:function(e,t){return Bn().memoizedState=[e,t===void 0?null:t],e},useContext:fn,useEffect:Sv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,tu(4194308,4,Ib.bind(null,t,e),n)},useLayoutEffect:function(e,t){return tu(4194308,4,e,t)},useInsertionEffect:function(e,t){return tu(4,2,e,t)},useMemo:function(e,t){var n=Bn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=xA.bind(null,Ie,e),[r.memoizedState,e]},useRef:function(e){var t=Bn();return e={current:e},t.memoizedState=e},useState:wv,useDebugValue:Bm,useDeferredValue:function(e){return Bn().memoizedState=e},useTransition:function(){var e=wv(!1),t=e[0];return e=vA.bind(null,e[1]),Bn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ie,i=Bn();if(Re){if(n===void 0)throw Error(K(407));n=n()}else{if(n=t(),rt===null)throw Error(K(349));Qi&30||Pb(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Sv(Eb.bind(null,r,s,e),[e]),r.flags|=2048,ja(9,Tb.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Bn(),t=rt.identifierPrefix;if(Re){var n=lr,r=ar;n=(r&~(1<<32-Pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ta++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=yA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},bA={readContext:fn,useCallback:Nb,useContext:fn,useEffect:Nm,useImperativeHandle:Db,useInsertionEffect:Lb,useLayoutEffect:Mb,useMemo:Bb,useReducer:zd,useRef:Rb,useState:function(){return zd(Ea)},useDebugValue:Bm,useDeferredValue:function(e){var t=pn();return Fb(t,Je.memoizedState,e)},useTransition:function(){var e=zd(Ea)[0],t=pn().memoizedState;return[e,t]},useMutableSource:_b,useSyncExternalStore:Cb,useId:Vb,unstable_isNewReconciler:!1},kA={readContext:fn,useCallback:Nb,useContext:fn,useEffect:Nm,useImperativeHandle:Db,useInsertionEffect:Lb,useLayoutEffect:Mb,useMemo:Bb,useReducer:Od,useRef:Rb,useState:function(){return Od(Ea)},useDebugValue:Bm,useDeferredValue:function(e){var t=pn();return Je===null?t.memoizedState=e:Fb(t,Je.memoizedState,e)},useTransition:function(){var e=Od(Ea)[0],t=pn().memoizedState;return[e,t]},useMutableSource:_b,useSyncExternalStore:Cb,useId:Vb,unstable_isNewReconciler:!1};function bn(e,t){if(e&&e.defaultProps){t=De({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ef(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:De({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wc={isMounted:function(e){return(e=e._reactInternals)?ts(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=kt(),i=ei(e),s=cr(r,i);s.payload=t,n!=null&&(s.callback=n),t=Zr(e,s,i),t!==null&&(Tn(t,e,i,r),Jl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=kt(),i=ei(e),s=cr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Zr(e,s,i),t!==null&&(Tn(t,e,i,r),Jl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kt(),r=ei(e),i=cr(n,r);i.tag=2,t!=null&&(i.callback=t),t=Zr(e,i,r),t!==null&&(Tn(t,e,r,n),Jl(t,e,r))}};function bv(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Sa(n,r)||!Sa(i,s):!0}function Ub(e,t,n){var r=!1,i=si,s=t.contextType;return typeof s=="object"&&s!==null?s=fn(s):(i=Lt(t)?Yi:gt.current,r=t.contextTypes,s=(r=r!=null)?Gs(e,i):si),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function kv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Wc.enqueueReplaceState(t,t.state,null)}function jf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},jm(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=fn(s):(s=Lt(t)?Yi:gt.current,i.context=Gs(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ef(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Wc.enqueueReplaceState(i,i.state,null),Gu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function qs(e,t){try{var n="",r=t;do n+=qE(r),r=r.return;while(r);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Ud(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Af(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var _A=typeof WeakMap=="function"?WeakMap:Map;function Wb(e,t,n){n=cr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zu||(Zu=!0,$f=r),Af(e,t)},n}function Hb(e,t,n){n=cr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Af(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Af(e,t),typeof r!="function"&&(Jr===null?Jr=new Set([this]):Jr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function _v(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new _A;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=FA.bind(null,e,t,n),t.then(e,e))}function Cv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Pv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=cr(-1,1),t.tag=2,Zr(n,t,1))),n.lanes|=1),e)}var CA=yr.ReactCurrentOwner,jt=!1;function vt(e,t,n,r){t.child=e===null?wb(t,null,n,r):Xs(t,e.child,n,r)}function Tv(e,t,n,r,i){n=n.render;var s=t.ref;return Vs(t,i),r=Im(e,t,n,r,s,i),n=Dm(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mr(e,t,i)):(Re&&n&&bm(t),t.flags|=1,vt(e,t,r,i),t.child)}function Ev(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Hm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Kb(e,t,s,r,i)):(e=su(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Sa,n(o,r)&&e.ref===t.ref)return mr(e,t,i)}return t.flags|=1,e=ti(s,r),e.ref=t.ref,e.return=t,t.child=e}function Kb(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Sa(s,r)&&e.ref===t.ref)if(jt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(jt=!0);else return t.lanes=e.lanes,mr(e,t,i)}return Rf(e,t,n,r,i)}function Gb(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},_e(Es,zt),zt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,_e(Es,zt),zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,_e(Es,zt),zt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,_e(Es,zt),zt|=r;return vt(e,t,i,n),t.child}function Yb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Rf(e,t,n,r,i){var s=Lt(n)?Yi:gt.current;return s=Gs(t,s),Vs(t,i),n=Im(e,t,n,r,s,i),r=Dm(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mr(e,t,i)):(Re&&r&&bm(t),t.flags|=1,vt(e,t,n,i),t.child)}function jv(e,t,n,r,i){if(Lt(n)){var s=!0;Ou(t)}else s=!1;if(Vs(t,i),t.stateNode===null)nu(e,t),Ub(t,n,r),jf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=fn(u):(u=Lt(n)?Yi:gt.current,u=Gs(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&kv(t,o,r,u),Nr=!1;var h=t.memoizedState;o.state=h,Gu(t,r,o,i),l=t.memoizedState,a!==r||h!==l||Rt.current||Nr?(typeof c=="function"&&(Ef(t,n,c,r),l=t.memoizedState),(a=Nr||bv(t,n,a,r,h,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,bb(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:bn(t.type,a),o.props=u,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=fn(l):(l=Lt(n)?Yi:gt.current,l=Gs(t,l));var f=n.getDerivedStateFromProps;(c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&kv(t,o,r,l),Nr=!1,h=t.memoizedState,o.state=h,Gu(t,r,o,i);var p=t.memoizedState;a!==d||h!==p||Rt.current||Nr?(typeof f=="function"&&(Ef(t,n,f,r),p=t.memoizedState),(u=Nr||bv(t,n,u,r,h,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Lf(e,t,n,r,s,i)}function Lf(e,t,n,r,i,s){Yb(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&pv(t,n,!1),mr(e,t,s);r=t.stateNode,CA.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Xs(t,e.child,null,s),t.child=Xs(t,null,a,s)):vt(e,t,a,s),t.memoizedState=r.state,i&&pv(t,n,!0),t.child}function Xb(e){var t=e.stateNode;t.pendingContext?fv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fv(e,t.context,!1),Am(e,t.containerInfo)}function Av(e,t,n,r,i){return Ys(),_m(i),t.flags|=256,vt(e,t,n,r),t.child}var Mf={dehydrated:null,treeContext:null,retryLane:0};function If(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qb(e,t,n){var r=t.pendingProps,i=Me.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),_e(Me,i&1),e===null)return Pf(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Gc(o,r,0,null),e=Fi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=If(n),t.memoizedState=Mf,e):Fm(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return PA(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=ti(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=ti(a,s):(s=Fi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?If(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Mf,r}return s=e.child,e=s.sibling,r=ti(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Fm(e,t){return t=Gc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function kl(e,t,n,r){return r!==null&&_m(r),Xs(t,e.child,null,n),e=Fm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function PA(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Ud(Error(K(422))),kl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Gc({mode:"visible",children:r.children},i,0,null),s=Fi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Xs(t,e.child,null,o),t.child.memoizedState=If(o),t.memoizedState=Mf,s);if(!(t.mode&1))return kl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(K(419)),r=Ud(s,r,void 0),kl(e,t,o,r)}if(a=(o&e.childLanes)!==0,jt||a){if(r=rt,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,pr(e,i),Tn(r,e,i,-1))}return Wm(),r=Ud(Error(K(421))),kl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=VA.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ot=qr(i.nextSibling),Ht=t,Re=!0,_n=null,e!==null&&(tn[nn++]=ar,tn[nn++]=lr,tn[nn++]=Xi,ar=e.id,lr=e.overflow,Xi=t),t=Fm(t,r.children),t.flags|=4096,t)}function Rv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Tf(e.return,t,n)}function Wd(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function qb(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(vt(e,t,r.children,n),r=Me.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rv(e,n,t);else if(e.tag===19)Rv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(_e(Me,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Yu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Wd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Yu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Wd(t,!0,n,null,s);break;case"together":Wd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function nu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(K(153));if(t.child!==null){for(e=t.child,n=ti(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ti(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function TA(e,t,n){switch(t.tag){case 3:Xb(t),Ys();break;case 5:kb(t);break;case 1:Lt(t.type)&&Ou(t);break;case 4:Am(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;_e(Hu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(_e(Me,Me.current&1),t.flags|=128,null):n&t.child.childLanes?Qb(e,t,n):(_e(Me,Me.current&1),e=mr(e,t,n),e!==null?e.sibling:null);_e(Me,Me.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return qb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),_e(Me,Me.current),r)break;return null;case 22:case 23:return t.lanes=0,Gb(e,t,n)}return mr(e,t,n)}var Zb,Df,Jb,ek;Zb=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Df=function(){};Jb=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ai(Gn.current);var s=null;switch(n){case"input":i=nf(e,i),r=nf(e,r),s=[];break;case"select":i=De({},i,{value:void 0}),r=De({},r,{value:void 0}),s=[];break;case"textarea":i=of(e,i),r=of(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=$u)}lf(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(pa.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(pa.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ee("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};ek=function(e,t,n,r){n!==r&&(t.flags|=4)};function To(e,t){if(!Re)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ft(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function EA(e,t,n){var r=t.pendingProps;switch(km(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return Lt(t.type)&&zu(),ft(t),null;case 3:return r=t.stateNode,Qs(),je(Rt),je(gt),Lm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Sl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_n!==null&&(Uf(_n),_n=null))),Df(e,t),ft(t),null;case 5:Rm(t);var i=Ai(Pa.current);if(n=t.type,e!==null&&t.stateNode!=null)Jb(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(K(166));return ft(t),null}if(e=Ai(Gn.current),Sl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Wn]=t,r[_a]=s,e=(t.mode&1)!==0,n){case"dialog":Ee("cancel",r),Ee("close",r);break;case"iframe":case"object":case"embed":Ee("load",r);break;case"video":case"audio":for(i=0;i<Wo.length;i++)Ee(Wo[i],r);break;case"source":Ee("error",r);break;case"img":case"image":case"link":Ee("error",r),Ee("load",r);break;case"details":Ee("toggle",r);break;case"input":$y(r,s),Ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ee("invalid",r);break;case"textarea":Oy(r,s),Ee("invalid",r)}lf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&wl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&wl(r.textContent,a,e),i=["children",""+a]):pa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ee("scroll",r)}switch(n){case"input":hl(r),zy(r,s,!0);break;case"textarea":hl(r),Uy(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=$u)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ES(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Wn]=t,e[_a]=r,Zb(e,t,!1,!1),t.stateNode=e;e:{switch(o=uf(n,r),n){case"dialog":Ee("cancel",e),Ee("close",e),i=r;break;case"iframe":case"object":case"embed":Ee("load",e),i=r;break;case"video":case"audio":for(i=0;i<Wo.length;i++)Ee(Wo[i],e);i=r;break;case"source":Ee("error",e),i=r;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),i=r;break;case"details":Ee("toggle",e),i=r;break;case"input":$y(e,r),i=nf(e,r),Ee("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=De({},r,{value:void 0}),Ee("invalid",e);break;case"textarea":Oy(e,r),i=of(e,r),Ee("invalid",e);break;default:i=r}lf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?RS(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&jS(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ma(e,l):typeof l=="number"&&ma(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(pa.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ee("scroll",e):l!=null&&lm(e,s,l,o))}switch(n){case"input":hl(e),zy(e,r,!1);break;case"textarea":hl(e),Uy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ii(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ds(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ds(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=$u)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ft(t),null;case 6:if(e&&t.stateNode!=null)ek(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(K(166));if(n=Ai(Pa.current),Ai(Gn.current),Sl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Wn]=t,(s=r.nodeValue!==n)&&(e=Ht,e!==null))switch(e.tag){case 3:wl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Wn]=t,t.stateNode=r}return ft(t),null;case 13:if(je(Me),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Re&&Ot!==null&&t.mode&1&&!(t.flags&128))vb(),Ys(),t.flags|=98560,s=!1;else if(s=Sl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(K(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(K(317));s[Wn]=t}else Ys(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ft(t),s=!1}else _n!==null&&(Uf(_n),_n=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Me.current&1?et===0&&(et=3):Wm())),t.updateQueue!==null&&(t.flags|=4),ft(t),null);case 4:return Qs(),Df(e,t),e===null&&ba(t.stateNode.containerInfo),ft(t),null;case 10:return Tm(t.type._context),ft(t),null;case 17:return Lt(t.type)&&zu(),ft(t),null;case 19:if(je(Me),s=t.memoizedState,s===null)return ft(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)To(s,!1);else{if(et!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Yu(e),o!==null){for(t.flags|=128,To(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return _e(Me,Me.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>Zs&&(t.flags|=128,r=!0,To(s,!1),t.lanes=4194304)}else{if(!r)if(e=Yu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),To(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Re)return ft(t),null}else 2*$e()-s.renderingStartTime>Zs&&n!==1073741824&&(t.flags|=128,r=!0,To(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=$e(),t.sibling=null,n=Me.current,_e(Me,r?n&1|2:n&1),t):(ft(t),null);case 22:case 23:return Um(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?zt&1073741824&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function jA(e,t){switch(km(t),t.tag){case 1:return Lt(t.type)&&zu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qs(),je(Rt),je(gt),Lm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Rm(t),null;case 13:if(je(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));Ys()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return je(Me),null;case 4:return Qs(),null;case 10:return Tm(t.type._context),null;case 22:case 23:return Um(),null;case 24:return null;default:return null}}var _l=!1,pt=!1,AA=typeof WeakSet=="function"?WeakSet:Set,Y=null;function Ts(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ve(e,t,r)}else n.current=null}function Nf(e,t,n){try{n()}catch(r){Ve(e,t,r)}}var Lv=!1;function RA(e,t){if(xf=Bu,e=sb(),Sm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var f;d!==n||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++u===i&&(a=o),h===s&&++c===r&&(l=o),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(wf={focusedElem:e,selectionRange:n},Bu=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var y=p.memoizedProps,x=p.memoizedState,m=t.stateNode,v=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:bn(t.type,y),x);m.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(b){Ve(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return p=Lv,Lv=!1,p}function ea(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Nf(t,n,s)}i=i.next}while(i!==r)}}function Hc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Bf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function tk(e){var t=e.alternate;t!==null&&(e.alternate=null,tk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wn],delete t[_a],delete t[kf],delete t[fA],delete t[pA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nk(e){return e.tag===5||e.tag===3||e.tag===4}function Mv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nk(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ff(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$u));else if(r!==4&&(e=e.child,e!==null))for(Ff(e,t,n),e=e.sibling;e!==null;)Ff(e,t,n),e=e.sibling}function Vf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Vf(e,t,n),e=e.sibling;e!==null;)Vf(e,t,n),e=e.sibling}var it=null,kn=!1;function Sr(e,t,n){for(n=n.child;n!==null;)rk(e,t,n),n=n.sibling}function rk(e,t,n){if(Kn&&typeof Kn.onCommitFiberUnmount=="function")try{Kn.onCommitFiberUnmount(Bc,n)}catch{}switch(n.tag){case 5:pt||Ts(n,t);case 6:var r=it,i=kn;it=null,Sr(e,t,n),it=r,kn=i,it!==null&&(kn?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(kn?(e=it,n=n.stateNode,e.nodeType===8?Bd(e.parentNode,n):e.nodeType===1&&Bd(e,n),xa(e)):Bd(it,n.stateNode));break;case 4:r=it,i=kn,it=n.stateNode.containerInfo,kn=!0,Sr(e,t,n),it=r,kn=i;break;case 0:case 11:case 14:case 15:if(!pt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Nf(n,t,o),i=i.next}while(i!==r)}Sr(e,t,n);break;case 1:if(!pt&&(Ts(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ve(n,t,a)}Sr(e,t,n);break;case 21:Sr(e,t,n);break;case 22:n.mode&1?(pt=(r=pt)||n.memoizedState!==null,Sr(e,t,n),pt=r):Sr(e,t,n);break;default:Sr(e,t,n)}}function Iv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new AA),t.forEach(function(r){var i=$A.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function gn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:it=a.stateNode,kn=!1;break e;case 3:it=a.stateNode.containerInfo,kn=!0;break e;case 4:it=a.stateNode.containerInfo,kn=!0;break e}a=a.return}if(it===null)throw Error(K(160));rk(s,o,i),it=null,kn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ve(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ik(t,e),t=t.sibling}function ik(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gn(t,e),Dn(e),r&4){try{ea(3,e,e.return),Hc(3,e)}catch(y){Ve(e,e.return,y)}try{ea(5,e,e.return)}catch(y){Ve(e,e.return,y)}}break;case 1:gn(t,e),Dn(e),r&512&&n!==null&&Ts(n,n.return);break;case 5:if(gn(t,e),Dn(e),r&512&&n!==null&&Ts(n,n.return),e.flags&32){var i=e.stateNode;try{ma(i,"")}catch(y){Ve(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&PS(i,s),uf(a,o);var u=uf(a,s);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?RS(i,d):c==="dangerouslySetInnerHTML"?jS(i,d):c==="children"?ma(i,d):lm(i,c,d,u)}switch(a){case"input":rf(i,s);break;case"textarea":TS(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var f=s.value;f!=null?Ds(i,!!s.multiple,f,!1):h!==!!s.multiple&&(s.defaultValue!=null?Ds(i,!!s.multiple,s.defaultValue,!0):Ds(i,!!s.multiple,s.multiple?[]:"",!1))}i[_a]=s}catch(y){Ve(e,e.return,y)}}break;case 6:if(gn(t,e),Dn(e),r&4){if(e.stateNode===null)throw Error(K(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){Ve(e,e.return,y)}}break;case 3:if(gn(t,e),Dn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{xa(t.containerInfo)}catch(y){Ve(e,e.return,y)}break;case 4:gn(t,e),Dn(e);break;case 13:gn(t,e),Dn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(zm=$e())),r&4&&Iv(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(pt=(u=pt)||c,gn(t,e),pt=u):gn(t,e),Dn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Y=e,c=e.child;c!==null;){for(d=Y=c;Y!==null;){switch(h=Y,f=h.child,h.tag){case 0:case 11:case 14:case 15:ea(4,h,h.return);break;case 1:Ts(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(y){Ve(r,n,y)}}break;case 5:Ts(h,h.return);break;case 22:if(h.memoizedState!==null){Nv(d);continue}}f!==null?(f.return=h,Y=f):Nv(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=AS("display",o))}catch(y){Ve(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){Ve(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gn(t,e),Dn(e),r&4&&Iv(e);break;case 21:break;default:gn(t,e),Dn(e)}}function Dn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(nk(n)){var r=n;break e}n=n.return}throw Error(K(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ma(i,""),r.flags&=-33);var s=Mv(e);Vf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Mv(e);Ff(e,a,o);break;default:throw Error(K(161))}}catch(l){Ve(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function LA(e,t,n){Y=e,sk(e)}function sk(e,t,n){for(var r=(e.mode&1)!==0;Y!==null;){var i=Y,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||_l;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||pt;a=_l;var u=pt;if(_l=o,(pt=l)&&!u)for(Y=i;Y!==null;)o=Y,l=o.child,o.tag===22&&o.memoizedState!==null?Bv(i):l!==null?(l.return=o,Y=l):Bv(i);for(;s!==null;)Y=s,sk(s),s=s.sibling;Y=i,_l=a,pt=u}Dv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Y=s):Dv(e)}}function Dv(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:pt||Hc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!pt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:bn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&xv(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&xa(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(K(163))}pt||t.flags&512&&Bf(t)}catch(h){Ve(t,t.return,h)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function Nv(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function Bv(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Hc(4,t)}catch(l){Ve(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ve(t,i,l)}}var s=t.return;try{Bf(t)}catch(l){Ve(t,s,l)}break;case 5:var o=t.return;try{Bf(t)}catch(l){Ve(t,o,l)}}}catch(l){Ve(t,t.return,l)}if(t===e){Y=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Y=a;break}Y=t.return}}var MA=Math.ceil,qu=yr.ReactCurrentDispatcher,Vm=yr.ReactCurrentOwner,un=yr.ReactCurrentBatchConfig,de=0,rt=null,Ke=null,ct=0,zt=0,Es=di(0),et=0,Aa=null,qi=0,Kc=0,$m=0,ta=null,Et=null,zm=0,Zs=1/0,sr=null,Zu=!1,$f=null,Jr=null,Cl=!1,zr=null,Ju=0,na=0,zf=null,ru=-1,iu=0;function kt(){return de&6?$e():ru!==-1?ru:ru=$e()}function ei(e){return e.mode&1?de&2&&ct!==0?ct&-ct:gA.transition!==null?(iu===0&&(iu=US()),iu):(e=ye,e!==0||(e=window.event,e=e===void 0?16:QS(e.type)),e):1}function Tn(e,t,n,r){if(50<na)throw na=0,zf=null,Error(K(185));Ha(e,n,r),(!(de&2)||e!==rt)&&(e===rt&&(!(de&2)&&(Kc|=n),et===4&&Vr(e,ct)),Mt(e,r),n===1&&de===0&&!(t.mode&1)&&(Zs=$e()+500,Oc&&hi()))}function Mt(e,t){var n=e.callbackNode;gj(e,t);var r=Nu(e,e===rt?ct:0);if(r===0)n!==null&&Ky(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ky(n),t===1)e.tag===0?mA(Fv.bind(null,e)):mb(Fv.bind(null,e)),dA(function(){!(de&6)&&hi()}),n=null;else{switch(WS(r)){case 1:n=fm;break;case 4:n=zS;break;case 16:n=Du;break;case 536870912:n=OS;break;default:n=Du}n=fk(n,ok.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ok(e,t){if(ru=-1,iu=0,de&6)throw Error(K(327));var n=e.callbackNode;if($s()&&e.callbackNode!==n)return null;var r=Nu(e,e===rt?ct:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ec(e,r);else{t=r;var i=de;de|=2;var s=lk();(rt!==e||ct!==t)&&(sr=null,Zs=$e()+500,Bi(e,t));do try{NA();break}catch(a){ak(e,a)}while(!0);Pm(),qu.current=s,de=i,Ke!==null?t=0:(rt=null,ct=0,t=et)}if(t!==0){if(t===2&&(i=pf(e),i!==0&&(r=i,t=Of(e,i))),t===1)throw n=Aa,Bi(e,0),Vr(e,r),Mt(e,$e()),n;if(t===6)Vr(e,r);else{if(i=e.current.alternate,!(r&30)&&!IA(i)&&(t=ec(e,r),t===2&&(s=pf(e),s!==0&&(r=s,t=Of(e,s))),t===1))throw n=Aa,Bi(e,0),Vr(e,r),Mt(e,$e()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(K(345));case 2:_i(e,Et,sr);break;case 3:if(Vr(e,r),(r&130023424)===r&&(t=zm+500-$e(),10<t)){if(Nu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){kt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=bf(_i.bind(null,e,Et,sr),t);break}_i(e,Et,sr);break;case 4:if(Vr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Pn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*MA(r/1960))-r,10<r){e.timeoutHandle=bf(_i.bind(null,e,Et,sr),r);break}_i(e,Et,sr);break;case 5:_i(e,Et,sr);break;default:throw Error(K(329))}}}return Mt(e,$e()),e.callbackNode===n?ok.bind(null,e):null}function Of(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&(Bi(e,t).flags|=256),e=ec(e,t),e!==2&&(t=Et,Et=n,t!==null&&Uf(t)),e}function Uf(e){Et===null?Et=e:Et.push.apply(Et,e)}function IA(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Rn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vr(e,t){for(t&=~$m,t&=~Kc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Pn(t),r=1<<n;e[n]=-1,t&=~r}}function Fv(e){if(de&6)throw Error(K(327));$s();var t=Nu(e,0);if(!(t&1))return Mt(e,$e()),null;var n=ec(e,t);if(e.tag!==0&&n===2){var r=pf(e);r!==0&&(t=r,n=Of(e,r))}if(n===1)throw n=Aa,Bi(e,0),Vr(e,t),Mt(e,$e()),n;if(n===6)throw Error(K(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,_i(e,Et,sr),Mt(e,$e()),null}function Om(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(Zs=$e()+500,Oc&&hi())}}function Zi(e){zr!==null&&zr.tag===0&&!(de&6)&&$s();var t=de;de|=1;var n=un.transition,r=ye;try{if(un.transition=null,ye=1,e)return e()}finally{ye=r,un.transition=n,de=t,!(de&6)&&hi()}}function Um(){zt=Es.current,je(Es)}function Bi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,cA(n)),Ke!==null)for(n=Ke.return;n!==null;){var r=n;switch(km(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zu();break;case 3:Qs(),je(Rt),je(gt),Lm();break;case 5:Rm(r);break;case 4:Qs();break;case 13:je(Me);break;case 19:je(Me);break;case 10:Tm(r.type._context);break;case 22:case 23:Um()}n=n.return}if(rt=e,Ke=e=ti(e.current,null),ct=zt=t,et=0,Aa=null,$m=Kc=qi=0,Et=ta=null,ji!==null){for(t=0;t<ji.length;t++)if(n=ji[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ji=null}return e}function ak(e,t){do{var n=Ke;try{if(Pm(),eu.current=Qu,Xu){for(var r=Ie.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Xu=!1}if(Qi=0,nt=Je=Ie=null,Jo=!1,Ta=0,Vm.current=null,n===null||n.return===null){et=1,Aa=t,Ke=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ct,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var f=Cv(o);if(f!==null){f.flags&=-257,Pv(f,o,a,s,t),f.mode&1&&_v(s,u,t),t=f,l=u;var p=t.updateQueue;if(p===null){var y=new Set;y.add(l),t.updateQueue=y}else p.add(l);break e}else{if(!(t&1)){_v(s,u,t),Wm();break e}l=Error(K(426))}}else if(Re&&a.mode&1){var x=Cv(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Pv(x,o,a,s,t),_m(qs(l,a));break e}}s=l=qs(l,a),et!==4&&(et=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=Wb(s,l,t);vv(s,m);break e;case 1:a=l;var v=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Jr===null||!Jr.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=Hb(s,a,t);vv(s,b);break e}}s=s.return}while(s!==null)}ck(n)}catch(_){t=_,Ke===n&&n!==null&&(Ke=n=n.return);continue}break}while(!0)}function lk(){var e=qu.current;return qu.current=Qu,e===null?Qu:e}function Wm(){(et===0||et===3||et===2)&&(et=4),rt===null||!(qi&268435455)&&!(Kc&268435455)||Vr(rt,ct)}function ec(e,t){var n=de;de|=2;var r=lk();(rt!==e||ct!==t)&&(sr=null,Bi(e,t));do try{DA();break}catch(i){ak(e,i)}while(!0);if(Pm(),de=n,qu.current=r,Ke!==null)throw Error(K(261));return rt=null,ct=0,et}function DA(){for(;Ke!==null;)uk(Ke)}function NA(){for(;Ke!==null&&!aj();)uk(Ke)}function uk(e){var t=hk(e.alternate,e,zt);e.memoizedProps=e.pendingProps,t===null?ck(e):Ke=t,Vm.current=null}function ck(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=jA(n,t),n!==null){n.flags&=32767,Ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{et=6,Ke=null;return}}else if(n=EA(n,t,zt),n!==null){Ke=n;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);et===0&&(et=5)}function _i(e,t,n){var r=ye,i=un.transition;try{un.transition=null,ye=1,BA(e,t,n,r)}finally{un.transition=i,ye=r}return null}function BA(e,t,n,r){do $s();while(zr!==null);if(de&6)throw Error(K(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(K(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(yj(e,s),e===rt&&(Ke=rt=null,ct=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Cl||(Cl=!0,fk(Du,function(){return $s(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=un.transition,un.transition=null;var o=ye;ye=1;var a=de;de|=4,Vm.current=null,RA(e,n),ik(n,e),rA(wf),Bu=!!xf,wf=xf=null,e.current=n,LA(n),lj(),de=a,ye=o,un.transition=s}else e.current=n;if(Cl&&(Cl=!1,zr=e,Ju=i),s=e.pendingLanes,s===0&&(Jr=null),dj(n.stateNode),Mt(e,$e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Zu)throw Zu=!1,e=$f,$f=null,e;return Ju&1&&e.tag!==0&&$s(),s=e.pendingLanes,s&1?e===zf?na++:(na=0,zf=e):na=0,hi(),null}function $s(){if(zr!==null){var e=WS(Ju),t=un.transition,n=ye;try{if(un.transition=null,ye=16>e?16:e,zr===null)var r=!1;else{if(e=zr,zr=null,Ju=0,de&6)throw Error(K(331));var i=de;for(de|=4,Y=e.current;Y!==null;){var s=Y,o=s.child;if(Y.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(Y=u;Y!==null;){var c=Y;switch(c.tag){case 0:case 11:case 15:ea(8,c,s)}var d=c.child;if(d!==null)d.return=c,Y=d;else for(;Y!==null;){c=Y;var h=c.sibling,f=c.return;if(tk(c),c===u){Y=null;break}if(h!==null){h.return=f,Y=h;break}Y=f}}}var p=s.alternate;if(p!==null){var y=p.child;if(y!==null){p.child=null;do{var x=y.sibling;y.sibling=null,y=x}while(y!==null)}}Y=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Y=o;else e:for(;Y!==null;){if(s=Y,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ea(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,Y=m;break e}Y=s.return}}var v=e.current;for(Y=v;Y!==null;){o=Y;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,Y=w;else e:for(o=v;Y!==null;){if(a=Y,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Hc(9,a)}}catch(_){Ve(a,a.return,_)}if(a===o){Y=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,Y=b;break e}Y=a.return}}if(de=i,hi(),Kn&&typeof Kn.onPostCommitFiberRoot=="function")try{Kn.onPostCommitFiberRoot(Bc,e)}catch{}r=!0}return r}finally{ye=n,un.transition=t}}return!1}function Vv(e,t,n){t=qs(n,t),t=Wb(e,t,1),e=Zr(e,t,1),t=kt(),e!==null&&(Ha(e,1,t),Mt(e,t))}function Ve(e,t,n){if(e.tag===3)Vv(e,e,n);else for(;t!==null;){if(t.tag===3){Vv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jr===null||!Jr.has(r))){e=qs(n,e),e=Hb(t,e,1),t=Zr(t,e,1),e=kt(),t!==null&&(Ha(t,1,e),Mt(t,e));break}}t=t.return}}function FA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=kt(),e.pingedLanes|=e.suspendedLanes&n,rt===e&&(ct&n)===n&&(et===4||et===3&&(ct&130023424)===ct&&500>$e()-zm?Bi(e,0):$m|=n),Mt(e,t)}function dk(e,t){t===0&&(e.mode&1?(t=ml,ml<<=1,!(ml&130023424)&&(ml=4194304)):t=1);var n=kt();e=pr(e,t),e!==null&&(Ha(e,t,n),Mt(e,n))}function VA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dk(e,n)}function $A(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(K(314))}r!==null&&r.delete(t),dk(e,n)}var hk;hk=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Rt.current)jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jt=!1,TA(e,t,n);jt=!!(e.flags&131072)}else jt=!1,Re&&t.flags&1048576&&gb(t,Wu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nu(e,t),e=t.pendingProps;var i=Gs(t,gt.current);Vs(t,n),i=Im(null,t,r,e,i,n);var s=Dm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lt(r)?(s=!0,Ou(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jm(t),i.updater=Wc,t.stateNode=i,i._reactInternals=t,jf(t,r,e,n),t=Lf(null,t,r,!0,s,n)):(t.tag=0,Re&&s&&bm(t),vt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=OA(r),e=bn(r,e),i){case 0:t=Rf(null,t,r,e,n);break e;case 1:t=jv(null,t,r,e,n);break e;case 11:t=Tv(null,t,r,e,n);break e;case 14:t=Ev(null,t,r,bn(r.type,e),n);break e}throw Error(K(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bn(r,i),Rf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bn(r,i),jv(e,t,r,i,n);case 3:e:{if(Xb(t),e===null)throw Error(K(387));r=t.pendingProps,s=t.memoizedState,i=s.element,bb(e,t),Gu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=qs(Error(K(423)),t),t=Av(e,t,r,n,i);break e}else if(r!==i){i=qs(Error(K(424)),t),t=Av(e,t,r,n,i);break e}else for(Ot=qr(t.stateNode.containerInfo.firstChild),Ht=t,Re=!0,_n=null,n=wb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ys(),r===i){t=mr(e,t,n);break e}vt(e,t,r,n)}t=t.child}return t;case 5:return kb(t),e===null&&Pf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Sf(r,i)?o=null:s!==null&&Sf(r,s)&&(t.flags|=32),Yb(e,t),vt(e,t,o,n),t.child;case 6:return e===null&&Pf(t),null;case 13:return Qb(e,t,n);case 4:return Am(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xs(t,null,r,n):vt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bn(r,i),Tv(e,t,r,i,n);case 7:return vt(e,t,t.pendingProps,n),t.child;case 8:return vt(e,t,t.pendingProps.children,n),t.child;case 12:return vt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,_e(Hu,r._currentValue),r._currentValue=o,s!==null)if(Rn(s.value,o)){if(s.children===i.children&&!Rt.current){t=mr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=cr(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Tf(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(K(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Tf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}vt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Vs(t,n),i=fn(i),r=r(i),t.flags|=1,vt(e,t,r,n),t.child;case 14:return r=t.type,i=bn(r,t.pendingProps),i=bn(r.type,i),Ev(e,t,r,i,n);case 15:return Kb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bn(r,i),nu(e,t),t.tag=1,Lt(r)?(e=!0,Ou(t)):e=!1,Vs(t,n),Ub(t,r,i),jf(t,r,i,n),Lf(null,t,r,!0,e,n);case 19:return qb(e,t,n);case 22:return Gb(e,t,n)}throw Error(K(156,t.tag))};function fk(e,t){return $S(e,t)}function zA(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,n,r){return new zA(e,t,n,r)}function Hm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OA(e){if(typeof e=="function")return Hm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cm)return 11;if(e===dm)return 14}return 2}function ti(e,t){var n=e.alternate;return n===null?(n=sn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function su(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Hm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case vs:return Fi(n.children,i,s,t);case um:o=8,i|=8;break;case Zh:return e=sn(12,n,t,i|2),e.elementType=Zh,e.lanes=s,e;case Jh:return e=sn(13,n,t,i),e.elementType=Jh,e.lanes=s,e;case ef:return e=sn(19,n,t,i),e.elementType=ef,e.lanes=s,e;case kS:return Gc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case SS:o=10;break e;case bS:o=9;break e;case cm:o=11;break e;case dm:o=14;break e;case Dr:o=16,r=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=sn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Fi(e,t,n,r){return e=sn(7,e,r,t),e.lanes=n,e}function Gc(e,t,n,r){return e=sn(22,e,r,t),e.elementType=kS,e.lanes=n,e.stateNode={isHidden:!1},e}function Hd(e,t,n){return e=sn(6,e,null,t),e.lanes=n,e}function Kd(e,t,n){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function UA(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pd(0),this.expirationTimes=Pd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Km(e,t,n,r,i,s,o,a,l){return e=new UA(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=sn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jm(s),e}function WA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ys,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function pk(e){if(!e)return si;e=e._reactInternals;e:{if(ts(e)!==e||e.tag!==1)throw Error(K(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(K(171))}if(e.tag===1){var n=e.type;if(Lt(n))return pb(e,n,t)}return t}function mk(e,t,n,r,i,s,o,a,l){return e=Km(n,r,!0,e,i,s,o,a,l),e.context=pk(null),n=e.current,r=kt(),i=ei(n),s=cr(r,i),s.callback=t??null,Zr(n,s,i),e.current.lanes=i,Ha(e,i,r),Mt(e,r),e}function Yc(e,t,n,r){var i=t.current,s=kt(),o=ei(i);return n=pk(n),t.context===null?t.context=n:t.pendingContext=n,t=cr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Zr(i,t,o),e!==null&&(Tn(e,i,o,s),Jl(e,i,o)),o}function tc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function $v(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gm(e,t){$v(e,t),(e=e.alternate)&&$v(e,t)}function HA(){return null}var gk=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ym(e){this._internalRoot=e}Xc.prototype.render=Ym.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(K(409));Yc(e,t,null,null)};Xc.prototype.unmount=Ym.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zi(function(){Yc(null,e,null,null)}),t[fr]=null}};function Xc(e){this._internalRoot=e}Xc.prototype.unstable_scheduleHydration=function(e){if(e){var t=GS();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fr.length&&t!==0&&t<Fr[n].priority;n++);Fr.splice(n,0,e),n===0&&XS(e)}};function Xm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Qc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zv(){}function KA(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=tc(o);s.call(u)}}var o=mk(t,r,e,0,null,!1,!1,"",zv);return e._reactRootContainer=o,e[fr]=o.current,ba(e.nodeType===8?e.parentNode:e),Zi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=tc(l);a.call(u)}}var l=Km(e,0,!1,null,null,!1,!1,"",zv);return e._reactRootContainer=l,e[fr]=l.current,ba(e.nodeType===8?e.parentNode:e),Zi(function(){Yc(t,l,n,r)}),l}function qc(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=tc(o);a.call(l)}}Yc(t,o,e,i)}else o=KA(n,t,e,i,r);return tc(o)}HS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Uo(t.pendingLanes);n!==0&&(pm(t,n|1),Mt(t,$e()),!(de&6)&&(Zs=$e()+500,hi()))}break;case 13:Zi(function(){var r=pr(e,1);if(r!==null){var i=kt();Tn(r,e,1,i)}}),Gm(e,1)}};mm=function(e){if(e.tag===13){var t=pr(e,134217728);if(t!==null){var n=kt();Tn(t,e,134217728,n)}Gm(e,134217728)}};KS=function(e){if(e.tag===13){var t=ei(e),n=pr(e,t);if(n!==null){var r=kt();Tn(n,e,t,r)}Gm(e,t)}};GS=function(){return ye};YS=function(e,t){var n=ye;try{return ye=e,t()}finally{ye=n}};df=function(e,t,n){switch(t){case"input":if(rf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=zc(r);if(!i)throw Error(K(90));CS(r),rf(r,i)}}}break;case"textarea":TS(e,n);break;case"select":t=n.value,t!=null&&Ds(e,!!n.multiple,t,!1)}};IS=Om;DS=Zi;var GA={usingClientEntryPoint:!1,Events:[Ga,bs,zc,LS,MS,Om]},Eo={findFiberByHostInstance:Ei,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},YA={bundleType:Eo.bundleType,version:Eo.version,rendererPackageName:Eo.rendererPackageName,rendererConfig:Eo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:yr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=FS(e),e===null?null:e.stateNode},findFiberByHostInstance:Eo.findFiberByHostInstance||HA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pl.isDisabled&&Pl.supportsFiber)try{Bc=Pl.inject(YA),Kn=Pl}catch{}}Yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=GA;Yt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xm(t))throw Error(K(200));return WA(e,t,null,n)};Yt.createRoot=function(e,t){if(!Xm(e))throw Error(K(299));var n=!1,r="",i=gk;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Km(e,1,!1,null,null,n,!1,r,i),e[fr]=t.current,ba(e.nodeType===8?e.parentNode:e),new Ym(t)};Yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(K(188)):(e=Object.keys(e).join(","),Error(K(268,e)));return e=FS(t),e=e===null?null:e.stateNode,e};Yt.flushSync=function(e){return Zi(e)};Yt.hydrate=function(e,t,n){if(!Qc(t))throw Error(K(200));return qc(null,e,t,!0,n)};Yt.hydrateRoot=function(e,t,n){if(!Xm(e))throw Error(K(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=gk;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=mk(t,null,e,1,n??null,i,!1,s,o),e[fr]=t.current,ba(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Xc(t)};Yt.render=function(e,t,n){if(!Qc(t))throw Error(K(200));return qc(null,e,t,!1,n)};Yt.unmountComponentAtNode=function(e){if(!Qc(e))throw Error(K(40));return e._reactRootContainer?(Zi(function(){qc(null,null,e,!1,function(){e._reactRootContainer=null,e[fr]=null})}),!0):!1};Yt.unstable_batchedUpdates=Om;Yt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qc(n))throw Error(K(200));if(e==null||e._reactInternals===void 0)throw Error(K(38));return qc(e,t,n,!1,r)};Yt.version="18.3.1-next-f1338f8080-20240426";function yk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yk)}catch(e){console.error(e)}}yk(),yS.exports=Yt;var Qm=yS.exports,vk,Ov=Qm;vk=Ov.createRoot,Ov.hydrateRoot;var Ho=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Gd(e){const t=C.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function XA(e,t,n={},r={}){C.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([s])=>{t(s)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function QA(e){const t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current,[]),t}const xk=!1;function Ra(e){return e[e.length-1]}function qA(e){return typeof e=="function"}function Or(e,t){return qA(e)?e(t):e}const ZA=Object.prototype.hasOwnProperty,Uv=Object.prototype.propertyIsEnumerable,JA=()=>Object.create(null),xi=(e,t)=>Ur(e,t,JA);function Ur(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,s=Kv(e)&&Kv(i);if(!s&&!(Js(e)&&Js(i)))return i;const o=s?e:Wv(e);if(!o)return i;const a=s?i:Wv(i);if(!a)return i;const l=o.length,u=a.length,c=s?new Array(u):n();let d=0;for(let h=0;h<u;h++){const f=s?h:a[h],p=e[f],y=i[f];if(p===y){c[f]=p,(s?h<l:ZA.call(e,f))&&d++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){c[f]=y;continue}const x=Ur(p,y,n,r+1);c[f]=x,x===p&&d++}return l===u&&d===l?e:c}function Wv(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!Uv.call(e,i))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const i of n){if(!Uv.call(e,i))return!1;r.push(i)}return r}function Js(e){if(!Hv(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Hv(n)||!n.hasOwnProperty("isPrototypeOf"))}function Hv(e){return Object.prototype.toString.call(e)==="[object Object]"}function Kv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Vi(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!Vi(e[r],t[r],n))return!1;return!0}if(Js(e)&&Js(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const o in t)if((!r||t[o]!==void 0)&&!Vi(e[o],t[o],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&i++;let s=0;for(const o in t)if((!r||t[o]!==void 0)&&(s++,s>i||!Vi(e[o],t[o],n)))return!1;return i===s}return!1}function eo(e){let t,n;const r=new Promise((i,s)=>{t=i,n=s});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e==null||e(i)},r.reject=i=>{r.status="rejected",n(i)},r}function La(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function eR(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Gv(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return eR(t)}const tR=["http:","https:","mailto:","tel:"];function nc(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function jo(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",i;for(;(i=t.exec(e))!==null;)r+=Gv(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+Gv(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function nR(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function rR(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function dr(){throw new Error("Invariant failed")}function Ma(e){const t=new Map;let n,r;const i=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const o=t.get(s);if(o)return i(o),o.value},set(s,o){if(t.size>=e&&n){const l=n;t.delete(l.key),l.next&&(n=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const a=t.get(s);if(a)a.value=o,i(a);else{const l={key:s,value:o,prev:r};r&&(r.next=l),r=l,n||(n=l),t.set(s,l)}},clear(){t.clear(),n=void 0,r=void 0}}}const Wr=4,wk=5;function iR(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function qm(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,s=e.substring(t,i);if(!s||!s.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(s==="$"){const a=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}if(s.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const o=iR(s);if(o){const[a,l]=o,u=s.charCodeAt(a+1);if(u===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const c=a+3,d=l;if(c<d)return n[0]=3,n[1]=t+a,n[2]=t+c,n[3]=t+d,n[4]=t+l+1,n[5]=i,n}}else if(u===36){const c=a+1,d=a+2;return d===l?(n[0]=2,n[1]=t+a,n[2]=t+c,n[3]=t+d,n[4]=t+l+1,n[5]=e.length,n):(n[0]=1,n[1]=t+a,n[2]=t+d,n[3]=t+l,n[4]=t+l+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function Zc(e,t,n,r,i,s,o){var l,u,c,d,h,f,p,y,x,m,v,w,b;o==null||o(n);let a=r;{const _=n.fullPath??n.from,S=_.length,P=((l=n.options)==null?void 0:l.caseSensitive)??e,T=!!((c=(u=n.options)==null?void 0:u.params)!=null&&c.parse&&((h=(d=n.options)==null?void 0:d.skipRouteOnParseError)!=null&&h.params));for(;a<S;){const E=qm(_,a,t);let L;const M=a,$=E[5];switch(a=$+1,s++,E[0]){case 0:{const B=_.substring(E[2],E[3]);if(P){const F=(f=i.static)==null?void 0:f.get(B);if(F)L=F;else{i.static??(i.static=new Map);const V=Ri(n.fullPath??n.from);V.parent=i,V.depth=s,L=V,i.static.set(B,V)}}else{const F=B.toLowerCase(),V=(p=i.staticInsensitive)==null?void 0:p.get(F);if(V)L=V;else{i.staticInsensitive??(i.staticInsensitive=new Map);const W=Ri(n.fullPath??n.from);W.parent=i,W.depth=s,L=W,i.staticInsensitive.set(F,W)}}break}case 1:{const B=_.substring(M,E[1]),F=_.substring(E[4],$),V=P&&!!(B||F),W=B?V?B:B.toLowerCase():void 0,D=F?V?F:F.toLowerCase():void 0,z=!T&&((y=i.dynamic)==null?void 0:y.find(k=>!k.skipOnParamError&&k.caseSensitive===V&&k.prefix===W&&k.suffix===D));if(z)L=z;else{const k=Xd(1,n.fullPath??n.from,V,W,D);L=k,k.depth=s,k.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(k)}break}case 3:{const B=_.substring(M,E[1]),F=_.substring(E[4],$),V=P&&!!(B||F),W=B?V?B:B.toLowerCase():void 0,D=F?V?F:F.toLowerCase():void 0,z=!T&&((x=i.optional)==null?void 0:x.find(k=>!k.skipOnParamError&&k.caseSensitive===V&&k.prefix===W&&k.suffix===D));if(z)L=z;else{const k=Xd(3,n.fullPath??n.from,V,W,D);L=k,k.parent=i,k.depth=s,i.optional??(i.optional=[]),i.optional.push(k)}break}case 2:{const B=_.substring(M,E[1]),F=_.substring(E[4],$),V=P&&!!(B||F),W=B?V?B:B.toLowerCase():void 0,D=F?V?F:F.toLowerCase():void 0,z=Xd(2,n.fullPath??n.from,V,W,D);L=z,z.parent=i,z.depth=s,i.wildcard??(i.wildcard=[]),i.wildcard.push(z)}}i=L}if(T&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const E=Ri(n.fullPath??n.from);E.kind=wk,E.parent=i,s++,E.depth=s,i.pathless??(i.pathless=[]),i.pathless.push(E),i=E}const j=(n.path||!n.children)&&!n.isRoot;if(j&&_.endsWith("/")){const E=Ri(n.fullPath??n.from);E.kind=Wr,E.parent=i,s++,E.depth=s,i.index=E,i=E}i.parse=((v=(m=n.options)==null?void 0:m.params)==null?void 0:v.parse)??null,i.skipOnParamError=T,i.parsingPriority=((b=(w=n.options)==null?void 0:w.skipRouteOnParseError)==null?void 0:b.priority)??0,j&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const _ of n.children)Zc(e,t,_,a,i,s,o)}function Yd(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Br(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Br(i);if(e.static)for(const i of e.static.values())Br(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Br(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Yd);for(const i of e.dynamic)Br(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(Yd);for(const i of e.optional)Br(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(Yd);for(const i of e.wildcard)Br(i)}}function Ri(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Xd(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function sR(e,t){const n=Ri("/"),r=new Uint16Array(6);for(const i of e)Zc(!1,r,i,1,n,0);Br(n),t.masksTree=n,t.flatCache=Ma(1e3)}function oR(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=Zm(e,t.masksTree);return t.flatCache.set(e,r),r}function aR(e,t,n,r,i){e||(e="/"),r||(r="/");const s=t?`case\0${e}`:e;let o=i.singleCache.get(s);return o||(o=Ri("/"),Zc(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(s,o)),Zm(r,o,n)}function lR(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||(e="/");let s;try{s=Zm(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)s=null;else throw o}return s&&(s.branch=dR(s.route)),t.matchCache.set(r,s),s}function uR(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function cR(e,t=!1,n){const r=Ri(e.fullPath),i=new Uint16Array(6),s={},o={};let a=0;return Zc(t,i,e,1,r,0,l=>{if(n==null||n(l,a),l.id in s&&dr(),s[l.id]=l,a!==0&&l.path){const u=uR(l.fullPath);(!o[u]||l.fullPath.endsWith("/"))&&(o[u]=l)}a++}),Br(r),{processedTree:{segmentTree:r,singleCache:Ma(1e3),matchCache:Ma(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:o}}function Zm(e,t,n=!1){const r=e.split("/"),i=fR(e,r,t,n);if(!i)return null;const[s]=Sk(e,r,i);return{route:i.node.route,rawParams:s,parsedParams:i.parsedParams}}function Sk(e,t,n){var c,d,h,f,p,y,x,m,v,w;const r=hR(n.node);let i=null;const s=Object.create(null);let o=((c=n.extract)==null?void 0:c.part)??0,a=((d=n.extract)==null?void 0:d.node)??0,l=((h=n.extract)==null?void 0:h.path)??0,u=((f=n.extract)==null?void 0:f.segment)??0;for(;a<r.length;o++,a++,l++,u++){const b=r[a];if(b.kind===Wr)break;if(b.kind===wk){u--,o--,l--;continue}const _=t[o],S=l;if(_&&(l+=_.length),b.kind===1){i??(i=n.node.fullPath.split("/"));const P=i[u],T=((p=b.prefix)==null?void 0:p.length)??0;if(P.charCodeAt(T)===123){const j=((y=b.suffix)==null?void 0:y.length)??0,E=P.substring(T+2,P.length-j-1),L=_.substring(T,_.length-j);s[E]=decodeURIComponent(L)}else{const j=P.substring(1);s[j]=decodeURIComponent(_)}}else if(b.kind===3){if(n.skipped&1<<a){o--,l=S-1;continue}i??(i=n.node.fullPath.split("/"));const P=i[u],T=((x=b.prefix)==null?void 0:x.length)??0,j=((m=b.suffix)==null?void 0:m.length)??0,E=P.substring(T+3,P.length-j-1),L=b.suffix||b.prefix?_.substring(T,_.length-j):_;L&&(s[E]=decodeURIComponent(L))}else if(b.kind===2){const P=b,T=e.substring(S+(((v=P.prefix)==null?void 0:v.length)??0),e.length-(((w=P.suffix)==null?void 0:w.length)??0)),j=decodeURIComponent(T);s["*"]=j,s._splat=j;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:o,node:a,path:l,segment:u}]}function dR(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function hR(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function fR(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!Ra(t),s=i&&e!=="/",o=t.length-(i?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let l=null,u=null;for(;a.length;){const c=a.pop(),{node:d,index:h,skipped:f,depth:p,statics:y,dynamics:x,optionals:m}=c;let{extract:v,rawParams:w,parsedParams:b}=c;if(d.kind===2&&d.route&&!El(u,c))continue;if(d.skipOnParamError){if(!Yv(e,t,c))continue;w=c.rawParams,v=c.extract,b=c.parsedParams}r&&d.route&&d.kind!==Wr&&El(l,c)&&(l=c);const _=h===o;if(_&&(d.route&&(!s||d.kind===Wr||d.kind===2)&&El(u,c)&&(u=c),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const S=_?void 0:t[h];let P;if(_&&d.index){const T={node:d.index,index:h,skipped:f,depth:p+1,statics:y,dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:b};let j=!0;if(d.index.skipOnParamError&&(Yv(e,t,T)||(j=!1)),j){if(!x&&!m&&!f&&pR(y,o))return T;El(u,T)&&(u=T)}}if(d.wildcard)for(let T=d.wildcard.length-1;T>=0;T--){const j=d.wildcard[T],{prefix:E,suffix:L}=j;if(!(E&&(_||!(j.caseSensitive?S:P??(P=S.toLowerCase())).startsWith(E)))){if(L){if(_)continue;const M=t.slice(h).join("/").slice(-L.length);if((j.caseSensitive?M:M.toLowerCase())!==L)continue}a.push({node:j,index:o,skipped:f,depth:p+1,statics:y,dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:b})}}if(d.optional){const T=f|1<<p,j=p+1;for(let E=d.optional.length-1;E>=0;E--){const L=d.optional[E];a.push({node:L,index:h,skipped:T,depth:j,statics:y,dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:b})}if(!_)for(let E=d.optional.length-1;E>=0;E--){const L=d.optional[E],{prefix:M,suffix:$}=L;if(M||$){const B=L.caseSensitive?S:P??(P=S.toLowerCase());if(M&&!B.startsWith(M)||$&&!B.endsWith($))continue}a.push({node:L,index:h+1,skipped:f,depth:j,statics:y,dynamics:x,optionals:m+Tl(o,h),extract:v,rawParams:w,parsedParams:b})}}if(!_&&d.dynamic&&S)for(let T=d.dynamic.length-1;T>=0;T--){const j=d.dynamic[T],{prefix:E,suffix:L}=j;if(E||L){const M=j.caseSensitive?S:P??(P=S.toLowerCase());if(E&&!M.startsWith(E)||L&&!M.endsWith(L))continue}a.push({node:j,index:h+1,skipped:f,depth:p+1,statics:y,dynamics:x+Tl(o,h),optionals:m,extract:v,rawParams:w,parsedParams:b})}if(!_&&d.staticInsensitive){const T=d.staticInsensitive.get(P??(P=S.toLowerCase()));T&&a.push({node:T,index:h+1,skipped:f,depth:p+1,statics:y+Tl(o,h),dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:b})}if(!_&&d.static){const T=d.static.get(S);T&&a.push({node:T,index:h+1,skipped:f,depth:p+1,statics:y+Tl(o,h),dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:b})}if(d.pathless){const T=p+1;for(let j=d.pathless.length-1;j>=0;j--){const E=d.pathless[j];a.push({node:E,index:h,skipped:f,depth:T,statics:y,dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:b})}}}if(u)return u;if(r&&l){let c=l.index;for(let h=0;h<l.index;h++)c+=t[h].length;const d=c===e.length?"/":e.slice(c);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(d),l}return null}function Tl(e,t){return 2**(e-t-1)}function pR(e,t){return e===2**(t-1)-1}function Yv(e,t,n){try{const[r,i]=Sk(e,t,n);n.rawParams=r,n.extract=i;const s=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,s),!0}catch{return null}}function El(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Wr)>(e.node.kind===Wr)||t.node.kind===Wr==(e.node.kind===Wr)&&t.depth>e.depth))):!0}function ou(e){return Jm(e.filter(t=>t!==void 0).join("/"))}function Jm(e){return e.replace(/\/{2,}/g,"/")}function bk(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ni(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function kk(e){return ni(bk(e))}function rc(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function mR(e,t,n){return rc(e,n)===rc(t,n)}function gR({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),s=!i&&t===".";let o;if(r){o=i?t:s?e:e+"\0"+t;const d=r.get(o);if(d)return d}let a;if(s)a=e.split("/");else if(i)a=t.split("/");else{for(a=e.split("/");a.length>1&&Ra(a)==="";)a.pop();const d=t.split("/");for(let h=0,f=d.length;h<f;h++){const p=d[h];p===""?h?h===f-1&&a.push(p):a=[p]:p===".."?a.pop():p==="."||a.push(p)}}a.length>1&&(Ra(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,u="";for(let d=0;d<a.length;d++){d>0&&(u+="/");const h=a[d];if(!h)continue;l=qm(h,0,l);const f=l[0];if(f===0){u+=h;continue}const p=l[5],y=h.substring(0,l[1]),x=h.substring(l[4],p),m=h.substring(l[2],l[3]);f===1?u+=y||x?`${y}{$${m}}${x}`:`$${m}`:f===2?u+=y||x?`${y}{$}${x}`:"$":u+=`${y}{-$${m}}${x}`}u=Jm(u);const c=u||"/";return o&&r&&r.set(o,c),c}function yR(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,s=>t.get(s)??s)}function Qd(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>Qv(i,n)).join("/"):Qv(r,n)}function Xv({path:e,params:t,decoder:n,...r}){let i=!1;const s=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:i};const o=e.length;let a=0,l,u="";for(;a<o;){const c=a;l=qm(e,c,l);const d=l[5];if(a=d+1,c===d)continue;const h=l[0];if(h===0){u+="/"+e.substring(c,d);continue}if(h===2){const f=t._splat;s._splat=f,s["*"]=f;const p=e.substring(c,l[1]),y=e.substring(l[4],d);if(!f){i=!0,(p||y)&&(u+="/"+p+y);continue}const x=Qd("_splat",t,n);u+="/"+p+x+y;continue}if(h===1){const f=e.substring(l[2],l[3]);!i&&!(f in t)&&(i=!0),s[f]=t[f];const p=e.substring(c,l[1]),y=e.substring(l[4],d),x=Qd(f,t,n)??"undefined";u+="/"+p+x+y;continue}if(h===3){const f=e.substring(l[2],l[3]),p=t[f];if(p==null)continue;s[f]=p;const y=e.substring(c,l[1]),x=e.substring(l[4],d),m=Qd(f,t,n)??"";u+="/"+y+m+x;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:s,interpolatedPath:u||"/",isMissingParams:i}}function Qv(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function mt(e){return(e==null?void 0:e.isNotFound)===!0}function vR(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const xR="tsr-scroll-restoration-v1_3";function wR(){const e=vR();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Js(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=Or(r,t)||t},persist:()=>{try{e.setItem(xR,JSON.stringify(t))}catch{}}}}const qv=wR(),SR=e=>e.state.__TSR_key||e.href;function bR(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let jl=!1;const Ao="window",Zv="data-scroll-restoration-id";function kR(e,t){if(!qv)return;const n=qv;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,jl=!1;const r=e.options.getScrollRestorationKey||SR,i=new Map;window.history.scrollRestoration="manual";const s=a=>{if(!(jl||!e.isScrollRestoring))if(a.target===document||a.target===window)i.set(Ao,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const l=a.target;i.set(l,{scrollX:l.scrollLeft||0,scrollY:l.scrollTop||0})}},o=a=>{var u;if(!e.isScrollRestoring||!a||i.size===0||!n)return;const l=(u=n.state)[a]||(u[a]={});for(const[c,d]of i){let h;if(c===Ao)h=Ao;else if(c.isConnected){const f=c.getAttribute(Zv);h=f?`[${Zv}="${f}"]`:bR(c)}h&&(l[h]=d)}};document.addEventListener("scroll",s,!0),e.subscribe("onBeforeLoad",a=>{o(a.fromLocation?r(a.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",a=>{var d;const l=r(a.toLocation),u=e.options.scrollRestorationBehavior,c=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){jl=!0;try{const h=e.isScrollRestoring?n.state[l]:void 0;let f=!1;if(h)for(const p in h){const y=h[p];if(!Js(y))continue;const{scrollX:x,scrollY:m}=y;if(!(!Number.isFinite(x)||!Number.isFinite(m))){if(p===Ao)window.scrollTo({top:m,left:x,behavior:u}),f=!0;else if(p){let v;try{v=document.querySelector(p)}catch{continue}v&&(v.scrollLeft=x,v.scrollTop=m,f=!0)}}}if(!f){const p=e.history.location.hash.slice(1);if(p){const y=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(y){const x=document.getElementById(p);x&&x.scrollIntoView(y)}}else{const y={top:0,left:0,behavior:u};if(window.scrollTo(y),c)for(const x of c){if(x===Ao)continue;const m=typeof x=="function"?x():document.querySelector(x);m&&m.scrollTo(y)}}}}finally{jl=!1}e.isScrollRestoring&&n.set(h=>(h[l]||(h[l]={}),h))}})}function _R(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function qd(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function CR(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,i]of t.entries()){const s=n[r];s==null?n[r]=qd(i):Array.isArray(s)?s.push(qd(i)):n[r]=[s,qd(i)]}return n}const PR=ER(JSON.parse),TR=jR(JSON.stringify,JSON.parse);function ER(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=CR(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function jR(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const s=_R(i,r);return s?`?${s}`:""}}const $i="__root__";function AR(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function At(e){return e instanceof Response&&!!e.options}function RR(e){return{input:({url:t})=>{for(const n of e)t=Wf(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=_k(e[n],t);return t}}}function LR(e){const t=kk(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:o})=>{const a=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===i?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=ou(["/",t,o.pathname]),o)}}function Wf(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function _k(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function MR(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:s}=t,o=new Map,a=new Map,l=new Map,u=n(e.status),c=n(e.loadedAt),d=n(e.isLoading),h=n(e.isTransitioning),f=n(e.location),p=n(e.resolvedLocation),y=n(e.statusCode),x=n(e.redirect),m=n([]),v=n([]),w=n([]),b=r(()=>Zd(o,m.get())),_=r(()=>Zd(a,v.get())),S=r(()=>Zd(l,w.get())),P=r(()=>m.get()[0]),T=r(()=>m.get().some(W=>{var D;return((D=o.get(W))==null?void 0:D.get().status)==="pending"})),j=r(()=>{var W;return{locationHref:f.get().href,resolvedLocationHref:(W=p.get())==null?void 0:W.href,status:u.get()}}),E=r(()=>({status:u.get(),loadedAt:c.get(),isLoading:d.get(),isTransitioning:h.get(),matches:b.get(),location:f.get(),resolvedLocation:p.get(),statusCode:y.get(),redirect:x.get()})),L=Ma(64);function M(W){let D=L.get(W);return D||(D=r(()=>{const z=m.get();for(const k of z){const U=o.get(k);if(U&&U.routeId===W)return U.get()}}),L.set(W,D)),D}const $={status:u,loadedAt:c,isLoading:d,isTransitioning:h,location:f,resolvedLocation:p,statusCode:y,redirect:x,matchesId:m,pendingIds:v,cachedIds:w,matches:b,pendingMatches:_,cachedMatches:S,firstId:P,hasPending:T,matchRouteDeps:j,matchStores:o,pendingMatchStores:a,cachedMatchStores:l,__store:E,getRouteMatchStore:M,setMatches:B,setPending:F,setCached:V};B(e.matches),s==null||s($);function B(W){Jd(W,o,m,n,i)}function F(W){Jd(W,a,v,n,i)}function V(W){Jd(W,l,w,n,i)}return $}function Zd(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function Jd(e,t,n,r,i){const s=e.map(a=>a.id),o=new Set(s);i(()=>{for(const a of t.keys())o.has(a)||t.delete(a);for(const a of e){const l=t.get(a.id);if(!l){const u=r(a);u.routeId=a.routeId,t.set(a.id,u);continue}l.routeId=a.routeId,l.get()!==a&&l.set(a)}rR(n.get(),s)||n.set(s)})}const Hf=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},IR=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),Jc=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),zi=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let s=0;s<=i;s++){const o=e.matches[s];if(!o)continue;const a=e.router.getMatch(o.id);a&&Object.assign(r,a.__routeContext,a.__beforeLoadContext)}return r},Jv=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(o=>o.routeId===e.router.routeTree.id),i=r>=0?r:0;let s=n?e.matches.findIndex(o=>o.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=i);for(let o=s;o>=0;o--){const a=e.matches[o];if(e.router.looseRoutesById[a.routeId].options.notFoundComponent)return o}return n?s:i},Hr=(e,t,n)=>{var r,i,s;if(!(!At(n)&&!mt(n)))throw At(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:At(n)?"redirected":mt(n)?"notFound":o.status==="pending"?"success":o.status,context:zi(e,t.index),isFetching:!1,error:n})),mt(n)&&!n.routeId&&(n.routeId=t.routeId),(s=t._nonReactive.loadPromise)==null||s.resolve()),At(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},Ck=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},ex=(e,t,n)=>{const r=zi(e,n);e.updateMatch(t,i=>({...i,context:r}))},Ro=(e,t,n,r)=>{var a,l;const{id:i,routeId:s}=e.matches[t],o=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Hr(e,e.router.getMatch(i),n);try{(l=(a=o.options).onError)==null||l.call(a,n)}catch(u){n=u,Hr(e,e.router.getMatch(i),n)}e.updateMatch(i,u=>{var c,d;return(c=u._nonReactive.beforeLoadPromise)==null||c.resolve(),u._nonReactive.beforeLoadPromise=void 0,(d=u._nonReactive.loadPromise)==null||d.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!At(n)&&!mt(n)&&(e.serialError??(e.serialError=n))},Pk=(e,t,n,r)=>{var s;if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Jc(e,t)&&(n.options.loader||n.options.beforeLoad||Ek(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((s=e.router.options)==null?void 0:s.defaultPendingComponent))){const o=setTimeout(()=>{Hf(e)},i);r._nonReactive.pendingTimeout=o}},DR=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Pk(e,t,n,r);const i=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Hr(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},NR=(e,t,n,r)=>{const i=e.router.getMatch(t);let s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=eo(()=>{s==null||s.resolve(),s=void 0});const{paramsError:o,searchError:a}=i;o&&Ro(e,n,o,"PARSE_PARAMS"),a&&Ro(e,n,a,"VALIDATE_SEARCH"),Pk(e,t,r,i);const l=new AbortController;let u=!1;const c=()=>{u||(u=!0,e.updateMatch(t,b=>({...b,isFetching:"beforeLoad",fetchCount:b.fetchCount+1,abortController:l})))},d=()=>{var b;(b=i._nonReactive.beforeLoadPromise)==null||b.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,_=>({..._,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{c(),d()});return}i._nonReactive.beforeLoadPromise=eo();const h={...zi(e,n,!1),...i.__routeContext},{search:f,params:p,cause:y}=i,x=Jc(e,t),m={search:f,abortController:l,params:p,preload:x,context:h,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:x?"preload":y,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=b=>{if(b===void 0){e.router.batch(()=>{c(),d()});return}(At(b)||mt(b))&&(c(),Ro(e,n,b,"BEFORE_LOAD")),e.router.batch(()=>{c(),e.updateMatch(t,_=>({..._,__beforeLoadContext:b})),d()})};let w;try{if(w=r.options.beforeLoad(m),La(w))return c(),w.catch(b=>{Ro(e,n,b,"BEFORE_LOAD")}).then(v)}catch(b){c(),Ro(e,n,b,"BEFORE_LOAD")}v(w)},BR=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>a(),o=()=>NR(e,n,t,i),a=()=>{if(Ck(e,n))return;const l=DR(e,n,i);return La(l)?l.then(o):o()};return s()},FR=(e,t,n)=>{var s,o,a,l,u,c;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(o=(s=n.options).head)==null?void 0:o.call(s,i),(l=(a=n.options).scripts)==null?void 0:l.call(a,i),(c=(u=n.options).headers)==null?void 0:c.call(u,i)]).then(([d,h,f])=>({meta:d==null?void 0:d.meta,links:d==null?void 0:d.links,headScripts:d==null?void 0:d.scripts,headers:f,scripts:h,styles:d==null?void 0:d.styles}))},Tk=(e,t,n,r,i)=>{const s=t[r-1],{params:o,loaderDeps:a,abortController:l,cause:u}=e.router.getMatch(n),c=zi(e,r),d=Jc(e,n);return{params:o,deps:a,preload:!!d,parentMatchPromise:s,abortController:l,context:c,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:d?"preload":u,route:i,...e.router.options.additionalContext}},tx=async(e,t,n,r,i)=>{var s,o,a,l,u;try{const c=e.router.getMatch(n);try{(!(xk??e.router.isServer)||c.ssr===!0)&&Ia(i);const d=i.options.loader,h=typeof d=="function"?d:d==null?void 0:d.handler,f=h==null?void 0:h(Tk(e,t,n,r,i)),p=!!h&&La(f);if((p||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(n,x=>({...x,isFetching:"loader"})),h){const x=p?await f:f;Hr(e,e.router.getMatch(n),x),x!==void 0&&e.updateMatch(n,m=>({...m,loaderData:x}))}i._lazyPromise&&await i._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,x=>({...x,error:void 0,context:zi(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let h=d;if((h==null?void 0:h.name)==="AbortError"){if(c.abortController.signal.aborted){(s=c._nonReactive.loaderPromise)==null||s.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:zi(e,r)}));return}const f=c._nonReactive.minPendingPromise;f&&await f,mt(d)&&await((a=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:a.call(o)),Hr(e,e.router.getMatch(n),d);try{(u=(l=i.options).onError)==null||u.call(l,d)}catch(p){h=p,Hr(e,e.router.getMatch(n),p)}!At(h)&&!mt(h)&&await Ia(i,["errorComponent"]),e.updateMatch(n,p=>({...p,error:h,context:zi(e,r),status:"error",isFetching:!1}))}}catch(c){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),Hr(e,d,c)}},VR=async(e,t,n)=>{var f,p,y,x;async function r(m,v,w,b,_){const S=Date.now()-v.updatedAt,P=m?_.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:_.options.staleTime??e.router.options.defaultStaleTime??0,T=_.options.shouldReload,j=typeof T=="function"?T(Tk(e,t,i,n,_)):T,{status:E,invalid:L}=b,M=S>=P&&(!!e.forceStaleReload||b.cause==="enter"||w!==void 0&&w!==b.id);o=E==="success"&&(L||(j??M)),m&&_.options.preload===!1||(o&&!e.sync&&c?(a=!0,(async()=>{var $,B;try{await tx(e,t,i,n,_);const F=e.router.getMatch(i);($=F._nonReactive.loaderPromise)==null||$.resolve(),(B=F._nonReactive.loadPromise)==null||B.resolve(),F._nonReactive.loaderPromise=void 0,F._nonReactive.loadPromise=void 0}catch(F){At(F)&&await e.router.navigate(F.options)}})()):E!=="success"||o?await tx(e,t,i,n,_):ex(e,i,n))}const{id:i,routeId:s}=e.matches[n];let o=!1,a=!1;const l=e.router.looseRoutesById[s],u=l.options.loader,c=((typeof u=="function"||u==null?void 0:u.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(Ck(e,i)){if(!e.router.getMatch(i))return e.matches[n];ex(e,i,n)}else{const m=e.router.getMatch(i),v=e.router.stores.matchesId.get()[n],w=((f=v&&e.router.stores.matchStores.get(v)||null)==null?void 0:f.routeId)===s?v:(p=e.router.stores.matches.get().find(_=>_.routeId===s))==null?void 0:p.id,b=Jc(e,i);if(m._nonReactive.loaderPromise){if(m.status==="success"&&!e.sync&&!m.preload&&c)return m;await m._nonReactive.loaderPromise;const _=e.router.getMatch(i),S=_._nonReactive.error||_.error;S&&Hr(e,_,S),_.status==="pending"&&await r(b,m,w,_,l)}else{const _=b&&!e.router.stores.matchStores.has(i),S=e.router.getMatch(i);S._nonReactive.loaderPromise=eo(),_!==S.preload&&e.updateMatch(i,P=>({...P,preload:_})),await r(b,m,w,S,l)}}const d=e.router.getMatch(i);a||((y=d._nonReactive.loaderPromise)==null||y.resolve(),(x=d._nonReactive.loadPromise)==null||x.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,a||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;const h=a?d.isFetching:!1;return h!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,m=>({...m,isFetching:h,invalid:!1})),e.router.getMatch(i)):d};async function nx(e){var h,f;const t=e,n=[];IR(t.router)&&Hf(t);let r;for(let p=0;p<t.matches.length;p++){try{const y=BR(t,p);La(y)&&await y}catch(y){if(At(y))throw y;if(mt(y))r=y;else if(!t.preload)throw y;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?Jv(t,r):void 0,o=r&&t.preload?0:s!==void 0?Math.min(s+1,i):i;let a,l;for(let p=0;p<o;p++)n.push(VR(t,n,p));try{await Promise.all(n)}catch{const p=await Promise.allSettled(n);for(const y of p){if(y.status!=="rejected")continue;const x=y.reason;if(At(x))throw x;mt(x)?a??(a=x):l??(l=x)}if(l!==void 0)throw l}const u=a??(r&&!t.preload?r:void 0);let c=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const p=Jv(t,u);p===void 0&&dr();const y=t.matches[p],x=t.router.looseRoutesById[y.routeId],m=(h=t.router.options)==null?void 0:h.defaultNotFoundComponent;!x.options.notFoundComponent&&m&&(x.options.notFoundComponent=m),u.routeId=y.routeId;const v=y.routeId===t.router.routeTree.id;t.updateMatch(y.id,w=>({...w,...v?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),c=p,await Ia(x,["notFoundComponent"])}else if(!t.preload){const p=t.matches[0];p.globalNotFound||(f=t.router.getMatch(p.id))!=null&&f.globalNotFound&&t.updateMatch(p.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const p=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Ia(p,["errorComponent"])}for(let p=0;p<=c;p++){const{id:y,routeId:x}=t.matches[p],m=t.router.looseRoutesById[x];try{const v=FR(t,y,m);if(v){const w=await v;t.updateMatch(y,b=>({...b,...w}))}}catch(v){console.error(`Error executing head for route ${x}:`,v)}}const d=Hf(t);if(La(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function rx(e,t){const n=t.map(r=>{var i,s;return(s=(i=e.options[r])==null?void 0:i.preload)==null?void 0:s.call(i)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Ia(e,t=au){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:i,...s}=r.options;Object.assign(e.options,s),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===au?(()=>{if(e._componentsPromise===void 0){const r=rx(e,au);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():rx(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ek(e){var t;for(const n of au)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const au=["component","errorComponent","pendingComponent","notFoundComponent"];var ri="__TSR_index",ix="popstate",sx="beforeunload";function $R(e){let t=e.getLocation();const n=new Set,r=o=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?r(o):t=e.getLocation()},s=async({task:o,navigateOpts:a,...l})=>{var d,h;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const u=((d=e.getBlockers)==null?void 0:d.call(e))??[],c=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&c)for(const f of u){const p=ic(l.path,l.state);if(await f.blockerFn({currentLocation:t,nextLocation:p,action:l.type})){(h=e.onBlocked)==null||h.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,a,l)=>{const u=t.state[ri];a=ox(u+1,a),s({task:()=>{e.pushState(o,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const u=t.state[ri];a=ox(u,a),s({task:()=>{e.replaceState(o,a),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:o,state:a})},go:(o,a)=>{s({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{s({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[ri]!==0,createHref:o=>e.createHref(o),block:o=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,o]),()=>{var c,d;const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];(d=e.setBlockers)==null||d.call(e,u.filter(h=>h!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:r}}function ox(e,t){t||(t={});const n=eg();return{...t,key:n,__TSR_key:n,[ri]:e}}function zR(e){var T,j;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,o=E=>i=E,a=E=>E,l=()=>ic(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((T=t.history.state)!=null&&T.__TSR_key)&&!((j=t.history.state)!=null&&j.key)){const E=eg();t.history.replaceState({[ri]:0,key:E,__TSR_key:E},"")}let u=l(),c,d=!1,h=!1,f=!1,p=!1;const y=()=>u;let x,m;const v=()=>{x&&(P._ignoreSubscribers=!0,(x.isPush?t.history.pushState:t.history.replaceState)(x.state,"",x.href),P._ignoreSubscribers=!1,x=void 0,m=void 0,c=void 0)},w=(E,L,M)=>{const $=a(L);m||(c=u),u=ic(L,M),x={href:$,state:M,isPush:(x==null?void 0:x.isPush)||E==="push"},m||(m=Promise.resolve().then(()=>v()))},b=E=>{u=l(),P.notify({type:E})},_=async()=>{if(h){h=!1;return}const E=l(),L=E.state[ri]-u.state[ri],M=L===1,$=L===-1,B=!M&&!$||d;d=!1;const F=B?"GO":$?"BACK":"FORWARD",V=B?{type:"GO",index:L}:{type:$?"BACK":"FORWARD"};if(f)f=!1;else{const W=s();if(typeof document<"u"&&W.length){for(const D of W)if(await D.blockerFn({currentLocation:u,nextLocation:E,action:F})){h=!0,t.history.go(1),P.notify(V);return}}}u=l(),P.notify(V)},S=E=>{if(p){p=!1;return}let L=!1;const M=s();if(typeof document<"u"&&M.length)for(const $ of M){const B=$.enableBeforeUnload??!0;if(B===!0){L=!0;break}if(typeof B=="function"&&B()===!0){L=!0;break}}if(L)return E.preventDefault(),E.returnValue=""},P=$R({getLocation:y,getLength:()=>t.history.length,pushState:(E,L)=>w("push",E,L),replaceState:(E,L)=>w("replace",E,L),back:E=>(E&&(f=!0),p=!0,t.history.back()),forward:E=>{E&&(f=!0),p=!0,t.history.forward()},go:E=>{d=!0,t.history.go(E)},createHref:E=>a(E),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(sx,S,{capture:!0}),t.removeEventListener(ix,_)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(sx,S,{capture:!0}),t.addEventListener(ix,_),t.history.pushState=function(...E){const L=n.apply(t.history,E);return P._ignoreSubscribers||b("PUSH"),L},t.history.replaceState=function(...E){const L=r.apply(t.history,E);return P._ignoreSubscribers||b("REPLACE"),L},P}function OR(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function ic(e,t){const n=OR(e),r=n.indexOf("#"),i=n.indexOf("?"),s=eg();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:t||{[ri]:0,key:s,__TSR_key:s}}}function eg(){return(Math.random()+1).toString(36).substring(7)}function zs(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var UR=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var c;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",s=this.basepath===void 0,o=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=yR(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=zR()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let d;this.resolvePathCache=Ma(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=MR(HR(this.latestLocation),d),kR(this)}let a=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(s||i!==l||o!==u){this.basepath=l;const d=[],h=kk(l);h&&h!=="/"&&d.push(LR({basepath:l})),u&&d.push(u),this.rewrite=d.length===0?void 0:d.length===1?d[0]:RR(d),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((c=window.CSS)==null?void 0:c.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=cR(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&sR(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:l,search:u,hash:c,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const m=this.options.parseSearch(u),v=this.options.stringifySearch(m);return{href:l+v+c,publicHref:l+v+c,pathname:jo(l).path,external:!1,searchStr:v,search:xi(r==null?void 0:r.search,m),hash:jo(c.slice(1)).path,state:Ur(r==null?void 0:r.state,h)}}const f=new URL(d,this.origin),p=Wf(this.rewrite,f),y=this.options.parseSearch(p.search),x=this.options.stringifySearch(y);return p.search=x,{href:p.href.replace(p.origin,""),publicHref:d,pathname:jo(p.pathname).path,external:!!this.rewrite&&p.origin!==this.origin,searchStr:x,search:xi(r==null?void 0:r.search,y),hash:jo(p.hash.slice(1)).path,state:Ur(r==null?void 0:r.state,h)}},s=i(n),{__tempLocation:o,__tempKey:a}=s.state;if(o&&(!a||a===this.tempLocationKey)){const l=i(o);return l.state.key=s.state.key,l.state.__TSR_key=s.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>gR({base:n,to:Jm(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>KR({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(s={})=>{var E,L;const o=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutesLightweight(o);s.from;const l=s.unsafeRelative==="path"?o.pathname:s.from??a.fullPath,u=this.resolvePathWithBase(l,"."),c=a.search,d=Object.assign(Object.create(null),a.params),h=s.to?this.resolvePathWithBase(u,`${s.to}`):this.resolvePathWithBase(u,"."),f=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?d:Object.assign(d,Or(s.params,d)),p=this.getMatchedRoutes(h);let y=p.matchedRoutes;if((!p.foundRoute||p.foundRoute.path!=="/"&&p.routeParams["**"])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(f).length>0)for(const M of y){const $=((E=M.options.params)==null?void 0:E.stringify)??M.options.stringifyParams;if($)try{Object.assign(f,$(f))}catch{}}const x=n.leaveParams?h:jo(Xv({path:h,params:f,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let m=c;if(n._includeValidateSearch&&((L=this.options.search)!=null&&L.strict)){const M={};y.forEach($=>{if($.options.validateSearch)try{Object.assign(M,lu($.options.validateSearch,{...M,...m}))}catch{}}),m=M}m=GR({search:m,dest:s,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),m=xi(c,m);const v=this.options.stringifySearch(m),w=s.hash===!0?o.hash:s.hash?Or(s.hash,o.hash):void 0,b=w?`#${w}`:"";let _=s.state===!0?o.state:s.state?Or(s.state,o.state):{};_=Ur(o.state,_);const S=`${x}${v}${b}`;let P,T,j=!1;if(this.rewrite){const M=new URL(S,this.origin),$=_k(this.rewrite,M);P=M.href.replace(M.origin,""),$.origin!==this.origin?(T=$.href,j=!0):T=$.pathname+$.search+$.hash}else P=nR(S),T=P;return{publicHref:T,href:P,pathname:x,search:m,searchStr:v,state:_,hash:w??"",external:j,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{const a=r(s);let l=o?r(o):void 0;if(!l){const u=Object.create(null);if(this.options.routeMasks){const c=oR(a.pathname,this.processedTree);if(c){Object.assign(u,c.rawParams);const{from:d,params:h,...f}=c.route,p=h===!1||h===null?Object.create(null):(h??!0)===!0?u:Object.assign(u,Or(h,u));o={from:n.from,...f,params:p},l=r(o)}}}return l&&(a.maskedLocation=l),a};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const s=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(c=>{i.state[c]=this.latestLocation.state[c]});const u=Vi(i.state,this.latestLocation.state);return l.forEach(c=>{delete i.state[c]}),u},o=ni(this.latestLocation.href)===ni(i.href);let a=this.commitLocationPromise;if(this.commitLocationPromise=eo(()=>{a==null||a.resolve(),a=void 0}),o&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...c}=i;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:o,href:a,...l}={})=>{if(a){const d=this.history.location.state.__TSR_index,h=ic(a,{__TSR_index:n?d:d+1}),f=new URL(h.pathname,this.origin);l.to=Wf(this.rewrite,f).pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const c=this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:s,...o})=>{var l,u;let a=!1;if(i)try{new URL(`${i}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(n!==void 0||!i){const d=this.buildLocation({to:n,...o});i=i??d.publicHref,s=s??d.publicHref}const c=!a&&s?s:i;if(nc(c,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const d=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const h of d)if(h!=null&&h.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(s=>s.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,i,s;const o=this.stores.resolvedLocation.get()??this.stores.location.get();for(s=new Promise(l=>{this.startTransition(async()=>{var u;try{this.beforeLoad();const c=this.latestLocation,d=zs(c,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...d}),this.emit({type:"onBeforeLoad",...d}),await nx({router:this,sync:n==null?void 0:n.sync,forceStaleReload:o.href===c.href,matches:this.stores.pendingMatches.get(),location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var x,m;let h=null,f=null,p=null,y=null;this.batch(()=>{const v=this.stores.pendingMatches.get(),w=v.length,b=this.stores.matches.get();h=w?b.filter(P=>!this.stores.pendingMatchStores.has(P.id)):null;const _=new Set;for(const P of this.stores.pendingMatchStores.values())P.routeId&&_.add(P.routeId);const S=new Set;for(const P of this.stores.matchStores.values())P.routeId&&S.add(P.routeId);f=w?b.filter(P=>!_.has(P.routeId)):null,p=w?v.filter(P=>!S.has(P.routeId)):null,y=w?v.filter(P=>S.has(P.routeId)):b,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),w&&(this.stores.setMatches(v),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...h.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[v,w]of[[f,"onLeave"],[p,"onEnter"],[y,"onStay"]])if(v)for(const b of v)(m=(x=this.looseRoutesById[b.routeId].options)[w])==null||m.call(x,b)})})}})}catch(c){At(c)?(r=c,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):mt(c)&&(i=c);const d=r?r.status:i?404:this.stores.matches.get().some(h=>h.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(d),this.stores.redirect.set(r)})}this.latestLoadPromise===s&&((u=this.commitLocationPromise)==null||u.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),l()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.matches.get().some(l=>l.status==="error")&&(a=500),a!==void 0&&this.stores.statusCode.set(a)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,o=this.stores.resolvedLocation.get(),a=typeof r.types=="function"?r.types(zs(s,o)):r.types;if(a===!1){n();return}i={update:n,types:a}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const s=this.stores.matchStores.get(n);if(s){s.set(r);return}const o=this.stores.cachedMatchStores.get(n);if(o){const a=r(o.get());a.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(l=>l.filter(u=>u!==n)):o.set(a)}})},this.getMatch=n=>{var r,i,s;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((s=this.stores.matchStores.get(n))==null?void 0:s.get())},this.invalidate=n=>{const r=i=>{var s;return((s=n==null?void 0:n.filter)==null?void 0:s.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(i);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const s=i.pathname+i.search+i.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&nc(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(i=>!r(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=i=>{const s=this.looseRoutesById[i.routeId];if(!s.options.loader)return!0;const o=(i.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=o};this.clearCache({filter:r})},this.loadRouteChunk=Ia,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...s,...this.stores.cachedIds.get()]),a=i.filter(l=>!o.has(l.id));if(a.length){const l=this.stores.cachedMatches.get();this.stores.setCached([...l,...a])}try{return i=await nx({router:this,matches:i,location:r,preload:!0,updateMatch:(l,u)=>{s.has(l)?i=i.map(c=>c.id===l?u(c):c):this.updateMatch(l,u)}}),i}catch(l){if(At(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:r});mt(l)||console.error(l);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(i);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const o=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=aR(s.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!a||n.params&&!Vi(a.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Vi(o.search,s.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??TR,parseSearch:e.parseSearch??PR,protocolAllowlist:e.protocolAllowlist??tR}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var d,h;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:s}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&i["**"]:ni(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const l=a?XR(this.options.notFoundMode,o):void 0,u=new Array(o.length),c=new Map;for(const f of this.stores.matchStores.values())f.routeId&&c.set(f.routeId,f.get());for(let f=0;f<o.length;f++){const p=o[f],y=u[f-1];let x,m,v;{const F=(y==null?void 0:y.search)??e.search,V=(y==null?void 0:y._strictSearch)??void 0;try{const W=lu(p.options.validateSearch,{...F})??void 0;x={...F,...W},m={...V,...W},v=void 0}catch(W){let D=W;if(W instanceof sc||(D=new sc(W.message,{cause:W})),t!=null&&t.throwOnError)throw D;x=F,m={},v=D}}const w=((h=(d=p.options).loaderDeps)==null?void 0:h.call(d,{search:x}))??"",b=w?JSON.stringify(w):"",{interpolatedPath:_,usedParams:S}=Xv({path:p.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),P=p.id+_+b,T=this.getMatch(P),j=c.get(p.id),E=(T==null?void 0:T._strictParams)??S;let L;if(!T)try{ax(p,S,s,E)}catch(F){if(mt(F)||At(F)?L=F:L=new WR(F.message,{cause:F}),t!=null&&t.throwOnError)throw L}Object.assign(i,E);const M=j?"stay":"enter";let $;if(T)$={...T,cause:M,params:(j==null?void 0:j.params)??i,_strictParams:E,search:xi(j?j.search:T.search,x),_strictSearch:m};else{const F=p.options.loader||p.options.beforeLoad||p.lazyFn||Ek(p)?"pending":"success";$={id:P,ssr:p.options.ssr,index:f,routeId:p.id,params:(j==null?void 0:j.params)??i,_strictParams:E,pathname:_,updatedAt:Date.now(),search:j?xi(j.search,x):x,_strictSearch:m,searchError:void 0,status:F,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:eo()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:j?Ur(j.loaderDeps,w):w,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}t!=null&&t.preload||($.globalNotFound=l===p.id),$.searchError=v;const B=this.getParentContext(y);$.context={...B,...$.__routeContext,...$.__beforeLoadContext},u[f]=$}for(let f=0;f<u.length;f++){const p=u[f],y=this.looseRoutesById[p.routeId],x=this.getMatch(p.id),m=c.get(p.routeId);if(p.params=m?xi(m.params,i):i,!x){const v=u[f-1],w=this.getParentContext(v);if(y.options.context){const b={deps:p.loaderDeps,params:p.params,context:w??{},location:e,navigate:_=>this.navigate({..._,_fromLocation:e}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:u,routeId:y.id};p.__routeContext=y.options.context(b)??void 0}p.context={...w,...p.__routeContext,...p.__beforeLoadContext}}}return u}matchRoutesLightweight(e){var c;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=Ra(t),s={...e.search};for(const d of t)try{Object.assign(s,lu(d.options.validateSearch,s))}catch{}const o=Ra(this.stores.matchesId.get()),a=o&&((c=this.stores.matchStores.get(o))==null?void 0:c.get()),l=a&&a.routeId===i.id&&a.pathname===e.pathname;let u;if(l)u=a.params;else{const d=Object.assign(Object.create(null),n);for(const h of t)try{ax(h,n,r??{},d)}catch{}u=d}return{matchedRoutes:t,fullPath:i.fullPath,search:s,params:u}}},sc=class extends Error{},WR=class extends Error{};function HR(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function lu(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new sc("Async validation not supported");if(n.issues)throw new sc(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function KR({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=ni(e);let s,o;const a=lR(i,n,!0);return a&&(s=a.route,Object.assign(r,a.rawParams),o=Object.assign(Object.create(null),a.parsedParams)),{matchedRoutes:(a==null?void 0:a.branch)||[t.__root__],routeParams:r,foundRoute:s,parsedParams:o}}function GR({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return YR(n)(e,t,r??!1)}function YR(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)(i=s.options.search)!=null&&i.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const o=({search:a,next:l})=>{let u=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(u=s.options.preSearchFilters.reduce((d,h)=>h(d),a));const c=l(u);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((d,h)=>h(d),c):c};t.middlewares.push(o)}if(s.options.validateSearch){const o=({search:a,next:l})=>{const u=l(a);if(!t._includeValidateSearch)return u;try{return{...u,...lu(s.options.validateSearch,u)??void 0}}catch{return u}};t.middlewares.push(o)}}const n=({search:s})=>{const o=t.dest;return o.search?o.search===!0?s:Or(o.search,s):{}};t.middlewares.push(n);const r=(s,o,a)=>{if(s>=a.length)return o;const l=a[s];return l({search:o,next:c=>r(s+1,c,a)})};return function(o,a,l){return t.dest=a,t._includeValidateSearch=l,r(0,o,t.middlewares)}}function XR(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return $i}function ax(e,t,n,r){var s;const i=((s=e.options.params)==null?void 0:s.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const o in t)o in n&&(r[o]=n[o]);else{const o=i(r);Object.assign(r,o)}}const QR="Error preloading route! ☝️";var jk=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var l,u;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),r?this._path=$i:this.parentRoute||dr();let i=r?$i:n==null?void 0:n.path;i&&i!=="/"&&(i=bk(i));const s=(n==null?void 0:n.id)||i;let o=r?$i:ou([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=ou(["/",o]));const a=o==="__root__"?"/":ou([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=a,this._to=ni(a)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>AR({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},qR=class extends jk{constructor(e){super(e)}};function ZR(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function tg(e){const t=e.errorComponent??ng;return g.jsx(JR,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?C.createElement(t,{error:n,reset:r}):e.children})}var JR=class extends C.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function ng({error:e}){const[t,n]=C.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),t?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?g.jsx("code",{children:e.message}):null})}):null]})}function eL({children:e,fallback:t=null}){return Ak()?g.jsx(Gi.Fragment,{children:e}):g.jsx(Gi.Fragment,{children:t})}function Ak(){return Gi.useSyncExternalStore(tL,()=>!0,()=>!1)}function tL(){return()=>{}}var Rk=C.createContext(null);function Qt(e){return C.useContext(Rk)}var ed=C.createContext(void 0),nL=C.createContext(void 0),Ae=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Ae||{});function rL({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:s,checkDirty:o,shallowPropagate:a};function r(u,c,d){const h=c.depsTail;if(h!==void 0&&h.dep===u)return;const f=h!==void 0?h.nextDep:c.deps;if(f!==void 0&&f.dep===u){f.version=d,c.depsTail=f;return}const p=u.subsTail;if(p!==void 0&&p.version===d&&p.sub===c)return;const y=c.depsTail=u.subsTail={version:d,dep:u,sub:c,prevDep:h,nextDep:f,prevSub:p,nextSub:void 0};f!==void 0&&(f.prevDep=y),h!==void 0?h.nextDep=y:c.deps=y,p!==void 0?p.nextSub=y:u.subs=y}function i(u,c=u.sub){const d=u.dep,h=u.prevDep,f=u.nextDep,p=u.nextSub,y=u.prevSub;return f!==void 0?f.prevDep=h:c.depsTail=h,h!==void 0?h.nextDep=f:c.deps=f,p!==void 0?p.prevSub=y:d.subsTail=y,y!==void 0?y.nextSub=p:(d.subs=p)===void 0&&n(d),f}function s(u){let c=u.nextSub,d;e:do{const h=u.sub;let f=h.flags;if(f&60?f&12?f&4?!(f&48)&&l(u,h)?(h.flags=f|40,f&=1):f=0:h.flags=f&-9|32:f=0:h.flags=f|32,f&2&&t(h),f&1){const p=h.subs;if(p!==void 0){const y=(u=p).nextSub;y!==void 0&&(d={value:c,prev:d},c=y);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function o(u,c){let d,h=0,f=!1;e:do{const p=u.dep,y=p.flags;if(c.flags&16)f=!0;else if((y&17)===17){if(e(p)){const x=p.subs;x.nextSub!==void 0&&a(x),f=!0}}else if((y&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=p.deps,c=p,++h;continue}if(!f){const x=u.nextDep;if(x!==void 0){u=x;continue}}for(;h--;){const x=c.subs,m=x.nextSub!==void 0;if(m?(u=d.value,d=d.prev):u=x,f){if(e(c)){m&&a(x),c=u.sub;continue}f=!1}else c.flags&=-33;c=u.sub;const v=u.nextDep;if(v!==void 0){u=v;continue e}}return f}while(!0)}function a(u){do{const c=u.sub,d=c.flags;(d&48)===32&&(c.flags=d|16,(d&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let d=c.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function iL(e,t,n){var s,o,a;const r=typeof e=="object",i=r?e:void 0;return{next:(s=r?e.next:e)==null?void 0:s.bind(i),error:(o=r?e.error:t)==null?void 0:o.bind(i),complete:(a=r?e.complete:n)==null?void 0:a.bind(i)}}const Kf=[];let uu=0;const{link:lx,unlink:sL,propagate:oL,checkDirty:Lk,shallowPropagate:ux}=rL({update(e){return e._update()},notify(e){Kf[Gf++]=e,e.flags&=~Ae.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ae.Mutable|Ae.Dirty,oc(e))}});let Al=0,Gf=0,zn,Yf=0;function Mk(e){try{++Yf,e()}finally{--Yf||Ik()}}function oc(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=sL(n,e)}function Ik(){if(!(Yf>0)){for(;Al<Gf;){const e=Kf[Al];Kf[Al++]=void 0,e.notify()}Al=0,Gf=0}}function cx(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Ae.None:Ae.Mutable,get(){return zn!==void 0&&lx(i,zn,uu),i._snapshot},subscribe(s){const o=iL(s),a={current:!1},l=aL(()=>{var u;i.get(),a.current?(u=o.next)==null||u.call(o,i._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const o=zn,a=(t==null?void 0:t.compare)??Object.is;if(n)zn=i,++uu,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=Ae.Mutable|Ae.RecursedCheck);try{const l=i._snapshot,u=typeof s=="function"?s(l):s===void 0&&n?r(l):s;return l===void 0||!a(l,u)?(i._snapshot=u,!0):!1}finally{zn=o,n&&(i.flags&=~Ae.RecursedCheck),oc(i)}}};return n?(i.flags=Ae.Mutable|Ae.Dirty,i.get=function(){const s=i.flags;if(s&Ae.Dirty||s&Ae.Pending&&Lk(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&ux(o)}}else s&Ae.Pending&&(i.flags=s&~Ae.Pending);return zn!==void 0&&lx(i,zn,uu),i._snapshot}):i.set=function(s){if(i._update(s)){const o=i.subs;o!==void 0&&(oL(o),ux(o),Ik())}},i}function aL(e){const t=()=>{const r=zn;zn=n,++uu,n.depsTail=void 0,n.flags=Ae.Watching|Ae.RecursedCheck;try{return e()}finally{zn=r,n.flags&=~Ae.RecursedCheck,oc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ae.Watching|Ae.RecursedCheck,notify(){const r=this.flags;r&Ae.Dirty||r&Ae.Pending&&Lk(this.deps,this)?t():this.flags=Ae.Watching},stop(){this.flags=Ae.None,this.depsTail=void 0,oc(this)}};return t(),n}var Dk={exports:{}},Nk={},Bk={exports:{}},Fk={};/**
41
+ * @license React
42
+ * use-sync-external-store-shim.production.js
43
+ *
44
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE file in the root directory of this source tree.
48
+ */var to=C;function lL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uL=typeof Object.is=="function"?Object.is:lL,cL=to.useState,dL=to.useEffect,hL=to.useLayoutEffect,fL=to.useDebugValue;function pL(e,t){var n=t(),r=cL({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return hL(function(){i.value=n,i.getSnapshot=t,eh(i)&&s({inst:i})},[e,n,t]),dL(function(){return eh(i)&&s({inst:i}),e(function(){eh(i)&&s({inst:i})})},[e]),fL(n),n}function eh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!uL(e,n)}catch{return!0}}function mL(e,t){return t()}var gL=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?mL:pL;Fk.useSyncExternalStore=to.useSyncExternalStore!==void 0?to.useSyncExternalStore:gL;Bk.exports=Fk;var yL=Bk.exports;/**
49
+ * @license React
50
+ * use-sync-external-store-shim/with-selector.production.js
51
+ *
52
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE file in the root directory of this source tree.
56
+ */var td=C,vL=yL;function xL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wL=typeof Object.is=="function"?Object.is:xL,SL=vL.useSyncExternalStore,bL=td.useRef,kL=td.useEffect,_L=td.useMemo,CL=td.useDebugValue;Nk.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=bL(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=_L(function(){function l(f){if(!u){if(u=!0,c=f,f=r(f),i!==void 0&&o.hasValue){var p=o.value;if(i(p,f))return d=p}return d=f}if(p=d,wL(c,f))return p;var y=r(f);return i!==void 0&&i(p,y)?(c=f,p):(c=f,d=y)}var u=!1,c,d,h=n===void 0?null:n;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,n,r,i]);var a=SL(e,s[0],s[1]);return kL(function(){o.hasValue=!0,o.value=a},[a]),CL(a),a};Dk.exports=Nk;var Vk=Dk.exports;const PL=Dc(Vk);function TL(e,t){return e===t}function Nt(e,t,n=TL){const r=C.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(o);return a},[e]),i=C.useCallback(()=>e==null?void 0:e.get(),[e]);return Vk.useSyncExternalStoreWithSelector(r,i,i,t,n)}var EL={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ns(e){const t=Qt(),n=C.useContext(e.from?nL:ed),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=C.useRef(void 0);return Nt(i??EL,o=>{if((e.shouldThrow??!0)&&!o&&dr(),o===void 0)return;const a=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const l=Ur(s.current,a);return s.current=l,l}return a})}function $k(e){return ns({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function zk(e){const{select:t,...n}=e;return ns({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Ok(e){return ns({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Uk(e){return ns({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function uo(e){const t=Qt();return C.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function Wk(e){return ns({...e,select:t=>e.select?e.select(t.context):t.context})}function jL(e,t){const n=Qt(),r=QA(t),{activeProps:i,inactiveProps:s,activeOptions:o,to:a,preload:l,preloadDelay:u,preloadIntentProximity:c,hashScrollIntoView:d,replace:h,startTransition:f,resetScroll:p,viewTransition:y,children:x,target:m,disabled:v,style:w,className:b,onClick:_,onBlur:S,onFocus:P,onMouseEnter:T,onMouseLeave:j,onTouchStart:E,ignoreBlocker:L,params:M,search:$,hash:B,state:F,mask:V,reloadDocument:W,unsafeRelative:D,from:z,_fromLocation:k,...U}=e,Z=Ak(),A=C.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ue=Nt(n.stores.location,oe=>oe,(oe,N)=>oe.href===N.href),pe=C.useMemo(()=>{const oe={_fromLocation:ue,...A};return n.buildLocation(oe)},[n,ue,A]),he=pe.maskedLocation?pe.maskedLocation.publicHref:pe.publicHref,tt=pe.maskedLocation?pe.maskedLocation.external:pe.external,Ne=C.useMemo(()=>DL(he,tt,n.history,v),[v,tt,he,n.history]),Pe=C.useMemo(()=>{if(Ne!=null&&Ne.external)return nc(Ne.href,n.protocolAllowlist)?void 0:Ne.href;if(!NL(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),nc(a,n.protocolAllowlist)?void 0:a}catch{}},[a,Ne,n.protocolAllowlist]),me=C.useMemo(()=>{if(Pe)return!1;if(o!=null&&o.exact){if(!mR(ue.pathname,pe.pathname,n.basepath))return!1}else{const oe=rc(ue.pathname,n.basepath),N=rc(pe.pathname,n.basepath);if(!(oe.startsWith(N)&&(oe.length===N.length||oe[N.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Vi(ue.search,pe.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?Z&&ue.hash===pe.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,ue,Pe,Z,pe.hash,pe.pathname,pe.search,n.basepath]),Ft=me?Or(i,{})??AL:th,mn=me?th:Or(s,{})??th,Ln=[b,Ft.className,mn.className].filter(Boolean).join(" "),vr=(w||Ft.style||mn.style)&&{...w,...Ft.style,...mn.style},[ss,gi]=C.useState(!1),yi=C.useRef(!1),Mn=e.reloadDocument||Pe?!1:l??n.options.defaultPreload,xr=u??n.options.defaultPreloadDelay??0,O=C.useCallback(()=>{n.preloadRoute({...A,_builtLocation:pe}).catch(oe=>{console.warn(oe),console.warn(QR)})},[n,A,pe]);XA(r,C.useCallback(oe=>{oe!=null&&oe.isIntersecting&&O()},[O]),IL,{disabled:!!v||Mn!=="viewport"}),C.useEffect(()=>{yi.current||!v&&Mn==="render"&&(O(),yi.current=!0)},[v,O,Mn]);const Ye=oe=>{const N=oe.currentTarget.getAttribute("target"),H=m!==void 0?m:N;if(!v&&!BL(oe)&&!oe.defaultPrevented&&(!H||H==="_self")&&oe.button===0){oe.preventDefault(),Qm.flushSync(()=>{gi(!0)});const J=n.subscribe("onResolved",()=>{J(),gi(!1)});n.navigate({...A,replace:h,resetScroll:p,hashScrollIntoView:d,startTransition:f,viewTransition:y,ignoreBlocker:L})}};if(Pe)return{...U,ref:r,href:Pe,...x&&{children:x},...m&&{target:m},...v&&{disabled:v},...w&&{style:w},...b&&{className:b},..._&&{onClick:_},...S&&{onBlur:S},...P&&{onFocus:P},...T&&{onMouseEnter:T},...j&&{onMouseLeave:j},...E&&{onTouchStart:E}};const Xe=oe=>{if(v||Mn!=="intent")return;if(!xr){O();return}const N=oe.currentTarget;if(Lo.has(N))return;const H=setTimeout(()=>{Lo.delete(N),O()},xr);Lo.set(N,H)},vi=oe=>{v||Mn!=="intent"||O()},qt=oe=>{if(v||!Mn||!xr)return;const N=oe.currentTarget,H=Lo.get(N);H&&(clearTimeout(H),Lo.delete(N))};return{...U,...Ft,...mn,href:Ne==null?void 0:Ne.href,ref:r,onClick:as([_,Ye]),onBlur:as([S,qt]),onFocus:as([P,Xe]),onMouseEnter:as([T,Xe]),onMouseLeave:as([j,qt]),onTouchStart:as([E,vi]),disabled:!!v,target:m,...vr&&{style:vr},...Ln&&{className:Ln},...v&&RL,...me&&LL,...Z&&ss&&ML}}var th={},AL={className:"active"},RL={role:"link","aria-disabled":!0},LL={"data-status":"active","aria-current":"page"},ML={"data-transitioning":"transitioning"},Lo=new WeakMap,IL={rootMargin:"100px"},as=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function DL(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function NL(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Hk=C.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...s}=jL(r,t),o=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...l}=s;return C.createElement("a",l,o)}return C.createElement(n,s,o)});function BL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var FL=class extends jk{constructor(e){super(e),this.useMatch=t=>ns({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Wk({...t,from:this.id}),this.useSearch=t=>Uk({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Ok({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>zk({...t,from:this.id}),this.useLoaderData=t=>$k({...t,from:this.id}),this.useNavigate=()=>uo({from:this.fullPath}),this.Link=Gi.forwardRef((t,n)=>g.jsx(Hk,{ref:n,from:this.fullPath,...t}))}};function nd(e){return new FL(e)}var VL=class extends qR{constructor(e){super(e),this.useMatch=t=>ns({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Wk({...t,from:this.id}),this.useSearch=t=>Uk({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Ok({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>zk({...t,from:this.id}),this.useLoaderData=t=>$k({...t,from:this.id}),this.useNavigate=()=>uo({from:this.fullPath}),this.Link=Gi.forwardRef((t,n)=>g.jsx(Hk,{ref:n,from:this.fullPath,...t}))}};function $L(e){return new VL(e)}function zL(e){const t=Qt(),n=`not-found-${Nt(t.stores.location,r=>r.pathname)}-${Nt(t.stores.status,r=>r)}`;return g.jsx(tg,{getResetKey:()=>n,onCatch:(r,i)=>{var s;if(mt(r))(s=e.onCatch)==null||s.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(mt(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function OL(){return g.jsx("p",{children:"Not Found"})}function hs(e){return g.jsx(g.Fragment,{children:e.children})}function Kk(e,t,n){return t.options.notFoundComponent?g.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?g.jsx(e.options.defaultNotFoundComponent,{...n}):g.jsx(OL,{})}function UL(e){return null}function WL(){return UL(Qt()),null}var Gk=C.memo(function({matchId:t}){const n=Qt(),r=n.stores.matchStores.get(t);r||dr();const i=Nt(n.stores.loadedAt,o=>o),s=Nt(r,o=>o);return g.jsx(HL,{router:n,matchId:t,resetKey:i,matchState:C.useMemo(()=>{var l;const o=s.routeId,a=(l=n.routesById[o].parentRoute)==null?void 0:l.id;return{routeId:o,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:a}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function HL({router:e,matchId:t,resetKey:n,matchState:r}){var p,y;const i=e.routesById[r.routeId],s=i.options.pendingComponent??e.options.defaultPendingComponent,o=s?g.jsx(s,{}):null,a=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??((p=e.options.notFoundRoute)==null?void 0:p.options.component):i.options.notFoundComponent,c=r.ssr===!1||r.ssr==="data-only",d=(!i.isRoot||i.options.wrapInSuspense||c)&&(i.options.wrapInSuspense??s??(((y=i.options.errorComponent)==null?void 0:y.preload)||c))?C.Suspense:hs,h=a?tg:hs,f=u?zL:hs;return g.jsxs(i.isRoot?i.options.shellComponent??hs:hs,{children:[g.jsx(ed.Provider,{value:t,children:g.jsx(d,{fallback:o,children:g.jsx(h,{getResetKey:()=>n,errorComponent:a||ng,onCatch:(x,m)=>{if(mt(x))throw x.routeId??(x.routeId=r.routeId),x;l==null||l(x,m)},children:g.jsx(f,{fallback:x=>{if(x.routeId??(x.routeId=r.routeId),!u||x.routeId&&x.routeId!==r.routeId||!x.routeId&&!i.isRoot)throw x;return C.createElement(u,x)},children:c||r._displayPending?g.jsx(eL,{fallback:o,children:g.jsx(dx,{matchId:t})}):g.jsx(dx,{matchId:t})})})})}),r.parentRouteId===$i?g.jsxs(g.Fragment,{children:[g.jsx(KL,{resetKey:n}),e.options.scrollRestoration&&xk?g.jsx(WL,{}):null]}):null]})}function KL({resetKey:e}){const t=Qt(),n=C.useRef(void 0);return Ho(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...zs(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var dx=C.memo(function({matchId:t}){const n=Qt(),r=(c,d)=>{var h;return((h=n.getMatch(c.id))==null?void 0:h._nonReactive[d])??c._nonReactive[d]},i=n.stores.matchStores.get(t);i||dr();const s=Nt(i,c=>c),o=s.routeId,a=n.routesById[o],l=C.useMemo(()=>{var d;const c=(d=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:d({routeId:o,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return c?JSON.stringify(c):void 0},[o,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),u=C.useMemo(()=>{const c=a.options.component??n.options.defaultComponent;return c?g.jsx(c,{},l):g.jsx(Yk,{})},[l,a.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const c=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const d=n.getMatch(s.id);if(d&&!d._nonReactive.minPendingPromise){const h=eo();d._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),d._nonReactive.minPendingPromise=void 0},c)}}throw r(s,"loadPromise")}if(s.status==="notFound")return mt(s.error)||dr(),Kk(n,a,s.error);if(s.status==="redirected")throw At(s.error)||dr(),r(s,"loadPromise");if(s.status==="error")throw s.error;return u}),Yk=C.memo(function(){const t=Qt(),n=C.useContext(ed);let r,i=!1,s;{const u=n?t.stores.matchStores.get(n):void 0;[r,i]=Nt(u,c=>[c==null?void 0:c.routeId,(c==null?void 0:c.globalNotFound)??!1]),s=Nt(t.stores.matchesId,c=>c[c.findIndex(d=>d===n)+1])}const o=r?t.routesById[r]:void 0,a=t.options.defaultPendingComponent?g.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||dr(),Kk(t,o,void 0);if(!s)return null;const l=g.jsx(Gk,{matchId:s});return r===$i?g.jsx(C.Suspense,{fallback:a,children:l}):l});function GL(){const e=Qt(),t=C.useRef({router:e,mounted:!1}),[n,r]=C.useState(!1),i=Nt(e.stores.isLoading,d=>d),s=Nt(e.stores.hasPending,d=>d),o=Gd(i),a=i||n||s,l=Gd(a),u=i||s,c=Gd(u);return e.startTransition=d=>{r(!0),C.startTransition(()=>{d(),r(!1)})},C.useEffect(()=>{const d=e.history.subscribe(e.load),h=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ni(e.latestLocation.publicHref)!==ni(h.publicHref)&&e.commitLocation({...h,replace:!0}),()=>{d()}},[e,e.history]),Ho(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(h){console.error(h)}})()},[e]),Ho(()=>{o&&!i&&e.emit({type:"onLoad",...zs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Ho(()=>{c&&!u&&e.emit({type:"onBeforeRouteMount",...zs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,c,e]),Ho(()=>{if(l&&!a){const d=zs(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),Mk(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&ZR(e)}},[a,l,e]),null}function YL(){const e=Qt(),t=e.routesById[$i].options.pendingComponent??e.options.defaultPendingComponent,n=t?g.jsx(t,{}):null,r=g.jsxs(typeof document<"u"&&e.ssr?hs:C.Suspense,{fallback:n,children:[g.jsx(GL,{}),g.jsx(XL,{})]});return e.options.InnerWrap?g.jsx(e.options.InnerWrap,{children:r}):r}function XL(){const e=Qt(),t=Nt(e.stores.firstId,i=>i),n=Nt(e.stores.loadedAt,i=>i),r=t?g.jsx(Gk,{matchId:t}):null;return g.jsx(ed.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:g.jsx(tg,{getResetKey:()=>n,errorComponent:ng,onCatch:void 0,children:r})})}var QL=e=>({createMutableStore:cx,createReadonlyStore:cx,batch:Mk}),qL=e=>new ZL(e),ZL=class extends UR{constructor(e){super(e,QL)}};function JL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=g.jsx(Rk.Provider,{value:e,children:t});return e.options.Wrap?g.jsx(e.options.Wrap,{children:r}):r}function eM({router:e,...t}){return g.jsx(JL,{router:e,...t,children:g.jsx(YL,{})})}function rg(e){const t=Qt({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=C.useRef(void 0);return Nt(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=Ur(r.current,e.select(i));return r.current=s,s}return e.select(i)}return i})}function Xk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Xk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tM(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Xk(e))&&(r&&(r+=" "),r+=t);return r}const ig="-",nM=e=>{const t=iM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(ig);return a[0]===""&&a.length!==1&&a.shift(),Qk(a,t)||rM(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Qk=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Qk(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(ig);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},hx=/^\[(.+)\]$/,rM=e=>{if(hx.test(e)){const t=hx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},iM=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return oM(Object.entries(e.classGroups),n).forEach(([s,o])=>{Xf(o,r,s,t)}),r},Xf=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:fx(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(sM(i)){Xf(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Xf(o,fx(t,s),n,r)})})},fx=(e,t)=>{let n=e;return t.split(ig).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},sM=e=>e.isThemeGetter,oM=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,aM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},qk="!",lM=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let x=0;x<a.length;x++){let m=a[x];if(u===0){if(m===i&&(r||a.slice(x,x+s)===t)){l.push(a.slice(c,x)),c=x+s;continue}if(m==="/"){d=x;continue}}m==="["?u++:m==="]"&&u--}const h=l.length===0?a:a.substring(c),f=h.startsWith(qk),p=f?h.substring(1):h,y=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},uM=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},cM=e=>({cache:aM(e.cacheSize),parseClassName:lM(e),...nM(e)}),dM=/\s+/,hM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(dM);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(u);let p=!!f,y=r(p?h.substring(0,f):h);if(!y){if(!p){a=u+(a.length>0?" "+a:a);continue}if(y=r(h),!y){a=u+(a.length>0?" "+a:a);continue}p=!1}const x=uM(c).join(":"),m=d?x+qk:x,v=m+y;if(s.includes(v))continue;s.push(v);const w=i(y,p);for(let b=0;b<w.length;++b){const _=w[b];s.push(m+_)}a=u+(a.length>0?" "+a:a)}return a};function fM(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Zk(t))&&(r&&(r+=" "),r+=n);return r}const Zk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Zk(e[r]))&&(n&&(n+=" "),n+=t);return n};function pM(e,...t){let n,r,i,s=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=cM(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=hM(l,n);return i(l,c),c}return function(){return s(fM.apply(null,arguments))}}const Te=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Jk=/^\[(?:([a-z-]+):)?(.+)\]$/i,mM=/^\d+\/\d+$/,gM=new Set(["px","full","screen"]),yM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,SM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tr=e=>Os(e)||gM.has(e)||mM.test(e),br=e=>co(e,"length",jM),Os=e=>!!e&&!Number.isNaN(Number(e)),nh=e=>co(e,"number",Os),Mo=e=>!!e&&Number.isInteger(Number(e)),bM=e=>e.endsWith("%")&&Os(e.slice(0,-1)),ne=e=>Jk.test(e),kr=e=>yM.test(e),kM=new Set(["length","size","percentage"]),_M=e=>co(e,kM,e_),CM=e=>co(e,"position",e_),PM=new Set(["image","url"]),TM=e=>co(e,PM,RM),EM=e=>co(e,"",AM),Io=()=>!0,co=(e,t,n)=>{const r=Jk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},jM=e=>vM.test(e)&&!xM.test(e),e_=()=>!1,AM=e=>wM.test(e),RM=e=>SM.test(e),LM=()=>{const e=Te("colors"),t=Te("spacing"),n=Te("blur"),r=Te("brightness"),i=Te("borderColor"),s=Te("borderRadius"),o=Te("borderSpacing"),a=Te("borderWidth"),l=Te("contrast"),u=Te("grayscale"),c=Te("hueRotate"),d=Te("invert"),h=Te("gap"),f=Te("gradientColorStops"),p=Te("gradientColorStopPositions"),y=Te("inset"),x=Te("margin"),m=Te("opacity"),v=Te("padding"),w=Te("saturate"),b=Te("scale"),_=Te("sepia"),S=Te("skew"),P=Te("space"),T=Te("translate"),j=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ne,t],M=()=>[ne,t],$=()=>["",tr,br],B=()=>["auto",Os,ne],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",ne],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[Os,ne];return{cacheSize:500,separator:":",theme:{colors:[Io],spacing:[tr,br],blur:["none","",kr,ne],brightness:U(),borderColor:[e],borderRadius:["none","","full",kr,ne],borderSpacing:M(),borderWidth:$(),contrast:U(),grayscale:z(),hueRotate:U(),invert:z(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[bM,br],inset:L(),margin:L(),opacity:U(),padding:M(),saturate:U(),scale:U(),sepia:z(),skew:U(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",ne]}],container:["container"],columns:[{columns:[kr]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...F(),ne]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Mo,ne]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ne]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Mo,ne]}],"grid-cols":[{"grid-cols":[Io]}],"col-start-end":[{col:["auto",{span:["full",Mo,ne]},ne]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[Io]}],"row-start-end":[{row:["auto",{span:[Mo,ne]},ne]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ne]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ne,t]}],"min-w":[{"min-w":[ne,t,"min","max","fit"]}],"max-w":[{"max-w":[ne,t,"none","full","min","max","fit","prose",{screen:[kr]},kr]}],h:[{h:[ne,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ne,t,"auto","min","max","fit"]}],"font-size":[{text:["base",kr,br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nh]}],"font-family":[{font:[Io]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ne]}],"line-clamp":[{"line-clamp":["none",Os,nh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",tr,ne]}],"list-image":[{"list-image":["none",ne]}],"list-style-type":[{list:["none","disc","decimal",ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",tr,br]}],"underline-offset":[{"underline-offset":["auto",tr,ne]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),CM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_M]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:V()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[tr,ne]}],"outline-w":[{outline:[tr,br]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[tr,br]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",kr,EM]}],"shadow-color":[{shadow:[Io]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",kr,ne]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ne]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",ne]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Mo,ne]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ne]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[tr,br,nh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},MM=pM(LM);var IM={},t_={exports:{}},Do={};/**
57
+ * @license React
58
+ * react-jsx-runtime.production.min.js
59
+ *
60
+ * Copyright (c) Facebook, Inc. and its affiliates.
61
+ *
62
+ * This source code is licensed under the MIT license found in the
63
+ * LICENSE file in the root directory of this source tree.
64
+ */var px;function DM(){if(px)return Do;px=1;var e=Gi,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,u){var c,d={},h=null,f=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(f=l.ref);for(c in l)r.call(l,c)&&!s.hasOwnProperty(c)&&(d[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)d[c]===void 0&&(d[c]=l[c]);return{$$typeof:t,type:a,key:h,ref:f,props:d,_owner:i.current}}return Do.Fragment=n,Do.jsx=o,Do.jsxs=o,Do}t_.exports=DM();var R=t_.exports;const sg=C.createContext({});function og(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const NM=typeof window<"u",n_=NM?C.useLayoutEffect:C.useEffect,rd=C.createContext(null);function ag(e,t){e.indexOf(t)===-1&&e.push(t)}function ac(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Qn=(e,t,n)=>n>t?t:n<e?e:n;function mx(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Xa=()=>{},Ji=()=>{};var gx;typeof process<"u"&&((gx=IM)==null?void 0:gx.NODE_ENV)!=="production"&&(Xa=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(mx(t,n))},Ji=(e,t,n)=>{if(!e)throw new Error(mx(t,n))});const oi={},r_=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),i_=e=>typeof e=="object"&&e!==null,s_=e=>/^0[^.\s]+$/u.test(e);function o_(e){let t;return()=>(t===void 0&&(t=e()),t)}const cn=e=>e,Qa=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Da=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class lg{constructor(){this.subscriptions=[]}add(t){return ag(this.subscriptions,t),()=>ac(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const It=e=>e*1e3,on=e=>e/1e3,a_=(e,t)=>t?e*(1e3/t):0,l_=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,BM=1e-7,FM=12;function VM(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=l_(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>BM&&++a<FM);return o}function qa(e,t,n,r){if(e===t&&n===r)return cn;const i=s=>VM(s,0,1,e,n);return s=>s===0||s===1?s:l_(i(s),t,r)}const u_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,c_=e=>t=>1-e(1-t),d_=qa(.33,1.53,.69,.99),ug=c_(d_),h_=u_(ug),f_=e=>e>=1?1:(e*=2)<1?.5*ug(e):.5*(2-Math.pow(2,-10*(e-1))),cg=e=>1-Math.sin(Math.acos(e)),p_=c_(cg),m_=u_(cg),$M=qa(.42,0,1,1),zM=qa(0,0,.58,1),g_=qa(.42,0,.58,1),OM=e=>Array.isArray(e)&&typeof e[0]!="number",y_=e=>Array.isArray(e)&&typeof e[0]=="number",yx={linear:cn,easeIn:$M,easeInOut:g_,easeOut:zM,circIn:cg,circInOut:m_,circOut:p_,backIn:ug,backInOut:h_,backOut:d_,anticipate:f_},UM=e=>typeof e=="string",vx=e=>{if(y_(e)){Ji(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return qa(t,n,r,i)}else if(UM(e))return Ji(yx[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),yx[e];return e},Rl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function WM(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,h=!1)=>{const f=h&&i?n:r;return d&&o.add(c),f.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const HM=40;function v_(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Rl.reduce((m,v)=>(m[v]=WM(s),m),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=o,y=()=>{const m=oi.useManualTiming,v=m?i.timestamp:performance.now();n=!1,m||(i.delta=r?1e3/60:Math.max(Math.min(v-i.timestamp,HM),1)),i.timestamp=v,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(y))},x=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:Rl.reduce((m,v)=>{const w=o[v];return m[v]=(b,_=!1,S=!1)=>(n||x(),w.schedule(b,_,S)),m},{}),cancel:m=>{for(let v=0;v<Rl.length;v++)o[Rl[v]].cancel(m)},state:i,steps:o}}const{schedule:be,cancel:ai,state:st,steps:rh}=v_(typeof requestAnimationFrame<"u"?requestAnimationFrame:cn,!0);let cu;function KM(){cu=void 0}const xt={now:()=>(cu===void 0&&xt.set(st.isProcessing||oi.useManualTiming?st.timestamp:performance.now()),cu),set:e=>{cu=e,queueMicrotask(KM)}},x_=e=>t=>typeof t=="string"&&t.startsWith(e),w_=x_("--"),GM=x_("var(--"),dg=e=>GM(e)?YM.test(e.split("/*")[0].trim()):!1,YM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function xx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ho={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Na={...ho,transform:e=>Qn(0,1,e)},Ll={...ho,default:1},ra=e=>Math.round(e*1e5)/1e5,hg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function XM(e){return e==null}const QM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fg=(e,t)=>n=>!!(typeof n=="string"&&QM.test(n)&&n.startsWith(e)||t&&!XM(n)&&Object.prototype.hasOwnProperty.call(n,t)),S_=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(hg);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},qM=e=>Qn(0,255,e),ih={...ho,transform:e=>Math.round(qM(e))},Li={test:fg("rgb","red"),parse:S_("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ih.transform(e)+", "+ih.transform(t)+", "+ih.transform(n)+", "+ra(Na.transform(r))+")"};function ZM(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}}const Qf={test:fg("#"),parse:ZM,transform:Li.transform},Za=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rr=Za("deg"),Yn=Za("%"),X=Za("px"),JM=Za("vh"),eI=Za("vw"),wx={...Yn,parse:e=>Yn.parse(e)/100,transform:e=>Yn.transform(e*100)},js={test:fg("hsl","hue"),parse:S_("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Yn.transform(ra(t))+", "+Yn.transform(ra(n))+", "+ra(Na.transform(r))+")"},We={test:e=>Li.test(e)||Qf.test(e)||js.test(e),parse:e=>Li.test(e)?Li.parse(e):js.test(e)?js.parse(e):Qf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Li.transform(e):js.transform(e),getAnimatableNone:e=>{const t=We.parse(e);return t.alpha=0,We.transform(t)}},tI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nI(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(hg))==null?void 0:t.length)||0)+(((n=e.match(tI))==null?void 0:n.length)||0)>0}const b_="number",k_="color",rI="var",iI="var(",Sx="${}",sI=/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 no(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const o=t.replace(sI,a=>(We.test(a)?(r.color.push(s),i.push(k_),n.push(We.parse(a))):a.startsWith(iI)?(r.var.push(s),i.push(rI),n.push(a)):(r.number.push(s),i.push(b_),n.push(parseFloat(a))),++s,Sx)).split(Sx);return{values:n,split:o,indexes:r,types:i}}function oI(e){return no(e).values}function __({split:e,types:t}){const n=e.length;return r=>{let i="";for(let s=0;s<n;s++)if(i+=e[s],r[s]!==void 0){const o=t[s];o===b_?i+=ra(r[s]):o===k_?i+=We.transform(r[s]):i+=r[s]}return i}}function aI(e){return __(no(e))}const lI=e=>typeof e=="number"?0:We.test(e)?We.getAnimatableNone(e):e,uI=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:lI(e);function cI(e){const t=no(e);return __(t)(t.values.map((n,r)=>uI(n,t.split[r])))}const En={test:nI,parse:oI,createTransformer:aI,getAnimatableNone:cI};function sh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dI({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=sh(l,a,e+1/3),s=sh(l,a,e),o=sh(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function lc(e,t){return n=>n>0?t:e}const we=(e,t,n)=>e+(t-e)*n,oh=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},hI=[Qf,Li,js],fI=e=>hI.find(t=>t.test(e));function bx(e){const t=fI(e);if(Xa(!!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===js&&(n=dI(n)),n}const kx=(e,t)=>{const n=bx(e),r=bx(t);if(!n||!r)return lc(e,t);const i={...n};return s=>(i.red=oh(n.red,r.red,s),i.green=oh(n.green,r.green,s),i.blue=oh(n.blue,r.blue,s),i.alpha=we(n.alpha,r.alpha,s),Li.transform(i))},qf=new Set(["none","hidden"]);function pI(e,t){return qf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function mI(e,t){return n=>we(e,t,n)}function pg(e){return typeof e=="number"?mI:typeof e=="string"?dg(e)?lc:We.test(e)?kx:vI:Array.isArray(e)?C_:typeof e=="object"?We.test(e)?kx:gI:lc}function C_(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>pg(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function gI(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=pg(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function yI(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const vI=(e,t)=>{const n=En.createTransformer(t),r=no(e),i=no(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?qf.has(e)&&!i.values.length||qf.has(t)&&!r.values.length?pI(e,t):Qa(C_(yI(r,i),i.values),n):(Xa(!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"),lc(e,t))};function P_(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?we(e,t,n):pg(e)(e,t)}const xI=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>be.update(t,n),stop:()=>ai(t),now:()=>st.isProcessing?st.timestamp:xt.now()}},T_=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},uc=2e4;function mg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<uc;)t+=n,r=e.next(t);return t>=uc?1/0:t}function wI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(mg(r),uc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:on(i)}}const Le={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Zf(e,t){return e*Math.sqrt(1-t*t)}const SI=12;function bI(e,t,n){let r=n;for(let i=1;i<SI;i++)r=r-e(r)/t(r);return r}const ah=.001;function kI({duration:e=Le.duration,bounce:t=Le.bounce,velocity:n=Le.velocity,mass:r=Le.mass}){let i,s;Xa(e<=It(Le.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Qn(Le.minDamping,Le.maxDamping,o),e=Qn(Le.minDuration,Le.maxDuration,on(e)),o<1?(i=u=>{const c=u*o,d=c*e,h=c-n,f=Zf(u,o),p=Math.exp(-d);return ah-h/f*p},s=u=>{const c=u*o*e,d=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,f=Math.exp(-c),p=Zf(Math.pow(u,2),o);return(-i(u)+ah>0?-1:1)*((d-h)*f)/p}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-ah+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=bI(i,s,a);if(e=It(e),isNaN(l))return{stiffness:Le.stiffness,damping:Le.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const _I=["duration","bounce"],CI=["stiffness","damping","mass"];function _x(e,t){return t.some(n=>e[n]!==void 0)}function PI(e){let t={velocity:Le.velocity,stiffness:Le.stiffness,damping:Le.damping,mass:Le.mass,isResolvedFromDuration:!1,...e};if(!_x(e,CI)&&_x(e,_I))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Qn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Le.mass,stiffness:i,damping:s}}else{const n=kI({...e,velocity:0});t={...t,...n,mass:Le.mass},t.isResolvedFromDuration=!0}return t}function cc(e=Le.visualDuration,t=Le.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:f}=PI({...n,velocity:-on(n.velocity||0)}),p=h||0,y=u/(2*Math.sqrt(l*c)),x=o-s,m=on(Math.sqrt(l/c)),v=Math.abs(x)<5;r||(r=v?Le.restSpeed.granular:Le.restSpeed.default),i||(i=v?Le.restDelta.granular:Le.restDelta.default);let w,b,_,S,P,T;if(y<1)_=Zf(m,y),S=(p+y*m*x)/_,w=E=>{const L=Math.exp(-y*m*E);return o-L*(S*Math.sin(_*E)+x*Math.cos(_*E))},P=y*m*S+x*_,T=y*m*x-S*_,b=E=>Math.exp(-y*m*E)*(P*Math.sin(_*E)+T*Math.cos(_*E));else if(y===1){w=L=>o-Math.exp(-m*L)*(x+(p+m*x)*L);const E=p+m*x;b=L=>Math.exp(-m*L)*(m*E*L-p)}else{const E=m*Math.sqrt(y*y-1);w=B=>{const F=Math.exp(-y*m*B),V=Math.min(E*B,300);return o-F*((p+y*m*x)*Math.sinh(V)+E*x*Math.cosh(V))/E};const L=(p+y*m*x)/E,M=y*m*L-x*E,$=y*m*x-L*E;b=B=>{const F=Math.exp(-y*m*B),V=Math.min(E*B,300);return F*(M*Math.sinh(V)+$*Math.cosh(V))}}const j={calculatedDuration:f&&d||null,velocity:E=>It(b(E)),next:E=>{if(!f&&y<1){const M=Math.exp(-y*m*E),$=Math.sin(_*E),B=Math.cos(_*E),F=o-M*(S*$+x*B),V=It(M*(P*$+T*B));return a.done=Math.abs(V)<=r&&Math.abs(o-F)<=i,a.value=a.done?o:F,a}const L=w(E);if(f)a.done=E>=d;else{const M=It(b(E));a.done=Math.abs(M)<=r&&Math.abs(o-L)<=i}return a.value=a.done?o:L,a},toString:()=>{const E=Math.min(mg(j),uc),L=T_(M=>j.next(E*M).value,E,30);return E+"ms "+L},toTransition:()=>{}};return j}cc.applyToOptions=e=>{const t=wI(e,100,cc);return e.ease=t.ease,e.duration=It(t.duration),e.type="keyframes",e};const TI=5;function E_(e,t,n){const r=Math.max(t-TI,0);return a_(n-e(r),t-r)}function Jf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},f=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let y=n*t;const x=d+y,m=o===void 0?x:o(x);m!==x&&(y=m-d);const v=T=>-y*Math.exp(-T/r),w=T=>m+v(T),b=T=>{const j=v(T),E=w(T);h.done=Math.abs(j)<=u,h.value=h.done?m:E};let _,S;const P=T=>{f(h.value)&&(_=T,S=cc({keyframes:[h.value,p(h.value)],velocity:E_(w,T,h.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return P(0),{calculatedDuration:null,next:T=>{let j=!1;return!S&&_===void 0&&(j=!0,b(T),P(T)),_!==void 0&&T>=_?S.next(T-_):(!j&&b(T),h)}}}function EI(e,t,n){const r=[],i=n||oi.mix||P_,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||cn:t;a=Qa(l,a)}r.push(a)}return r}function jI(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Ji(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=EI(t,r,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const h=Da(e[d],e[d+1],c);return a[d](h)};return n?c=>u(Qn(e[0],e[s-1],c)):u}function AI(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Da(0,t,r);e.push(we(n,1,i))}}function RI(e){const t=[0];return AI(t,e.length-1),t}function LI(e,t){return e.map(n=>n*t)}function MI(e,t){return e.map(()=>t||g_).splice(0,e.length-1)}function ia({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=OM(r)?r.map(vx):vx(r),s={done:!1,value:t[0]},o=LI(n&&n.length===t.length?n:RI(t),e),a=jI(o,t,{ease:Array.isArray(i)?i:MI(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const II=e=>e!==null;function id(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(II),o=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const DI={decay:Jf,inertia:Jf,tween:ia,keyframes:ia,spring:cc};function j_(e){typeof e.type=="string"&&(e.type=DI[e.type])}class gg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const NI=e=>e/100;class dc extends gg{constructor(t){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=()=>{var n,r;const{motionValue:i}=this.options;i&&i.updatedAt!==xt.now()&&this.tick(xt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(n=this.options).onStop)==null||r.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;j_(t);const{type:n=ia,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||ia;l!==ia&&typeof a[0]!="number"&&(this.mixKeyframes=Qa(NI,P_(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=mg(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:f,type:p,onUpdate:y,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const m=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?m<0:m>i;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,b=r;if(d){const T=Math.min(this.currentTime,i)/a;let j=Math.floor(T),E=T%1;!E&&T>=1&&(E=1),E===1&&j--,j=Math.min(j,d+1),j%2&&(h==="reverse"?(E=1-E,f&&(E-=f/a)):h==="mirror"&&(b=o)),w=Qn(0,1,E)*a}let _;v?(this.delayState.value=c[0],_=this.delayState):_=b.next(w),s&&!v&&(_.value=s(_.value));let{done:S}=_;!v&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return P&&p!==Jf&&(_.value=id(c,this.options,x,this.speed)),y&&y(_.value),P&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return on(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+on(t)}get time(){return on(this.currentTime)}set time(t){t=It(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return E_(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(xt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=on(this.currentTime))}play(){var t,n;if(this.isStopped)return;const{driver:r=xI,startTime:i}=this.options;this.driver||(this.driver=r(o=>this.tick(o))),(n=(t=this.options).onPlay)==null||n.call(t);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=i??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(xt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function BI(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Mi=e=>e*180/Math.PI,ep=e=>{const t=Mi(Math.atan2(e[1],e[0]));return tp(t)},FI={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ep,rotateZ:ep,skewX:e=>Mi(Math.atan(e[1])),skewY:e=>Mi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},tp=e=>(e=e%360,e<0&&(e+=360),e),Cx=ep,Px=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Tx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),VI={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Px,scaleY:Tx,scale:e=>(Px(e)+Tx(e))/2,rotateX:e=>tp(Mi(Math.atan2(e[6],e[5]))),rotateY:e=>tp(Mi(Math.atan2(-e[2],e[0]))),rotateZ:Cx,rotate:Cx,skewX:e=>Mi(Math.atan(e[4])),skewY:e=>Mi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function np(e){return e.includes("scale")?1:0}function rp(e,t){if(!e||e==="none")return np(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=VI,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=FI,i=a}if(!i)return np(t);const s=r[t],o=i[1].split(",").map(zI);return typeof s=="function"?s(o):o[s]}const $I=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return rp(n,t)};function zI(e){return parseFloat(e.trim())}const fo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],po=new Set([...fo,"pathRotation"]),Ex=e=>e===ho||e===X,OI=new Set(["x","y","z"]),UI=fo.filter(e=>!OI.has(e));function WI(e){const t=[];return UI.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Kr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?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})=>rp(t,"x"),y:(e,{transform:t})=>rp(t,"y")};Kr.translateX=Kr.x;Kr.translateY=Kr.y;const Oi=new Set;let ip=!1,sp=!1,op=!1;function A_(){if(sp){const e=Array.from(Oi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=WI(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}sp=!1,ip=!1,Oi.forEach(e=>e.complete(op)),Oi.clear()}function R_(){Oi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(sp=!0)})}function HI(){op=!0,R_(),A_(),op=!1}class yg{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Oi.add(this),ip||(ip=!0,be.read(R_),be.resolveKeyframes(A_))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}BI(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Oi.delete(this)}cancel(){this.state==="scheduled"&&(Oi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const KI=e=>e.startsWith("--");function L_(e,t,n){KI(t)?e.style.setProperty(t,n):e.style[t]=n}const GI={};function M_(e,t){const n=o_(e);return()=>GI[t]??n()}const YI=M_(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),I_=M_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ko=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ko([0,.65,.55,1]),circOut:Ko([.55,0,1,.45]),backIn:Ko([.31,.01,.66,-.59]),backOut:Ko([.33,1.53,.69,.99])};function D_(e,t){if(e)return typeof e=="function"?I_()?T_(e,t):"ease-out":y_(e)?Ko(e):Array.isArray(e)?e.map(n=>D_(n,t)||jx.easeOut):jx[e]}function XI(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=D_(a,i);Array.isArray(d)&&(c.easing=d);const h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function N_(e){return typeof e=="function"&&"applyToOptions"in e}function QI({type:e,...t}){return N_(e)&&I_()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class B_ extends gg{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,Ji(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=QI(t);this.animation=XI(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=id(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),L_(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n,r;const i=(t=this.options)==null?void 0:t.element;!this.isPseudoElement&&i!=null&&i.isConnected&&((r=(n=this.animation).commitStyles)==null||r.call(n))}get duration(){var t,n;const r=((n=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:n.call(t).duration)||0;return on(Number(r))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+on(t)}get time(){return on(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=It(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&YI()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),cn):i(this)}}const F_={anticipate:f_,backInOut:h_,circInOut:m_};function qI(e){return e in F_}function ZI(e){typeof e.ease=="string"&&qI(e.ease)&&(e.ease=F_[e.ease])}const lh=10;class JI extends B_{constructor(t){ZI(t),j_(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new dc({...o,autoplay:!1}),l=Math.max(lh,xt.now()-this.startTime),u=Qn(0,lh,l-lh),c=a.sample(l).value,{name:d}=this.options;s&&d&&L_(s,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Ax=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(En.test(e)||e==="0")&&!e.startsWith("url("));function eD(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function tD(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=Ax(i,t),a=Ax(s,t);return Xa(o===a,`You are trying to animate ${t} from "${i}" to "${s}". "${o?s:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:eD(e)||(n==="spring"||N_(n))&&r}function ap(e){e.duration=0,e.type="keyframes"}const V_=new Set(["opacity","clipPath","filter","transform"]),nD=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function rD(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&nD.test(e[t]))return!0;return!1}const iD=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),sD=o_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function oD(e){var t;const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a,keyframes:l}=e;if(!(((t=n==null?void 0:n.owner)==null?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=n.owner.getProps();return sD()&&r&&(V_.has(r)||iD.has(r)&&rD(l))&&(r!=="transform"||!c)&&!u&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}const aD=40;class lD extends gg{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var h;super(),this.stop=()=>{var y,x;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=xt.now();const f={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},p=(c==null?void 0:c.KeyframeResolver)||yg;this.keyframeResolver=new p(a,(y,x,m)=>this.onKeyframesResolved(y,x,f,!m),l,u,c),(h=this.keyframeResolver)==null||h.scheduleResolve()}onKeyframesResolved(t,n,r,i){var s,o;this.keyframeResolver=void 0;const{name:a,type:l,velocity:u,delay:c,isHandoff:d,onUpdate:h}=r;this.resolvedAt=xt.now();let f=!0;tD(t,a,l,u)||(f=!1,(oi.instantAnimations||!c)&&(h==null||h(id(t,r,n))),t[0]=t[t.length-1],ap(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>aD?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=f&&!d&&oD(p),x=(o=(s=p.motionValue)==null?void 0:s.owner)==null?void 0:o.current;let m;if(y)try{m=new JI({...p,element:x})}catch{m=new dc(p)}else m=new dc(p);m.finished.then(()=>{this.notifyFinished()}).catch(cn),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),HI()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function $_(e,t,n,r=0,i=1){const s=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}const Rx=30,uD=e=>!isNaN(parseFloat(e));class cD{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=xt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=xt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uD(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new lg);const r=this.events[t].add(n);return t==="change"?()=>{r(),be.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=xt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Rx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Rx);return a_(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ro(e,t){return new cD(e,t)}function z_(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function vg(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?z_(n,e):n}const dD={type:"spring",stiffness:500,damping:25,restSpeed:10},hD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fD={type:"keyframes",duration:.8},pD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},mD=(e,{keyframes:t})=>t.length>2?fD:po.has(e)?e.startsWith("scale")?hD(t[1]):dD:pD,gD=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function yD(e){for(const t in e)if(!gD.has(t))return!0;return!1}const xg=(e,t,n,r={},i,s)=>o=>{const a=vg(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-It(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};yD(a)||Object.assign(c,mD(e,c)),c.duration&&(c.duration=It(c.duration)),c.repeatDelay&&(c.repeatDelay=It(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(ap(c),c.delay===0&&(d=!0)),(oi.instantAnimations||oi.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,ap(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=id(c.keyframes,a);if(h!==void 0){be.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new dc(c):new lD(c)},vD=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xD(e){const t=vD.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const wD=4;function O_(e,t,n=1){Ji(n<=wD,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=xD(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return r_(o)?parseFloat(o):o}return dg(i)?O_(i,t,n+1):i}function Lx(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function wg(e,t,n,r){if(typeof t=="function"){const[i,s]=Lx(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Lx(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Ui(e,t,n){const r=e.getProps();return wg(r,t,n!==void 0?n:r.custom,e)}const U_=new Set(["width","height","top","left","right","bottom",...fo]),lp=e=>Array.isArray(e);function SD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ro(n))}function bD(e){return lp(e)?e[e.length-1]||0:e}function kD(e,t){const n=Ui(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=bD(s[o]);SD(e,o,a)}}const lt=e=>!!(e&&e.getVelocity);function _D(e){return!!(lt(e)&&e.add)}function up(e,t){const n=e.getValue("willChange");if(_D(n))return n.add(t);if(!n&&oi.WillChange){const r=new oi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Sg(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const CD="framerAppearId",W_="data-"+Sg(CD);function H_(e){return e.props[W_]}function PD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function K_(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?z_(s,l):l;const u=s==null?void 0:s.reduceMotion,c=s==null?void 0:s.skipAnimations;r&&(s=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i],f=s==null?void 0:s.path;f&&f.animateVisualElement(e,a,s,n,d);for(const p in a){const y=e.getValue(p,e.latestValues[p]??null),x=a[p];if(x===void 0||h&&PD(h,p))continue;const m={delay:n,...vg(s||{},p)};c&&(m.skipAnimations=!0);const v=y.get();if(v!==void 0&&!y.isAnimating()&&!Array.isArray(x)&&x===v&&!m.velocity){be.update(()=>y.set(x));continue}let w=!1;if(window.MotionHandoffAnimation){const S=H_(e);if(S){const P=window.MotionHandoffAnimation(S,p,be);P!==null&&(m.startTime=P,w=!0)}}up(e,p);const b=u??e.shouldReduceMotion;y.start(xg(p,y,x,b&&U_.has(p)?{type:!1}:m,e,w));const _=y.animation;_&&d.push(_)}if(o){const p=()=>be.update(()=>{o&&kD(e,o)});d.length?Promise.all(d).then(p):p()}return d}function cp(e,t,n={}){var r;const i=Ui(e,t,n.type==="exit"?(r=e.presenceContext)==null?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(K_(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=s;return TD(e,t,u,c,d,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function TD(e,t,n=0,r=0,i=0,s=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(cp(l,t,{...o,delay:n+(typeof r=="function"?0:r)+$_(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function ED(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>cp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=cp(e,t,n);else{const i=typeof t=="function"?Ui(e,t,n.custom):t;r=Promise.all(K_(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const jD={test:e=>e==="auto",parse:e=>e},G_=e=>t=>t.test(e),Y_=[ho,X,Yn,rr,eI,JM,jD],Mx=e=>Y_.find(G_(e));function AD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||s_(e):!0}const RD=new Set(["brightness","contrast","saturate","opacity"]);function LD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(hg)||[];if(!r)return e;const i=n.replace(r,"");let s=RD.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const MD=/\b([a-z-]*)\(.*?\)/gu,dp={...En,getAnimatableNone:e=>{const t=e.match(MD);return t?t.map(LD).join(" "):e}},hp={...En,getAnimatableNone:e=>{const t=En.parse(e);return En.createTransformer(e)(t.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},Ix={...ho,transform:Math.round},ID={rotate:rr,pathRotation:rr,rotateX:rr,rotateY:rr,rotateZ:rr,scale:Ll,scaleX:Ll,scaleY:Ll,scaleZ:Ll,skew:rr,skewX:rr,skewY:rr,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:Na,originX:wx,originY:wx,originZ:X},hc={borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,inset:X,insetBlock:X,insetBlockStart:X,insetBlockEnd:X,insetInline:X,insetInlineStart:X,insetInlineEnd:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,paddingBlock:X,paddingBlockStart:X,paddingBlockEnd:X,paddingInline:X,paddingInlineStart:X,paddingInlineEnd:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,marginBlock:X,marginBlockStart:X,marginBlockEnd:X,marginInline:X,marginInlineStart:X,marginInlineEnd:X,fontSize:X,backgroundPositionX:X,backgroundPositionY:X,...ID,zIndex:Ix,fillOpacity:Na,strokeOpacity:Na,numOctaves:Ix},DD={...hc,color:We,backgroundColor:We,outlineColor:We,fill:We,stroke:We,borderColor:We,borderTopColor:We,borderRightColor:We,borderBottomColor:We,borderLeftColor:We,filter:dp,WebkitFilter:dp,mask:hp,WebkitMask:hp},X_=e=>DD[e],ND=new Set([dp,hp]);function Q_(e,t){let n=X_(e);return ND.has(n)||(n=En),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const BD=new Set(["auto","none","0"]);function FD(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!BD.has(s)&&no(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Q_(n,i)}class VD extends yg{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),dg(d))){const h=O_(d,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!U_.has(r)||t.length!==2)return;const[i,s]=t,o=Mx(i),a=Mx(s),l=xx(i),u=xx(s);if(l!==u&&Kr[r]){this.needsMeasurement=!0;return}if(o!==a)if(Ex(o)&&Ex(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else Kr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||AD(t[i]))&&r.push(i);r.length&&FD(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Kr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=Kr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(t=this.removedTransforms)!=null&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function q_(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const fp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function du(e){return i_(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:bg}=v_(queueMicrotask,!1),wn={x:!1,y:!1};function Z_(){return wn.x||wn.y}function $D(e){return e==="x"||e==="y"?wn[e]?null:(wn[e]=!0,()=>{wn[e]=!1}):wn.x||wn.y?null:(wn.x=wn.y=!0,()=>{wn.x=wn.y=!1})}function J_(e,t){const n=q_(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function zD(e){return!(e.pointerType==="touch"||Z_())}function OD(e,t,n={}){const[r,i,s]=J_(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},d=x=>{u&&(u(x),u=void 0),c()},h=x=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(x))},f=()=>{a=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},p=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},y=x=>{if(!zD(x))return;l=!1;const m=t(o,x);typeof m=="function"&&(u=m,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",f,i)}),s}const eC=(e,t)=>t?e===t?!0:eC(e,t.parentElement):!1,kg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,UD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function WD(e){return UD.has(e.tagName)||e.isContentEditable===!0}const HD=new Set(["INPUT","SELECT","TEXTAREA"]);function KD(e){return HD.has(e.tagName)||e.isContentEditable===!0}const hu=new WeakSet;function Dx(e){return t=>{t.key==="Enter"&&e(t)}}function uh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const GD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Dx(()=>{if(hu.has(n))return;uh(n,"down");const i=Dx(()=>{uh(n,"up")}),s=()=>uh(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Nx(e){return kg(e)&&!Z_()}const Bx=new WeakSet;function YD(e,t,n={}){const[r,i,s]=J_(e,n),o=a=>{const l=a.currentTarget;if(!Nx(a)||Bx.has(a))return;hu.add(l),n.stopPropagation&&Bx.add(a);const u=t(l,a),c=(f,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),hu.has(l)&&hu.delete(l),Nx(f)&&typeof u=="function"&&u(f,{success:p})},d=f=>{c(f,l===window||l===document||n.useGlobalTarget||eC(l,f.target))},h=f=>{c(f,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),du(a)&&(a.addEventListener("focus",l=>GD(l,i)),!WD(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function _g(e){return i_(e)&&"ownerSVGElement"in e}const fu=new WeakMap;let fs;const tC=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:_g(r)&&"getBBox"in r?r.getBBox()[t]:r[n],XD=tC("inline","width","offsetWidth"),QD=tC("block","height","offsetHeight");function qD({target:e,borderBoxSize:t}){var n;(n=fu.get(e))==null||n.forEach(r=>{r(e,{get width(){return XD(e,t)},get height(){return QD(e,t)}})})}function ZD(e){e.forEach(qD)}function JD(){typeof ResizeObserver>"u"||(fs=new ResizeObserver(ZD))}function e2(e,t){fs||JD();const n=q_(e);return n.forEach(r=>{let i=fu.get(r);i||(i=new Set,fu.set(r,i)),i.add(t),fs==null||fs.observe(r)}),()=>{n.forEach(r=>{const i=fu.get(r);i==null||i.delete(t),i!=null&&i.size||fs==null||fs.unobserve(r)})}}const pu=new Set;let As;function t2(){As=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};pu.forEach(t=>t(e))},window.addEventListener("resize",As)}function n2(e){return pu.add(e),As||t2(),()=>{pu.delete(e),!pu.size&&typeof As=="function"&&(window.removeEventListener("resize",As),As=void 0)}}function Fx(e,t){return typeof e=="function"?n2(e):e2(e,t)}function r2(e){return _g(e)&&e.tagName==="svg"}const i2=[...Y_,We,En],s2=e=>i2.find(G_(e)),Vx=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rs=()=>({x:Vx(),y:Vx()}),$x=()=>({min:0,max:0}),qe=()=>({x:$x(),y:$x()}),o2=new WeakMap;function sd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ba(e){return typeof e=="string"||Array.isArray(e)}const Cg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Pg=["initial",...Cg];function od(e){return sd(e.animate)||Pg.some(t=>Ba(e[t]))}function nC(e){return!!(od(e)||e.variants)}function a2(e,t,n){for(const r in t){const i=t[r],s=n[r];if(lt(i))e.addValue(r,i);else if(lt(s))e.addValue(r,ro(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,ro(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const fc={current:null},Tg={current:!1},l2=typeof window<"u";function rC(){if(Tg.current=!0,!!l2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fc.current=e.matches;e.addEventListener("change",t),t()}else fc.current=!1}const zx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let pc={};function iC(e){pc=e}function u2(){return pc}class c2{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:a},l={}){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=yg,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=()=>{const f=xt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,be.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=od(n),this.isVariantNode=nC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const p=h[f];u[f]!==void 0&&lt(p)&&p.set(u[f])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,o2.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Tg.current||rC(),this.shouldReduceMotion=fc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ai(this.notifyUpdate),ai(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&V_.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new B_({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:It(c)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=po.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&be.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in pc){const n=pc[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<zx.length;r++){const i=zx[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=a2(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ro(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(r_(r)||s_(r))?r=parseFloat(r):!s2(r)&&En.test(n)&&(r=Q_(t,n)),this.setBaseTarget(t,lt(r)?r.get():r)),lt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=wg(this.props,r,(n=this.presenceContext)==null?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!lt(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new lg),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){bg.render(this.render)}}class sC extends c2{constructor(){super(...arguments),this.KeyframeResolver=VD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;lt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class fi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function oC({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function d2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function h2(e,t){if(!t)return e;const 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}}function ch(e){return e===void 0||e===1}function pp({scale:e,scaleX:t,scaleY:n}){return!ch(e)||!ch(t)||!ch(n)}function Ci(e){return pp(e)||aC(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function aC(e){return Ox(e.x)||Ox(e.y)}function Ox(e){return e&&e!=="0%"}function mc(e,t,n){const r=e-n,i=t*r;return n+i}function Ux(e,t,n,r,i){return i!==void 0&&(e=mc(e,i,r)),mc(e,n,r)+t}function mp(e,t=0,n=1,r,i){e.min=Ux(e.min,t,n,r,i),e.max=Ux(e.max,t,n,r,i)}function lC(e,{x:t,y:n}){mp(e.x,t.translate,t.scale,t.originPoint),mp(e.y,n.translate,n.scale,n.originPoint)}const Wx=.999999999999,Hx=1.0000000000001;function f2(e,t,n,r=!1){var i;const s=n.length;if(!s)return;t.x=t.y=1;let o,a;for(let l=0;l<s;l++){o=n[l],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(On(e.x,-o.scroll.offset.x),On(e.y,-o.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,lC(e,a)),r&&Ci(o.latestValues)&&mu(e,o.latestValues,(i=o.layout)==null?void 0:i.layoutBox))}t.x<Hx&&t.x>Wx&&(t.x=1),t.y<Hx&&t.y>Wx&&(t.y=1)}function On(e,t){e.min+=t,e.max+=t}function Kx(e,t,n,r,i=.5){const s=we(e.min,e.max,i);mp(e,t,n,s,r)}function Gx(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function mu(e,t,n){const r=n??e;Kx(e.x,Gx(t.x,r.x),t.scaleX,t.scale,t.originX),Kx(e.y,Gx(t.y,r.y),t.scaleY,t.scale,t.originY)}function uC(e,t){return oC(h2(e.getBoundingClientRect(),t))}function p2(e,t,n){const r=uC(e,n),{scroll:i}=t;return i&&(On(r.x,i.offset.x),On(r.y,i.offset.y)),r}const m2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},g2=fo.length;function y2(e,t,n){let r="",i=!0;for(let o=0;o<g2;o++){const a=fo[o],l=e[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=fp(l,hc[a]);if(!u){i=!1;const d=m2[a]||a;r+=`${d}(${c}) `}n&&(t[a]=c)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${fp(s,hc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Eg(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(po.has(l)){o=!0;continue}else if(w_(l)){i[l]=u;continue}else{const c=fp(u,hc[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=y2(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}function cC(e,{style:t,vars:n},r,i){const s=e.style;let o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function Yx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const No={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(X.test(e))e=parseFloat(e);else return e;const n=Yx(e,t.target.x),r=Yx(e,t.target.y);return`${n}% ${r}%`}},v2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=En.parse(e);if(i.length>5)return r;const s=En.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=we(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},gp={borderRadius:{...No,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:No,borderTopRightRadius:No,borderBottomLeftRadius:No,borderBottomRightRadius:No,boxShadow:v2};function dC(e,{layout:t,layoutId:n}){return po.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!gp[e]||e==="opacity")}function jg(e,t,n){var r;const i=e.style,s=t==null?void 0:t.style,o={};if(!i)return o;for(const a in i)(lt(i[a])||s&&lt(s[a])||dC(a,e)||((r=n==null?void 0:n.getValue(a))==null?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}function x2(e){return window.getComputedStyle(e)}class w2 extends sC{constructor(){super(...arguments),this.type="html",this.renderInstance=cC}readValueFromInstance(t,n){var r;if(po.has(n))return(r=this.projection)!=null&&r.isProjecting?np(n):$I(t,n);{const i=x2(t),s=(w_(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return uC(t,n)}build(t,n,r){Eg(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return jg(t,n,r)}}const S2={offset:"stroke-dashoffset",array:"stroke-dasharray"},b2={offset:"strokeDashoffset",array:"strokeDasharray"};function k2(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?S2:b2;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const _2=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function hC(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(Eg(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const f of _2)d[f]!==void 0&&(h[f]=d[f],delete d[f]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&k2(d,i,s,o,!1)}const fC=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"]),pC=e=>typeof e=="string"&&e.toLowerCase()==="svg";function C2(e,t,n,r){cC(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(fC.has(i)?i:Sg(i),t.attrs[i])}function mC(e,t,n){const r=jg(e,t,n);for(const i in e)if(lt(e[i])||lt(t[i])){const s=fo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class P2 extends sC{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=qe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(po.has(n)){const r=X_(n);return r&&r.default||0}return n=fC.has(n)?n:Sg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return mC(t,n,r)}build(t,n,r){hC(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){C2(t,n,r,i)}mount(t){this.isSVGTag=pC(t.tagName),super.mount(t)}}const T2=Pg.length;function gC(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?gC(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<T2;n++){const r=Pg[n],i=e.props[r];(Ba(i)||i===!1)&&(t[r]=i)}return t}function yC(e,t){if(!Array.isArray(t))return!1;const 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}const E2=[...Cg].reverse(),j2=Cg.length;function A2(e){return t=>Promise.all(t.map(({animation:n,options:r})=>ED(e,n,r)))}function R2(e){let t=A2(e),n=Xx(),r=!0,i=!1;const s=u=>(c,d)=>{var h;const f=Ui(e,d,u==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(f){const{transition:p,transitionEnd:y,...x}=f;c={...c,...x,...y}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=gC(e.parent)||{},h=[],f=new Set;let p={},y=1/0;for(let m=0;m<j2;m++){const v=E2[m],w=n[v],b=c[v]!==void 0?c[v]:d[v],_=Ba(b),S=v===u?w.isActive:null;S===!1&&(y=m);let P=b===d[v]&&b!==c[v]&&_;if(P&&(r||i)&&e.manuallyAnimateOnMount&&(P=!1),w.protectedKeys={...p},!w.isActive&&S===null||!b&&!w.prevProp||sd(b)||typeof b=="boolean")continue;if(v==="exit"&&w.isActive&&S!==!0){w.prevResolvedValues&&(p={...p,...w.prevResolvedValues});continue}const T=L2(w.prevProp,b);let j=T||v===u&&w.isActive&&!P&&_||m>y&&_,E=!1;const L=Array.isArray(b)?b:[b];let M=L.reduce(s(v),{});S===!1&&(M={});const{prevResolvedValues:$={}}=w,B={...$,...M},F=W=>{j=!0,f.has(W)&&(E=!0,f.delete(W)),w.needsAnimating[W]=!0;const D=e.getValue(W);D&&(D.liveStyle=!1)};for(const W in B){const D=M[W],z=$[W];if(p.hasOwnProperty(W))continue;let k=!1;lp(D)&&lp(z)?k=!yC(D,z)||T:k=D!==z,k?D!=null?F(W):f.add(W):D!==void 0&&f.has(W)?F(W):w.protectedKeys[W]=!0}w.prevProp=b,w.prevResolvedValues=M,w.isActive&&(p={...p,...M}),(r||i)&&e.blockInitialAnimation&&(j=!1);const V=P&&T;j&&(!V||E)&&h.push(...L.map(W=>{const D={type:v};if(typeof W=="string"&&(r||i)&&!V&&e.manuallyAnimateOnMount&&e.parent){const{parent:z}=e,k=Ui(z,W);if(z.enteringChildren&&k){const{delayChildren:U}=k.transition||{};D.delay=$_(z.enteringChildren,e,U)}}return{animation:W,options:D}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const v=Ui(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}f.forEach(v=>{const w=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),m[v]=w??null}),h.push({animation:m})}let x=!!h.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,i=!1,x?t(h):Promise.resolve()}function l(u,c){var d;if(n[u].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const h=a(u);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Xx(),i=!0}}}function L2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yC(t,e):!1}function wi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Xx(){return{animate:wi(!0),whileInView:wi(),whileHover:wi(),whileTap:wi(),whileDrag:wi(),whileFocus:wi(),exit:wi()}}function yp(e,t){e.min=t.min,e.max=t.max}function yn(e,t){yp(e.x,t.x),yp(e.y,t.y)}function Qx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const vC=1e-4,M2=1-vC,I2=1+vC,xC=.01,D2=0-xC,N2=0+xC;function wt(e){return e.max-e.min}function B2(e,t,n){return Math.abs(e-t)<=n}function qx(e,t,n,r=.5){e.origin=r,e.originPoint=we(t.min,t.max,e.origin),e.scale=wt(n)/wt(t),e.translate=we(n.min,n.max,e.origin)-e.originPoint,(e.scale>=M2&&e.scale<=I2||isNaN(e.scale))&&(e.scale=1),(e.translate>=D2&&e.translate<=N2||isNaN(e.translate))&&(e.translate=0)}function sa(e,t,n,r){qx(e.x,t.x,n.x,r?r.originX:void 0),qx(e.y,t.y,n.y,r?r.originY:void 0)}function Zx(e,t,n,r=0){const i=r?we(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+wt(t)}function F2(e,t,n,r){Zx(e.x,t.x,n.x,r==null?void 0:r.x),Zx(e.y,t.y,n.y,r==null?void 0:r.y)}function Jx(e,t,n,r=0){const i=r?we(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+wt(t)}function gc(e,t,n,r){Jx(e.x,t.x,n.x,r==null?void 0:r.x),Jx(e.y,t.y,n.y,r==null?void 0:r.y)}function e0(e,t,n,r,i){return e-=t,e=mc(e,1/n,r),i!==void 0&&(e=mc(e,1/i,r)),e}function V2(e,t=0,n=1,r=.5,i,s=e,o=e){if(Yn.test(t)&&(t=parseFloat(t),t=we(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=we(s.min,s.max,r);e===s&&(a-=t),e.min=e0(e.min,t,n,a,i),e.max=e0(e.max,t,n,a,i)}function t0(e,t,[n,r,i],s,o){V2(e,t[n],t[r],t[i],t.scale,s,o)}const $2=["x","scaleX","originX"],z2=["y","scaleY","originY"];function n0(e,t,n,r){t0(e.x,t,$2,n?n.x:void 0,r?r.x:void 0),t0(e.y,t,z2,n?n.y:void 0,r?r.y:void 0)}function r0(e){return e.translate===0&&e.scale===1}function wC(e){return r0(e.x)&&r0(e.y)}function i0(e,t){return e.min===t.min&&e.max===t.max}function O2(e,t){return i0(e.x,t.x)&&i0(e.y,t.y)}function s0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function SC(e,t){return s0(e.x,t.x)&&s0(e.y,t.y)}function o0(e){return wt(e.x)/wt(e.y)}function a0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Fn(e){return[e("x"),e("y")]}function U2(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,pathRotation:d,rotateX:h,rotateY:f,skewX:p,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const bC=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],W2=bC.length,l0=e=>typeof e=="string"?parseFloat(e):e,u0=e=>typeof e=="number"||X.test(e);function H2(e,t,n,r,i,s){i?(e.opacity=we(0,n.opacity??1,K2(r)),e.opacityExit=we(t.opacity??1,0,G2(r))):s&&(e.opacity=we(t.opacity??1,n.opacity??1,r));for(let o=0;o<W2;o++){const a=bC[o];let l=c0(t,a),u=c0(n,a);l===void 0&&u===void 0||(l||(l=0),u||(u=0),l===0||u===0||u0(l)===u0(u)?(e[a]=Math.max(we(l0(l),l0(u),r),0),(Yn.test(u)||Yn.test(l))&&(e[a]+="%")):e[a]=u)}(t.rotate||n.rotate)&&(e.rotate=we(t.rotate||0,n.rotate||0,r))}function c0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const K2=kC(0,.5,p_),G2=kC(.5,.95,cn);function kC(e,t,n){return r=>r<e?0:r>t?1:n(Da(e,t,r))}function Y2(e,t,n){const r=lt(e)?e:ro(e);return r.start(xg("",r,t,n)),r.animation}function Fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const X2=(e,t)=>e.depth-t.depth;class Q2{constructor(){this.children=[],this.isDirty=!1}add(t){ag(this.children,t),this.isDirty=!0}remove(t){ac(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(X2),this.isDirty=!1,this.children.forEach(t)}}function q2(e,t){const n=xt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ai(r),e(s-t))};return be.setup(r,!0),()=>ai(r)}function gu(e){return lt(e)?e.get():e}class Z2{constructor(){this.members=[]}add(t){ag(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(ac(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(ac(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:o}=t.options;(s===void 0||s!==o)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),(r=t.root)!=null&&r.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,s,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(i=t.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||o.call(s)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const yu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},dh=["","X","Y","Z"],J2=1e3;let eN=0;function hh(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function _C(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=H_(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",be,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&_C(r)}function CC({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},o=t==null?void 0:t()){this.id=eN++,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(rN),this.nodes.forEach(uN),this.nodes.forEach(cN),this.nodes.forEach(iN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new Q2)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new lg),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const a=this.eventHandlers.get(s);a&&a.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=_g(s)&&!r2(s),this.instance=s;const{layoutId:o,layout:a,visualElement:l}=this.options;if(l&&!l.current&&l.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||o)&&(this.isLayoutDirty=!0),e){let u,c=0;const d=()=>this.root.updateBlockedByResize=!1;be.read(()=>{c=window.innerWidth}),e(s,()=>{const h=window.innerWidth;h!==c&&(c=h,this.root.updateBlockedByResize=!0,u&&u(),u=q2(d,250),yu.hasAnimatedSinceResize&&(yu.hasAnimatedSinceResize=!1,this.nodes.forEach(f0)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&l&&(o||a)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||l.getDefaultTransition()||mN,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=l.getProps(),x=!this.targetLayout||!SC(this.targetLayout,h),m=!c&&d;if(this.options.layoutRoot||this.resumeFrom||m||c&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...vg(f,"layout"),onPlay:p,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,m,v.path)}else c||f0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ai(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(dN),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_C(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const c=this.path[u];c.shouldResetTransform=!0,(typeof c.latestValues.x=="string"||typeof c.latestValues.y=="string")&&(c.isLayoutDirty=!0),c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:o,layout:a}=this.options;if(o===void 0&&!a)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const o=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),o&&this.nodes.forEach(oN),this.nodes.forEach(d0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(h0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(aN),this.nodes.forEach(lN),this.nodes.forEach(tN),this.nodes.forEach(nN)):this.nodes.forEach(h0),this.clearAllSnapshots();const s=xt.now();st.delta=Qn(0,1e3/60,s-st.timestamp),st.timestamp=s,st.isProcessing=!0,rh.update.process(st),rh.preRender.process(st),rh.render.process(st),st.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sN),this.sharedNodes.forEach(hN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,be.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){be.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!wt(this.snapshot.measuredBox.x)&&!wt(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 a=0;a<this.path.length;a++)this.path[a].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=qe()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o&&this.instance){const a=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:a,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:a}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!wC(this.projectionDelta),a=this.getTransformTemplate(),l=a?a(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;s&&this.instance&&(o||Ci(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let a=this.removeElementScroll(o);return s&&(a=this.removeTransform(a)),gN(a),{animationId:this.root.animationId,measuredBox:o,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:o}=this.options;if(!o)return qe();const a=o.measureViewportBox();if(!((s=this.scroll)!=null&&s.wasRoot||this.path.some(yN))){const{scroll:l}=this.root;l&&(On(a.x,l.offset.x),On(a.y,l.offset.y))}return a}removeElementScroll(s){var o;const a=qe();if(yn(a,s),(o=this.scroll)!=null&&o.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&yn(a,s),On(a.x,c.offset.x),On(a.y,c.offset.y))}return a}applyTransform(s,o=!1,a){var l,u;const c=a||qe();yn(c,s);for(let d=0;d<this.path.length;d++){const h=this.path[d];!o&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(On(c.x,-h.scroll.offset.x),On(c.y,-h.scroll.offset.y)),Ci(h.latestValues)&&mu(c,h.latestValues,(l=h.layout)==null?void 0:l.layoutBox)}return Ci(this.latestValues)&&mu(c,this.latestValues,(u=this.layout)==null?void 0:u.layoutBox),c}removeTransform(s){var o;const a=qe();yn(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!Ci(u.latestValues))continue;let c;u.instance&&(pp(u.latestValues)&&u.updateSnapshot(),c=qe(),yn(c,u.measurePageBox())),n0(a,u.latestValues,(o=u.snapshot)==null?void 0:o.layoutBox,c)}return Ci(this.latestValues)&&n0(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}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!==st.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var o;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(o=this.parent)!=null&&o.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:c}=this.options;if(!this.layout||!(u||c))return;this.resolvedRelativeTargetAt=st.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=qe(),this.targetWithTransforms=qe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),F2(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):yn(this.target,this.layout.layoutBox),lC(this.target,this.targetDelta)):yn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pp(this.parent.latestValues)||aC(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,o,a){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qe(),this.relativeTargetOrigin=qe(),gc(this.relativeTargetOrigin,o,a,this.options.layoutAnchor||void 0),yn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var s;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(s=this.parent)!=null&&s.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===st.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;yn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;f2(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=qe());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Qx(this.prevProjectionDelta.x,this.projectionDelta.x),Qx(this.prevProjectionDelta.y,this.projectionDelta.y)),sa(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!a0(this.projectionDelta.x,this.prevProjectionDelta.x)||!a0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rs(),this.projectionDelta=Rs(),this.projectionDeltaWithTransform=Rs()}setAnimationOrigin(s,o=!1,a){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Rs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const h=qe(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=f!==p,x=this.getStack(),m=!x||x.members.length<=1,v=!!(y&&!m&&this.options.crossfade===!0&&!this.path.some(pN));this.animationProgress=0;let w;const b=a==null?void 0:a.interpolateProjection(s);this.mixTargetDelta=_=>{const S=_/1e3,P=b==null?void 0:b(S);P?(d.x.translate=P.x,d.x.scale=we(s.x.scale,1,S),d.x.origin=s.x.origin,d.x.originPoint=s.x.originPoint,d.y.translate=P.y,d.y.scale=we(s.y.scale,1,S),d.y.origin=s.y.origin,d.y.originPoint=s.y.originPoint):(p0(d.x,s.x,S),p0(d.y,s.y,S)),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gc(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),fN(this.relativeTarget,this.relativeTargetOrigin,h,S),w&&O2(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=qe()),yn(w,this.relativeTarget)),y&&(this.animationValues=c,H2(c,u,this.latestValues,S,v,m)),P&&P.rotate!==void 0&&(this.animationValues||(this.animationValues=c),this.animationValues.pathRotation=P.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var o,a,l;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(l=(a=this.resumingFrom)==null?void 0:a.currentAnimation)==null||l.stop(),this.pendingAnimation&&(ai(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=be.update(()=>{yu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ro(0)),this.motionValue.jump(0,!1),this.currentAnimation=Y2(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),s.onUpdate&&s.onUpdate(u)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(J2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:a,layout:l,latestValues:u}=s;if(!(!o||!a||!l)){if(this!==s&&this.layout&&l&&PC(this.options.animationType,this.layout.layoutBox,l.layoutBox)){a=this.target||qe();const c=wt(this.layout.layoutBox.x);a.x.min=s.target.x.min,a.x.max=a.x.min+c;const d=wt(this.layout.layoutBox.y);a.y.min=s.target.y.min,a.y.max=a.y.min+d}yn(o,a),mu(o,u),sa(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Z2),this.sharedNodes.get(s).add(o);const a=o.options.initialPromotionConfig;o.promote({transition:a?a.transition:void 0,preserveFollowOpacity:a&&a.shouldPreserveFollowOpacity?a.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())==null?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())==null?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:a}={}){const l=this.getStack();l&&l.promote(this,a),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:a}=s;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(o=!0),!o)return;const l={};a.z&&hh("z",s,l,this.animationValues);for(let u=0;u<dh.length;u++)hh(`rotate${dh[u]}`,s,l,this.animationValues),hh(`skew${dh[u]}`,s,l,this.animationValues);s.render();for(const u in l)s.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);s.scheduleRender()}applyProjectionStyles(s,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const a=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=gu(o==null?void 0:o.pointerEvents)||"",s.transform=a?a(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=gu(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ci(this.latestValues)&&(s.transform=a?a({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let c=U2(this.projectionDeltaWithTransform,this.treeScale,u);a&&(c=a(u,c)),s.transform=c;const{x:d,y:h}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,l.animationValues?s.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const f in gp){if(u[f]===void 0)continue;const{correct:p,applyTo:y,isCSSVariable:x}=gp[f],m=c==="none"?u[f]:p(u[f],l);if(y){const v=y.length;for(let w=0;w<v;w++)s[y[w]]=m}else x?this.options.visualElement.renderState.vars[f]=m:s[f]=m}this.options.layoutId&&(s.pointerEvents=l===this?gu(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(d0),this.root.sharedNodes.clear()}}}function tN(e){e.updateLayout()}function nN(e){var t;const n=((t=e.resumeFrom)==null?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;if(s==="size")Fn(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=wt(h);h.min=r[d].min,h.max=h.min+f});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";yp(o?n.measuredBox[d]:n.layoutBox[d],r[d])}else PC(s,n.layoutBox,r)&&Fn(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=wt(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=Rs();sa(a,r,n.layoutBox);const l=Rs();o?sa(l,e.applyTransform(i,!0),n.measuredBox):sa(l,r,n.layoutBox);const u=!wC(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=e.options.layoutAnchor||void 0,y=qe();gc(y,n.layoutBox,h.layoutBox,p);const x=qe();gc(x,r,f.layoutBox,p),SC(y,x)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function rN(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 iN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function sN(e){e.clearSnapshot()}function d0(e){e.clearMeasurements()}function oN(e){e.isLayoutDirty=!0,e.updateLayout()}function h0(e){e.isLayoutDirty=!1}function aN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function lN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function f0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uN(e){e.resolveTargetDelta()}function cN(e){e.calcProjection()}function dN(e){e.resetSkewAndRotation()}function hN(e){e.removeLeadSnapshot()}function p0(e,t,n){e.translate=we(t.translate,0,n),e.scale=we(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function m0(e,t,n,r){e.min=we(t.min,n.min,r),e.max=we(t.max,n.max,r)}function fN(e,t,n,r){m0(e.x,t.x,n.x,r),m0(e.y,t.y,n.y,r)}function pN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const mN={duration:.45,ease:[.4,0,.1,1]},g0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),y0=g0("applewebkit/")&&!g0("chrome/")?Math.round:cn;function v0(e){e.min=y0(e.min),e.max=y0(e.max)}function gN(e){v0(e.x),v0(e.y)}function PC(e,t,n){return e==="position"||e==="preserve-aspect"&&!B2(o0(t),o0(n),.2)}function yN(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const vN=CC({attachResizeListener:(e,t)=>Fa(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),fh={current:void 0},TC=CC({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fh.current){const e=new vN({});e.mount(window),e.setOptions({layoutScroll:!0}),fh.current=e}return fh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ag=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function x0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xN(...e){return t=>{let n=!1;const r=e.map(i=>{const s=x0(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():x0(e[i],null)}}}}function wN(...e){return C.useCallback(xN(...e),e)}class SN extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(du(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=du(r)&&r.offsetWidth||0,s=du(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=s-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function bN({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){var o;const a=C.useId(),l=C.useRef(null),u=C.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=C.useContext(Ag),d=((o=e.props)==null?void 0:o.ref)??(e==null?void 0:e.ref),h=wN(l,d);return C.useInsertionEffect(()=>{const{width:f,height:p,top:y,left:x,right:m,bottom:v,direction:w}=u.current;if(t||s===!1||!l.current||!f||!p)return;const b=w==="rtl",_=n==="left"?b?`right: ${m}`:`left: ${x}`:b?`left: ${x}`:`right: ${m}`,S=r==="bottom"?`bottom: ${v}`:`top: ${y}`;l.current.dataset.motionPopId=a;const P=document.createElement("style");c&&(P.nonce=c);const T=i??document.head;return T.appendChild(P),P.sheet&&P.sheet.insertRule(`
65
+ [data-motion-pop-id="${a}"] {
66
+ position: absolute !important;
67
+ width: ${f}px !important;
68
+ height: ${p}px !important;
69
+ ${_}px !important;
70
+ ${S}px !important;
71
+ }
72
+ `),()=>{var j;(j=l.current)==null||j.removeAttribute("data-motion-pop-id"),T.contains(P)&&T.removeChild(P)}},[t]),R.jsx(SN,{isPresent:t,childRef:l,sizeRef:u,pop:s,children:s===!1?e:C.cloneElement(e,{ref:h})})}const kN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=og(_N),d=C.useId();let h=!0,f=C.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:p=>{c.set(p,!0);for(const y of c.values())if(!y)return;r&&r()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,r]);return s&&h&&(f={...f}),C.useMemo(()=>{c.forEach((p,y)=>c.set(y,!1))},[n]),C.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=R.jsx(bN,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),R.jsx(rd.Provider,{value:f,children:e})};function _N(){return new Map}function EC(e=!0){const t=C.useContext(rd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=C.useId();C.useEffect(()=>{if(e)return i(s)},[e]);const o=C.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Ml=e=>e.key||"";function w0(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const CN=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,d]=EC(o),h=C.useMemo(()=>w0(e),[e]),f=o&&!c?[]:h.map(Ml),p=C.useRef(!0),y=C.useRef(h),x=og(()=>new Map),m=C.useRef(new Set),[v,w]=C.useState(h),[b,_]=C.useState(h);n_(()=>{p.current=!1,y.current=h;for(let T=0;T<b.length;T++){const j=Ml(b[T]);f.includes(j)?(x.delete(j),m.current.delete(j)):x.get(j)!==!0&&x.set(j,!1)}},[b,f.length,f.join("-")]);const S=[];if(h!==v){let T=[...h];for(let j=0;j<b.length;j++){const E=b[j],L=Ml(E);f.includes(L)||(T.splice(j,0,E),S.push(E))}return s==="wait"&&S.length&&(T=S),_(w0(T)),w(h),null}const{forceRender:P}=C.useContext(sg);return R.jsx(R.Fragment,{children:b.map(T=>{const j=Ml(T),E=o&&!c?!1:h===b||f.includes(j),L=()=>{if(m.current.has(j))return;if(x.has(j))m.current.add(j),x.set(j,!0);else return;let M=!0;x.forEach($=>{$||(M=!1)}),M&&(P==null||P(),_(y.current),o&&(d==null||d()),r&&r())};return R.jsx(kN,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:E?void 0:L,anchorX:a,anchorY:l,children:T},j)})})},jC=C.createContext({strict:!1}),S0={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"]};let b0=!1;function PN(){if(b0)return;const e={};for(const t in S0)e[t]={isEnabled:n=>S0[t].some(r=>!!n[r])};iC(e),b0=!0}function AC(){return PN(),u2()}function TN(e){const t=AC();for(const n in e)t[n]={...t[n],...e[n]};iC(t)}const EN=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 yc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||EN.has(e)}let RC=e=>!yc(e);function jN(e){typeof e=="function"&&(RC=t=>t.startsWith("on")?!yc(t):e(t))}try{jN(require("@emotion/is-prop-valid").default)}catch{}function AN(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||lt(e[i])||(RC(i)||n===!0&&yc(i)||!t&&!yc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const ad=C.createContext({});function RN(e,t){if(od(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ba(n)?n:void 0,animate:Ba(r)?r:void 0}}return e.inherit!==!1?t:{}}function LN(e){const{initial:t,animate:n}=RN(e,C.useContext(ad));return C.useMemo(()=>({initial:t,animate:n}),[k0(t),k0(n)])}function k0(e){return Array.isArray(e)?e.join(" "):e}const Rg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function LC(e,t,n){for(const r in t)!lt(t[r])&&!dC(r,n)&&(e[r]=t[r])}function MN({transformTemplate:e},t){return C.useMemo(()=>{const n=Rg();return Eg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function IN(e,t){const n=e.style||{},r={};return LC(r,n,e),Object.assign(r,MN(e,t)),r}function DN(e,t){const n={},r=IN(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const MC=()=>({...Rg(),attrs:{}});function NN(e,t,n,r){const i=C.useMemo(()=>{const s=MC();return hC(s,t,pC(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};LC(s,e.style,e),i.style={...s,...i.style}}return i}const BN=["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 Lg(e){return typeof e!="string"||e.includes("-")?!1:!!(BN.indexOf(e)>-1||/[A-Z]/u.test(e))}function FN(e,t,n,{latestValues:r},i,s=!1,o){const a=(o??Lg(e)?NN:DN)(t,r,i,e),l=AN(t,typeof e=="string",s),u=e!==C.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=C.useMemo(()=>lt(c)?c.get():c,[c]);return C.createElement(e,{...u,children:d})}function VN({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:$N(n,r,i,e),renderState:t()}}function $N(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=gu(s[h]);let{initial:o,animate:a}=e;const l=od(e),u=nC(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!sd(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const p=wg(e,h[f]);if(p){const{transitionEnd:y,transition:x,...m}=p;for(const v in m){let w=m[v];if(Array.isArray(w)){const b=c?w.length-1:0;w=w[b]}w!==null&&(i[v]=w)}for(const v in y)i[v]=y[v]}}}return i}const IC=e=>(t,n)=>{const r=C.useContext(ad),i=C.useContext(rd),s=()=>VN(e,t,r,i);return n?s():og(s)},zN=IC({scrapeMotionValuesFromProps:jg,createRenderState:Rg}),ON=IC({scrapeMotionValuesFromProps:mC,createRenderState:MC}),UN=Symbol.for("motionComponentSymbol");function WN(e,t,n){const r=C.useRef(n);C.useInsertionEffect(()=>{r.current=n});const i=C.useRef(null);return C.useCallback(s=>{var o;s&&((o=e.onMount)==null||o.call(e,s)),t&&(s?t.mount(s):t.unmount());const a=r.current;if(typeof a=="function")if(s){const l=a(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):a(s);else a&&(a.current=s)},[t])}const DC=C.createContext({});function ps(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function HN(e,t,n,r,i,s){var o,a;const{visualElement:l}=C.useContext(ad),u=C.useContext(jC),c=C.useContext(rd),d=C.useContext(Ag),h=d.reducedMotion,f=d.skipAnimations,p=C.useRef(null),y=C.useRef(!1);r=r||u.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:l,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:h,skipAnimations:f,isSVG:s}),y.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const x=p.current,m=C.useContext(DC);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&KN(p.current,n,i,m);const v=C.useRef(!1);C.useInsertionEffect(()=>{x&&v.current&&x.update(n,c)});const w=n[W_],b=C.useRef(!!w&&typeof window<"u"&&!((o=window.MotionHandoffIsComplete)!=null&&o.call(window,w))&&((a=window.MotionHasOptimisedAnimation)==null?void 0:a.call(window,w)));return n_(()=>{y.current=!0,x&&(v.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),b.current&&x.animationState&&x.animationState.animateChanges())}),C.useEffect(()=>{x&&(!b.current&&x.animationState&&x.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,w)}),b.current=!1),x.enteringChildren=void 0)}),x}function KN(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:NC(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&ps(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function NC(e){if(e)return e.options.allowProjection!==!1?e.projection:NC(e.parent)}function ph(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&TN(r);const s=n?n==="svg":Lg(e),o=s?ON:zN;function a(u,c){let d;const h={...C.useContext(Ag),...u,layoutId:GN(u)},{isStatic:f}=h,p=LN(u),y=o(u,f);if(!f&&typeof window<"u"){YN();const x=XN(h);d=x.MeasureLayout,p.visualElement=HN(e,y,h,i,x.ProjectionNode,s)}return R.jsxs(ad.Provider,{value:p,children:[d&&p.visualElement?R.jsx(d,{visualElement:p.visualElement,...h}):null,FN(e,u,WN(y,p.visualElement,c),y,f,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=C.forwardRef(a);return l[UN]=e,l}function GN({layoutId:e}){const t=C.useContext(sg).id;return t&&e!==void 0?t+"-"+e:e}function YN(e,t){C.useContext(jC).strict}function XN(e){const t=AC(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function QN(e,t){if(typeof Proxy>"u")return ph;const n=new Map,r=(s,o)=>ph(s,o,e,t),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,ph(o,void 0,e,t)),n.get(o))})}const qN=(e,t)=>t.isSVG??Lg(e)?new P2(t):new w2(t,{allowProjection:e!==C.Fragment});class ZN extends fi{constructor(t){super(t),t.animationState||(t.animationState=R2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();sd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let JN=0;class eB extends fi{constructor(){super(...arguments),this.id=JN++,this.isExitComplete=!1}update(){var t;if(!this.node.presenceContext)return;const{isPresent:n,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||n===i)return;if(n&&i===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=Ui(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...d}=l;for(const h in d)(t=this.node.getValue(h))==null||t.jump(d[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!n);r&&!n&&s.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tB={animation:{Feature:ZN},exit:{Feature:eB}};function Ja(e){return{point:{x:e.pageX,y:e.pageY}}}const nB=e=>t=>kg(t)&&e(t,Ja(t));function oa(e,t,n,r){return Fa(e,t,nB(n),r)}const BC=({current:e})=>e?e.ownerDocument.defaultView:null,_0=(e,t)=>Math.abs(e-t);function rB(e,t){const n=_0(e.x,t.x),r=_0(e.y,t.y);return Math.sqrt(n**2+r**2)}const C0=new Set(["auto","scroll"]);class FC{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Il(this.lastRawMoveEventInfo,this.transformPagePoint));const f=mh(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=rB(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!y)return;const{point:x}=f,{timestamp:m}=st;this.history.push({...x,timestamp:m});const{onStart:v,onMove:w}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=Il(p,this.transformPagePoint),be.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:m}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=mh(f.type==="pointercancel"?this.lastMoveEventInfo:Il(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,v),x&&x(f,v)},!kg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=Ja(t),u=Il(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=st;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,mh(u,this.history)),this.removeListeners=Qa(oa(this.contextWindow,"pointermove",this.handlePointerMove),oa(this.contextWindow,"pointerup",this.handlePointerUp),oa(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(C0.has(r.overflowX)||C0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.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(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-n.x,y:i.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),be.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ai(this.updatePoint)}}function Il(e,t){return t?{point:t(e.point)}:e}function P0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mh({point:e},t){return{point:e,delta:P0(e,VC(t)),offset:P0(e,iB(t)),velocity:sB(t,.1)}}function iB(e){return e[0]}function VC(e){return e[e.length-1]}function sB(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=VC(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>It(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>It(t)*2&&(r=e[1]);const s=on(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function oB(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?we(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?we(n,e,r.max):Math.min(e,n)),e}function T0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function aB(e,{top:t,left:n,bottom:r,right:i}){return{x:T0(e.x,n,i),y:T0(e.y,t,r)}}function E0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lB(e,t){return{x:E0(e.x,t.x),y:E0(e.y,t.y)}}function uB(e,t){let n=.5;const r=wt(e),i=wt(t);return i>r?n=Da(t.min,t.max-r,e.min):r>i&&(n=Da(e.min,e.max-i,t.min)),Qn(0,1,n)}function cB(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const vp=.35;function dB(e=vp){return e===!1?e=0:e===!0&&(e=vp),{x:j0(e,"left","right"),y:j0(e,"top","bottom")}}function j0(e,t,n){return{min:A0(e,t),max:A0(e,n)}}function A0(e,t){return typeof e=="number"?e:e[t]||0}const hB=new WeakMap;class fB{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=qe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{n&&this.snapToCursor(Ja(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:f,dragPropagation:p,onDragStart:y}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=$D(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Fn(m=>{let v=this.getAxisMotionValue(m).get()||0;if(Yn.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const b=w.layout.layoutBox[m];b&&(v=wt(b)*(parseFloat(v)/100))}}this.originPoint[m]=v}),y&&be.update(()=>y(d,h),!1,!0),up(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:y,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:m}=h;if(p&&this.currentDirection===null){this.currentDirection=mB(m),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,m),this.updateAxis("y",h.point,m),this.visualElement.render(),x&&be.update(()=>x(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new FC(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:BC(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&be.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Dl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=oB(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)==null?void 0:t.layout,s=this.constraints;n&&ps(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=aB(i.layoutBox,n):this.constraints=!1,this.elastic=dB(r),s!==this.constraints&&!ps(n)&&i&&this.constraints&&!this.hasMutatedConstraints&&Fn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=cB(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ps(t))return!1;const r=t.current;Ji(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const s=p2(r,i.root,this.visualElement.getTransformPagePoint());let o=lB(i.layout.layoutBox,s);if(n){const a=n(d2(o));this.hasMutatedConstraints=!!a,a&&(o=oC(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Fn(c=>{if(!Dl(c,n,this.currentDirection))return;let d=l&&l[c]||{};(o===!0||o===c)&&(d={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return up(this.visualElement,t),r.start(xg(t,r,0,n,this.visualElement,!1))}stopAnimation(){Fn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`;return this.visualElement.getProps()[n]||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Fn(n=>{const{drag:r}=this.getProps();if(!Dl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-we(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ps(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Fn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=uB({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Fn(o=>{if(!Dl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(we(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;hB.set(this.visualElement,this);const t=this.visualElement.current,n=oa(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,f=h!==t&&KD(h);c&&d&&!f&&this.start(u)});let r;const i=()=>{const{dragConstraints:u}=this.getProps();ps(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=pB(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),be.read(i);const a=Fa(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Fn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=vp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function R0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function pB(e,t,n){const r=Fx(e,R0(n)),i=Fx(t,R0(n));return()=>{r(),i()}}function Dl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mB(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gB extends fi{constructor(t){super(t),this.removeGroupControls=cn,this.removeListeners=cn,this.controls=new fB(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const gh=e=>(t,n)=>{e&&be.update(()=>e(t,n),!1,!0)};class yB extends fi{constructor(){super(...arguments),this.removePointerDownListener=cn}onPointerDown(t){this.session=new FC(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:BC(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:gh(t),onStart:gh(n),onMove:gh(r),onEnd:(s,o)=>{delete this.session,i&&be.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=oa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let yh=!1;class vB extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),yh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),yu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),yh=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||be.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),bg.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;yh=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $C(e){const[t,n]=EC(),r=C.useContext(sg);return R.jsx(vB,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(DC),isPresent:t,safeToRemove:n})}const xB={pan:{Feature:yB},drag:{Feature:gB,ProjectionNode:TC,MeasureLayout:$C}};function L0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&be.postRender(()=>s(t,Ja(t)))}class wB extends fi{mount(){const{current:t}=this.node;t&&(this.unmount=OD(t,(n,r)=>(L0(this.node,r,"Start"),i=>L0(this.node,i,"End"))))}unmount(){}}class SB extends fi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Qa(Fa(this.node.current,"focus",()=>this.onFocus()),Fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function M0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&be.postRender(()=>s(t,Ja(t)))}class bB extends fi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=YD(t,(i,s)=>(M0(this.node,s,"Start"),(o,{success:a})=>M0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const xp=new WeakMap,vh=new WeakMap,kB=e=>{const t=xp.get(e.target);t&&t(e)},_B=e=>{e.forEach(kB)};function CB({root:e,...t}){const n=e||document;vh.has(n)||vh.set(n,{});const r=vh.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(_B,{root:e,...t})),r[i]}function PB(e,t,n){const r=CB(t);return xp.set(e,n),r.observe(e),()=>{xp.delete(e),r.unobserve(e)}}const TB={some:0,all:1};class EB extends fi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var t;(t=this.stopObserver)==null||t.call(this);const{viewport:n={}}=this.node.getProps(),{root:r,margin:i,amount:s="some",once:o}=n,a={root:r?r.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:TB[s]},l=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=c?d:h;f&&f(u)};this.stopObserver=PB(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(jB(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function jB({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const AB={inView:{Feature:EB},tap:{Feature:bB},focus:{Feature:SB},hover:{Feature:wB}},RB={layout:{ProjectionNode:TC,MeasureLayout:$C}},LB={...tB,...AB,...xB,...RB},I0=QN(LB,qN);function MB(){!Tg.current&&rC();const[e]=C.useState(fc.current);return e}function ie(...e){return MM(tM(e))}const IB={height:32,lineHeight:"32px",padding:"0 16px"};function DB(e){const t=ud((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=8+Math.round(n*6),i=50,s=50,o=46,a=2+n*14,l=[];for(let u=0;u<r;u++){const c=u/r*Math.PI*2+(t()-.5)*.15*n,d=o+(t()-.5)*a*2;l.push({x:i+Math.cos(c)*d,y:s+Math.sin(c)*d})}return ld(l)}function NB(e,t){const n=ud(e+"-ring"),r=Math.max(0,Math.min(1,t??.5)),i=8+Math.round(r*6),s=50,o=50,a=49,l=2+r*14,u=[];for(let c=0;c<i;c++){const d=c/i*Math.PI*2+(n()-.5)*.15*r,h=a+(n()-.5)*l*2;u.push({x:s+Math.cos(d)*h,y:o+Math.sin(d)*h})}return ld(u)}function BB(e){const t=ud((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=3+Math.round(n*3),i=2,s=3+n*10,o=[],a=[{ax:i,ay:i,bx:100-i,by:i},{ax:100-i,ay:i,bx:100-i,by:100-i},{ax:100-i,ay:100-i,bx:i,by:100-i},{ax:i,ay:100-i,bx:i,by:i}];for(const l of a)for(let u=0;u<r;u++){const c=(u+.5)/r,d=l.ax+(l.bx-l.ax)*c,h=l.ay+(l.by-l.ay)*c,f=l.bx-l.ax,p=l.by-l.ay,y=Math.sqrt(f*f+p*p)||1,x=-p/y,m=f/y,v=(t()-.5)*s*2;o.push({x:d+x*v,y:h+m*v})}return ld(o)}function FB(e,t){const n=ud(e+"-ring"),r=Math.max(0,Math.min(1,t??.5)),i=3+Math.round(r*3),s=0,o=3+r*10,a=[],l=[{ax:s,ay:s,bx:100-s,by:s},{ax:100-s,ay:s,bx:100-s,by:100-s},{ax:100-s,ay:100-s,bx:s,by:100-s},{ax:s,ay:100-s,bx:s,by:s}];for(const u of l)for(let c=0;c<i;c++){const d=(c+.5)/i,h=u.ax+(u.bx-u.ax)*d,f=u.ay+(u.by-u.ay)*d,p=u.bx-u.ax,y=u.by-u.ay,x=Math.sqrt(p*p+y*y)||1,m=-y/x,v=p/x,w=(n()-.5)*o*2;a.push({x:h+m*w,y:f+v*w})}return ld(a)}function ld(e){const t=e.length;if(t<3)return"";let n=`M ${_r(e[0].x)} ${_r(e[0].y)}`;for(let r=0;r<t;r++){const i=e[(r-1+t)%t],s=e[r],o=e[(r+1)%t],a=e[(r+2)%t],l=s.x+(o.x-i.x)/6,u=s.y+(o.y-i.y)/6,c=o.x-(a.x-s.x)/6,d=o.y-(a.y-s.y)/6;n+=` C ${_r(l)} ${_r(u)}, ${_r(c)} ${_r(d)}, ${_r(o.x)} ${_r(o.y)}`}return n+=" Z",n}function _r(e){return e.toFixed(2)}function ud(e){let t=typeof e=="string"?VB(e):e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function VB(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)||1}function el(e){return C.useMemo(()=>{const t=Math.random();return{blob:DB({seed:t,wobble:e}),ring:NB(t,e)}},[e])}const $B="button-module__button___Z331g",zB="button-module__blobBg___QQFzf",OB="button-module__blobFill___XwLjV",UB="button-module__blobRing___567UW",WB="button-module__isActive___FXNSJ",HB="button-module__primary___ppbyq",KB="button-module__secondary___esy5L",GB="button-module__ghost___NisA0",YB="button-module__danger___Wnvuq",XB="button-module__chalkboard___d3Nqb",QB="button-module__small___u7y8a",qB="button-module__medium___HBIAj",ZB="button-module__large___RPzNy",JB="button-module__fullWidth___H0P0F",eF="button-module__iconLeft___s60SZ",tF="button-module__iconRight___75eFu",nF="button-module__label___pXAyM",en={button:$B,blobBg:zB,blobFill:OB,blobRing:UB,isActive:WB,primary:HB,secondary:KB,ghost:GB,danger:YB,chalkboard:XB,small:QB,medium:qB,large:ZB,fullWidth:JB,iconLeft:eF,iconRight:tF,label:nF};function le({variant:e="primary",size:t="medium",icon:n,iconRight:r,fullWidth:i=!1,wobble:s=.5,isActive:o=!1,children:a,className:l,...u}){const c=el(s);return R.jsxs("button",{type:"button",className:ie(en.button,en[e],en[t],e==="chalkboard"&&en.chalkboard,o&&en.isActive,i&&en.fullWidth,l),...u,children:[R.jsxs("svg",{className:en.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[R.jsx("path",{d:c.blob,className:en.blobFill}),R.jsx("path",{d:c.ring,className:en.blobRing})]}),n&&R.jsx("span",{className:en.iconLeft,children:n}),R.jsx("span",{className:en.label,children:a}),r&&R.jsx("span",{className:en.iconRight,children:r})]})}function Mg(e){return{blue:e.accentBlue,green:e.accentGreen,amber:e.accentAmber,rose:e.accentRose,slate:e.accentSlate}}const Ig={paper:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E")`,parchment:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='par'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.48 0 0 0 0 0.35 0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23par)' opacity='1'/%3E%3C/svg%3E")`,kraft:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.50 0 0 0 0 0.35 0 0 0 0 0.20 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)' opacity='1'/%3E%3C/svg%3E")`,white:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.97 0 0 0 0 0.96 0 0 0 0 0.95 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)' opacity='1'/%3E%3C/svg%3E")`,speckle:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='speckle'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23speckle)' opacity='0.06'/%3E%3C/svg%3E")`,canvas:"repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(61, 53, 43, 0.06) 3px, rgba(61, 53, 43, 0.06) 3.8px, transparent 3.8px, transparent 6.5px, rgba(61, 53, 43, 0.035) 6.5px, rgba(61, 53, 43, 0.035) 7px), repeating-linear-gradient(90deg, transparent, transparent 4px, rgba(61, 53, 43, 0.045) 4px, rgba(61, 53, 43, 0.045) 4.8px, transparent 4.8px, transparent 7.5px, rgba(61, 53, 43, 0.025) 7.5px, rgba(61, 53, 43, 0.025) 8px)",chalkboard:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.15 0 0 0 0 0.28 0 0 0 0 0.20 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='1'/%3E%3C/svg%3E")`},Dg={paper:"#FAF8F0",parchment:"#F5F1E6",kraft:"#E5DBC4",white:"#FDFCF8",speckle:"#FAF8F0",canvas:"#F0EAD8",chalkboard:"#142e22"},rF={blue:"rgba(168, 200, 216, 0.35)",brown:"rgba(164, 144, 120, 0.35)",black:"rgba(61, 53, 43, 0.15)"};function gr(e){const t=e.texture??"paper",n=e.ruledType??"none",r=e.ruledColor??"blue",i=Ig[t],s=Dg[t],o=rF[r];return n==="none"?{backgroundColor:s,backgroundImage:i,backgroundRepeat:"repeat",backgroundSize:"200px 200px"}:n==="lines"?{backgroundColor:s,backgroundImage:`${i}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${o} 31px, ${o} 32px)`,backgroundRepeat:"repeat, repeat",backgroundSize:"200px 200px, 100% 32px"}:{backgroundColor:s,backgroundImage:`${i}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${o} 31px, ${o} 32px), repeating-linear-gradient(90deg, transparent, transparent 31px, ${o} 31px, ${o} 32px)`,backgroundRepeat:"repeat, repeat, repeat",backgroundSize:"200px 200px, 100% 32px, 32px 32px"}}const iF="page-module__page___-uHnG",sF="page-module__roundedTop___KQ4dD",oF="page-module__withAccent___lsv-m",aF="page-module__accentBlue___XxbMV",lF="page-module__accentGreen___Ne6Q8",uF="page-module__accentAmber___kLAwa",cF="page-module__accentRose___O9ZbZ",dF="page-module__accentSlate___xCB66",vu={page:iF,roundedTop:sF,withAccent:oF,accentBlue:aF,accentGreen:lF,accentAmber:uF,accentRose:cF,accentSlate:dF},hF=Mg(vu);function zC({children:e,className:t,style:n,withTexture:r=!0,texture:i,withAccent:s=!1,accentColor:o="blue",rounded:a="all"}){const l=i?gr(i):r?gr({texture:"white",ruledType:"lines",ruledColor:"blue"}):{backgroundColor:"var(--pui-bg-base)"};return R.jsx("div",{className:ie(vu.page,s&&vu.withAccent,s&&hF[o],a==="top"&&vu.roundedTop,t),style:{...l,...n},children:e})}const Ii={stackPanelWidth:480,navIslandBottom:"1.5rem",navIslandHeight:"4.5rem",contentGap:"1.5rem"},OC={4:"1rem"},fF="layout-module__layout___O1aWi",pF="layout-module__header___I-kxe",mF="layout-module__headerLeft___JChJQ",gF="layout-module__headerTitles___aqSUG",yF="layout-module__headerTitle___wvr39",vF="layout-module__headerSubtitle___6f5BD",xF="layout-module__headerActions___adC12",wF="layout-module__mobileToggle___4WpVG",SF="layout-module__body___tywNf",bF="layout-module__mobileOverlay___tzbBC",kF="layout-module__sidebar___8VKGq",_F="layout-module__sidebarOpen___47rtr",CF="layout-module__sidebarInner___tq2X6",PF="layout-module__logoArea___RLnC0",TF="layout-module__logoText___pAmfV",EF="layout-module__nav___FxcrZ",jF="layout-module__main___9z7bu",AF="layout-module__navIslandFixed___H4TwP",RF="layout-module__content___jL-VB",LF="layout-module__contentWithPage___vVdfN",MF="layout-module__footer___LyakU",IF="layout-module__footerText___8BYxc",Be={layout:fF,header:pF,headerLeft:mF,headerTitles:gF,headerTitle:yF,headerSubtitle:vF,headerActions:xF,mobileToggle:wF,body:SF,mobileOverlay:bF,sidebar:kF,sidebarOpen:_F,sidebarInner:CF,logoArea:PF,logoText:TF,nav:EF,main:jF,navIslandFixed:AF,content:RF,contentWithPage:LF,footer:MF,footerText:IF};function DF(e){return!e||e==="plain"?{backgroundColor:"var(--pui-bg-base)"}:typeof e=="object"&&"image"in e?{backgroundImage:`url(${e.image})`,backgroundRepeat:"repeat",backgroundSize:"200px 200px"}:typeof e=="object"&&"texture"in e?gr({texture:e.texture,ruledType:e.ruledType,ruledColor:e.ruledColor}):gr({texture:e})}function NF({children:e,showHeader:t=!0,showFooter:n=!1,showSidebar:r=!0,showPage:i=!0,background:s="paper",title:o,subtitle:a,headerActions:l,navigationItems:u=[],activeItemId:c,onNavigate:d,logo:h,footerContent:f,navigationIsland:p,style:y,bleedBottom:x=!0,routeKey:m,stackOpen:v}){const[w,b]=C.useState(!1),_=MB(),S=DF(s),P=r&&u.length>0;return R.jsxs("div",{className:Be.layout,style:{...S,...y},children:[t&&R.jsxs("header",{className:Be.header,children:[R.jsxs("div",{className:Be.headerLeft,children:[P&&R.jsx("button",{type:"button",className:Be.mobileToggle,onClick:()=>b(!0),"aria-label":"Open navigation",children:R.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:R.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),R.jsxs("div",{className:Be.headerTitles,children:[o&&R.jsx("h1",{className:Be.headerTitle,children:o}),a&&R.jsx("span",{className:Be.headerSubtitle,children:a})]})]}),l&&R.jsx("div",{className:Be.headerActions,children:l})]}),R.jsxs("div",{className:Be.body,children:[w&&R.jsx("div",{className:Be.mobileOverlay,onClick:()=>b(!1),"aria-hidden":"true"}),P&&R.jsx("aside",{className:ie(Be.sidebar,w&&Be.sidebarOpen),role:"navigation","aria-label":"Main navigation",children:R.jsxs("div",{className:Be.sidebarInner,children:[R.jsx("div",{className:Be.logoArea,children:h||R.jsx("span",{className:Be.logoText,children:"Paper UI"})}),R.jsx("nav",{className:Be.nav,children:u.map(T=>{const j=T.id===c;return R.jsx(le,{variant:"ghost",size:"small",isActive:j,onClick:()=>{d==null||d(T),b(!1)},"aria-current":j?"page":void 0,icon:T.icon,style:IB,children:T.label},T.id)})})]})}),R.jsx("div",{className:Be.main,children:R.jsx("main",{className:i?Be.contentWithPage:Be.content,style:x?{paddingBottom:0}:void 0,children:(()=>{const T=m!==void 0?R.jsx(CN,{mode:"wait",children:R.jsx(I0.div,{initial:_?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:_?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},style:{height:"100%"},children:e},m)}):e;return i?R.jsx(zC,{withTexture:!0,rounded:x?"top":"all",style:x&&p?{paddingBottom:`calc(${Ii.navIslandBottom} + ${Ii.navIslandHeight} + ${OC[4]})`}:void 0,children:T}):T})()})})]}),p&&R.jsx("div",{className:Be.navIslandFixed,children:v!==void 0?R.jsx(I0.div,{animate:{x:v?`-${Ii.stackPanelWidth/2}px`:0},transition:{duration:_?0:.3,ease:[.4,0,.2,1]},children:p}):p}),n&&R.jsx("footer",{className:Be.footer,children:f||R.jsx("p",{className:Be.footerText,children:"Paper UI — Natural Materials Component Library"})})]})}const BF="island-module__island___Yd2ej",FF="island-module__chalkboard___yK6AH",D0={island:BF,chalkboard:FF};function VF({children:e,variant:t="default",className:n}){return R.jsx("div",{className:ie(D0.island,t==="chalkboard"&&D0.chalkboard,n),role:"region","aria-label":"Controls",children:e})}const $F="checkbox-module__wrapper___uLYMI",zF="checkbox-module__blobFill___mPJSR",OF="checkbox-module__input___Ptgt7",UF="checkbox-module__blobBg___bw3sn",WF="checkbox-module__labelLeft___-vAmH",HF="checkbox-module__box___yAh-r",KF="checkbox-module__checkmark___tTyBz",GF="checkbox-module__indeterminateLine___IosI-",YF="checkbox-module__boxWrapper___byjoS",XF="checkbox-module__icon___RO-yn",QF="checkbox-module__labelText___bAnLr",qF="checkbox-module__chalkboard___sv6SL",Vt={wrapper:$F,blobFill:zF,input:OF,blobBg:UF,labelLeft:WF,box:HF,checkmark:KF,indeterminateLine:GF,boxWrapper:YF,icon:XF,labelText:QF,chalkboard:qF};function ZF({label:e,labelPosition:t="right",indeterminate:n=!1,wobble:r=.4,variant:i="default",className:s,checked:o,onChange:a,...l}){const u=C.useId(),c=el(r);return R.jsxs("label",{className:ie(Vt.wrapper,t==="left"&&Vt.labelLeft,i==="chalkboard"&&Vt.chalkboard,s),htmlFor:u,children:[R.jsxs("span",{className:Vt.boxWrapper,children:[R.jsx("input",{id:u,type:"checkbox",className:Vt.input,checked:o,onChange:a,...l}),R.jsx("svg",{className:Vt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:R.jsx("path",{d:c.blob,className:Vt.blobFill})}),R.jsx("span",{className:Vt.box,"aria-hidden":"true",children:n?R.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Vt.icon,children:R.jsx("line",{x1:"4",y1:"10",x2:"16",y2:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:Vt.indeterminateLine})}):R.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Vt.icon,children:R.jsx("path",{d:"M4 10 L8 14 L16 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:Vt.checkmark})})})]}),e&&R.jsx("span",{className:Vt.labelText,children:e})]})}const JF="icon-button-module__iconButton___avg6i",e3="icon-button-module__blobBg___466Vy",t3="icon-button-module__blobFill___FTN1g",n3="icon-button-module__blobRing___hRdQb",r3="icon-button-module__isActive___XlvtM",i3="icon-button-module__icon___h204x",s3="icon-button-module__ghost___Wbxog",o3="icon-button-module__danger___p0Xz5",a3="icon-button-module__small___bPnCU",l3="icon-button-module__medium___nOxPf",u3="icon-button-module__large___UBU5z",c3="icon-button-module__chalkboard___mi0sQ",nr={iconButton:JF,blobBg:e3,blobFill:t3,blobRing:n3,isActive:r3,icon:i3,default:"icon-button-module__default___9frNR",ghost:s3,danger:o3,small:a3,medium:l3,large:u3,chalkboard:c3};function Ut({icon:e,variant:t="default",size:n="medium",label:r,wobble:i=.5,isActive:s=!1,className:o,...a}){const l=el(i);return R.jsxs("button",{type:"button",className:ie(nr.iconButton,nr[t],t==="chalkboard"&&nr.chalkboard,nr[n],s&&nr.isActive,o),"aria-label":r,title:r,...a,children:[R.jsxs("svg",{className:nr.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[R.jsx("path",{d:l.blob,className:nr.blobFill}),R.jsx("path",{d:l.ring,className:nr.blobRing})]}),R.jsx("span",{className:nr.icon,children:e})]})}const d3="stamp-module__stamp___5qaNY",h3="stamp-module__small___BBlBg",f3="stamp-module__medium___HG2YD",p3="stamp-module__large___aUT0I",m3="stamp-module__blobBg___Mdrdd",g3="stamp-module__blobFill___QyCeB",y3="stamp-module__label___T89iH",v3="stamp-module__chalkboard___syI4T",ls={stamp:d3,small:h3,medium:f3,large:p3,blobBg:m3,blobFill:g3,label:y3,chalkboard:v3};function at({children:e,size:t="medium",fillColor:n="transparent",textColor:r,wobble:i=.3,variant:s="default",className:o}){const a=el(i);return R.jsxs("span",{className:ie(ls.stamp,ls[t],s==="chalkboard"&&ls.chalkboard,o),style:r?{color:r}:void 0,children:[R.jsx("svg",{className:ls.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:R.jsx("path",{d:a.blob,className:ls.blobFill,style:{fill:n}})}),R.jsx("span",{className:ls.label,children:e})]})}const x3="copy-button-module__copyButton___-hTo4",w3="copy-button-module__dark___O45N-",S3="copy-button-module__chalkboard___hW4aw",b3="copy-button-module__copied___XlHFr",Nl={copyButton:x3,dark:w3,chalkboard:S3,copied:b3};function N0({text:e,variant:t="light",className:n,...r}){const[i,s]=C.useState(!1),o=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),1500)}catch(a){console.error("Failed to copy:",a)}},[e]);return R.jsx("button",{type:"button",onClick:o,className:ie(Nl.copyButton,t==="dark"&&Nl.dark,t==="chalkboard"&&Nl.chalkboard,i&&Nl.copied,n),...r,children:i?"Copied!":"Copy"})}const k3="code-block-module__codeBlock___dq28o",_3="code-block-module__header___42Fek",C3="code-block-module__relative___oO-zy",P3="code-block-module__copyOverlay___PjAuq",T3="code-block-module__pre___zXzLZ",E3="code-block-module__chalkboard___bdo9J",j3="code-block-module__chalkboardHeader___3RiVd",A3="code-block-module__chalkboardPre___iRBFR",Cr={codeBlock:k3,header:_3,relative:C3,copyOverlay:P3,pre:T3,chalkboard:E3,chalkboardHeader:j3,chalkboardPre:A3};function R3({code:e,filename:t,variant:n="default"}){return R.jsxs("div",{className:ie(Cr.codeBlock,n==="chalkboard"&&Cr.chalkboard),children:[t&&R.jsxs("div",{className:ie(Cr.header,n==="chalkboard"&&Cr.chalkboardHeader),children:[R.jsx("span",{children:t}),R.jsx(N0,{text:e,variant:n==="chalkboard"?"chalkboard":"light"})]}),!t&&R.jsx("div",{className:Cr.relative,children:R.jsx("div",{className:Cr.copyOverlay,children:R.jsx(N0,{text:e,variant:n==="chalkboard"?"chalkboard":"dark"})})}),R.jsx("pre",{className:ie(Cr.pre,n==="chalkboard"&&Cr.chalkboardPre),children:R.jsx("code",{children:e})})]})}function L3(e,t){return gr(t||(e==="chalkboard"?{texture:"chalkboard",ruledType:"none"}:{texture:"paper",ruledType:"none"}))}const M3="table-module__tableWrapper___gc3Y3",I3="table-module__toolbar___zhCel",D3="table-module__search___zIBk2",N3="table-module__searchIcon___ayhK8",B3="table-module__searchInput___PqsEG",F3="table-module__toolbarActions___EX6qS",V3="table-module__tableScroll___1gvc4",$3="table-module__table___tdU5g",z3="table-module__th___GQbKk",O3="table-module__td___WktB5",U3="table-module__tr___xeZno",W3="table-module__expandTh___uxkR4",H3="table-module__expandTd___VoBRC",K3="table-module__expandIcon___8V45X",G3="table-module__expandable___R7o2l",Y3="table-module__expandedRow___1TbTQ",X3="table-module__expandedCell___sKAaD",Q3="table-module__boardScroll___Y1yqm",q3="table-module__board___kFAI-",Z3="table-module__boardColumn___-W9bP",J3="table-module__boardColumnHeader___kY3Fj",eV="table-module__accentBlue___PEJ1V",tV="table-module__accentGreen___wJ53r",nV="table-module__accentAmber___Iezjv",rV="table-module__accentRose___W8zxc",iV="table-module__accentSlate___oUZCX",sV="table-module__boardColumnLabel___JBEed",oV="table-module__boardColumnCount___Pkpiq",aV="table-module__boardColumnBody___uAgRF",lV="table-module__boardRow___C1P60",uV="table-module__boardEmpty___IKv2W",cV="table-module__chalkboardWrapper___KjY5r",dV="table-module__chalkboard___v0m3A",ce={tableWrapper:M3,toolbar:I3,search:D3,searchIcon:N3,searchInput:B3,toolbarActions:F3,tableScroll:V3,table:$3,th:z3,td:O3,tr:U3,expandTh:W3,expandTd:H3,expandIcon:K3,expandable:G3,expandedRow:Y3,expandedCell:X3,boardScroll:Q3,board:q3,boardColumn:Z3,boardColumnHeader:J3,accentBlue:eV,accentGreen:tV,accentAmber:nV,accentRose:rV,accentSlate:iV,boardColumnLabel:sV,boardColumnCount:oV,boardColumnBody:aV,boardRow:lV,boardEmpty:uV,chalkboardWrapper:cV,chalkboard:dV},hV=Mg(ce);function tl({data:e=[],columns:t=[],board:n,variant:r="paper",texture:i,toolbar:s,expandable:o,showExpandColumn:a=!0,rowClassName:l,className:u}){const c=L3(r,i),d=!!s,[h,f]=C.useState(new Set),p=m=>{f(v=>{const w=new Set(v);return w.has(m)?w.delete(m):w.add(m),w})},y=!!(o&&a),x=y?t.length+1:t.length;return R.jsxs("div",{className:ie(ce.tableWrapper,r==="chalkboard"&&ce.chalkboardWrapper,u),style:c,children:[d&&R.jsxs("div",{className:ce.toolbar,children:[s.search&&R.jsxs("div",{className:ce.search,children:[R.jsx(fV,{className:ce.searchIcon}),R.jsx("input",{type:"text",className:ce.searchInput,placeholder:s.search.placeholder??"Search...",value:s.search.value??"",onChange:m=>{var v,w;return(w=(v=s.search)==null?void 0:v.onChange)==null?void 0:w.call(v,m.target.value)}})]}),s.actions&&R.jsx("div",{className:ce.toolbarActions,children:typeof s.actions=="function"?s.actions(r):s.actions})]}),n?R.jsx("div",{className:ce.boardScroll,children:R.jsx("div",{className:ce.board,children:n.map(m=>R.jsxs("div",{className:ce.boardColumn,children:[R.jsxs("div",{className:ie(ce.boardColumnHeader,r==="chalkboard"&&ce.chalkboard,m.accent&&hV[m.accent]),children:[R.jsx("span",{className:ce.boardColumnLabel,children:m.label}),R.jsx("span",{className:ce.boardColumnCount,children:m.items.length})]}),R.jsx("div",{className:ce.boardColumnBody,children:m.items.length===0?R.jsx("div",{className:ce.boardEmpty,children:m.emptyLabel??"empty"}):m.items.map((v,w)=>R.jsx("div",{className:ie(ce.boardRow,r==="chalkboard"&&ce.chalkboard),children:m.renderItem(v,w,r)},m.getKey?m.getKey(v,w):w))})]},m.key))})}):R.jsx("div",{className:ce.tableScroll,children:R.jsxs("table",{className:ie(ce.table,r==="chalkboard"&&ce.chalkboard),children:[R.jsxs("colgroup",{children:[y&&R.jsx("col",{style:{width:"48px"}}),t.map(m=>R.jsx("col",{style:m.width?{width:`${m.width*32}px`}:void 0},m.key))]}),R.jsx("thead",{children:R.jsxs("tr",{children:[y&&R.jsx("th",{className:ie(ce.th,ce.expandTh),"aria-label":"Expand"}),t.map(m=>R.jsx("th",{className:ce.th,children:m.header},m.key))]})}),R.jsx("tbody",{children:e.map((m,v)=>{const w=o==null?void 0:o.render(m,v,r),b=!!w,_=b&&h.has(v);return R.jsxs(C.Fragment,{children:[R.jsxs("tr",{className:ie(ce.tr,b&&ce.expandable,l==null?void 0:l(m,v)),onClick:()=>b&&p(v),children:[y&&R.jsx("td",{className:ie(ce.td,ce.expandTd),children:b&&R.jsx("span",{className:ce.expandIcon,"aria-hidden":"true",children:_?"▼":"▶"})}),t.map(S=>R.jsx("td",{className:ce.td,children:S.cell(m,v,r)},S.key))]}),_&&R.jsx("tr",{className:ce.expandedRow,children:R.jsx("td",{colSpan:x,className:ce.expandedCell,children:w})})]},v)})})]})})]})}function fV({className:e}){return R.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[R.jsx("circle",{cx:"11",cy:"11",r:"8"}),R.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}const pV="card-module__borderLayer___WSpJq",mV="card-module__elevated___uhWj9",gV="card-module__textureLayer___Kcofz",yV="card-module__small___HXUTr",vV="card-module__withAccent___2t7bV",xV="card-module__accentBlue___a1KIq",wV="card-module__accentGreen___RNWoA",SV="card-module__accentAmber___uMhom",bV="card-module__accentRose___VPI3t",kV="card-module__accentSlate___-l4jE",_V="card-module__chalkboard___bQ48O",ms={borderLayer:pV,default:"card-module__default___glPy-",elevated:mV,textureLayer:gV,small:yV,withAccent:vV,accentBlue:xV,accentGreen:wV,accentAmber:SV,accentRose:bV,accentSlate:kV,chalkboard:_V},CV=Mg(ms);function Us({children:e,variant:t="default",size:n="default",texture:r="parchment",accent:i=!1,accentColor:s="blue",className:o}){return R.jsx("div",{className:ie(ms.borderLayer,ms[t],ms[n],i&&ms.withAccent,i&&CV[s],o),children:R.jsx("div",{className:ms.textureLayer,style:t==="chalkboard"?void 0:{backgroundColor:Dg[r],backgroundImage:Ig[r],backgroundSize:"200px 200px",backgroundRepeat:"repeat"},children:e})})}const PV="input-module__wrapper___xaEw6",TV="input-module__label___lu7R1",EV="input-module__input___h7K-F",jV="input-module__small___SkByh",AV="input-module__medium___0QPuV",RV="input-module__large___zGwRu",LV="input-module__error___QDqga",MV="input-module__helperText___njeLH",IV="input-module__helperError___qDBpD",DV="input-module__chalkboard___Xh-5s",Pr={wrapper:PV,label:TV,input:EV,small:jV,medium:AV,large:RV,error:LV,helperText:MV,helperError:IV,chalkboard:DV};function qn({label:e,helperText:t,error:n=!1,size:r="medium",variant:i="default",className:s,id:o,...a}){const l=o??`input-${Math.random().toString(36).slice(2,9)}`;return R.jsxs("div",{className:ie(Pr.wrapper,i==="chalkboard"&&Pr.chalkboard,s),children:[e&&R.jsx("label",{htmlFor:l,className:Pr.label,children:e}),R.jsx("input",{id:l,className:ie(Pr.input,Pr[r],n&&Pr.error),...a}),t&&R.jsx("span",{className:ie(Pr.helperText,n&&Pr.helperError),children:t})]})}const NV="select-module__wrapper___Hc5F3",BV="select-module__label___ay-3s",FV="select-module__nativeSelect___UA2d-",VV="select-module__trigger___xMYHi",$V="select-module__open___w3mbZ",zV="select-module__triggerLabel___ihpER",OV="select-module__placeholder___0VOFP",UV="select-module__small___iU9W9",WV="select-module__chevron___0dCTg",HV="select-module__medium___B-XBN",KV="select-module__large___iII2c",GV="select-module__chevronOpen___cFOYe",YV="select-module__error___P5RBk",XV="select-module__dropdown___Q-uK3",QV="select-module__slideDown___sT374",qV="select-module__option___vNnue",ZV="select-module__optionDisabled___ex2zq",JV="select-module__optionSelected___tAFjn",e$="select-module__optionHighlighted___zYQLq",t$="select-module__helperText___r5gyn",n$="select-module__helperError___ydSPT",r$="select-module__chalkboard___sXBw8",Oe={wrapper:NV,label:BV,nativeSelect:FV,trigger:VV,open:$V,triggerLabel:zV,placeholder:OV,small:UV,chevron:WV,medium:HV,large:KV,chevronOpen:GV,error:YV,dropdown:XV,slideDown:QV,option:qV,optionDisabled:ZV,optionSelected:JV,optionHighlighted:e$,helperText:t$,helperError:n$,chalkboard:r$};function Ws({label:e,helperText:t,error:n=!1,size:r="medium",variant:i="default",options:s,placeholder:o,value:a,defaultValue:l,onChange:u,disabled:c=!1,width:d,texture:h,withTexture:f=!1,className:p}){const y=C.useId(),[x,m]=C.useState(!1),[v,w]=C.useState(-1),[b,_]=C.useState(l??""),[S,P]=C.useState(null),T=C.useRef(null),j=C.useRef(null),E=a!==void 0,L=E?a:b,M=s.find(k=>k.value===L),$=(M==null?void 0:M.label)??o??"Select...",B=C.useCallback(()=>{if(c)return;m(!0);const k=s.findIndex(U=>U.value===L);w(k>=0?k:0)},[c,s,L]),F=C.useCallback(()=>{m(!1),w(-1)},[]),V=C.useCallback(k=>{var U;k.disabled||(E||_(k.value),u==null||u(k.value),F(),(U=T.current)==null||U.focus())},[E,u,F]),W=C.useCallback(k=>{if(!c)switch(k.key){case"Enter":case" ":k.preventDefault(),x&&v>=0?V(s[v]):B();break;case"Escape":k.preventDefault(),x&&F();break;case"ArrowDown":k.preventDefault(),x?w(U=>{let Z=U+1;for(;Z<s.length&&s[Z].disabled;)Z++;return Z<s.length?Z:U}):B();break;case"ArrowUp":k.preventDefault(),x?w(U=>{let Z=U-1;for(;Z>=0&&s[Z].disabled;)Z--;return Z>=0?Z:U}):B();break;case"Home":if(k.preventDefault(),x){let U=0;for(;U<s.length&&s[U].disabled;)U++;U<s.length&&w(U)}break;case"End":if(k.preventDefault(),x){let U=s.length-1;for(;U>=0&&s[U].disabled;)U--;U>=0&&w(U)}break}},[c,x,v,s,B,F,V]);C.useEffect(()=>{if(!x)return;const k=U=>{var Z,A;const ue=U.target;(Z=T.current)!=null&&Z.contains(ue)||(A=j.current)!=null&&A.contains(ue)||F()};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[x,F]),C.useEffect(()=>{if(!x||v<0||!j.current)return;const k=j.current.querySelector(`[data-option-index="${v}"]`);k==null||k.scrollIntoView({block:"nearest"})},[x,v]),C.useEffect(()=>{if(!x){P(null);return}const k=()=>{T.current&&P(T.current.getBoundingClientRect())};return k(),document.addEventListener("scroll",k,{capture:!0,passive:!0}),window.addEventListener("resize",k,{passive:!0}),()=>{document.removeEventListener("scroll",k,{capture:!0}),window.removeEventListener("resize",k)}},[x]);const D=h?gr(h):f?gr({texture:"paper",ruledType:"none"}):void 0,z=D?{"--pui-texture":D.backgroundImage,"--pui-fill":D.backgroundColor}:void 0;return R.jsxs("div",{className:ie(Oe.wrapper,i==="chalkboard"&&Oe.chalkboard,p),style:d?{width:typeof d=="number"?`${d}px`:d}:void 0,children:[e&&R.jsx("label",{htmlFor:y,className:Oe.label,children:e}),R.jsxs("select",{id:y,className:Oe.nativeSelect,value:L,onChange:k=>u==null?void 0:u(k.target.value),disabled:c,"aria-hidden":"true",tabIndex:-1,children:[o&&R.jsx("option",{value:"",children:o}),s.map(k=>R.jsx("option",{value:k.value,disabled:k.disabled,children:k.label},k.value))]}),R.jsxs("button",{ref:T,type:"button",role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-controls":x?`${y}-listbox`:void 0,"aria-activedescendant":x&&v>=0?`${y}-option-${v}`:void 0,className:ie(Oe.trigger,Oe[r],n&&Oe.error,x&&Oe.open,c&&Oe.disabled),onClick:()=>x?F():B(),onKeyDown:W,disabled:c,children:[R.jsx("span",{className:ie(Oe.triggerLabel,!M&&Oe.placeholder),children:$}),R.jsx(i$,{className:ie(Oe.chevron,x&&Oe.chevronOpen)})]}),x&&S&&Qm.createPortal(R.jsx("div",{ref:j,id:`${y}-listbox`,role:"listbox",className:Oe.dropdown,style:{...z,position:"fixed",top:S.bottom+6,left:S.left,width:S.width,zIndex:1e3},onKeyDown:k=>{var U;k.key==="Escape"&&(k.preventDefault(),F(),(U=T.current)==null||U.focus())},children:s.map((k,U)=>R.jsx("div",{id:`${y}-option-${U}`,role:"option","aria-selected":k.value===L,"data-option-index":U,className:ie(Oe.option,k.value===L&&Oe.optionSelected,U===v&&Oe.optionHighlighted,k.disabled&&Oe.optionDisabled),onClick:Z=>{Z.stopPropagation(),V(k)},onMouseEnter:()=>w(U),children:k.label},k.value))}),document.body),t&&R.jsx("span",{className:ie(Oe.helperText,n&&Oe.helperError),children:t})]})}function i$({className:e}){return R.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:R.jsx("polyline",{points:"6 9 12 15 18 9"})})}function rs({size:e=16}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function s$({size:e=16}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("path",{d:"M9 18h6"}),R.jsx("path",{d:"M10 22h4"}),R.jsx("path",{d:"M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"})]})}function cd({size:e=16}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:R.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Ng({size:e=16}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),R.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function o$({size:e=16}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:R.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}const a$="alert-module__alert___j7ZRS",l$="alert-module__iconWrapper___kLoxT",u$="alert-module__content___0FEM2",c$="alert-module__title___MWel2",d$="alert-module__message___klR2U",h$="alert-module__dismiss___f2uoG",f$="alert-module__info___PBo1l",p$="alert-module__success___AVBKS",m$="alert-module__warning___zkMaJ",g$="alert-module__error___cxg96",y$="alert-module__chalkboard___7pgWk",Tr={alert:a$,iconWrapper:l$,content:u$,title:c$,message:d$,dismiss:h$,info:f$,success:p$,warning:m$,error:g$,chalkboard:y$};function jn({children:e,variant:t="info",texture:n="canvas",title:r,dismissible:i=!1,onDismiss:s,className:o}){const a=t==="chalkboard";return R.jsxs("div",{className:ie(Tr.alert,Tr[t],o),style:{backgroundColor:a?void 0:Dg[n],backgroundImage:a?void 0:Ig[n],backgroundRepeat:"repeat",backgroundSize:"200px 200px"},role:"alert",children:[R.jsx("div",{className:Tr.tint}),R.jsx("span",{className:Tr.iconWrapper,children:R.jsx(v$,{variant:t})}),R.jsxs("div",{className:Tr.content,children:[r&&R.jsx("div",{className:Tr.title,children:r}),R.jsx("div",{className:Tr.message,children:e})]}),i&&R.jsx("button",{type:"button",className:Tr.dismiss,onClick:s,"aria-label":"Dismiss alert",children:R.jsx(rs,{size:16})})]})}function v$({variant:e}){switch(e){case"info":return R.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("circle",{cx:"12",cy:"12",r:"10"}),R.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),R.jsx("circle",{cx:"12",cy:"8",r:"0.5",fill:"currentColor"})]});case"success":return R.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),R.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]});case"warning":return R.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),R.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),R.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]});case"error":return R.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("circle",{cx:"12",cy:"12",r:"10"}),R.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),R.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}}const x$="modal-module__overlay___a52Ni",w$="modal-module__fadeIn___5OWd5",S$="modal-module__modal___ZioOV",b$="modal-module__slideUp___vfFrm",k$="modal-module__small___hcxwF",_$="modal-module__medium___mjbM5",C$="modal-module__large___1dzyf",P$="modal-module__header___iP09B",T$="modal-module__title___nj06m",E$="modal-module__close___gQou9",j$="modal-module__body___Y-EdA",A$="modal-module__chalkboard___qY8qo",Er={overlay:x$,fadeIn:w$,modal:S$,slideUp:b$,small:k$,medium:_$,large:C$,header:P$,title:T$,close:E$,body:j$,chalkboard:A$};function dd({open:e,onClose:t,title:n,children:r,size:i="medium",variant:s="default",texture:o,withTexture:a=!1,className:l}){if(!e)return null;const u=o?gr(o):a?gr({texture:"paper",ruledType:"none"}):void 0;return R.jsx("div",{className:Er.overlay,onClick:t,role:"dialog","aria-modal":"true",children:R.jsxs("div",{className:ie(Er.modal,Er[i],s==="chalkboard"&&Er.chalkboard,l),style:u,onClick:c=>c.stopPropagation(),children:[R.jsxs("div",{className:Er.header,children:[n&&R.jsx("h2",{className:Er.title,children:n}),R.jsx("button",{type:"button",className:Er.close,onClick:t,"aria-label":"Close modal",children:R.jsx(rs,{size:18})})]}),R.jsx("div",{className:Er.body,children:r})]})})}const R$="textarea-module__wrapper___NbiNO",L$="textarea-module__label___ejhyZ",M$="textarea-module__textarea___0y-7v",I$="textarea-module__small___yPyr8",D$="textarea-module__medium___ezQxA",N$="textarea-module__large___xfeKi",B$="textarea-module__error___EkXKJ",F$="textarea-module__helperText___l1sPh",V$="textarea-module__helperError___VfTLy",$$="textarea-module__chalkboard___zZ0X0",jr={wrapper:R$,label:L$,textarea:M$,small:I$,medium:D$,large:N$,error:B$,helperText:F$,helperError:V$,chalkboard:$$};function mo({label:e,helperText:t,error:n=!1,size:r="medium",variant:i="default",className:s,id:o,...a}){const l=o??`textarea-${Math.random().toString(36).slice(2,9)}`;return R.jsxs("div",{className:ie(jr.wrapper,i==="chalkboard"&&jr.chalkboard,s),children:[e&&R.jsx("label",{htmlFor:l,className:jr.label,children:e}),R.jsx("textarea",{id:l,className:ie(jr.textarea,jr[r],n&&jr.error),...a}),t&&R.jsx("span",{className:ie(jr.helperText,n&&jr.helperError),children:t})]})}const z$="progress-module__track___a5BMO",O$="progress-module__fill___E9mUF",B0={track:z$,fill:O$};function UC({value:e,max:t=100,color:n,height:r=6,className:i}){const s=Math.max(0,Math.min(100,Math.round(e/t*100)));return R.jsx("div",{className:ie(B0.track,i),style:{height:r,borderRadius:r/2},children:R.jsx("div",{className:B0.fill,style:{width:`${s}%`,height:r,borderRadius:r/2,background:n}})})}function U$(e){return C.useMemo(()=>{const t=Math.random();return{blob:BB({seed:t,wobble:e}),ring:FB(t,e)}},[e])}const W$="list-item-module__listItem___-tw9O",H$="list-item-module__clickable___GLJmd",K$="list-item-module__blobBg___O3Mzh",G$="list-item-module__blobFill___dXHk1",Y$="list-item-module__blobRing___S9mas",X$="list-item-module__active___UsL8O",Q$="list-item-module__small___9dphK",q$="list-item-module__medium___yGZCr",Z$="list-item-module__icon___2b4wU",J$="list-item-module__label___SIzJ4",ez="list-item-module__action___qGh0-",vn={listItem:W$,static:"list-item-module__static___qtEX6",clickable:H$,blobBg:K$,blobFill:G$,blobRing:Y$,active:X$,small:Q$,medium:q$,icon:Z$,label:J$,action:ez};function ur({active:e=!1,icon:t,action:n,size:r="medium",wobble:i=.5,children:s,className:o,...a}){const l=U$(i),u=!!a.onClick;return R.jsxs("button",{type:"button",className:ie(vn.listItem,vn[r],u&&vn.clickable,!u&&!e&&vn.static,e&&vn.active,o),"aria-current":e?"page":void 0,...a,children:[R.jsxs("svg",{className:vn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[R.jsx("path",{d:l.blob,className:vn.blobFill}),R.jsx("path",{d:l.ring,className:vn.blobRing})]}),t&&R.jsx("span",{className:vn.icon,children:t}),R.jsx("span",{className:vn.label,children:s}),n&&R.jsx("span",{className:vn.action,children:n})]})}const tz="accordion-module__accordion___mqGl-",nz="accordion-module__header___mLfbd",rz="accordion-module__icon___Z90NR",iz="accordion-module__title___HusgG",sz="accordion-module__content___1K0td",us={accordion:tz,header:nz,icon:rz,title:iz,content:sz};function oz({title:e,children:t,expanded:n=!1,onToggle:r,className:i}){return R.jsxs("div",{className:ie(us.accordion,n&&us.expanded,i),children:[R.jsxs("button",{type:"button",className:us.header,onClick:r,"aria-expanded":n,children:[R.jsx("span",{className:us.icon,"aria-hidden":"true",children:n?"▼":"▶"}),R.jsx("span",{className:us.title,children:e})]}),n&&R.jsx("div",{className:us.content,children:t})]})}const az="icon-module__icon___2vrJz",lz="icon-module__blobBg___ENPYJ",uz="icon-module__blobFill___IPbwQ",cz="icon-module__blobRing___1awqV",dz="icon-module__content___TaZR6",hz="icon-module__small___Xp--F",fz="icon-module__medium___tCjMB",pz="icon-module__large___vBtP7",cs={icon:az,blobBg:lz,blobFill:uz,blobRing:cz,content:dz,small:hz,medium:fz,large:pz},mz={small:20,medium:24,large:28};function WC({icon:e,size:t="medium",wobble:n=.5,fillColor:r,className:i}){const s=el(n),o=mz[t];return R.jsxs("span",{className:ie(cs.icon,cs[t],i),children:[R.jsxs("svg",{className:cs.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[R.jsx("path",{d:s.blob,className:cs.blobFill,style:r?{fill:r}:void 0}),R.jsx("path",{d:s.ring,className:cs.blobRing})]}),R.jsx("span",{className:cs.content,style:{width:o,height:o},children:e})]})}const Bg=C.createContext({});function Fg(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const gz=typeof window<"u",HC=gz?C.useLayoutEffect:C.useEffect,hd=C.createContext(null);function Vg(e,t){e.indexOf(t)===-1&&e.push(t)}function vc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Zn=(e,t,n)=>n>t?t:n<e?e:n;let $g=()=>{};const li={},KC=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),GC=e=>typeof e=="object"&&e!==null,YC=e=>/^0[^.\s]+$/u.test(e);function XC(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,nl=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Va=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class zg{constructor(){this.subscriptions=[]}add(t){return Vg(this.subscriptions,t),()=>vc(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Kt=e=>e*1e3,an=e=>e/1e3,QC=(e,t)=>t?e*(1e3/t):0,qC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,yz=1e-7,vz=12;function xz(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=qC(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>yz&&++a<vz);return o}function rl(e,t,n,r){if(e===t&&n===r)return dn;const i=s=>xz(s,0,1,e,n);return s=>s===0||s===1?s:qC(i(s),t,r)}const ZC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,JC=e=>t=>1-e(1-t),eP=rl(.33,1.53,.69,.99),Og=JC(eP),tP=ZC(Og),nP=e=>e>=1?1:(e*=2)<1?.5*Og(e):.5*(2-Math.pow(2,-10*(e-1))),Ug=e=>1-Math.sin(Math.acos(e)),rP=JC(Ug),iP=ZC(Ug),wz=rl(.42,0,1,1),Sz=rl(0,0,.58,1),sP=rl(.42,0,.58,1),bz=e=>Array.isArray(e)&&typeof e[0]!="number",oP=e=>Array.isArray(e)&&typeof e[0]=="number",kz={linear:dn,easeIn:wz,easeInOut:sP,easeOut:Sz,circIn:Ug,circInOut:iP,circOut:rP,backIn:Og,backInOut:tP,backOut:eP,anticipate:nP},_z=e=>typeof e=="string",F0=e=>{if(oP(e)){$g(e.length===4);const[t,n,r,i]=e;return rl(t,n,r,i)}else if(_z(e))return kz[e];return e},Bl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Cz(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,h=!1)=>{const p=h&&i?n:r;return d&&o.add(c),p.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const Pz=40;function aP(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Bl.reduce((w,b)=>(w[b]=Cz(s),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=o,y=()=>{const w=li.useManualTiming,b=w?i.timestamp:performance.now();n=!1,w||(i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,Pz),1)),i.timestamp=b,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(y))},x=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:Bl.reduce((w,b)=>{const _=o[b];return w[b]=(S,P=!1,T=!1)=>(n||x(),_.schedule(S,P,T)),w},{}),cancel:w=>{for(let b=0;b<Bl.length;b++)o[Bl[b]].cancel(w)},state:i,steps:o}}const{schedule:ke,cancel:ui,state:ot,steps:xh}=aP(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0);let xu;function Tz(){xu=void 0}const St={now:()=>(xu===void 0&&St.set(ot.isProcessing||li.useManualTiming?ot.timestamp:performance.now()),xu),set:e=>{xu=e,queueMicrotask(Tz)}},lP=e=>t=>typeof t=="string"&&t.startsWith(e),uP=lP("--"),Ez=lP("var(--"),Wg=e=>Ez(e)?jz.test(e.split("/*")[0].trim()):!1,jz=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function V0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const go={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$a={...go,transform:e=>Zn(0,1,e)},Fl={...go,default:1},aa=e=>Math.round(e*1e5)/1e5,Hg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Az(e){return e==null}const Rz=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kg=(e,t)=>n=>!!(typeof n=="string"&&Rz.test(n)&&n.startsWith(e)||t&&!Az(n)&&Object.prototype.hasOwnProperty.call(n,t)),cP=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Hg);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Lz=e=>Zn(0,255,e),wh={...go,transform:e=>Math.round(Lz(e))},Di={test:Kg("rgb","red"),parse:cP("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+wh.transform(e)+", "+wh.transform(t)+", "+wh.transform(n)+", "+aa($a.transform(r))+")"};function Mz(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}}const wp={test:Kg("#"),parse:Mz,transform:Di.transform},il=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ir=il("deg"),Xn=il("%"),Q=il("px"),Iz=il("vh"),Dz=il("vw"),$0={...Xn,parse:e=>Xn.parse(e)/100,transform:e=>Xn.transform(e*100)},Ls={test:Kg("hsl","hue"),parse:cP("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xn.transform(aa(t))+", "+Xn.transform(aa(n))+", "+aa($a.transform(r))+")"},He={test:e=>Di.test(e)||wp.test(e)||Ls.test(e),parse:e=>Di.test(e)?Di.parse(e):Ls.test(e)?Ls.parse(e):wp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Di.transform(e):Ls.transform(e),getAnimatableNone:e=>{const t=He.parse(e);return t.alpha=0,He.transform(t)}},Nz=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Bz(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Hg))==null?void 0:t.length)||0)+(((n=e.match(Nz))==null?void 0:n.length)||0)>0}const dP="number",hP="color",Fz="var",Vz="var(",z0="${}",$z=/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 io(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace($z,l=>(He.test(l)?(r.color.push(s),i.push(hP),n.push(He.parse(l))):l.startsWith(Vz)?(r.var.push(s),i.push(Fz),n.push(l)):(r.number.push(s),i.push(dP),n.push(parseFloat(l))),++s,z0)).split(z0);return{values:n,split:a,indexes:r,types:i}}function zz(e){return io(e).values}function fP({split:e,types:t}){const n=e.length;return r=>{let i="";for(let s=0;s<n;s++)if(i+=e[s],r[s]!==void 0){const o=t[s];o===dP?i+=aa(r[s]):o===hP?i+=He.transform(r[s]):i+=r[s]}return i}}function Oz(e){return fP(io(e))}const Uz=e=>typeof e=="number"?0:He.test(e)?He.getAnimatableNone(e):e,Wz=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Uz(e);function Hz(e){const t=io(e);return fP(t)(t.values.map((r,i)=>Wz(r,t.split[i])))}const An={test:Bz,parse:zz,createTransformer:Oz,getAnimatableNone:Hz};function Sh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Kz({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Sh(l,a,e+1/3),s=Sh(l,a,e),o=Sh(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function xc(e,t){return n=>n>0?t:e}const Se=(e,t,n)=>e+(t-e)*n,bh=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Gz=[wp,Di,Ls],Yz=e=>Gz.find(t=>t.test(e));function O0(e){const t=Yz(e);if(!t)return!1;let n=t.parse(e);return t===Ls&&(n=Kz(n)),n}const U0=(e,t)=>{const n=O0(e),r=O0(t);if(!n||!r)return xc(e,t);const i={...n};return s=>(i.red=bh(n.red,r.red,s),i.green=bh(n.green,r.green,s),i.blue=bh(n.blue,r.blue,s),i.alpha=Se(n.alpha,r.alpha,s),Di.transform(i))},Sp=new Set(["none","hidden"]);function Xz(e,t){return Sp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Qz(e,t){return n=>Se(e,t,n)}function Gg(e){return typeof e=="number"?Qz:typeof e=="string"?Wg(e)?xc:He.test(e)?U0:Jz:Array.isArray(e)?pP:typeof e=="object"?He.test(e)?U0:qz:xc}function pP(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Gg(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function qz(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Gg(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function Zz(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const Jz=(e,t)=>{const n=An.createTransformer(t),r=io(e),i=io(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Sp.has(e)&&!i.values.length||Sp.has(t)&&!r.values.length?Xz(e,t):nl(pP(Zz(r,i),i.values),n):xc(e,t)};function mP(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Se(e,t,n):Gg(e)(e,t)}const eO=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>ui(t),now:()=>ot.isProcessing?ot.timestamp:St.now()}},gP=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},wc=2e4;function Yg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<wc;)t+=n,r=e.next(t);return t>=wc?1/0:t}function tO(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Yg(r),wc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:an(i)}}const Fe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function bp(e,t){return e*Math.sqrt(1-t*t)}const nO=12;function rO(e,t,n){let r=n;for(let i=1;i<nO;i++)r=r-e(r)/t(r);return r}const kh=.001;function iO({duration:e=Fe.duration,bounce:t=Fe.bounce,velocity:n=Fe.velocity,mass:r=Fe.mass}){let i,s,o=1-t;o=Zn(Fe.minDamping,Fe.maxDamping,o),e=Zn(Fe.minDuration,Fe.maxDuration,an(e)),o<1?(i=u=>{const c=u*o,d=c*e,h=c-n,f=bp(u,o),p=Math.exp(-d);return kh-h/f*p},s=u=>{const d=u*o*e,h=d*n+n,f=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-d),y=bp(Math.pow(u,2),o);return(-i(u)+kh>0?-1:1)*((h-f)*p)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-kh+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=rO(i,s,a);if(e=Kt(e),isNaN(l))return{stiffness:Fe.stiffness,damping:Fe.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const sO=["duration","bounce"],oO=["stiffness","damping","mass"];function W0(e,t){return t.some(n=>e[n]!==void 0)}function aO(e){let t={velocity:Fe.velocity,stiffness:Fe.stiffness,damping:Fe.damping,mass:Fe.mass,isResolvedFromDuration:!1,...e};if(!W0(e,oO)&&W0(e,sO))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Zn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Fe.mass,stiffness:i,damping:s}}else{const n=iO({...e,velocity:0});t={...t,...n,mass:Fe.mass},t.isResolvedFromDuration=!0}return t}function Sc(e=Fe.visualDuration,t=Fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:f}=aO({...n,velocity:-an(n.velocity||0)}),p=h||0,y=u/(2*Math.sqrt(l*c)),x=o-s,m=an(Math.sqrt(l/c)),v=Math.abs(x)<5;r||(r=v?Fe.restSpeed.granular:Fe.restSpeed.default),i||(i=v?Fe.restDelta.granular:Fe.restDelta.default);let w,b,_,S,P,T;if(y<1)_=bp(m,y),S=(p+y*m*x)/_,w=E=>{const L=Math.exp(-y*m*E);return o-L*(S*Math.sin(_*E)+x*Math.cos(_*E))},P=y*m*S+x*_,T=y*m*x-S*_,b=E=>Math.exp(-y*m*E)*(P*Math.sin(_*E)+T*Math.cos(_*E));else if(y===1){w=L=>o-Math.exp(-m*L)*(x+(p+m*x)*L);const E=p+m*x;b=L=>Math.exp(-m*L)*(m*E*L-p)}else{const E=m*Math.sqrt(y*y-1);w=B=>{const F=Math.exp(-y*m*B),V=Math.min(E*B,300);return o-F*((p+y*m*x)*Math.sinh(V)+E*x*Math.cosh(V))/E};const L=(p+y*m*x)/E,M=y*m*L-x*E,$=y*m*x-L*E;b=B=>{const F=Math.exp(-y*m*B),V=Math.min(E*B,300);return F*(M*Math.sinh(V)+$*Math.cosh(V))}}const j={calculatedDuration:f&&d||null,velocity:E=>Kt(b(E)),next:E=>{if(!f&&y<1){const M=Math.exp(-y*m*E),$=Math.sin(_*E),B=Math.cos(_*E),F=o-M*(S*$+x*B),V=Kt(M*(P*$+T*B));return a.done=Math.abs(V)<=r&&Math.abs(o-F)<=i,a.value=a.done?o:F,a}const L=w(E);if(f)a.done=E>=d;else{const M=Kt(b(E));a.done=Math.abs(M)<=r&&Math.abs(o-L)<=i}return a.value=a.done?o:L,a},toString:()=>{const E=Math.min(Yg(j),wc),L=gP(M=>j.next(E*M).value,E,30);return E+"ms "+L},toTransition:()=>{}};return j}Sc.applyToOptions=e=>{const t=tO(e,100,Sc);return e.ease=t.ease,e.duration=Kt(t.duration),e.type="keyframes",e};const lO=5;function yP(e,t,n){const r=Math.max(t-lO,0);return QC(n-e(r),t-r)}function kp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},f=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let y=n*t;const x=d+y,m=o===void 0?x:o(x);m!==x&&(y=m-d);const v=T=>-y*Math.exp(-T/r),w=T=>m+v(T),b=T=>{const j=v(T),E=w(T);h.done=Math.abs(j)<=u,h.value=h.done?m:E};let _,S;const P=T=>{f(h.value)&&(_=T,S=Sc({keyframes:[h.value,p(h.value)],velocity:yP(w,T,h.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return P(0),{calculatedDuration:null,next:T=>{let j=!1;return!S&&_===void 0&&(j=!0,b(T),P(T)),_!==void 0&&T>=_?S.next(T-_):(!j&&b(T),h)}}}function uO(e,t,n){const r=[],i=n||li.mix||mP,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||dn:t;a=nl(l,a)}r.push(a)}return r}function cO(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if($g(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=uO(t,r,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const h=Va(e[d],e[d+1],c);return a[d](h)};return n?c=>u(Zn(e[0],e[s-1],c)):u}function dO(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Va(0,t,r);e.push(Se(n,1,i))}}function hO(e){const t=[0];return dO(t,e.length-1),t}function fO(e,t){return e.map(n=>n*t)}function pO(e,t){return e.map(()=>t||sP).splice(0,e.length-1)}function la({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=bz(r)?r.map(F0):F0(r),s={done:!1,value:t[0]},o=fO(n&&n.length===t.length?n:hO(t),e),a=cO(o,t,{ease:Array.isArray(i)?i:pO(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const mO=e=>e!==null;function fd(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(mO),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const gO={decay:kp,inertia:kp,tween:la,keyframes:la,spring:Sc};function vP(e){typeof e.type=="string"&&(e.type=gO[e.type])}class Xg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const yO=e=>e/100;class bc extends Xg{constructor(t){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=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==St.now()&&this.tick(St.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;vP(t);const{type:n=la,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||la;l!==la&&typeof a[0]!="number"&&(this.mixKeyframes=nl(yO,mP(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Yg(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:f,type:p,onUpdate:y,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const m=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?m<0:m>i;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,b=r;if(d){const T=Math.min(this.currentTime,i)/a;let j=Math.floor(T),E=T%1;!E&&T>=1&&(E=1),E===1&&j--,j=Math.min(j,d+1),!!(j%2)&&(h==="reverse"?(E=1-E,f&&(E-=f/a)):h==="mirror"&&(b=o)),w=Zn(0,1,E)*a}let _;v?(this.delayState.value=c[0],_=this.delayState):_=b.next(w),s&&!v&&(_.value=s(_.value));let{done:S}=_;!v&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return P&&p!==kp&&(_.value=fd(c,this.options,x,this.speed)),y&&y(_.value),P&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return an(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+an(t)}get time(){return an(this.currentTime)}set time(t){t=Kt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return yP(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(St.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=an(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=eO,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(St.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function vO(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ni=e=>e*180/Math.PI,_p=e=>{const t=Ni(Math.atan2(e[1],e[0]));return Cp(t)},xO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_p,rotateZ:_p,skewX:e=>Ni(Math.atan(e[1])),skewY:e=>Ni(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cp=e=>(e=e%360,e<0&&(e+=360),e),H0=_p,K0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),G0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),wO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:K0,scaleY:G0,scale:e=>(K0(e)+G0(e))/2,rotateX:e=>Cp(Ni(Math.atan2(e[6],e[5]))),rotateY:e=>Cp(Ni(Math.atan2(-e[2],e[0]))),rotateZ:H0,rotate:H0,skewX:e=>Ni(Math.atan(e[4])),skewY:e=>Ni(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Pp(e){return e.includes("scale")?1:0}function Tp(e,t){if(!e||e==="none")return Pp(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=wO,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=xO,i=a}if(!i)return Pp(t);const s=r[t],o=i[1].split(",").map(bO);return typeof s=="function"?s(o):o[s]}const SO=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Tp(n,t)};function bO(e){return parseFloat(e.trim())}const yo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vo=new Set([...yo,"pathRotation"]),Y0=e=>e===go||e===Q,kO=new Set(["x","y","z"]),_O=yo.filter(e=>!kO.has(e));function CO(e){const t=[];return _O.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Gr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?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})=>Tp(t,"x"),y:(e,{transform:t})=>Tp(t,"y")};Gr.translateX=Gr.x;Gr.translateY=Gr.y;const Wi=new Set;let Ep=!1,jp=!1,Ap=!1;function xP(){if(jp){const e=Array.from(Wi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=CO(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}jp=!1,Ep=!1,Wi.forEach(e=>e.complete(Ap)),Wi.clear()}function wP(){Wi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jp=!0)})}function PO(){Ap=!0,wP(),xP(),Ap=!1}class Qg{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Wi.add(this),Ep||(Ep=!0,ke.read(wP),ke.resolveKeyframes(xP))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}vO(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Wi.delete(this)}cancel(){this.state==="scheduled"&&(Wi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const TO=e=>e.startsWith("--");function SP(e,t,n){TO(t)?e.style.setProperty(t,n):e.style[t]=n}const EO={};function bP(e,t){const n=XC(e);return()=>EO[t]??n()}const jO=bP(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),kP=bP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Go=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,X0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Go([0,.65,.55,1]),circOut:Go([.55,0,1,.45]),backIn:Go([.31,.01,.66,-.59]),backOut:Go([.33,1.53,.69,.99])};function _P(e,t){if(e)return typeof e=="function"?kP()?gP(e,t):"ease-out":oP(e)?Go(e):Array.isArray(e)?e.map(n=>_P(n,t)||X0.easeOut):X0[e]}function AO(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=_P(a,i);Array.isArray(d)&&(c.easing=d);const h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function CP(e){return typeof e=="function"&&"applyToOptions"in e}function RO({type:e,...t}){return CP(e)&&kP()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class PP extends Xg{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,$g(typeof t.type!="string");const u=RO(t);this.animation=AO(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=fd(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),SP(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return an(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+an(t)}get time(){return an(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Kt(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&jO()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),dn):i(this)}}const TP={anticipate:nP,backInOut:tP,circInOut:iP};function LO(e){return e in TP}function MO(e){typeof e.ease=="string"&&LO(e.ease)&&(e.ease=TP[e.ease])}const _h=10;class IO extends PP{constructor(t){MO(t),vP(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new bc({...o,autoplay:!1}),l=Math.max(_h,St.now()-this.startTime),u=Zn(0,_h,l-_h),c=a.sample(l).value,{name:d}=this.options;s&&d&&SP(s,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Q0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(An.test(e)||e==="0")&&!e.startsWith("url("));function DO(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function NO(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=Q0(i,t),a=Q0(s,t);return!o||!a?!1:DO(e)||(n==="spring"||CP(n))&&r}function Rp(e){e.duration=0,e.type="keyframes"}const EP=new Set(["opacity","clipPath","filter","transform"]),BO=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function FO(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&BO.test(e[t]))return!0;return!1}const VO=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),$O=XC(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function zO(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=t.owner.getProps();return $O()&&n&&(EP.has(n)||VO.has(n)&&FO(a))&&(n!=="transform"||!c)&&!u&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const OO=40;class UO extends Xg{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var p;super(),this.stop=()=>{var y,x;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=St.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},f=(c==null?void 0:c.KeyframeResolver)||Qg;this.keyframeResolver=new f(a,(y,x,m)=>this.onKeyframesResolved(y,x,h,!m),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,r,i){var m,v;this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=St.now();let d=!0;NO(t,s,o,a)||(d=!1,(li.instantAnimations||!l)&&(c==null||c(fd(t,r,n))),t[0]=t[t.length-1],Rp(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>OO?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=d&&!u&&zO(f),y=(v=(m=f.motionValue)==null?void 0:m.owner)==null?void 0:v.current;let x;if(p)try{x=new IO({...f,element:y})}catch{x=new bc(f)}else x=new bc(f);x.finished.then(()=>{this.notifyFinished()}).catch(dn),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),PO()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function jP(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}const q0=30,WO=e=>!isNaN(parseFloat(e));class HO{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=St.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=St.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=WO(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new zg);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=St.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>q0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,q0);return QC(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function so(e,t){return new HO(e,t)}function AP(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function qg(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?AP(n,e):n}const KO={type:"spring",stiffness:500,damping:25,restSpeed:10},GO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YO={type:"keyframes",duration:.8},XO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},QO=(e,{keyframes:t})=>t.length>2?YO:vo.has(e)?e.startsWith("scale")?GO(t[1]):KO:XO,qO=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function ZO(e){for(const t in e)if(!qO.has(t))return!0;return!1}const Zg=(e,t,n,r={},i,s)=>o=>{const a=qg(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Kt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};ZO(a)||Object.assign(c,QO(e,c)),c.duration&&(c.duration=Kt(c.duration)),c.repeatDelay&&(c.repeatDelay=Kt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Rp(c),c.delay===0&&(d=!0)),(li.instantAnimations||li.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,Rp(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=fd(c.keyframes,a);if(h!==void 0){ke.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new bc(c):new UO(c)},JO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function e5(e){const t=JO.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function RP(e,t,n=1){const[r,i]=e5(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return KC(o)?parseFloat(o):o}return Wg(i)?RP(i,t,n+1):i}function Z0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Jg(e,t,n,r){if(typeof t=="function"){const[i,s]=Z0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Z0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Hi(e,t,n){const r=e.getProps();return Jg(r,t,n!==void 0?n:r.custom,e)}const LP=new Set(["width","height","top","left","right","bottom",...yo]),Lp=e=>Array.isArray(e);function t5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,so(n))}function n5(e){return Lp(e)?e[e.length-1]||0:e}function r5(e,t){const n=Hi(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=n5(s[o]);t5(e,o,a)}}const ut=e=>!!(e&&e.getVelocity);function i5(e){return!!(ut(e)&&e.add)}function Mp(e,t){const n=e.getValue("willChange");if(i5(n))return n.add(t);if(!n&&li.WillChange){const r=new li.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ey(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const s5="framerAppearId",MP="data-"+ey(s5);function IP(e){return e.props[MP]}function o5({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function DP(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?AP(s,l):l;const u=s==null?void 0:s.reduceMotion,c=s==null?void 0:s.skipAnimations;r&&(s=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i],f=s==null?void 0:s.path;f&&f.animateVisualElement(e,a,s,n,d);for(const p in a){const y=e.getValue(p,e.latestValues[p]??null),x=a[p];if(x===void 0||h&&o5(h,p))continue;const m={delay:n,...qg(s||{},p)};c&&(m.skipAnimations=!0);const v=y.get();if(v!==void 0&&!y.isAnimating()&&!Array.isArray(x)&&x===v&&!m.velocity){ke.update(()=>y.set(x));continue}let w=!1;if(window.MotionHandoffAnimation){const S=IP(e);if(S){const P=window.MotionHandoffAnimation(S,p,ke);P!==null&&(m.startTime=P,w=!0)}}Mp(e,p);const b=u??e.shouldReduceMotion;y.start(Zg(p,y,x,b&&LP.has(p)?{type:!1}:m,e,w));const _=y.animation;_&&d.push(_)}if(o){const p=()=>ke.update(()=>{o&&r5(e,o)});d.length?Promise.all(d).then(p):p()}return d}function Ip(e,t,n={}){var l;const r=Hi(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(DP(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=i;return a5(e,t,u,c,d,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function a5(e,t,n=0,r=0,i=0,s=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Ip(l,t,{...o,delay:n+(typeof r=="function"?0:r)+jP(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function l5(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Ip(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Ip(e,t,n);else{const i=typeof t=="function"?Hi(e,t,n.custom):t;r=Promise.all(DP(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const u5={test:e=>e==="auto",parse:e=>e},NP=e=>t=>t.test(e),BP=[go,Q,Xn,ir,Dz,Iz,u5],J0=e=>BP.find(NP(e));function c5(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||YC(e):!0}const d5=new Set(["brightness","contrast","saturate","opacity"]);function h5(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Hg)||[];if(!r)return e;const i=n.replace(r,"");let s=d5.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const f5=/\b([a-z-]*)\(.*?\)/gu,Dp={...An,getAnimatableNone:e=>{const t=e.match(f5);return t?t.map(h5).join(" "):e}},Np={...An,getAnimatableNone:e=>{const t=An.parse(e);return An.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},ew={...go,transform:Math.round},p5={rotate:ir,pathRotation:ir,rotateX:ir,rotateY:ir,rotateZ:ir,scale:Fl,scaleX:Fl,scaleY:Fl,scaleZ:Fl,skew:ir,skewX:ir,skewY:ir,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:$a,originX:$0,originY:$0,originZ:Q},kc={borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,inset:Q,insetBlock:Q,insetBlockStart:Q,insetBlockEnd:Q,insetInline:Q,insetInlineStart:Q,insetInlineEnd:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,paddingBlock:Q,paddingBlockStart:Q,paddingBlockEnd:Q,paddingInline:Q,paddingInlineStart:Q,paddingInlineEnd:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,marginBlock:Q,marginBlockStart:Q,marginBlockEnd:Q,marginInline:Q,marginInlineStart:Q,marginInlineEnd:Q,fontSize:Q,backgroundPositionX:Q,backgroundPositionY:Q,...p5,zIndex:ew,fillOpacity:$a,strokeOpacity:$a,numOctaves:ew},m5={...kc,color:He,backgroundColor:He,outlineColor:He,fill:He,stroke:He,borderColor:He,borderTopColor:He,borderRightColor:He,borderBottomColor:He,borderLeftColor:He,filter:Dp,WebkitFilter:Dp,mask:Np,WebkitMask:Np},FP=e=>m5[e],g5=new Set([Dp,Np]);function VP(e,t){let n=FP(e);return g5.has(n)||(n=An),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const y5=new Set(["auto","none","0"]);function v5(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!y5.has(s)&&io(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=VP(n,i)}class x5 extends Qg{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),Wg(d))){const h=RP(d,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!LP.has(r)||t.length!==2)return;const[i,s]=t,o=J0(i),a=J0(s),l=V0(i),u=V0(s);if(l!==u&&Gr[r]){this.needsMeasurement=!0;return}if(o!==a)if(Y0(o)&&Y0(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else Gr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||c5(t[i]))&&r.push(i);r.length&&v5(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Gr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function $P(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const Bp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function wu(e){return GC(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:ty}=aP(queueMicrotask,!1),Sn={x:!1,y:!1};function zP(){return Sn.x||Sn.y}function w5(e){return e==="x"||e==="y"?Sn[e]?null:(Sn[e]=!0,()=>{Sn[e]=!1}):Sn.x||Sn.y?null:(Sn.x=Sn.y=!0,()=>{Sn.x=Sn.y=!1})}function OP(e,t){const n=$P(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function S5(e){return!(e.pointerType==="touch"||zP())}function b5(e,t,n={}){const[r,i,s]=OP(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},d=x=>{u&&(u(x),u=void 0),c()},h=x=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(x))},f=()=>{a=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},p=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},y=x=>{if(!S5(x))return;l=!1;const m=t(o,x);typeof m=="function"&&(u=m,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",f,i)}),s}const UP=(e,t)=>t?e===t?!0:UP(e,t.parentElement):!1,ny=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,k5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _5(e){return k5.has(e.tagName)||e.isContentEditable===!0}const C5=new Set(["INPUT","SELECT","TEXTAREA"]);function P5(e){return C5.has(e.tagName)||e.isContentEditable===!0}const Su=new WeakSet;function tw(e){return t=>{t.key==="Enter"&&e(t)}}function Ch(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const T5=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=tw(()=>{if(Su.has(n))return;Ch(n,"down");const i=tw(()=>{Ch(n,"up")}),s=()=>Ch(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function nw(e){return ny(e)&&!zP()}const rw=new WeakSet;function E5(e,t,n={}){const[r,i,s]=OP(e,n),o=a=>{const l=a.currentTarget;if(!nw(a)||rw.has(a))return;Su.add(l),n.stopPropagation&&rw.add(a);const u=t(l,a),c=(f,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Su.has(l)&&Su.delete(l),nw(f)&&typeof u=="function"&&u(f,{success:p})},d=f=>{c(f,l===window||l===document||n.useGlobalTarget||UP(l,f.target))},h=f=>{c(f,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),wu(a)&&(a.addEventListener("focus",u=>T5(u,i)),!_5(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function ry(e){return GC(e)&&"ownerSVGElement"in e}const bu=new WeakMap;let Mr;const WP=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:ry(r)&&"getBBox"in r?r.getBBox()[t]:r[n],j5=WP("inline","width","offsetWidth"),A5=WP("block","height","offsetHeight");function R5({target:e,borderBoxSize:t}){var n;(n=bu.get(e))==null||n.forEach(r=>{r(e,{get width(){return j5(e,t)},get height(){return A5(e,t)}})})}function L5(e){e.forEach(R5)}function M5(){typeof ResizeObserver>"u"||(Mr=new ResizeObserver(L5))}function I5(e,t){Mr||M5();const n=$P(e);return n.forEach(r=>{let i=bu.get(r);i||(i=new Set,bu.set(r,i)),i.add(t),Mr==null||Mr.observe(r)}),()=>{n.forEach(r=>{const i=bu.get(r);i==null||i.delete(t),i!=null&&i.size||Mr==null||Mr.unobserve(r)})}}const ku=new Set;let Ms;function D5(){Ms=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ku.forEach(t=>t(e))},window.addEventListener("resize",Ms)}function N5(e){return ku.add(e),Ms||D5(),()=>{ku.delete(e),!ku.size&&typeof Ms=="function"&&(window.removeEventListener("resize",Ms),Ms=void 0)}}function iw(e,t){return typeof e=="function"?N5(e):I5(e,t)}function B5(e){return ry(e)&&e.tagName==="svg"}const F5=[...BP,He,An],V5=e=>F5.find(NP(e)),sw=()=>({translate:0,scale:1,origin:0,originPoint:0}),Is=()=>({x:sw(),y:sw()}),ow=()=>({min:0,max:0}),Ze=()=>({x:ow(),y:ow()}),$5=new WeakMap;function pd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function za(e){return typeof e=="string"||Array.isArray(e)}const iy=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sy=["initial",...iy];function md(e){return pd(e.animate)||sy.some(t=>za(e[t]))}function HP(e){return!!(md(e)||e.variants)}function z5(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ut(i))e.addValue(r,i);else if(ut(s))e.addValue(r,so(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,so(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const _c={current:null},oy={current:!1},O5=typeof window<"u";function KP(){if(oy.current=!0,!!O5)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>_c.current=e.matches;e.addEventListener("change",t),t()}else _c.current=!1}const aw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Cc={};function GP(e){Cc=e}function U5(){return Cc}class W5{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:a},l={}){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=Qg,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=()=>{const f=St.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ke.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=md(n),this.isVariantNode=HP(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const p=h[f];u[f]!==void 0&&ut(p)&&p.set(u[f])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,$5.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(oy.current||KP(),this.shouldReduceMotion=_c.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ui(this.notifyUpdate),ui(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&EP.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new PP({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:Kt(c)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=vo.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Cc){const n=Cc[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<aw.length;r++){const i=aw[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=z5(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=so(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(KC(r)||YC(r))?r=parseFloat(r):!V5(r)&&An.test(n)&&(r=VP(t,n)),this.setBaseTarget(t,ut(r)?r.get():r)),ut(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Jg(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ut(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new zg),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ty.render(this.render)}}class YP extends W5{constructor(){super(...arguments),this.KeyframeResolver=x5}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ut(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class pi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function XP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function H5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function K5(e,t){if(!t)return e;const 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}}function Ph(e){return e===void 0||e===1}function Fp({scale:e,scaleX:t,scaleY:n}){return!Ph(e)||!Ph(t)||!Ph(n)}function Pi(e){return Fp(e)||QP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function QP(e){return lw(e.x)||lw(e.y)}function lw(e){return e&&e!=="0%"}function Pc(e,t,n){const r=e-n,i=t*r;return n+i}function uw(e,t,n,r,i){return i!==void 0&&(e=Pc(e,i,r)),Pc(e,n,r)+t}function Vp(e,t=0,n=1,r,i){e.min=uw(e.min,t,n,r,i),e.max=uw(e.max,t,n,r,i)}function qP(e,{x:t,y:n}){Vp(e.x,t.translate,t.scale,t.originPoint),Vp(e.y,n.translate,n.scale,n.originPoint)}const cw=.999999999999,dw=1.0000000000001;function G5(e,t,n,r=!1){var a;const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;l<i;l++){s=n[l],o=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(Un(e.x,-s.scroll.offset.x),Un(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,qP(e,o)),r&&Pi(s.latestValues)&&_u(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<dw&&t.x>cw&&(t.x=1),t.y<dw&&t.y>cw&&(t.y=1)}function Un(e,t){e.min+=t,e.max+=t}function hw(e,t,n,r,i=.5){const s=Se(e.min,e.max,i);Vp(e,t,n,s,r)}function fw(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function _u(e,t,n){const r=n??e;hw(e.x,fw(t.x,r.x),t.scaleX,t.scale,t.originX),hw(e.y,fw(t.y,r.y),t.scaleY,t.scale,t.originY)}function ZP(e,t){return XP(K5(e.getBoundingClientRect(),t))}function Y5(e,t,n){const r=ZP(e,n),{scroll:i}=t;return i&&(Un(r.x,i.offset.x),Un(r.y,i.offset.y)),r}const X5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Q5=yo.length;function q5(e,t,n){let r="",i=!0;for(let o=0;o<Q5;o++){const a=yo[o],l=e[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=Bp(l,kc[a]);if(!u){i=!1;const d=X5[a]||a;r+=`${d}(${c}) `}n&&(t[a]=c)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${Bp(s,kc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function ay(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(vo.has(l)){o=!0;continue}else if(uP(l)){i[l]=u;continue}else{const c=Bp(u,kc[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=q5(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}function JP(e,{style:t,vars:n},r,i){const s=e.style;let o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function pw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Bo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Q.test(e))e=parseFloat(e);else return e;const n=pw(e,t.target.x),r=pw(e,t.target.y);return`${n}% ${r}%`}},Z5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=An.parse(e);if(i.length>5)return r;const s=An.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=Se(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},$p={borderRadius:{...Bo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Bo,borderTopRightRadius:Bo,borderBottomLeftRadius:Bo,borderBottomRightRadius:Bo,boxShadow:Z5};function eT(e,{layout:t,layoutId:n}){return vo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$p[e]||e==="opacity")}function ly(e,t,n){var o;const r=e.style,i=t==null?void 0:t.style,s={};if(!r)return s;for(const a in r)(ut(r[a])||i&&ut(i[a])||eT(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function J5(e){return window.getComputedStyle(e)}class e4 extends YP{constructor(){super(...arguments),this.type="html",this.renderInstance=JP}readValueFromInstance(t,n){var r;if(vo.has(n))return(r=this.projection)!=null&&r.isProjecting?Pp(n):SO(t,n);{const i=J5(t),s=(uP(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ZP(t,n)}build(t,n,r){ay(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ly(t,n,r)}}const t4={offset:"stroke-dashoffset",array:"stroke-dasharray"},n4={offset:"strokeDashoffset",array:"strokeDasharray"};function r4(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?t4:n4;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const i4=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tT(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(ay(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const f of i4)d[f]!==void 0&&(h[f]=d[f],delete d[f]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&r4(d,i,s,o,!1)}const nT=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"]),rT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function s4(e,t,n,r){JP(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(nT.has(i)?i:ey(i),t.attrs[i])}function iT(e,t,n){const r=ly(e,t,n);for(const i in e)if(ut(e[i])||ut(t[i])){const s=yo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class o4 extends YP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(vo.has(n)){const r=FP(n);return r&&r.default||0}return n=nT.has(n)?n:ey(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return iT(t,n,r)}build(t,n,r){tT(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){s4(t,n,r,i)}mount(t){this.isSVGTag=rT(t.tagName),super.mount(t)}}const a4=sy.length;function sT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?sT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<a4;n++){const r=sy[n],i=e.props[r];(za(i)||i===!1)&&(t[r]=i)}return t}function oT(e,t){if(!Array.isArray(t))return!1;const 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}const l4=[...iy].reverse(),u4=iy.length;function c4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>l5(e,n,r)))}function d4(e){let t=c4(e),n=mw(),r=!0,i=!1;const s=u=>(c,d)=>{var f;const h=Hi(e,d,u==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:y,...x}=h;c={...c,...x,...y}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=sT(e.parent)||{},h=[],f=new Set;let p={},y=1/0;for(let m=0;m<u4;m++){const v=l4[m],w=n[v],b=c[v]!==void 0?c[v]:d[v],_=za(b),S=v===u?w.isActive:null;S===!1&&(y=m);let P=b===d[v]&&b!==c[v]&&_;if(P&&(r||i)&&e.manuallyAnimateOnMount&&(P=!1),w.protectedKeys={...p},!w.isActive&&S===null||!b&&!w.prevProp||pd(b)||typeof b=="boolean")continue;if(v==="exit"&&w.isActive&&S!==!0){w.prevResolvedValues&&(p={...p,...w.prevResolvedValues});continue}const T=h4(w.prevProp,b);let j=T||v===u&&w.isActive&&!P&&_||m>y&&_,E=!1;const L=Array.isArray(b)?b:[b];let M=L.reduce(s(v),{});S===!1&&(M={});const{prevResolvedValues:$={}}=w,B={...$,...M},F=D=>{j=!0,f.has(D)&&(E=!0,f.delete(D)),w.needsAnimating[D]=!0;const z=e.getValue(D);z&&(z.liveStyle=!1)};for(const D in B){const z=M[D],k=$[D];if(p.hasOwnProperty(D))continue;let U=!1;Lp(z)&&Lp(k)?U=!oT(z,k)||T:U=z!==k,U?z!=null?F(D):f.add(D):z!==void 0&&f.has(D)?F(D):w.protectedKeys[D]=!0}w.prevProp=b,w.prevResolvedValues=M,w.isActive&&(p={...p,...M}),(r||i)&&e.blockInitialAnimation&&(j=!1);const V=P&&T;j&&(!V||E)&&h.push(...L.map(D=>{const z={type:v};if(typeof D=="string"&&(r||i)&&!V&&e.manuallyAnimateOnMount&&e.parent){const{parent:k}=e,U=Hi(k,D);if(k.enteringChildren&&U){const{delayChildren:Z}=U.transition||{};z.delay=jP(k.enteringChildren,e,Z)}}return{animation:D,options:z}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const v=Hi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}f.forEach(v=>{const w=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),m[v]=w??null}),h.push({animation:m})}let x=!!h.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,i=!1,x?t(h):Promise.resolve()}function l(u,c){var h;if(n[u].isActive===c)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const d=a(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=mw(),i=!0}}}function h4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oT(t,e):!1}function Si(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mw(){return{animate:Si(!0),whileInView:Si(),whileHover:Si(),whileTap:Si(),whileDrag:Si(),whileFocus:Si(),exit:Si()}}function zp(e,t){e.min=t.min,e.max=t.max}function xn(e,t){zp(e.x,t.x),zp(e.y,t.y)}function gw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const aT=1e-4,f4=1-aT,p4=1+aT,lT=.01,m4=0-lT,g4=0+lT;function bt(e){return e.max-e.min}function y4(e,t,n){return Math.abs(e-t)<=n}function yw(e,t,n,r=.5){e.origin=r,e.originPoint=Se(t.min,t.max,e.origin),e.scale=bt(n)/bt(t),e.translate=Se(n.min,n.max,e.origin)-e.originPoint,(e.scale>=f4&&e.scale<=p4||isNaN(e.scale))&&(e.scale=1),(e.translate>=m4&&e.translate<=g4||isNaN(e.translate))&&(e.translate=0)}function ua(e,t,n,r){yw(e.x,t.x,n.x,r?r.originX:void 0),yw(e.y,t.y,n.y,r?r.originY:void 0)}function vw(e,t,n,r=0){const i=r?Se(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+bt(t)}function v4(e,t,n,r){vw(e.x,t.x,n.x,r==null?void 0:r.x),vw(e.y,t.y,n.y,r==null?void 0:r.y)}function xw(e,t,n,r=0){const i=r?Se(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+bt(t)}function Tc(e,t,n,r){xw(e.x,t.x,n.x,r==null?void 0:r.x),xw(e.y,t.y,n.y,r==null?void 0:r.y)}function ww(e,t,n,r,i){return e-=t,e=Pc(e,1/n,r),i!==void 0&&(e=Pc(e,1/i,r)),e}function x4(e,t=0,n=1,r=.5,i,s=e,o=e){if(Xn.test(t)&&(t=parseFloat(t),t=Se(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Se(s.min,s.max,r);e===s&&(a-=t),e.min=ww(e.min,t,n,a,i),e.max=ww(e.max,t,n,a,i)}function Sw(e,t,[n,r,i],s,o){x4(e,t[n],t[r],t[i],t.scale,s,o)}const w4=["x","scaleX","originX"],S4=["y","scaleY","originY"];function bw(e,t,n,r){Sw(e.x,t,w4,n?n.x:void 0,r?r.x:void 0),Sw(e.y,t,S4,n?n.y:void 0,r?r.y:void 0)}function kw(e){return e.translate===0&&e.scale===1}function uT(e){return kw(e.x)&&kw(e.y)}function _w(e,t){return e.min===t.min&&e.max===t.max}function b4(e,t){return _w(e.x,t.x)&&_w(e.y,t.y)}function Cw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function cT(e,t){return Cw(e.x,t.x)&&Cw(e.y,t.y)}function Pw(e){return bt(e.x)/bt(e.y)}function Tw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Vn(e){return[e("x"),e("y")]}function k4(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,pathRotation:d,rotateX:h,rotateY:f,skewX:p,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const dT=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],_4=dT.length,Ew=e=>typeof e=="string"?parseFloat(e):e,jw=e=>typeof e=="number"||Q.test(e);function C4(e,t,n,r,i,s){i?(e.opacity=Se(0,n.opacity??1,P4(r)),e.opacityExit=Se(t.opacity??1,0,T4(r))):s&&(e.opacity=Se(t.opacity??1,n.opacity??1,r));for(let o=0;o<_4;o++){const a=dT[o];let l=Aw(t,a),u=Aw(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||jw(l)===jw(u)?(e[a]=Math.max(Se(Ew(l),Ew(u),r),0),(Xn.test(u)||Xn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Se(t.rotate||0,n.rotate||0,r))}function Aw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const P4=hT(0,.5,rP),T4=hT(.5,.95,dn);function hT(e,t,n){return r=>r<e?0:r>t?1:n(Va(e,t,r))}function E4(e,t,n){const r=ut(e)?e:so(e);return r.start(Zg("",r,t,n)),r.animation}function Oa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const j4=(e,t)=>e.depth-t.depth;class A4{constructor(){this.children=[],this.isDirty=!1}add(t){Vg(this.children,t),this.isDirty=!0}remove(t){vc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(j4),this.isDirty=!1,this.children.forEach(t)}}function R4(e,t){const n=St.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ui(r),e(s-t))};return ke.setup(r,!0),()=>ui(r)}function Cu(e){return ut(e)?e.get():e}class L4{constructor(){this.members=[]}add(t){Vg(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(vc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(vc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=r.options,{layoutDependency:o}=t.options;(s===void 0||s!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,s,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(i=t.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||o.call(s)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Pu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Th=["","X","Y","Z"],M4=1e3;let I4=0;function Eh(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fT(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=IP(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fT(r)}function pT({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=I4++,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(B4),this.nodes.forEach(U4),this.nodes.forEach(W4),this.nodes.forEach(F4)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new A4)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new zg),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=ry(o)&&!B5(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{d=window.innerWidth}),e(o,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=R4(h,250),Pu.hasAnimatedSinceResize&&(Pu.hasAnimatedSinceResize=!1,this.nodes.forEach(Mw)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||X4,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),m=!this.targetLayout||!cT(this.targetLayout,f),v=!d&&h;if(this.options.layoutRoot||this.resumeFrom||v||d&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...qg(p,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,v,w.path)}else d||Mw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ui(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(H4),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&fT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach($4),this.nodes.forEach(Rw);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Lw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(z4),this.nodes.forEach(O4),this.nodes.forEach(D4),this.nodes.forEach(N4)):this.nodes.forEach(Lw),this.clearAllSnapshots();const a=St.now();ot.delta=Zn(0,1e3/60,a-ot.timestamp),ot.timestamp=a,ot.isProcessing=!0,xh.update.process(ot),xh.preRender.process(ot),xh.render.process(ot),ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ty.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(V4),this.sharedNodes.forEach(K4)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!bt(this.snapshot.measuredBox.x)&&!bt(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ze()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!uT(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Pi(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Q4(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ze();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(q4))){const{scroll:c}=this.root;c&&(Un(a.x,c.offset.x),Un(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=Ze();if(xn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:h}=c;c!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&xn(a,o),Un(a.x,d.offset.x),Un(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var c,d;const u=l||Ze();xn(u,o);for(let h=0;h<this.path.length;h++){const f=this.path[h];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Un(u.x,-f.scroll.offset.x),Un(u.y,-f.scroll.offset.y)),Pi(f.latestValues)&&_u(u,f.latestValues,(c=f.layout)==null?void 0:c.layoutBox)}return Pi(this.latestValues)&&_u(u,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),u}removeTransform(o){var l;const a=Ze();xn(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!Pi(c.latestValues))continue;let d;c.instance&&(Fp(c.latestValues)&&c.updateSnapshot(),d=Ze(),xn(d,c.measurePageBox())),bw(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,d)}return Pi(this.latestValues)&&bw(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=ot.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ze(),this.targetWithTransforms=Ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),v4(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):xn(this.target,this.layout.layoutBox),qP(this.target,this.targetDelta)):xn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Fp(this.parent.latestValues)||QP(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),Tc(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),xn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ot.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;xn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;G5(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ze());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gw(this.prevProjectionDelta.x,this.projectionDelta.x),gw(this.prevProjectionDelta.y,this.projectionDelta.y)),ua(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Tw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Tw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Is(),this.projectionDelta=Is(),this.projectionDeltaWithTransform=Is()}setAnimationOrigin(o,a=!1,l){const u=this.snapshot,c=u?u.latestValues:{},d={...this.latestValues},h=Is();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ze(),p=u?u.source:void 0,y=this.layout?this.layout.source:void 0,x=p!==y,m=this.getStack(),v=!m||m.members.length<=1,w=!!(x&&!v&&this.options.crossfade===!0&&!this.path.some(Y4));this.animationProgress=0;let b;const _=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=S=>{const P=S/1e3,T=_==null?void 0:_(P);T?(h.x.translate=T.x,h.x.scale=Se(o.x.scale,1,P),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=T.y,h.y.scale=Se(o.y.scale,1,P),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(Iw(h.x,o.x,P),Iw(h.y,o.y,P)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),G4(this.relativeTarget,this.relativeTargetOrigin,f,P),b&&b4(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Ze()),xn(b,this.relativeTarget)),x&&(this.animationValues=d,C4(d,c,this.latestValues,P,w,v)),T&&T.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=T.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ui(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{Pu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=so(0)),this.motionValue.jump(0,!1),this.currentAnimation=E4(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(M4),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&mT(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ze();const d=bt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=bt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}xn(a,l),_u(a,c),ua(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new L4),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Eh("z",o,u,this.animationValues);for(let c=0;c<Th.length;c++)Eh(`rotate${Th[c]}`,o,u,this.animationValues),Eh(`skew${Th[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Cu(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Cu(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Pi(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=k4(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:h,y:f}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in $p){if(c[p]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:m}=$p[p],v=d==="none"?c[p]:y(c[p],u);if(x){const w=x.length;for(let b=0;b<w;b++)o[x[b]]=v}else m?this.options.visualElement.renderState.vars[p]=v:o[p]=v}this.options.layoutId&&(o.pointerEvents=u===this?Cu(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Rw),this.root.sharedNodes.clear()}}}function D4(e){e.updateLayout()}function N4(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;if(s==="size")Vn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],f=bt(h);h.min=r[d].min,h.max=h.min+f});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";zp(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else mT(s,t.layoutBox,r)&&Vn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],f=bt(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=Is();ua(a,r,t.layoutBox);const l=Is();o?ua(l,e.applyTransform(i,!0),t.measuredBox):ua(l,r,t.layoutBox);const u=!uT(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=e.options.layoutAnchor||void 0,y=Ze();Tc(y,t.layoutBox,h.layoutBox,p);const x=Ze();Tc(x,r,f.layoutBox,p),cT(y,x)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function B4(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 F4(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function V4(e){e.clearSnapshot()}function Rw(e){e.clearMeasurements()}function $4(e){e.isLayoutDirty=!0,e.updateLayout()}function Lw(e){e.isLayoutDirty=!1}function z4(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function O4(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function U4(e){e.resolveTargetDelta()}function W4(e){e.calcProjection()}function H4(e){e.resetSkewAndRotation()}function K4(e){e.removeLeadSnapshot()}function Iw(e,t,n){e.translate=Se(t.translate,0,n),e.scale=Se(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Dw(e,t,n,r){e.min=Se(t.min,n.min,r),e.max=Se(t.max,n.max,r)}function G4(e,t,n,r){Dw(e.x,t.x,n.x,r),Dw(e.y,t.y,n.y,r)}function Y4(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const X4={duration:.45,ease:[.4,0,.1,1]},Nw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Bw=Nw("applewebkit/")&&!Nw("chrome/")?Math.round:dn;function Fw(e){e.min=Bw(e.min),e.max=Bw(e.max)}function Q4(e){Fw(e.x),Fw(e.y)}function mT(e,t,n){return e==="position"||e==="preserve-aspect"&&!y4(Pw(t),Pw(n),.2)}function q4(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Z4=pT({attachResizeListener:(e,t)=>Oa(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),jh={current:void 0},gT=pT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!jh.current){const e=new Z4({});e.mount(window),e.setOptions({layoutScroll:!0}),jh.current=e}return jh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),uy=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Vw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function J4(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Vw(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Vw(e[i],null)}}}}function e6(...e){return C.useCallback(J4(...e),e)}class t6 extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(wu(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=wu(r)&&r.offsetWidth||0,s=wu(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=s-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function n6({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){var h;const o=C.useId(),a=C.useRef(null),l=C.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=C.useContext(uy),c=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=e6(a,c);return C.useInsertionEffect(()=>{const{width:f,height:p,top:y,left:x,right:m,bottom:v,direction:w}=l.current;if(t||s===!1||!a.current||!f||!p)return;const b=w==="rtl",_=n==="left"?b?`right: ${m}`:`left: ${x}`:b?`left: ${x}`:`right: ${m}`,S=r==="bottom"?`bottom: ${v}`:`top: ${y}`;a.current.dataset.motionPopId=o;const P=document.createElement("style");u&&(P.nonce=u);const T=i??document.head;return T.appendChild(P),P.sheet&&P.sheet.insertRule(`
73
+ [data-motion-pop-id="${o}"] {
74
+ position: absolute !important;
75
+ width: ${f}px !important;
76
+ height: ${p}px !important;
77
+ ${_}px !important;
78
+ ${S}px !important;
79
+ }
80
+ `),()=>{var j;(j=a.current)==null||j.removeAttribute("data-motion-pop-id"),T.contains(P)&&T.removeChild(P)}},[t]),g.jsx(t6,{isPresent:t,childRef:a,sizeRef:l,pop:s,children:s===!1?e:C.cloneElement(e,{ref:d})})}const r6=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=Fg(i6),d=C.useId();let h=!0,f=C.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:p=>{c.set(p,!0);for(const y of c.values())if(!y)return;r&&r()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,r]);return s&&h&&(f={...f}),C.useMemo(()=>{c.forEach((p,y)=>c.set(y,!1))},[n]),C.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=g.jsx(n6,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),g.jsx(hd.Provider,{value:f,children:e})};function i6(){return new Map}function yT(e=!0){const t=C.useContext(hd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=C.useId();C.useEffect(()=>{if(e)return i(s)},[e]);const o=C.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Vl=e=>e.key||"";function $w(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const cy=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,d]=yT(o),h=C.useMemo(()=>$w(e),[e]),f=o&&!c?[]:h.map(Vl),p=C.useRef(!0),y=C.useRef(h),x=Fg(()=>new Map),m=C.useRef(new Set),[v,w]=C.useState(h),[b,_]=C.useState(h);HC(()=>{p.current=!1,y.current=h;for(let T=0;T<b.length;T++){const j=Vl(b[T]);f.includes(j)?(x.delete(j),m.current.delete(j)):x.get(j)!==!0&&x.set(j,!1)}},[b,f.length,f.join("-")]);const S=[];if(h!==v){let T=[...h];for(let j=0;j<b.length;j++){const E=b[j],L=Vl(E);f.includes(L)||(T.splice(j,0,E),S.push(E))}return s==="wait"&&S.length&&(T=S),_($w(T)),w(h),null}const{forceRender:P}=C.useContext(Bg);return g.jsx(g.Fragment,{children:b.map(T=>{const j=Vl(T),E=o&&!c?!1:h===b||f.includes(j),L=()=>{if(m.current.has(j))return;if(x.has(j))m.current.add(j),x.set(j,!0);else return;let M=!0;x.forEach($=>{$||(M=!1)}),M&&(P==null||P(),_(y.current),o&&(d==null||d()),r&&r())};return g.jsx(r6,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:E?void 0:L,anchorX:a,anchorY:l,children:T},j)})})},vT=C.createContext({strict:!1}),zw={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"]};let Ow=!1;function s6(){if(Ow)return;const e={};for(const t in zw)e[t]={isEnabled:n=>zw[t].some(r=>!!n[r])};GP(e),Ow=!0}function xT(){return s6(),U5()}function o6(e){const t=xT();for(const n in e)t[n]={...t[n],...e[n]};GP(t)}const a6=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 Ec(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||a6.has(e)}let wT=e=>!Ec(e);function l6(e){typeof e=="function"&&(wT=t=>t.startsWith("on")?!Ec(t):e(t))}try{l6(require("@emotion/is-prop-valid").default)}catch{}function u6(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||ut(e[i])||(wT(i)||n===!0&&Ec(i)||!t&&!Ec(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const gd=C.createContext({});function c6(e,t){if(md(e)){const{initial:n,animate:r}=e;return{initial:n===!1||za(n)?n:void 0,animate:za(r)?r:void 0}}return e.inherit!==!1?t:{}}function d6(e){const{initial:t,animate:n}=c6(e,C.useContext(gd));return C.useMemo(()=>({initial:t,animate:n}),[Uw(t),Uw(n)])}function Uw(e){return Array.isArray(e)?e.join(" "):e}const dy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ST(e,t,n){for(const r in t)!ut(t[r])&&!eT(r,n)&&(e[r]=t[r])}function h6({transformTemplate:e},t){return C.useMemo(()=>{const n=dy();return ay(n,t,e),Object.assign({},n.vars,n.style)},[t])}function f6(e,t){const n=e.style||{},r={};return ST(r,n,e),Object.assign(r,h6(e,t)),r}function p6(e,t){const n={},r=f6(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const bT=()=>({...dy(),attrs:{}});function m6(e,t,n,r){const i=C.useMemo(()=>{const s=bT();return tT(s,t,rT(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};ST(s,e.style,e),i.style={...s,...i.style}}return i}const g6=["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 hy(e){return typeof e!="string"||e.includes("-")?!1:!!(g6.indexOf(e)>-1||/[A-Z]/u.test(e))}function y6(e,t,n,{latestValues:r},i,s=!1,o){const l=(o??hy(e)?m6:p6)(t,r,i,e),u=u6(t,typeof e=="string",s),c=e!==C.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=C.useMemo(()=>ut(d)?d.get():d,[d]);return C.createElement(e,{...c,children:h})}function v6({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:x6(n,r,i,e),renderState:t()}}function x6(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=Cu(s[h]);let{initial:o,animate:a}=e;const l=md(e),u=HP(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!pd(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const p=Jg(e,h[f]);if(p){const{transitionEnd:y,transition:x,...m}=p;for(const v in m){let w=m[v];if(Array.isArray(w)){const b=c?w.length-1:0;w=w[b]}w!==null&&(i[v]=w)}for(const v in y)i[v]=y[v]}}}return i}const kT=e=>(t,n)=>{const r=C.useContext(gd),i=C.useContext(hd),s=()=>v6(e,t,r,i);return n?s():Fg(s)},w6=kT({scrapeMotionValuesFromProps:ly,createRenderState:dy}),S6=kT({scrapeMotionValuesFromProps:iT,createRenderState:bT}),b6=Symbol.for("motionComponentSymbol");function k6(e,t,n){const r=C.useRef(n);C.useInsertionEffect(()=>{r.current=n});const i=C.useRef(null);return C.useCallback(s=>{var a;s&&((a=e.onMount)==null||a.call(e,s)),t&&(s?t.mount(s):t.unmount());const o=r.current;if(typeof o=="function")if(s){const l=o(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(s);else o&&(o.current=s)},[t])}const _T=C.createContext({});function gs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _6(e,t,n,r,i,s){var w,b;const{visualElement:o}=C.useContext(gd),a=C.useContext(vT),l=C.useContext(hd),u=C.useContext(uy),c=u.reducedMotion,d=u.skipAnimations,h=C.useRef(null),f=C.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:s}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const p=h.current,y=C.useContext(_T);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&C6(h.current,n,i,y);const x=C.useRef(!1);C.useInsertionEffect(()=>{p&&x.current&&p.update(n,l)});const m=n[MP],v=C.useRef(!!m&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,m))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,m)));return HC(()=>{f.current=!0,p&&(x.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),C.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,m)}),v.current=!1),p.enteringChildren=void 0)}),p}function C6(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:CT(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&gs(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function CT(e){if(e)return e.options.allowProjection!==!1?e.projection:CT(e.parent)}function Ah(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&o6(r);const s=n?n==="svg":hy(e),o=s?S6:w6;function a(u,c){let d;const h={...C.useContext(uy),...u,layoutId:P6(u)},{isStatic:f}=h,p=d6(u),y=o(u,f);if(!f&&typeof window<"u"){T6();const x=E6(h);d=x.MeasureLayout,p.visualElement=_6(e,y,h,i,x.ProjectionNode,s)}return g.jsxs(gd.Provider,{value:p,children:[d&&p.visualElement?g.jsx(d,{visualElement:p.visualElement,...h}):null,y6(e,u,k6(y,p.visualElement,c),y,f,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=C.forwardRef(a);return l[b6]=e,l}function P6({layoutId:e}){const t=C.useContext(Bg).id;return t&&e!==void 0?t+"-"+e:e}function T6(e,t){C.useContext(vT).strict}function E6(e){const t=xT(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function j6(e,t){if(typeof Proxy>"u")return Ah;const n=new Map,r=(s,o)=>Ah(s,o,e,t),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,Ah(o,void 0,e,t)),n.get(o))})}const A6=(e,t)=>t.isSVG??hy(e)?new o4(t):new e4(t,{allowProjection:e!==C.Fragment});class R6 extends pi{constructor(t){super(t),t.animationState||(t.animationState=d4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();pd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let L6=0;class M6 extends pi{constructor(){super(...arguments),this.id=L6++,this.isExitComplete=!1}update(){var s;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=Hi(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...d}=l;for(const h in d)(s=this.node.getValue(h))==null||s.jump(d[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const I6={animation:{Feature:R6},exit:{Feature:M6}};function sl(e){return{point:{x:e.pageX,y:e.pageY}}}const D6=e=>t=>ny(t)&&e(t,sl(t));function ca(e,t,n,r){return Oa(e,t,D6(n),r)}const PT=({current:e})=>e?e.ownerDocument.defaultView:null,Ww=(e,t)=>Math.abs(e-t);function N6(e,t){const n=Ww(e.x,t.x),r=Ww(e.y,t.y);return Math.sqrt(n**2+r**2)}const Hw=new Set(["auto","scroll"]);class TT{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=$l(this.lastRawMoveEventInfo,this.transformPagePoint));const f=Rh(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=N6(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!y)return;const{point:x}=f,{timestamp:m}=ot;this.history.push({...x,timestamp:m});const{onStart:v,onMove:w}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=$l(p,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:m}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Rh(f.type==="pointercancel"?this.lastMoveEventInfo:$l(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,v),x&&x(f,v)},!ny(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=sl(t),u=$l(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=ot;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,Rh(u,this.history)),this.removeListeners=nl(ca(this.contextWindow,"pointermove",this.handlePointerMove),ca(this.contextWindow,"pointerup",this.handlePointerUp),ca(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Hw.has(r.overflowX)||Hw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.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(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-n.x,y:i.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),ke.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ui(this.updatePoint)}}function $l(e,t){return t?{point:t(e.point)}:e}function Kw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rh({point:e},t){return{point:e,delta:Kw(e,ET(t)),offset:Kw(e,B6(t)),velocity:F6(t,.1)}}function B6(e){return e[0]}function ET(e){return e[e.length-1]}function F6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ET(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Kt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Kt(t)*2&&(r=e[1]);const s=an(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function V6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Se(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Se(n,e,r.max):Math.min(e,n)),e}function Gw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function $6(e,{top:t,left:n,bottom:r,right:i}){return{x:Gw(e.x,n,i),y:Gw(e.y,t,r)}}function Yw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function z6(e,t){return{x:Yw(e.x,t.x),y:Yw(e.y,t.y)}}function O6(e,t){let n=.5;const r=bt(e),i=bt(t);return i>r?n=Va(t.min,t.max-r,e.min):r>i&&(n=Va(e.min,e.max-i,t.min)),Zn(0,1,n)}function U6(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Op=.35;function W6(e=Op){return e===!1?e=0:e===!0&&(e=Op),{x:Xw(e,"left","right"),y:Xw(e,"top","bottom")}}function Xw(e,t,n){return{min:Qw(e,t),max:Qw(e,n)}}function Qw(e,t){return typeof e=="number"?e:e[t]||0}const H6=new WeakMap;class K6{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{n&&this.snapToCursor(sl(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:f,dragPropagation:p,onDragStart:y}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=w5(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vn(m=>{let v=this.getAxisMotionValue(m).get()||0;if(Xn.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const b=w.layout.layoutBox[m];b&&(v=bt(b)*(parseFloat(v)/100))}}this.originPoint[m]=v}),y&&ke.update(()=>y(d,h),!1,!0),Mp(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:y,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:m}=h;if(p&&this.currentDirection===null){this.currentDirection=Y6(m),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,m),this.updateAxis("y",h.point,m),this.visualElement.render(),x&&ke.update(()=>x(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new TT(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:PT(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ke.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!zl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=V6(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&gs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=$6(r.layoutBox,t):this.constraints=!1,this.elastic=W6(n),i!==this.constraints&&!gs(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Vn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=U6(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gs(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const s=Y5(r,i.root,this.visualElement.getTransformPagePoint());let o=z6(i.layout.layoutBox,s);if(n){const a=n(H5(o));this.hasMutatedConstraints=!!a,a&&(o=XP(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Vn(c=>{if(!zl(c,n,this.currentDirection))return;let d=l&&l[c]||{};(o===!0||o===c)&&(d={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Mp(this.visualElement,t),r.start(Zg(t,r,0,n,this.visualElement,!1))}stopAnimation(){Vn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Vn(n=>{const{drag:r}=this.getProps();if(!zl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-Se(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gs(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Vn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=O6({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Vn(o=>{if(!zl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Se(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;H6.set(this.visualElement,this);const t=this.visualElement.current,n=ca(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,f=h!==t&&P5(h);c&&d&&!f&&this.start(u)});let r;const i=()=>{const{dragConstraints:u}=this.getProps();gs(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=G6(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ke.read(i);const a=Oa(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Vn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Op,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function qw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function G6(e,t,n){const r=iw(e,qw(n)),i=iw(t,qw(n));return()=>{r(),i()}}function zl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Y6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class X6 extends pi{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new K6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Lh=e=>(t,n)=>{e&&ke.update(()=>e(t,n),!1,!0)};class Q6 extends pi{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new TT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:PT(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Lh(t),onStart:Lh(n),onMove:Lh(r),onEnd:(s,o)=>{delete this.session,i&&ke.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ca(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Mh=!1;class q6 extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),Mh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Pu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Mh=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ke.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),ty.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Mh=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function jT(e){const[t,n]=yT(),r=C.useContext(Bg);return g.jsx(q6,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(_T),isPresent:t,safeToRemove:n})}const Z6={pan:{Feature:Q6},drag:{Feature:X6,ProjectionNode:gT,MeasureLayout:jT}};function Zw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ke.postRender(()=>s(t,sl(t)))}class J6 extends pi{mount(){const{current:t}=this.node;t&&(this.unmount=b5(t,(n,r)=>(Zw(this.node,r,"Start"),i=>Zw(this.node,i,"End"))))}unmount(){}}class eU extends pi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=nl(Oa(this.node.current,"focus",()=>this.onFocus()),Oa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Jw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ke.postRender(()=>s(t,sl(t)))}class tU extends pi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=E5(t,(i,s)=>(Jw(this.node,s,"Start"),(o,{success:a})=>Jw(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Up=new WeakMap,Ih=new WeakMap,nU=e=>{const t=Up.get(e.target);t&&t(e)},rU=e=>{e.forEach(nU)};function iU({root:e,...t}){const n=e||document;Ih.has(n)||Ih.set(n,{});const r=Ih.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(rU,{root:e,...t})),r[i]}function sU(e,t,n){const r=iU(t);return Up.set(e,n),r.observe(e),()=>{Up.delete(e),r.unobserve(e)}}const oU={some:0,all:1};class aU extends pi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:oU[i]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=c?d:h;f&&f(u)};this.stopObserver=sU(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(lU(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function lU({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const uU={inView:{Feature:aU},tap:{Feature:tU},focus:{Feature:eU},hover:{Feature:J6}},cU={layout:{ProjectionNode:gT,MeasureLayout:jT}},dU={...I6,...uU,...Z6,...cU},jc=j6(dU,A6);function fy(){!oy.current&&KP();const[e]=C.useState(_c.current);return e}const ae={serif:"'Luminari', 'Cormorant Garamond', Georgia, serif",body:"'Cormorant Garamond', Georgia, serif",handwritten:"'Caveat', cursive",mono:"'JetBrains Mono', monospace"},I={1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem"},ve={"2xs":"0.75rem",xs:"0.875rem",sm:"1rem",base:"1.125rem",md:"1.25rem",lg:"1.5rem"},hn={tight:1.2,normal:1.5,relaxed:1.7},Ge={textPrimary:"#1A1917",textSecondary:"#68635C",accentAmberDark:"#A67B4F",accentGreenDark:"#5E8A66",accentRoseDark:"#9E5E5E",deskBg:"#1e3a2d",deskLight:"#264a3a",deskText:"#e8e4d9",deskTextMuted:"#a8b5a0",deskBorder:"rgba(200, 210, 195, 0.15)",deskChalk:"#d4e8cb"},Tu="1px solid rgba(61, 53, 43, 0.1)",AT={sidebarWidth:220,stackPanelWidth:480},hU=["idea","planned","in-progress","review","done","dropped"],fU=["feat","fix","chore","docs","refactor"],RT=["claude-code","opencode"],py={"claude-code":"Claude Code",opencode:"OpenCode"},Dh={"claude-code":{model:["opus","sonnet","fable","haiku"],effort:["low","medium","high","xhigh","max"]},opencode:{model:null}},Fo={phase:{agent:"opencode"},planDraft:{agent:"claude-code"},ideaExtend:{agent:"claude-code"},commitSuggest:{agent:"claude-code"}},pU=fU.map(e=>({value:e,label:e})),mU=({open:e,onClose:t,onAdd:n})=>{const[r,i]=C.useState(""),[s,o]=C.useState(""),[a,l]=C.useState("feat"),[u,c]=C.useState(!1);C.useEffect(()=>{e&&(i(""),o(""),l("feat"),c(!1))},[e]);const d=async h=>{h.preventDefault(),!(!r.trim()||u)&&(c(!0),await n({title:r.trim(),content:s.trim()||void 0,kind:a}),c(!1),t())};return g.jsx(dd,{open:e,onClose:t,title:"Add to backlog",size:"small",children:g.jsxs("form",{onSubmit:d,style:{display:"flex",flexDirection:"column",gap:I[4]},children:[g.jsx(qn,{label:"Title",value:r,onChange:h=>i(h.target.value),placeholder:"Backlog item title…",disabled:u,autoFocus:!0,required:!0}),g.jsx(Ws,{label:"Kind",value:a,onChange:h=>l(h),options:pU,disabled:u}),g.jsx(mo,{label:"Description",value:s,onChange:h=>o(h.target.value),placeholder:"Optional details…",disabled:u,rows:4}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[g.jsx(le,{type:"button",variant:"ghost",onClick:t,disabled:u,children:"Cancel"}),g.jsx(le,{type:"submit",variant:"primary",disabled:!r.trim()||u,children:"Add"})]})]})})},Wp=({children:e,onClick:t})=>g.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",padding:0,color:Ge.accentAmberDark,cursor:"pointer",textDecoration:"underline",font:"inherit"},children:e});function gU(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const yU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vU=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xU={};function e1(e,t){return(xU.jsx?vU:yU).test(e)}const wU=/[ \t\n\f\r]/g;function SU(e){return typeof e=="object"?e.type==="text"?t1(e.value):!1:t1(e)}function t1(e){return e.replace(wU,"")===""}class ol{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ol.prototype.normal={};ol.prototype.property={};ol.prototype.space=void 0;function LT(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ol(n,r,t)}function Hp(e){return e.toLowerCase()}class Bt{constructor(t,n){this.attribute=n,this.property=t}}Bt.prototype.attribute="";Bt.prototype.booleanish=!1;Bt.prototype.boolean=!1;Bt.prototype.commaOrSpaceSeparated=!1;Bt.prototype.commaSeparated=!1;Bt.prototype.defined=!1;Bt.prototype.mustUseProperty=!1;Bt.prototype.number=!1;Bt.prototype.overloadedBoolean=!1;Bt.prototype.property="";Bt.prototype.spaceSeparated=!1;Bt.prototype.space=void 0;let bU=0;const te=is(),Ue=is(),Kp=is(),G=is(),xe=is(),Ki=is(),$t=is();function is(){return 2**++bU}const Gp=Object.freeze(Object.defineProperty({__proto__:null,boolean:te,booleanish:Ue,commaOrSpaceSeparated:$t,commaSeparated:Ki,number:G,overloadedBoolean:Kp,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),Nh=Object.keys(Gp);class my extends Bt{constructor(t,n,r,i){let s=-1;if(super(t,n),n1(this,"space",i),typeof r=="number")for(;++s<Nh.length;){const o=Nh[s];n1(this,Nh[s],(r&Gp[o])===Gp[o])}}}my.prototype.defined=!0;function n1(e,t,n){n&&(e[t]=n)}function xo(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new my(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Hp(r)]=r,n[Hp(s.attribute)]=r}return new ol(t,n,e.space)}const MT=xo({properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:xe,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:G,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:xe,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:Ue,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function IT(e,t){return t in e?e[t]:t}function DT(e,t){return IT(e,t.toLowerCase())}const kU=xo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ki,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:te,allowPaymentRequest:te,allowUserMedia:te,alpha:te,alt:null,as:null,async:te,autoCapitalize:null,autoComplete:xe,autoFocus:te,autoPlay:te,blocking:xe,capture:null,charSet:null,checked:te,cite:null,className:xe,closedBy:null,colorSpace:null,cols:G,colSpan:G,command:null,commandFor:null,content:null,contentEditable:Ue,controls:te,controlsList:xe,coords:G|Ki,crossOrigin:null,data:null,dateTime:null,decoding:null,default:te,defer:te,dir:null,dirName:null,disabled:te,download:Kp,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:te,formTarget:null,headers:xe,height:G,hidden:Kp,high:G,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:te,inputMode:null,integrity:null,is:null,isMap:te,itemId:null,itemProp:xe,itemRef:xe,itemScope:te,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:te,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:te,muted:te,name:null,nonce:null,noModule:te,noValidate:te,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:te,optimum:G,pattern:null,ping:xe,placeholder:null,playsInline:te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:te,referrerPolicy:null,rel:xe,required:te,reversed:te,rows:G,rowSpan:G,sandbox:xe,scope:null,scoped:te,seamless:te,selected:te,shadowRootClonable:te,shadowRootCustomElementRegistry:te,shadowRootDelegatesFocus:te,shadowRootMode:null,shadowRootSerializable:te,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:te,useMap:null,value:Ue,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:te,declare:te,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:te,noHref:te,noShade:te,noWrap:te,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:te,disablePictureInPicture:te,disableRemotePlayback:te,exportParts:Ki,part:xe,prefix:null,property:null,results:G,security:null,unselectable:null},space:"html",transform:DT}),_U=xo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$t,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:xe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:te,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ki,g2:Ki,glyphName:Ki,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:$t,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$t,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$t,rev:$t,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$t,requiredFeatures:$t,requiredFonts:$t,requiredFormats:$t,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:$t,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$t,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$t,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:IT}),NT=xo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),BT=xo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:DT}),FT=xo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),CU={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},PU=/[A-Z]/g,r1=/-[a-z]/g,TU=/^data[-\w.:]+$/i;function EU(e,t){const n=Hp(t);let r=t,i=Bt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&TU.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(r1,AU);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!r1.test(s)){let o=s.replace(PU,jU);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=my}return new i(r,t)}function jU(e){return"-"+e.toLowerCase()}function AU(e){return e.charAt(1).toUpperCase()}const RU=LT([MT,kU,NT,BT,FT],"html"),gy=LT([MT,_U,NT,BT,FT],"svg");function LU(e){return e.join(" ").trim()}var yy={},i1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,MU=/\n/g,IU=/^\s*/,DU=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,NU=/^:\s*/,BU=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,FU=/^[;\s]*/,VU=/^\s+|\s+$/g,$U=`
81
+ `,s1="/",o1="*",Ti="",zU="comment",OU="declaration";function UU(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var y=p.match(MU);y&&(n+=y.length);var x=p.lastIndexOf($U);r=~x?p.length-x:r+p.length}function s(){var p={line:n,column:r};return function(y){return y.position=new o(p),u(),y}}function o(p){this.start=p,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(p){var y=new Error(t.source+":"+n+":"+r+": "+p);if(y.reason=p,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function l(p){var y=p.exec(e);if(y){var x=y[0];return i(x),e=e.slice(x.length),y}}function u(){l(IU)}function c(p){var y;for(p=p||[];y=d();)y!==!1&&p.push(y);return p}function d(){var p=s();if(!(s1!=e.charAt(0)||o1!=e.charAt(1))){for(var y=2;Ti!=e.charAt(y)&&(o1!=e.charAt(y)||s1!=e.charAt(y+1));)++y;if(y+=2,Ti===e.charAt(y-1))return a("End of comment missing");var x=e.slice(2,y-2);return r+=2,i(x),e=e.slice(y),r+=2,p({type:zU,comment:x})}}function h(){var p=s(),y=l(DU);if(y){if(d(),!l(NU))return a("property missing ':'");var x=l(BU),m=p({type:OU,property:a1(y[0].replace(i1,Ti)),value:x?a1(x[0].replace(i1,Ti)):Ti});return l(FU),m}}function f(){var p=[];c(p);for(var y;y=h();)y!==!1&&(p.push(y),c(p));return p}return u(),f()}function a1(e){return e?e.replace(VU,Ti):Ti}var WU=UU,HU=Ru&&Ru.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yy,"__esModule",{value:!0});yy.default=GU;const KU=HU(WU);function GU(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,KU.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}var yd={};Object.defineProperty(yd,"__esModule",{value:!0});yd.camelCase=void 0;var YU=/^--[a-zA-Z0-9_-]+$/,XU=/-([a-z])/g,QU=/^[^-]+$/,qU=/^-(webkit|moz|ms|o|khtml)-/,ZU=/^-(ms)-/,JU=function(e){return!e||QU.test(e)||YU.test(e)},eW=function(e,t){return t.toUpperCase()},l1=function(e,t){return"".concat(t,"-")},tW=function(e,t){return t===void 0&&(t={}),JU(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(ZU,l1):e=e.replace(qU,l1),e.replace(XU,eW))};yd.camelCase=tW;var nW=Ru&&Ru.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rW=nW(yy),iW=yd;function Yp(e,t){var n={};return!e||typeof e!="string"||(0,rW.default)(e,function(r,i){r&&i&&(n[(0,iW.camelCase)(r,t)]=i)}),n}Yp.default=Yp;var sW=Yp;const oW=Dc(sW),VT=$T("end"),vy=$T("start");function $T(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function aW(e){const t=vy(e),n=VT(e);if(t&&n)return{start:t,end:n}}function da(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?u1(e.position):"start"in e||"end"in e?u1(e):"line"in e||"column"in e?Xp(e):""}function Xp(e){return c1(e&&e.line)+":"+c1(e&&e.column)}function u1(e){return Xp(e&&e.start)+"-"+Xp(e&&e.end)}function c1(e){return e&&typeof e=="number"?e:1}class yt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=da(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}yt.prototype.file="";yt.prototype.name="";yt.prototype.reason="";yt.prototype.message="";yt.prototype.stack="";yt.prototype.column=void 0;yt.prototype.line=void 0;yt.prototype.ancestors=void 0;yt.prototype.cause=void 0;yt.prototype.fatal=void 0;yt.prototype.place=void 0;yt.prototype.ruleId=void 0;yt.prototype.source=void 0;const xy={}.hasOwnProperty,lW=new Map,uW=/[A-Z]/g,cW=new Set(["table","tbody","thead","tfoot","tr"]),dW=new Set(["td","th"]),zT="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hW(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=wW(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=xW(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?gy:RU,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=OT(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function OT(e,t,n){if(t.type==="element")return fW(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pW(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return gW(e,t,n);if(t.type==="mdxjsEsm")return mW(e,t);if(t.type==="root")return yW(e,t,n);if(t.type==="text")return vW(e,t)}function fW(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=gy,e.schema=i),e.ancestors.push(t);const s=WT(e,t.tagName,!1),o=SW(e,t);let a=Sy(e,t);return cW.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!SU(l):!0})),UT(e,o,s,t),wy(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function pW(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ua(e,t.position)}function mW(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ua(e,t.position)}function gW(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=gy,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:WT(e,t.name,!0),o=bW(e,t),a=Sy(e,t);return UT(e,o,s,t),wy(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function yW(e,t,n){const r={};return wy(r,Sy(e,t)),e.create(t,e.Fragment,r,n)}function vW(e,t){return t.value}function UT(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function wy(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function xW(e,t,n){return r;function r(i,s,o,a){const u=Array.isArray(o.children)?n:t;return a?u(s,o,a):u(s,o)}}function wW(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=vy(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function SW(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&xy.call(t.properties,i)){const s=kW(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&dW.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function bW(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ua(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else Ua(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Sy(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:lW;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;o=l+"-"+u,i.set(l,u+1)}}const a=OT(e,s,o);a!==void 0&&n.push(a)}return n}function kW(e,t,n){const r=EU(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?gU(n):LU(n)),r.property==="style"){let i=typeof n=="object"?n:_W(e,String(n));return e.stylePropertyNameCase==="css"&&(i=CW(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?CU[r.property]||r.property:r.attribute,n]}}function _W(e,t){try{return oW(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new yt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=zT+"#cannot-parse-style-attribute",i}}function WT(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const a=e1(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=e1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return xy.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ua(e)}function Ua(e,t){const n=new yt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=zT+"#cannot-handle-mdx-estrees-without-createevaluater",n}function CW(e){const t={};let n;for(n in e)xy.call(e,n)&&(t[PW(n)]=e[n]);return t}function PW(e){let t=e.replace(uW,TW);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function TW(e){return"-"+e.toLowerCase()}const Bh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},EW={};function jW(e,t){const n=EW,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return HT(e,r,i)}function HT(e,t,n){if(AW(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return d1(e.children,t,n)}return Array.isArray(e)?d1(e,t,n):""}function d1(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=HT(e[i],t,n);return r.join("")}function AW(e){return!!(e&&typeof e=="object")}const h1=document.createElement("i");function by(e){const t="&"+e+";";h1.innerHTML=t;const n=h1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Jn(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function rn(e,t){return e.length>0?(Jn(e,e.length,0,t),e):t}const f1={}.hasOwnProperty;function RW(e){const t={};let n=-1;for(;++n<e.length;)LW(t,e[n]);return t}function LW(e,t){let n;for(n in t){const i=(f1.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){f1.call(i,o)||(i[o]=[]);const a=s[o];MW(i[o],Array.isArray(a)?a:a?[a]:[])}}}function MW(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Jn(e,0,0,r)}function KT(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Hs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hn=mi(/[A-Za-z]/),Wt=mi(/[\dA-Za-z]/),IW=mi(/[#-'*+\--9=?A-Z^-~]/);function Qp(e){return e!==null&&(e<32||e===127)}const qp=mi(/\d/),DW=mi(/[\dA-Fa-f]/),NW=mi(/[!-/:-@[-`{-~]/);function ee(e){return e!==null&&e<-2}function Dt(e){return e!==null&&(e<0||e===32)}function fe(e){return e===-2||e===-1||e===32}const BW=mi(new RegExp("\\p{P}|\\p{S}","u")),FW=mi(/\s/);function mi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function wo(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Wt(e.charCodeAt(n+1))&&Wt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ce(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return fe(l)?(e.enter(n),a(l)):t(l)}function a(l){return fe(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const VW={tokenize:$W};function $W(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ce(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return ee(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const zW={tokenize:OW},p1={tokenize:UW};function OW(e){const t=this,n=[];let r=0,i,s,o;return a;function a(w){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const b=t.events.length;let _=b,S;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){S=t.events[_][1].end;break}m(r);let P=b;for(;P<t.events.length;)t.events[P][1].end={...S},P++;return Jn(t.events,_+1,0,t.events.slice(b)),t.events.length=P,u(w)}return a(w)}function u(w){if(r===n.length){if(!i)return h(w);if(i.currentConstruct&&i.currentConstruct.concrete)return p(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(p1,c,d)(w)}function c(w){return i&&v(),m(r),h(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,p(w)}function h(w){return t.containerState={},e.attempt(p1,f,p)(w)}function f(w){return r++,n.push([t.currentConstruct,t.containerState]),h(w)}function p(w){if(w===null){i&&v(),m(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),y(w)}function y(w){if(w===null){x(e.exit("chunkFlow"),!0),m(0),e.consume(w);return}return ee(w)?(e.consume(w),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(w),y)}function x(w,b){const _=t.sliceStream(w);if(b&&_.push(null),w.previous=s,s&&(s.next=w),s=w,i.defineSkip(w.start),i.write(_),t.parser.lazy[w.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<o&&(!i.events[S][1].end||i.events[S][1].end.offset>o))return;const P=t.events.length;let T=P,j,E;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(j){E=t.events[T][1].end;break}j=!0}for(m(r),S=P;S<t.events.length;)t.events[S][1].end={...E},S++;Jn(t.events,T+1,0,t.events.slice(P)),t.events.length=S}}function m(w){let b=n.length;for(;b-- >w;){const _=n[b];t.containerState=_[1],_[0].exit.call(t,e)}n.length=w}function v(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function UW(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function m1(e){if(e===null||Dt(e)||FW(e))return 1;if(BW(e))return 2}function ky(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Zp={name:"attention",resolveAll:WW,tokenize:HW};function WW(e,t){let n=-1,r,i,s,o,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};g1(d,-l),g1(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=rn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=rn(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),u=rn(u,ky(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=rn(u,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=rn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Jn(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function HW(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=m1(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const u=e.exit("attentionSequence"),c=m1(l),d=!c||c===2&&i||n.includes(l),h=!i||i===2&&c||n.includes(r);return u._open=!!(s===42?d:d&&(i||!h)),u._close=!!(s===42?h:h&&(c||!d)),t(l)}}function g1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const KW={name:"autolink",tokenize:GW};function GW(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return Hn(f)?(e.consume(f),o):f===64?n(f):u(f)}function o(f){return f===43||f===45||f===46||Wt(f)?(r=1,a(f)):u(f)}function a(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Wt(f))&&r++<32?(e.consume(f),a):(r=0,u(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Qp(f)?n(f):(e.consume(f),l)}function u(f){return f===64?(e.consume(f),c):IW(f)?(e.consume(f),u):n(f)}function c(f){return Wt(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||Wt(f))&&r++<63){const p=f===45?h:d;return e.consume(f),p}return n(f)}}const vd={partial:!0,tokenize:YW};function YW(e,t,n){return r;function r(s){return fe(s)?Ce(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||ee(s)?t(s):n(s)}}const GT={continuation:{tokenize:QW},exit:qW,name:"blockQuote",tokenize:XW};function XW(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return fe(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function QW(e,t,n){const r=this;return i;function i(o){return fe(o)?Ce(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(GT,t,n)(o)}}function qW(e){e.exit("blockQuote")}const YT={name:"characterEscape",tokenize:ZW};function ZW(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return NW(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const XT={name:"characterReference",tokenize:JW};function JW(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,o=Wt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=DW,c):(e.enter("characterReferenceValue"),s=7,o=qp,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Wt&&!by(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),c):n(d)}}const y1={partial:!0,tokenize:t8},v1={concrete:!0,name:"codeFenced",tokenize:e8};function e8(e,t,n){const r=this,i={partial:!0,tokenize:_};let s=0,o=0,a;return l;function l(S){return u(S)}function u(S){const P=r.events[r.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(o++,e.consume(S),c):o<3?n(S):(e.exit("codeFencedFenceSequence"),fe(S)?Ce(e,d,"whitespace")(S):d(S))}function d(S){return S===null||ee(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(y1,y,b)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||ee(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):fe(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ce(e,f,"whitespace")(S)):S===96&&S===a?n(S):(e.consume(S),h)}function f(S){return S===null||ee(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||ee(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===a?n(S):(e.consume(S),p)}function y(S){return e.attempt(i,b,x)(S)}function x(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),m}function m(S){return s>0&&fe(S)?Ce(e,v,"linePrefix",s+1)(S):v(S)}function v(S){return S===null||ee(S)?e.check(y1,y,b)(S):(e.enter("codeFlowValue"),w(S))}function w(S){return S===null||ee(S)?(e.exit("codeFlowValue"),v(S)):(e.consume(S),w)}function b(S){return e.exit("codeFenced"),t(S)}function _(S,P,T){let j=0;return E;function E(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),L}function L(F){return S.enter("codeFencedFence"),fe(F)?Ce(S,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):M(F)}function M(F){return F===a?(S.enter("codeFencedFenceSequence"),$(F)):T(F)}function $(F){return F===a?(j++,S.consume(F),$):j>=o?(S.exit("codeFencedFenceSequence"),fe(F)?Ce(S,B,"whitespace")(F):B(F)):T(F)}function B(F){return F===null||ee(F)?(S.exit("codeFencedFence"),P(F)):T(F)}}}function t8(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Fh={name:"codeIndented",tokenize:r8},n8={partial:!0,tokenize:i8};function r8(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ce(e,s,"linePrefix",5)(u)}function s(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):ee(u)?e.attempt(n8,o,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||ee(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function i8(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):ee(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Ce(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):ee(o)?i(o):n(o)}}const s8={name:"codeText",previous:a8,resolve:o8,tokenize:l8};function o8(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function a8(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function l8(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,c(d)):ee(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||ee(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}class u8{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Vo(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Vo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Vo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Vo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Vo(this.left,n.reverse())}}}function Vo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function QT(e){const t={};let n=-1,r,i,s,o,a,l,u;const c=new u8(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,c8(c,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=c.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return Jn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function c8(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],u={};let c,d,h=-1,f=n,p=0,y=0;const x=[y];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(y=h+1,x.push(y),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):x.pop(),h=x.length;h--;){const m=a.slice(x[h],x[h+1]),v=s.pop();l.push([v,v+m.length-1]),e.splice(v,2,m)}for(l.reverse(),h=-1;++h<l.length;)u[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return u}const d8={resolve:f8,tokenize:p8},h8={partial:!0,tokenize:m8};function f8(e){return QT(e),e}function p8(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):ee(a)?e.check(h8,o,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function m8(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ce(e,s,"linePrefix")}function s(o){if(o===null||ee(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function qT(e,t,n,r,i,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(m){return m===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(m),e.exit(s),h):m===null||m===32||m===41||Qp(m)?n(m):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(m))}function h(m){return m===62?(e.enter(s),e.consume(m),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===62?(e.exit("chunkString"),e.exit(a),h(m)):m===null||m===60||ee(m)?n(m):(e.consume(m),m===92?p:f)}function p(m){return m===60||m===62||m===92?(e.consume(m),f):f(m)}function y(m){return!c&&(m===null||m===41||Dt(m))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(m)):c<u&&m===40?(e.consume(m),c++,y):m===41?(e.consume(m),c--,y):m===null||m===32||m===40||Qp(m)?n(m):(e.consume(m),m===92?x:y)}function x(m){return m===40||m===41||m===92?(e.consume(m),y):y(m)}}function ZT(e,t,n,r,i,s){const o=this;let a=0,l;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(s),c}function c(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):ee(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||ee(f)||a++>999?(e.exit("chunkString"),c(f)):(e.consume(f),l||(l=!fe(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function JT(e,t,n,r,i,s){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),u(h))}function u(h){return h===o?(e.exit(s),l(o)):h===null?n(h):ee(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ce(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===o||h===null||ee(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:c)}function d(h){return h===o||h===92?(e.consume(h),c):c(h)}}function ha(e,t){let n;return r;function r(i){return ee(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):fe(i)?Ce(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const g8={name:"definition",tokenize:v8},y8={partial:!0,tokenize:x8};function v8(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),o(f)}function o(f){return ZT.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Hs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return Dt(f)?ha(e,u)(f):u(f)}function u(f){return qT(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(y8,d,d)(f)}function d(f){return fe(f)?Ce(e,h,"whitespace")(f):h(f)}function h(f){return f===null||ee(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function x8(e,t,n){return r;function r(a){return Dt(a)?ha(e,i)(a):n(a)}function i(a){return JT(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return fe(a)?Ce(e,o,"whitespace")(a):o(a)}function o(a){return a===null||ee(a)?t(a):n(a)}}const w8={name:"hardBreakEscape",tokenize:S8};function S8(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return ee(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const b8={name:"headingAtx",resolve:k8,tokenize:_8};function k8(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Jn(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function _8(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||Dt(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||ee(c)?(e.exit("atxHeading"),t(c)):fe(c)?Ce(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||Dt(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const C8=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],x1=["pre","script","style","textarea"],P8={concrete:!0,name:"htmlFlow",resolveTo:j8,tokenize:A8},T8={partial:!0,tokenize:L8},E8={partial:!0,tokenize:R8};function j8(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function A8(e,t,n){const r=this;let i,s,o,a,l;return u;function u(A){return c(A)}function c(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),d}function d(A){return A===33?(e.consume(A),h):A===47?(e.consume(A),s=!0,y):A===63?(e.consume(A),i=3,r.interrupt?t:k):Hn(A)?(e.consume(A),o=String.fromCharCode(A),x):n(A)}function h(A){return A===45?(e.consume(A),i=2,f):A===91?(e.consume(A),i=5,a=0,p):Hn(A)?(e.consume(A),i=4,r.interrupt?t:k):n(A)}function f(A){return A===45?(e.consume(A),r.interrupt?t:k):n(A)}function p(A){const ue="CDATA[";return A===ue.charCodeAt(a++)?(e.consume(A),a===ue.length?r.interrupt?t:M:p):n(A)}function y(A){return Hn(A)?(e.consume(A),o=String.fromCharCode(A),x):n(A)}function x(A){if(A===null||A===47||A===62||Dt(A)){const ue=A===47,pe=o.toLowerCase();return!ue&&!s&&x1.includes(pe)?(i=1,r.interrupt?t(A):M(A)):C8.includes(o.toLowerCase())?(i=6,ue?(e.consume(A),m):r.interrupt?t(A):M(A)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):s?v(A):w(A))}return A===45||Wt(A)?(e.consume(A),o+=String.fromCharCode(A),x):n(A)}function m(A){return A===62?(e.consume(A),r.interrupt?t:M):n(A)}function v(A){return fe(A)?(e.consume(A),v):E(A)}function w(A){return A===47?(e.consume(A),E):A===58||A===95||Hn(A)?(e.consume(A),b):fe(A)?(e.consume(A),w):E(A)}function b(A){return A===45||A===46||A===58||A===95||Wt(A)?(e.consume(A),b):_(A)}function _(A){return A===61?(e.consume(A),S):fe(A)?(e.consume(A),_):w(A)}function S(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),l=A,P):fe(A)?(e.consume(A),S):T(A)}function P(A){return A===l?(e.consume(A),l=null,j):A===null||ee(A)?n(A):(e.consume(A),P)}function T(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Dt(A)?_(A):(e.consume(A),T)}function j(A){return A===47||A===62||fe(A)?w(A):n(A)}function E(A){return A===62?(e.consume(A),L):n(A)}function L(A){return A===null||ee(A)?M(A):fe(A)?(e.consume(A),L):n(A)}function M(A){return A===45&&i===2?(e.consume(A),V):A===60&&i===1?(e.consume(A),W):A===62&&i===4?(e.consume(A),U):A===63&&i===3?(e.consume(A),k):A===93&&i===5?(e.consume(A),z):ee(A)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(T8,Z,$)(A)):A===null||ee(A)?(e.exit("htmlFlowData"),$(A)):(e.consume(A),M)}function $(A){return e.check(E8,B,Z)(A)}function B(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),F}function F(A){return A===null||ee(A)?$(A):(e.enter("htmlFlowData"),M(A))}function V(A){return A===45?(e.consume(A),k):M(A)}function W(A){return A===47?(e.consume(A),o="",D):M(A)}function D(A){if(A===62){const ue=o.toLowerCase();return x1.includes(ue)?(e.consume(A),U):M(A)}return Hn(A)&&o.length<8?(e.consume(A),o+=String.fromCharCode(A),D):M(A)}function z(A){return A===93?(e.consume(A),k):M(A)}function k(A){return A===62?(e.consume(A),U):A===45&&i===2?(e.consume(A),k):M(A)}function U(A){return A===null||ee(A)?(e.exit("htmlFlowData"),Z(A)):(e.consume(A),U)}function Z(A){return e.exit("htmlFlow"),t(A)}}function R8(e,t,n){const r=this;return i;function i(o){return ee(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function L8(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(vd,t,n)}}const M8={name:"htmlText",tokenize:I8};function I8(e,t,n){const r=this;let i,s,o;return a;function a(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),_):k===63?(e.consume(k),w):Hn(k)?(e.consume(k),T):n(k)}function u(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),s=0,p):Hn(k)?(e.consume(k),v):n(k)}function c(k){return k===45?(e.consume(k),f):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),h):ee(k)?(o=d,W(k)):(e.consume(k),d)}function h(k){return k===45?(e.consume(k),f):d(k)}function f(k){return k===62?V(k):k===45?h(k):d(k)}function p(k){const U="CDATA[";return k===U.charCodeAt(s++)?(e.consume(k),s===U.length?y:p):n(k)}function y(k){return k===null?n(k):k===93?(e.consume(k),x):ee(k)?(o=y,W(k)):(e.consume(k),y)}function x(k){return k===93?(e.consume(k),m):y(k)}function m(k){return k===62?V(k):k===93?(e.consume(k),m):y(k)}function v(k){return k===null||k===62?V(k):ee(k)?(o=v,W(k)):(e.consume(k),v)}function w(k){return k===null?n(k):k===63?(e.consume(k),b):ee(k)?(o=w,W(k)):(e.consume(k),w)}function b(k){return k===62?V(k):w(k)}function _(k){return Hn(k)?(e.consume(k),S):n(k)}function S(k){return k===45||Wt(k)?(e.consume(k),S):P(k)}function P(k){return ee(k)?(o=P,W(k)):fe(k)?(e.consume(k),P):V(k)}function T(k){return k===45||Wt(k)?(e.consume(k),T):k===47||k===62||Dt(k)?j(k):n(k)}function j(k){return k===47?(e.consume(k),V):k===58||k===95||Hn(k)?(e.consume(k),E):ee(k)?(o=j,W(k)):fe(k)?(e.consume(k),j):V(k)}function E(k){return k===45||k===46||k===58||k===95||Wt(k)?(e.consume(k),E):L(k)}function L(k){return k===61?(e.consume(k),M):ee(k)?(o=L,W(k)):fe(k)?(e.consume(k),L):j(k)}function M(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,$):ee(k)?(o=M,W(k)):fe(k)?(e.consume(k),M):(e.consume(k),B)}function $(k){return k===i?(e.consume(k),i=void 0,F):k===null?n(k):ee(k)?(o=$,W(k)):(e.consume(k),$)}function B(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||Dt(k)?j(k):(e.consume(k),B)}function F(k){return k===47||k===62||Dt(k)?j(k):n(k)}function V(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function W(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),D}function D(k){return fe(k)?Ce(e,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):z(k)}function z(k){return e.enter("htmlTextData"),o(k)}}const _y={name:"labelEnd",resolveAll:F8,resolveTo:V8,tokenize:$8},D8={tokenize:z8},N8={tokenize:O8},B8={tokenize:U8};function F8(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Jn(e,0,e.length,n),e}function V8(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=rn(a,e.slice(s+1,s+r+3)),a=rn(a,[["enter",c,t]]),a=rn(a,ky(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=rn(a,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),a=rn(a,e.slice(o+1)),a=rn(a,[["exit",l,t]]),Jn(e,s,e.length,a),e}function $8(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(h){return s?s._inactive?d(h):(o=r.parser.defined.includes(Hs(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(D8,c,o?c:d)(h):h===91?e.attempt(N8,c,o?u:d)(h):o?c(h):d(h)}function u(h){return e.attempt(B8,c,d)(h)}function c(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function z8(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Dt(d)?ha(e,s)(d):s(d)}function s(d){return d===41?c(d):qT(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Dt(d)?ha(e,l)(d):c(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?JT(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Dt(d)?ha(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function O8(e,t,n){const r=this;return i;function i(a){return ZT.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(Hs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function U8(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const W8={name:"labelStartImage",resolveAll:_y.resolveAll,tokenize:H8};function H8(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const K8={name:"labelStartLink",resolveAll:_y.resolveAll,tokenize:G8};function G8(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Vh={name:"lineEnding",tokenize:Y8};function Y8(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ce(e,t,"linePrefix")}}const Eu={name:"thematicBreak",tokenize:X8};function X8(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||ee(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),fe(u)?Ce(e,a,"whitespace")(u):a(u))}}const Tt={continuation:{tokenize:J8},exit:tH,name:"list",tokenize:Z8},Q8={partial:!0,tokenize:nH},q8={partial:!0,tokenize:eH};function Z8(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(f){const p=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:qp(f)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Eu,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return qp(f)&&++o<10?(e.consume(f),l):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(vd,r.interrupt?n:c,e.attempt(Q8,h,d))}function c(f){return r.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return fe(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function J8(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(vd,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!fe(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(q8,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(e,e.attempt(Tt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function eH(e,t,n){const r=this;return Ce(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function tH(e){e.exit(this.containerState.type)}function nH(e,t,n){const r=this;return Ce(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!fe(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const w1={name:"setextUnderline",resolveTo:rH,tokenize:iH};function rH(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function iH(e,t,n){const r=this;let i;return s;function s(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),fe(u)?Ce(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ee(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const sH={tokenize:oH};function oH(e){const t=this,n=e.attempt(vd,r,e.attempt(this.parser.constructs.flowInitial,i,Ce(e,e.attempt(this.parser.constructs.flow,i,e.attempt(d8,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const aH={resolveAll:tE()},lH=eE("string"),uH=eE("text");function eE(e){return{resolveAll:tE(e==="text"?cH:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=i[c];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function tE(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function cH(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)l=!0,a++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const dH={42:Tt,43:Tt,45:Tt,48:Tt,49:Tt,50:Tt,51:Tt,52:Tt,53:Tt,54:Tt,55:Tt,56:Tt,57:Tt,62:GT},hH={91:g8},fH={[-2]:Fh,[-1]:Fh,32:Fh},pH={35:b8,42:Eu,45:[w1,Eu],60:P8,61:w1,95:Eu,96:v1,126:v1},mH={38:XT,92:YT},gH={[-5]:Vh,[-4]:Vh,[-3]:Vh,33:W8,38:XT,42:Zp,60:[KW,M8],91:K8,92:[w8,YT],93:_y,95:Zp,96:s8},yH={null:[Zp,aH]},vH={null:[42,95]},xH={null:[]},wH=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:vH,contentInitial:hH,disable:xH,document:dH,flow:pH,flowInitial:fH,insideSpan:yH,string:mH,text:gH},Symbol.toStringTag,{value:"Module"}));function SH(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:P(_),check:P(S),consume:v,enter:w,exit:b,interrupt:P(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function d(L){return o=rn(o,L),x(),o[o.length-1]!==null?[]:(T(t,0),u.events=ky(s,u.events,u),u.events)}function h(L,M){return kH(f(L),M)}function f(L){return bH(o,L)}function p(){const{_bufferIndex:L,_index:M,line:$,column:B,offset:F}=r;return{_bufferIndex:L,_index:M,line:$,column:B,offset:F}}function y(L){i[L.line]=L.column,E()}function x(){let L;for(;r._index<o.length;){const M=o[r._index];if(typeof M=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<M.length;)m(M.charCodeAt(r._bufferIndex));else m(M)}}function m(L){c=c(L)}function v(L){ee(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,E()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=L}function w(L,M){const $=M||{};return $.type=L,$.start=p(),u.events.push(["enter",$,u]),a.push($),$}function b(L){const M=a.pop();return M.end=p(),u.events.push(["exit",M,u]),M}function _(L,M){T(L,M.from)}function S(L,M){M.restore()}function P(L,M){return $;function $(B,F,V){let W,D,z,k;return Array.isArray(B)?Z(B):"tokenize"in B?Z([B]):U(B);function U(he){return tt;function tt(Ne){const Pe=Ne!==null&&he[Ne],me=Ne!==null&&he.null,Ft=[...Array.isArray(Pe)?Pe:Pe?[Pe]:[],...Array.isArray(me)?me:me?[me]:[]];return Z(Ft)(Ne)}}function Z(he){return W=he,D=0,he.length===0?V:A(he[D])}function A(he){return tt;function tt(Ne){return k=j(),z=he,he.partial||(u.currentConstruct=he),he.name&&u.parser.constructs.disable.null.includes(he.name)?pe():he.tokenize.call(M?Object.assign(Object.create(u),M):u,l,ue,pe)(Ne)}}function ue(he){return L(z,k),F}function pe(he){return k.restore(),++D<W.length?A(W[D]):V}}}function T(L,M){L.resolveAll&&!s.includes(L)&&s.push(L),L.resolve&&Jn(u.events,M,u.events.length-M,L.resolve(u.events.slice(M),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function j(){const L=p(),M=u.previous,$=u.currentConstruct,B=u.events.length,F=Array.from(a);return{from:B,restore:V};function V(){r=L,u.previous=M,u.currentConstruct=$,u.events.length=B,a=F,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function bH(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function kH(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
82
+ `;break}case-3:{o=`\r
83
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function _H(e){const r={constructs:RW([wH,...(e||{}).extensions||[]]),content:i(VW),defined:[],document:i(zW),flow:i(sH),lazy:{},string:i(lH),text:i(uH)};return r;function i(s){return o;function o(a){return SH(r,s,a)}}}function CH(e){for(;!QT(e););return e}const S1=/[\0\t\n\r]/g;function PH(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let u,c,d,h,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(S1.lastIndex=d,u=S1.exec(s),h=u&&u.index!==void 0?u.index:s.length,f=s.charCodeAt(h),!u){t=s.slice(d);break}if(f===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),f){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const TH=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function EH(e){return e.replace(TH,jH)}function jH(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return KT(n.slice(s?2:1),s?16:10)}return by(n)||e}const nE={}.hasOwnProperty;function AH(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),RH(n)(CH(_H(n).document().write(PH()(e,t,!0))))}function RH(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(xr),autolinkProtocol:j,autolinkEmail:j,atxHeading:s(ss),blockQuote:s(me),characterEscape:j,characterReference:j,codeFenced:s(Ft),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Ft,o),codeText:s(mn,o),codeTextData:j,data:j,codeFlowValue:j,definition:s(Ln),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(vr),hardBreakEscape:s(gi),hardBreakTrailing:s(gi),htmlFlow:s(yi,o),htmlFlowData:j,htmlText:s(yi,o),htmlTextData:j,image:s(Mn),label:o,link:s(xr),listItem:s(Ye),listItemValue:h,listOrdered:s(O,d),listUnordered:s(O),paragraph:s(Xe),reference:A,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(ss),strong:s(vi),thematicBreak:s(oe)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:Pe,autolinkProtocol:Ne,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:he,characterReference:tt,codeFenced:l(x),codeFencedFence:y,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:E,codeIndented:l(m),codeText:l(F),codeTextData:E,data:E,definition:l(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l($),htmlFlowData:E,htmlText:l(B),htmlTextData:E,image:l(W),label:z,labelText:D,lineEnding:L,link:l(V),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ue,resourceDestinationString:k,resourceTitleString:U,resource:Z,setextHeading:l(T),setextHeadingLineSequence:P,setextHeadingText:S,strong:l(),thematicBreak:l()}};rE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let H={type:"root",children:[]};const J={stack:[H],tokenStack:[],config:t,enter:a,exit:u,buffer:o,resume:c,data:n},re=[];let ge=-1;for(;++ge<N.length;)if(N[ge][1].type==="listOrdered"||N[ge][1].type==="listUnordered")if(N[ge][0]==="enter")re.push(ge);else{const Pt=re.pop();ge=i(N,Pt,ge)}for(ge=-1;++ge<N.length;){const Pt=t[N[ge][0]];nE.call(Pt,N[ge][1].type)&&Pt[N[ge][1].type].call(Object.assign({sliceSerialize:N[ge][2].sliceSerialize},J),N[ge][1])}if(J.tokenStack.length>0){const Pt=J.tokenStack[J.tokenStack.length-1];(Pt[1]||b1).call(J,void 0,Pt[0])}for(H.position={start:Ar(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:Ar(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},ge=-1;++ge<t.transforms.length;)H=t.transforms[ge](H)||H;return H}function i(N,H,J){let re=H-1,ge=-1,Pt=!1,In,Zt,wr,Qe;for(;++re<=J;){const ze=N[re];switch(ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ze[0]==="enter"?ge++:ge--,Qe=void 0;break}case"lineEndingBlank":{ze[0]==="enter"&&(In&&!Qe&&!ge&&!wr&&(wr=re),Qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qe=void 0}if(!ge&&ze[0]==="enter"&&ze[1].type==="listItemPrefix"||ge===-1&&ze[0]==="exit"&&(ze[1].type==="listUnordered"||ze[1].type==="listOrdered")){if(In){let er=re;for(Zt=void 0;er--;){const Jt=N[er];if(Jt[1].type==="lineEnding"||Jt[1].type==="lineEndingBlank"){if(Jt[0]==="exit")continue;Zt&&(N[Zt][1].type="lineEndingBlank",Pt=!0),Jt[1].type="lineEnding",Zt=er}else if(!(Jt[1].type==="linePrefix"||Jt[1].type==="blockQuotePrefix"||Jt[1].type==="blockQuotePrefixWhitespace"||Jt[1].type==="blockQuoteMarker"||Jt[1].type==="listItemIndent"))break}wr&&(!Zt||wr<Zt)&&(In._spread=!0),In.end=Object.assign({},Zt?N[Zt][1].start:ze[1].end),N.splice(Zt||re,0,["exit",In,ze[2]]),re++,J++}if(ze[1].type==="listItemPrefix"){const er={type:"listItem",_spread:!1,start:Object.assign({},ze[1].start),end:void 0};In=er,N.splice(re,0,["enter",er,ze[2]]),re++,J++,wr=void 0,Qe=!0}}}return N[H][1]._spread=Pt,J}function s(N,H){return J;function J(re){a.call(this,N(re),re),H&&H.call(this,re)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(N,H,J){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([H,J||void 0]),N.position={start:Ar(H.start),end:void 0}}function l(N){return H;function H(J){N&&N.call(this,J),u.call(this,J)}}function u(N,H){const J=this.stack.pop(),re=this.tokenStack.pop();if(re)re[0].type!==N.type&&(H?H.call(this,N,re[0]):(re[1]||b1).call(this,N,re[0]));else throw new Error("Cannot close `"+N.type+"` ("+da({start:N.start,end:N.end})+"): it’s not open");J.position.end=Ar(N.end)}function c(){return jW(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(N){if(this.data.expectingFirstListItemValue){const H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function f(){const N=this.resume(),H=this.stack[this.stack.length-1];H.lang=N}function p(){const N=this.resume(),H=this.stack[this.stack.length-1];H.meta=N}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const N=this.resume(),H=this.stack[this.stack.length-1];H.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const N=this.resume(),H=this.stack[this.stack.length-1];H.value=N.replace(/(\r?\n|\r)$/g,"")}function v(N){const H=this.resume(),J=this.stack[this.stack.length-1];J.label=H,J.identifier=Hs(this.sliceSerialize(N)).toLowerCase()}function w(){const N=this.resume(),H=this.stack[this.stack.length-1];H.title=N}function b(){const N=this.resume(),H=this.stack[this.stack.length-1];H.url=N}function _(N){const H=this.stack[this.stack.length-1];if(!H.depth){const J=this.sliceSerialize(N).length;H.depth=J}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function P(N){const H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function j(N){const J=this.stack[this.stack.length-1].children;let re=J[J.length-1];(!re||re.type!=="text")&&(re=qt(),re.position={start:Ar(N.start),end:void 0},J.push(re)),this.stack.push(re)}function E(N){const H=this.stack.pop();H.value+=this.sliceSerialize(N),H.position.end=Ar(N.end)}function L(N){const H=this.stack[this.stack.length-1];if(this.data.atHardBreak){const J=H.children[H.children.length-1];J.position.end=Ar(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(j.call(this,N),E.call(this,N))}function M(){this.data.atHardBreak=!0}function $(){const N=this.resume(),H=this.stack[this.stack.length-1];H.value=N}function B(){const N=this.resume(),H=this.stack[this.stack.length-1];H.value=N}function F(){const N=this.resume(),H=this.stack[this.stack.length-1];H.value=N}function V(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=H,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function W(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=H,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function D(N){const H=this.sliceSerialize(N),J=this.stack[this.stack.length-2];J.label=EH(H),J.identifier=Hs(H).toLowerCase()}function z(){const N=this.stack[this.stack.length-1],H=this.resume(),J=this.stack[this.stack.length-1];if(this.data.inReference=!0,J.type==="link"){const re=N.children;J.children=re}else J.alt=H}function k(){const N=this.resume(),H=this.stack[this.stack.length-1];H.url=N}function U(){const N=this.resume(),H=this.stack[this.stack.length-1];H.title=N}function Z(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ue(N){const H=this.resume(),J=this.stack[this.stack.length-1];J.label=H,J.identifier=Hs(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function pe(N){this.data.characterReferenceType=N.type}function he(N){const H=this.sliceSerialize(N),J=this.data.characterReferenceType;let re;J?(re=KT(H,J==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):re=by(H);const ge=this.stack[this.stack.length-1];ge.value+=re}function tt(N){const H=this.stack.pop();H.position.end=Ar(N.end)}function Ne(N){E.call(this,N);const H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(N)}function Pe(N){E.call(this,N);const H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(N)}function me(){return{type:"blockquote",children:[]}}function Ft(){return{type:"code",lang:null,meta:null,value:""}}function mn(){return{type:"inlineCode",value:""}}function Ln(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function vr(){return{type:"emphasis",children:[]}}function ss(){return{type:"heading",depth:0,children:[]}}function gi(){return{type:"break"}}function yi(){return{type:"html",value:""}}function Mn(){return{type:"image",title:null,url:"",alt:null}}function xr(){return{type:"link",title:null,url:"",children:[]}}function O(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function Ye(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function Xe(){return{type:"paragraph",children:[]}}function vi(){return{type:"strong",children:[]}}function qt(){return{type:"text",value:""}}function oe(){return{type:"thematicBreak"}}}function Ar(e){return{line:e.line,column:e.column,offset:e.offset}}function rE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?rE(e,r):LH(e,r)}}function LH(e,t){let n;for(n in t)if(nE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function b1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+da({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+da({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+da({start:t.start,end:t.end})+") is still open")}function MH(e){const t=this;t.parser=n;function n(r){return AH(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function IH(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function DH(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
84
+ `}]}function NH(e,t){const n=t.value?t.value+`
85
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function BH(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FH(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VH(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=wo(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function $H(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zH(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function iE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function OH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return iE(e,t);const i={src:wo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function UH(e,t){const n={src:wo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function WH(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function HH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return iE(e,t);const i={href:wo(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function KH(e,t){const n={href:wo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function GH(e,t,n){const r=e.all(t),i=n?YH(n):sE(t),s={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
86
+ `}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
87
+ `});const u={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,u),e.applyData(t,u)}function YH(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=sE(n[r])}return t}function sE(e){const t=e.spread;return t??e.children.length>1}function XH(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function QH(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qH(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ZH(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JH(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=vy(t.children[1]),l=VT(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function e9(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const d=t.children[l],h={},f=o?o[l]:void 0;f&&(h.align=f);let p={type:"element",tagName:s,properties:h,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),u.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function t9(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const k1=9,_1=32;function n9(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(C1(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(C1(t.slice(i),i>0,!1)),s.join("")}function C1(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===k1||s===_1;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===k1||s===_1;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function r9(e,t){const n={type:"text",value:n9(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function i9(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const s9={blockquote:IH,break:DH,code:NH,delete:BH,emphasis:FH,footnoteReference:VH,heading:$H,html:zH,imageReference:OH,image:UH,inlineCode:WH,linkReference:HH,link:KH,listItem:GH,list:XH,paragraph:QH,root:qH,strong:ZH,table:JH,tableCell:t9,tableRow:e9,text:r9,thematicBreak:i9,toml:Ol,yaml:Ol,definition:Ol,footnoteDefinition:Ol};function Ol(){}const oE=-1,xd=0,fa=1,Ac=2,Cy=3,Py=4,Ty=5,Ey=6,aE=7,lE=8,o9=typeof self=="object"?self:globalThis,P1=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new o9[e](t)},a9=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case xd:case oE:return n(o,i);case fa:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Ac:{const a=n({},i);for(const[l,u]of o)a[r(l)]=r(u);return a}case Cy:return n(new Date(o),i);case Py:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Ty:{const a=n(new Map,i);for(const[l,u]of o)a.set(r(l),r(u));return a}case Ey:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case aE:{const{name:a,message:l}=o;return n(P1(a,l),i)}case lE:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(P1(s,o),i)};return r},T1=e=>a9(new Map,e)(0),ds="",{toString:l9}={},{keys:u9}=Object,$o=e=>{const t=typeof e;if(t!=="object"||!e)return[xd,t];const n=l9.call(e).slice(8,-1);switch(n){case"Array":return[fa,ds];case"Object":return[Ac,ds];case"Date":return[Cy,ds];case"RegExp":return[Py,ds];case"Map":return[Ty,ds];case"Set":return[Ey,ds];case"DataView":return[fa,n]}return n.includes("Array")?[fa,n]:n.includes("Error")?[aE,n]:[Ac,n]},Ul=([e,t])=>e===xd&&(t==="function"||t==="symbol"),c9=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=$o(o);switch(a){case xd:{let c=o;switch(l){case"bigint":a=lE,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([oE],o)}return i([a,c],o)}case fa:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const c=[],d=i([a,c],o);for(const h of o)c.push(s(h));return d}case Ac:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const c=[],d=i([a,c],o);for(const h of u9(o))(e||!Ul($o(o[h])))&&c.push([s(h),s(o[h])]);return d}case Cy:return i([a,o.toISOString()],o);case Py:{const{source:c,flags:d}=o;return i([a,{source:c,flags:d}],o)}case Ty:{const c=[],d=i([a,c],o);for(const[h,f]of o)(e||!(Ul($o(h))||Ul($o(f))))&&c.push([s(h),s(f)]);return d}case Ey:{const c=[],d=i([a,c],o);for(const h of o)(e||!Ul($o(h)))&&c.push(s(h));return d}}const{message:u}=o;return i([a,{name:l,message:u}],o)};return s},E1=(e,{json:t,lossy:n}={})=>{const r=[];return c9(!(t||n),!!t,new Map,r)(e),r},Rc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?T1(E1(e,t)):structuredClone(e):(e,t)=>T1(E1(e,t));function d9(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function h9(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function f9(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||d9,r=e.options.footnoteBackLabel||h9,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),h=wo(d.toLowerCase());let f=0;const p=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++f<=y;){p.length>0&&p.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,f);typeof v=="string"&&(v={type:"text",value:v}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const x=c[c.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const v=x.children[x.children.length-1];v&&v.type==="text"?v.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...p)}else c.push(...p);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,m),a.push(m)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Rc(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
88
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
89
+ `}]}}const uE=function(e){if(e==null)return y9;if(typeof e=="function")return wd(e);if(typeof e=="object")return Array.isArray(e)?p9(e):m9(e);if(typeof e=="string")return g9(e);throw new Error("Expected function, string, or object as test")};function p9(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=uE(e[n]);return wd(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function m9(e){const t=e;return wd(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function g9(e){return wd(t);function t(n){return n&&n.type===e}}function wd(e){return t;function t(n,r,i){return!!(v9(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function y9(){return!0}function v9(e){return e!==null&&typeof e=="object"&&"type"in e}const cE=[],x9=!0,j1=!1,w9="skip";function S9(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=uE(i),o=r?-1:1;a(e,void 0,[])();function a(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=cE,p,y,x;if((!t||s(l,u,c[c.length-1]||void 0))&&(f=b9(n(l,c)),f[0]===j1))return f;if("children"in l&&l.children){const m=l;if(m.children&&f[0]!==w9)for(y=(r?m.children.length:-1)+o,x=c.concat(m);y>-1&&y<m.children.length;){const v=m.children[y];if(p=a(v,y,x)(),p[0]===j1)return p;y=typeof p[1]=="number"?p[1]:y+o}}return f}}}function b9(e){return Array.isArray(e)?e:typeof e=="number"?[x9,e]:e==null?cE:[e]}function dE(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),S9(e,s,a,i);function a(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return o(l,d,c)}}const Jp={}.hasOwnProperty,k9={};function _9(e,t){const n=t||k9,r=new Map,i=new Map,s=new Map,o={...s9,...n.handlers},a={all:u,applyData:P9,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:C9,wrap:E9};return dE(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:i,h=String(c.identifier).toUpperCase();d.has(h)||d.set(h,c)}}),a;function l(c,d){const h=c.type,f=a.handlers[h];if(Jp.call(a.handlers,h)&&f)return f(a,c,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in c){const{children:y,...x}=c,m=Rc(x);return m.children=a.all(c),m}return Rc(c)}return(a.options.unknownHandler||T9)(a,c,d)}function u(c){const d=[];if("children"in c){const h=c.children;let f=-1;for(;++f<h.length;){const p=a.one(h[f],c);if(p){if(f&&h[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=A1(p.value)),!Array.isArray(p)&&p.type==="element")){const y=p.children[0];y&&y.type==="text"&&(y.value=A1(y.value))}Array.isArray(p)?d.push(...p):d.push(p)}}}return d}}function C9(e,t){e.position&&(t.position=aW(e))}function P9(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Rc(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function T9(e,t){const n=t.data||{},r="value"in t&&!(Jp.call(n,"hProperties")||Jp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function E9(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
90
+ `});++r<e.length;)r&&n.push({type:"text",value:`
91
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
92
+ `}),n}function A1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function R1(e,t){const n=_9(e,t),r=n.one(e,void 0),i=f9(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
93
+ `},i),s}function j9(e,t){return e&&"run"in e?async function(n,r){const i=R1(n,{file:r,...t});await e.run(i,r)}:function(n,r){return R1(n,{file:r,...e||t})}}function L1(e){if(e)throw e}var ju=Object.prototype.hasOwnProperty,hE=Object.prototype.toString,M1=Object.defineProperty,I1=Object.getOwnPropertyDescriptor,D1=function(t){return typeof Array.isArray=="function"?Array.isArray(t):hE.call(t)==="[object Array]"},N1=function(t){if(!t||hE.call(t)!=="[object Object]")return!1;var n=ju.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ju.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ju.call(t,i)},B1=function(t,n){M1&&n.name==="__proto__"?M1(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},F1=function(t,n){if(n==="__proto__")if(ju.call(t,n)){if(I1)return I1(t,n).value}else return;return t[n]},A9=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=F1(a,n),i=F1(t,n),a!==i&&(c&&i&&(N1(i)||(s=D1(i)))?(s?(s=!1,o=r&&D1(r)?r:[]):o=r&&N1(r)?r:{},B1(a,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&B1(a,{name:n,newValue:i}));return a};const $h=Dc(A9);function em(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function R9(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...u){const c=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?L9(c,a)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function L9(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const $n={basename:M9,dirname:I9,extname:D9,join:N9,sep:"/"};function M9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');al(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function I9(e){if(al(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function D9(e){al(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function N9(...e){let t=-1,n;for(;++t<e.length;)al(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":B9(n)}function B9(e){al(e);const t=e.codePointAt(0)===47;let n=F9(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function F9(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function al(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const V9={cwd:$9};function $9(){return"/"}function tm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function z9(e){if(typeof e=="string")e=new URL(e);else if(!tm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return O9(e)}function O9(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const zh=["history","path","basename","stem","extname","dirname"];class fE{constructor(t){let n;t?tm(t)?n={path:t}:typeof t=="string"||U9(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":V9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<zh.length;){const s=zh[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)zh.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?$n.basename(this.path):void 0}set basename(t){Uh(t,"basename"),Oh(t,"basename"),this.path=$n.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$n.dirname(this.path):void 0}set dirname(t){V1(this.basename,"dirname"),this.path=$n.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$n.extname(this.path):void 0}set extname(t){if(Oh(t,"extname"),V1(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=$n.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tm(t)&&(t=z9(t)),Uh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$n.basename(this.path,this.extname):void 0}set stem(t){Uh(t,"stem"),Oh(t,"stem"),this.path=$n.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new yt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Oh(e,t){if(e&&e.includes($n.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$n.sep+"`")}function Uh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function V1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function U9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const W9=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},H9={}.hasOwnProperty;class jy extends W9{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=R9()}copy(){const t=new jy;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($h(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Kh("data",this.frozen),this.namespace[t]=n,this):H9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Wl(t),r=this.parser||this.Parser;return Wh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Wh("process",this.parser||this.Parser),Hh("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=Wl(t),l=r.parse(a);r.run(l,a,function(c,d,h){if(c||!d||!h)return u(c);const f=d,p=r.stringify(f,h);Y9(p)?h.value=p:h.result=p,u(c,h)});function u(c,d){c||!d?o(c):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Wh("processSync",this.parser||this.Parser),Hh("processSync",this.compiler||this.Compiler),this.process(t,i),z1("processSync","process",n),r;function i(s,o){n=!0,L1(s),r=o}}run(t,n,r){$1(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=Wl(n);i.run(t,l,u);function u(c,d,h){const f=d||t;c?a(c):o?o(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),z1("runSync","run",r),i;function s(o,a){L1(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=Wl(n),i=this.compiler||this.Compiler;return Hh("stringify",i),$1(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Kh("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;l(c,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=$h(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===u){h=d;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[f,...p]=c;const y=r[h][1];em(y)&&em(f)&&(f=$h(!0,y,f)),r[h]=[u,f,...p]}}}}const K9=new jy().freeze();function Wh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Hh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $1(e){if(!em(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function z1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wl(e){return G9(e)?e:new fE(e)}function G9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Y9(e){return typeof e=="string"||X9(e)}function X9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Q9="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",O1=[],U1={allowDangerousHtml:!0},q9=/^(https?|ircs?|mailto|xmpp)$/i,Z9=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function J9(e){const t=eK(e),n=tK(e);return nK(t.runSync(t.parse(n),n),e)}function eK(e){const t=e.rehypePlugins||O1,n=e.remarkPlugins||O1,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...U1}:U1;return K9().use(MH).use(n).use(j9,r).use(t)}function tK(e){const t=e.children||"",n=new fE;return typeof t=="string"&&(n.value=t),n}function nK(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||rK;for(const c of Z9)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+Q9+c.id,void 0);return dE(e,u),hW(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function u(c,d,h){if(c.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let f;for(f in Bh)if(Object.hasOwn(Bh,f)&&Object.hasOwn(c.properties,f)){const p=c.properties[f],y=Bh[f];(y===null||y.includes(c.tagName))&&(c.properties[f]=l(String(p||""),f,c))}}if(c.type==="element"){let f=n?!n.includes(c.tagName):s?s.includes(c.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(c,d,h)),f&&h&&typeof d=="number")return a&&c.children?h.children.splice(d,1,...c.children):h.children.splice(d,1),d}}}function rK(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||q9.test(e.slice(0,t))?e:""}const Gh=e=>({fontFamily:ae.serif,fontWeight:600,fontSize:e,margin:`${I[6]} 0 ${I[3]}`,lineHeight:1.25}),iK={p:({children:e})=>g.jsx("p",{style:{margin:`0 0 ${I[4]}`},children:e}),strong:({children:e})=>g.jsx("strong",{style:{fontWeight:700},children:e}),h1:({children:e})=>g.jsx("h1",{style:Gh(ve.lg),children:e}),h2:({children:e})=>g.jsx("h2",{style:Gh("1.3rem"),children:e}),h3:({children:e})=>g.jsx("h3",{style:Gh("1.1rem"),children:e}),a:({children:e,href:t})=>g.jsx("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:Ge.accentAmberDark},children:e}),code:({children:e})=>g.jsx("code",{style:{fontFamily:ae.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:3,padding:"0.1em 0.35em"},children:e}),pre:({children:e})=>g.jsx("pre",{style:{fontFamily:ae.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:6,padding:`${I[3]} ${I[4]}`,overflowX:"auto",margin:`0 0 ${I[4]}`},children:e}),ul:({children:e})=>g.jsx("ul",{style:{listStyle:"disc",margin:`0 0 ${I[4]}`,paddingLeft:"1.4rem"},children:e}),ol:({children:e})=>g.jsx("ol",{style:{listStyle:"decimal",margin:`0 0 ${I[4]}`,paddingLeft:"1.4rem"},children:e}),li:({children:e})=>g.jsx("li",{style:{marginBottom:"0.4rem"},children:e}),blockquote:({children:e})=>g.jsx("blockquote",{style:{margin:`0 0 ${I[4]}`,paddingLeft:I[4],borderLeft:"3px solid rgba(0,0,0,0.15)",opacity:.85},children:e})},ll=({children:e})=>g.jsx(J9,{components:iK,children:e}),sK=async()=>{try{const e=await fetch("/api/icon");if(!e.ok)return null;const t=await e.blob();return new Promise(n=>{const r=new FileReader;r.onloadend=()=>n(r.result),r.readAsDataURL(t)})}catch{return null}},oK=async e=>{try{return(await fetch("/api/icon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUri:e})})).ok}catch{return!1}},aK=async()=>{try{return(await fetch("/api/package-name")).json()}catch{return null}},lK=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase()),pE=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(null),[i,s]=C.useState(!0);return C.useEffect(()=>{let o=!1;return s(!0),Promise.all([aK().then(a=>{!o&&a&&t(lK(a))}),sK().then(a=>{o||r(a)})]).finally(()=>{o||s(!1)}),()=>{o=!0}},[]),{projectName:e,iconDataUri:n,loading:i}},mE=({size:e="md"})=>{const{projectName:t,iconDataUri:n,loading:r}=pE(),i=e==="sm"?20:18,s=e==="sm"?ve.sm:ve.md;return g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3]},children:[n?g.jsx("img",{src:n,alt:"",style:{width:i,height:i,objectFit:"contain"}}):g.jsx(WC,{icon:g.jsx(o$,{}),size:"small"}),g.jsx("span",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:s,whiteSpace:"nowrap"},children:r?"Loading…":t??"Paper Camp"})]})},Cn=({children:e})=>g.jsx("h1",{className:"text-4xl",style:{fontFamily:ae.serif,fontWeight:600,color:Ge.textPrimary,margin:`0 0 ${I[6]}`,lineHeight:1.1},children:e}),uK=({routeKey:e,children:t})=>{const n=fy();return g.jsxs("aside",{style:{width:AT.sidebarWidth,flexShrink:0,height:"100%",position:"sticky",top:0,display:"flex",flexDirection:"column",background:"transparent",overflow:"hidden"},children:[g.jsx("div",{style:{padding:`${I[5]} ${I[3]} ${I[4]}`,flexShrink:0},children:g.jsx(mE,{})}),g.jsx("div",{style:{height:1,background:"rgba(0,0,0,0.08)",margin:`${I[3]} ${I[3]}`}}),g.jsx("div",{style:{flex:1,overflowY:"auto",paddingTop:I[1],position:"relative"},children:g.jsx(cy,{mode:"wait",children:g.jsx(jc.div,{initial:n?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:n?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},children:t},e)})})]})},Lc=e=>{const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=Math.floor((Date.now()-t.getTime())/864e5);return n===0?"today":n===1?"yesterday":n<7?`${n}d ago`:n<30?`${Math.floor(n/7)}w ago`:n<365?`${Math.floor(n/30)}mo ago`:`${Math.floor(n/365)}y ago`},gE=e=>{if(e.phases.length===0)return null;const t=e.phases.filter(n=>n.done).length;return{done:t,total:e.phases.length,pct:Math.round(t/e.phases.length*100)}},cK=e=>e.phases.length===0?null:Math.round(e.phases.filter(t=>t.done).length/e.phases.length*100),dK=(e,t)=>{if(e)return e.find(n=>n.status==="in-progress"||n.status==="review")},hK=async()=>{const e=await fetch("/api/git/status");if(!e.ok){const t=await e.json().catch(()=>({error:"Failed to load git status"}));throw new Error(t.error)}return e.json()},fK=async(e,t,n)=>{const r=await fetch("/api/git/commit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e,title:t,message:n})});if(!r.ok){const i=await r.json().catch(()=>({error:"Commit failed"}));throw new Error(i.error)}},pK=async()=>{const e=await fetch("/api/git/push",{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({error:"Push failed"}));throw new Error(t.error)}},mK=async e=>{const t=await fetch("/api/git/suggest-commit-message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to suggest a commit message"}));throw new Error(n.error)}return t.json()};function W1(e,t){return e.map(n=>{if(!n.id)return{...n,status:"planned"};const r=t.filter(s=>s.idea===n.id);if(r.length===0)return{...n,status:"planned"};const i=r.every(s=>s.status==="done"||s.status==="dropped");return{...n,status:i?"done":"planned"}})}const gK={},H1=e=>{let t;const n=new Set,r=(c,d)=>{const h=typeof c=="function"?c(t):c;if(!Object.is(h,t)){const f=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(p=>p(t,f))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(gK?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},yK=e=>e?H1(e):H1,yE={},{useDebugValue:vK}=Gi,{useSyncExternalStoreWithSelector:xK}=PL;let K1=!1;const wK=e=>e;function SK(e,t=wK,n){(yE?"production":void 0)!=="production"&&n&&!K1&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),K1=!0);const r=xK(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return vK(r),r}const G1=e=>{(yE?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?yK(e):e,n=(r,i)=>SK(t,r,i);return Object.assign(n,t),n},bK=e=>e?G1(e):G1,kK=async()=>(await fetch("/api/agent/status")).json(),_K=async(e,t)=>{const n=await fetch("/api/agent/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,phaseIndex:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},CK=async(e,t)=>{const n=await fetch("/api/agent/launch-audit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,prompt:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},PK=async(e,t)=>{const n=await fetch("/api/agent/launch-draft",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ideaId:e,prompt:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},TK=async(e,t)=>{const n=await fetch("/api/agent/launch-extend",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ideaId:e,prompt:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},EK=async()=>{const e=await fetch("/api/agent/launch-audit-all",{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({error:"Launch failed"}));throw new Error(t.error)}},jK=async()=>{const e=await fetch("/api/agent/stop",{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({error:"Stop failed"}));throw new Error(t.error)}},AK="modulepreload",RK=function(e){return"/"+e},Y1={},LK=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=RK(l),l in Y1)return;Y1[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":AK,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},MK=async()=>(await fetch("/api/decisions")).json(),IK=async()=>(await fetch("/api/open-questions")).json(),DK=async()=>(await fetch("/api/progress")).json(),NK=async()=>(await fetch("/api/docs")).json(),BK=async()=>(await fetch("/api/consistency")).json(),FK=async(e,t,n)=>{const r=await fetch(`/api/open-questions/resolve?title=${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:t,rationale:n})});if(!r.ok){const o=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error??"Failed to resolve open question")}const{loadDecisions:i,loadOpenQuestions:s}=await LK(async()=>{const{loadDecisions:o,loadOpenQuestions:a}=await Promise.resolve().then(()=>GK);return{loadDecisions:o,loadOpenQuestions:a}},void 0).then(o=>o.useAppStore.getState());return await Promise.all([i(),s()]),r.json()},VK=async()=>(await fetch("/api/ideas")).json(),$K=async e=>{const t=await fetch("/api/ideas",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw new Error(n.error??"Failed to create idea");return n.id},zK=async()=>(await fetch("/api/plans")).json(),OK=async e=>{await fetch("/api/plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},UK=async e=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"DELETE"})},Nn=async(e,t)=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},WK=async()=>(await fetch("/api/status")).json(),HK=async e=>{await fetch(`/api/status/check?name=${e}`,{method:"POST"})},KK=async()=>{await fetch("/api/status/fix",{method:"POST"})},q=bK((e,t)=>({plans:null,plansLoading:!1,plansError:null,loadPlans:async()=>{e({plansLoading:!0});try{const n=await zK(),{ideaEntries:r}=t();e({plans:n,plansError:null,plansLoading:!1,ideaEntries:W1(r,n.entries)})}catch(n){e({plansError:String(n),plansLoading:!1})}},ideaEntries:[],loadIdeas:async()=>{try{const n=await VK(),{plans:r}=t();e({ideaEntries:W1(n.entries,(r==null?void 0:r.entries)??[])})}catch{e({ideaEntries:[]})}},activePlanTitle:null,setActivePlanTitle:n=>e({activePlanTitle:n}),activeIdeaTitle:null,setActiveIdeaTitle:n=>e({activeIdeaTitle:n}),view:"list",setView:n=>e({view:n}),decisions:[],decisionsLoading:!0,loadDecisions:async()=>{e({decisionsLoading:!0});try{const n=await MK();e({decisions:n.entries,decisionsLoading:!1})}catch{e({decisions:[],decisionsLoading:!1})}},openQuestions:[],openQuestionsLoading:!0,loadOpenQuestions:async()=>{e({openQuestionsLoading:!0});try{const n=await IK();e({openQuestions:n.entries,openQuestionsLoading:!1})}catch{e({openQuestions:[],openQuestionsLoading:!1})}},progress:[],progressLoading:!0,loadProgress:async()=>{e({progressLoading:!0});try{const n=await DK();e({progress:n.entries,progressLoading:!1})}catch{e({progress:[],progressLoading:!1})}},repoDocs:[],repoDocsLoading:!0,loadRepoDocs:async()=>{e({repoDocsLoading:!0});try{const n=await NK();e({repoDocs:n.files,repoDocsLoading:!1});const{activeDocSection:r}=t();!r&&n.files.some(i=>i.name==="MAIN.md")&&e({activeDocSection:"repo-docs",activeDocTitle:"MAIN.md"})}catch{e({repoDocs:[],repoDocsLoading:!1})}},activeDocSection:null,setActiveDocSection:n=>e({activeDocSection:n}),activeDocTitle:null,setActiveDocTitle:n=>e({activeDocTitle:n}),docSearchQuery:"",setDocSearchQuery:n=>e({docSearchQuery:n}),activeSettingsSection:"general",setActiveSettingsSection:n=>e({activeSettingsSection:n}),settingsConfigFiles:[],setSettingsConfigFiles:n=>e({settingsConfigFiles:n}),status:null,loadStatus:async()=>{try{const n=await WK();e({status:n})}catch{}},runCheck:async n=>{try{await HK(n)}catch{}},fixQuality:async()=>{try{await KK()}catch{}},consistency:[],loadConsistency:async()=>{try{const n=await BK();e({consistency:n})}catch{}},gitStatus:null,gitBranch:null,gitAhead:0,loadGitStatus:async()=>{try{const{branch:n,entries:r,ahead:i}=await hK();e({gitStatus:r,gitBranch:n,gitAhead:i})}catch{}},agentStatus:null,loadAgentStatus:async()=>{try{const n=await kK();e({agentStatus:n})}catch{}},launchAgent:async(n,r)=>{await _K(n,r),await t().loadAgentStatus()},launchPlanAudit:async(n,r)=>{await CK(n,r),await t().loadAgentStatus()},launchPlanDraft:async(n,r)=>{await PK(n,r),await t().loadAgentStatus()},launchIdeaExtend:async(n,r)=>{await TK(n,r),await t().loadAgentStatus()},launchBatchAudit:async()=>{await EK(),await t().loadAgentStatus()},stopAgent:async()=>{await jK(),await t().loadAgentStatus()}})),GK=Object.freeze(Object.defineProperty({__proto__:null,useAppStore:q},Symbol.toStringTag,{value:"Module"}));function X1(e){const t=e.match(/Found (\d+) errors?\./);return t?Number(t[1]):0}function YK(e,t){const n=X1(e)+X1(t);return n>0?`${n} lint/format issue${n===1?"":"s"} found.`:"Lint or format check failed."}function XK(e){const t=e.match(/Tests\s+(\d+) failed/);return t?`${t[1]} test${t[1]==="1"?"":"s"} failed.`:"Tests failed."}async function Ay(e){var r;if((r=navigator.clipboard)!=null&&r.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}return document.body.removeChild(t),n}const QK=({prompt:e,label:t="Copy fix prompt",variant:n="icon"})=>{const[r,i]=C.useState("idle"),s=async o=>{o.stopPropagation();const a=await Ay(e);i(a?"copied":"failed"),setTimeout(()=>i("idle"),1500)};if(n==="link"){const o=r==="copied"?"Copied!":r==="failed"?"Copy failed":t;return g.jsx("button",{type:"button",onClick:s,style:{background:"none",border:"none",padding:0,color:"inherit",textDecoration:"underline",cursor:"pointer",font:"inherit",fontFamily:ae.handwritten,fontSize:ve.sm},children:o})}return g.jsx(Ut,{icon:r==="copied"?g.jsx(cd,{size:16}):r==="failed"?g.jsx(rs,{size:16}):g.jsx(Ng,{size:16}),variant:"chalkboard",size:"small",label:r==="copied"?"Copied":r==="failed"?"Copy failed":t,onClick:s})},Q1="papercamp.commitTitle",q1="papercamp.commitMessage",qK=["core","cli","app","server","agent","plans","ideas","docs","settings","stack","ui","ci","config","deps","repo"];function Z1(e){try{return localStorage.getItem(e)??""}catch{return""}}function J1(e,t){try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}const ZK=({size:e=16})=>g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"m12 3-1.6 4.85a2 2 0 0 1-1.27 1.27L4.27 10.7l4.86 1.6a2 2 0 0 1 1.27 1.27L12 18.4l1.6-4.86a2 2 0 0 1 1.27-1.27l4.86-1.6-4.86-1.6a2 2 0 0 1-1.27-1.27L12 3Z"}),g.jsx("path",{d:"M19 3v3"}),g.jsx("path",{d:"M20.5 4.5h-3"})]}),JK=({size:e=16})=>g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"M12 19V5"}),g.jsx("path",{d:"m5 12 7-7 7 7"})]}),eS=`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.15 0 0 0 0 0.28 0 0 0 0 0.20 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='1'/%3E%3C/svg%3E")`,Hl=Ge.deskBg,tS=Ge.deskLight,e7=Ge.deskText,Ir=Ge.deskTextMuted,Kl=Ge.deskBorder,Rr=Ge.deskChalk,Yh={fontFamily:ae.serif,fontSize:ve.base,fontWeight:600,color:Ir,marginBottom:I[3]},t7=({open:e,onToggle:t})=>{const n=q(O=>O.plans),r=q(O=>O.loadProgress),i=q(O=>O.loadPlans),s=q(O=>O.status),o=q(O=>O.loadStatus),a=q(O=>O.runCheck),l=q(O=>O.fixQuality),u=q(O=>O.consistency),c=q(O=>O.loadConsistency),d=q(O=>O.setActiveDocSection),h=q(O=>O.setActiveDocTitle),f=q(O=>O.setActivePlanTitle),p=q(O=>O.loadGitStatus),y=q(O=>O.gitStatus),x=q(O=>O.gitBranch),m=q(O=>O.gitAhead),v=q(O=>O.agentStatus),w=q(O=>O.loadAgentStatus),b=q(O=>O.stopAgent),[_,S]=C.useState(!1),[P,T]=C.useState(!1),[j,E]=C.useState(new Set),[L,M]=C.useState(()=>Z1(Q1)),[$,B]=C.useState(()=>Z1(q1)),[F,V]=C.useState(!1),[W,D]=C.useState(!1),[z,k]=C.useState(null),[U,Z]=C.useState(null),[A,ue]=C.useState(!1),[pe,he]=C.useState(null),tt=fy(),Ne=uo(),Pe=C.useRef({loadProgress:r,loadPlans:i,loadStatus:o,loadConsistency:c,loadGitStatus:p,loadAgentStatus:w});Pe.current={loadProgress:r,loadPlans:i,loadStatus:o,loadConsistency:c,loadGitStatus:p,loadAgentStatus:w},C.useEffect(()=>{Pe.current.loadProgress(),Pe.current.loadStatus(),Pe.current.loadConsistency(),Pe.current.loadGitStatus(),Pe.current.loadAgentStatus()},[]),C.useEffect(()=>{const O=new EventSource("/api/activity/stream");return O.onmessage=()=>{Pe.current.loadProgress(),Pe.current.loadPlans(),Pe.current.loadStatus(),Pe.current.loadConsistency(),Pe.current.loadGitStatus(),Pe.current.loadAgentStatus()},()=>O.close()},[]);const me=C.useMemo(()=>dK(n==null?void 0:n.entries),[n==null?void 0:n.entries]),Ft=C.useMemo(()=>{var Ye;return((Ye=me==null?void 0:me.tags)==null?void 0:Ye.find(Xe=>qK.includes(Xe)))??"repo"},[me]),mn=C.useMemo(()=>!!(me!=null&&me.phases.length)&&me.phases.every(O=>O.done),[me]),Ln=C.useMemo(()=>{if(!me)return"";const O=me.kind??"feat";return mn?`${O}(${Ft}): updates`:`${O}(${Ft}): ${me.title}`},[me,Ft,mn]),vr=C.useMemo(()=>{if(!me)return"";const O=me.id?`Refs: ${me.id}`:"";return[!mn&&me.phases.length?me.phases.map(Xe=>`- ${Xe.text}`).join(`
94
+ `):"",O].filter(Boolean).join(`
95
+
96
+ `)},[me,mn]);C.useEffect(()=>{Ln&&!L&&M(Ln)},[Ln,L]),C.useEffect(()=>{vr&&!$&&B(vr)},[vr,$]),C.useEffect(()=>{J1(Q1,L)},[L]),C.useEffect(()=>{J1(q1,$)},[$]),C.useEffect(()=>{y&&E(new Set(y.map(O=>O.path)))},[y]);const ss=C.useCallback(O=>{E(Ye=>{const Xe=new Set(Ye);return Xe.has(O)?Xe.delete(O):Xe.add(O),Xe})},[]),gi=C.useCallback(async()=>{if(L.trim()){V(!0),Z(null);try{await fK([...j],L.trim(),$.trim()||void 0),M(Ln),B(""),T(!1),await p()}catch(O){Z(O.message)}finally{V(!1)}}},[L,$,j,Ln,p]),yi=C.useCallback(async()=>{D(!0),k(null);try{await pK(),await p()}catch(O){k(O.message)}finally{D(!1)}},[p]),Mn=C.useCallback(async()=>{if(j.size!==0){ue(!0),he(null);try{const O=await mK([...j]);M(O.title),B(O.message)}catch(O){he(O.message)}finally{ue(!1)}}},[j]),xr=C.useCallback(O=>{if(O.kind==="blocked-plan-active"&&O.planId){const Ye=n==null?void 0:n.entries.find(Xe=>Xe.id===O.planId);if(Ye){f(Ye.title),Ne({to:"/"});return}}d(O.section==="open-questions"?"questions":"decisions"),h(O.title),Ne({to:"/docs"})},[n==null?void 0:n.entries,Ne,f,d,h]);return g.jsxs(g.Fragment,{children:[g.jsx(cy,{children:!e&&g.jsx(jc.div,{initial:tt?void 0:{opacity:0,x:20},animate:{opacity:1,x:0},exit:tt?void 0:{opacity:0,x:20},transition:{duration:tt?0:.2,ease:"easeOut"},style:{position:"fixed",right:0,top:"50%",transform:"translateY(-50%)",zIndex:100,borderRadius:"6px 0 0 6px",background:Hl,backgroundImage:`${eS}, linear-gradient(135deg, ${tS} 0%, ${Hl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)"},children:g.jsx(Ut,{icon:g.jsx("span",{style:{fontSize:ve["2xs"]},children:"S"}),variant:"chalkboard",size:"small",label:"Open stack panel",onClick:t,style:{width:28,height:64,borderRadius:"6px 0 0 6px"}})})}),g.jsxs(jc.div,{animate:{x:e?0:"100%"},transition:{duration:tt?0:.3,ease:[.4,0,.2,1]},style:{position:"fixed",top:0,right:0,bottom:0,width:AT.stackPanelWidth,borderLeft:"4px solid rgba(61, 53, 43, 0.12)",backgroundColor:Hl,backgroundImage:`${eS}, linear-gradient(135deg, ${tS} 0%, ${Hl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",color:e7,display:"flex",flexDirection:"column",overflow:"hidden",zIndex:100},children:[g.jsxs("div",{style:{height:80,padding:`0 ${I[6]}`,borderBottom:`1px solid ${Kl}`,display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[g.jsx("span",{style:{fontFamily:ae.serif,fontSize:ve.base,fontWeight:700,color:Rr},children:"Stack"}),g.jsx(Ut,{icon:g.jsx("span",{style:{fontSize:ve.sm,lineHeight:1},children:"×"}),variant:"chalkboard",size:"small",label:"Close stack panel",onClick:t,style:{width:28,height:28,border:`1px solid ${Kl}`}})]}),g.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontFamily:ae.body},children:[g.jsxs("div",{style:{flex:2,minHeight:0,display:"flex",flexDirection:"column",padding:I[6],borderBottom:`1px solid ${Kl}`},children:[g.jsx("div",{style:Yh,children:"Agent"}),g.jsx(Us,{variant:"chalkboard",size:"small",className:"stack-card-fill",children:v?g.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:I[2],marginBottom:I[2],flexShrink:0},children:[g.jsxs("span",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:ve.sm,color:Rr},children:[v.planTitle,v.taskKind==="phase"&&v.phaseIndex!==void 0?` — phase ${v.phaseIndex+1}`:v.taskKind==="audit"?" — audit":v.taskKind==="batch-audit"?" — batch audit":v.taskKind==="draft"?" — drafting":v.taskKind==="extend"?" — extending":v.taskKind==="commit-suggest"?" — suggesting commit message":""," ","· ",py[v.agentId]]}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2]},children:[(()=>{const O={starting:"#5a4a2d",running:"#5a4a2d",stopping:"#5a4a2d",done:"#2d5a3b",error:"#5a2d2d"},Ye={starting:"#d6c4a0",running:"#d6c4a0",stopping:"#d6c4a0",done:"#b5d6b5",error:"#d6a0a0"};return g.jsx(at,{variant:"chalkboard",size:"small",fillColor:O[v.status],textColor:Ye[v.status],children:v.status})})(),(v.status==="running"||v.status==="starting"||v.status==="stopping")&&g.jsx(Ut,{icon:g.jsx(rs,{}),variant:"ghost",size:"small",label:"Stop agent",onClick:b,disabled:v.status==="stopping"})]})]}),v.lines.length>0&&g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[1],fontFamily:ae.mono,fontSize:ve["2xs"],color:Ir,flex:1,minHeight:0,overflowY:"auto"},children:v.lines.map((O,Ye)=>g.jsx("span",{style:{whiteSpace:"pre-wrap"},children:O},`${Ye}-${O}`))})]}):g.jsx("div",{style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx("p",{style:{opacity:.5,fontSize:ve.xs,margin:0},children:"No agent running."})})})]}),g.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",padding:I[6],borderBottom:`1px solid ${Kl}`},children:[g.jsx("div",{style:Yh,children:"Status"}),g.jsx(Us,{variant:"chalkboard",size:"small",className:"stack-card-fill",children:(()=>{var re,ge,Pt,In,Zt,wr;const O={pass:"#2d5a3b",fail:"#5a2d2d",running:"#5a4a2d",stale:"transparent"},Ye={pass:"#b5d6b5",fail:"#d6a0a0",running:"#d6c4a0",stale:void 0},Xe=((re=s==null?void 0:s.lint)==null?void 0:re.status)??"stale",vi=((ge=s==null?void 0:s.format)==null?void 0:ge.status)??"stale",qt=((Pt=s==null?void 0:s.test)==null?void 0:Pt.status)??"stale",oe=Xe==="running"||vi==="running"?"running":Xe==="fail"||vi==="fail"?"fail":Xe==="stale"&&vi==="stale"?"stale":"pass",N=oe==="running"||qt==="running",H=u.length>0;`${((In=s==null?void 0:s.lint)==null?void 0:In.output)||"(none)"}${((Zt=s==null?void 0:s.format)==null?void 0:Zt.output)||"(none)"}`;const J=`Fix the failing tests in this repo. Output from the last test run:
97
+
98
+ ${((wr=s==null?void 0:s.test)==null?void 0:wr.output)||"(no output captured)"}`;return g.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:I[3]},children:[g.jsxs("div",{style:{display:"flex",gap:I[2],flexWrap:"wrap",justifyContent:"center"},children:[g.jsx("button",{type:"button",onClick:()=>{N||(a("lint"),a("format"))},disabled:N,style:{cursor:N?"not-allowed":"pointer",opacity:N&&oe!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:g.jsxs(at,{variant:"chalkboard",size:"small",fillColor:O[oe],textColor:Ye[oe],children:["Quality",g.jsx("span",{style:{visibility:oe==="running"?"visible":"hidden"},children:"…"})]})}),g.jsx("button",{type:"button",onClick:()=>{N||a("test")},disabled:N,style:{cursor:N?"not-allowed":"pointer",opacity:N&&qt!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:g.jsxs(at,{variant:"chalkboard",size:"small",fillColor:O[qt],textColor:Ye[qt],children:["Tests",g.jsx("span",{style:{visibility:qt==="running"?"visible":"hidden"},children:"…"})]})}),g.jsxs("div",{children:[g.jsx("button",{type:"button",onClick:()=>{H&&S(Qe=>!Qe)},style:{cursor:H?"pointer":"default",display:"inline-flex",background:"none",border:"none",padding:0},children:g.jsx(at,{variant:"chalkboard",size:"small",fillColor:H?"#5a2d2d":"#2d5a3b",textColor:H?"#d6a0a0":"#b5d6b5",children:"Consistency"})}),_&&H&&g.jsx("div",{style:{marginTop:I[2],display:"flex",flexDirection:"column",gap:I[2]},children:u.map((Qe,ze)=>g.jsx("div",{style:{fontFamily:ae.mono,fontSize:ve["2xs"],color:Ir},children:g.jsx("button",{type:"button",onClick:()=>xr(Qe),style:{background:"none",border:"none",padding:0,color:Rr,textDecoration:"underline",cursor:"pointer",font:"inherit",textAlign:"left"},children:Qe.message})},`${Qe.kind}-${Qe.title}-${ze}`))})]})]}),(()=>{var er,Jt,My;let Qe,ze=null;return N?Qe=g.jsx("span",{style:{color:Ir},children:"Running checks…"}):oe==="fail"?(Qe=g.jsx("span",{style:{color:Ir},children:YK(((er=s==null?void 0:s.lint)==null?void 0:er.output)??"",((Jt=s==null?void 0:s.format)==null?void 0:Jt.output)??"")}),ze=g.jsx("button",{type:"button",onClick:l,style:{background:"none",border:"none",padding:0,color:Rr,textDecoration:"underline",cursor:"pointer",font:"inherit"},children:"Suggested fix: run biome --write"})):qt==="fail"?(Qe=g.jsx("span",{style:{color:Ir},children:XK(((My=s==null?void 0:s.test)==null?void 0:My.output)??"")}),ze=g.jsxs("span",{style:{color:Rr},children:["Suggested fix:"," ",g.jsx(QK,{prompt:J,label:"copy a fix prompt",variant:"link"})]})):oe==="pass"&&qt==="pass"?Qe=g.jsx("span",{style:{color:"#b5d6b5"},children:"All checks passing."}):Qe=g.jsx("span",{style:{color:Ir,opacity:.6},children:"Checks haven't run yet."}),g.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",gap:I[1],fontFamily:ae.handwritten,fontSize:ve.sm},children:[Qe,g.jsx("span",{style:{visibility:ze?"visible":"hidden"},children:ze??" "})]})})()]})})()})]}),g.jsxs("div",{style:{flex:2,minHeight:0,display:"flex",flexDirection:"column",padding:I[6]},children:[g.jsxs("div",{style:{...Yh,display:"flex",alignItems:"center",gap:I[2]},children:["Commit",x&&g.jsx(at,{variant:"chalkboard",size:"small",children:x})]}),g.jsx(Us,{variant:"chalkboard",size:"small",className:"stack-card-fill",children:y&&y.length>0?g.jsxs(g.Fragment,{children:[g.jsx(oz,{title:`${y.length} file${y.length===1?"":"s"} changed`,expanded:P,onToggle:()=>T(!P),children:g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[2],paddingTop:I[2]},children:y.map(O=>g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:I[2],fontFamily:ae.mono,fontSize:ve["2xs"],color:Rr,cursor:"pointer"},children:[g.jsx("input",{type:"checkbox",checked:j.has(O.path),onChange:()=>ss(O.path),style:{accentColor:Rr}}),g.jsx("span",{style:{color:O.staged?Rr:Ir,minWidth:24},children:O.status}),g.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:O.path})]},O.path))})}),g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[3],marginTop:I[3]},children:[pe&&g.jsx(jn,{variant:"chalkboard",dismissible:!0,onDismiss:()=>he(null),children:pe}),g.jsxs("div",{style:{display:"flex",gap:I[2],alignItems:"center"},children:[g.jsx("div",{style:{flex:1},children:g.jsx(qn,{variant:"chalkboard",size:"small",placeholder:"Commit title",value:L,onChange:O=>M(O.currentTarget.value)})}),g.jsx(Ut,{icon:g.jsx(ZK,{size:16}),variant:"chalkboard",size:"small",label:"Suggest title and message from the diff",disabled:j.size===0||A,onClick:Mn,wobble:A?1:0})]}),g.jsx(mo,{variant:"chalkboard",size:"small",placeholder:"Commit message (optional)",value:$,onChange:O=>B(O.currentTarget.value),rows:2}),U&&g.jsx(jn,{variant:"chalkboard",dismissible:!0,onDismiss:()=>Z(null),children:U}),g.jsx(le,{variant:"chalkboard",size:"small",fullWidth:!0,disabled:j.size===0||!L.trim()||F,onClick:gi,children:F?"Committing…":"Commit"})]})]}):g.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:I[3]},children:m>0?g.jsxs(g.Fragment,{children:[g.jsxs("p",{style:{opacity:.5,fontSize:ve.xs,margin:0},children:["All changes committed — ",m," commit",m===1?"":"s"," ready to push."]}),z&&g.jsx(jn,{variant:"chalkboard",dismissible:!0,onDismiss:()=>k(null),children:z}),g.jsx(le,{variant:"chalkboard",size:"small",icon:g.jsx(JK,{size:14}),disabled:W,onClick:yi,children:W?"Pushing…":`Push ${m} commit${m===1?"":"s"}`})]}):g.jsx("p",{style:{opacity:.5,fontSize:ve.xs,margin:0},children:"No changed files."})})})]})]})]})]})},n7=()=>{const e=q(a=>a.decisions),t=q(a=>a.openQuestions),n=q(a=>a.activeDocTitle),r=q(a=>a.setActiveDocSection),i=q(a=>a.setActiveDocTitle),s=e.find(a=>a.title===n);if(!s)return null;const o=t.filter(a=>a.resolvedBy===s.title);return g.jsxs("div",{children:[g.jsx("h2",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${I[3]}`,lineHeight:hn.tight},children:s.title}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2],marginBottom:I[5]},children:[g.jsx("span",{className:"text-sm",style:{opacity:.5},children:s.date}),g.jsx(at,{size:"small",fillColor:s.status==="decided"?"rgba(143, 185, 150, 0.25)":"rgba(201, 139, 139, 0.25)",textColor:s.status==="decided"?Ge.accentGreenDark:"#6E3A3A",children:s.status}),s.supersededBy&&g.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Superseded by"," ",g.jsx(Wp,{onClick:()=>i(s.supersededBy),children:s.supersededBy})]}),o.length>0&&g.jsxs("span",{className:"text-sm",style:{opacity:.5},children:[o.length===1?"Resolves":"Resolves all of"," ",o.map((a,l)=>g.jsxs("span",{children:[l>0&&", ",g.jsx(Wp,{onClick:()=>{r("questions"),i(a.title)},children:a.title})]},a.title))]})]}),g.jsx("div",{style:{fontFamily:ae.body,fontSize:ve.base,lineHeight:hn.relaxed,color:"#1C1B18"},children:g.jsx(ll,{children:s.body})})]})},bi=(e,t)=>e.toLowerCase().includes(t.toLowerCase()),Gl=(e,t,n=120)=>{const r=e.toLowerCase().indexOf(t.toLowerCase());if(r===-1)return e.slice(0,n);const i=Math.max(0,r-40),s=Math.min(e.length,r+t.length+40);let o=e.slice(i,s);return i>0&&(o=`…${o}`),s<e.length&&(o=`${o}…`),o},r7=({query:e})=>{const{decisions:t,openQuestions:n,progress:r,repoDocs:i,setActiveDocSection:s,setActiveDocTitle:o,setDocSearchQuery:a}=q(),l=[];for(const d of t)(bi(d.title,e)||bi(d.body,e))&&l.push({section:"decisions",sectionLabel:"Decisions",title:d.title,snippet:Gl(d.body||d.title,e)});for(const d of n)(bi(d.title,e)||bi(d.body,e))&&l.push({section:"questions",sectionLabel:"Open Questions",title:d.title,snippet:Gl(d.body||d.title,e)});for(const d of r)for(const h of d.items)if(bi(h,e)){l.push({section:"progress",sectionLabel:"Progress",title:d.date,snippet:Gl(h,e)});break}for(const d of i)(bi(d.name,e)||bi(d.content,e))&&l.push({section:"repo-docs",sectionLabel:"Repo Docs",title:d.name,snippet:Gl(d.content,e)});const u={};for(const d of l)u[d.section]||(u[d.section]=[]),u[d.section].push(d);const c=(d,h)=>{s(d),o(h),a("")};return l.length===0?g.jsxs("p",{style:{opacity:.5},children:['No results found for "',e,'".']}):g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm",style:{opacity:.5,marginBottom:I[3]},children:[l.length," result",l.length===1?"":"s",' for "',e,'"']}),Object.entries(u).map(([d,h])=>g.jsxs("div",{style:{marginBottom:I[6]},children:[g.jsx("h3",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4,margin:`0 0 ${I[2]}`},children:h[0].sectionLabel}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[1]},children:h.map(f=>g.jsx(le,{variant:"ghost",size:"small",fullWidth:!0,onClick:()=>c(f.section,f.title),style:{justifyContent:"flex-start",padding:`${I[2]} ${I[3]}`},children:g.jsxs("span",{style:{textAlign:"left"},children:[g.jsx("span",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:"0.95rem",display:"block",marginBottom:"0.2rem"},children:f.title}),g.jsx("span",{className:"text-sm",style:{opacity:.6},children:f.snippet})]})},`${f.section}-${f.title}`))})]},d))]})},i7=()=>{const e=q(m=>m.openQuestions),t=q(m=>m.activeDocTitle),n=q(m=>m.setActiveDocSection),r=q(m=>m.setActiveDocTitle),[i,s]=C.useState(!1),[o,a]=C.useState(""),[l,u]=C.useState(""),[c,d]=C.useState(!1),h=e.find(m=>m.title===t);if(!h)return null;const f=()=>{h.resolvedBy&&(n("decisions"),r(h.resolvedBy))},p=()=>{a(""),u(""),d(!1),s(!0)},y=()=>{s(!1)},x=async m=>{if(m.preventDefault(),!(!o.trim()||c)){d(!0);try{await FK(h.title,o.trim(),l.trim()||void 0),s(!1)}catch{d(!1)}}};return g.jsxs("div",{children:[g.jsx("h2",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${I[3]}`,lineHeight:hn.tight},children:h.title}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2],marginBottom:I[5]},children:[g.jsx("span",{className:"text-sm",style:{opacity:.5},children:h.raised}),g.jsx(at,{size:"small",fillColor:h.status==="open"?"rgba(212, 163, 115, 0.25)":"rgba(143, 185, 150, 0.25)",textColor:h.status==="open"?Ge.accentAmberDark:Ge.accentGreenDark,children:h.status}),h.resolvedBy&&g.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Resolved by"," ",g.jsx(Wp,{onClick:f,children:h.resolvedBy})]}),h.status==="open"&&g.jsx(le,{variant:"chalkboard",onClick:p,children:"Resolve"})]}),g.jsx("div",{style:{fontFamily:ae.body,fontSize:ve.base,lineHeight:hn.relaxed,color:"#1C1B18"},children:g.jsx(ll,{children:h.body})}),g.jsx(dd,{open:i,onClose:y,title:"Resolve question",size:"small",children:g.jsxs("form",{onSubmit:x,style:{display:"flex",flexDirection:"column",gap:I[4]},children:[g.jsx(qn,{label:"Decision",value:o,onChange:m=>a(m.target.value),placeholder:"What was decided?",disabled:c,autoFocus:!0,required:!0}),g.jsx(mo,{label:"Rationale",value:l,onChange:m=>u(m.target.value),placeholder:"Optional reasoning…",disabled:c,rows:4}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[g.jsx(le,{type:"button",variant:"ghost",onClick:y,disabled:c,children:"Cancel"}),g.jsx(le,{type:"submit",variant:"primary",disabled:!o.trim()||c,children:"Resolve"})]})]})})]})},s7=()=>{const e=q(i=>i.progress),t=q(i=>i.activeDocTitle),r=[...t?e.filter(i=>i.date===t):e].sort((i,s)=>s.date.localeCompare(i.date));return r.length===0?g.jsx("p",{style:{opacity:.5},children:"No progress entries found."}):g.jsx("div",{children:r.map(i=>g.jsxs("div",{style:{marginBottom:I[8]},children:[g.jsx("h3",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:ve.md,margin:`0 0 ${I[3]}`,lineHeight:hn.tight,opacity:.8},children:i.date}),g.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:I[2]},children:i.items.map((s,o)=>g.jsx("li",{style:{fontFamily:ae.body,fontSize:ve.sm,lineHeight:1.55,color:"#1C1B18",paddingLeft:I[4],borderLeft:"2px solid rgba(0,0,0,0.08)"},children:g.jsx(ll,{children:s})},`${i.date}-${o}`))})]},i.date))})},o7=()=>{const e=q(i=>i.repoDocs),t=q(i=>i.activeDocTitle),n=e.find(i=>i.name===t);if(!n)return null;const r=n.name.endsWith(".md");return g.jsxs("div",{children:[g.jsx("h2",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${I[4]}`,lineHeight:hn.tight},children:n.name}),r?g.jsx("div",{style:{fontFamily:ae.body,fontSize:ve.base,lineHeight:hn.relaxed,color:"#1C1B18"},children:g.jsx(ll,{children:n.content})}):g.jsx("pre",{style:{fontFamily:ae.mono,fontSize:ve.xs,background:"rgba(0,0,0,0.04)",borderRadius:6,padding:I[4],overflowX:"auto",lineHeight:hn.normal,whiteSpace:"pre-wrap"},children:n.content})]})},a7=()=>{const e=q(r=>r.docSearchQuery),t=q(r=>r.activeDocSection),n=q(r=>r.activeDocTitle);return e.trim()?g.jsx("div",{children:g.jsx(r7,{query:e})}):t==="decisions"&&n?g.jsxs("div",{children:[g.jsx(Cn,{children:"Decisions"}),g.jsx(n7,{})]}):t==="questions"&&n?g.jsxs("div",{children:[g.jsx(Cn,{children:"Open Questions"}),g.jsx(i7,{})]}):t==="progress"?g.jsxs("div",{children:[g.jsx(Cn,{children:"Progress"}),g.jsx(s7,{})]}):t==="repo-docs"&&n?g.jsx("div",{children:g.jsx(o7,{})}):g.jsxs("div",{children:[g.jsx(Cn,{children:"Docs"}),g.jsx("p",{style:{opacity:.5},children:"Select a section from the sidebar."})]})},ln=({label:e,children:t,action:n})=>g.jsxs("div",{style:{marginBottom:I[5]},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.35rem",padding:`0 ${I[3]}`},children:[g.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),n]}),t]}),l7=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Lr=({children:e})=>g.jsx("span",{className:"text-sm",style:{display:"block",padding:`${I[1]} ${I[3]}`,opacity:.35,fontStyle:"italic"},children:e}),u7=()=>{const{decisions:e,openQuestions:t,progress:n,repoDocs:r,decisionsLoading:i,openQuestionsLoading:s,progressLoading:o,repoDocsLoading:a,loadDecisions:l,loadOpenQuestions:u,loadProgress:c,loadRepoDocs:d,activeDocSection:h,setActiveDocSection:f,activeDocTitle:p,setActiveDocTitle:y}=q();C.useEffect(()=>{l(),u(),c(),d()},[l,u,c,d]);const x=m=>{f("decisions"),y(m)};return g.jsxs(g.Fragment,{children:[g.jsx(ln,{label:"Repo Docs",children:a&&r.length===0?g.jsx(Lr,{children:"Loading…"}):r.length>0?r.map(m=>g.jsx(ur,{size:"small",active:h==="repo-docs"&&p===m.name,onClick:()=>{f("repo-docs"),y(m.name)},children:l7(m.name)},m.name)):g.jsx(Lr,{children:"No repo docs found"})}),g.jsx(ln,{label:"Decisions",children:i&&e.length===0?g.jsx(Lr,{children:"Loading…"}):e.length>0?e.map(m=>g.jsx(ur,{size:"small",active:h==="decisions"&&p===m.title,onClick:()=>x(m.title),children:m.title},m.title)):g.jsx(Lr,{children:"No decisions yet"})}),g.jsx(ln,{label:"Open Questions",children:s&&t.length===0?g.jsx(Lr,{children:"Loading…"}):t.length>0?t.map(m=>g.jsx(ur,{size:"small",active:h==="questions"&&p===m.title,onClick:()=>{f("questions"),y(m.title)},children:m.title},m.title)):g.jsx(Lr,{children:"No open questions"})}),g.jsx(ln,{label:"Progress",children:o&&n.length===0?g.jsx(Lr,{children:"Loading…"}):n.length>0?n.map(m=>g.jsx(ur,{size:"small",active:h==="progress"&&p===m.date,onClick:()=>{f("progress"),y(m.date)},children:m.date},m.date)):g.jsx(Lr,{children:"No progress entries"})})]})};function vE(){const[e,t]=C.useState("idle"),[n,r]=C.useState(null),i=C.useRef(null),s=C.useCallback(async a=>{i.current&&clearTimeout(i.current),t("loading"),r(null);try{await a(),t("success"),i.current=setTimeout(()=>{t("idle")},2e3)}catch(l){t("error"),r(l.message),i.current=setTimeout(()=>{t("idle"),r(null)},4e3)}},[]),o=C.useCallback(()=>{i.current&&clearTimeout(i.current),t("idle"),r(null)},[]);return{state:e,errorMessage:n,run:s,reset:o,loading:e==="loading",success:e==="success"}}const c7=()=>{const e=q(o=>o.launchBatchAudit),t=q(o=>o.agentStatus),[n,r]=C.useState(!1),i=t!==null&&t.status!=="done"&&t.status!=="error",s=async()=>{r(!0);try{await e()}catch(o){alert(o.message)}finally{r(!1)}};return g.jsx(le,{variant:"ghost",size:"small",onClick:s,disabled:i||n,style:{color:Ge.textSecondary},children:"Audit all"})},Ry={"in-progress":"#C89A5A",planned:"#6A9B72",idea:"#8A9BAA",review:"#9B7AB5",done:"#8A7A8A",dropped:"#A06060"},xE={idea:"Idea",planned:"Planned","in-progress":"In progress",review:"Review",done:"Done",dropped:"Dropped"},Mc={idea:"slate",planned:"blue","in-progress":"amber",review:"slate",done:"green",dropped:"rose"},nS={idea:{fill:"rgba(138, 155, 168, 0.25)",text:"#5E7080"},planned:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},"in-progress":{fill:"rgba(212, 163, 115, 0.25)",text:"#A67B4F"},review:{fill:"rgba(155, 122, 181, 0.25)",text:"#7B5E9E"},done:{fill:"rgba(168, 155, 168, 0.25)",text:"#6E5E6E"},dropped:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"}},d7=[{status:"planned",label:"Planned"},{status:"in-progress",label:"In Progress"}],Ly=({id:e})=>e?g.jsx(at,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}):null,h7=({plan:e})=>g.jsxs("div",{children:[g.jsxs("div",{className:"text-sm",style:{fontWeight:500,lineHeight:1.3,display:"flex",alignItems:"center",gap:I[1]},children:[g.jsx(Ly,{id:e.id}),e.title]}),e.tags.length>0&&g.jsx("div",{style:{display:"flex",gap:I[1],flexWrap:"wrap",marginTop:"0.4rem"},children:e.tags.map(t=>g.jsx(at,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:t},t))})]}),f7=({plans:e})=>g.jsx(tl,{board:d7.map(({status:t,label:n})=>({key:t,label:n,accent:Mc[t],items:e.filter(r=>r.status===t||t==="in-progress"&&r.status==="review"),getKey:r=>r.title,renderItem:r=>g.jsx(h7,{plan:r})}))}),wE=({pct:e,color:t,height:n=6})=>g.jsx(UC,{value:e,color:t,height:n}),Ic=({plan:e,highlighted:t,onOpen:n,rank:r})=>{const i=gE(e);return g.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onClick:n?()=>n(e.title):void 0,onKeyDown:n?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(e.title))}:void 0,style:{cursor:n?"pointer":void 0,...t?{outline:"2px solid rgba(200,154,90,0.5)",outlineOffset:2,borderRadius:4}:void 0},children:g.jsxs(Us,{texture:"kraft",accent:!0,accentColor:Mc[e.status],children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:I[3]},children:[g.jsxs("h2",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:"1.3rem",margin:0,lineHeight:1.3,display:"flex",alignItems:"center",gap:I[2]},children:[r!==void 0&&g.jsxs("span",{className:"text-sm",style:{opacity:.4,fontWeight:600},children:[r,"."]}),g.jsx(Ly,{id:e.id}),e.title]}),g.jsx(at,{size:"small",fillColor:nS[e.status].fill,textColor:nS[e.status].text,children:xE[e.status]})]}),g.jsxs("div",{style:{marginTop:"0.3rem",display:"flex",alignItems:"center",gap:I[2],flexWrap:"wrap"},children:[g.jsx("span",{className:"text-sm",style:{opacity:.45},children:e.updated?`updated ${Lc(e.updated)}`:`created ${Lc(e.created)}`}),e.tags.map(s=>g.jsx(at,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:s},s))]}),i!==null&&g.jsx("div",{style:{marginTop:I[3]},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3]},children:[g.jsx("div",{style:{flex:1},children:g.jsx(wE,{pct:i.pct,color:Ry[e.status]})}),g.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[i.done,"/",i.total]})]})})]})})},p7=({plans:e,onOpen:t})=>{const[n,r]=C.useState(!1);return e.length===0?null:g.jsxs("div",{style:{marginTop:I[8]},children:[g.jsxs(le,{type:"button",variant:"ghost",size:"small",onClick:()=>r(i=>!i),style:{display:"flex",alignItems:"baseline",gap:"0.35rem"},children:[g.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.35},children:"Closed"}),g.jsx("span",{className:"text-xs",style:{opacity:.3},children:e.length}),g.jsx("span",{className:"text-xs",style:{opacity:.3},children:n?"▴":"▾"})]}),n&&g.jsx("div",{style:{marginTop:"0.65rem",display:"flex",flexDirection:"column",gap:"0.65rem"},children:e.map(i=>g.jsx(Ic,{plan:i,onOpen:t},i.title))})]})};function m7(e){const t=e.phases.map((i,s)=>`${s+1}. [${i.done?"x":" "}] ${i.text}`).join(`
99
+ `),n=e.log&&e.log.length>0?e.log.map(i=>`- ${i.date}: ${i.text}`).join(`
100
+ `):"(none)",r=e.clarifications&&e.clarifications.length>0?e.clarifications.map(i=>`- ${i.date}: ${i.text}`).join(`
101
+ `):"(none)";return`You're auditing the plan "${e.title}" (${e.id??"no id"}), stored as a single file at papercamp/plans/${e.id??"<ID>"}.md (or papercamp/plans/archive/${e.id??"<ID>"}.md if it's already done/dropped — check both). Edit only that file.
102
+
103
+ Plan body: ${e.body}
104
+
105
+ Current phases:
106
+ ${t}
107
+
108
+ Log entries (issues, bugs, and review notes documented so far):
109
+ ${n}
110
+
111
+ Clarifications (answered questions about scope and design):
112
+ ${r}
113
+
114
+ Read this plan's phases, body, Log entries, and Clarifications, then inspect the current repo state. The Log entries often document bugs, UX issues, or missing functionality that should be turned into new phases. Append any phase that's clearly required but missing as a normal \`- [ ]\` line at the end of the \`### Phases\` list — optionally with the existing indented description format. Explicitly never touch existing lines: never reorder, check, uncheck, or rewrite anything already there, no matter how stale or redundant it looks.
115
+
116
+ If you append anything, finish with exactly one new \`### Log\` line (date: summary) describing what was found and appended.
117
+
118
+ If nothing is missing, write nothing at all — not even an empty heading or a Log line. The audit must be safe to re-run anytime without producing log spam.`}function g7(e){return`You're extending an idea stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md: ${e.id??"no id"} ("${e.title}").
119
+
120
+ Idea body, in full:
121
+ ${e.body}
122
+
123
+ Your job: explore the current codebase and rewrite this idea's body in place in that file with more specific detail — concrete approaches, file references, and any relevant architectural context you find in the code. Leave the YAML frontmatter (id, title) and the idea's \`### ${e.id??"IDEA-N"}: ${e.title}\` heading unchanged; only update the prose body below the heading.
124
+
125
+ Write the full updated body — everything below the heading. Make the description more specific and actionable while keeping the same general intent. Do not change the \`## IDEA-N:\` heading line.`}function y7(e){return`You're clarifying the plan "${e.title}" (${e.id??"no id"}), stored as a single file at papercamp/plans/${e.id??"<ID>"}.md (or papercamp/plans/archive/${e.id??"<ID>"}.md if done/dropped). Edit only that file.
126
+
127
+ Plan body: ${e.body}
128
+
129
+ Current phases:
130
+ ${e.phases.length>0?e.phases.map((t,n)=>`${n+1}. [${t.done?"x":" "}] ${t.text}`).join(`
131
+ `):"(none yet)"}
132
+
133
+ Scan this plan against: functional scope, data model, UX flow, non-functional attributes, edge cases, terminology, completion signals.
134
+
135
+ Surface at most 5 highest-impact gaps, one question at a time, each with a **Recommended:** answer. Write accepted answers to \`### Clarifications\` as:
136
+
137
+ \`\`\`
138
+ - YYYY-MM-DD: Q: <question> → A: <answer>
139
+ \`\`\`
140
+
141
+ Only append answered lines. Keep existing clarifications intact. Use today's date.`}function v7(e,t){const n=t.filter(i=>i.status!=="done"),r=n.length?n.map(i=>{const s=i.phases.map(o=>` - [${o.done?"x":" "}] ${o.text}`).join(`
142
+ `);return`### ${i.id??"no id"}: ${i.title} (status: ${i.status}${i.idea?`, idea: ${i.idea}`:""})
143
+ ${i.body}
144
+ ${s||" (no phases yet)"}`}).join(`
145
+
146
+ `):"(no other open plans exist yet)";return`You're drafting a new plan from an idea: ${e.id??"no id"} ("${e.title}"), stored at papercamp/ideas/${e.id??"<ID>"}.md.
147
+
148
+ Idea body, in full:
149
+ ${e.body}
150
+
151
+ ## Plan file shape (see papercamp/about.md)
152
+
153
+ Each plan is its own file at \`papercamp/plans/<KIND>-<N>.md\` (the file name is the plan's id). It has YAML frontmatter, a free-prose body paragraph, then an optional \`### Phases\` checklist:
154
+
155
+ \`\`\`
156
+ ---
157
+ id: <KIND>-<N>
158
+ title: <Short headline>
159
+ kind: feat | fix | chore | docs | refactor
160
+ status: idea
161
+ created: <today, YYYY-MM-DD>
162
+ idea: ${e.id??"IDEA-N"}
163
+ tags:
164
+ - comma
165
+ - separated
166
+ ---
167
+
168
+ One or two paragraphs of free prose giving context — what this is and why,
169
+ in the same voice as the existing plan files.
170
+
171
+ ### Phases
172
+ - [ ] Short phase title
173
+ Optional indented long-form description of the phase.
174
+ \`\`\`
175
+
176
+ - \`title\` is a short verb-led headline, 2-6 words.
177
+ - \`kind\` picks the ID prefix — choose whichever Conventional Commits type
178
+ best fits this idea (most are \`feat\`).
179
+ - \`id\` must come from the persistent per-kind counter in
180
+ \`papercamp/config.json\`'s \`nextId\` field — read the current value for
181
+ your chosen \`kind\` (e.g. \`nextId.feat\`), use it as \`<KIND>-<N>\`, and
182
+ increment that counter in the same write. Never derive the number by
183
+ scanning existing plan files for the highest one — a deleted plan's number
184
+ must never be reused.
185
+ - \`idea\` must be exactly \`${e.id??"this idea's id"}\` — that backlink is
186
+ what the rest of the dashboard (and this task's own success check) uses to
187
+ find the plan you wrote.
188
+ - Write \`status: idea\`, never anything further along. Per
189
+ papercamp/decisions.md ("Plan-drafting agent writes directly, same as
190
+ phase execution"), this entry lands straight in the Backlog with no
191
+ separate approval step — a human reviews and promotes it from there, the
192
+ same as any other backlog entry.
193
+ - Phases should be genuinely actionable steps a future agent or human could
194
+ pick up one at a time — match the granularity of the existing phases shown
195
+ below, not a single giant phase.
196
+
197
+ ## Every other open (non-done) plan, for scope context
198
+
199
+ ${r}
200
+
201
+ ## What to write
202
+
203
+ Create exactly one new file, \`papercamp/plans/<KIND>-<N>.md\`, using the id
204
+ you allocated above. Use the list of existing plans only to avoid
205
+ duplicating an in-flight plan's scope and to match phase granularity —
206
+ never create, edit, move, or rename any other plan file, and never write to
207
+ the legacy \`papercamp/plans.md\` (it is unused under per-file storage).`}const x7=({idea:e,otherPlans:t})=>{const n=q(d=>d.launchPlanDraft),r=q(d=>d.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,errorMessage:o,run:a}=vE(),l=()=>{const d=e.id;d&&a(async()=>{await n(d,v7(e,t))})},u=s==="loading"?"Drafting…":s==="success"?"Draft sent!":s==="error"?"Draft failed":"Draft plan",c=s==="error"?o??"Draft failed":e.id?void 0:"Idea needs an ID before an agent can run";return g.jsx(le,{variant:"ghost",size:"small",onClick:l,disabled:i||s==="loading"||!e.id,title:c,style:{color:s==="error"?Ge.accentRoseDark:Ge.textSecondary},children:u})},w7=[{key:"planned",label:"Planned",accent:Mc.planned,icon:g.jsx(s$,{}),iconFill:void 0,filter:e=>!e.status||e.status==="planned"},{key:"done",label:"Done",accent:Mc.done,icon:g.jsx(cd,{size:14}),iconFill:"rgba(143, 185, 150, 0.35)",filter:e=>e.status==="done"}],S7=({ideas:e,plans:t,onOpenIdea:n,onOpenPlan:r})=>{const[i,s]=C.useState(null),[o,a]=C.useState(!1),l=4;if(e.length===0)return null;const u=c=>t.filter(d=>d.idea===c);return g.jsx(tl,{board:w7.map(({key:c,label:d,accent:h,icon:f,iconFill:p,filter:y})=>{const x=e.filter(y),m=c==="done",v=m?x.length-l:0,b=v>0&&!o?[...x.slice(0,l),{__overflow:!0,count:v}]:x;return{key:c,label:m?`${d} (${x.length})`:d,accent:h,items:b,getKey:_=>"__overflow"in _?"__overflow":_.title,renderItem:_=>{if("__overflow"in _)return g.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:`${I[2]} 0`},children:g.jsxs("button",{type:"button",onClick:()=>a(!0),style:{background:"none",border:"none",padding:0,cursor:"pointer",font:"inherit",color:"inherit",fontSize:"0.8rem",opacity:.5,textDecoration:"underline"},children:[_.count," more idea",_.count===1?"":"s"]})});const S=i===_.title,P=_.id?u(_.id):[],T=P.length>0;return g.jsxs("div",{children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2]},children:[g.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(_.title),style:{flex:1,minWidth:0,background:"none",border:"none",padding:0,cursor:"pointer",display:"flex",alignItems:"center",gap:I[2],textAlign:"left",font:"inherit",color:"inherit"},children:[g.jsx(WC,{icon:f,size:"small",fillColor:p}),g.jsx("span",{className:"text-sm",style:{fontWeight:500,lineHeight:1.3},children:_.title})]}),T&&g.jsxs("button",{type:"button","aria-label":S?"Hide linked plans":"Show linked plans",onClick:()=>s(S?null:_.title),style:{flexShrink:0,background:"none",border:"none",padding:0,opacity:.45,cursor:"pointer",fontSize:"0.7rem",font:"inherit"},children:[S?"▾":"▸"," ",P.length]}),!T&&_.id&&g.jsx("div",{style:{flexShrink:0},children:g.jsx(x7,{idea:_,otherPlans:t})})]}),S&&T&&g.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:I[1],marginTop:I[2]},children:P.map(j=>g.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(j.title),style:{background:"none",border:"none",padding:0,cursor:"pointer",font:"inherit"},children:g.jsx(at,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:j.id})},j.title))})]})}}})})},b7=({ideaId:e})=>g.jsxs(Us,{texture:"kraft",children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:I[3]},children:[g.jsxs("h2",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:"1.3rem",margin:0,lineHeight:1.3,display:"flex",alignItems:"center",gap:I[2]},children:[g.jsx(at,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}),g.jsx("span",{style:{opacity:.55},children:"Creating a plan…"})]}),g.jsx("div",{className:"paper-camp-skeleton",style:{width:60,height:20,opacity:.18}})]}),g.jsxs("div",{style:{marginTop:"0.3rem",display:"flex",alignItems:"center",gap:I[2]},children:[g.jsx("div",{className:"paper-camp-skeleton",style:{width:90,height:12,opacity:.18}}),g.jsx("div",{className:"paper-camp-skeleton",style:{width:50,height:18,borderRadius:999,opacity:.18}})]}),g.jsx("div",{style:{marginTop:I[3]},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3]},children:[g.jsx("div",{className:"paper-camp-skeleton",style:{flex:1,height:6,opacity:.18}}),g.jsx("div",{className:"paper-camp-skeleton",style:{width:28,height:12,flexShrink:0,opacity:.18}})]})})]}),Xh=({label:e,count:t})=>g.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"0.4rem",marginBottom:"0.65rem"},children:[g.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),g.jsx("span",{className:"text-xs",style:{opacity:.3},children:t})]}),k7=({plans:e,activePlanTitle:t,onOpenPlan:n,ideaEntries:r,onOpenIdea:i,draftingIdeaId:s})=>{const o=C.useRef({});C.useEffect(()=>{var h;t&&o.current[t]&&((h=o.current[t])==null||h.scrollIntoView({behavior:"smooth",block:"center"}))},[t]);const a=e.filter(h=>h.status==="in-progress"||h.status==="review"),l=e.filter(h=>h.status==="planned"||h.status==="idea"),u=e.filter(h=>h.status==="done"||h.status==="dropped"),c=!!s&&!e.some(h=>h.idea===s),d=h=>f=>{o.current[h]=f};return g.jsxs("div",{children:[a.length>0&&g.jsxs("section",{style:{marginBottom:I[8]},children:[g.jsx(Xh,{label:"In progress",count:a.length}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[3]},children:a.map(h=>g.jsx("div",{ref:d(h.title),children:g.jsx(Ic,{plan:h,highlighted:t===h.title,onOpen:n})},h.title))})]}),(l.length>0||c)&&g.jsxs("section",{style:{marginBottom:I[8]},children:[g.jsx(Xh,{label:"Backlog",count:l.length}),g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[3]},children:[c&&s&&g.jsx(b7,{ideaId:s}),l.map((h,f)=>g.jsx("div",{ref:d(h.title),children:g.jsx(Ic,{plan:h,highlighted:t===h.title,onOpen:n,rank:f+1})},h.title))]})]}),r&&r.length>0&&g.jsxs("section",{style:{marginBottom:I[8]},children:[g.jsx(Xh,{label:"Ideas",count:r.length}),g.jsx(S7,{ideas:r,plans:e,onOpenIdea:i,onOpenPlan:n})]}),g.jsx(p7,{plans:u,onOpen:n})]})},_7=e=>{if(!e.file)return;const t=e.line_start??e.line;if(!t)return e.file;const n=e.line_end&&e.line_end!==t?`-${e.line_end}`:"";return`${e.file}:${t}${n}`},C7=(e,t)=>{const n=e.description??e.title??e.summary;if(!(n!=null&&n.trim()))throw new Error(`Finding ${t+1} has no description/title/summary`);const r=[_7(e),e.failure_scenario??e.reasoning].filter(Boolean).join(" — ");return{done:!1,text:n.trim(),description:r||void 0,source:"review"}},P7=e=>{let t;try{t=JSON.parse(e)}catch{throw new Error("Not valid JSON")}const n=Array.isArray(t)?t:Array.isArray(t==null?void 0:t.findings)?t.findings:null;if(!n)throw new Error('Expected a JSON array of findings, or an object with a "findings" array');if(n.length===0)throw new Error("No findings to add");return n.map((r,i)=>C7(r,i))},T7=({onAdd:e,disabled:t})=>{const[n,r]=C.useState(!1),[i,s]=C.useState(""),[o,a]=C.useState(null),[l,u]=C.useState(!1),c=()=>{r(!1),s(""),a(null)},d=async()=>{let h;try{h=P7(i)}catch(f){a(f instanceof Error?f.message:"Could not parse findings");return}u(!0),a(null);try{await e(h),c()}finally{u(!1)}};return g.jsxs(g.Fragment,{children:[g.jsx(le,{variant:"ghost",size:"small",onClick:()=>r(!0),disabled:t,children:"Add as phases"}),g.jsx(dd,{open:n,onClose:c,title:"Add /code-review findings",size:"small",children:g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[4]},children:[g.jsxs("p",{className:"text-sm",style:{margin:0,opacity:.7},children:["Paste the JSON findings from a ",g.jsx("code",{children:"/code-review"})," run. Each finding becomes a new, unchecked phase on this plan."]}),g.jsx(mo,{value:i,onChange:h=>s(h.target.value),placeholder:'[{ "description": "...", "file": "src/foo.ts", "line_start": 12, "failure_scenario": "..." }]',rows:10,disabled:l}),o&&g.jsx(jn,{variant:"warning",title:"Could not add phases",children:o}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[g.jsx(le,{type:"button",variant:"ghost",onClick:c,disabled:l,children:"Cancel"}),g.jsx(le,{type:"button",variant:"primary",onClick:d,disabled:l||!i.trim(),children:"Add phases"})]})]})})]})},E7=({planId:e,phaseIndex:t,disabled:n})=>{const r=q(a=>a.launchAgent),[i,s]=C.useState(!1),o=async a=>{if(a.stopPropagation(),!!e){s(!0);try{await r(e,t)}catch(l){alert(l.message)}finally{s(!1)}}};return g.jsx(Ut,{icon:g.jsx("span",{style:{fontSize:12,lineHeight:1},children:"▶"}),variant:"ghost",size:"small",label:e?"Start agent on this phase":"Plan needs an ID before an agent can run",onClick:o,disabled:n||i||!e,className:"transition-opacity",style:{color:Ge.textSecondary}})},j7=({plan:e,disabled:t})=>{const n=q(o=>o.launchPlanAudit),[r,i]=C.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,m7(e))}catch(o){alert(o.message)}finally{i(!1)}}};return g.jsx(le,{variant:"ghost",size:"small",onClick:s,disabled:t||r||!e.id,title:e.id?void 0:"Plan needs an ID before an agent can run",style:{color:Ge.textSecondary},children:"Audit phases against code"})},A7=({plan:e,disabled:t})=>{const[n,r]=C.useState("idle"),i=async()=>{const s=y7(e),o=await Ay(s);r(o?"copied":"failed"),setTimeout(()=>r("idle"),1500)};return g.jsx(le,{variant:"ghost",size:"small",onClick:i,disabled:t,icon:n==="copied"?g.jsx(cd,{size:14}):n==="failed"?g.jsx(rs,{size:14}):g.jsx(Ng,{size:14}),title:n==="copied"?"Copied":n==="failed"?"Copy failed — select and copy manually":"Copy clarification prompt",style:{color:n==="copied"?"#6A9B72":n==="failed"?"#A06060":Ge.textSecondary},children:"Copy Clarifications Prompt"})},R7=({planTitle:e,phaseIndex:t})=>{const[n,r]=C.useState("idle"),i=async s=>{s.stopPropagation();const o=`Start phase ${t+1} of plan "${e}" in papercamp/plans.md`,a=await Ay(o);r(a?"copied":"failed"),setTimeout(()=>r("idle"),1500)};return g.jsx(Ut,{icon:n==="copied"?g.jsx(cd,{size:16}):n==="failed"?g.jsx(rs,{size:16}):g.jsx(Ng,{size:16}),variant:"ghost",size:"small",label:n==="copied"?"Copied":n==="failed"?"Copy failed — select and copy manually":"Copy phase prompt",onClick:i,className:"transition-opacity",style:{color:n==="copied"?"#6A9B72":n==="failed"?"#A06060":Ge.textSecondary}})},SE=({plan:e})=>{const t=q(S=>S.loadPlans),n=q(S=>S.agentStatus),r=n!==null&&n.status!=="done"&&n.status!=="error",i=r&&n!==null&&n.planId===e.id?n.phaseIndex:null,s=r&&n!==null&&n.planId===e.id&&n.phaseIndex===void 0,[o,a]=C.useState(!1),[l,u]=C.useState(""),c=gE(e),d=e.status==="in-progress",h=e.status==="review";c!==null&&c.done===c.total&&c.total>0;const f=async()=>{a(!0),await Nn(e.title,{status:"in-progress"}),await t(),a(!1)},p=async()=>{a(!0),await Nn(e.title,{status:"planned"}),await t(),a(!1)},y=async S=>{const P=e.phases.map((j,E)=>E===S?{...j,done:!j.done}:j);a(!0),P.every(j=>j.done)&&e.status==="in-progress"?await Nn(e.title,{phases:P,status:"review"}):await Nn(e.title,{phases:P}),await t(),a(!1)},x=async()=>{a(!0),await Nn(e.title,{status:"done"}),await t(),a(!1)},m=async()=>{a(!0),await Nn(e.title,{status:"in-progress"}),await t(),a(!1)},v=async S=>{a(!0),await Nn(e.title,{status:S}),await t(),a(!1)},w=async S=>{a(!0),await Nn(e.title,{agent:S||null}),await t(),a(!1)},b=async S=>{a(!0),await Nn(e.title,{phases:[...e.phases,...S]}),await t(),a(!1)},_=async()=>{if(!l.trim())return;const P={date:new Date().toISOString().slice(0,10),text:l.trim().replace(/\n/g," ")},T=[...e.log??[],P];a(!0),await Nn(e.title,{log:T}),await t(),u(""),a(!1)};return g.jsxs("div",{children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:I[4],marginBottom:I[3]},children:[g.jsxs("h2",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:"1.75rem",margin:0,lineHeight:hn.tight,display:"flex",alignItems:"center",gap:I[3]},children:[g.jsx(Ly,{id:e.id}),e.title]}),!h&&g.jsx(le,{variant:"primary",size:"small",className:d?"btn-orange":"btn-green",onClick:d?p:f,disabled:o,children:d?"Stop":"Start"})]}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2],flexWrap:"wrap",marginBottom:I[4]},children:[g.jsx(Ws,{size:"small",width:140,value:e.status,onChange:v,disabled:o,options:hU.map(S=>({value:S,label:xE[S]}))}),g.jsx("span",{className:"text-sm",style:{opacity:.45},children:e.updated?`updated ${Lc(e.updated)}`:`created ${Lc(e.created)}`}),e.tags.map(S=>g.jsx(at,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:S},S))]}),g.jsx("div",{style:{marginBottom:I[1]},children:g.jsx(A7,{plan:e,disabled:r})}),e.body&&g.jsx("p",{className:"text-base",style:{margin:`0 0 ${I[4]}`,opacity:.8,lineHeight:hn.normal},children:e.body}),e.clarifications&&e.clarifications.length>0&&g.jsxs("div",{style:{marginBottom:I[5]},children:[g.jsx("h3",{style:{fontFamily:ae.serif,fontSize:ve.sm,fontWeight:600,margin:`0 0 ${I[3]}`,opacity:.65},children:"Clarifications"}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[2],marginBottom:I[3]},children:e.clarifications.map((S,P)=>g.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[g.jsx("span",{style:{fontWeight:600,marginRight:I[2]},children:S.date}),S.text]},`clar-${S.date}-${P}`))})]}),c!==null&&g.jsx("div",{style:{marginBottom:I[5]},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3]},children:[g.jsx("div",{style:{flex:1},children:g.jsx(wE,{pct:c.pct,color:Ry[e.status]})}),g.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[c.done,"/",c.total]})]})}),g.jsx("div",{style:{marginBottom:I[5]},children:g.jsx(Ws,{size:"small",width:220,value:e.agent??"",onChange:w,disabled:o,options:[{value:"",label:"Project default agent"},...RT.map(S=>({value:S,label:py[S]}))]})}),e.phases.length>0&&g.jsxs("div",{style:{marginBottom:I[8]},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:I[3],marginBottom:I[3]},children:[g.jsx("h3",{style:{fontFamily:ae.serif,fontSize:ve.sm,fontWeight:600,margin:0,opacity:.65},children:"Phases"}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2]},children:[s&&g.jsx("span",{className:"spinner",style:{opacity:.6},title:"Audit running…"}),g.jsx(j7,{plan:e,disabled:r}),g.jsx(T7,{onAdd:b,disabled:o})]})]}),g.jsx(tl,{data:e.phases,columns:[{key:"checkbox",header:"Status",cell:(S,P)=>g.jsx(ZF,{checked:S.done,onChange:()=>y(P),disabled:o}),width:2},{key:"title",header:"Title",cell:S=>g.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:I[2],textDecoration:S.done?"line-through":"none",opacity:S.done?.45:1},children:[S.text,S.source==="review"&&g.jsx(at,{size:"small",fillColor:"rgba(155, 122, 181, 0.25)",textColor:"#7B5E9E",children:"review"})]})},{key:"actions",header:"Actions",cell:(S,P)=>g.jsxs("div",{style:{display:"flex",gap:I[2],alignItems:"center"},children:[g.jsx(R7,{planTitle:e.title,phaseIndex:P}),!S.done&&i===P?g.jsx("span",{className:"spinner",style:{opacity:.6},title:`Agent ${n==null?void 0:n.status}…`}):!S.done&&g.jsx(E7,{planId:e.id,phaseIndex:P,disabled:r})]}),width:5}],expandable:{render:S=>S.description??null},showExpandColumn:!1,rowClassName:S=>S.source==="review"?"phase-row-review":void 0})]}),h&&g.jsxs("div",{style:{display:"flex",gap:I[3],marginBottom:I[6]},children:[g.jsx(le,{variant:"primary",size:"small",className:"btn-green",onClick:x,disabled:o,children:"Approve & close"}),g.jsx(le,{variant:"primary",size:"small",className:"btn-orange",onClick:m,disabled:o,children:"Needs changes"})]}),g.jsxs("div",{style:{marginBottom:I[8]},children:[g.jsx("h3",{style:{fontFamily:ae.serif,fontSize:ve.sm,fontWeight:600,margin:`0 0 ${I[3]}`,opacity:.65},children:"Log"}),e.log&&e.log.length>0&&g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[2],marginBottom:I[3]},children:e.log.map((S,P)=>g.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[g.jsx("span",{style:{fontWeight:600,marginRight:I[2]},children:S.date}),S.text]},`${S.date}-${P}`))}),g.jsxs("div",{style:{display:"flex",gap:I[2],alignItems:"flex-end"},children:[g.jsx(mo,{value:l,onChange:S=>u(S.target.value),placeholder:"Add a log entry…",rows:2}),g.jsx(le,{variant:"primary",size:"small",className:"btn-violet",onClick:_,disabled:o||!l.trim(),children:"Add entry"})]})]})]})},L7=({view:e,onChange:t})=>g.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[g.jsx(Ut,{icon:g.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[g.jsx("title",{children:"List view icon"}),g.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),g.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),g.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),g.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),g.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),g.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),label:"List view",title:"List view",size:"small",variant:"ghost",isActive:e==="list",onClick:()=>t("list")}),g.jsx(Ut,{icon:g.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[g.jsx("title",{children:"Board view icon"}),g.jsx("rect",{x:"3",y:"3",width:"5",height:"18",rx:"1"}),g.jsx("rect",{x:"10",y:"3",width:"5",height:"12",rx:"1"}),g.jsx("rect",{x:"17",y:"3",width:"5",height:"15",rx:"1"})]}),label:"Board view",title:"Board view",size:"small",variant:"ghost",isActive:e==="board",onClick:()=>t("board")})]}),M7=()=>{const{plans:e,plansError:t,activePlanTitle:n,setActivePlanTitle:r,activeIdeaTitle:i,setActiveIdeaTitle:s,view:o,setView:a,ideaEntries:l,agentStatus:u}=q(),c=u!=null&&u.ideaId&&(u.status==="starting"||u.status==="running")?u.ideaId:null,d=()=>{r(null),s(null)},h=x=>{r(x),s(null)},f=x=>{s(x),r(null)},p=n?e==null?void 0:e.entries.find(x=>x.title===n):null,y=i?l.find(x=>x.title===i):null;return t?g.jsxs("div",{children:[g.jsx(Cn,{children:"Plans"}),g.jsx(jn,{variant:"error",title:"Couldn't load plans.md",children:t})]}):e?p?g.jsxs("div",{children:[g.jsx("div",{style:{marginBottom:I[4]},children:g.jsx(le,{variant:"ghost",size:"small",onClick:d,children:"← All plans"})}),g.jsx(SE,{plan:p})]}):y?g.jsxs("div",{children:[g.jsx("div",{style:{marginBottom:I[4]},children:g.jsx(le,{variant:"ghost",size:"small",onClick:d,children:"← All plans"})}),g.jsxs("div",{style:{fontFamily:ae.body,fontSize:ve.base,lineHeight:hn.relaxed,color:"#1C1B18"},children:[g.jsxs("h2",{style:{fontFamily:ae.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${I[4]}`,lineHeight:hn.tight,display:"flex",alignItems:"center",gap:I[3]},children:[y.id&&g.jsx(at,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:y.id}),y.title]}),g.jsx(ll,{children:y.body.replace(/^#{1,3}\s+.+(\n|$)/,"").replace(/^-{3,}\s*$/m,"").trim()}),g.jsx("div",{style:{marginTop:I[6]},children:g.jsx(I7,{ideaId:y.id})})]})]}):g.jsxs("div",{children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:I[7]},children:[g.jsx(Cn,{children:"Plans"}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2]},children:[g.jsx(c7,{}),g.jsx(L7,{view:o,onChange:a})]})]}),e.warnings.length>0&&g.jsx(jn,{variant:"warning",title:"Some entries couldn't be parsed",children:g.jsx("ul",{children:e.warnings.map(x=>g.jsxs("li",{children:[x.title,": ",x.message]},x.title))})}),e.entries.length===0&&l.length===0?g.jsxs("p",{style:{opacity:.5},children:["No plans yet. Run ",g.jsx("code",{children:'paper-camp add plan "name"'}),", or add an idea from the sidebar."]}):o==="board"?g.jsx(f7,{plans:e.entries}):g.jsx(k7,{plans:e.entries,activePlanTitle:n,onOpenPlan:h,ideaEntries:l,onOpenIdea:f,draftingIdeaId:c})]}):g.jsxs("div",{children:[g.jsx(Cn,{children:"Plans"}),g.jsx("p",{style:{opacity:.5},children:"Loading…"})]})},I7=({ideaId:e})=>{const t=q(u=>u.launchIdeaExtend),n=q(u=>u.agentStatus),r=n!==null&&n.status!=="done"&&n.status!=="error",{state:i,errorMessage:s,run:o}=vE(),a=()=>{e&&o(async()=>{const u=q.getState().ideaEntries.find(c=>c.id===e);u&&await t(e,g7(u))})},l=i==="error"?s??"Extension failed":e?void 0:"Idea needs an ID before an agent can run";return g.jsx(le,{variant:"ghost",size:"small",onClick:a,disabled:r||i==="loading"||!e,title:l,children:i==="loading"?"Extending…":i==="success"?"Extension sent!":i==="error"?"Extension failed":"Extend with AI"})},D7=({open:e,onClose:t,onAdd:n})=>{const[r,i]=C.useState(""),[s,o]=C.useState(""),[a,l]=C.useState(!1);C.useEffect(()=>{e&&(i(""),o(""),l(!1))},[e]);const u=async c=>{c.preventDefault(),!(!r.trim()||a)&&(l(!0),await n({title:r.trim(),content:s.trim()||void 0}),l(!1),t())};return g.jsx(dd,{open:e,onClose:t,title:"New idea",size:"small",children:g.jsxs("form",{onSubmit:u,style:{display:"flex",flexDirection:"column",gap:I[4]},children:[g.jsx(qn,{label:"Title",value:r,onChange:c=>i(c.target.value),placeholder:"Idea title…",disabled:a,autoFocus:!0,required:!0}),g.jsx(mo,{label:"Description",value:s,onChange:c=>o(c.target.value),placeholder:"Optional details…",disabled:a,rows:4}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[g.jsx(le,{type:"button",variant:"ghost",onClick:t,disabled:a,children:"Cancel"}),g.jsx(le,{type:"submit",variant:"primary",disabled:!r.trim()||a,children:"Add"})]})]})})},N7=({pct:e,color:t})=>g.jsx("div",{style:{width:40,flexShrink:0},children:g.jsx(UC,{value:e,color:t,height:3})}),Au=({plan:e,active:t,onClick:n,action:r})=>{const i=cK(e),s=Ry[e.status];return g.jsx(ur,{active:t,onClick:n,size:"small",icon:g.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:s,flexShrink:0}}),action:g.jsxs(g.Fragment,{children:[i!==null&&g.jsx(N7,{pct:i,color:s}),r]}),children:e.title})},B7=()=>{const e=uo(),t=rg({select:S=>S.location.pathname}),{plans:n,loadPlans:r,loadIdeas:i,activePlanTitle:s,setActivePlanTitle:o,activeIdeaTitle:a,setActiveIdeaTitle:l,ideaEntries:u}=q(),[c,d]=C.useState(!1),[h,f]=C.useState(!1),p=(n==null?void 0:n.entries.filter(S=>S.status==="in-progress"||S.status==="review"))??[],y=(n==null?void 0:n.entries.filter(S=>S.status==="planned"))??[],x=(n==null?void 0:n.entries.filter(S=>S.status==="idea"))??[],m=async S=>{await OK(S),await r(),d(!1)},v=async S=>{await $K(S),await i(),f(!1)},w=async S=>{window.confirm(`Delete idea "${S}"?`)&&(await UK(S),await r(),s===S&&o(null))},b=S=>{e({to:"/"}),o(S.title),l(null)},_=S=>{l(S),o(null),e({to:"/"})};return g.jsxs(g.Fragment,{children:[p.length>0&&g.jsx(ln,{label:"In progress",children:p.map(S=>g.jsx(Au,{plan:S,active:t==="/"&&s===S.title,onClick:()=>b(S)},S.title))}),y.length>0&&g.jsx(ln,{label:"Planned",children:y.map(S=>g.jsx(Au,{plan:S,active:t==="/"&&s===S.title,onClick:()=>b(S)},S.title))}),u.filter(S=>S.status!=="done").length>0&&g.jsx(ln,{label:"Ideas",action:g.jsx(Ut,{icon:g.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:"New idea",onClick:()=>f(!0)}),children:u.filter(S=>S.status!=="done").map(S=>g.jsx(ur,{size:"small",active:a===S.title,onClick:()=>_(S.title),children:S.title},S.title))}),g.jsxs(ln,{label:"Backlog",action:g.jsx(Ut,{icon:g.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:"Add to backlog",onClick:()=>d(!0)}),children:[x.map(S=>g.jsx(Au,{plan:S,active:t==="/"&&s===S.title,onClick:()=>b(S),action:g.jsx(Ut,{icon:g.jsx("span",{children:"×"}),variant:"ghost",size:"small",label:"Delete",onClick:P=>{P.stopPropagation(),w(S.title)}})},S.title)),x.length===0&&g.jsx("span",{className:"text-sm",style:{display:"block",padding:`${I[1]} ${I[3]}`,opacity:.35,fontStyle:"italic"},children:"Nothing yet"})]}),g.jsx(mU,{open:c,onClose:()=>d(!1),onAdd:m}),g.jsx(D7,{open:h,onClose:()=>f(!1),onAdd:v})]})},F7=()=>{const{plans:e,plansError:t,activePlanTitle:n,setActivePlanTitle:r,setActiveIdeaTitle:i}=q(),s=()=>{r(null),i(null)},o=u=>{r(u),i(null)},a=(e==null?void 0:e.entries.filter(u=>u.status==="review"))??[],l=n?e==null?void 0:e.entries.find(u=>u.title===n):null;return t?g.jsxs("div",{children:[g.jsx(Cn,{children:"Review"}),g.jsx(jn,{variant:"error",title:"Couldn't load plans.md",children:t})]}):e?l?g.jsxs("div",{children:[g.jsx("div",{style:{marginBottom:I[4]},children:g.jsx(le,{variant:"ghost",size:"small",onClick:s,children:"← Back to review"})}),g.jsx(SE,{plan:l})]}):g.jsxs("div",{children:[g.jsx(Cn,{children:"Review"}),a.length===0?g.jsx("p",{style:{opacity:.5},children:"No plans pending review."}):g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[3]},children:a.map(u=>g.jsx(Ic,{plan:u,onOpen:o},u.title))})]}):g.jsxs("div",{children:[g.jsx(Cn,{children:"Review"}),g.jsx("p",{style:{opacity:.5},children:"Loading…"})]})},V7=()=>{const e=uo(),t=rg({select:l=>l.location.pathname}),{plans:n,activePlanTitle:r,setActivePlanTitle:i,setActiveIdeaTitle:s}=q(),o=(n==null?void 0:n.entries.filter(l=>l.status==="review"))??[],a=l=>{e({to:"/review"}),i(l),s(null)};return g.jsx(ln,{label:"Pending review",children:o.length===0?g.jsx("span",{className:"text-sm",style:{display:"block",padding:"0.25rem 0.75rem",opacity:.35,fontStyle:"italic"},children:"None"}):o.map(l=>g.jsx(Au,{plan:l,active:t==="/review"&&r===l.title,onClick:()=>a(l.title)},l.title))})},$7=async()=>{try{return(await fetch("/api/config")).json()}catch{return null}},Qh=async e=>{try{return(await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok}catch{return!1}},z7=async()=>{try{return(await(await fetch("/api/configs")).json()).files}catch{return[]}},O7=async e=>{try{const t=await fetch(`/api/configs?name=${encodeURIComponent(e)}`);return t.ok?(await t.json()).content:null}catch{return null}},bE=async()=>{try{return await(await fetch("/api/env")).json()}catch{return{exists:!1,exampleExists:!1,entries:[],missingKeys:[]}}},U7=async e=>{try{return(await fetch("/api/env",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entries:e})})).ok}catch{return!1}},rS=["phase","planDraft","ideaExtend","commitSuggest"],W7={phase:"Phase run",planDraft:"Plan draft",ideaExtend:"Idea extend",commitSuggest:"Commit suggest"},H7=({taskKey:e,agentConfig:t,isLast:n,onSave:r,isSaved:i})=>{const s=Dh[t.agent]??Dh["claude-code"],o=s.model,a=s.effort,[l,u]=C.useState(t.model??"");C.useEffect(()=>{u(t.model??"")},[t.model]);const c=p=>{var v;const y=p,x=Dh[y],m={agent:y};t.model&&(x.model===null||(v=x.model)!=null&&v.includes(t.model))&&(m.model=t.model),t.effort&&Array.isArray(x.effort)&&(m.effort=t.effort),r(e,m)},d=p=>{r(e,{...t,model:p||void 0})},h=()=>{r(e,{...t,model:l||void 0})},f=p=>{r(e,{...t,effort:p||void 0})};return g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],...!n&&{borderBottom:Tu},paddingBottom:I[2],paddingTop:I[2]},children:[g.jsx("span",{style:{width:110,flexShrink:0,fontSize:ve.sm,opacity:.65},children:W7[e]}),g.jsx(Ws,{size:"small",value:t.agent,onChange:c,options:RT.map(p=>({value:p,label:py[p]}))}),Array.isArray(o)?g.jsx(Ws,{size:"small",value:t.model??"",onChange:d,options:[{value:"",label:"Default"},...o.map(p=>({value:p,label:p}))]}):o===null?g.jsx(qn,{size:"small",value:l,placeholder:"Default model",onChange:p=>u(p.target.value),onBlur:h}):null,g.jsx("div",{style:{visibility:Array.isArray(a)?"visible":"hidden"},children:g.jsx(Ws,{size:"small",value:t.effort??"",onChange:f,options:[{value:"",label:"Default"},...(Array.isArray(a)?a:[]).map(p=>({value:p,label:p}))]})}),i&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]})},K7=()=>{const e=C.useRef(null),[t,n]=C.useState(void 0),{iconDataUri:r,loading:i}=pE(),[s,o]=C.useState(null),a=s??r,[l,u]=C.useState(!1),[c,d]=C.useState(!1),[h,f]=C.useState(""),[p,y]=C.useState(!1),[x,m]=C.useState(!1),[v,w]=C.useState(""),[b,_]=C.useState(!1),[S,P]=C.useState(!1),[T,j]=C.useState(null);C.useEffect(()=>{$7().then(B=>{n(B),(B==null?void 0:B.port)!==void 0&&f(String(B.port)),(B==null?void 0:B.projectName)!==void 0&&w(B.projectName)})},[]);const E=async(B,F)=>{const V=t==null?void 0:t.defaultAgents,W={phase:(V==null?void 0:V.phase)??Fo.phase,planDraft:(V==null?void 0:V.planDraft)??Fo.planDraft,ideaExtend:(V==null?void 0:V.ideaExtend)??Fo.ideaExtend,commitSuggest:(V==null?void 0:V.commitSuggest)??Fo.commitSuggest,[B]:F};await Qh({defaultAgents:W})&&(n(z=>z&&{...z,defaultAgents:W}),j(B),setTimeout(()=>j(null),2e3))},L=async()=>{const B=Number(h);if(!Number.isInteger(B)||B<=0)return;y(!0);const F=await Qh({port:B});y(!1),F&&(n(V=>V&&{...V,port:B}),m(!0),setTimeout(()=>m(!1),2e3))},M=async()=>{const B=v.trim();if(!B)return;_(!0);const F=await Qh({projectName:B});_(!1),F&&(n(V=>V&&{...V,projectName:B}),w(B),P(!0),setTimeout(()=>P(!1),2e3))},$=async B=>{var W;const F=(W=B.target.files)==null?void 0:W[0];if(!F)return;u(!0);const V=new FileReader;V.onloadend=async()=>{const D=V.result,z=await oK(D);u(!1),z&&(d(!0),o(D),setTimeout(()=>d(!1),2e3))},V.readAsDataURL(F)};return g.jsxs("div",{children:[g.jsx("div",{style:{marginBottom:I[6]},children:g.jsx("h2",{style:{margin:0},children:"Project Info"})}),t===void 0&&g.jsx("p",{children:"Loading…"}),t===null&&g.jsxs(jn,{variant:"warning",title:"No papercamp/config.json found",children:["Run ",g.jsx("code",{children:"paper-camp init"})," in this directory first."]}),t&&g.jsxs(Us,{size:"small",children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:I[3],borderBottom:Tu,paddingBottom:I[3]},children:[g.jsx(qn,{value:v,onChange:B=>w(B.target.value),label:"Project Name"}),g.jsx(le,{variant:"secondary",size:"small",onClick:M,disabled:b||!v.trim()||v.trim()===t.projectName,children:b?"Saving…":"Save"}),g.jsxs(at,{size:"small",fillColor:"rgba(143, 185, 150, 0.25)",textColor:Ge.accentGreenDark,children:["v",t.version]}),S&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],borderBottom:Tu,paddingBottom:I[3],paddingTop:I[3]},children:[a&&g.jsx("img",{src:a,alt:"Project icon",style:{width:40,height:40,objectFit:"contain",flexShrink:0,borderRadius:4}}),g.jsxs("div",{children:[g.jsx("input",{ref:e,type:"file",accept:".svg,.png,.jpg,.jpeg,.gif,.webp",onChange:$,style:{display:"none"}}),g.jsx(le,{variant:"secondary",size:"small",onClick:()=>{var B;return(B=e.current)==null?void 0:B.click()},disabled:l,children:l?"Uploading…":"Choose File"}),c&&g.jsx("span",{className:"text-sm",style:{opacity:.6,marginLeft:I[2]},children:"Saved"}),i&&g.jsx("p",{className:"text-sm",style:{opacity:.5,margin:`${I[1]} 0 0`},children:"Loading…"}),!i&&!a&&!l&&g.jsx("p",{className:"text-sm",style:{opacity:.45,margin:`${I[1]} 0 0`},children:"No icon set."})]})]}),g.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:I[3],borderBottom:Tu,paddingBottom:I[3],paddingTop:I[3]},children:[g.jsx(qn,{type:"number",value:h,onChange:B=>f(B.target.value),label:"Port",helperText:"Default for `paper-camp dev`. Does not affect the running server."}),g.jsx(le,{variant:"secondary",size:"small",onClick:L,disabled:p||!h,children:p?"Saving…":"Save"}),x&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),rS.map((B,F)=>{var V;return g.jsx(H7,{taskKey:B,agentConfig:((V=t.defaultAgents)==null?void 0:V[B])??Fo[B],isLast:F===rS.length-1,onSave:E,isSaved:T===B},B)})]}),g.jsxs("p",{style:{opacity:.45,fontSize:ve.sm,marginTop:I[4]},children:[g.jsx("strong",{children:"Initialized:"})," ",t?new Date(t.initializedAt).toLocaleString():"—"]})]})},G7=e=>{try{const t=JSON.parse(e);return!t.scripts||typeof t.scripts!="object"?null:Object.entries(t.scripts).map(([n,r])=>({name:n,command:r}))}catch{return null}},Y7=({fileName:e})=>{const[t,n]=C.useState(null),[r,i]=C.useState(!0);if(C.useEffect(()=>{i(!0),O7(e).then(o=>{n(o),i(!1)})},[e]),r)return g.jsx("p",{children:"Loading…"});if(t===null)return g.jsxs(jn,{variant:"warning",title:"Could not load file",children:[e," not found."]});const s=e==="package.json"?G7(t):null;return g.jsxs("div",{children:[g.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:I[4]},children:g.jsx("h2",{style:{margin:0},children:e})}),s?g.jsx(tl,{data:s,columns:[{key:"name",header:"Script",cell:o=>g.jsx("span",{style:{fontFamily:ae.mono},children:o.name}),width:4},{key:"command",header:"Command",cell:o=>g.jsx("span",{style:{fontFamily:ae.mono},children:o.command})}]}):g.jsx(R3,{code:t,filename:e})]})},iS=e=>/key|secret|token|password/i.test(e),X7=()=>{const[e,t]=C.useState(!0),[n,r]=C.useState([]),[i,s]=C.useState([]),[o,a]=C.useState(new Set),[l,u]=C.useState(!1),[c,d]=C.useState(!1),[h,f]=C.useState(null);C.useEffect(()=>{bE().then(b=>{r(b.entries),s(b.missingKeys),t(!1)})},[]);const p=(b,_)=>{r(S=>S.map((P,T)=>T===b?{...P,..._}:P))},y=()=>r(b=>[...b,{key:"",value:""}]),x=b=>{r(_=>[..._,{key:b,value:""}]),s(_=>_.filter(S=>S!==b))},m=b=>{r(_=>_.filter((S,P)=>P!==b)),a(_=>{const S=new Set(_);return S.delete(b),S})},v=b=>a(_=>{const S=new Set(_);return S.has(b)?S.delete(b):S.add(b),S}),w=async()=>{const b=n.map(P=>({key:P.key.trim(),value:P.value})).filter(P=>P.key.length>0);if(new Set(b.map(P=>P.key)).size!==b.length){f("Duplicate keys are not allowed");return}f(null),u(!0);const S=await U7(b);u(!1),S?(r(b),d(!0),setTimeout(()=>d(!1),2e3)):f("Failed to save .env")};return e?g.jsx("p",{children:"Loading…"}):g.jsxs("div",{children:[g.jsx("h2",{style:{margin:0,marginBottom:I[4]},children:"Environment Variables"}),h&&g.jsx(jn,{variant:"warning",title:"Could not save",children:h}),i.length>0&&g.jsx(jn,{variant:"warning",title:"Missing from .env",children:g.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:I[2],alignItems:"center"},children:[g.jsx("span",{children:"Present in .env.example but not set:"}),i.map(b=>g.jsxs(le,{variant:"secondary",size:"small",onClick:()=>x(b),children:["+ ",b]},b))]})}),g.jsx(tl,{data:n,columns:[{key:"key",header:"Key",cell:(b,_)=>g.jsx(qn,{value:b.key,placeholder:"KEY",style:{fontFamily:ae.mono},onChange:S=>p(_,{key:S.target.value})}),width:6},{key:"value",header:"Value",cell:(b,_)=>{const S=iS(b.key)&&!o.has(_);return g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2]},children:[g.jsx(qn,{type:S?"password":"text",value:b.value,placeholder:"value",style:{fontFamily:ae.mono,flex:1},onChange:P=>p(_,{value:P.target.value})}),iS(b.key)&&g.jsx(le,{variant:"ghost",size:"small",onClick:()=>v(_),children:S?"Show":"Hide"})]})}},{key:"actions",header:"",width:2,cell:(b,_)=>g.jsx(Ut,{icon:g.jsx(rs,{}),variant:"ghost",size:"small",label:"Remove variable",onClick:()=>m(_)})}]}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],marginTop:I[4]},children:[g.jsx(le,{variant:"secondary",size:"small",onClick:y,children:"+ Add variable"}),g.jsx(le,{variant:"primary",size:"small",onClick:w,disabled:l,children:l?"Saving…":"Save"}),c&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]})]})},Q7=()=>{const e=q(t=>t.activeSettingsSection);return g.jsxs("div",{children:[g.jsx(Cn,{children:"Settings"}),e==="general"&&g.jsx(K7,{}),e==="env"&&g.jsx(X7,{}),e.startsWith("config:")&&g.jsx(Y7,{fileName:e.slice(7)})]})},q7=()=>{const e=q(o=>o.activeSettingsSection),t=q(o=>o.setActiveSettingsSection),n=q(o=>o.settingsConfigFiles),r=q(o=>o.setSettingsConfigFiles),[i,s]=C.useState(!1);return C.useEffect(()=>{z7().then(r),bE().then(o=>s(o.exists||o.exampleExists))},[r]),g.jsxs(g.Fragment,{children:[g.jsx(ln,{label:"General",children:g.jsx(ur,{size:"small",active:e==="general",onClick:()=>t("general"),children:"Project Info"})}),i&&g.jsx(ln,{label:"Environment",children:g.jsx(ur,{size:"small",active:e==="env",onClick:()=>t("env"),children:"Env Vars"})}),n.length>0&&g.jsx(ln,{label:"Config Files",children:n.map(o=>g.jsx(ur,{size:"small",active:e===`config:${o}`,onClick:()=>t(`config:${o}`),children:o},o))})]})},sS=[{id:"plans",label:"Plans",path:"/"},{id:"review",label:"Review",path:"/review"},{id:"docs",label:"Docs",path:"/docs"},{id:"settings",label:"Settings",path:"/settings"}],Z7=()=>{var h;const e=uo(),t=rg({select:f=>f.location.pathname}),n=q(f=>f.loadPlans),r=q(f=>f.loadIdeas),i=q(f=>f.setActivePlanTitle),s=q(f=>f.setActiveIdeaTitle),o=(h=sS.find(f=>f.path===t))==null?void 0:h.id,a=q(f=>f.docSearchQuery),l=q(f=>f.setDocSearchQuery),[u,c]=C.useState(!0),d=fy();return C.useEffect(()=>{n(),r()},[n,r]),C.useEffect(()=>{i(null),s(null)},[t,i,s]),g.jsxs(NF,{background:{texture:"paper",ruledType:"grid",ruledColor:"blue"},showHeader:!1,showSidebar:!1,showPage:!1,bleedBottom:!0,stackOpen:u,navigationIsland:g.jsx("nav",{"aria-label":"Navigation island",children:g.jsxs(VF,{children:[g.jsx(mE,{size:"sm"}),g.jsx("div",{style:{width:1,height:24,background:"rgba(0,0,0,0.12)"}}),t==="/docs"&&g.jsx("div",{style:{width:180},children:g.jsx(qn,{size:"small",placeholder:"Search docs…",value:a,onChange:f=>l(f.target.value)})}),g.jsx("div",{style:{width:1,height:24,background:"rgba(0,0,0,0.12)"}}),g.jsx("div",{className:"flex items-center gap-1",children:sS.map(f=>g.jsx(le,{variant:"ghost",size:"small",isActive:f.id===o,onClick:()=>e({to:f.path}),"aria-current":f.id===o?"page":void 0,children:f.label},f.id))})]})}),children:[g.jsx("div",{className:"flex h-full min-h-0 justify-center items-stretch box-border overflow-hidden",style:{paddingRight:u?Ii.stackPanelWidth:0},children:g.jsxs("div",{className:"flex h-full min-h-0 w-full max-w-layout",style:{gap:Ii.contentGap},children:[g.jsxs(uK,{routeKey:t,children:[t==="/"&&g.jsx(B7,{}),t==="/review"&&g.jsx(V7,{}),t==="/docs"&&g.jsx(u7,{}),t==="/settings"&&g.jsx(q7,{})]}),g.jsx("div",{className:"flex flex-1 flex-col min-h-0 min-w-0",children:g.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:g.jsx(zC,{texture:{texture:"parchment"},style:{height:"auto",paddingBottom:`calc(${Ii.navIslandBottom} + ${Ii.navIslandHeight} + ${OC[4]})`},children:g.jsx(cy,{mode:"wait",children:g.jsx(jc.div,{initial:d?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:d?void 0:{opacity:0,y:-8},transition:{duration:d?0:.2,ease:"easeOut"},children:g.jsx(Yk,{})},t)})})})})]})}),g.jsx(t7,{open:u,onToggle:()=>c(f=>!f)})]})},ul=$L({component:Z7}),J7=nd({getParentRoute:()=>ul,path:"/",component:M7}),eG=nd({getParentRoute:()=>ul,path:"/review",component:F7}),tG=nd({getParentRoute:()=>ul,path:"/docs",component:a7}),nG=nd({getParentRoute:()=>ul,path:"/settings",component:Q7}),rG=ul.addChildren([J7,eG,tG,nG]),iG=qL({routeTree:rG}),kE=document.getElementById("root");if(!kE)throw new Error("#root element not found");vk(kE).render(g.jsx(C.StrictMode,{children:g.jsx(eM,{router:iG})}));
208
+ //# sourceMappingURL=main-8b5RQGnS.js.map