@dendelion/paper-camp 0.2.1 → 0.4.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.
Files changed (40) hide show
  1. package/README.md +16 -7
  2. package/dist/app/assets/main-6nYButky.js +232 -0
  3. package/dist/app/assets/main-6nYButky.js.map +1 -0
  4. package/dist/app/assets/main-DUnpdvQF.css +1 -0
  5. package/dist/app/index.html +2 -2
  6. package/dist/chunks/serializer.B8u-L8BI.js +5249 -0
  7. package/dist/chunks/serializer.B8u-L8BI.js.map +1 -0
  8. package/dist/cli/index.js +2150 -932
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/core/frontmatter-schemas.d.ts +11 -0
  11. package/dist/core/frontmatter-schemas.d.ts.map +1 -0
  12. package/dist/core/frontmatter.test.d.ts +2 -0
  13. package/dist/core/frontmatter.test.d.ts.map +1 -0
  14. package/dist/core/idea-status.d.ts +7 -0
  15. package/dist/core/idea-status.d.ts.map +1 -0
  16. package/dist/core/index.d.ts +1 -0
  17. package/dist/core/index.d.ts.map +1 -1
  18. package/dist/core/index.js +48 -29
  19. package/dist/core/parser.d.ts +24 -3
  20. package/dist/core/parser.d.ts.map +1 -1
  21. package/dist/core/readers.d.ts +27 -0
  22. package/dist/core/readers.d.ts.map +1 -0
  23. package/dist/core/readers.test.d.ts +2 -0
  24. package/dist/core/readers.test.d.ts.map +1 -0
  25. package/dist/core/scaffold.d.ts +4 -2
  26. package/dist/core/scaffold.d.ts.map +1 -1
  27. package/dist/core/schemas.d.ts +75 -12
  28. package/dist/core/schemas.d.ts.map +1 -1
  29. package/dist/core/serializer.d.ts +52 -2
  30. package/dist/core/serializer.d.ts.map +1 -1
  31. package/dist/types/index.d.ts +24 -4
  32. package/dist/types/index.d.ts.map +1 -1
  33. package/dist/types/index.js +32 -10
  34. package/dist/types/index.js.map +1 -1
  35. package/package.json +2 -1
  36. package/dist/app/assets/main-B61tEYvn.css +0 -1
  37. package/dist/app/assets/main-tAEncq68.js +0 -272
  38. package/dist/app/assets/main-tAEncq68.js.map +0 -1
  39. package/dist/chunks/serializer.D1Ts_p8h.js +0 -462
  40. package/dist/chunks/serializer.D1Ts_p8h.js.map +0 -1
@@ -0,0 +1,232 @@
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 Du=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gS={exports:{}},$c={},yS={exports:{}},oe={};/**
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 Ka=Symbol.for("react.element"),IE=Symbol.for("react.portal"),DE=Symbol.for("react.fragment"),NE=Symbol.for("react.strict_mode"),BE=Symbol.for("react.profiler"),FE=Symbol.for("react.provider"),VE=Symbol.for("react.context"),$E=Symbol.for("react.forward_ref"),zE=Symbol.for("react.suspense"),OE=Symbol.for("react.memo"),UE=Symbol.for("react.lazy"),Uy=Symbol.iterator;function WE(e){return e===null||typeof e!="object"?null:(e=Uy&&e[Uy]||e["@@iterator"],typeof e=="function"?e:null)}var vS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xS=Object.assign,wS={};function oo(e,t,n){this.props=e,this.context=t,this.refs=wS,this.updater=n||vS}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 SS(){}SS.prototype=oo.prototype;function am(e,t,n){this.props=e,this.context=t,this.refs=wS,this.updater=n||vS}var lm=am.prototype=new SS;lm.constructor=am;xS(lm,oo.prototype);lm.isPureReactComponent=!0;var Wy=Array.isArray,bS=Object.prototype.hasOwnProperty,um={current:null},kS={key:!0,ref:!0,__self:!0,__source:!0};function _S(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)bS.call(t,r)&&!kS.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:Ka,type:e,key:s,ref:o,props:i,_owner:um.current}}function HE(e,t){return{$$typeof:Ka,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function cm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ka}function KE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Hy=/\/+/g;function _d(e,t){return typeof e=="object"&&e!==null&&e.key!=null?KE(""+e.key):t.toString(36)}function Zl(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 Ka:case IE:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+_d(o,0):r,Wy(i)?(n="",e!=null&&(n=e.replace(Hy,"$&/")+"/"),Zl(i,t,n,"",function(u){return u})):i!=null&&(cm(i)&&(i=HE(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Hy,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Wy(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+_d(s,a);o+=Zl(s,t,n,l,i)}else if(l=WE(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+_d(s,a++),o+=Zl(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 pl(e,t,n){if(e==null)return e;var r=[],i=0;return Zl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function GE(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},Jl={transition:null},YE={ReactCurrentDispatcher:_t,ReactCurrentBatchConfig:Jl,ReactCurrentOwner:um};function CS(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:pl,forEach:function(e,t,n){pl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return pl(e,function(){t++}),t},toArray:function(e){return pl(e,function(t){return t})||[]},only:function(e){if(!cm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=oo;oe.Fragment=DE;oe.Profiler=BE;oe.PureComponent=am;oe.StrictMode=NE;oe.Suspense=zE;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=YE;oe.act=CS;oe.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=xS({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=um.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)bS.call(t,l)&&!kS.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:Ka,type:e.type,key:i,ref:s,props:r,_owner:o}};oe.createContext=function(e){return e={$$typeof:VE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:FE,_context:e},e.Consumer=e};oe.createElement=_S;oe.createFactory=function(e){var t=_S.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:$E,render:e}};oe.isValidElement=cm;oe.lazy=function(e){return{$$typeof:UE,_payload:{_status:-1,_result:e},_init:GE}};oe.memo=function(e,t){return{$$typeof:OE,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Jl.transition;Jl.transition={};try{e()}finally{Jl.transition=t}};oe.unstable_act=CS;oe.useCallback=function(e,t){return _t.current.useCallback(e,t)};oe.useContext=function(e){return _t.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return _t.current.useDeferredValue(e)};oe.useEffect=function(e,t){return _t.current.useEffect(e,t)};oe.useId=function(){return _t.current.useId()};oe.useImperativeHandle=function(e,t,n){return _t.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return _t.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return _t.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return _t.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return _t.current.useReducer(e,t,n)};oe.useRef=function(e){return _t.current.useRef(e)};oe.useState=function(e){return _t.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return _t.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return _t.current.useTransition()};oe.version="18.3.1";yS.exports=oe;var C=yS.exports;const Hi=Vc(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 XE=C,QE=Symbol.for("react.element"),qE=Symbol.for("react.fragment"),ZE=Object.prototype.hasOwnProperty,JE=XE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ej={key:!0,ref:!0,__self:!0,__source:!0};function PS(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)ZE.call(t,r)&&!ej.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:QE,type:e,key:s,ref:o,props:i,_owner:JE.current}}$c.Fragment=qE;$c.jsx=PS;$c.jsxs=PS;gS.exports=$c;var p=gS.exports,TS={exports:{}},Zt={},ES={exports:{}},jS={};/**
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(N,z){var b=N.length;N.push(z);e:for(;0<b;){var U=b-1>>>1,Z=N[U];if(0<i(Z,z))N[U]=z,N[b]=Z,b=U;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var z=N[0],b=N.pop();if(b!==z){N[0]=b;e:for(var U=0,Z=N.length,A=Z>>>1;U<A;){var le=2*(U+1)-1,fe=N[le],de=le+1,Ze=N[de];if(0>i(fe,b))de<Z&&0>i(Ze,fe)?(N[U]=Ze,N[de]=b,U=de):(N[U]=fe,N[le]=b,U=le);else if(de<Z&&0>i(Ze,b))N[U]=Ze,N[de]=b,U=de;else break e}}return z}function i(N,z){var b=N.sortIndex-z.sortIndex;return b!==0?b:N.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,m=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,g=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(N){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=N)r(u),z.sortIndex=z.expirationTime,t(l,z);else break;z=n(u)}}function S(N){if(y=!1,w(N),!m)if(n(l)!==null)m=!0,$(P);else{var z=n(u);z!==null&&W(S,z.startTime-N)}}function P(N,z){m=!1,y&&(y=!1,g(_),_=-1),f=!0;var b=h;try{for(w(z),d=n(l);d!==null&&(!(d.expirationTime>z)||N&&!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 le=n(u);le!==null&&W(S,le.startTime-z),A=!1}return A}finally{d=null,h=b,f=!1}}var T=!1,E=null,_=-1,R=5,k=-1;function L(){return!(e.unstable_now()-k<R)}function I(){if(E!==null){var N=e.unstable_now();k=N;var z=!0;try{z=E(!0,N)}finally{z?V():(T=!1,E=null)}}else T=!1}var V;if(typeof v=="function")V=function(){v(I)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,F=B.port2;B.port1.onmessage=I,V=function(){F.postMessage(null)}}else V=function(){x(I,0)};function $(N){E=N,T||(T=!0,V())}function W(N,z){_=x(function(){N(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(N){N.callback=null},e.unstable_continueExecution=function(){m||f||(m=!0,$(P))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(h){case 1:case 2:case 3:var z=3;break;default:z=h}var b=h;h=z;try{return N()}finally{h=b}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,z){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var b=h;h=N;try{return z()}finally{h=b}},e.unstable_scheduleCallback=function(N,z,b){var U=e.unstable_now();switch(typeof b=="object"&&b!==null?(b=b.delay,b=typeof b=="number"&&0<b?U+b:U):b=U,N){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=b+Z,N={id:c++,callback:z,priorityLevel:N,startTime:b,expirationTime:Z,sortIndex:-1},b>U?(N.sortIndex=b,t(u,N),n(l)===null&&N===n(u)&&(y?(g(_),_=-1):y=!0,W(S,b-U))):(N.sortIndex=Z,t(l,N),m||f||(m=!0,$(P))),N},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(N){var z=h;return function(){var b=h;h=z;try{return N.apply(this,arguments)}finally{h=b}}}})(jS);ES.exports=jS;var tj=ES.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 nj=C,qt=tj;function H(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 AS=new Set,ga={};function Zi(e,t){Ks(e,t),Ks(e+"Capture",t)}function Ks(e,t){for(ga[e]=t,e=0;e<t.length;e++)AS.add(t[e])}var fr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nf=Object.prototype.hasOwnProperty,rj=/^[: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]*$/,Ky={},Gy={};function ij(e){return nf.call(Gy,e)?!0:nf.call(Ky,e)?!1:rj.test(e)?Gy[e]=!0:(Ky[e]=!0,!1)}function sj(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 oj(e,t,n,r){if(t===null||typeof t>"u"||sj(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 lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lt[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];lt[t]=new Ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lt[e]=new Ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lt[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){lt[e]=new Ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lt[e]=new Ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lt[e]=new Ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lt[e]=new Ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lt[e]=new Ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var dm=/[\-:]([a-z])/g;function hm(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(dm,hm);lt[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(dm,hm);lt[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(dm,hm);lt[t]=new Ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!1,!1)});lt.xlinkHref=new Ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function fm(e,t,n,r){var i=lt.hasOwnProperty(t)?lt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(oj(t,n,i,r)&&(n=null),r||i===null?ij(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 vr=nj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ml=Symbol.for("react.element"),ys=Symbol.for("react.portal"),vs=Symbol.for("react.fragment"),pm=Symbol.for("react.strict_mode"),rf=Symbol.for("react.profiler"),RS=Symbol.for("react.provider"),LS=Symbol.for("react.context"),mm=Symbol.for("react.forward_ref"),sf=Symbol.for("react.suspense"),of=Symbol.for("react.suspense_list"),gm=Symbol.for("react.memo"),Dr=Symbol.for("react.lazy"),MS=Symbol.for("react.offscreen"),Yy=Symbol.iterator;function ko(e){return e===null||typeof e!="object"?null:(e=Yy&&e[Yy]||e["@@iterator"],typeof e=="function"?e:null)}var Ie=Object.assign,Cd;function Uo(e){if(Cd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Cd=t&&t[1]||""}return`
34
+ `+Cd+e}var Pd=!1;function Td(e,t){if(!e||Pd)return"";Pd=!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{Pd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Uo(e):""}function aj(e){switch(e.tag){case 5:return Uo(e.type);case 16:return Uo("Lazy");case 13:return Uo("Suspense");case 19:return Uo("SuspenseList");case 0:case 2:case 15:return e=Td(e.type,!1),e;case 11:return e=Td(e.type.render,!1),e;case 1:return e=Td(e.type,!0),e;default:return""}}function af(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 rf:return"Profiler";case pm:return"StrictMode";case sf:return"Suspense";case of:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case LS:return(e.displayName||"Context")+".Consumer";case RS:return(e._context.displayName||"Context")+".Provider";case mm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gm:return t=e.displayName||null,t!==null?t:af(e.type)||"Memo";case Dr:t=e._payload,e=e._init;try{return af(e(t))}catch{}}return null}function lj(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 af(t);case 8:return t===pm?"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 IS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uj(e){var t=IS(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 gl(e){e._valueTracker||(e._valueTracker=uj(e))}function DS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=IS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nu(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 lf(e,t){var n=t.checked;return Ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xy(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 NS(e,t){t=t.checked,t!=null&&fm(e,"checked",t,!1)}function uf(e,t){NS(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")?cf(e,t.type,n):t.hasOwnProperty("defaultValue")&&cf(e,t.type,ii(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qy(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 cf(e,t,n){(t!=="number"||Nu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wo=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 df(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return Ie({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qy(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Wo(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ii(n)}}function BS(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 Zy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function FS(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 hf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?FS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yl,VS=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(yl=yl||document.createElement("div"),yl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ya(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qo={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},cj=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){cj.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function $S(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qo.hasOwnProperty(e)&&Qo[e]?(""+t).trim():t+"px"}function zS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=$S(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var dj=Ie({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 ff(e,t){if(t){if(dj[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function pf(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 mf=null;function ym(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gf=null,Ns=null,Bs=null;function Jy(e){if(e=Xa(e)){if(typeof gf!="function")throw Error(H(280));var t=e.stateNode;t&&(t=Hc(t),gf(e.stateNode,e.type,t))}}function OS(e){Ns?Bs?Bs.push(e):Bs=[e]:Ns=e}function US(){if(Ns){var e=Ns,t=Bs;if(Bs=Ns=null,Jy(e),t)for(e=0;e<t.length;e++)Jy(t[e])}}function WS(e,t){return e(t)}function HS(){}var Ed=!1;function KS(e,t,n){if(Ed)return e(t,n);Ed=!0;try{return WS(e,t,n)}finally{Ed=!1,(Ns!==null||Bs!==null)&&(HS(),US())}}function va(e,t){var n=e.stateNode;if(n===null)return null;var r=Hc(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(H(231,t,typeof n));return n}var yf=!1;if(fr)try{var _o={};Object.defineProperty(_o,"passive",{get:function(){yf=!0}}),window.addEventListener("test",_o,_o),window.removeEventListener("test",_o,_o)}catch{yf=!1}function hj(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 qo=!1,Bu=null,Fu=!1,vf=null,fj={onError:function(e){qo=!0,Bu=e}};function pj(e,t,n,r,i,s,o,a,l){qo=!1,Bu=null,hj.apply(fj,arguments)}function mj(e,t,n,r,i,s,o,a,l){if(pj.apply(this,arguments),qo){if(qo){var u=Bu;qo=!1,Bu=null}else throw Error(H(198));Fu||(Fu=!0,vf=u)}}function Ji(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 GS(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 ev(e){if(Ji(e)!==e)throw Error(H(188))}function gj(e){var t=e.alternate;if(!t){if(t=Ji(e),t===null)throw Error(H(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 ev(i),e;if(s===r)return ev(i),t;s=s.sibling}throw Error(H(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(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function YS(e){return e=gj(e),e!==null?XS(e):null}function XS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=XS(e);if(t!==null)return t;e=e.sibling}return null}var QS=qt.unstable_scheduleCallback,tv=qt.unstable_cancelCallback,yj=qt.unstable_shouldYield,vj=qt.unstable_requestPaint,Ve=qt.unstable_now,xj=qt.unstable_getCurrentPriorityLevel,vm=qt.unstable_ImmediatePriority,qS=qt.unstable_UserBlockingPriority,Vu=qt.unstable_NormalPriority,wj=qt.unstable_LowPriority,ZS=qt.unstable_IdlePriority,zc=null,Kn=null;function Sj(e){if(Kn&&typeof Kn.onCommitFiberRoot=="function")try{Kn.onCommitFiberRoot(zc,e,void 0,(e.current.flags&128)===128)}catch{}}var jn=Math.clz32?Math.clz32:_j,bj=Math.log,kj=Math.LN2;function _j(e){return e>>>=0,e===0?32:31-(bj(e)/kj|0)|0}var vl=64,xl=4194304;function Ho(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 $u(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=Ho(a):(s&=o,s!==0&&(r=Ho(s)))}else o=n&~i,o!==0?r=Ho(o):s!==0&&(r=Ho(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-jn(t),i=1<<n,r|=e[n],t&=~i;return r}function Cj(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 Pj(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-jn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=Cj(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function xf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function JS(){var e=vl;return vl<<=1,!(vl&4194240)&&(vl=64),e}function jd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ga(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jn(t),e[t]=n}function Tj(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-jn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function xm(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-jn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ge=0;function eb(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var tb,wm,nb,rb,ib,wf=!1,wl=[],Yr=null,Xr=null,Qr=null,xa=new Map,wa=new Map,Fr=[],Ej="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 nv(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":xa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wa.delete(t.pointerId)}}function Co(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=Xa(t),t!==null&&wm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function jj(e,t,n,r,i){switch(t){case"focusin":return Yr=Co(Yr,e,t,n,r,i),!0;case"dragenter":return Xr=Co(Xr,e,t,n,r,i),!0;case"mouseover":return Qr=Co(Qr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return xa.set(s,Co(xa.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,wa.set(s,Co(wa.get(s)||null,e,t,n,r,i)),!0}return!1}function sb(e){var t=Pi(e.target);if(t!==null){var n=Ji(t);if(n!==null){if(t=n.tag,t===13){if(t=GS(n),t!==null){e.blockedOn=t,ib(e.priority,function(){nb(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 eu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mf=r,n.target.dispatchEvent(r),mf=null}else return t=Xa(n),t!==null&&wm(t),e.blockedOn=n,!1;t.shift()}return!0}function rv(e,t,n){eu(e)&&n.delete(t)}function Aj(){wf=!1,Yr!==null&&eu(Yr)&&(Yr=null),Xr!==null&&eu(Xr)&&(Xr=null),Qr!==null&&eu(Qr)&&(Qr=null),xa.forEach(rv),wa.forEach(rv)}function Po(e,t){e.blockedOn===t&&(e.blockedOn=null,wf||(wf=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,Aj)))}function Sa(e){function t(i){return Po(i,e)}if(0<wl.length){Po(wl[0],e);for(var n=1;n<wl.length;n++){var r=wl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Yr!==null&&Po(Yr,e),Xr!==null&&Po(Xr,e),Qr!==null&&Po(Qr,e),xa.forEach(t),wa.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);)sb(n),n.blockedOn===null&&Fr.shift()}var Fs=vr.ReactCurrentBatchConfig,zu=!0;function Rj(e,t,n,r){var i=ge,s=Fs.transition;Fs.transition=null;try{ge=1,Sm(e,t,n,r)}finally{ge=i,Fs.transition=s}}function Lj(e,t,n,r){var i=ge,s=Fs.transition;Fs.transition=null;try{ge=4,Sm(e,t,n,r)}finally{ge=i,Fs.transition=s}}function Sm(e,t,n,r){if(zu){var i=Sf(e,t,n,r);if(i===null)Vd(e,t,r,Ou,n),nv(e,r);else if(jj(i,e,t,n,r))r.stopPropagation();else if(nv(e,r),t&4&&-1<Ej.indexOf(e)){for(;i!==null;){var s=Xa(i);if(s!==null&&tb(s),s=Sf(e,t,n,r),s===null&&Vd(e,t,r,Ou,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Vd(e,t,r,null,n)}}var Ou=null;function Sf(e,t,n,r){if(Ou=null,e=ym(r),e=Pi(e),e!==null)if(t=Ji(e),t===null)e=null;else if(n=t.tag,n===13){if(e=GS(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 Ou=e,null}function ob(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(xj()){case vm:return 1;case qS:return 4;case Vu:case wj:return 16;case ZS:return 536870912;default:return 16}default:return 16}}var $r=null,bm=null,tu=null;function ab(){if(tu)return tu;var e,t=bm,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 tu=i.slice(e,1<r?1-r:void 0)}function nu(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 Sl(){return!0}function iv(){return!1}function Jt(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)?Sl:iv,this.isPropagationStopped=iv,this}return Ie(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=Sl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Sl)},persist:function(){},isPersistent:Sl}),t}var ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},km=Jt(ao),Ya=Ie({},ao,{view:0,detail:0}),Mj=Jt(Ya),Ad,Rd,To,Oc=Ie({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_m,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!==To&&(To&&e.type==="mousemove"?(Ad=e.screenX-To.screenX,Rd=e.screenY-To.screenY):Rd=Ad=0,To=e),Ad)},movementY:function(e){return"movementY"in e?e.movementY:Rd}}),sv=Jt(Oc),Ij=Ie({},Oc,{dataTransfer:0}),Dj=Jt(Ij),Nj=Ie({},Ya,{relatedTarget:0}),Ld=Jt(Nj),Bj=Ie({},ao,{animationName:0,elapsedTime:0,pseudoElement:0}),Fj=Jt(Bj),Vj=Ie({},ao,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$j=Jt(Vj),zj=Ie({},ao,{data:0}),ov=Jt(zj),Oj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Uj={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"},Wj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hj(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wj[e])?!!t[e]:!1}function _m(){return Hj}var Kj=Ie({},Ya,{key:function(e){if(e.key){var t=Oj[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Uj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_m,charCode:function(e){return e.type==="keypress"?nu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gj=Jt(Kj),Yj=Ie({},Oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),av=Jt(Yj),Xj=Ie({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_m}),Qj=Jt(Xj),qj=Ie({},ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zj=Jt(qj),Jj=Ie({},Oc,{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}),eA=Jt(Jj),tA=[9,13,27,32],Cm=fr&&"CompositionEvent"in window,Zo=null;fr&&"documentMode"in document&&(Zo=document.documentMode);var nA=fr&&"TextEvent"in window&&!Zo,lb=fr&&(!Cm||Zo&&8<Zo&&11>=Zo),lv=" ",uv=!1;function ub(e,t){switch(e){case"keyup":return tA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function rA(e,t){switch(e){case"compositionend":return cb(t);case"keypress":return t.which!==32?null:(uv=!0,lv);case"textInput":return e=t.data,e===lv&&uv?null:e;default:return null}}function iA(e,t){if(xs)return e==="compositionend"||!Cm&&ub(e,t)?(e=ab(),tu=bm=$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 lb&&t.locale!=="ko"?null:t.data;default:return null}}var sA={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 cv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sA[e.type]:t==="textarea"}function db(e,t,n,r){OS(r),t=Uu(t,"onChange"),0<t.length&&(n=new km("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jo=null,ba=null;function oA(e){bb(e,0)}function Uc(e){var t=bs(e);if(DS(t))return e}function aA(e,t){if(e==="change")return t}var hb=!1;if(fr){var Md;if(fr){var Id="oninput"in document;if(!Id){var dv=document.createElement("div");dv.setAttribute("oninput","return;"),Id=typeof dv.oninput=="function"}Md=Id}else Md=!1;hb=Md&&(!document.documentMode||9<document.documentMode)}function hv(){Jo&&(Jo.detachEvent("onpropertychange",fb),ba=Jo=null)}function fb(e){if(e.propertyName==="value"&&Uc(ba)){var t=[];db(t,ba,e,ym(e)),KS(oA,t)}}function lA(e,t,n){e==="focusin"?(hv(),Jo=t,ba=n,Jo.attachEvent("onpropertychange",fb)):e==="focusout"&&hv()}function uA(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Uc(ba)}function cA(e,t){if(e==="click")return Uc(t)}function dA(e,t){if(e==="input"||e==="change")return Uc(t)}function hA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mn=typeof Object.is=="function"?Object.is:hA;function ka(e,t){if(Mn(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(!nf.call(t,i)||!Mn(e[i],t[i]))return!1}return!0}function fv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pv(e,t){var n=fv(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=fv(n)}}function pb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mb(){for(var e=window,t=Nu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nu(e.document)}return t}function Pm(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 fA(e){var t=mb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pb(n.ownerDocument.documentElement,n)){if(r!==null&&Pm(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=pv(n,s);var o=pv(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 pA=fr&&"documentMode"in document&&11>=document.documentMode,ws=null,bf=null,ea=null,kf=!1;function mv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kf||ws==null||ws!==Nu(r)||(r=ws,"selectionStart"in r&&Pm(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}),ea&&ka(ea,r)||(ea=r,r=Uu(bf,"onSelect"),0<r.length&&(t=new km("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ws)))}function bl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ss={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionend:bl("Transition","TransitionEnd")},Dd={},gb={};fr&&(gb=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 Wc(e){if(Dd[e])return Dd[e];if(!Ss[e])return e;var t=Ss[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in gb)return Dd[e]=t[n];return e}var yb=Wc("animationend"),vb=Wc("animationiteration"),xb=Wc("animationstart"),wb=Wc("transitionend"),Sb=new Map,gv="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){Sb.set(e,t),Zi(t,[e])}for(var Nd=0;Nd<gv.length;Nd++){var Bd=gv[Nd],mA=Bd.toLowerCase(),gA=Bd[0].toUpperCase()+Bd.slice(1);ci(mA,"on"+gA)}ci(yb,"onAnimationEnd");ci(vb,"onAnimationIteration");ci(xb,"onAnimationStart");ci("dblclick","onDoubleClick");ci("focusin","onFocus");ci("focusout","onBlur");ci(wb,"onTransitionEnd");Ks("onMouseEnter",["mouseout","mouseover"]);Ks("onMouseLeave",["mouseout","mouseover"]);Ks("onPointerEnter",["pointerout","pointerover"]);Ks("onPointerLeave",["pointerout","pointerover"]);Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ko="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(" "),yA=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ko));function yv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,mj(r,t,void 0,e),e.currentTarget=null}function bb(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;yv(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;yv(i,a,u),s=l}}}if(Fu)throw e=vf,Fu=!1,vf=null,e}function Ce(e,t){var n=t[Ef];n===void 0&&(n=t[Ef]=new Set);var r=e+"__bubble";n.has(r)||(kb(t,e,2,!1),n.add(r))}function Fd(e,t,n){var r=0;t&&(r|=4),kb(n,e,r,t)}var kl="_reactListening"+Math.random().toString(36).slice(2);function _a(e){if(!e[kl]){e[kl]=!0,AS.forEach(function(n){n!=="selectionchange"&&(yA.has(n)||Fd(n,!1,e),Fd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kl]||(t[kl]=!0,Fd("selectionchange",!1,t))}}function kb(e,t,n,r){switch(ob(t)){case 1:var i=Rj;break;case 4:i=Lj;break;default:i=Sm}n=i.bind(null,t,n,e),i=void 0,!yf||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 Vd(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=Pi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}KS(function(){var u=s,c=ym(n),d=[];e:{var h=Sb.get(e);if(h!==void 0){var f=km,m=e;switch(e){case"keypress":if(nu(n)===0)break e;case"keydown":case"keyup":f=Gj;break;case"focusin":m="focus",f=Ld;break;case"focusout":m="blur",f=Ld;break;case"beforeblur":case"afterblur":f=Ld;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=sv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Dj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Qj;break;case yb:case vb:case xb:f=Fj;break;case wb:f=Zj;break;case"scroll":f=Mj;break;case"wheel":f=eA;break;case"copy":case"cut":case"paste":f=$j;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=av}var y=(t&4)!==0,x=!y&&e==="scroll",g=y?h!==null?h+"Capture":null:h;y=[];for(var v=u,w;v!==null;){w=v;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,g!==null&&(S=va(v,g),S!=null&&y.push(Ca(v,S,w)))),x)break;v=v.return}0<y.length&&(h=new f(h,m,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!==mf&&(m=n.relatedTarget||n.fromElement)&&(Pi(m)||m[pr]))break e;if((f||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,f?(m=n.relatedTarget||n.toElement,f=u,m=m?Pi(m):null,m!==null&&(x=Ji(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(f=null,m=u),f!==m)){if(y=sv,S="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(y=av,S="onPointerLeave",g="onPointerEnter",v="pointer"),x=f==null?h:bs(f),w=m==null?h:bs(m),h=new y(S,v+"leave",f,n,c),h.target=x,h.relatedTarget=w,S=null,Pi(c)===u&&(y=new y(g,v+"enter",m,n,c),y.target=w,y.relatedTarget=x,S=y),x=S,f&&m)t:{for(y=f,g=m,v=0,w=y;w;w=os(w))v++;for(w=0,S=g;S;S=os(S))w++;for(;0<v-w;)y=os(y),v--;for(;0<w-v;)g=os(g),w--;for(;v--;){if(y===g||g!==null&&y===g.alternate)break t;y=os(y),g=os(g)}y=null}else y=null;f!==null&&vv(d,h,f,y,!1),m!==null&&x!==null&&vv(d,x,m,y,!0)}}e:{if(h=u?bs(u):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var P=aA;else if(cv(h))if(hb)P=dA;else{P=uA;var T=lA}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(P=cA);if(P&&(P=P(e,u))){db(d,P,n,c);break e}T&&T(e,h,u),e==="focusout"&&(T=h._wrapperState)&&T.controlled&&h.type==="number"&&cf(h,"number",h.value)}switch(T=u?bs(u):window,e){case"focusin":(cv(T)||T.contentEditable==="true")&&(ws=T,bf=u,ea=null);break;case"focusout":ea=bf=ws=null;break;case"mousedown":kf=!0;break;case"contextmenu":case"mouseup":case"dragend":kf=!1,mv(d,n,c);break;case"selectionchange":if(pA)break;case"keydown":case"keyup":mv(d,n,c)}var E;if(Cm)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else xs?ub(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(lb&&n.locale!=="ko"&&(xs||_!=="onCompositionStart"?_==="onCompositionEnd"&&xs&&(E=ab()):($r=c,bm="value"in $r?$r.value:$r.textContent,xs=!0)),T=Uu(u,_),0<T.length&&(_=new ov(_,e,null,n,c),d.push({event:_,listeners:T}),E?_.data=E:(E=cb(n),E!==null&&(_.data=E)))),(E=nA?rA(e,n):iA(e,n))&&(u=Uu(u,"onBeforeInput"),0<u.length&&(c=new ov("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=E))}bb(d,t)})}function Ca(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Uu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=va(e,n),s!=null&&r.unshift(Ca(e,s,i)),s=va(e,t),s!=null&&r.push(Ca(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 vv(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=va(n,s),l!=null&&o.unshift(Ca(n,l,a))):i||(l=va(n,s),l!=null&&o.push(Ca(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var vA=/\r\n?/g,xA=/\u0000|\uFFFD/g;function xv(e){return(typeof e=="string"?e:""+e).replace(vA,`
38
+ `).replace(xA,"")}function _l(e,t,n){if(t=xv(t),xv(e)!==t&&n)throw Error(H(425))}function Wu(){}var _f=null,Cf=null;function Pf(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 Tf=typeof setTimeout=="function"?setTimeout:void 0,wA=typeof clearTimeout=="function"?clearTimeout:void 0,wv=typeof Promise=="function"?Promise:void 0,SA=typeof queueMicrotask=="function"?queueMicrotask:typeof wv<"u"?function(e){return wv.resolve(null).then(e).catch(bA)}:Tf;function bA(e){setTimeout(function(){throw e})}function $d(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),Sa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Sa(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 Sv(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,Pa="__reactProps$"+lo,pr="__reactContainer$"+lo,Ef="__reactEvents$"+lo,kA="__reactListeners$"+lo,_A="__reactHandles$"+lo;function Pi(e){var t=e[Wn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pr]||n[Wn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sv(e);e!==null;){if(n=e[Wn])return n;e=Sv(e)}return t}e=n,n=e.parentNode}return null}function Xa(e){return e=e[Wn]||e[pr],!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(H(33))}function Hc(e){return e[Pa]||null}var jf=[],ks=-1;function di(e){return{current:e}}function Pe(e){0>ks||(e.current=jf[ks],jf[ks]=null,ks--)}function be(e,t){ks++,jf[ks]=e.current,e.current=t}var si={},pt=di(si),Rt=di(!1),Ki=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 Hu(){Pe(Rt),Pe(pt)}function bv(e,t,n){if(pt.current!==si)throw Error(H(168));be(pt,t),be(Rt,n)}function _b(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(H(108,lj(e)||"Unknown",i));return Ie({},n,r)}function Ku(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Ki=pt.current,be(pt,e),be(Rt,Rt.current),!0}function kv(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=_b(e,t,Ki),r.__reactInternalMemoizedMergedChildContext=e,Pe(Rt),Pe(pt),be(pt,e)):Pe(Rt),be(Rt,n)}var ar=null,Kc=!1,zd=!1;function Cb(e){ar===null?ar=[e]:ar.push(e)}function CA(e){Kc=!0,Cb(e)}function hi(){if(!zd&&ar!==null){zd=!0;var e=0,t=ge;try{var n=ar;for(ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ar=null,Kc=!1}catch(i){throw ar!==null&&(ar=ar.slice(e+1)),QS(vm,hi),i}finally{ge=t,zd=!1}}return null}var _s=[],Cs=0,Gu=null,Yu=0,sn=[],on=0,Gi=null,lr=1,ur="";function Si(e,t){_s[Cs++]=Yu,_s[Cs++]=Gu,Gu=e,Yu=t}function Pb(e,t,n){sn[on++]=lr,sn[on++]=ur,sn[on++]=Gi,Gi=e;var r=lr;e=ur;var i=32-jn(r)-1;r&=~(1<<i),n+=1;var s=32-jn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,lr=1<<32-jn(t)+i|n<<i|r,ur=s+e}else lr=1<<s|n<<i|r,ur=e}function Tm(e){e.return!==null&&(Si(e,1),Pb(e,1,0))}function Em(e){for(;e===Gu;)Gu=_s[--Cs],_s[Cs]=null,Yu=_s[--Cs],_s[Cs]=null;for(;e===Gi;)Gi=sn[--on],sn[on]=null,ur=sn[--on],sn[on]=null,lr=sn[--on],sn[on]=null}var Xt=null,Ht=null,je=!1,Tn=null;function Tb(e,t){var n=ln(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 _v(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,Xt=e,Ht=qr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Xt=e,Ht=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Gi!==null?{id:lr,overflow:ur}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Xt=e,Ht=null,!0):!1;default:return!1}}function Af(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Rf(e){if(je){var t=Ht;if(t){var n=t;if(!_v(e,t)){if(Af(e))throw Error(H(418));t=qr(n.nextSibling);var r=Xt;t&&_v(e,t)?Tb(r,n):(e.flags=e.flags&-4097|2,je=!1,Xt=e)}}else{if(Af(e))throw Error(H(418));e.flags=e.flags&-4097|2,je=!1,Xt=e}}}function Cv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Xt=e}function Cl(e){if(e!==Xt)return!1;if(!je)return Cv(e),je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Pf(e.type,e.memoizedProps)),t&&(t=Ht)){if(Af(e))throw Eb(),Error(H(418));for(;t;)Tb(e,t),t=qr(t.nextSibling)}if(Cv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ht=qr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ht=null}}else Ht=Xt?qr(e.stateNode.nextSibling):null;return!0}function Eb(){for(var e=Ht;e;)e=qr(e.nextSibling)}function Ys(){Ht=Xt=null,je=!1}function jm(e){Tn===null?Tn=[e]:Tn.push(e)}var PA=vr.ReactCurrentBatchConfig;function Eo(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(H(309));var r=n.stateNode}if(!r)throw Error(H(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(H(284));if(!n._owner)throw Error(H(290,e))}return e}function Pl(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Pv(e){var t=e._init;return t(e._payload)}function jb(e){function t(g,v){if(e){var w=g.deletions;w===null?(g.deletions=[v],g.flags|=16):w.push(v)}}function n(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function r(g,v){for(g=new Map;v!==null;)v.key!==null?g.set(v.key,v):g.set(v.index,v),v=v.sibling;return g}function i(g,v){return g=ti(g,v),g.index=0,g.sibling=null,g}function s(g,v,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<v?(g.flags|=2,v):w):(g.flags|=2,v)):(g.flags|=1048576,v)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,v,w,S){return v===null||v.tag!==6?(v=Yd(w,g.mode,S),v.return=g,v):(v=i(v,w),v.return=g,v)}function l(g,v,w,S){var P=w.type;return P===vs?c(g,v,w.props.children,S,w.key):v!==null&&(v.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Dr&&Pv(P)===v.type)?(S=i(v,w.props),S.ref=Eo(g,v,w),S.return=g,S):(S=uu(w.type,w.key,w.props,null,g.mode,S),S.ref=Eo(g,v,w),S.return=g,S)}function u(g,v,w,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=Xd(w,g.mode,S),v.return=g,v):(v=i(v,w.children||[]),v.return=g,v)}function c(g,v,w,S,P){return v===null||v.tag!==7?(v=Ni(w,g.mode,S,P),v.return=g,v):(v=i(v,w),v.return=g,v)}function d(g,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Yd(""+v,g.mode,w),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ml:return w=uu(v.type,v.key,v.props,null,g.mode,w),w.ref=Eo(g,null,v),w.return=g,w;case ys:return v=Xd(v,g.mode,w),v.return=g,v;case Dr:var S=v._init;return d(g,S(v._payload),w)}if(Wo(v)||ko(v))return v=Ni(v,g.mode,w,null),v.return=g,v;Pl(g,v)}return null}function h(g,v,w,S){var P=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return P!==null?null:a(g,v,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ml:return w.key===P?l(g,v,w,S):null;case ys:return w.key===P?u(g,v,w,S):null;case Dr:return P=w._init,h(g,v,P(w._payload),S)}if(Wo(w)||ko(w))return P!==null?null:c(g,v,w,S,null);Pl(g,w)}return null}function f(g,v,w,S,P){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(w)||null,a(v,g,""+S,P);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ml:return g=g.get(S.key===null?w:S.key)||null,l(v,g,S,P);case ys:return g=g.get(S.key===null?w:S.key)||null,u(v,g,S,P);case Dr:var T=S._init;return f(g,v,w,T(S._payload),P)}if(Wo(S)||ko(S))return g=g.get(w)||null,c(v,g,S,P,null);Pl(v,S)}return null}function m(g,v,w,S){for(var P=null,T=null,E=v,_=v=0,R=null;E!==null&&_<w.length;_++){E.index>_?(R=E,E=null):R=E.sibling;var k=h(g,E,w[_],S);if(k===null){E===null&&(E=R);break}e&&E&&k.alternate===null&&t(g,E),v=s(k,v,_),T===null?P=k:T.sibling=k,T=k,E=R}if(_===w.length)return n(g,E),je&&Si(g,_),P;if(E===null){for(;_<w.length;_++)E=d(g,w[_],S),E!==null&&(v=s(E,v,_),T===null?P=E:T.sibling=E,T=E);return je&&Si(g,_),P}for(E=r(g,E);_<w.length;_++)R=f(E,g,_,w[_],S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?_:R.key),v=s(R,v,_),T===null?P=R:T.sibling=R,T=R);return e&&E.forEach(function(L){return t(g,L)}),je&&Si(g,_),P}function y(g,v,w,S){var P=ko(w);if(typeof P!="function")throw Error(H(150));if(w=P.call(w),w==null)throw Error(H(151));for(var T=P=null,E=v,_=v=0,R=null,k=w.next();E!==null&&!k.done;_++,k=w.next()){E.index>_?(R=E,E=null):R=E.sibling;var L=h(g,E,k.value,S);if(L===null){E===null&&(E=R);break}e&&E&&L.alternate===null&&t(g,E),v=s(L,v,_),T===null?P=L:T.sibling=L,T=L,E=R}if(k.done)return n(g,E),je&&Si(g,_),P;if(E===null){for(;!k.done;_++,k=w.next())k=d(g,k.value,S),k!==null&&(v=s(k,v,_),T===null?P=k:T.sibling=k,T=k);return je&&Si(g,_),P}for(E=r(g,E);!k.done;_++,k=w.next())k=f(E,g,_,k.value,S),k!==null&&(e&&k.alternate!==null&&E.delete(k.key===null?_:k.key),v=s(k,v,_),T===null?P=k:T.sibling=k,T=k);return e&&E.forEach(function(I){return t(g,I)}),je&&Si(g,_),P}function x(g,v,w,S){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 ml:e:{for(var P=w.key,T=v;T!==null;){if(T.key===P){if(P=w.type,P===vs){if(T.tag===7){n(g,T.sibling),v=i(T,w.props.children),v.return=g,g=v;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Dr&&Pv(P)===T.type){n(g,T.sibling),v=i(T,w.props),v.ref=Eo(g,T,w),v.return=g,g=v;break e}n(g,T);break}else t(g,T);T=T.sibling}w.type===vs?(v=Ni(w.props.children,g.mode,S,w.key),v.return=g,g=v):(S=uu(w.type,w.key,w.props,null,g.mode,S),S.ref=Eo(g,v,w),S.return=g,g=S)}return o(g);case ys:e:{for(T=w.key;v!==null;){if(v.key===T)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(g,v.sibling),v=i(v,w.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=Xd(w,g.mode,S),v.return=g,g=v}return o(g);case Dr:return T=w._init,x(g,v,T(w._payload),S)}if(Wo(w))return m(g,v,w,S);if(ko(w))return y(g,v,w,S);Pl(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(g,v.sibling),v=i(v,w),v.return=g,g=v):(n(g,v),v=Yd(w,g.mode,S),v.return=g,g=v),o(g)):n(g,v)}return x}var Xs=jb(!0),Ab=jb(!1),Xu=di(null),Qu=null,Ps=null,Am=null;function Rm(){Am=Ps=Qu=null}function Lm(e){var t=Xu.current;Pe(Xu),e._currentValue=t}function Lf(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){Qu=e,Am=Ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function mn(e){var t=e._currentValue;if(Am!==e)if(e={context:e,memoizedValue:t,next:null},Ps===null){if(Qu===null)throw Error(H(308));Ps=e,Qu.dependencies={lanes:0,firstContext:e}}else Ps=Ps.next=e;return t}var Ti=null;function Mm(e){Ti===null?Ti=[e]:Ti.push(e)}function Rb(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Mm(t)):(n.next=i.next,i.next=n),t.interleaved=n,mr(e,r)}function mr(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 Im(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Lb(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 dr(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,ce&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,mr(e,n)}return i=r.interleaved,i===null?(t.next=t,Mm(r)):(t.next=i.next,i.next=t),r.interleaved=t,mr(e,n)}function ru(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,xm(e,n)}}function Tv(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 qu(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 m=e,y=a;switch(h=t,f=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(f,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,h=typeof m=="function"?m.call(f,d,h):m,h==null)break e;d=Ie({},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);Xi|=o,e.lanes=o,e.memoizedState=d}}function Ev(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(H(191,i));i.call(r)}}}var Qa={},Gn=di(Qa),Ta=di(Qa),Ea=di(Qa);function Ei(e){if(e===Qa)throw Error(H(174));return e}function Dm(e,t){switch(be(Ea,t),be(Ta,e),be(Gn,Qa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:hf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=hf(t,e)}Pe(Gn),be(Gn,t)}function Qs(){Pe(Gn),Pe(Ta),Pe(Ea)}function Mb(e){Ei(Ea.current);var t=Ei(Gn.current),n=hf(t,e.type);t!==n&&(be(Ta,e),be(Gn,n))}function Nm(e){Ta.current===e&&(Pe(Gn),Pe(Ta))}var Le=di(0);function Zu(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 Od=[];function Bm(){for(var e=0;e<Od.length;e++)Od[e]._workInProgressVersionPrimary=null;Od.length=0}var iu=vr.ReactCurrentDispatcher,Ud=vr.ReactCurrentBatchConfig,Yi=0,Me=null,Ye=null,Qe=null,Ju=!1,ta=!1,ja=0,TA=0;function ct(){throw Error(H(321))}function Fm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mn(e[n],t[n]))return!1;return!0}function Vm(e,t,n,r,i,s){if(Yi=s,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,iu.current=e===null||e.memoizedState===null?RA:LA,e=n(r,i),ta){s=0;do{if(ta=!1,ja=0,25<=s)throw Error(H(301));s+=1,Qe=Ye=null,t.updateQueue=null,iu.current=MA,e=n(r,i)}while(ta)}if(iu.current=ec,t=Ye!==null&&Ye.next!==null,Yi=0,Qe=Ye=Me=null,Ju=!1,t)throw Error(H(300));return e}function $m(){var e=ja!==0;return ja=0,e}function Bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?Me.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function gn(){if(Ye===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=Qe===null?Me.memoizedState:Qe.next;if(t!==null)Qe=t,Ye=e;else{if(e===null)throw Error(H(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},Qe===null?Me.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function Aa(e,t){return typeof t=="function"?t(e):t}function Wd(e){var t=gn(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=Ye,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((Yi&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,Me.lanes|=c,Xi|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Mn(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,Me.lanes|=s,Xi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Hd(e){var t=gn(),n=t.queue;if(n===null)throw Error(H(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);Mn(s,t.memoizedState)||(jt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Ib(){}function Db(e,t){var n=Me,r=gn(),i=t(),s=!Mn(r.memoizedState,i);if(s&&(r.memoizedState=i,jt=!0),r=r.queue,zm(Fb.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Qe!==null&&Qe.memoizedState.tag&1){if(n.flags|=2048,Ra(9,Bb.bind(null,n,r,i,t),void 0,null),qe===null)throw Error(H(349));Yi&30||Nb(n,t,i)}return i}function Nb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Me.updateQueue,t===null?(t={lastEffect:null,stores:null},Me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Bb(e,t,n,r){t.value=n,t.getSnapshot=r,Vb(t)&&$b(e)}function Fb(e,t,n){return n(function(){Vb(t)&&$b(e)})}function Vb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mn(e,n)}catch{return!0}}function $b(e){var t=mr(e,1);t!==null&&An(t,e,1,-1)}function jv(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:Aa,lastRenderedState:e},t.queue=e,e=e.dispatch=AA.bind(null,Me,e),[t.memoizedState,e]}function Ra(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Me.updateQueue,t===null?(t={lastEffect:null,stores:null},Me.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 zb(){return gn().memoizedState}function su(e,t,n,r){var i=Bn();Me.flags|=e,i.memoizedState=Ra(1|t,n,void 0,r===void 0?null:r)}function Gc(e,t,n,r){var i=gn();r=r===void 0?null:r;var s=void 0;if(Ye!==null){var o=Ye.memoizedState;if(s=o.destroy,r!==null&&Fm(r,o.deps)){i.memoizedState=Ra(t,n,s,r);return}}Me.flags|=e,i.memoizedState=Ra(1|t,n,s,r)}function Av(e,t){return su(8390656,8,e,t)}function zm(e,t){return Gc(2048,8,e,t)}function Ob(e,t){return Gc(4,2,e,t)}function Ub(e,t){return Gc(4,4,e,t)}function Wb(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 Hb(e,t,n){return n=n!=null?n.concat([e]):null,Gc(4,4,Wb.bind(null,t,e),n)}function Om(){}function Kb(e,t){var n=gn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Gb(e,t){var n=gn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Yb(e,t,n){return Yi&21?(Mn(n,t)||(n=JS(),Me.lanes|=n,Xi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jt=!0),e.memoizedState=n)}function EA(e,t){var n=ge;ge=n!==0&&4>n?n:4,e(!0);var r=Ud.transition;Ud.transition={};try{e(!1),t()}finally{ge=n,Ud.transition=r}}function Xb(){return gn().memoizedState}function jA(e,t,n){var r=ei(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qb(e))qb(t,n);else if(n=Rb(e,t,n,r),n!==null){var i=kt();An(n,e,r,i),Zb(n,t,r)}}function AA(e,t,n){var r=ei(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qb(e))qb(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,Mn(a,o)){var l=t.interleaved;l===null?(i.next=i,Mm(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Rb(e,t,i,r),n!==null&&(i=kt(),An(n,e,r,i),Zb(n,t,r))}}function Qb(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function qb(e,t){ta=Ju=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xm(e,n)}}var ec={readContext:mn,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},RA={readContext:mn,useCallback:function(e,t){return Bn().memoizedState=[e,t===void 0?null:t],e},useContext:mn,useEffect:Av,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,su(4194308,4,Wb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return su(4194308,4,e,t)},useInsertionEffect:function(e,t){return su(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=jA.bind(null,Me,e),[r.memoizedState,e]},useRef:function(e){var t=Bn();return e={current:e},t.memoizedState=e},useState:jv,useDebugValue:Om,useDeferredValue:function(e){return Bn().memoizedState=e},useTransition:function(){var e=jv(!1),t=e[0];return e=EA.bind(null,e[1]),Bn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Me,i=Bn();if(je){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),qe===null)throw Error(H(349));Yi&30||Nb(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Av(Fb.bind(null,r,s,e),[e]),r.flags|=2048,Ra(9,Bb.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Bn(),t=qe.identifierPrefix;if(je){var n=ur,r=lr;n=(r&~(1<<32-jn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ja++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=TA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},LA={readContext:mn,useCallback:Kb,useContext:mn,useEffect:zm,useImperativeHandle:Hb,useInsertionEffect:Ob,useLayoutEffect:Ub,useMemo:Gb,useReducer:Wd,useRef:zb,useState:function(){return Wd(Aa)},useDebugValue:Om,useDeferredValue:function(e){var t=gn();return Yb(t,Ye.memoizedState,e)},useTransition:function(){var e=Wd(Aa)[0],t=gn().memoizedState;return[e,t]},useMutableSource:Ib,useSyncExternalStore:Db,useId:Xb,unstable_isNewReconciler:!1},MA={readContext:mn,useCallback:Kb,useContext:mn,useEffect:zm,useImperativeHandle:Hb,useInsertionEffect:Ob,useLayoutEffect:Ub,useMemo:Gb,useReducer:Hd,useRef:zb,useState:function(){return Hd(Aa)},useDebugValue:Om,useDeferredValue:function(e){var t=gn();return Ye===null?t.memoizedState=e:Yb(t,Ye.memoizedState,e)},useTransition:function(){var e=Hd(Aa)[0],t=gn().memoizedState;return[e,t]},useMutableSource:Ib,useSyncExternalStore:Db,useId:Xb,unstable_isNewReconciler:!1};function Cn(e,t){if(e&&e.defaultProps){t=Ie({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Mf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ie({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Yc={isMounted:function(e){return(e=e._reactInternals)?Ji(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=kt(),i=ei(e),s=dr(r,i);s.payload=t,n!=null&&(s.callback=n),t=Zr(e,s,i),t!==null&&(An(t,e,i,r),ru(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=kt(),i=ei(e),s=dr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Zr(e,s,i),t!==null&&(An(t,e,i,r),ru(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kt(),r=ei(e),i=dr(n,r);i.tag=2,t!=null&&(i.callback=t),t=Zr(e,i,r),t!==null&&(An(t,e,r,n),ru(t,e,r))}};function Rv(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?!ka(n,r)||!ka(i,s):!0}function Jb(e,t,n){var r=!1,i=si,s=t.contextType;return typeof s=="object"&&s!==null?s=mn(s):(i=Lt(t)?Ki:pt.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=Yc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Lv(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&&Yc.enqueueReplaceState(t,t.state,null)}function If(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Im(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=mn(s):(s=Lt(t)?Ki:pt.current,i.context=Gs(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Mf(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&&Yc.enqueueReplaceState(i,i.state,null),qu(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+=aj(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 Kd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Df(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var IA=typeof WeakMap=="function"?WeakMap:Map;function ek(e,t,n){n=dr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){nc||(nc=!0,Hf=r),Df(e,t)},n}function tk(e,t,n){n=dr(-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(){Df(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Df(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 Mv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new IA;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=YA.bind(null,e,t,n),t.then(e,e))}function Iv(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 Dv(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=dr(-1,1),t.tag=2,Zr(n,t,1))),n.lanes|=1),e)}var DA=vr.ReactCurrentOwner,jt=!1;function vt(e,t,n,r){t.child=e===null?Ab(t,null,n,r):Xs(t,e.child,n,r)}function Nv(e,t,n,r,i){n=n.render;var s=t.ref;return Vs(t,i),r=Vm(e,t,n,r,s,i),n=$m(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gr(e,t,i)):(je&&n&&Tm(t),t.flags|=1,vt(e,t,r,i),t.child)}function Bv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Qm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,nk(e,t,s,r,i)):(e=uu(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:ka,n(o,r)&&e.ref===t.ref)return gr(e,t,i)}return t.flags|=1,e=ti(s,r),e.ref=t.ref,e.return=t,t.child=e}function nk(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ka(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,gr(e,t,i)}return Nf(e,t,n,r,i)}function rk(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},be(Es,Wt),Wt|=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,be(Es,Wt),Wt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,be(Es,Wt),Wt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,be(Es,Wt),Wt|=r;return vt(e,t,i,n),t.child}function ik(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Nf(e,t,n,r,i){var s=Lt(n)?Ki:pt.current;return s=Gs(t,s),Vs(t,i),n=Vm(e,t,n,r,s,i),r=$m(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gr(e,t,i)):(je&&r&&Tm(t),t.flags|=1,vt(e,t,n,i),t.child)}function Fv(e,t,n,r,i){if(Lt(n)){var s=!0;Ku(t)}else s=!1;if(Vs(t,i),t.stateNode===null)ou(e,t),Jb(t,n,r),If(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=mn(u):(u=Lt(n)?Ki:pt.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)&&Lv(t,o,r,u),Nr=!1;var h=t.memoizedState;o.state=h,qu(t,r,o,i),l=t.memoizedState,a!==r||h!==l||Rt.current||Nr?(typeof c=="function"&&(Mf(t,n,c,r),l=t.memoizedState),(a=Nr||Rv(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,Lb(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Cn(t.type,a),o.props=u,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=mn(l):(l=Lt(n)?Ki:pt.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)&&Lv(t,o,r,l),Nr=!1,h=t.memoizedState,o.state=h,qu(t,r,o,i);var m=t.memoizedState;a!==d||h!==m||Rt.current||Nr?(typeof f=="function"&&(Mf(t,n,f,r),m=t.memoizedState),(u=Nr||Rv(t,n,u,r,h,m,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,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=m),o.props=r,o.state=m,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 Bf(e,t,n,r,s,i)}function Bf(e,t,n,r,i,s){ik(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&kv(t,n,!1),gr(e,t,s);r=t.stateNode,DA.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&&kv(t,n,!0),t.child}function sk(e){var t=e.stateNode;t.pendingContext?bv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&bv(e,t.context,!1),Dm(e,t.containerInfo)}function Vv(e,t,n,r,i){return Ys(),jm(i),t.flags|=256,vt(e,t,n,r),t.child}var Ff={dehydrated:null,treeContext:null,retryLane:0};function Vf(e){return{baseLanes:e,cachePool:null,transitions:null}}function ok(e,t,n){var r=t.pendingProps,i=Le.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),be(Le,i&1),e===null)return Rf(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=qc(o,r,0,null),e=Ni(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Vf(n),t.memoizedState=Ff,e):Um(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return NA(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=Ni(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?Vf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Ff,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 Um(e,t){return t=qc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Tl(e,t,n,r){return r!==null&&jm(r),Xs(t,e.child,null,n),e=Um(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function NA(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Kd(Error(H(422))),Tl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=qc({mode:"visible",children:r.children},i,0,null),s=Ni(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=Vf(o),t.memoizedState=Ff,s);if(!(t.mode&1))return Tl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(H(419)),r=Kd(s,r,void 0),Tl(e,t,o,r)}if(a=(o&e.childLanes)!==0,jt||a){if(r=qe,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,mr(e,i),An(r,e,i,-1))}return Xm(),r=Kd(Error(H(421))),Tl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=XA.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ht=qr(i.nextSibling),Xt=t,je=!0,Tn=null,e!==null&&(sn[on++]=lr,sn[on++]=ur,sn[on++]=Gi,lr=e.id,ur=e.overflow,Gi=t),t=Um(t,r.children),t.flags|=4096,t)}function $v(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lf(e.return,t,n)}function Gd(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 ak(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(vt(e,t,r.children,n),r=Le.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&&$v(e,n,t);else if(e.tag===19)$v(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(be(Le,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&&Zu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Gd(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&&Zu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Gd(t,!0,n,null,s);break;case"together":Gd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ou(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(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 BA(e,t,n){switch(t.tag){case 3:sk(t),Ys();break;case 5:Mb(t);break;case 1:Lt(t.type)&&Ku(t);break;case 4:Dm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;be(Xu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(be(Le,Le.current&1),t.flags|=128,null):n&t.child.childLanes?ok(e,t,n):(be(Le,Le.current&1),e=gr(e,t,n),e!==null?e.sibling:null);be(Le,Le.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ak(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(Le,Le.current),r)break;return null;case 22:case 23:return t.lanes=0,rk(e,t,n)}return gr(e,t,n)}var lk,$f,uk,ck;lk=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}};$f=function(){};uk=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ei(Gn.current);var s=null;switch(n){case"input":i=lf(e,i),r=lf(e,r),s=[];break;case"select":i=Ie({},i,{value:void 0}),r=Ie({},r,{value:void 0}),s=[];break;case"textarea":i=df(e,i),r=df(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Wu)}ff(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"&&(ga.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"&&(ga.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ce("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)}};ck=function(e,t,n,r){n!==r&&(t.flags|=4)};function jo(e,t){if(!je)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 dt(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 FA(e,t,n){var r=t.pendingProps;switch(Em(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return Lt(t.type)&&Hu(),dt(t),null;case 3:return r=t.stateNode,Qs(),Pe(Rt),Pe(pt),Bm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Cl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Tn!==null&&(Yf(Tn),Tn=null))),$f(e,t),dt(t),null;case 5:Nm(t);var i=Ei(Ea.current);if(n=t.type,e!==null&&t.stateNode!=null)uk(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return dt(t),null}if(e=Ei(Gn.current),Cl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Wn]=t,r[Pa]=s,e=(t.mode&1)!==0,n){case"dialog":Ce("cancel",r),Ce("close",r);break;case"iframe":case"object":case"embed":Ce("load",r);break;case"video":case"audio":for(i=0;i<Ko.length;i++)Ce(Ko[i],r);break;case"source":Ce("error",r);break;case"img":case"image":case"link":Ce("error",r),Ce("load",r);break;case"details":Ce("toggle",r);break;case"input":Xy(r,s),Ce("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ce("invalid",r);break;case"textarea":qy(r,s),Ce("invalid",r)}ff(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&&_l(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&_l(r.textContent,a,e),i=["children",""+a]):ga.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ce("scroll",r)}switch(n){case"input":gl(r),Qy(r,s,!0);break;case"textarea":gl(r),Zy(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Wu)}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=FS(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[Pa]=r,lk(e,t,!1,!1),t.stateNode=e;e:{switch(o=pf(n,r),n){case"dialog":Ce("cancel",e),Ce("close",e),i=r;break;case"iframe":case"object":case"embed":Ce("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ko.length;i++)Ce(Ko[i],e);i=r;break;case"source":Ce("error",e),i=r;break;case"img":case"image":case"link":Ce("error",e),Ce("load",e),i=r;break;case"details":Ce("toggle",e),i=r;break;case"input":Xy(e,r),i=lf(e,r),Ce("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ie({},r,{value:void 0}),Ce("invalid",e);break;case"textarea":qy(e,r),i=df(e,r),Ce("invalid",e);break;default:i=r}ff(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?zS(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&VS(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ya(e,l):typeof l=="number"&&ya(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ga.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ce("scroll",e):l!=null&&fm(e,s,l,o))}switch(n){case"input":gl(e),Qy(e,r,!1);break;case"textarea":gl(e),Zy(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=Wu)}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 dt(t),null;case 6:if(e&&t.stateNode!=null)ck(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=Ei(Ea.current),Ei(Gn.current),Cl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Wn]=t,(s=r.nodeValue!==n)&&(e=Xt,e!==null))switch(e.tag){case 3:_l(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_l(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 dt(t),null;case 13:if(Pe(Le),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(je&&Ht!==null&&t.mode&1&&!(t.flags&128))Eb(),Ys(),t.flags|=98560,s=!1;else if(s=Cl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(H(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(H(317));s[Wn]=t}else Ys(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dt(t),s=!1}else Tn!==null&&(Yf(Tn),Tn=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||Le.current&1?Xe===0&&(Xe=3):Xm())),t.updateQueue!==null&&(t.flags|=4),dt(t),null);case 4:return Qs(),$f(e,t),e===null&&_a(t.stateNode.containerInfo),dt(t),null;case 10:return Lm(t.type._context),dt(t),null;case 17:return Lt(t.type)&&Hu(),dt(t),null;case 19:if(Pe(Le),s=t.memoizedState,s===null)return dt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)jo(s,!1);else{if(Xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Zu(e),o!==null){for(t.flags|=128,jo(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 be(Le,Le.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ve()>Zs&&(t.flags|=128,r=!0,jo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Zu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!je)return dt(t),null}else 2*Ve()-s.renderingStartTime>Zs&&n!==1073741824&&(t.flags|=128,r=!0,jo(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=Ve(),t.sibling=null,n=Le.current,be(Le,r?n&1|2:n&1),t):(dt(t),null);case 22:case 23:return Ym(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Wt&1073741824&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function VA(e,t){switch(Em(t),t.tag){case 1:return Lt(t.type)&&Hu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qs(),Pe(Rt),Pe(pt),Bm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nm(t),null;case 13:if(Pe(Le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Ys()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Le),null;case 4:return Qs(),null;case 10:return Lm(t.type._context),null;case 22:case 23:return Ym(),null;case 24:return null;default:return null}}var El=!1,ht=!1,$A=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){Be(e,t,r)}else n.current=null}function zf(e,t,n){try{n()}catch(r){Be(e,t,r)}}var zv=!1;function zA(e,t){if(_f=zu,e=mb(),Pm(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(Cf={focusedElem:e,selectionRange:n},zu=!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 m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,x=m.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:Cn(t.type,y),x);g.__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(H(163))}}catch(S){Be(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return m=zv,zv=!1,m}function na(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&&zf(t,n,s)}i=i.next}while(i!==r)}}function Xc(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 Of(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 dk(e){var t=e.alternate;t!==null&&(e.alternate=null,dk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wn],delete t[Pa],delete t[Ef],delete t[kA],delete t[_A])),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 hk(e){return e.tag===5||e.tag===3||e.tag===4}function Ov(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hk(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 Uf(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=Wu));else if(r!==4&&(e=e.child,e!==null))for(Uf(e,t,n),e=e.sibling;e!==null;)Uf(e,t,n),e=e.sibling}function Wf(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(Wf(e,t,n),e=e.sibling;e!==null;)Wf(e,t,n),e=e.sibling}var tt=null,Pn=!1;function Sr(e,t,n){for(n=n.child;n!==null;)fk(e,t,n),n=n.sibling}function fk(e,t,n){if(Kn&&typeof Kn.onCommitFiberUnmount=="function")try{Kn.onCommitFiberUnmount(zc,n)}catch{}switch(n.tag){case 5:ht||Ts(n,t);case 6:var r=tt,i=Pn;tt=null,Sr(e,t,n),tt=r,Pn=i,tt!==null&&(Pn?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(Pn?(e=tt,n=n.stateNode,e.nodeType===8?$d(e.parentNode,n):e.nodeType===1&&$d(e,n),Sa(e)):$d(tt,n.stateNode));break;case 4:r=tt,i=Pn,tt=n.stateNode.containerInfo,Pn=!0,Sr(e,t,n),tt=r,Pn=i;break;case 0:case 11:case 14:case 15:if(!ht&&(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)&&zf(n,t,o),i=i.next}while(i!==r)}Sr(e,t,n);break;case 1:if(!ht&&(Ts(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Be(n,t,a)}Sr(e,t,n);break;case 21:Sr(e,t,n);break;case 22:n.mode&1?(ht=(r=ht)||n.memoizedState!==null,Sr(e,t,n),ht=r):Sr(e,t,n);break;default:Sr(e,t,n)}}function Uv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $A),t.forEach(function(r){var i=QA.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function vn(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:tt=a.stateNode,Pn=!1;break e;case 3:tt=a.stateNode.containerInfo,Pn=!0;break e;case 4:tt=a.stateNode.containerInfo,Pn=!0;break e}a=a.return}if(tt===null)throw Error(H(160));fk(s,o,i),tt=null,Pn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Be(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)pk(t,e),t=t.sibling}function pk(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vn(t,e),Nn(e),r&4){try{na(3,e,e.return),Xc(3,e)}catch(y){Be(e,e.return,y)}try{na(5,e,e.return)}catch(y){Be(e,e.return,y)}}break;case 1:vn(t,e),Nn(e),r&512&&n!==null&&Ts(n,n.return);break;case 5:if(vn(t,e),Nn(e),r&512&&n!==null&&Ts(n,n.return),e.flags&32){var i=e.stateNode;try{ya(i,"")}catch(y){Be(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&&NS(i,s),pf(a,o);var u=pf(a,s);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?zS(i,d):c==="dangerouslySetInnerHTML"?VS(i,d):c==="children"?ya(i,d):fm(i,c,d,u)}switch(a){case"input":uf(i,s);break;case"textarea":BS(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[Pa]=s}catch(y){Be(e,e.return,y)}}break;case 6:if(vn(t,e),Nn(e),r&4){if(e.stateNode===null)throw Error(H(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){Be(e,e.return,y)}}break;case 3:if(vn(t,e),Nn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Sa(t.containerInfo)}catch(y){Be(e,e.return,y)}break;case 4:vn(t,e),Nn(e);break;case 13:vn(t,e),Nn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Km=Ve())),r&4&&Uv(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(ht=(u=ht)||c,vn(t,e),ht=u):vn(t,e),Nn(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:na(4,h,h.return);break;case 1:Ts(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){Be(r,n,y)}}break;case 5:Ts(h,h.return);break;case 22:if(h.memoizedState!==null){Hv(d);continue}}f!==null?(f.return=h,Y=f):Hv(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=$S("display",o))}catch(y){Be(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){Be(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:vn(t,e),Nn(e),r&4&&Uv(e);break;case 21:break;default:vn(t,e),Nn(e)}}function Nn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(hk(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ya(i,""),r.flags&=-33);var s=Ov(e);Wf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Ov(e);Uf(e,a,o);break;default:throw Error(H(161))}}catch(l){Be(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function OA(e,t,n){Y=e,mk(e)}function mk(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||El;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||ht;a=El;var u=ht;if(El=o,(ht=l)&&!u)for(Y=i;Y!==null;)o=Y,l=o.child,o.tag===22&&o.memoizedState!==null?Kv(i):l!==null?(l.return=o,Y=l):Kv(i);for(;s!==null;)Y=s,mk(s),s=s.sibling;Y=i,El=a,ht=u}Wv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Y=s):Wv(e)}}function Wv(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:ht||Xc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ht)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Cn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Ev(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}Ev(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&&Sa(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}ht||t.flags&512&&Of(t)}catch(h){Be(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 Hv(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 Kv(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xc(4,t)}catch(l){Be(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Be(t,i,l)}}var s=t.return;try{Of(t)}catch(l){Be(t,s,l)}break;case 5:var o=t.return;try{Of(t)}catch(l){Be(t,o,l)}}}catch(l){Be(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 UA=Math.ceil,tc=vr.ReactCurrentDispatcher,Wm=vr.ReactCurrentOwner,hn=vr.ReactCurrentBatchConfig,ce=0,qe=null,We=null,at=0,Wt=0,Es=di(0),Xe=0,La=null,Xi=0,Qc=0,Hm=0,ra=null,Et=null,Km=0,Zs=1/0,or=null,nc=!1,Hf=null,Jr=null,jl=!1,zr=null,rc=0,ia=0,Kf=null,au=-1,lu=0;function kt(){return ce&6?Ve():au!==-1?au:au=Ve()}function ei(e){return e.mode&1?ce&2&&at!==0?at&-at:PA.transition!==null?(lu===0&&(lu=JS()),lu):(e=ge,e!==0||(e=window.event,e=e===void 0?16:ob(e.type)),e):1}function An(e,t,n,r){if(50<ia)throw ia=0,Kf=null,Error(H(185));Ga(e,n,r),(!(ce&2)||e!==qe)&&(e===qe&&(!(ce&2)&&(Qc|=n),Xe===4&&Vr(e,at)),Mt(e,r),n===1&&ce===0&&!(t.mode&1)&&(Zs=Ve()+500,Kc&&hi()))}function Mt(e,t){var n=e.callbackNode;Pj(e,t);var r=$u(e,e===qe?at:0);if(r===0)n!==null&&tv(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&tv(n),t===1)e.tag===0?CA(Gv.bind(null,e)):Cb(Gv.bind(null,e)),SA(function(){!(ce&6)&&hi()}),n=null;else{switch(eb(r)){case 1:n=vm;break;case 4:n=qS;break;case 16:n=Vu;break;case 536870912:n=ZS;break;default:n=Vu}n=kk(n,gk.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function gk(e,t){if(au=-1,lu=0,ce&6)throw Error(H(327));var n=e.callbackNode;if($s()&&e.callbackNode!==n)return null;var r=$u(e,e===qe?at:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ic(e,r);else{t=r;var i=ce;ce|=2;var s=vk();(qe!==e||at!==t)&&(or=null,Zs=Ve()+500,Di(e,t));do try{KA();break}catch(a){yk(e,a)}while(!0);Rm(),tc.current=s,ce=i,We!==null?t=0:(qe=null,at=0,t=Xe)}if(t!==0){if(t===2&&(i=xf(e),i!==0&&(r=i,t=Gf(e,i))),t===1)throw n=La,Di(e,0),Vr(e,r),Mt(e,Ve()),n;if(t===6)Vr(e,r);else{if(i=e.current.alternate,!(r&30)&&!WA(i)&&(t=ic(e,r),t===2&&(s=xf(e),s!==0&&(r=s,t=Gf(e,s))),t===1))throw n=La,Di(e,0),Vr(e,r),Mt(e,Ve()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:bi(e,Et,or);break;case 3:if(Vr(e,r),(r&130023424)===r&&(t=Km+500-Ve(),10<t)){if($u(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){kt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Tf(bi.bind(null,e,Et,or),t);break}bi(e,Et,or);break;case 4:if(Vr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-jn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*UA(r/1960))-r,10<r){e.timeoutHandle=Tf(bi.bind(null,e,Et,or),r);break}bi(e,Et,or);break;case 5:bi(e,Et,or);break;default:throw Error(H(329))}}}return Mt(e,Ve()),e.callbackNode===n?gk.bind(null,e):null}function Gf(e,t){var n=ra;return e.current.memoizedState.isDehydrated&&(Di(e,t).flags|=256),e=ic(e,t),e!==2&&(t=Et,Et=n,t!==null&&Yf(t)),e}function Yf(e){Et===null?Et=e:Et.push.apply(Et,e)}function WA(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(!Mn(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&=~Hm,t&=~Qc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-jn(t),r=1<<n;e[n]=-1,t&=~r}}function Gv(e){if(ce&6)throw Error(H(327));$s();var t=$u(e,0);if(!(t&1))return Mt(e,Ve()),null;var n=ic(e,t);if(e.tag!==0&&n===2){var r=xf(e);r!==0&&(t=r,n=Gf(e,r))}if(n===1)throw n=La,Di(e,0),Vr(e,t),Mt(e,Ve()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bi(e,Et,or),Mt(e,Ve()),null}function Gm(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(Zs=Ve()+500,Kc&&hi())}}function Qi(e){zr!==null&&zr.tag===0&&!(ce&6)&&$s();var t=ce;ce|=1;var n=hn.transition,r=ge;try{if(hn.transition=null,ge=1,e)return e()}finally{ge=r,hn.transition=n,ce=t,!(ce&6)&&hi()}}function Ym(){Wt=Es.current,Pe(Es)}function Di(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,wA(n)),We!==null)for(n=We.return;n!==null;){var r=n;switch(Em(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Hu();break;case 3:Qs(),Pe(Rt),Pe(pt),Bm();break;case 5:Nm(r);break;case 4:Qs();break;case 13:Pe(Le);break;case 19:Pe(Le);break;case 10:Lm(r.type._context);break;case 22:case 23:Ym()}n=n.return}if(qe=e,We=e=ti(e.current,null),at=Wt=t,Xe=0,La=null,Hm=Qc=Xi=0,Et=ra=null,Ti!==null){for(t=0;t<Ti.length;t++)if(n=Ti[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}Ti=null}return e}function yk(e,t){do{var n=We;try{if(Rm(),iu.current=ec,Ju){for(var r=Me.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ju=!1}if(Yi=0,Qe=Ye=Me=null,ta=!1,ja=0,Wm.current=null,n===null||n.return===null){Xe=1,La=t,We=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=at,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=Iv(o);if(f!==null){f.flags&=-257,Dv(f,o,a,s,t),f.mode&1&&Mv(s,u,t),t=f,l=u;var m=t.updateQueue;if(m===null){var y=new Set;y.add(l),t.updateQueue=y}else m.add(l);break e}else{if(!(t&1)){Mv(s,u,t),Xm();break e}l=Error(H(426))}}else if(je&&a.mode&1){var x=Iv(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Dv(x,o,a,s,t),jm(qs(l,a));break e}}s=l=qs(l,a),Xe!==4&&(Xe=2),ra===null?ra=[s]:ra.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=ek(s,l,t);Tv(s,g);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 S=tk(s,a,t);Tv(s,S);break e}}s=s.return}while(s!==null)}wk(n)}catch(P){t=P,We===n&&n!==null&&(We=n=n.return);continue}break}while(!0)}function vk(){var e=tc.current;return tc.current=ec,e===null?ec:e}function Xm(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),qe===null||!(Xi&268435455)&&!(Qc&268435455)||Vr(qe,at)}function ic(e,t){var n=ce;ce|=2;var r=vk();(qe!==e||at!==t)&&(or=null,Di(e,t));do try{HA();break}catch(i){yk(e,i)}while(!0);if(Rm(),ce=n,tc.current=r,We!==null)throw Error(H(261));return qe=null,at=0,Xe}function HA(){for(;We!==null;)xk(We)}function KA(){for(;We!==null&&!yj();)xk(We)}function xk(e){var t=bk(e.alternate,e,Wt);e.memoizedProps=e.pendingProps,t===null?wk(e):We=t,Wm.current=null}function wk(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=VA(n,t),n!==null){n.flags&=32767,We=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,We=null;return}}else if(n=FA(n,t,Wt),n!==null){We=n;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Xe===0&&(Xe=5)}function bi(e,t,n){var r=ge,i=hn.transition;try{hn.transition=null,ge=1,GA(e,t,n,r)}finally{hn.transition=i,ge=r}return null}function GA(e,t,n,r){do $s();while(zr!==null);if(ce&6)throw Error(H(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(H(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(Tj(e,s),e===qe&&(We=qe=null,at=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||jl||(jl=!0,kk(Vu,function(){return $s(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=hn.transition,hn.transition=null;var o=ge;ge=1;var a=ce;ce|=4,Wm.current=null,zA(e,n),pk(n,e),fA(Cf),zu=!!_f,Cf=_f=null,e.current=n,OA(n),vj(),ce=a,ge=o,hn.transition=s}else e.current=n;if(jl&&(jl=!1,zr=e,rc=i),s=e.pendingLanes,s===0&&(Jr=null),Sj(n.stateNode),Mt(e,Ve()),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(nc)throw nc=!1,e=Hf,Hf=null,e;return rc&1&&e.tag!==0&&$s(),s=e.pendingLanes,s&1?e===Kf?ia++:(ia=0,Kf=e):ia=0,hi(),null}function $s(){if(zr!==null){var e=eb(rc),t=hn.transition,n=ge;try{if(hn.transition=null,ge=16>e?16:e,zr===null)var r=!1;else{if(e=zr,zr=null,rc=0,ce&6)throw Error(H(331));var i=ce;for(ce|=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:na(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(dk(c),c===u){Y=null;break}if(h!==null){h.return=f,Y=h;break}Y=f}}}var m=s.alternate;if(m!==null){var y=m.child;if(y!==null){m.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:na(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,Y=g;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:Xc(9,a)}}catch(P){Be(a,a.return,P)}if(a===o){Y=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,Y=S;break e}Y=a.return}}if(ce=i,hi(),Kn&&typeof Kn.onPostCommitFiberRoot=="function")try{Kn.onPostCommitFiberRoot(zc,e)}catch{}r=!0}return r}finally{ge=n,hn.transition=t}}return!1}function Yv(e,t,n){t=qs(n,t),t=ek(e,t,1),e=Zr(e,t,1),t=kt(),e!==null&&(Ga(e,1,t),Mt(e,t))}function Be(e,t,n){if(e.tag===3)Yv(e,e,n);else for(;t!==null;){if(t.tag===3){Yv(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=tk(t,e,1),t=Zr(t,e,1),e=kt(),t!==null&&(Ga(t,1,e),Mt(t,e));break}}t=t.return}}function YA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=kt(),e.pingedLanes|=e.suspendedLanes&n,qe===e&&(at&n)===n&&(Xe===4||Xe===3&&(at&130023424)===at&&500>Ve()-Km?Di(e,0):Hm|=n),Mt(e,t)}function Sk(e,t){t===0&&(e.mode&1?(t=xl,xl<<=1,!(xl&130023424)&&(xl=4194304)):t=1);var n=kt();e=mr(e,t),e!==null&&(Ga(e,t,n),Mt(e,n))}function XA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sk(e,n)}function QA(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(H(314))}r!==null&&r.delete(t),Sk(e,n)}var bk;bk=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,BA(e,t,n);jt=!!(e.flags&131072)}else jt=!1,je&&t.flags&1048576&&Pb(t,Yu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ou(e,t),e=t.pendingProps;var i=Gs(t,pt.current);Vs(t,n),i=Vm(null,t,r,e,i,n);var s=$m();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,Ku(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Im(t),i.updater=Yc,t.stateNode=i,i._reactInternals=t,If(t,r,e,n),t=Bf(null,t,r,!0,s,n)):(t.tag=0,je&&s&&Tm(t),vt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ou(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ZA(r),e=Cn(r,e),i){case 0:t=Nf(null,t,r,e,n);break e;case 1:t=Fv(null,t,r,e,n);break e;case 11:t=Nv(null,t,r,e,n);break e;case 14:t=Bv(null,t,r,Cn(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Cn(r,i),Nf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Cn(r,i),Fv(e,t,r,i,n);case 3:e:{if(sk(t),e===null)throw Error(H(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Lb(e,t),qu(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(H(423)),t),t=Vv(e,t,r,n,i);break e}else if(r!==i){i=qs(Error(H(424)),t),t=Vv(e,t,r,n,i);break e}else for(Ht=qr(t.stateNode.containerInfo.firstChild),Xt=t,je=!0,Tn=null,n=Ab(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ys(),r===i){t=gr(e,t,n);break e}vt(e,t,r,n)}t=t.child}return t;case 5:return Mb(t),e===null&&Rf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Pf(r,i)?o=null:s!==null&&Pf(r,s)&&(t.flags|=32),ik(e,t),vt(e,t,o,n),t.child;case 6:return e===null&&Rf(t),null;case 13:return ok(e,t,n);case 4:return Dm(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:Cn(r,i),Nv(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,be(Xu,r._currentValue),r._currentValue=o,s!==null)if(Mn(s.value,o)){if(s.children===i.children&&!Rt.current){t=gr(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=dr(-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),Lf(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(H(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Lf(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=mn(i),r=r(i),t.flags|=1,vt(e,t,r,n),t.child;case 14:return r=t.type,i=Cn(r,t.pendingProps),i=Cn(r.type,i),Bv(e,t,r,i,n);case 15:return nk(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Cn(r,i),ou(e,t),t.tag=1,Lt(r)?(e=!0,Ku(t)):e=!1,Vs(t,n),Jb(t,r,i),If(t,r,i,n),Bf(null,t,r,!0,e,n);case 19:return ak(e,t,n);case 22:return rk(e,t,n)}throw Error(H(156,t.tag))};function kk(e,t){return QS(e,t)}function qA(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 ln(e,t,n,r){return new qA(e,t,n,r)}function Qm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ZA(e){if(typeof e=="function")return Qm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mm)return 11;if(e===gm)return 14}return 2}function ti(e,t){var n=e.alternate;return n===null?(n=ln(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 uu(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Qm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case vs:return Ni(n.children,i,s,t);case pm:o=8,i|=8;break;case rf:return e=ln(12,n,t,i|2),e.elementType=rf,e.lanes=s,e;case sf:return e=ln(13,n,t,i),e.elementType=sf,e.lanes=s,e;case of:return e=ln(19,n,t,i),e.elementType=of,e.lanes=s,e;case MS:return qc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case RS:o=10;break e;case LS:o=9;break e;case mm:o=11;break e;case gm:o=14;break e;case Dr:o=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=ln(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Ni(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function qc(e,t,n,r){return e=ln(22,e,r,t),e.elementType=MS,e.lanes=n,e.stateNode={isHidden:!1},e}function Yd(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function Xd(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JA(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=jd(0),this.expirationTimes=jd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function qm(e,t,n,r,i,s,o,a,l){return e=new JA(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=ln(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Im(s),e}function eR(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 _k(e){if(!e)return si;e=e._reactInternals;e:{if(Ji(e)!==e||e.tag!==1)throw Error(H(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(H(171))}if(e.tag===1){var n=e.type;if(Lt(n))return _b(e,n,t)}return t}function Ck(e,t,n,r,i,s,o,a,l){return e=qm(n,r,!0,e,i,s,o,a,l),e.context=_k(null),n=e.current,r=kt(),i=ei(n),s=dr(r,i),s.callback=t??null,Zr(n,s,i),e.current.lanes=i,Ga(e,i,r),Mt(e,r),e}function Zc(e,t,n,r){var i=t.current,s=kt(),o=ei(i);return n=_k(n),t.context===null?t.context=n:t.pendingContext=n,t=dr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Zr(i,t,o),e!==null&&(An(e,i,o,s),ru(e,i,o)),o}function sc(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 Xv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zm(e,t){Xv(e,t),(e=e.alternate)&&Xv(e,t)}function tR(){return null}var Pk=typeof reportError=="function"?reportError:function(e){console.error(e)};function Jm(e){this._internalRoot=e}Jc.prototype.render=Jm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));Zc(e,t,null,null)};Jc.prototype.unmount=Jm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qi(function(){Zc(null,e,null,null)}),t[pr]=null}};function Jc(e){this._internalRoot=e}Jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=rb();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&&sb(e)}};function eg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ed(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Qv(){}function nR(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=sc(o);s.call(u)}}var o=Ck(t,r,e,0,null,!1,!1,"",Qv);return e._reactRootContainer=o,e[pr]=o.current,_a(e.nodeType===8?e.parentNode:e),Qi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=sc(l);a.call(u)}}var l=qm(e,0,!1,null,null,!1,!1,"",Qv);return e._reactRootContainer=l,e[pr]=l.current,_a(e.nodeType===8?e.parentNode:e),Qi(function(){Zc(t,l,n,r)}),l}function td(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=sc(o);a.call(l)}}Zc(t,o,e,i)}else o=nR(n,t,e,i,r);return sc(o)}tb=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ho(t.pendingLanes);n!==0&&(xm(t,n|1),Mt(t,Ve()),!(ce&6)&&(Zs=Ve()+500,hi()))}break;case 13:Qi(function(){var r=mr(e,1);if(r!==null){var i=kt();An(r,e,1,i)}}),Zm(e,1)}};wm=function(e){if(e.tag===13){var t=mr(e,134217728);if(t!==null){var n=kt();An(t,e,134217728,n)}Zm(e,134217728)}};nb=function(e){if(e.tag===13){var t=ei(e),n=mr(e,t);if(n!==null){var r=kt();An(n,e,t,r)}Zm(e,t)}};rb=function(){return ge};ib=function(e,t){var n=ge;try{return ge=e,t()}finally{ge=n}};gf=function(e,t,n){switch(t){case"input":if(uf(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=Hc(r);if(!i)throw Error(H(90));DS(r),uf(r,i)}}}break;case"textarea":BS(e,n);break;case"select":t=n.value,t!=null&&Ds(e,!!n.multiple,t,!1)}};WS=Gm;HS=Qi;var rR={usingClientEntryPoint:!1,Events:[Xa,bs,Hc,OS,US,Gm]},Ao={findFiberByHostInstance:Pi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},iR={bundleType:Ao.bundleType,version:Ao.version,rendererPackageName:Ao.rendererPackageName,rendererConfig:Ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=YS(e),e===null?null:e.stateNode},findFiberByHostInstance:Ao.findFiberByHostInstance||tR,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 Al=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Al.isDisabled&&Al.supportsFiber)try{zc=Al.inject(iR),Kn=Al}catch{}}Zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rR;Zt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!eg(t))throw Error(H(200));return eR(e,t,null,n)};Zt.createRoot=function(e,t){if(!eg(e))throw Error(H(299));var n=!1,r="",i=Pk;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=qm(e,1,!1,null,null,n,!1,r,i),e[pr]=t.current,_a(e.nodeType===8?e.parentNode:e),new Jm(t)};Zt.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(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=YS(t),e=e===null?null:e.stateNode,e};Zt.flushSync=function(e){return Qi(e)};Zt.hydrate=function(e,t,n){if(!ed(t))throw Error(H(200));return td(null,e,t,!0,n)};Zt.hydrateRoot=function(e,t,n){if(!eg(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Pk;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Ck(t,null,e,1,n??null,i,!1,s,o),e[pr]=t.current,_a(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 Jc(t)};Zt.render=function(e,t,n){if(!ed(t))throw Error(H(200));return td(null,e,t,!1,n)};Zt.unmountComponentAtNode=function(e){if(!ed(e))throw Error(H(40));return e._reactRootContainer?(Qi(function(){td(null,null,e,!1,function(){e._reactRootContainer=null,e[pr]=null})}),!0):!1};Zt.unstable_batchedUpdates=Gm;Zt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ed(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return td(e,t,n,!1,r)};Zt.version="18.3.1-next-f1338f8080-20240426";function Tk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tk)}catch(e){console.error(e)}}Tk(),TS.exports=Zt;var tg=TS.exports,Ek,qv=tg;Ek=qv.createRoot,qv.hydrateRoot;var Go=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Qd(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 sR(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 oR(e){const t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current,[]),t}const jk=!1;function Ma(e){return e[e.length-1]}function aR(e){return typeof e=="function"}function Or(e,t){return aR(e)?e(t):e}const lR=Object.prototype.hasOwnProperty,Zv=Object.prototype.propertyIsEnumerable,uR=()=>Object.create(null),yi=(e,t)=>Ur(e,t,uR);function Ur(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,s=tx(e)&&tx(i);if(!s&&!(Js(e)&&Js(i)))return i;const o=s?e:Jv(e);if(!o)return i;const a=s?i:Jv(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],m=e[f],y=i[f];if(m===y){c[f]=m,(s?h<l:lR.call(e,f))&&d++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[f]=y;continue}const x=Ur(m,y,n,r+1);c[f]=x,x===m&&d++}return l===u&&d===l?e:c}function Jv(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!Zv.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(!Zv.call(e,i))return!1;r.push(i)}return r}function Js(e){if(!ex(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!ex(n)||!n.hasOwnProperty("isPrototypeOf"))}function ex(e){return Object.prototype.toString.call(e)==="[object Object]"}function tx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bi(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(!Bi(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)&&!Bi(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||!Bi(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 Ia(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function cR(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function nx(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 cR(t)}const dR=["http:","https:","mailto:","tel:"];function oc(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Ro(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+=nx(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+nx(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function hR(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function fR(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 hr(){throw new Error("Invariant failed")}function Da(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,Ak=5;function pR(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 ng(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=pR(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 nd(e,t,n,r,i,s,o){var l,u,c,d,h,f,m,y,x,g,v,w,S;o==null||o(n);let a=r;{const P=n.fullPath??n.from,T=P.length,E=((l=n.options)==null?void 0:l.caseSensitive)??e,_=!!((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<T;){const k=ng(P,a,t);let L;const I=a,V=k[5];switch(a=V+1,s++,k[0]){case 0:{const B=P.substring(k[2],k[3]);if(E){const F=(f=i.static)==null?void 0:f.get(B);if(F)L=F;else{i.static??(i.static=new Map);const $=ji(n.fullPath??n.from);$.parent=i,$.depth=s,L=$,i.static.set(B,$)}}else{const F=B.toLowerCase(),$=(m=i.staticInsensitive)==null?void 0:m.get(F);if($)L=$;else{i.staticInsensitive??(i.staticInsensitive=new Map);const W=ji(n.fullPath??n.from);W.parent=i,W.depth=s,L=W,i.staticInsensitive.set(F,W)}}break}case 1:{const B=P.substring(I,k[1]),F=P.substring(k[4],V),$=E&&!!(B||F),W=B?$?B:B.toLowerCase():void 0,N=F?$?F:F.toLowerCase():void 0,z=!_&&((y=i.dynamic)==null?void 0:y.find(b=>!b.skipOnParamError&&b.caseSensitive===$&&b.prefix===W&&b.suffix===N));if(z)L=z;else{const b=Zd(1,n.fullPath??n.from,$,W,N);L=b,b.depth=s,b.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(b)}break}case 3:{const B=P.substring(I,k[1]),F=P.substring(k[4],V),$=E&&!!(B||F),W=B?$?B:B.toLowerCase():void 0,N=F?$?F:F.toLowerCase():void 0,z=!_&&((x=i.optional)==null?void 0:x.find(b=>!b.skipOnParamError&&b.caseSensitive===$&&b.prefix===W&&b.suffix===N));if(z)L=z;else{const b=Zd(3,n.fullPath??n.from,$,W,N);L=b,b.parent=i,b.depth=s,i.optional??(i.optional=[]),i.optional.push(b)}break}case 2:{const B=P.substring(I,k[1]),F=P.substring(k[4],V),$=E&&!!(B||F),W=B?$?B:B.toLowerCase():void 0,N=F?$?F:F.toLowerCase():void 0,z=Zd(2,n.fullPath??n.from,$,W,N);L=z,z.parent=i,z.depth=s,i.wildcard??(i.wildcard=[]),i.wildcard.push(z)}}i=L}if(_&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const k=ji(n.fullPath??n.from);k.kind=Ak,k.parent=i,s++,k.depth=s,i.pathless??(i.pathless=[]),i.pathless.push(k),i=k}const R=(n.path||!n.children)&&!n.isRoot;if(R&&P.endsWith("/")){const k=ji(n.fullPath??n.from);k.kind=Wr,k.parent=i,s++,k.depth=s,i.index=k,i=k}i.parse=((v=(g=n.options)==null?void 0:g.params)==null?void 0:v.parse)??null,i.skipOnParamError=_,i.parsingPriority=((S=(w=n.options)==null?void 0:w.skipRouteOnParseError)==null?void 0:S.priority)??0,R&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const P of n.children)nd(e,t,P,a,i,s,o)}function qd(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(qd);for(const i of e.dynamic)Br(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(qd);for(const i of e.optional)Br(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(qd);for(const i of e.wildcard)Br(i)}}function ji(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 Zd(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 mR(e,t){const n=ji("/"),r=new Uint16Array(6);for(const i of e)nd(!1,r,i,1,n,0);Br(n),t.masksTree=n,t.flatCache=Da(1e3)}function gR(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=rg(e,t.masksTree);return t.flatCache.set(e,r),r}function yR(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=ji("/"),nd(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(s,o)),rg(r,o,n)}function vR(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=rg(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)s=null;else throw o}return s&&(s.branch=SR(s.route)),t.matchCache.set(r,s),s}function xR(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function wR(e,t=!1,n){const r=ji(e.fullPath),i=new Uint16Array(6),s={},o={};let a=0;return nd(t,i,e,1,r,0,l=>{if(n==null||n(l,a),l.id in s&&hr(),s[l.id]=l,a!==0&&l.path){const u=xR(l.fullPath);(!o[u]||l.fullPath.endsWith("/"))&&(o[u]=l)}a++}),Br(r),{processedTree:{segmentTree:r,singleCache:Da(1e3),matchCache:Da(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:o}}function rg(e,t,n=!1){const r=e.split("/"),i=kR(e,r,t,n);if(!i)return null;const[s]=Rk(e,r,i);return{route:i.node.route,rawParams:s,parsedParams:i.parsedParams}}function Rk(e,t,n){var c,d,h,f,m,y,x,g,v,w;const r=bR(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 S=r[a];if(S.kind===Wr)break;if(S.kind===Ak){u--,o--,l--;continue}const P=t[o],T=l;if(P&&(l+=P.length),S.kind===1){i??(i=n.node.fullPath.split("/"));const E=i[u],_=((m=S.prefix)==null?void 0:m.length)??0;if(E.charCodeAt(_)===123){const R=((y=S.suffix)==null?void 0:y.length)??0,k=E.substring(_+2,E.length-R-1),L=P.substring(_,P.length-R);s[k]=decodeURIComponent(L)}else{const R=E.substring(1);s[R]=decodeURIComponent(P)}}else if(S.kind===3){if(n.skipped&1<<a){o--,l=T-1;continue}i??(i=n.node.fullPath.split("/"));const E=i[u],_=((x=S.prefix)==null?void 0:x.length)??0,R=((g=S.suffix)==null?void 0:g.length)??0,k=E.substring(_+3,E.length-R-1),L=S.suffix||S.prefix?P.substring(_,P.length-R):P;L&&(s[k]=decodeURIComponent(L))}else if(S.kind===2){const E=S,_=e.substring(T+(((v=E.prefix)==null?void 0:v.length)??0),e.length-(((w=E.suffix)==null?void 0:w.length)??0)),R=decodeURIComponent(_);s["*"]=R,s._splat=R;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:o,node:a,path:l,segment:u}]}function SR(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function bR(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function kR(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!Ma(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:m,statics:y,dynamics:x,optionals:g}=c;let{extract:v,rawParams:w,parsedParams:S}=c;if(d.kind===2&&d.route&&!Ll(u,c))continue;if(d.skipOnParamError){if(!rx(e,t,c))continue;w=c.rawParams,v=c.extract,S=c.parsedParams}r&&d.route&&d.kind!==Wr&&Ll(l,c)&&(l=c);const P=h===o;if(P&&(d.route&&(!s||d.kind===Wr||d.kind===2)&&Ll(u,c)&&(u=c),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const T=P?void 0:t[h];let E;if(P&&d.index){const _={node:d.index,index:h,skipped:f,depth:m+1,statics:y,dynamics:x,optionals:g,extract:v,rawParams:w,parsedParams:S};let R=!0;if(d.index.skipOnParamError&&(rx(e,t,_)||(R=!1)),R){if(!x&&!g&&!f&&_R(y,o))return _;Ll(u,_)&&(u=_)}}if(d.wildcard)for(let _=d.wildcard.length-1;_>=0;_--){const R=d.wildcard[_],{prefix:k,suffix:L}=R;if(!(k&&(P||!(R.caseSensitive?T:E??(E=T.toLowerCase())).startsWith(k)))){if(L){if(P)continue;const I=t.slice(h).join("/").slice(-L.length);if((R.caseSensitive?I:I.toLowerCase())!==L)continue}a.push({node:R,index:o,skipped:f,depth:m+1,statics:y,dynamics:x,optionals:g,extract:v,rawParams:w,parsedParams:S})}}if(d.optional){const _=f|1<<m,R=m+1;for(let k=d.optional.length-1;k>=0;k--){const L=d.optional[k];a.push({node:L,index:h,skipped:_,depth:R,statics:y,dynamics:x,optionals:g,extract:v,rawParams:w,parsedParams:S})}if(!P)for(let k=d.optional.length-1;k>=0;k--){const L=d.optional[k],{prefix:I,suffix:V}=L;if(I||V){const B=L.caseSensitive?T:E??(E=T.toLowerCase());if(I&&!B.startsWith(I)||V&&!B.endsWith(V))continue}a.push({node:L,index:h+1,skipped:f,depth:R,statics:y,dynamics:x,optionals:g+Rl(o,h),extract:v,rawParams:w,parsedParams:S})}}if(!P&&d.dynamic&&T)for(let _=d.dynamic.length-1;_>=0;_--){const R=d.dynamic[_],{prefix:k,suffix:L}=R;if(k||L){const I=R.caseSensitive?T:E??(E=T.toLowerCase());if(k&&!I.startsWith(k)||L&&!I.endsWith(L))continue}a.push({node:R,index:h+1,skipped:f,depth:m+1,statics:y,dynamics:x+Rl(o,h),optionals:g,extract:v,rawParams:w,parsedParams:S})}if(!P&&d.staticInsensitive){const _=d.staticInsensitive.get(E??(E=T.toLowerCase()));_&&a.push({node:_,index:h+1,skipped:f,depth:m+1,statics:y+Rl(o,h),dynamics:x,optionals:g,extract:v,rawParams:w,parsedParams:S})}if(!P&&d.static){const _=d.static.get(T);_&&a.push({node:_,index:h+1,skipped:f,depth:m+1,statics:y+Rl(o,h),dynamics:x,optionals:g,extract:v,rawParams:w,parsedParams:S})}if(d.pathless){const _=m+1;for(let R=d.pathless.length-1;R>=0;R--){const k=d.pathless[R];a.push({node:k,index:h,skipped:f,depth:_,statics:y,dynamics:x,optionals:g,extract:v,rawParams:w,parsedParams:S})}}}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 Rl(e,t){return 2**(e-t-1)}function _R(e,t){return e===2**(t-1)-1}function rx(e,t,n){try{const[r,i]=Rk(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 Ll(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 cu(e){return ig(e.filter(t=>t!==void 0).join("/"))}function ig(e){return e.replace(/\/{2,}/g,"/")}function Lk(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 Mk(e){return ni(Lk(e))}function ac(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function CR(e,t,n){return ac(e,n)===ac(t,n)}function PR({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&&Ma(a)==="";)a.pop();const d=t.split("/");for(let h=0,f=d.length;h<f;h++){const m=d[h];m===""?h?h===f-1&&a.push(m):a=[m]:m===".."?a.pop():m==="."||a.push(m)}}a.length>1&&(Ma(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=ng(h,0,l);const f=l[0];if(f===0){u+=h;continue}const m=l[5],y=h.substring(0,l[1]),x=h.substring(l[4],m),g=h.substring(l[2],l[3]);f===1?u+=y||x?`${y}{$${g}}${x}`:`$${g}`:f===2?u+=y||x?`${y}{$}${x}`:"$":u+=`${y}{-$${g}}${x}`}u=ig(u);const c=u||"/";return o&&r&&r.set(o,c),c}function TR(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 Jd(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=>sx(i,n)).join("/"):sx(r,n)}function ix({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=ng(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 m=e.substring(c,l[1]),y=e.substring(l[4],d);if(!f){i=!0,(m||y)&&(u+="/"+m+y);continue}const x=Jd("_splat",t,n);u+="/"+m+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 m=e.substring(c,l[1]),y=e.substring(l[4],d),x=Jd(f,t,n)??"undefined";u+="/"+m+x+y;continue}if(h===3){const f=e.substring(l[2],l[3]),m=t[f];if(m==null)continue;s[f]=m;const y=e.substring(c,l[1]),x=e.substring(l[4],d),g=Jd(f,t,n)??"";u+="/"+y+g+x;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:s,interpolatedPath:u||"/",isMissingParams:i}}function sx(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function ft(e){return(e==null?void 0:e.isNotFound)===!0}function ER(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const jR="tsr-scroll-restoration-v1_3";function AR(){const e=ER();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(jR,JSON.stringify(t))}catch{}}}}const ox=AR(),RR=e=>e.state.__TSR_key||e.href;function LR(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 Ml=!1;const Lo="window",ax="data-scroll-restoration-id";function MR(e,t){if(!ox)return;const n=ox;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Ml=!1;const r=e.options.getScrollRestorationKey||RR,i=new Map;window.history.scrollRestoration="manual";const s=a=>{if(!(Ml||!e.isScrollRestoring))if(a.target===document||a.target===window)i.set(Lo,{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===Lo)h=Lo;else if(c.isConnected){const f=c.getAttribute(ax);h=f?`[${ax}="${f}"]`:LR(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}))){Ml=!0;try{const h=e.isScrollRestoring?n.state[l]:void 0;let f=!1;if(h)for(const m in h){const y=h[m];if(!Js(y))continue;const{scrollX:x,scrollY:g}=y;if(!(!Number.isFinite(x)||!Number.isFinite(g))){if(m===Lo)window.scrollTo({top:g,left:x,behavior:u}),f=!0;else if(m){let v;try{v=document.querySelector(m)}catch{continue}v&&(v.scrollLeft=x,v.scrollTop=g,f=!0)}}}if(!f){const m=e.history.location.hash.slice(1);if(m){const y=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(y){const x=document.getElementById(m);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===Lo)continue;const g=typeof x=="function"?x():document.querySelector(x);g&&g.scrollTo(y)}}}}finally{Ml=!1}e.isScrollRestoring&&n.set(h=>(h[l]||(h[l]={}),h))}})}function IR(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 eh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function DR(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]=eh(i):Array.isArray(s)?s.push(eh(i)):n[r]=[s,eh(i)]}return n}const NR=FR(JSON.parse),BR=VR(JSON.stringify,JSON.parse);function FR(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=DR(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function VR(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=IR(i,r);return s?`?${s}`:""}}const Fi="__root__";function $R(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 zR(e){return{input:({url:t})=>{for(const n of e)t=Xf(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ik(e[n],t);return t}}}function OR(e){const t=Mk(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=cu(["/",t,o.pathname]),o)}}function Xf(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 Ik(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 UR(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),m=n(e.resolvedLocation),y=n(e.statusCode),x=n(e.redirect),g=n([]),v=n([]),w=n([]),S=r(()=>th(o,g.get())),P=r(()=>th(a,v.get())),T=r(()=>th(l,w.get())),E=r(()=>g.get()[0]),_=r(()=>g.get().some(W=>{var N;return((N=o.get(W))==null?void 0:N.get().status)==="pending"})),R=r(()=>{var W;return{locationHref:f.get().href,resolvedLocationHref:(W=m.get())==null?void 0:W.href,status:u.get()}}),k=r(()=>({status:u.get(),loadedAt:c.get(),isLoading:d.get(),isTransitioning:h.get(),matches:S.get(),location:f.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:x.get()})),L=Da(64);function I(W){let N=L.get(W);return N||(N=r(()=>{const z=g.get();for(const b of z){const U=o.get(b);if(U&&U.routeId===W)return U.get()}}),L.set(W,N)),N}const V={status:u,loadedAt:c,isLoading:d,isTransitioning:h,location:f,resolvedLocation:m,statusCode:y,redirect:x,matchesId:g,pendingIds:v,cachedIds:w,matches:S,pendingMatches:P,cachedMatches:T,firstId:E,hasPending:_,matchRouteDeps:R,matchStores:o,pendingMatchStores:a,cachedMatchStores:l,__store:k,getRouteMatchStore:I,setMatches:B,setPending:F,setCached:$};B(e.matches),s==null||s(V);function B(W){nh(W,o,g,n,i)}function F(W){nh(W,a,v,n,i)}function $(W){nh(W,l,w,n,i)}return V}function th(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function nh(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)}fR(n.get(),s)||n.set(s)})}const Qf=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},WR=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),rd=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Vi=(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},lx=(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)&&!ft(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":ft(n)?"notFound":o.status==="pending"?"success":o.status,context:Vi(e,t.index),isFetching:!1,error:n})),ft(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},Dk=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},ux=(e,t,n)=>{const r=Vi(e,n);e.updateMatch(t,i=>({...i,context:r}))},Mo=(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)&&!ft(n)&&(e.serialError??(e.serialError=n))},Nk=(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&&!rd(e,t)&&(n.options.loader||n.options.beforeLoad||Fk(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((s=e.router.options)==null?void 0:s.defaultPendingComponent))){const o=setTimeout(()=>{Qf(e)},i);r._nonReactive.pendingTimeout=o}},HR=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Nk(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()},KR=(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&&Mo(e,n,o,"PARSE_PARAMS"),a&&Mo(e,n,a,"VALIDATE_SEARCH"),Nk(e,t,r,i);const l=new AbortController;let u=!1;const c=()=>{u||(u=!0,e.updateMatch(t,S=>({...S,isFetching:"beforeLoad",fetchCount:S.fetchCount+1,abortController:l})))},d=()=>{var S;(S=i._nonReactive.beforeLoadPromise)==null||S.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,P=>({...P,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{c(),d()});return}i._nonReactive.beforeLoadPromise=eo();const h={...Vi(e,n,!1),...i.__routeContext},{search:f,params:m,cause:y}=i,x=rd(e,t),g={search:f,abortController:l,params:m,preload:x,context:h,location:e.location,navigate:S=>e.router.navigate({...S,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:x?"preload":y,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=S=>{if(S===void 0){e.router.batch(()=>{c(),d()});return}(At(S)||ft(S))&&(c(),Mo(e,n,S,"BEFORE_LOAD")),e.router.batch(()=>{c(),e.updateMatch(t,P=>({...P,__beforeLoadContext:S})),d()})};let w;try{if(w=r.options.beforeLoad(g),Ia(w))return c(),w.catch(S=>{Mo(e,n,S,"BEFORE_LOAD")}).then(v)}catch(S){c(),Mo(e,n,S,"BEFORE_LOAD")}v(w)},GR=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>a(),o=()=>KR(e,n,t,i),a=()=>{if(Dk(e,n))return;const l=HR(e,n,i);return Ia(l)?l.then(o):o()};return s()},YR=(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}))},Bk=(e,t,n,r,i)=>{const s=t[r-1],{params:o,loaderDeps:a,abortController:l,cause:u}=e.router.getMatch(n),c=Vi(e,r),d=rd(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}},cx=async(e,t,n,r,i)=>{var s,o,a,l,u;try{const c=e.router.getMatch(n);try{(!(jk??e.router.isServer)||c.ssr===!0)&&Na(i);const d=i.options.loader,h=typeof d=="function"?d:d==null?void 0:d.handler,f=h==null?void 0:h(Bk(e,t,n,r,i)),m=!!h&&Ia(f);if((m||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=m?await f:f;Hr(e,e.router.getMatch(n),x),x!==void 0&&e.updateMatch(n,g=>({...g,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:Vi(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,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:Vi(e,r)}));return}const f=c._nonReactive.minPendingPromise;f&&await f,ft(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(m){h=m,Hr(e,e.router.getMatch(n),m)}!At(h)&&!ft(h)&&await Na(i,["errorComponent"]),e.updateMatch(n,m=>({...m,error:h,context:Vi(e,r),status:"error",isFetching:!1}))}}catch(c){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),Hr(e,d,c)}},XR=async(e,t,n)=>{var f,m,y,x;async function r(g,v,w,S,P){const T=Date.now()-v.updatedAt,E=g?P.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:P.options.staleTime??e.router.options.defaultStaleTime??0,_=P.options.shouldReload,R=typeof _=="function"?_(Bk(e,t,i,n,P)):_,{status:k,invalid:L}=S,I=T>=E&&(!!e.forceStaleReload||S.cause==="enter"||w!==void 0&&w!==S.id);o=k==="success"&&(L||(R??I)),g&&P.options.preload===!1||(o&&!e.sync&&c?(a=!0,(async()=>{var V,B;try{await cx(e,t,i,n,P);const F=e.router.getMatch(i);(V=F._nonReactive.loaderPromise)==null||V.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)}})()):k!=="success"||o?await cx(e,t,i,n,P):ux(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(Dk(e,i)){if(!e.router.getMatch(i))return e.matches[n];ux(e,i,n)}else{const g=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:(m=e.router.stores.matches.get().find(P=>P.routeId===s))==null?void 0:m.id,S=rd(e,i);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload&&c)return g;await g._nonReactive.loaderPromise;const P=e.router.getMatch(i),T=P._nonReactive.error||P.error;T&&Hr(e,P,T),P.status==="pending"&&await r(S,g,w,P,l)}else{const P=S&&!e.router.stores.matchStores.has(i),T=e.router.getMatch(i);T._nonReactive.loaderPromise=eo(),P!==T.preload&&e.updateMatch(i,E=>({...E,preload:P})),await r(S,g,w,T,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,g=>({...g,isFetching:h,invalid:!1})),e.router.getMatch(i)):d};async function dx(e){var h,f;const t=e,n=[];WR(t.router)&&Qf(t);let r;for(let m=0;m<t.matches.length;m++){try{const y=GR(t,m);Ia(y)&&await y}catch(y){if(At(y))throw y;if(ft(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?lx(t,r):void 0,o=r&&t.preload?0:s!==void 0?Math.min(s+1,i):i;let a,l;for(let m=0;m<o;m++)n.push(XR(t,n,m));try{await Promise.all(n)}catch{const m=await Promise.allSettled(n);for(const y of m){if(y.status!=="rejected")continue;const x=y.reason;if(At(x))throw x;ft(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 m=lx(t,u);m===void 0&&hr();const y=t.matches[m],x=t.router.looseRoutesById[y.routeId],g=(h=t.router.options)==null?void 0:h.defaultNotFoundComponent;!x.options.notFoundComponent&&g&&(x.options.notFoundComponent=g),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=m,await Na(x,["notFoundComponent"])}else if(!t.preload){const m=t.matches[0];m.globalNotFound||(f=t.router.getMatch(m.id))!=null&&f.globalNotFound&&t.updateMatch(m.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const m=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Na(m,["errorComponent"])}for(let m=0;m<=c;m++){const{id:y,routeId:x}=t.matches[m],g=t.router.looseRoutesById[x];try{const v=YR(t,y,g);if(v){const w=await v;t.updateMatch(y,S=>({...S,...w}))}}catch(v){console.error(`Error executing head for route ${x}:`,v)}}const d=Qf(t);if(Ia(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function hx(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 Na(e,t=du){!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===du?(()=>{if(e._componentsPromise===void 0){const r=hx(e,du);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():hx(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Fk(e){var t;for(const n of du)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const du=["component","errorComponent","pendingComponent","notFoundComponent"];var ri="__TSR_index",fx="popstate",px="beforeunload";function QR(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 m=lc(l.path,l.state);if(await f.blockerFn({currentLocation:t,nextLocation:m,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=mx(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=mx(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 mx(e,t){t||(t={});const n=sg();return{...t,key:n,__TSR_key:n,[ri]:e}}function qR(e){var _,R;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,o=k=>i=k,a=k=>k,l=()=>lc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((_=t.history.state)!=null&&_.__TSR_key)&&!((R=t.history.state)!=null&&R.key)){const k=sg();t.history.replaceState({[ri]:0,key:k,__TSR_key:k},"")}let u=l(),c,d=!1,h=!1,f=!1,m=!1;const y=()=>u;let x,g;const v=()=>{x&&(E._ignoreSubscribers=!0,(x.isPush?t.history.pushState:t.history.replaceState)(x.state,"",x.href),E._ignoreSubscribers=!1,x=void 0,g=void 0,c=void 0)},w=(k,L,I)=>{const V=a(L);g||(c=u),u=lc(L,I),x={href:V,state:I,isPush:(x==null?void 0:x.isPush)||k==="push"},g||(g=Promise.resolve().then(()=>v()))},S=k=>{u=l(),E.notify({type:k})},P=async()=>{if(h){h=!1;return}const k=l(),L=k.state[ri]-u.state[ri],I=L===1,V=L===-1,B=!I&&!V||d;d=!1;const F=B?"GO":V?"BACK":"FORWARD",$=B?{type:"GO",index:L}:{type:V?"BACK":"FORWARD"};if(f)f=!1;else{const W=s();if(typeof document<"u"&&W.length){for(const N of W)if(await N.blockerFn({currentLocation:u,nextLocation:k,action:F})){h=!0,t.history.go(1),E.notify($);return}}}u=l(),E.notify($)},T=k=>{if(m){m=!1;return}let L=!1;const I=s();if(typeof document<"u"&&I.length)for(const V of I){const B=V.enableBeforeUnload??!0;if(B===!0){L=!0;break}if(typeof B=="function"&&B()===!0){L=!0;break}}if(L)return k.preventDefault(),k.returnValue=""},E=QR({getLocation:y,getLength:()=>t.history.length,pushState:(k,L)=>w("push",k,L),replaceState:(k,L)=>w("replace",k,L),back:k=>(k&&(f=!0),m=!0,t.history.back()),forward:k=>{k&&(f=!0),m=!0,t.history.forward()},go:k=>{d=!0,t.history.go(k)},createHref:k=>a(k),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(px,T,{capture:!0}),t.removeEventListener(fx,P)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(px,T,{capture:!0}),t.addEventListener(fx,P),t.history.pushState=function(...k){const L=n.apply(t.history,k);return E._ignoreSubscribers||S("PUSH"),L},t.history.replaceState=function(...k){const L=r.apply(t.history,k);return E._ignoreSubscribers||S("REPLACE"),L},E}function ZR(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function lc(e,t){const n=ZR(e),r=n.indexOf("#"),i=n.indexOf("?"),s=sg();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 sg(){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 JR=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=TR(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=qR()),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=Da(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=UR(tL(this.latestLocation),d),MR(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=Mk(l);h&&h!=="/"&&d.push(OR({basepath:l})),u&&d.push(u),this.rewrite=d.length===0?void 0:d.length===1?d[0]:zR(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=wR(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&mR(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 g=this.options.parseSearch(u),v=this.options.stringifySearch(g);return{href:l+v+c,publicHref:l+v+c,pathname:Ro(l).path,external:!1,searchStr:v,search:yi(r==null?void 0:r.search,g),hash:Ro(c.slice(1)).path,state:Ur(r==null?void 0:r.state,h)}}const f=new URL(d,this.origin),m=Xf(this.rewrite,f),y=this.options.parseSearch(m.search),x=this.options.stringifySearch(y);return m.search=x,{href:m.href.replace(m.origin,""),publicHref:d,pathname:Ro(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:x,search:yi(r==null?void 0:r.search,y),hash:Ro(m.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)=>PR({base:n,to:ig(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=>nL({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 k,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)),m=this.getMatchedRoutes(h);let y=m.matchedRoutes;if((!m.foundRoute||m.foundRoute.path!=="/"&&m.routeParams["**"])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(f).length>0)for(const I of y){const V=((k=I.options.params)==null?void 0:k.stringify)??I.options.stringifyParams;if(V)try{Object.assign(f,V(f))}catch{}}const x=n.leaveParams?h:Ro(ix({path:h,params:f,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let g=c;if(n._includeValidateSearch&&((L=this.options.search)!=null&&L.strict)){const I={};y.forEach(V=>{if(V.options.validateSearch)try{Object.assign(I,hu(V.options.validateSearch,{...I,...g}))}catch{}}),g=I}g=rL({search:g,dest:s,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),g=yi(c,g);const v=this.options.stringifySearch(g),w=s.hash===!0?o.hash:s.hash?Or(s.hash,o.hash):void 0,S=w?`#${w}`:"";let P=s.state===!0?o.state:s.state?Or(s.state,o.state):{};P=Ur(o.state,P);const T=`${x}${v}${S}`;let E,_,R=!1;if(this.rewrite){const I=new URL(T,this.origin),V=Ik(this.rewrite,I);E=I.href.replace(I.origin,""),V.origin!==this.origin?(_=V.href,R=!0):_=V.pathname+V.search+V.hash}else E=hR(T),_=E;return{publicHref:_,href:E,pathname:x,search:g,searchStr:v,state:P,hash:w??"",external:R,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=gR(a.pathname,this.processedTree);if(c){Object.assign(u,c.rawParams);const{from:d,params:h,...f}=c.route,m=h===!1||h===null?Object.create(null):(h??!0)===!0?u:Object.assign(u,Or(h,u));o={from:n.from,...f,params:m},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=Bi(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=lc(a,{__TSR_index:n?d:d+1}),f=new URL(h.pathname,this.origin);l.to=Xf(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(oc(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 dx({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,g;let h=null,f=null,m=null,y=null;this.batch(()=>{const v=this.stores.pendingMatches.get(),w=v.length,S=this.stores.matches.get();h=w?S.filter(E=>!this.stores.pendingMatchStores.has(E.id)):null;const P=new Set;for(const E of this.stores.pendingMatchStores.values())E.routeId&&P.add(E.routeId);const T=new Set;for(const E of this.stores.matchStores.values())E.routeId&&T.add(E.routeId);f=w?S.filter(E=>!P.has(E.routeId)):null,m=w?v.filter(E=>!T.has(E.routeId)):null,y=w?v.filter(E=>T.has(E.routeId)):S,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(E=>E.status!=="error"&&E.status!=="notFound"&&E.status!=="redirected")]),this.clearExpiredCache())});for(const[v,w]of[[f,"onLeave"],[m,"onEnter"],[y,"onStay"]])if(v)for(const S of v)(g=(x=this.looseRoutesById[S.routeId].options)[w])==null||g.call(x,S)})})}})}catch(c){At(c)?(r=c,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):ft(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&&oc(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=Na,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 dx({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});ft(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=yR(s.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!a||n.params&&!Bi(a.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Bi(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??BR,parseSearch:e.parseSearch??NR,protocolAllowlist:e.protocolAllowlist??dR}),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?sL(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 m=o[f],y=u[f-1];let x,g,v;{const F=(y==null?void 0:y.search)??e.search,$=(y==null?void 0:y._strictSearch)??void 0;try{const W=hu(m.options.validateSearch,{...F})??void 0;x={...F,...W},g={...$,...W},v=void 0}catch(W){let N=W;if(W instanceof uc||(N=new uc(W.message,{cause:W})),t!=null&&t.throwOnError)throw N;x=F,g={},v=N}}const w=((h=(d=m.options).loaderDeps)==null?void 0:h.call(d,{search:x}))??"",S=w?JSON.stringify(w):"",{interpolatedPath:P,usedParams:T}=ix({path:m.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),E=m.id+P+S,_=this.getMatch(E),R=c.get(m.id),k=(_==null?void 0:_._strictParams)??T;let L;if(!_)try{gx(m,T,s,k)}catch(F){if(ft(F)||At(F)?L=F:L=new eL(F.message,{cause:F}),t!=null&&t.throwOnError)throw L}Object.assign(i,k);const I=R?"stay":"enter";let V;if(_)V={..._,cause:I,params:(R==null?void 0:R.params)??i,_strictParams:k,search:yi(R?R.search:_.search,x),_strictSearch:g};else{const F=m.options.loader||m.options.beforeLoad||m.lazyFn||Fk(m)?"pending":"success";V={id:E,ssr:m.options.ssr,index:f,routeId:m.id,params:(R==null?void 0:R.params)??i,_strictParams:k,pathname:P,updatedAt:Date.now(),search:R?yi(R.search,x):x,_strictSearch:g,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:I,loaderDeps:R?Ur(R.loaderDeps,w):w,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t!=null&&t.preload||(V.globalNotFound=l===m.id),V.searchError=v;const B=this.getParentContext(y);V.context={...B,...V.__routeContext,...V.__beforeLoadContext},u[f]=V}for(let f=0;f<u.length;f++){const m=u[f],y=this.looseRoutesById[m.routeId],x=this.getMatch(m.id),g=c.get(m.routeId);if(m.params=g?yi(g.params,i):i,!x){const v=u[f-1],w=this.getParentContext(v);if(y.options.context){const S={deps:m.loaderDeps,params:m.params,context:w??{},location:e,navigate:P=>this.navigate({...P,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:y.id};m.__routeContext=y.options.context(S)??void 0}m.context={...w,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(e){var c;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=Ma(t),s={...e.search};for(const d of t)try{Object.assign(s,hu(d.options.validateSearch,s))}catch{}const o=Ma(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{gx(h,n,r??{},d)}catch{}u=d}return{matchedRoutes:t,fullPath:i.fullPath,search:s,params:u}}},uc=class extends Error{},eL=class extends Error{};function tL(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function hu(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new uc("Async validation not supported");if(n.issues)throw new uc(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 nL({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=ni(e);let s,o;const a=vR(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 rL({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return iL(n)(e,t,r??!1)}function iL(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,...hu(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 sL(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 Fi}function gx(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 oL="Error preloading route! ☝️";var Vk=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=Fi:this.parentRoute||hr();let i=r?Fi:n==null?void 0:n.path;i&&i!=="/"&&(i=Lk(i));const s=(n==null?void 0:n.id)||i;let o=r?Fi:cu([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=cu(["/",o]));const a=o==="__root__"?"/":cu([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=>$R({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.")}},aL=class extends Vk{constructor(e){super(e)}};function lL(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 og(e){const t=e.errorComponent??ag;return p.jsx(uL,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?C.createElement(t,{error:n,reset:r}):e.children})}var uL=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 ag({error:e}){const[t,n]=C.useState(!1);return p.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[p.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),p.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"})]}),p.jsx("div",{style:{height:".25rem"}}),t?p.jsx("div",{children:p.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?p.jsx("code",{children:e.message}):null})}):null]})}function cL({children:e,fallback:t=null}){return $k()?p.jsx(Hi.Fragment,{children:e}):p.jsx(Hi.Fragment,{children:t})}function $k(){return Hi.useSyncExternalStore(dL,()=>!0,()=>!1)}function dL(){return()=>{}}var zk=C.createContext(null);function en(e){return C.useContext(zk)}var id=C.createContext(void 0),hL=C.createContext(void 0),Ee=(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))(Ee||{});function fL({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 m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===c)return;const y=c.depsTail=u.subsTail={version:d,dep:u,sub:c,prevDep:h,nextDep:f,prevSub:m,nextSub:void 0};f!==void 0&&(f.prevDep=y),h!==void 0?h.nextDep=y:c.deps=y,m!==void 0?m.nextSub=y:u.subs=y}function i(u,c=u.sub){const d=u.dep,h=u.prevDep,f=u.nextDep,m=u.nextSub,y=u.prevSub;return f!==void 0?f.prevDep=h:c.depsTail=h,h!==void 0?h.nextDep=f:c.deps=f,m!==void 0?m.prevSub=y:d.subsTail=y,y!==void 0?y.nextSub=m:(d.subs=m)===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 m=h.subs;if(m!==void 0){const y=(u=m).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 m=u.dep,y=m.flags;if(c.flags&16)f=!0;else if((y&17)===17){if(e(m)){const x=m.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=m.deps,c=m,++h;continue}if(!f){const x=u.nextDep;if(x!==void 0){u=x;continue}}for(;h--;){const x=c.subs,g=x.nextSub!==void 0;if(g?(u=d.value,d=d.prev):u=x,f){if(e(c)){g&&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 pL(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 qf=[];let fu=0;const{link:yx,unlink:mL,propagate:gL,checkDirty:Ok,shallowPropagate:vx}=fL({update(e){return e._update()},notify(e){qf[Zf++]=e,e.flags&=~Ee.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ee.Mutable|Ee.Dirty,cc(e))}});let Il=0,Zf=0,zn,Jf=0;function Uk(e){try{++Jf,e()}finally{--Jf||Wk()}}function cc(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=mL(n,e)}function Wk(){if(!(Jf>0)){for(;Il<Zf;){const e=qf[Il];qf[Il++]=void 0,e.notify()}Il=0,Zf=0}}function xx(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?Ee.None:Ee.Mutable,get(){return zn!==void 0&&yx(i,zn,fu),i._snapshot},subscribe(s){const o=pL(s),a={current:!1},l=yL(()=>{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,++fu,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=Ee.Mutable|Ee.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&=~Ee.RecursedCheck),cc(i)}}};return n?(i.flags=Ee.Mutable|Ee.Dirty,i.get=function(){const s=i.flags;if(s&Ee.Dirty||s&Ee.Pending&&Ok(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&vx(o)}}else s&Ee.Pending&&(i.flags=s&~Ee.Pending);return zn!==void 0&&yx(i,zn,fu),i._snapshot}):i.set=function(s){if(i._update(s)){const o=i.subs;o!==void 0&&(gL(o),vx(o),Wk())}},i}function yL(e){const t=()=>{const r=zn;zn=n,++fu,n.depsTail=void 0,n.flags=Ee.Watching|Ee.RecursedCheck;try{return e()}finally{zn=r,n.flags&=~Ee.RecursedCheck,cc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ee.Watching|Ee.RecursedCheck,notify(){const r=this.flags;r&Ee.Dirty||r&Ee.Pending&&Ok(this.deps,this)?t():this.flags=Ee.Watching},stop(){this.flags=Ee.None,this.depsTail=void 0,cc(this)}};return t(),n}var Hk={exports:{}},Kk={},Gk={exports:{}},Yk={};/**
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 vL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xL=typeof Object.is=="function"?Object.is:vL,wL=to.useState,SL=to.useEffect,bL=to.useLayoutEffect,kL=to.useDebugValue;function _L(e,t){var n=t(),r=wL({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return bL(function(){i.value=n,i.getSnapshot=t,rh(i)&&s({inst:i})},[e,n,t]),SL(function(){return rh(i)&&s({inst:i}),e(function(){rh(i)&&s({inst:i})})},[e]),kL(n),n}function rh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xL(e,n)}catch{return!0}}function CL(e,t){return t()}var PL=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?CL:_L;Yk.useSyncExternalStore=to.useSyncExternalStore!==void 0?to.useSyncExternalStore:PL;Gk.exports=Yk;var TL=Gk.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 sd=C,EL=TL;function jL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var AL=typeof Object.is=="function"?Object.is:jL,RL=EL.useSyncExternalStore,LL=sd.useRef,ML=sd.useEffect,IL=sd.useMemo,DL=sd.useDebugValue;Kk.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=LL(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=IL(function(){function l(f){if(!u){if(u=!0,c=f,f=r(f),i!==void 0&&o.hasValue){var m=o.value;if(i(m,f))return d=m}return d=f}if(m=d,AL(c,f))return m;var y=r(f);return i!==void 0&&i(m,y)?(c=f,m):(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=RL(e,s[0],s[1]);return ML(function(){o.hasValue=!0,o.value=a},[a]),DL(a),a};Hk.exports=Kk;var Xk=Hk.exports;const NL=Vc(Xk);function BL(e,t){return e===t}function Bt(e,t,n=BL){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 Xk.useSyncExternalStoreWithSelector(r,i,i,t,n)}var FL={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function es(e){const t=en(),n=C.useContext(e.from?hL:id),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 Bt(i??FL,o=>{if((e.shouldThrow??!0)&&!o&&hr(),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 Qk(e){return es({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function qk(e){const{select:t,...n}=e;return es({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Zk(e){return es({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 Jk(e){return es({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=en();return C.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function e_(e){return es({...e,select:t=>e.select?e.select(t.context):t.context})}function VL(e,t){const n=en(),r=oR(t),{activeProps:i,inactiveProps:s,activeOptions:o,to:a,preload:l,preloadDelay:u,preloadIntentProximity:c,hashScrollIntoView:d,replace:h,startTransition:f,resetScroll:m,viewTransition:y,children:x,target:g,disabled:v,style:w,className:S,onClick:P,onBlur:T,onFocus:E,onMouseEnter:_,onMouseLeave:R,onTouchStart:k,ignoreBlocker:L,params:I,search:V,hash:B,state:F,mask:$,reloadDocument:W,unsafeRelative:N,from:z,_fromLocation:b,...U}=e,Z=$k(),A=C.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),le=Bt(n.stores.location,pe=>pe,(pe,j)=>pe.href===j.href),fe=C.useMemo(()=>{const pe={_fromLocation:le,...A};return n.buildLocation(pe)},[n,le,A]),de=fe.maskedLocation?fe.maskedLocation.publicHref:fe.publicHref,Ze=fe.maskedLocation?fe.maskedLocation.external:fe.external,Fe=C.useMemo(()=>HL(de,Ze,n.history,v),[v,Ze,de,n.history]),gt=C.useMemo(()=>{if(Fe!=null&&Fe.external)return oc(Fe.href,n.protocolAllowlist)?void 0:Fe.href;if(!KL(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),oc(a,n.protocolAllowlist)?void 0:a}catch{}},[a,Fe,n.protocolAllowlist]),Vt=C.useMemo(()=>{if(gt)return!1;if(o!=null&&o.exact){if(!CR(le.pathname,fe.pathname,n.basepath))return!1}else{const pe=ac(le.pathname,n.basepath),j=ac(fe.pathname,n.basepath);if(!(pe.startsWith(j)&&(pe.length===j.length||pe[j.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Bi(le.search,fe.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?Z&&le.hash===fe.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,le,gt,Z,fe.hash,fe.pathname,fe.search,n.basepath]),$t=Vt?Or(i,{})??$L:ih,yn=Vt?ih:Or(s,{})??ih,xr=[S,$t.className,yn.className].filter(Boolean).join(" "),Je=(w||$t.style||yn.style)&&{...w,...$t.style,...yn.style},[Te,er]=C.useState(!1),In=C.useRef(!1),Pt=e.reloadDocument||gt?!1:l??n.options.defaultPreload,Dn=u??n.options.defaultPreloadDelay??0,tn=C.useCallback(()=>{n.preloadRoute({...A,_builtLocation:fe}).catch(pe=>{console.warn(pe),console.warn(oL)})},[n,A,fe]);sR(r,C.useCallback(pe=>{pe!=null&&pe.isIntersecting&&tn()},[tn]),WL,{disabled:!!v||Pt!=="viewport"}),C.useEffect(()=>{In.current||!v&&Pt==="render"&&(tn(),In.current=!0)},[v,tn,Pt]);const So=pe=>{const j=pe.currentTarget.getAttribute("target"),O=g!==void 0?g:j;if(!v&&!GL(pe)&&!pe.defaultPrevented&&(!O||O==="_self")&&pe.button===0){pe.preventDefault(),tg.flushSync(()=>{er(!0)});const q=n.subscribe("onResolved",()=>{q(),er(!1)});n.navigate({...A,replace:h,resetScroll:m,hashScrollIntoView:d,startTransition:f,viewTransition:y,ignoreBlocker:L})}};if(gt)return{...U,ref:r,href:gt,...x&&{children:x},...g&&{target:g},...v&&{disabled:v},...w&&{style:w},...S&&{className:S},...P&&{onClick:P},...T&&{onBlur:T},...E&&{onFocus:E},..._&&{onMouseEnter:_},...R&&{onMouseLeave:R},...k&&{onTouchStart:k}};const rs=pe=>{if(v||Pt!=="intent")return;if(!Dn){tn();return}const j=pe.currentTarget;if(Io.has(j))return;const O=setTimeout(()=>{Io.delete(j),tn()},Dn);Io.set(j,O)},bo=pe=>{v||Pt!=="intent"||tn()},is=pe=>{if(v||!Pt||!Dn)return;const j=pe.currentTarget,O=Io.get(j);O&&(clearTimeout(O),Io.delete(j))};return{...U,...$t,...yn,href:Fe==null?void 0:Fe.href,ref:r,onClick:as([P,So]),onBlur:as([T,is]),onFocus:as([E,rs]),onMouseEnter:as([_,rs]),onMouseLeave:as([R,is]),onTouchStart:as([k,bo]),disabled:!!v,target:g,...Je&&{style:Je},...xr&&{className:xr},...v&&zL,...Vt&&OL,...Z&&Te&&UL}}var ih={},$L={className:"active"},zL={role:"link","aria-disabled":!0},OL={"data-status":"active","aria-current":"page"},UL={"data-transitioning":"transitioning"},Io=new WeakMap,WL={rootMargin:"100px"},as=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function HL(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function KL(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var t_=C.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...s}=VL(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 GL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var YL=class extends Vk{constructor(e){super(e),this.useMatch=t=>es({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>e_({...t,from:this.id}),this.useSearch=t=>Jk({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Zk({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>qk({...t,from:this.id}),this.useLoaderData=t=>Qk({...t,from:this.id}),this.useNavigate=()=>uo({from:this.fullPath}),this.Link=Hi.forwardRef((t,n)=>p.jsx(t_,{ref:n,from:this.fullPath,...t}))}};function od(e){return new YL(e)}var XL=class extends aL{constructor(e){super(e),this.useMatch=t=>es({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>e_({...t,from:this.id}),this.useSearch=t=>Jk({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Zk({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>qk({...t,from:this.id}),this.useLoaderData=t=>Qk({...t,from:this.id}),this.useNavigate=()=>uo({from:this.fullPath}),this.Link=Hi.forwardRef((t,n)=>p.jsx(t_,{ref:n,from:this.fullPath,...t}))}};function QL(e){return new XL(e)}function qL(e){const t=en(),n=`not-found-${Bt(t.stores.location,r=>r.pathname)}-${Bt(t.stores.status,r=>r)}`;return p.jsx(og,{getResetKey:()=>n,onCatch:(r,i)=>{var s;if(ft(r))(s=e.onCatch)==null||s.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(ft(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function ZL(){return p.jsx("p",{children:"Not Found"})}function hs(e){return p.jsx(p.Fragment,{children:e.children})}function n_(e,t,n){return t.options.notFoundComponent?p.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?p.jsx(e.options.defaultNotFoundComponent,{...n}):p.jsx(ZL,{})}function JL(e){return null}function eM(){return JL(en()),null}var r_=C.memo(function({matchId:t}){const n=en(),r=n.stores.matchStores.get(t);r||hr();const i=Bt(n.stores.loadedAt,o=>o),s=Bt(r,o=>o);return p.jsx(tM,{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 tM({router:e,matchId:t,resetKey:n,matchState:r}){var m,y;const i=e.routesById[r.routeId],s=i.options.pendingComponent??e.options.defaultPendingComponent,o=s?p.jsx(s,{}):null,a=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??((m=e.options.notFoundRoute)==null?void 0:m.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?og:hs,f=u?qL:hs;return p.jsxs(i.isRoot?i.options.shellComponent??hs:hs,{children:[p.jsx(id.Provider,{value:t,children:p.jsx(d,{fallback:o,children:p.jsx(h,{getResetKey:()=>n,errorComponent:a||ag,onCatch:(x,g)=>{if(ft(x))throw x.routeId??(x.routeId=r.routeId),x;l==null||l(x,g)},children:p.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?p.jsx(cL,{fallback:o,children:p.jsx(wx,{matchId:t})}):p.jsx(wx,{matchId:t})})})})}),r.parentRouteId===Fi?p.jsxs(p.Fragment,{children:[p.jsx(nM,{resetKey:n}),e.options.scrollRestoration&&jk?p.jsx(eM,{}):null]}):null]})}function nM({resetKey:e}){const t=en(),n=C.useRef(void 0);return Go(()=>{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 wx=C.memo(function({matchId:t}){const n=en(),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||hr();const s=Bt(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?p.jsx(c,{},l):p.jsx(i_,{})},[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 ft(s.error)||hr(),n_(n,a,s.error);if(s.status==="redirected")throw At(s.error)||hr(),r(s,"loadPromise");if(s.status==="error")throw s.error;return u}),i_=C.memo(function(){const t=en(),n=C.useContext(id);let r,i=!1,s;{const u=n?t.stores.matchStores.get(n):void 0;[r,i]=Bt(u,c=>[c==null?void 0:c.routeId,(c==null?void 0:c.globalNotFound)??!1]),s=Bt(t.stores.matchesId,c=>c[c.findIndex(d=>d===n)+1])}const o=r?t.routesById[r]:void 0,a=t.options.defaultPendingComponent?p.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||hr(),n_(t,o,void 0);if(!s)return null;const l=p.jsx(r_,{matchId:s});return r===Fi?p.jsx(C.Suspense,{fallback:a,children:l}):l});function rM(){const e=en(),t=C.useRef({router:e,mounted:!1}),[n,r]=C.useState(!1),i=Bt(e.stores.isLoading,d=>d),s=Bt(e.stores.hasPending,d=>d),o=Qd(i),a=i||n||s,l=Qd(a),u=i||s,c=Qd(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]),Go(()=>{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]),Go(()=>{o&&!i&&e.emit({type:"onLoad",...zs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Go(()=>{c&&!u&&e.emit({type:"onBeforeRouteMount",...zs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,c,e]),Go(()=>{if(l&&!a){const d=zs(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),Uk(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&lL(e)}},[a,l,e]),null}function iM(){const e=en(),t=e.routesById[Fi].options.pendingComponent??e.options.defaultPendingComponent,n=t?p.jsx(t,{}):null,r=p.jsxs(typeof document<"u"&&e.ssr?hs:C.Suspense,{fallback:n,children:[p.jsx(rM,{}),p.jsx(sM,{})]});return e.options.InnerWrap?p.jsx(e.options.InnerWrap,{children:r}):r}function sM(){const e=en(),t=Bt(e.stores.firstId,i=>i),n=Bt(e.stores.loadedAt,i=>i),r=t?p.jsx(r_,{matchId:t}):null;return p.jsx(id.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:p.jsx(og,{getResetKey:()=>n,errorComponent:ag,onCatch:void 0,children:r})})}var oM=e=>({createMutableStore:xx,createReadonlyStore:xx,batch:Uk}),aM=e=>new lM(e),lM=class extends JR{constructor(e){super(e,oM)}};function uM({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=p.jsx(zk.Provider,{value:e,children:t});return e.options.Wrap?p.jsx(e.options.Wrap,{children:r}):r}function cM({router:e,...t}){return p.jsx(uM,{router:e,...t,children:p.jsx(iM,{})})}function lg(e){const t=en({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=C.useRef(void 0);return Bt(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 s_(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=s_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dM(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=s_(e))&&(r&&(r+=" "),r+=t);return r}const ug="-",hM=e=>{const t=pM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(ug);return a[0]===""&&a.length!==1&&a.shift(),o_(a,t)||fM(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},o_=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?o_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(ug);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Sx=/^\[(.+)\]$/,fM=e=>{if(Sx.test(e)){const t=Sx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pM=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return gM(Object.entries(e.classGroups),n).forEach(([s,o])=>{ep(o,r,s,t)}),r},ep=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:bx(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(mM(i)){ep(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{ep(o,bx(t,s),n,r)})})},bx=(e,t)=>{let n=e;return t.split(ug).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},mM=e=>e.isThemeGetter,gM=(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,yM=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)}}},a_="!",vM=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 g=a[x];if(u===0){if(g===i&&(r||a.slice(x,x+s)===t)){l.push(a.slice(c,x)),c=x+s;continue}if(g==="/"){d=x;continue}}g==="["?u++:g==="]"&&u--}const h=l.length===0?a:a.substring(c),f=h.startsWith(a_),m=f?h.substring(1):h,y=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},xM=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},wM=e=>({cache:yM(e.cacheSize),parseClassName:vM(e),...hM(e)}),SM=/\s+/,bM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(SM);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 m=!!f,y=r(m?h.substring(0,f):h);if(!y){if(!m){a=u+(a.length>0?" "+a:a);continue}if(y=r(h),!y){a=u+(a.length>0?" "+a:a);continue}m=!1}const x=xM(c).join(":"),g=d?x+a_:x,v=g+y;if(s.includes(v))continue;s.push(v);const w=i(y,m);for(let S=0;S<w.length;++S){const P=w[S];s.push(g+P)}a=u+(a.length>0?" "+a:a)}return a};function kM(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=l_(t))&&(r&&(r+=" "),r+=n);return r}const l_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=l_(e[r]))&&(n&&(n+=" "),n+=t);return n};function _M(e,...t){let n,r,i,s=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=wM(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=bM(l,n);return i(l,c),c}return function(){return s(kM.apply(null,arguments))}}const _e=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},u_=/^\[(?:([a-z-]+):)?(.+)\]$/i,CM=/^\d+\/\d+$/,PM=new Set(["px","full","screen"]),TM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EM=/\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$/,jM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,AM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=e=>Os(e)||PM.has(e)||CM.test(e),br=e=>co(e,"length",VM),Os=e=>!!e&&!Number.isNaN(Number(e)),sh=e=>co(e,"number",Os),Do=e=>!!e&&Number.isInteger(Number(e)),LM=e=>e.endsWith("%")&&Os(e.slice(0,-1)),te=e=>u_.test(e),kr=e=>TM.test(e),MM=new Set(["length","size","percentage"]),IM=e=>co(e,MM,c_),DM=e=>co(e,"position",c_),NM=new Set(["image","url"]),BM=e=>co(e,NM,zM),FM=e=>co(e,"",$M),No=()=>!0,co=(e,t,n)=>{const r=u_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},VM=e=>EM.test(e)&&!jM.test(e),c_=()=>!1,$M=e=>AM.test(e),zM=e=>RM.test(e),OM=()=>{const e=_e("colors"),t=_e("spacing"),n=_e("blur"),r=_e("brightness"),i=_e("borderColor"),s=_e("borderRadius"),o=_e("borderSpacing"),a=_e("borderWidth"),l=_e("contrast"),u=_e("grayscale"),c=_e("hueRotate"),d=_e("invert"),h=_e("gap"),f=_e("gradientColorStops"),m=_e("gradientColorStopPositions"),y=_e("inset"),x=_e("margin"),g=_e("opacity"),v=_e("padding"),w=_e("saturate"),S=_e("scale"),P=_e("sepia"),T=_e("skew"),E=_e("space"),_=_e("translate"),R=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",te,t],I=()=>[te,t],V=()=>["",nr,br],B=()=>["auto",Os,te],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["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"],N=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",te],b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[Os,te];return{cacheSize:500,separator:":",theme:{colors:[No],spacing:[nr,br],blur:["none","",kr,te],brightness:U(),borderColor:[e],borderRadius:["none","","full",kr,te],borderSpacing:I(),borderWidth:V(),contrast:U(),grayscale:z(),hueRotate:U(),invert:z(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[LM,br],inset:L(),margin:L(),opacity:U(),padding:I(),saturate:U(),scale:U(),sepia:z(),skew:U(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[kr]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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(),te]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],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",Do,te]}],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",te]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Do,te]}],"grid-cols":[{"grid-cols":[No]}],"col-start-end":[{col:["auto",{span:["full",Do,te]},te]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[No]}],"row-start-end":[{row:["auto",{span:[Do,te]},te]}],"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",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"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":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[kr]},kr]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,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",sh]}],"font-family":[{font:[No]}],"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",te]}],"line-clamp":[{"line-clamp":["none",Os,sh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nr,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nr,br]}],"underline-offset":[{"underline-offset":["auto",nr,te]}],"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:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],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",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),DM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",IM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},BM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"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":[g]}],"border-style":[{border:[...$(),"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":[g]}],"divide-style":[{divide:$()}],"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:["",...$()]}],"outline-offset":[{"outline-offset":[nr,te]}],"outline-w":[{outline:[nr,br]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[nr,br]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",kr,FM]}],"shadow-color":[{shadow:[No]}],opacity:[{opacity:[g]}],"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,te]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[P]}],"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":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"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",te]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Do,te]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",te]}],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",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[nr,br,sh]}],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"]}}},UM=_M(OM);var WM={},d_={exports:{}},Bo={};/**
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 kx;function HM(){if(kx)return Bo;kx=1;var e=Hi,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 Bo.Fragment=n,Bo.jsx=o,Bo.jsxs=o,Bo}d_.exports=HM();var M=d_.exports;const cg=C.createContext({});function dg(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const KM=typeof window<"u",h_=KM?C.useLayoutEffect:C.useEffect,ad=C.createContext(null);function hg(e,t){e.indexOf(t)===-1&&e.push(t)}function dc(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 _x(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let qa=()=>{},qi=()=>{};var Cx;typeof process<"u"&&((Cx=WM)==null?void 0:Cx.NODE_ENV)!=="production"&&(qa=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(_x(t,n))},qi=(e,t,n)=>{if(!e)throw new Error(_x(t,n))});const oi={},f_=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),p_=e=>typeof e=="object"&&e!==null,m_=e=>/^0[^.\s]+$/u.test(e);function g_(e){let t;return()=>(t===void 0&&(t=e()),t)}const fn=e=>e,Za=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Ba=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class fg{constructor(){this.subscriptions=[]}add(t){return hg(this.subscriptions,t),()=>dc(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,un=e=>e/1e3,y_=(e,t)=>t?e*(1e3/t):0,v_=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,GM=1e-7,YM=12;function XM(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=v_(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>GM&&++a<YM);return o}function Ja(e,t,n,r){if(e===t&&n===r)return fn;const i=s=>XM(s,0,1,e,n);return s=>s===0||s===1?s:v_(i(s),t,r)}const x_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,w_=e=>t=>1-e(1-t),S_=Ja(.33,1.53,.69,.99),pg=w_(S_),b_=x_(pg),k_=e=>e>=1?1:(e*=2)<1?.5*pg(e):.5*(2-Math.pow(2,-10*(e-1))),mg=e=>1-Math.sin(Math.acos(e)),__=w_(mg),C_=x_(mg),QM=Ja(.42,0,1,1),qM=Ja(0,0,.58,1),P_=Ja(.42,0,.58,1),ZM=e=>Array.isArray(e)&&typeof e[0]!="number",T_=e=>Array.isArray(e)&&typeof e[0]=="number",Px={linear:fn,easeIn:QM,easeInOut:P_,easeOut:qM,circIn:mg,circInOut:C_,circOut:__,backIn:pg,backInOut:b_,backOut:S_,anticipate:k_},JM=e=>typeof e=="string",Tx=e=>{if(T_(e)){qi(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return Ja(t,n,r,i)}else if(JM(e))return qi(Px[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Px[e];return e},Dl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eI(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 tI=40;function E_(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Dl.reduce((g,v)=>(g[v]=eI(s),g),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:m}=o,y=()=>{const g=oi.useManualTiming,v=g?i.timestamp:performance.now();n=!1,g||(i.delta=r?1e3/60:Math.max(Math.min(v-i.timestamp,tI),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),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},x=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:Dl.reduce((g,v)=>{const w=o[v];return g[v]=(S,P=!1,T=!1)=>(n||x(),w.schedule(S,P,T)),g},{}),cancel:g=>{for(let v=0;v<Dl.length;v++)o[Dl[v]].cancel(g)},state:i,steps:o}}const{schedule:we,cancel:ai,state:nt,steps:oh}=E_(typeof requestAnimationFrame<"u"?requestAnimationFrame:fn,!0);let pu;function nI(){pu=void 0}const xt={now:()=>(pu===void 0&&xt.set(nt.isProcessing||oi.useManualTiming?nt.timestamp:performance.now()),pu),set:e=>{pu=e,queueMicrotask(nI)}},j_=e=>t=>typeof t=="string"&&t.startsWith(e),A_=j_("--"),rI=j_("var(--"),gg=e=>rI(e)?iI.test(e.split("/*")[0].trim()):!1,iI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ex(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ho={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fa={...ho,transform:e=>Qn(0,1,e)},Nl={...ho,default:1},sa=e=>Math.round(e*1e5)/1e5,yg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sI(e){return e==null}const oI=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vg=(e,t)=>n=>!!(typeof n=="string"&&oI.test(n)&&n.startsWith(e)||t&&!sI(n)&&Object.prototype.hasOwnProperty.call(n,t)),R_=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(yg);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},aI=e=>Qn(0,255,e),ah={...ho,transform:e=>Math.round(aI(e))},Ai={test:vg("rgb","red"),parse:R_("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ah.transform(e)+", "+ah.transform(t)+", "+ah.transform(n)+", "+sa(Fa.transform(r))+")"};function lI(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 tp={test:vg("#"),parse:lI,transform:Ai.transform},el=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ir=el("deg"),Yn=el("%"),X=el("px"),uI=el("vh"),cI=el("vw"),jx={...Yn,parse:e=>Yn.parse(e)/100,transform:e=>Yn.transform(e*100)},js={test:vg("hsl","hue"),parse:R_("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Yn.transform(sa(t))+", "+Yn.transform(sa(n))+", "+sa(Fa.transform(r))+")"},Oe={test:e=>Ai.test(e)||tp.test(e)||js.test(e),parse:e=>Ai.test(e)?Ai.parse(e):js.test(e)?js.parse(e):tp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ai.transform(e):js.transform(e),getAnimatableNone:e=>{const t=Oe.parse(e);return t.alpha=0,Oe.transform(t)}},dI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hI(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(yg))==null?void 0:t.length)||0)+(((n=e.match(dI))==null?void 0:n.length)||0)>0}const L_="number",M_="color",fI="var",pI="var(",Ax="${}",mI=/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(mI,a=>(Oe.test(a)?(r.color.push(s),i.push(M_),n.push(Oe.parse(a))):a.startsWith(pI)?(r.var.push(s),i.push(fI),n.push(a)):(r.number.push(s),i.push(L_),n.push(parseFloat(a))),++s,Ax)).split(Ax);return{values:n,split:o,indexes:r,types:i}}function gI(e){return no(e).values}function I_({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===L_?i+=sa(r[s]):o===M_?i+=Oe.transform(r[s]):i+=r[s]}return i}}function yI(e){return I_(no(e))}const vI=e=>typeof e=="number"?0:Oe.test(e)?Oe.getAnimatableNone(e):e,xI=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:vI(e);function wI(e){const t=no(e);return I_(t)(t.values.map((n,r)=>xI(n,t.split[r])))}const Rn={test:hI,parse:gI,createTransformer:yI,getAnimatableNone:wI};function lh(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 SI({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=lh(l,a,e+1/3),s=lh(l,a,e),o=lh(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function hc(e,t){return n=>n>0?t:e}const ve=(e,t,n)=>e+(t-e)*n,uh=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},bI=[tp,Ai,js],kI=e=>bI.find(t=>t.test(e));function Rx(e){const t=kI(e);if(qa(!!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=SI(n)),n}const Lx=(e,t)=>{const n=Rx(e),r=Rx(t);if(!n||!r)return hc(e,t);const i={...n};return s=>(i.red=uh(n.red,r.red,s),i.green=uh(n.green,r.green,s),i.blue=uh(n.blue,r.blue,s),i.alpha=ve(n.alpha,r.alpha,s),Ai.transform(i))},np=new Set(["none","hidden"]);function _I(e,t){return np.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function CI(e,t){return n=>ve(e,t,n)}function xg(e){return typeof e=="number"?CI:typeof e=="string"?gg(e)?hc:Oe.test(e)?Lx:EI:Array.isArray(e)?D_:typeof e=="object"?Oe.test(e)?Lx:PI:hc}function D_(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>xg(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function PI(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=xg(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function TI(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 EI=(e,t)=>{const n=Rn.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?np.has(e)&&!i.values.length||np.has(t)&&!r.values.length?_I(e,t):Za(D_(TI(r,i),i.values),n):(qa(!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"),hc(e,t))};function N_(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ve(e,t,n):xg(e)(e,t)}const jI=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>we.update(t,n),stop:()=>ai(t),now:()=>nt.isProcessing?nt.timestamp:xt.now()}},B_=(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)})`},fc=2e4;function wg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<fc;)t+=n,r=e.next(t);return t>=fc?1/0:t}function AI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(wg(r),fc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:un(i)}}const Re={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 rp(e,t){return e*Math.sqrt(1-t*t)}const RI=12;function LI(e,t,n){let r=n;for(let i=1;i<RI;i++)r=r-e(r)/t(r);return r}const ch=.001;function MI({duration:e=Re.duration,bounce:t=Re.bounce,velocity:n=Re.velocity,mass:r=Re.mass}){let i,s;qa(e<=It(Re.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Qn(Re.minDamping,Re.maxDamping,o),e=Qn(Re.minDuration,Re.maxDuration,un(e)),o<1?(i=u=>{const c=u*o,d=c*e,h=c-n,f=rp(u,o),m=Math.exp(-d);return ch-h/f*m},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),m=rp(Math.pow(u,2),o);return(-i(u)+ch>0?-1:1)*((d-h)*f)/m}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-ch+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=LI(i,s,a);if(e=It(e),isNaN(l))return{stiffness:Re.stiffness,damping:Re.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const II=["duration","bounce"],DI=["stiffness","damping","mass"];function Mx(e,t){return t.some(n=>e[n]!==void 0)}function NI(e){let t={velocity:Re.velocity,stiffness:Re.stiffness,damping:Re.damping,mass:Re.mass,isResolvedFromDuration:!1,...e};if(!Mx(e,DI)&&Mx(e,II))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:Re.mass,stiffness:i,damping:s}}else{const n=MI({...e,velocity:0});t={...t,...n,mass:Re.mass},t.isResolvedFromDuration=!0}return t}function pc(e=Re.visualDuration,t=Re.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}=NI({...n,velocity:-un(n.velocity||0)}),m=h||0,y=u/(2*Math.sqrt(l*c)),x=o-s,g=un(Math.sqrt(l/c)),v=Math.abs(x)<5;r||(r=v?Re.restSpeed.granular:Re.restSpeed.default),i||(i=v?Re.restDelta.granular:Re.restDelta.default);let w,S,P,T,E,_;if(y<1)P=rp(g,y),T=(m+y*g*x)/P,w=k=>{const L=Math.exp(-y*g*k);return o-L*(T*Math.sin(P*k)+x*Math.cos(P*k))},E=y*g*T+x*P,_=y*g*x-T*P,S=k=>Math.exp(-y*g*k)*(E*Math.sin(P*k)+_*Math.cos(P*k));else if(y===1){w=L=>o-Math.exp(-g*L)*(x+(m+g*x)*L);const k=m+g*x;S=L=>Math.exp(-g*L)*(g*k*L-m)}else{const k=g*Math.sqrt(y*y-1);w=B=>{const F=Math.exp(-y*g*B),$=Math.min(k*B,300);return o-F*((m+y*g*x)*Math.sinh($)+k*x*Math.cosh($))/k};const L=(m+y*g*x)/k,I=y*g*L-x*k,V=y*g*x-L*k;S=B=>{const F=Math.exp(-y*g*B),$=Math.min(k*B,300);return F*(I*Math.sinh($)+V*Math.cosh($))}}const R={calculatedDuration:f&&d||null,velocity:k=>It(S(k)),next:k=>{if(!f&&y<1){const I=Math.exp(-y*g*k),V=Math.sin(P*k),B=Math.cos(P*k),F=o-I*(T*V+x*B),$=It(I*(E*V+_*B));return a.done=Math.abs($)<=r&&Math.abs(o-F)<=i,a.value=a.done?o:F,a}const L=w(k);if(f)a.done=k>=d;else{const I=It(S(k));a.done=Math.abs(I)<=r&&Math.abs(o-L)<=i}return a.value=a.done?o:L,a},toString:()=>{const k=Math.min(wg(R),fc),L=B_(I=>R.next(k*I).value,k,30);return k+"ms "+L},toTransition:()=>{}};return R}pc.applyToOptions=e=>{const t=AI(e,100,pc);return e.ease=t.ease,e.duration=It(t.duration),e.type="keyframes",e};const BI=5;function F_(e,t,n){const r=Math.max(t-BI,0);return y_(n-e(r),t-r)}function ip({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=_=>a!==void 0&&_<a||l!==void 0&&_>l,m=_=>a===void 0?l:l===void 0||Math.abs(a-_)<Math.abs(l-_)?a:l;let y=n*t;const x=d+y,g=o===void 0?x:o(x);g!==x&&(y=g-d);const v=_=>-y*Math.exp(-_/r),w=_=>g+v(_),S=_=>{const R=v(_),k=w(_);h.done=Math.abs(R)<=u,h.value=h.done?g:k};let P,T;const E=_=>{f(h.value)&&(P=_,T=pc({keyframes:[h.value,m(h.value)],velocity:F_(w,_,h.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:_=>{let R=!1;return!T&&P===void 0&&(R=!0,S(_),E(_)),P!==void 0&&_>=P?T.next(_-P):(!R&&S(_),h)}}}function FI(e,t,n){const r=[],i=n||oi.mix||N_,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]||fn:t;a=Za(l,a)}r.push(a)}return r}function VI(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(qi(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=FI(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=Ba(e[d],e[d+1],c);return a[d](h)};return n?c=>u(Qn(e[0],e[s-1],c)):u}function $I(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ba(0,t,r);e.push(ve(n,1,i))}}function zI(e){const t=[0];return $I(t,e.length-1),t}function OI(e,t){return e.map(n=>n*t)}function UI(e,t){return e.map(()=>t||P_).splice(0,e.length-1)}function oa({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=ZM(r)?r.map(Tx):Tx(r),s={done:!1,value:t[0]},o=OI(n&&n.length===t.length?n:zI(t),e),a=VI(o,t,{ease:Array.isArray(i)?i:UI(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const WI=e=>e!==null;function ld(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(WI),o=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const HI={decay:ip,inertia:ip,tween:oa,keyframes:oa,spring:pc};function V_(e){typeof e.type=="string"&&(e.type=HI[e.type])}class Sg{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 KI=e=>e/100;class mc extends Sg{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;V_(t);const{type:n=oa,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||oa;l!==oa&&typeof a[0]!="number"&&(this.mixKeyframes=Za(KI,N_(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=wg(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:m,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 g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,S=r;if(d){const _=Math.min(this.currentTime,i)/a;let R=Math.floor(_),k=_%1;!k&&_>=1&&(k=1),k===1&&R--,R=Math.min(R,d+1),R%2&&(h==="reverse"?(k=1-k,f&&(k-=f/a)):h==="mirror"&&(S=o)),w=Qn(0,1,k)*a}let P;v?(this.delayState.value=c[0],P=this.delayState):P=S.next(w),s&&!v&&(P.value=s(P.value));let{done:T}=P;!v&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return E&&m!==ip&&(P.value=ld(c,this.options,x,this.speed)),y&&y(P.value),E&&this.finish(),P}then(t,n){return this.finished.then(t,n)}get duration(){return un(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+un(t)}get time(){return un(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 F_(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=un(this.currentTime))}play(){var t,n;if(this.isStopped)return;const{driver:r=jI,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 GI(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ri=e=>e*180/Math.PI,sp=e=>{const t=Ri(Math.atan2(e[1],e[0]));return op(t)},YI={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:sp,rotateZ:sp,skewX:e=>Ri(Math.atan(e[1])),skewY:e=>Ri(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},op=e=>(e=e%360,e<0&&(e+=360),e),Ix=sp,Dx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Nx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),XI={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Dx,scaleY:Nx,scale:e=>(Dx(e)+Nx(e))/2,rotateX:e=>op(Ri(Math.atan2(e[6],e[5]))),rotateY:e=>op(Ri(Math.atan2(-e[2],e[0]))),rotateZ:Ix,rotate:Ix,skewX:e=>Ri(Math.atan(e[4])),skewY:e=>Ri(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ap(e){return e.includes("scale")?1:0}function lp(e,t){if(!e||e==="none")return ap(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=XI,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=YI,i=a}if(!i)return ap(t);const s=r[t],o=i[1].split(",").map(qI);return typeof s=="function"?s(o):o[s]}const QI=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return lp(n,t)};function qI(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"]),Bx=e=>e===ho||e===X,ZI=new Set(["x","y","z"]),JI=fo.filter(e=>!ZI.has(e));function eD(e){const t=[];return JI.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})=>lp(t,"x"),y:(e,{transform:t})=>lp(t,"y")};Kr.translateX=Kr.x;Kr.translateY=Kr.y;const $i=new Set;let up=!1,cp=!1,dp=!1;function $_(){if(cp){const e=Array.from($i).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=eD(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)})}cp=!1,up=!1,$i.forEach(e=>e.complete(dp)),$i.clear()}function z_(){$i.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cp=!0)})}function tD(){dp=!0,z_(),$_(),dp=!1}class bg{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?($i.add(this),up||(up=!0,we.read(z_),we.resolveKeyframes($_))):(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])}GI(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),$i.delete(this)}cancel(){this.state==="scheduled"&&($i.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const nD=e=>e.startsWith("--");function O_(e,t,n){nD(t)?e.style.setProperty(t,n):e.style[t]=n}const rD={};function U_(e,t){const n=g_(e);return()=>rD[t]??n()}const iD=U_(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),W_=U_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Yo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yo([0,.65,.55,1]),circOut:Yo([.55,0,1,.45]),backIn:Yo([.31,.01,.66,-.59]),backOut:Yo([.33,1.53,.69,.99])};function H_(e,t){if(e)return typeof e=="function"?W_()?B_(e,t):"ease-out":T_(e)?Yo(e):Array.isArray(e)?e.map(n=>H_(n,t)||Fx.easeOut):Fx[e]}function sD(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=H_(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 K_(e){return typeof e=="function"&&"applyToOptions"in e}function oD({type:e,...t}){return K_(e)&&W_()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class G_ extends Sg{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,qi(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=oD(t);this.animation=sD(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=ld(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),O_(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 un(Number(r))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+un(t)}get time(){return un(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&&iD()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),fn):i(this)}}const Y_={anticipate:k_,backInOut:b_,circInOut:C_};function aD(e){return e in Y_}function lD(e){typeof e.ease=="string"&&aD(e.ease)&&(e.ease=Y_[e.ease])}const dh=10;class uD extends G_{constructor(t){lD(t),V_(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 mc({...o,autoplay:!1}),l=Math.max(dh,xt.now()-this.startTime),u=Qn(0,dh,l-dh),c=a.sample(l).value,{name:d}=this.options;s&&d&&O_(s,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Vx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Rn.test(e)||e==="0")&&!e.startsWith("url("));function cD(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 dD(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=Vx(i,t),a=Vx(s,t);return qa(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:cD(e)||(n==="spring"||K_(n))&&r}function hp(e){e.duration=0,e.type="keyframes"}const X_=new Set(["opacity","clipPath","filter","transform"]),hD=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function fD(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&hD.test(e[t]))return!0;return!1}const pD=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),mD=g_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gD(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 mD()&&r&&(X_.has(r)||pD.has(r)&&fD(l))&&(r!=="transform"||!c)&&!u&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}const yD=40;class vD extends Sg{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},m=(c==null?void 0:c.KeyframeResolver)||bg;this.keyframeResolver=new m(a,(y,x,g)=>this.onKeyframesResolved(y,x,f,!g),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;dD(t,a,l,u)||(f=!1,(oi.instantAnimations||!c)&&(h==null||h(ld(t,r,n))),t[0]=t[t.length-1],hp(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>yD?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=f&&!d&&gD(m),x=(o=(s=m.motionValue)==null?void 0:s.owner)==null?void 0:o.current;let g;if(y)try{g=new uD({...m,element:x})}catch{g=new mc(m)}else g=new mc(m);g.finished.then(()=>{this.notifyFinished()}).catch(fn),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}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(),tD()),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 Q_(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 $x=30,xD=e=>!isNaN(parseFloat(e));class wD{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=xD(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 fg);const r=this.events[t].add(n);return t==="change"?()=>{r(),we.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>$x)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$x);return y_(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 wD(e,t)}function q_(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function kg(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?q_(n,e):n}const SD={type:"spring",stiffness:500,damping:25,restSpeed:10},bD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kD={type:"keyframes",duration:.8},_D={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},CD=(e,{keyframes:t})=>t.length>2?kD:po.has(e)?e.startsWith("scale")?bD(t[1]):SD:_D,PD=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function TD(e){for(const t in e)if(!PD.has(t))return!0;return!1}const _g=(e,t,n,r={},i,s)=>o=>{const a=kg(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};TD(a)||Object.assign(c,CD(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)&&(hp(c),c.delay===0&&(d=!0)),(oi.instantAnimations||oi.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,hp(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=ld(c.keyframes,a);if(h!==void 0){we.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new mc(c):new vD(c)},ED=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jD(e){const t=ED.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const AD=4;function Z_(e,t,n=1){qi(n<=AD,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=jD(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return f_(o)?parseFloat(o):o}return gg(i)?Z_(i,t,n+1):i}function zx(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Cg(e,t,n,r){if(typeof t=="function"){const[i,s]=zx(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]=zx(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function zi(e,t,n){const r=e.getProps();return Cg(r,t,n!==void 0?n:r.custom,e)}const J_=new Set(["width","height","top","left","right","bottom",...fo]),fp=e=>Array.isArray(e);function RD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ro(n))}function LD(e){return fp(e)?e[e.length-1]||0:e}function MD(e,t){const n=zi(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=LD(s[o]);RD(e,o,a)}}const st=e=>!!(e&&e.getVelocity);function ID(e){return!!(st(e)&&e.add)}function pp(e,t){const n=e.getValue("willChange");if(ID(n))return n.add(t);if(!n&&oi.WillChange){const r=new oi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Pg(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const DD="framerAppearId",eC="data-"+Pg(DD);function tC(e){return e.props[eC]}function ND({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function nC(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?q_(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 m in a){const y=e.getValue(m,e.latestValues[m]??null),x=a[m];if(x===void 0||h&&ND(h,m))continue;const g={delay:n,...kg(s||{},m)};c&&(g.skipAnimations=!0);const v=y.get();if(v!==void 0&&!y.isAnimating()&&!Array.isArray(x)&&x===v&&!g.velocity){we.update(()=>y.set(x));continue}let w=!1;if(window.MotionHandoffAnimation){const T=tC(e);if(T){const E=window.MotionHandoffAnimation(T,m,we);E!==null&&(g.startTime=E,w=!0)}}pp(e,m);const S=u??e.shouldReduceMotion;y.start(_g(m,y,x,S&&J_.has(m)?{type:!1}:g,e,w));const P=y.animation;P&&d.push(P)}if(o){const m=()=>we.update(()=>{o&&MD(e,o)});d.length?Promise.all(d).then(m):m()}return d}function mp(e,t,n={}){var r;const i=zi(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(nC(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=s;return BD(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 BD(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(mp(l,t,{...o,delay:n+(typeof r=="function"?0:r)+Q_(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function FD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>mp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=mp(e,t,n);else{const i=typeof t=="function"?zi(e,t,n.custom):t;r=Promise.all(nC(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const VD={test:e=>e==="auto",parse:e=>e},rC=e=>t=>t.test(e),iC=[ho,X,Yn,ir,cI,uI,VD],Ox=e=>iC.find(rC(e));function $D(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||m_(e):!0}const zD=new Set(["brightness","contrast","saturate","opacity"]);function OD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(yg)||[];if(!r)return e;const i=n.replace(r,"");let s=zD.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const UD=/\b([a-z-]*)\(.*?\)/gu,gp={...Rn,getAnimatableNone:e=>{const t=e.match(UD);return t?t.map(OD).join(" "):e}},yp={...Rn,getAnimatableNone:e=>{const t=Rn.parse(e);return Rn.createTransformer(e)(t.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},Ux={...ho,transform:Math.round},WD={rotate:ir,pathRotation:ir,rotateX:ir,rotateY:ir,rotateZ:ir,scale:Nl,scaleX:Nl,scaleY:Nl,scaleZ:Nl,skew:ir,skewX:ir,skewY:ir,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:Fa,originX:jx,originY:jx,originZ:X},gc={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,...WD,zIndex:Ux,fillOpacity:Fa,strokeOpacity:Fa,numOctaves:Ux},HD={...gc,color:Oe,backgroundColor:Oe,outlineColor:Oe,fill:Oe,stroke:Oe,borderColor:Oe,borderTopColor:Oe,borderRightColor:Oe,borderBottomColor:Oe,borderLeftColor:Oe,filter:gp,WebkitFilter:gp,mask:yp,WebkitMask:yp},sC=e=>HD[e],KD=new Set([gp,yp]);function oC(e,t){let n=sC(e);return KD.has(n)||(n=Rn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const GD=new Set(["auto","none","0"]);function YD(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!GD.has(s)&&no(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=oC(n,i)}class XD extends bg{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(),gg(d))){const h=Z_(d,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!J_.has(r)||t.length!==2)return;const[i,s]=t,o=Ox(i),a=Ox(s),l=Ex(i),u=Ex(s);if(l!==u&&Kr[r]){this.needsMeasurement=!0;return}if(o!==a)if(Bx(o)&&Bx(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||$D(t[i]))&&r.push(i);r.length&&YD(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 aC(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 vp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mu(e){return p_(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Tg}=E_(queueMicrotask,!1),kn={x:!1,y:!1};function lC(){return kn.x||kn.y}function QD(e){return e==="x"||e==="y"?kn[e]?null:(kn[e]=!0,()=>{kn[e]=!1}):kn.x||kn.y?null:(kn.x=kn.y=!0,()=>{kn.x=kn.y=!1})}function uC(e,t){const n=aC(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function qD(e){return!(e.pointerType==="touch"||lC())}function ZD(e,t,n={}){const[r,i,s]=uC(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",m)},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)},m=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},y=x=>{if(!qD(x))return;l=!1;const g=t(o,x);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",f,i)}),s}const cC=(e,t)=>t?e===t?!0:cC(e,t.parentElement):!1,Eg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,JD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function e2(e){return JD.has(e.tagName)||e.isContentEditable===!0}const t2=new Set(["INPUT","SELECT","TEXTAREA"]);function n2(e){return t2.has(e.tagName)||e.isContentEditable===!0}const gu=new WeakSet;function Wx(e){return t=>{t.key==="Enter"&&e(t)}}function hh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const r2=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Wx(()=>{if(gu.has(n))return;hh(n,"down");const i=Wx(()=>{hh(n,"up")}),s=()=>hh(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 Hx(e){return Eg(e)&&!lC()}const Kx=new WeakSet;function i2(e,t,n={}){const[r,i,s]=uC(e,n),o=a=>{const l=a.currentTarget;if(!Hx(a)||Kx.has(a))return;gu.add(l),n.stopPropagation&&Kx.add(a);const u=t(l,a),c=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),gu.has(l)&&gu.delete(l),Hx(f)&&typeof u=="function"&&u(f,{success:m})},d=f=>{c(f,l===window||l===document||n.useGlobalTarget||cC(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),mu(a)&&(a.addEventListener("focus",l=>r2(l,i)),!e2(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function jg(e){return p_(e)&&"ownerSVGElement"in e}const yu=new WeakMap;let fs;const dC=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:jg(r)&&"getBBox"in r?r.getBBox()[t]:r[n],s2=dC("inline","width","offsetWidth"),o2=dC("block","height","offsetHeight");function a2({target:e,borderBoxSize:t}){var n;(n=yu.get(e))==null||n.forEach(r=>{r(e,{get width(){return s2(e,t)},get height(){return o2(e,t)}})})}function l2(e){e.forEach(a2)}function u2(){typeof ResizeObserver>"u"||(fs=new ResizeObserver(l2))}function c2(e,t){fs||u2();const n=aC(e);return n.forEach(r=>{let i=yu.get(r);i||(i=new Set,yu.set(r,i)),i.add(t),fs==null||fs.observe(r)}),()=>{n.forEach(r=>{const i=yu.get(r);i==null||i.delete(t),i!=null&&i.size||fs==null||fs.unobserve(r)})}}const vu=new Set;let As;function d2(){As=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};vu.forEach(t=>t(e))},window.addEventListener("resize",As)}function h2(e){return vu.add(e),As||d2(),()=>{vu.delete(e),!vu.size&&typeof As=="function"&&(window.removeEventListener("resize",As),As=void 0)}}function Gx(e,t){return typeof e=="function"?h2(e):c2(e,t)}function f2(e){return jg(e)&&e.tagName==="svg"}const p2=[...iC,Oe,Rn],m2=e=>p2.find(rC(e)),Yx=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rs=()=>({x:Yx(),y:Yx()}),Xx=()=>({min:0,max:0}),Ke=()=>({x:Xx(),y:Xx()}),g2=new WeakMap;function ud(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Va(e){return typeof e=="string"||Array.isArray(e)}const Ag=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rg=["initial",...Ag];function cd(e){return ud(e.animate)||Rg.some(t=>Va(e[t]))}function hC(e){return!!(cd(e)||e.variants)}function y2(e,t,n){for(const r in t){const i=t[r],s=n[r];if(st(i))e.addValue(r,i);else if(st(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 yc={current:null},Lg={current:!1},v2=typeof window<"u";function fC(){if(Lg.current=!0,!!v2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yc.current=e.matches;e.addEventListener("change",t),t()}else yc.current=!1}const Qx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let vc={};function pC(e){vc=e}function x2(){return vc}class w2{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=bg,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,we.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=cd(n),this.isVariantNode=hC(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 m=h[f];u[f]!==void 0&&st(m)&&m.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,g2.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:(Lg.current||fC(),this.shouldReduceMotion=yc.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&&X_.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new G_({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&&we.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 vc){const n=vc[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):Ke()}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<Qx.length;r++){const i=Qx[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=y2(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"&&(f_(r)||m_(r))?r=parseFloat(r):!m2(r)&&Rn.test(n)&&(r=oC(t,n)),this.setBaseTarget(t,st(r)?r.get():r)),st(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=Cg(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&&!st(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 fg),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Tg.render(this.render)}}class mC extends w2{constructor(){super(...arguments),this.KeyframeResolver=XD}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;st(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 gC({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function S2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function b2(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 fh(e){return e===void 0||e===1}function xp({scale:e,scaleX:t,scaleY:n}){return!fh(e)||!fh(t)||!fh(n)}function ki(e){return xp(e)||yC(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yC(e){return qx(e.x)||qx(e.y)}function qx(e){return e&&e!=="0%"}function xc(e,t,n){const r=e-n,i=t*r;return n+i}function Zx(e,t,n,r,i){return i!==void 0&&(e=xc(e,i,r)),xc(e,n,r)+t}function wp(e,t=0,n=1,r,i){e.min=Zx(e.min,t,n,r,i),e.max=Zx(e.max,t,n,r,i)}function vC(e,{x:t,y:n}){wp(e.x,t.translate,t.scale,t.originPoint),wp(e.y,n.translate,n.scale,n.originPoint)}const Jx=.999999999999,e0=1.0000000000001;function k2(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,vC(e,a)),r&&ki(o.latestValues)&&xu(e,o.latestValues,(i=o.layout)==null?void 0:i.layoutBox))}t.x<e0&&t.x>Jx&&(t.x=1),t.y<e0&&t.y>Jx&&(t.y=1)}function On(e,t){e.min+=t,e.max+=t}function t0(e,t,n,r,i=.5){const s=ve(e.min,e.max,i);wp(e,t,n,s,r)}function n0(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function xu(e,t,n){const r=n??e;t0(e.x,n0(t.x,r.x),t.scaleX,t.scale,t.originX),t0(e.y,n0(t.y,r.y),t.scaleY,t.scale,t.originY)}function xC(e,t){return gC(b2(e.getBoundingClientRect(),t))}function _2(e,t,n){const r=xC(e,n),{scroll:i}=t;return i&&(On(r.x,i.offset.x),On(r.y,i.offset.y)),r}const C2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},P2=fo.length;function T2(e,t,n){let r="",i=!0;for(let o=0;o<P2;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=vp(l,gc[a]);if(!u){i=!1;const d=C2[a]||a;r+=`${d}(${c}) `}n&&(t[a]=c)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${vp(s,gc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Mg(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(A_(l)){i[l]=u;continue}else{const c=vp(u,gc[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=T2(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 wC(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 r0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Fo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(X.test(e))e=parseFloat(e);else return e;const n=r0(e,t.target.x),r=r0(e,t.target.y);return`${n}% ${r}%`}},E2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Rn.parse(e);if(i.length>5)return r;const s=Rn.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=ve(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},Sp={borderRadius:{...Fo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fo,borderTopRightRadius:Fo,borderBottomLeftRadius:Fo,borderBottomRightRadius:Fo,boxShadow:E2};function SC(e,{layout:t,layoutId:n}){return po.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Sp[e]||e==="opacity")}function Ig(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)(st(i[a])||s&&st(s[a])||SC(a,e)||((r=n==null?void 0:n.getValue(a))==null?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}function j2(e){return window.getComputedStyle(e)}class A2 extends mC{constructor(){super(...arguments),this.type="html",this.renderInstance=wC}readValueFromInstance(t,n){var r;if(po.has(n))return(r=this.projection)!=null&&r.isProjecting?ap(n):QI(t,n);{const i=j2(t),s=(A_(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xC(t,n)}build(t,n,r){Mg(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ig(t,n,r)}}const R2={offset:"stroke-dashoffset",array:"stroke-dasharray"},L2={offset:"strokeDashoffset",array:"strokeDasharray"};function M2(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?R2:L2;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const I2=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function bC(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(Mg(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 I2)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&&M2(d,i,s,o,!1)}const kC=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"]),_C=e=>typeof e=="string"&&e.toLowerCase()==="svg";function D2(e,t,n,r){wC(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(kC.has(i)?i:Pg(i),t.attrs[i])}function CC(e,t,n){const r=Ig(e,t,n);for(const i in e)if(st(e[i])||st(t[i])){const s=fo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class N2 extends mC{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ke}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(po.has(n)){const r=sC(n);return r&&r.default||0}return n=kC.has(n)?n:Pg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return CC(t,n,r)}build(t,n,r){bC(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){D2(t,n,r,i)}mount(t){this.isSVGTag=_C(t.tagName),super.mount(t)}}const B2=Rg.length;function PC(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?PC(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<B2;n++){const r=Rg[n],i=e.props[r];(Va(i)||i===!1)&&(t[r]=i)}return t}function TC(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 F2=[...Ag].reverse(),V2=Ag.length;function $2(e){return t=>Promise.all(t.map(({animation:n,options:r})=>FD(e,n,r)))}function z2(e){let t=$2(e),n=i0(),r=!0,i=!1;const s=u=>(c,d)=>{var h;const f=zi(e,d,u==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(f){const{transition:m,transitionEnd:y,...x}=f;c={...c,...x,...y}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=PC(e.parent)||{},h=[],f=new Set;let m={},y=1/0;for(let g=0;g<V2;g++){const v=F2[g],w=n[v],S=c[v]!==void 0?c[v]:d[v],P=Va(S),T=v===u?w.isActive:null;T===!1&&(y=g);let E=S===d[v]&&S!==c[v]&&P;if(E&&(r||i)&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...m},!w.isActive&&T===null||!S&&!w.prevProp||ud(S)||typeof S=="boolean")continue;if(v==="exit"&&w.isActive&&T!==!0){w.prevResolvedValues&&(m={...m,...w.prevResolvedValues});continue}const _=O2(w.prevProp,S);let R=_||v===u&&w.isActive&&!E&&P||g>y&&P,k=!1;const L=Array.isArray(S)?S:[S];let I=L.reduce(s(v),{});T===!1&&(I={});const{prevResolvedValues:V={}}=w,B={...V,...I},F=W=>{R=!0,f.has(W)&&(k=!0,f.delete(W)),w.needsAnimating[W]=!0;const N=e.getValue(W);N&&(N.liveStyle=!1)};for(const W in B){const N=I[W],z=V[W];if(m.hasOwnProperty(W))continue;let b=!1;fp(N)&&fp(z)?b=!TC(N,z)||_:b=N!==z,b?N!=null?F(W):f.add(W):N!==void 0&&f.has(W)?F(W):w.protectedKeys[W]=!0}w.prevProp=S,w.prevResolvedValues=I,w.isActive&&(m={...m,...I}),(r||i)&&e.blockInitialAnimation&&(R=!1);const $=E&&_;R&&(!$||k)&&h.push(...L.map(W=>{const N={type:v};if(typeof W=="string"&&(r||i)&&!$&&e.manuallyAnimateOnMount&&e.parent){const{parent:z}=e,b=zi(z,W);if(z.enteringChildren&&b){const{delayChildren:U}=b.transition||{};N.delay=Q_(z.enteringChildren,e,U)}}return{animation:W,options:N}}))}if(f.size){const g={};if(typeof c.initial!="boolean"){const v=zi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(g.transition=v.transition)}f.forEach(v=>{const w=e.getBaseTarget(v),S=e.getValue(v);S&&(S.liveStyle=!0),g[v]=w??null}),h.push({animation:g})}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 m;return(m=f.animationState)==null?void 0:m.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=i0(),i=!0}}}function O2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!TC(t,e):!1}function vi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function i0(){return{animate:vi(!0),whileInView:vi(),whileHover:vi(),whileTap:vi(),whileDrag:vi(),whileFocus:vi(),exit:vi()}}function bp(e,t){e.min=t.min,e.max=t.max}function xn(e,t){bp(e.x,t.x),bp(e.y,t.y)}function s0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const EC=1e-4,U2=1-EC,W2=1+EC,jC=.01,H2=0-jC,K2=0+jC;function wt(e){return e.max-e.min}function G2(e,t,n){return Math.abs(e-t)<=n}function o0(e,t,n,r=.5){e.origin=r,e.originPoint=ve(t.min,t.max,e.origin),e.scale=wt(n)/wt(t),e.translate=ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=U2&&e.scale<=W2||isNaN(e.scale))&&(e.scale=1),(e.translate>=H2&&e.translate<=K2||isNaN(e.translate))&&(e.translate=0)}function aa(e,t,n,r){o0(e.x,t.x,n.x,r?r.originX:void 0),o0(e.y,t.y,n.y,r?r.originY:void 0)}function a0(e,t,n,r=0){const i=r?ve(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+wt(t)}function Y2(e,t,n,r){a0(e.x,t.x,n.x,r==null?void 0:r.x),a0(e.y,t.y,n.y,r==null?void 0:r.y)}function l0(e,t,n,r=0){const i=r?ve(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+wt(t)}function wc(e,t,n,r){l0(e.x,t.x,n.x,r==null?void 0:r.x),l0(e.y,t.y,n.y,r==null?void 0:r.y)}function u0(e,t,n,r,i){return e-=t,e=xc(e,1/n,r),i!==void 0&&(e=xc(e,1/i,r)),e}function X2(e,t=0,n=1,r=.5,i,s=e,o=e){if(Yn.test(t)&&(t=parseFloat(t),t=ve(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ve(s.min,s.max,r);e===s&&(a-=t),e.min=u0(e.min,t,n,a,i),e.max=u0(e.max,t,n,a,i)}function c0(e,t,[n,r,i],s,o){X2(e,t[n],t[r],t[i],t.scale,s,o)}const Q2=["x","scaleX","originX"],q2=["y","scaleY","originY"];function d0(e,t,n,r){c0(e.x,t,Q2,n?n.x:void 0,r?r.x:void 0),c0(e.y,t,q2,n?n.y:void 0,r?r.y:void 0)}function h0(e){return e.translate===0&&e.scale===1}function AC(e){return h0(e.x)&&h0(e.y)}function f0(e,t){return e.min===t.min&&e.max===t.max}function Z2(e,t){return f0(e.x,t.x)&&f0(e.y,t.y)}function p0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function RC(e,t){return p0(e.x,t.x)&&p0(e.y,t.y)}function m0(e){return wt(e.x)/wt(e.y)}function g0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Fn(e){return[e("x"),e("y")]}function J2(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:m,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) `),m&&(r+=`skewX(${m}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 LC=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],eN=LC.length,y0=e=>typeof e=="string"?parseFloat(e):e,v0=e=>typeof e=="number"||X.test(e);function tN(e,t,n,r,i,s){i?(e.opacity=ve(0,n.opacity??1,nN(r)),e.opacityExit=ve(t.opacity??1,0,rN(r))):s&&(e.opacity=ve(t.opacity??1,n.opacity??1,r));for(let o=0;o<eN;o++){const a=LC[o];let l=x0(t,a),u=x0(n,a);l===void 0&&u===void 0||(l||(l=0),u||(u=0),l===0||u===0||v0(l)===v0(u)?(e[a]=Math.max(ve(y0(l),y0(u),r),0),(Yn.test(u)||Yn.test(l))&&(e[a]+="%")):e[a]=u)}(t.rotate||n.rotate)&&(e.rotate=ve(t.rotate||0,n.rotate||0,r))}function x0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nN=MC(0,.5,__),rN=MC(.5,.95,fn);function MC(e,t,n){return r=>r<e?0:r>t?1:n(Ba(e,t,r))}function iN(e,t,n){const r=st(e)?e:ro(e);return r.start(_g("",r,t,n)),r.animation}function $a(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const sN=(e,t)=>e.depth-t.depth;class oN{constructor(){this.children=[],this.isDirty=!1}add(t){hg(this.children,t),this.isDirty=!0}remove(t){dc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sN),this.isDirty=!1,this.children.forEach(t)}}function aN(e,t){const n=xt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ai(r),e(s-t))};return we.setup(r,!0),()=>ai(r)}function wu(e){return st(e)?e.get():e}class lN{constructor(){this.members=[]}add(t){hg(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&&(dc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(dc(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 Su={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ph=["","X","Y","Z"],uN=1e3;let cN=0;function mh(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function IC(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=tC(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&IC(r)}function DC({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},o=t==null?void 0:t()){this.id=cN++,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(fN),this.nodes.forEach(xN),this.nodes.forEach(wN),this.nodes.forEach(pN)},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 oN)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new fg),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=jg(s)&&!f2(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;we.read(()=>{c=window.innerWidth}),e(s,()=>{const h=window.innerWidth;h!==c&&(c=h,this.root.updateBlockedByResize=!0,u&&u(),u=aN(d,250),Su.hasAnimatedSinceResize&&(Su.hasAnimatedSinceResize=!1,this.nodes.forEach(b0)))})}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()||CN,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=l.getProps(),x=!this.targetLayout||!RC(this.targetLayout,h),g=!c&&d;if(this.options.layoutRoot||this.resumeFrom||g||c&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...kg(f,"layout"),onPlay:m,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,g,v.path)}else c||b0(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(SN),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&&IC(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(gN),this.nodes.forEach(w0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(S0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(yN),this.nodes.forEach(vN),this.nodes.forEach(dN),this.nodes.forEach(hN)):this.nodes.forEach(S0),this.clearAllSnapshots();const s=xt.now();nt.delta=Qn(0,1e3/60,s-nt.timestamp),nt.timestamp=s,nt.isProcessing=!0,oh.update.process(nt),oh.preRender.process(nt),oh.render.process(nt),nt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Tg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mN),this.sharedNodes.forEach(bN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.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=Ke()),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&&!AC(this.projectionDelta),a=this.getTransformTemplate(),l=a?a(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;s&&this.instance&&(o||ki(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)),PN(a),{animationId:this.root.animationId,measuredBox:o,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:o}=this.options;if(!o)return Ke();const a=o.measureViewportBox();if(!((s=this.scroll)!=null&&s.wasRoot||this.path.some(TN))){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=Ke();if(xn(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&&xn(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||Ke();xn(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)),ki(h.latestValues)&&xu(c,h.latestValues,(l=h.layout)==null?void 0:l.layoutBox)}return ki(this.latestValues)&&xu(c,this.latestValues,(u=this.layout)==null?void 0:u.layoutBox),c}removeTransform(s){var o;const a=Ke();xn(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!ki(u.latestValues))continue;let c;u.instance&&(xp(u.latestValues)&&u.updateSnapshot(),c=Ke(),xn(c,u.measurePageBox())),d0(a,u.latestValues,(o=u.snapshot)==null?void 0:o.layoutBox,c)}return ki(this.latestValues)&&d0(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!==nt.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=nt.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=Ke(),this.targetWithTransforms=Ke()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Y2(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),vC(this.target,this.targetDelta)):xn(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||xp(this.parent.latestValues)||yC(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=Ke(),this.relativeTargetOrigin=Ke(),wc(this.relativeTargetOrigin,o,a,this.options.layoutAnchor||void 0),xn(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===nt.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;k2(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=Ke());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(s0(this.prevProjectionDelta.x,this.projectionDelta.x),s0(this.prevProjectionDelta.y,this.projectionDelta.y)),aa(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!g0(this.projectionDelta.x,this.prevProjectionDelta.x)||!g0(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=Ke(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,y=f!==m,x=this.getStack(),g=!x||x.members.length<=1,v=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(_N));this.animationProgress=0;let w;const S=a==null?void 0:a.interpolateProjection(s);this.mixTargetDelta=P=>{const T=P/1e3,E=S==null?void 0:S(T);E?(d.x.translate=E.x,d.x.scale=ve(s.x.scale,1,T),d.x.origin=s.x.origin,d.x.originPoint=s.x.originPoint,d.y.translate=E.y,d.y.scale=ve(s.y.scale,1,T),d.y.origin=s.y.origin,d.y.originPoint=s.y.originPoint):(k0(d.x,s.x,T),k0(d.y,s.y,T)),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wc(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),kN(this.relativeTarget,this.relativeTargetOrigin,h,T),w&&Z2(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ke()),xn(w,this.relativeTarget)),y&&(this.animationValues=c,tN(c,u,this.latestValues,T,v,g)),E&&E.rotate!==void 0&&(this.animationValues||(this.animationValues=c),this.animationValues.pathRotation=E.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},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=we.update(()=>{Su.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ro(0)),this.motionValue.jump(0,!1),this.currentAnimation=iN(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(uN),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&&NC(this.options.animationType,this.layout.layoutBox,l.layoutBox)){a=this.target||Ke();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}xn(o,a),xu(o,u),aa(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new lN),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&&mh("z",s,l,this.animationValues);for(let u=0;u<ph.length;u++)mh(`rotate${ph[u]}`,s,l,this.animationValues),mh(`skew${ph[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=wu(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=wu(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ki(this.latestValues)&&(s.transform=a?a({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let c=J2(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 Sp){if(u[f]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:x}=Sp[f],g=c==="none"?u[f]:m(u[f],l);if(y){const v=y.length;for(let w=0;w<v;w++)s[y[w]]=g}else x?this.options.visualElement.renderState.vars[f]=g:s[f]=g}this.options.layoutId&&(s.pointerEvents=l===this?wu(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(w0),this.root.sharedNodes.clear()}}}function dN(e){e.updateLayout()}function hN(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";bp(o?n.measuredBox[d]:n.layoutBox[d],r[d])}else NC(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();aa(a,r,n.layoutBox);const l=Rs();o?aa(l,e.applyTransform(i,!0),n.measuredBox):aa(l,r,n.layoutBox);const u=!AC(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 m=e.options.layoutAnchor||void 0,y=Ke();wc(y,n.layoutBox,h.layoutBox,m);const x=Ke();wc(x,r,f.layoutBox,m),RC(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 fN(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 pN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function mN(e){e.clearSnapshot()}function w0(e){e.clearMeasurements()}function gN(e){e.isLayoutDirty=!0,e.updateLayout()}function S0(e){e.isLayoutDirty=!1}function yN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function vN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function b0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xN(e){e.resolveTargetDelta()}function wN(e){e.calcProjection()}function SN(e){e.resetSkewAndRotation()}function bN(e){e.removeLeadSnapshot()}function k0(e,t,n){e.translate=ve(t.translate,0,n),e.scale=ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _0(e,t,n,r){e.min=ve(t.min,n.min,r),e.max=ve(t.max,n.max,r)}function kN(e,t,n,r){_0(e.x,t.x,n.x,r),_0(e.y,t.y,n.y,r)}function _N(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const CN={duration:.45,ease:[.4,0,.1,1]},C0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),P0=C0("applewebkit/")&&!C0("chrome/")?Math.round:fn;function T0(e){e.min=P0(e.min),e.max=P0(e.max)}function PN(e){T0(e.x),T0(e.y)}function NC(e,t,n){return e==="position"||e==="preserve-aspect"&&!G2(m0(t),m0(n),.2)}function TN(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const EN=DC({attachResizeListener:(e,t)=>$a(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}),gh={current:void 0},BC=DC({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!gh.current){const e=new EN({});e.mount(window),e.setOptions({layoutScroll:!0}),gh.current=e}return gh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Dg=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function E0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jN(...e){return t=>{let n=!1;const r=e.map(i=>{const s=E0(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():E0(e[i],null)}}}}function AN(...e){return C.useCallback(jN(...e),e)}class RN extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(mu(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=mu(r)&&r.offsetWidth||0,s=mu(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 LN({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(Dg),d=((o=e.props)==null?void 0:o.ref)??(e==null?void 0:e.ref),h=AN(l,d);return C.useInsertionEffect(()=>{const{width:f,height:m,top:y,left:x,right:g,bottom:v,direction:w}=u.current;if(t||s===!1||!l.current||!f||!m)return;const S=w==="rtl",P=n==="left"?S?`right: ${g}`:`left: ${x}`:S?`left: ${x}`:`right: ${g}`,T=r==="bottom"?`bottom: ${v}`:`top: ${y}`;l.current.dataset.motionPopId=a;const E=document.createElement("style");c&&(E.nonce=c);const _=i??document.head;return _.appendChild(E),E.sheet&&E.sheet.insertRule(`
65
+ [data-motion-pop-id="${a}"] {
66
+ position: absolute !important;
67
+ width: ${f}px !important;
68
+ height: ${m}px !important;
69
+ ${P}px !important;
70
+ ${T}px !important;
71
+ }
72
+ `),()=>{var R;(R=l.current)==null||R.removeAttribute("data-motion-pop-id"),_.contains(E)&&_.removeChild(E)}},[t]),M.jsx(RN,{isPresent:t,childRef:l,sizeRef:u,pop:s,children:s===!1?e:C.cloneElement(e,{ref:h})})}const MN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=dg(IN),d=C.useId();let h=!0,f=C.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:m=>{c.set(m,!0);for(const y of c.values())if(!y)return;r&&r()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,r]);return s&&h&&(f={...f}),C.useMemo(()=>{c.forEach((m,y)=>c.set(y,!1))},[n]),C.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=M.jsx(LN,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),M.jsx(ad.Provider,{value:f,children:e})};function IN(){return new Map}function FC(e=!0){const t=C.useContext(ad);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 Bl=e=>e.key||"";function j0(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const DN=({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]=FC(o),h=C.useMemo(()=>j0(e),[e]),f=o&&!c?[]:h.map(Bl),m=C.useRef(!0),y=C.useRef(h),x=dg(()=>new Map),g=C.useRef(new Set),[v,w]=C.useState(h),[S,P]=C.useState(h);h_(()=>{m.current=!1,y.current=h;for(let _=0;_<S.length;_++){const R=Bl(S[_]);f.includes(R)?(x.delete(R),g.current.delete(R)):x.get(R)!==!0&&x.set(R,!1)}},[S,f.length,f.join("-")]);const T=[];if(h!==v){let _=[...h];for(let R=0;R<S.length;R++){const k=S[R],L=Bl(k);f.includes(L)||(_.splice(R,0,k),T.push(k))}return s==="wait"&&T.length&&(_=T),P(j0(_)),w(h),null}const{forceRender:E}=C.useContext(cg);return M.jsx(M.Fragment,{children:S.map(_=>{const R=Bl(_),k=o&&!c?!1:h===S||f.includes(R),L=()=>{if(g.current.has(R))return;if(x.has(R))g.current.add(R),x.set(R,!0);else return;let I=!0;x.forEach(V=>{V||(I=!1)}),I&&(E==null||E(),P(y.current),o&&(d==null||d()),r&&r())};return M.jsx(MN,{isPresent:k,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:k?void 0:L,anchorX:a,anchorY:l,children:_},R)})})},VC=C.createContext({strict:!1}),A0={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 R0=!1;function NN(){if(R0)return;const e={};for(const t in A0)e[t]={isEnabled:n=>A0[t].some(r=>!!n[r])};pC(e),R0=!0}function $C(){return NN(),x2()}function BN(e){const t=$C();for(const n in e)t[n]={...t[n],...e[n]};pC(t)}const FN=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 Sc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||FN.has(e)}let zC=e=>!Sc(e);function VN(e){typeof e=="function"&&(zC=t=>t.startsWith("on")?!Sc(t):e(t))}try{VN(require("@emotion/is-prop-valid").default)}catch{}function $N(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||st(e[i])||(zC(i)||n===!0&&Sc(i)||!t&&!Sc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const dd=C.createContext({});function zN(e,t){if(cd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Va(n)?n:void 0,animate:Va(r)?r:void 0}}return e.inherit!==!1?t:{}}function ON(e){const{initial:t,animate:n}=zN(e,C.useContext(dd));return C.useMemo(()=>({initial:t,animate:n}),[L0(t),L0(n)])}function L0(e){return Array.isArray(e)?e.join(" "):e}const Ng=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function OC(e,t,n){for(const r in t)!st(t[r])&&!SC(r,n)&&(e[r]=t[r])}function UN({transformTemplate:e},t){return C.useMemo(()=>{const n=Ng();return Mg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function WN(e,t){const n=e.style||{},r={};return OC(r,n,e),Object.assign(r,UN(e,t)),r}function HN(e,t){const n={},r=WN(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 UC=()=>({...Ng(),attrs:{}});function KN(e,t,n,r){const i=C.useMemo(()=>{const s=UC();return bC(s,t,_C(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};OC(s,e.style,e),i.style={...s,...i.style}}return i}const GN=["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 Bg(e){return typeof e!="string"||e.includes("-")?!1:!!(GN.indexOf(e)>-1||/[A-Z]/u.test(e))}function YN(e,t,n,{latestValues:r},i,s=!1,o){const a=(o??Bg(e)?KN:HN)(t,r,i,e),l=$N(t,typeof e=="string",s),u=e!==C.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=C.useMemo(()=>st(c)?c.get():c,[c]);return C.createElement(e,{...u,children:d})}function XN({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:QN(n,r,i,e),renderState:t()}}function QN(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=wu(s[h]);let{initial:o,animate:a}=e;const l=cd(e),u=hC(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"&&!ud(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const m=Cg(e,h[f]);if(m){const{transitionEnd:y,transition:x,...g}=m;for(const v in g){let w=g[v];if(Array.isArray(w)){const S=c?w.length-1:0;w=w[S]}w!==null&&(i[v]=w)}for(const v in y)i[v]=y[v]}}}return i}const WC=e=>(t,n)=>{const r=C.useContext(dd),i=C.useContext(ad),s=()=>XN(e,t,r,i);return n?s():dg(s)},qN=WC({scrapeMotionValuesFromProps:Ig,createRenderState:Ng}),ZN=WC({scrapeMotionValuesFromProps:CC,createRenderState:UC}),JN=Symbol.for("motionComponentSymbol");function eB(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 HC=C.createContext({});function ps(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tB(e,t,n,r,i,s){var o,a;const{visualElement:l}=C.useContext(dd),u=C.useContext(VC),c=C.useContext(ad),d=C.useContext(Dg),h=d.reducedMotion,f=d.skipAnimations,m=C.useRef(null),y=C.useRef(!1);r=r||u.renderer,!m.current&&r&&(m.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&&m.current&&(m.current.manuallyAnimateOnMount=!0));const x=m.current,g=C.useContext(HC);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&nB(m.current,n,i,g);const v=C.useRef(!1);C.useInsertionEffect(()=>{x&&v.current&&x.update(n,c)});const w=n[eC],S=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 h_(()=>{y.current=!0,x&&(v.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),S.current&&x.animationState&&x.animationState.animateChanges())}),C.useEffect(()=>{x&&(!S.current&&x.animationState&&x.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var P;(P=window.MotionHandoffMarkAsComplete)==null||P.call(window,w)}),S.current=!1),x.enteringChildren=void 0)}),x}function nB(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:KC(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 KC(e){if(e)return e.options.allowProjection!==!1?e.projection:KC(e.parent)}function yh(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&BN(r);const s=n?n==="svg":Bg(e),o=s?ZN:qN;function a(u,c){let d;const h={...C.useContext(Dg),...u,layoutId:rB(u)},{isStatic:f}=h,m=ON(u),y=o(u,f);if(!f&&typeof window<"u"){iB();const x=sB(h);d=x.MeasureLayout,m.visualElement=tB(e,y,h,i,x.ProjectionNode,s)}return M.jsxs(dd.Provider,{value:m,children:[d&&m.visualElement?M.jsx(d,{visualElement:m.visualElement,...h}):null,YN(e,u,eB(y,m.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[JN]=e,l}function rB({layoutId:e}){const t=C.useContext(cg).id;return t&&e!==void 0?t+"-"+e:e}function iB(e,t){C.useContext(VC).strict}function sB(e){const t=$C(),{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 oB(e,t){if(typeof Proxy>"u")return yh;const n=new Map,r=(s,o)=>yh(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,yh(o,void 0,e,t)),n.get(o))})}const aB=(e,t)=>t.isSVG??Bg(e)?new N2(t):new A2(t,{allowProjection:e!==C.Fragment});class lB extends fi{constructor(t){super(t),t.animationState||(t.animationState=z2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ud(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 uB=0;class cB extends fi{constructor(){super(...arguments),this.id=uB++,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=zi(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 dB={animation:{Feature:lB},exit:{Feature:cB}};function tl(e){return{point:{x:e.pageX,y:e.pageY}}}const hB=e=>t=>Eg(t)&&e(t,tl(t));function la(e,t,n,r){return $a(e,t,hB(n),r)}const GC=({current:e})=>e?e.ownerDocument.defaultView:null,M0=(e,t)=>Math.abs(e-t);function fB(e,t){const n=M0(e.x,t.x),r=M0(e.y,t.y);return Math.sqrt(n**2+r**2)}const I0=new Set(["auto","scroll"]);class YC{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=Fl(this.lastRawMoveEventInfo,this.transformPagePoint));const f=vh(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=fB(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:x}=f,{timestamp:g}=nt;this.history.push({...x,timestamp:g});const{onStart:v,onMove:w}=this.handlers;m||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Fl(m,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=vh(f.type==="pointercancel"?this.lastMoveEventInfo:Fl(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,v),x&&x(f,v)},!Eg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=tl(t),u=Fl(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=nt;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,vh(u,this.history)),this.removeListeners=Za(la(this.contextWindow,"pointermove",this.handlePointerMove),la(this.contextWindow,"pointerup",this.handlePointerUp),la(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(I0.has(r.overflowX)||I0.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),we.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 Fl(e,t){return t?{point:t(e.point)}:e}function D0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vh({point:e},t){return{point:e,delta:D0(e,XC(t)),offset:D0(e,pB(t)),velocity:mB(t,.1)}}function pB(e){return e[0]}function XC(e){return e[e.length-1]}function mB(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=XC(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=un(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 gB(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ve(n,e,r.max):Math.min(e,n)),e}function N0(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 yB(e,{top:t,left:n,bottom:r,right:i}){return{x:N0(e.x,n,i),y:N0(e.y,t,r)}}function B0(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 vB(e,t){return{x:B0(e.x,t.x),y:B0(e.y,t.y)}}function xB(e,t){let n=.5;const r=wt(e),i=wt(t);return i>r?n=Ba(t.min,t.max-r,e.min):r>i&&(n=Ba(e.min,e.max-i,t.min)),Qn(0,1,n)}function wB(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 kp=.35;function SB(e=kp){return e===!1?e=0:e===!0&&(e=kp),{x:F0(e,"left","right"),y:F0(e,"top","bottom")}}function F0(e,t,n){return{min:V0(e,t),max:V0(e,n)}}function V0(e,t){return typeof e=="number"?e:e[t]||0}const bB=new WeakMap;class kB{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=Ke(),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(tl(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:f,dragPropagation:m,onDragStart:y}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=QD(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(g=>{let v=this.getAxisMotionValue(g).get()||0;if(Yn.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[g];S&&(v=wt(S)*(parseFloat(v)/100))}}this.originPoint[g]=v}),y&&we.update(()=>y(d,h),!1,!0),pp(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:m,onDirectionLock:y,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:g}=h;if(m&&this.currentDirection===null){this.currentDirection=CB(g),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,g),this.updateAxis("y",h.point,g),this.visualElement.render(),x&&we.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 YC(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:GC(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&&we.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||!Vl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=gB(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=yB(i.layoutBox,n):this.constraints=!1,this.elastic=SB(r),s!==this.constraints&&!ps(n)&&i&&this.constraints&&!this.hasMutatedConstraints&&Fn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=wB(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ps(t))return!1;const r=t.current;qi(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=_2(r,i.root,this.visualElement.getTransformPagePoint());let o=vB(i.layout.layoutBox,s);if(n){const a=n(S2(o));this.hasMutatedConstraints=!!a,a&&(o=gC(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(!Vl(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,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return pp(this.visualElement,t),r.start(_g(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(!Vl(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]-ve(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]=xB({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(!Vl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(ve(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bB.set(this.visualElement,this);const t=this.visualElement.current,n=la(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,f=h!==t&&n2(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=_B(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),we.read(i);const a=$a(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=kp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function $0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function _B(e,t,n){const r=Gx(e,$0(n)),i=Gx(t,$0(n));return()=>{r(),i()}}function Vl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function CB(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class PB extends fi{constructor(t){super(t),this.removeGroupControls=fn,this.removeListeners=fn,this.controls=new kB(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fn}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 xh=e=>(t,n)=>{e&&we.update(()=>e(t,n),!1,!0)};class TB extends fi{constructor(){super(...arguments),this.removePointerDownListener=fn}onPointerDown(t){this.session=new YC(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:GC(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:xh(t),onStart:xh(n),onMove:xh(r),onEnd:(s,o)=>{delete this.session,i&&we.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=la(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 wh=!1;class EB 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),wh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Su.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}),wh=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||we.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(),Tg.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;wh=!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 QC(e){const[t,n]=FC(),r=C.useContext(cg);return M.jsx(EB,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(HC),isPresent:t,safeToRemove:n})}const jB={pan:{Feature:TB},drag:{Feature:PB,ProjectionNode:BC,MeasureLayout:QC}};function z0(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&&we.postRender(()=>s(t,tl(t)))}class AB extends fi{mount(){const{current:t}=this.node;t&&(this.unmount=ZD(t,(n,r)=>(z0(this.node,r,"Start"),i=>z0(this.node,i,"End"))))}unmount(){}}class RB 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=Za($a(this.node.current,"focus",()=>this.onFocus()),$a(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function O0(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&&we.postRender(()=>s(t,tl(t)))}class LB extends fi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=i2(t,(i,s)=>(O0(this.node,s,"Start"),(o,{success:a})=>O0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const _p=new WeakMap,Sh=new WeakMap,MB=e=>{const t=_p.get(e.target);t&&t(e)},IB=e=>{e.forEach(MB)};function DB({root:e,...t}){const n=e||document;Sh.has(n)||Sh.set(n,{});const r=Sh.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(IB,{root:e,...t})),r[i]}function NB(e,t,n){const r=DB(t);return _p.set(e,n),r.observe(e),()=>{_p.delete(e),r.unobserve(e)}}const BB={some:0,all:1};class FB 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:BB[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=NB(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(VB(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function VB({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $B={inView:{Feature:FB},tap:{Feature:LB},focus:{Feature:RB},hover:{Feature:AB}},zB={layout:{ProjectionNode:BC,MeasureLayout:QC}},OB={...dB,...$B,...jB,...zB},U0=oB(OB,aB);function UB(){!Lg.current&&fC();const[e]=C.useState(yc.current);return e}function ie(...e){return UM(dM(e))}const WB={height:32,lineHeight:"32px",padding:"0 16px"};function HB(e){const t=fd((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 hd(l)}function KB(e,t){const n=fd(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 hd(u)}function GB(e){const t=fd((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,m=l.by-l.ay,y=Math.sqrt(f*f+m*m)||1,x=-m/y,g=f/y,v=(t()-.5)*s*2;o.push({x:d+x*v,y:h+g*v})}return hd(o)}function YB(e,t){const n=fd(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,m=u.bx-u.ax,y=u.by-u.ay,x=Math.sqrt(m*m+y*y)||1,g=-y/x,v=m/x,w=(n()-.5)*o*2;a.push({x:h+g*w,y:f+v*w})}return hd(a)}function hd(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 fd(e){let t=typeof e=="string"?XB(e):e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function XB(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 nl(e){return C.useMemo(()=>{const t=Math.random();return{blob:HB({seed:t,wobble:e}),ring:KB(t,e)}},[e])}const QB="button-module__button___Z331g",qB="button-module__blobBg___QQFzf",ZB="button-module__blobFill___XwLjV",JB="button-module__blobRing___567UW",eF="button-module__isActive___FXNSJ",tF="button-module__primary___ppbyq",nF="button-module__secondary___esy5L",rF="button-module__ghost___NisA0",iF="button-module__danger___Wnvuq",sF="button-module__chalkboard___d3Nqb",oF="button-module__small___u7y8a",aF="button-module__medium___HBIAj",lF="button-module__large___RPzNy",uF="button-module__fullWidth___H0P0F",cF="button-module__iconLeft___s60SZ",dF="button-module__iconRight___75eFu",hF="button-module__label___pXAyM",rn={button:QB,blobBg:qB,blobFill:ZB,blobRing:JB,isActive:eF,primary:tF,secondary:nF,ghost:rF,danger:iF,chalkboard:sF,small:oF,medium:aF,large:lF,fullWidth:uF,iconLeft:cF,iconRight:dF,label:hF};function ne({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=nl(s);return M.jsxs("button",{type:"button",className:ie(rn.button,rn[e],rn[t],e==="chalkboard"&&rn.chalkboard,o&&rn.isActive,i&&rn.fullWidth,l),...u,children:[M.jsxs("svg",{className:rn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[M.jsx("path",{d:c.blob,className:rn.blobFill}),M.jsx("path",{d:c.ring,className:rn.blobRing})]}),n&&M.jsx("span",{className:rn.iconLeft,children:n}),M.jsx("span",{className:rn.label,children:a}),r&&M.jsx("span",{className:rn.iconRight,children:r})]})}function Fg(e){return{blue:e.accentBlue,green:e.accentGreen,amber:e.accentAmber,rose:e.accentRose,slate:e.accentSlate}}const Vg={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")`},$g={paper:"#FAF8F0",parchment:"#F5F1E6",kraft:"#E5DBC4",white:"#FDFCF8",speckle:"#FAF8F0",canvas:"#F0EAD8",chalkboard:"#142e22"},fF={blue:"rgba(168, 200, 216, 0.35)",brown:"rgba(164, 144, 120, 0.35)",black:"rgba(61, 53, 43, 0.15)"};function yr(e){const t=e.texture??"paper",n=e.ruledType??"none",r=e.ruledColor??"blue",i=Vg[t],s=$g[t],o=fF[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 pF="page-module__page___-uHnG",mF="page-module__roundedTop___KQ4dD",gF="page-module__withAccent___lsv-m",yF="page-module__accentBlue___XxbMV",vF="page-module__accentGreen___Ne6Q8",xF="page-module__accentAmber___kLAwa",wF="page-module__accentRose___O9ZbZ",SF="page-module__accentSlate___xCB66",bu={page:pF,roundedTop:mF,withAccent:gF,accentBlue:yF,accentGreen:vF,accentAmber:xF,accentRose:wF,accentSlate:SF},bF=Fg(bu);function qC({children:e,className:t,style:n,withTexture:r=!0,texture:i,withAccent:s=!1,accentColor:o="blue",rounded:a="all"}){const l=i?yr(i):r?yr({texture:"white",ruledType:"lines",ruledColor:"blue"}):{backgroundColor:"var(--pui-bg-base)"};return M.jsx("div",{className:ie(bu.page,s&&bu.withAccent,s&&bF[o],a==="top"&&bu.roundedTop,t),style:{...l,...n},children:e})}const Li={stackPanelWidth:480,navIslandBottom:"1.5rem",navIslandHeight:"4.5rem",contentGap:"1.5rem"},ZC={4:"1rem"},kF="layout-module__layout___O1aWi",_F="layout-module__header___I-kxe",CF="layout-module__headerLeft___JChJQ",PF="layout-module__headerTitles___aqSUG",TF="layout-module__headerTitle___wvr39",EF="layout-module__headerSubtitle___6f5BD",jF="layout-module__headerActions___adC12",AF="layout-module__mobileToggle___4WpVG",RF="layout-module__body___tywNf",LF="layout-module__mobileOverlay___tzbBC",MF="layout-module__sidebar___8VKGq",IF="layout-module__sidebarOpen___47rtr",DF="layout-module__sidebarInner___tq2X6",NF="layout-module__logoArea___RLnC0",BF="layout-module__logoText___pAmfV",FF="layout-module__nav___FxcrZ",VF="layout-module__main___9z7bu",$F="layout-module__navIslandFixed___H4TwP",zF="layout-module__content___jL-VB",OF="layout-module__contentWithPage___vVdfN",UF="layout-module__footer___LyakU",WF="layout-module__footerText___8BYxc",De={layout:kF,header:_F,headerLeft:CF,headerTitles:PF,headerTitle:TF,headerSubtitle:EF,headerActions:jF,mobileToggle:AF,body:RF,mobileOverlay:LF,sidebar:MF,sidebarOpen:IF,sidebarInner:DF,logoArea:NF,logoText:BF,nav:FF,main:VF,navIslandFixed:$F,content:zF,contentWithPage:OF,footer:UF,footerText:WF};function HF(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?yr({texture:e.texture,ruledType:e.ruledType,ruledColor:e.ruledColor}):yr({texture:e})}function KF({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:m,style:y,bleedBottom:x=!0,routeKey:g,stackOpen:v}){const[w,S]=C.useState(!1),P=UB(),T=HF(s),E=r&&u.length>0;return M.jsxs("div",{className:De.layout,style:{...T,...y},children:[t&&M.jsxs("header",{className:De.header,children:[M.jsxs("div",{className:De.headerLeft,children:[E&&M.jsx("button",{type:"button",className:De.mobileToggle,onClick:()=>S(!0),"aria-label":"Open navigation",children:M.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:M.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),M.jsxs("div",{className:De.headerTitles,children:[o&&M.jsx("h1",{className:De.headerTitle,children:o}),a&&M.jsx("span",{className:De.headerSubtitle,children:a})]})]}),l&&M.jsx("div",{className:De.headerActions,children:l})]}),M.jsxs("div",{className:De.body,children:[w&&M.jsx("div",{className:De.mobileOverlay,onClick:()=>S(!1),"aria-hidden":"true"}),E&&M.jsx("aside",{className:ie(De.sidebar,w&&De.sidebarOpen),role:"navigation","aria-label":"Main navigation",children:M.jsxs("div",{className:De.sidebarInner,children:[M.jsx("div",{className:De.logoArea,children:h||M.jsx("span",{className:De.logoText,children:"Paper UI"})}),M.jsx("nav",{className:De.nav,children:u.map(_=>{const R=_.id===c;return M.jsx(ne,{variant:"ghost",size:"small",isActive:R,onClick:()=>{d==null||d(_),S(!1)},"aria-current":R?"page":void 0,icon:_.icon,style:WB,children:_.label},_.id)})})]})}),M.jsx("div",{className:De.main,children:M.jsx("main",{className:i?De.contentWithPage:De.content,style:x?{paddingBottom:0}:void 0,children:(()=>{const _=g!==void 0?M.jsx(DN,{mode:"wait",children:M.jsx(U0.div,{initial:P?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:P?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},style:{height:"100%"},children:e},g)}):e;return i?M.jsx(qC,{withTexture:!0,rounded:x?"top":"all",style:x&&m?{paddingBottom:`calc(${Li.navIslandBottom} + ${Li.navIslandHeight} + ${ZC[4]})`}:void 0,children:_}):_})()})})]}),m&&M.jsx("div",{className:De.navIslandFixed,children:v!==void 0?M.jsx(U0.div,{animate:{x:v?`-${Li.stackPanelWidth/2}px`:0},transition:{duration:P?0:.3,ease:[.4,0,.2,1]},children:m}):m}),n&&M.jsx("footer",{className:De.footer,children:f||M.jsx("p",{className:De.footerText,children:"Paper UI — Natural Materials Component Library"})})]})}const GF="island-module__island___Yd2ej",YF="island-module__chalkboard___yK6AH",W0={island:GF,chalkboard:YF};function XF({children:e,variant:t="default",className:n}){return M.jsx("div",{className:ie(W0.island,t==="chalkboard"&&W0.chalkboard,n),role:"region","aria-label":"Controls",children:e})}const QF="checkbox-module__wrapper___uLYMI",qF="checkbox-module__blobFill___mPJSR",ZF="checkbox-module__input___Ptgt7",JF="checkbox-module__blobBg___bw3sn",e3="checkbox-module__labelLeft___-vAmH",t3="checkbox-module__box___yAh-r",n3="checkbox-module__checkmark___tTyBz",r3="checkbox-module__indeterminateLine___IosI-",i3="checkbox-module__boxWrapper___byjoS",s3="checkbox-module__icon___RO-yn",o3="checkbox-module__labelText___bAnLr",a3="checkbox-module__chalkboard___sv6SL",Ot={wrapper:QF,blobFill:qF,input:ZF,blobBg:JF,labelLeft:e3,box:t3,checkmark:n3,indeterminateLine:r3,boxWrapper:i3,icon:s3,labelText:o3,chalkboard:a3};function l3({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=nl(r);return M.jsxs("label",{className:ie(Ot.wrapper,t==="left"&&Ot.labelLeft,i==="chalkboard"&&Ot.chalkboard,s),htmlFor:u,children:[M.jsxs("span",{className:Ot.boxWrapper,children:[M.jsx("input",{id:u,type:"checkbox",className:Ot.input,checked:o,onChange:a,...l}),M.jsx("svg",{className:Ot.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:M.jsx("path",{d:c.blob,className:Ot.blobFill})}),M.jsx("span",{className:Ot.box,"aria-hidden":"true",children:n?M.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Ot.icon,children:M.jsx("line",{x1:"4",y1:"10",x2:"16",y2:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:Ot.indeterminateLine})}):M.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Ot.icon,children:M.jsx("path",{d:"M4 10 L8 14 L16 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:Ot.checkmark})})})]}),e&&M.jsx("span",{className:Ot.labelText,children:e})]})}const u3="icon-button-module__iconButton___avg6i",c3="icon-button-module__blobBg___466Vy",d3="icon-button-module__blobFill___FTN1g",h3="icon-button-module__blobRing___hRdQb",f3="icon-button-module__isActive___XlvtM",p3="icon-button-module__icon___h204x",m3="icon-button-module__ghost___Wbxog",g3="icon-button-module__danger___p0Xz5",y3="icon-button-module__small___bPnCU",v3="icon-button-module__medium___nOxPf",x3="icon-button-module__large___UBU5z",w3="icon-button-module__chalkboard___mi0sQ",rr={iconButton:u3,blobBg:c3,blobFill:d3,blobRing:h3,isActive:f3,icon:p3,default:"icon-button-module__default___9frNR",ghost:m3,danger:g3,small:y3,medium:v3,large:x3,chalkboard:w3};function Kt({icon:e,variant:t="default",size:n="medium",label:r,wobble:i=.5,isActive:s=!1,className:o,...a}){const l=nl(i);return M.jsxs("button",{type:"button",className:ie(rr.iconButton,rr[t],t==="chalkboard"&&rr.chalkboard,rr[n],s&&rr.isActive,o),"aria-label":r,title:r,...a,children:[M.jsxs("svg",{className:rr.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[M.jsx("path",{d:l.blob,className:rr.blobFill}),M.jsx("path",{d:l.ring,className:rr.blobRing})]}),M.jsx("span",{className:rr.icon,children:e})]})}const S3="stamp-module__stamp___5qaNY",b3="stamp-module__small___BBlBg",k3="stamp-module__medium___HG2YD",_3="stamp-module__large___aUT0I",C3="stamp-module__blobBg___Mdrdd",P3="stamp-module__blobFill___QyCeB",T3="stamp-module__label___T89iH",E3="stamp-module__chalkboard___syI4T",ls={stamp:S3,small:b3,medium:k3,large:_3,blobBg:C3,blobFill:P3,label:T3,chalkboard:E3};function it({children:e,size:t="medium",fillColor:n="transparent",textColor:r,wobble:i=.3,variant:s="default",className:o}){const a=nl(i);return M.jsxs("span",{className:ie(ls.stamp,ls[t],s==="chalkboard"&&ls.chalkboard,o),style:r?{color:r}:void 0,children:[M.jsx("svg",{className:ls.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:M.jsx("path",{d:a.blob,className:ls.blobFill,style:{fill:n}})}),M.jsx("span",{className:ls.label,children:e})]})}const j3="copy-button-module__copyButton___-hTo4",A3="copy-button-module__dark___O45N-",R3="copy-button-module__chalkboard___hW4aw",L3="copy-button-module__copied___XlHFr",$l={copyButton:j3,dark:A3,chalkboard:R3,copied:L3};function H0({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 M.jsx("button",{type:"button",onClick:o,className:ie($l.copyButton,t==="dark"&&$l.dark,t==="chalkboard"&&$l.chalkboard,i&&$l.copied,n),...r,children:i?"Copied!":"Copy"})}const M3="code-block-module__codeBlock___dq28o",I3="code-block-module__header___42Fek",D3="code-block-module__relative___oO-zy",N3="code-block-module__copyOverlay___PjAuq",B3="code-block-module__pre___zXzLZ",F3="code-block-module__chalkboard___bdo9J",V3="code-block-module__chalkboardHeader___3RiVd",$3="code-block-module__chalkboardPre___iRBFR",Cr={codeBlock:M3,header:I3,relative:D3,copyOverlay:N3,pre:B3,chalkboard:F3,chalkboardHeader:V3,chalkboardPre:$3};function z3({code:e,filename:t,variant:n="default"}){return M.jsxs("div",{className:ie(Cr.codeBlock,n==="chalkboard"&&Cr.chalkboard),children:[t&&M.jsxs("div",{className:ie(Cr.header,n==="chalkboard"&&Cr.chalkboardHeader),children:[M.jsx("span",{children:t}),M.jsx(H0,{text:e,variant:n==="chalkboard"?"chalkboard":"light"})]}),!t&&M.jsx("div",{className:Cr.relative,children:M.jsx("div",{className:Cr.copyOverlay,children:M.jsx(H0,{text:e,variant:n==="chalkboard"?"chalkboard":"dark"})})}),M.jsx("pre",{className:ie(Cr.pre,n==="chalkboard"&&Cr.chalkboardPre),children:M.jsx("code",{children:e})})]})}function O3(e,t){return yr(t||(e==="chalkboard"?{texture:"chalkboard",ruledType:"none"}:{texture:"paper",ruledType:"none"}))}const U3="table-module__tableWrapper___gc3Y3",W3="table-module__toolbar___zhCel",H3="table-module__search___zIBk2",K3="table-module__searchIcon___ayhK8",G3="table-module__searchInput___PqsEG",Y3="table-module__toolbarActions___EX6qS",X3="table-module__tableScroll___1gvc4",Q3="table-module__table___tdU5g",q3="table-module__th___GQbKk",Z3="table-module__td___WktB5",J3="table-module__tr___xeZno",eV="table-module__expandTh___uxkR4",tV="table-module__expandTd___VoBRC",nV="table-module__expandIcon___8V45X",rV="table-module__expandable___R7o2l",iV="table-module__expandedRow___1TbTQ",sV="table-module__expandedCell___sKAaD",oV="table-module__boardScroll___Y1yqm",aV="table-module__board___kFAI-",lV="table-module__boardColumn___-W9bP",uV="table-module__boardColumnHeader___kY3Fj",cV="table-module__accentBlue___PEJ1V",dV="table-module__accentGreen___wJ53r",hV="table-module__accentAmber___Iezjv",fV="table-module__accentRose___W8zxc",pV="table-module__accentSlate___oUZCX",mV="table-module__boardColumnLabel___JBEed",gV="table-module__boardColumnCount___Pkpiq",yV="table-module__boardColumnBody___uAgRF",vV="table-module__boardRow___C1P60",xV="table-module__boardEmpty___IKv2W",wV="table-module__chalkboardWrapper___KjY5r",SV="table-module__chalkboard___v0m3A",ue={tableWrapper:U3,toolbar:W3,search:H3,searchIcon:K3,searchInput:G3,toolbarActions:Y3,tableScroll:X3,table:Q3,th:q3,td:Z3,tr:J3,expandTh:eV,expandTd:tV,expandIcon:nV,expandable:rV,expandedRow:iV,expandedCell:sV,boardScroll:oV,board:aV,boardColumn:lV,boardColumnHeader:uV,accentBlue:cV,accentGreen:dV,accentAmber:hV,accentRose:fV,accentSlate:pV,boardColumnLabel:mV,boardColumnCount:gV,boardColumnBody:yV,boardRow:vV,boardEmpty:xV,chalkboardWrapper:wV,chalkboard:SV},bV=Fg(ue);function rl({data:e=[],columns:t=[],board:n,variant:r="paper",texture:i,toolbar:s,expandable:o,showExpandColumn:a=!0,rowClassName:l,className:u}){const c=O3(r,i),d=!!s,[h,f]=C.useState(new Set),m=g=>{f(v=>{const w=new Set(v);return w.has(g)?w.delete(g):w.add(g),w})},y=!!(o&&a),x=y?t.length+1:t.length;return M.jsxs("div",{className:ie(ue.tableWrapper,r==="chalkboard"&&ue.chalkboardWrapper,u),style:c,children:[d&&M.jsxs("div",{className:ue.toolbar,children:[s.search&&M.jsxs("div",{className:ue.search,children:[M.jsx(kV,{className:ue.searchIcon}),M.jsx("input",{type:"text",className:ue.searchInput,placeholder:s.search.placeholder??"Search...",value:s.search.value??"",onChange:g=>{var v,w;return(w=(v=s.search)==null?void 0:v.onChange)==null?void 0:w.call(v,g.target.value)}})]}),s.actions&&M.jsx("div",{className:ue.toolbarActions,children:typeof s.actions=="function"?s.actions(r):s.actions})]}),n?M.jsx("div",{className:ue.boardScroll,children:M.jsx("div",{className:ue.board,children:n.map(g=>M.jsxs("div",{className:ue.boardColumn,children:[M.jsxs("div",{className:ie(ue.boardColumnHeader,r==="chalkboard"&&ue.chalkboard,g.accent&&bV[g.accent]),children:[M.jsx("span",{className:ue.boardColumnLabel,children:g.label}),M.jsx("span",{className:ue.boardColumnCount,children:g.items.length})]}),M.jsx("div",{className:ue.boardColumnBody,children:g.items.length===0?M.jsx("div",{className:ue.boardEmpty,children:g.emptyLabel??"empty"}):g.items.map((v,w)=>M.jsx("div",{className:ie(ue.boardRow,r==="chalkboard"&&ue.chalkboard),children:g.renderItem(v,w,r)},g.getKey?g.getKey(v,w):w))})]},g.key))})}):M.jsx("div",{className:ue.tableScroll,children:M.jsxs("table",{className:ie(ue.table,r==="chalkboard"&&ue.chalkboard),children:[M.jsxs("colgroup",{children:[y&&M.jsx("col",{style:{width:"48px"}}),t.map(g=>M.jsx("col",{style:g.width?{width:`${g.width*32}px`}:void 0},g.key))]}),M.jsx("thead",{children:M.jsxs("tr",{children:[y&&M.jsx("th",{className:ie(ue.th,ue.expandTh),"aria-label":"Expand"}),t.map(g=>M.jsx("th",{className:ue.th,children:g.header},g.key))]})}),M.jsx("tbody",{children:e.map((g,v)=>{const w=o==null?void 0:o.render(g,v,r),S=!!w,P=S&&h.has(v);return M.jsxs(C.Fragment,{children:[M.jsxs("tr",{className:ie(ue.tr,S&&ue.expandable,l==null?void 0:l(g,v)),onClick:()=>S&&m(v),children:[y&&M.jsx("td",{className:ie(ue.td,ue.expandTd),children:S&&M.jsx("span",{className:ue.expandIcon,"aria-hidden":"true",children:P?"▼":"▶"})}),t.map(T=>M.jsx("td",{className:ue.td,children:T.cell(g,v,r)},T.key))]}),P&&M.jsx("tr",{className:ue.expandedRow,children:M.jsx("td",{colSpan:x,className:ue.expandedCell,children:w})})]},v)})})]})})]})}function kV({className:e}){return M.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:[M.jsx("circle",{cx:"11",cy:"11",r:"8"}),M.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}const _V="card-module__borderLayer___WSpJq",CV="card-module__elevated___uhWj9",PV="card-module__textureLayer___Kcofz",TV="card-module__small___HXUTr",EV="card-module__withAccent___2t7bV",jV="card-module__accentBlue___a1KIq",AV="card-module__accentGreen___RNWoA",RV="card-module__accentAmber___uMhom",LV="card-module__accentRose___VPI3t",MV="card-module__accentSlate___-l4jE",IV="card-module__chalkboard___bQ48O",ms={borderLayer:_V,default:"card-module__default___glPy-",elevated:CV,textureLayer:PV,small:TV,withAccent:EV,accentBlue:jV,accentGreen:AV,accentAmber:RV,accentRose:LV,accentSlate:MV,chalkboard:IV},DV=Fg(ms);function Us({children:e,variant:t="default",size:n="default",texture:r="parchment",accent:i=!1,accentColor:s="blue",className:o}){return M.jsx("div",{className:ie(ms.borderLayer,ms[t],ms[n],i&&ms.withAccent,i&&DV[s],o),children:M.jsx("div",{className:ms.textureLayer,style:t==="chalkboard"?void 0:{backgroundColor:$g[r],backgroundImage:Vg[r],backgroundSize:"200px 200px",backgroundRepeat:"repeat"},children:e})})}const NV="input-module__wrapper___xaEw6",BV="input-module__label___lu7R1",FV="input-module__input___h7K-F",VV="input-module__small___SkByh",$V="input-module__medium___0QPuV",zV="input-module__large___zGwRu",OV="input-module__error___QDqga",UV="input-module__helperText___njeLH",WV="input-module__helperError___qDBpD",HV="input-module__chalkboard___Xh-5s",Pr={wrapper:NV,label:BV,input:FV,small:VV,medium:$V,large:zV,error:OV,helperText:UV,helperError:WV,chalkboard:HV};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 M.jsxs("div",{className:ie(Pr.wrapper,i==="chalkboard"&&Pr.chalkboard,s),children:[e&&M.jsx("label",{htmlFor:l,className:Pr.label,children:e}),M.jsx("input",{id:l,className:ie(Pr.input,Pr[r],n&&Pr.error),...a}),t&&M.jsx("span",{className:ie(Pr.helperText,n&&Pr.helperError),children:t})]})}const KV="select-module__wrapper___Hc5F3",GV="select-module__label___ay-3s",YV="select-module__nativeSelect___UA2d-",XV="select-module__trigger___xMYHi",QV="select-module__open___w3mbZ",qV="select-module__triggerLabel___ihpER",ZV="select-module__placeholder___0VOFP",JV="select-module__small___iU9W9",e$="select-module__chevron___0dCTg",t$="select-module__medium___B-XBN",n$="select-module__large___iII2c",r$="select-module__chevronOpen___cFOYe",i$="select-module__error___P5RBk",s$="select-module__dropdown___Q-uK3",o$="select-module__slideDown___sT374",a$="select-module__option___vNnue",l$="select-module__optionDisabled___ex2zq",u$="select-module__optionSelected___tAFjn",c$="select-module__optionHighlighted___zYQLq",d$="select-module__helperText___r5gyn",h$="select-module__helperError___ydSPT",f$="select-module__chalkboard___sXBw8",$e={wrapper:KV,label:GV,nativeSelect:YV,trigger:XV,open:QV,triggerLabel:qV,placeholder:ZV,small:JV,chevron:e$,medium:t$,large:n$,chevronOpen:r$,error:i$,dropdown:s$,slideDown:o$,option:a$,optionDisabled:l$,optionSelected:u$,optionHighlighted:c$,helperText:d$,helperError:h$,chalkboard:f$};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:m}){const y=C.useId(),[x,g]=C.useState(!1),[v,w]=C.useState(-1),[S,P]=C.useState(l??""),[T,E]=C.useState(null),_=C.useRef(null),R=C.useRef(null),k=a!==void 0,L=k?a:S,I=s.find(b=>b.value===L),V=(I==null?void 0:I.label)??o??"Select...",B=C.useCallback(()=>{if(c)return;g(!0);const b=s.findIndex(U=>U.value===L);w(b>=0?b:0)},[c,s,L]),F=C.useCallback(()=>{g(!1),w(-1)},[]),$=C.useCallback(b=>{var U;b.disabled||(k||P(b.value),u==null||u(b.value),F(),(U=_.current)==null||U.focus())},[k,u,F]),W=C.useCallback(b=>{if(!c)switch(b.key){case"Enter":case" ":b.preventDefault(),x&&v>=0?$(s[v]):B();break;case"Escape":b.preventDefault(),x&&F();break;case"ArrowDown":b.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":b.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(b.preventDefault(),x){let U=0;for(;U<s.length&&s[U].disabled;)U++;U<s.length&&w(U)}break;case"End":if(b.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,$]);C.useEffect(()=>{if(!x)return;const b=U=>{var Z,A;const le=U.target;(Z=_.current)!=null&&Z.contains(le)||(A=R.current)!=null&&A.contains(le)||F()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[x,F]),C.useEffect(()=>{if(!x||v<0||!R.current)return;const b=R.current.querySelector(`[data-option-index="${v}"]`);b==null||b.scrollIntoView({block:"nearest"})},[x,v]),C.useEffect(()=>{if(!x){E(null);return}const b=()=>{_.current&&E(_.current.getBoundingClientRect())};return b(),document.addEventListener("scroll",b,{capture:!0,passive:!0}),window.addEventListener("resize",b,{passive:!0}),()=>{document.removeEventListener("scroll",b,{capture:!0}),window.removeEventListener("resize",b)}},[x]);const N=h?yr(h):f?yr({texture:"paper",ruledType:"none"}):void 0,z=N?{"--pui-texture":N.backgroundImage,"--pui-fill":N.backgroundColor}:void 0;return M.jsxs("div",{className:ie($e.wrapper,i==="chalkboard"&&$e.chalkboard,m),style:d?{width:typeof d=="number"?`${d}px`:d}:void 0,children:[e&&M.jsx("label",{htmlFor:y,className:$e.label,children:e}),M.jsxs("select",{id:y,className:$e.nativeSelect,value:L,onChange:b=>u==null?void 0:u(b.target.value),disabled:c,"aria-hidden":"true",tabIndex:-1,children:[o&&M.jsx("option",{value:"",children:o}),s.map(b=>M.jsx("option",{value:b.value,disabled:b.disabled,children:b.label},b.value))]}),M.jsxs("button",{ref:_,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($e.trigger,$e[r],n&&$e.error,x&&$e.open,c&&$e.disabled),onClick:()=>x?F():B(),onKeyDown:W,disabled:c,children:[M.jsx("span",{className:ie($e.triggerLabel,!I&&$e.placeholder),children:V}),M.jsx(p$,{className:ie($e.chevron,x&&$e.chevronOpen)})]}),x&&T&&tg.createPortal(M.jsx("div",{ref:R,id:`${y}-listbox`,role:"listbox",className:$e.dropdown,style:{...z,position:"fixed",top:T.bottom+6,left:T.left,width:T.width,zIndex:1e3},onKeyDown:b=>{var U;b.key==="Escape"&&(b.preventDefault(),F(),(U=_.current)==null||U.focus())},children:s.map((b,U)=>M.jsx("div",{id:`${y}-option-${U}`,role:"option","aria-selected":b.value===L,"data-option-index":U,className:ie($e.option,b.value===L&&$e.optionSelected,U===v&&$e.optionHighlighted,b.disabled&&$e.optionDisabled),onClick:Z=>{Z.stopPropagation(),$(b)},onMouseEnter:()=>w(U),children:b.label},b.value))}),document.body),t&&M.jsx("span",{className:ie($e.helperText,n&&$e.helperError),children:t})]})}function p$({className:e}){return M.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:M.jsx("polyline",{points:"6 9 12 15 18 9"})})}function ts({size:e=16}){return M.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:[M.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function m$({size:e=16}){return M.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:[M.jsx("path",{d:"M9 18h6"}),M.jsx("path",{d:"M10 22h4"}),M.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 pd({size:e=16}){return M.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:M.jsx("polyline",{points:"20 6 9 17 4 12"})})}function zg({size:e=16}){return M.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:[M.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),M.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function g$({size:e=16}){return M.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:M.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 y$="alert-module__alert___j7ZRS",v$="alert-module__iconWrapper___kLoxT",x$="alert-module__content___0FEM2",w$="alert-module__title___MWel2",S$="alert-module__message___klR2U",b$="alert-module__dismiss___f2uoG",k$="alert-module__info___PBo1l",_$="alert-module__success___AVBKS",C$="alert-module__warning___zkMaJ",P$="alert-module__error___cxg96",T$="alert-module__chalkboard___7pgWk",Tr={alert:y$,iconWrapper:v$,content:x$,title:w$,message:S$,dismiss:b$,info:k$,success:_$,warning:C$,error:P$,chalkboard:T$};function Gt({children:e,variant:t="info",texture:n="canvas",title:r,dismissible:i=!1,onDismiss:s,className:o}){const a=t==="chalkboard";return M.jsxs("div",{className:ie(Tr.alert,Tr[t],o),style:{backgroundColor:a?void 0:$g[n],backgroundImage:a?void 0:Vg[n],backgroundRepeat:"repeat",backgroundSize:"200px 200px"},role:"alert",children:[M.jsx("div",{className:Tr.tint}),M.jsx("span",{className:Tr.iconWrapper,children:M.jsx(E$,{variant:t})}),M.jsxs("div",{className:Tr.content,children:[r&&M.jsx("div",{className:Tr.title,children:r}),M.jsx("div",{className:Tr.message,children:e})]}),i&&M.jsx("button",{type:"button",className:Tr.dismiss,onClick:s,"aria-label":"Dismiss alert",children:M.jsx(ts,{size:16})})]})}function E$({variant:e}){switch(e){case"info":return M.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:[M.jsx("circle",{cx:"12",cy:"12",r:"10"}),M.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),M.jsx("circle",{cx:"12",cy:"8",r:"0.5",fill:"currentColor"})]});case"success":return M.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:[M.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),M.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]});case"warning":return M.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:[M.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"}),M.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),M.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]});case"error":return M.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:[M.jsx("circle",{cx:"12",cy:"12",r:"10"}),M.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),M.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}}const j$="modal-module__overlay___a52Ni",A$="modal-module__fadeIn___5OWd5",R$="modal-module__modal___ZioOV",L$="modal-module__slideUp___vfFrm",M$="modal-module__small___hcxwF",I$="modal-module__medium___mjbM5",D$="modal-module__large___1dzyf",N$="modal-module__header___iP09B",B$="modal-module__title___nj06m",F$="modal-module__close___gQou9",V$="modal-module__body___Y-EdA",$$="modal-module__chalkboard___qY8qo",Er={overlay:j$,fadeIn:A$,modal:R$,slideUp:L$,small:M$,medium:I$,large:D$,header:N$,title:B$,close:F$,body:V$,chalkboard:$$};function il({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?yr(o):a?yr({texture:"paper",ruledType:"none"}):void 0;return M.jsx("div",{className:Er.overlay,onClick:t,role:"dialog","aria-modal":"true",children:M.jsxs("div",{className:ie(Er.modal,Er[i],s==="chalkboard"&&Er.chalkboard,l),style:u,onClick:c=>c.stopPropagation(),children:[M.jsxs("div",{className:Er.header,children:[n&&M.jsx("h2",{className:Er.title,children:n}),M.jsx("button",{type:"button",className:Er.close,onClick:t,"aria-label":"Close modal",children:M.jsx(ts,{size:18})})]}),M.jsx("div",{className:Er.body,children:r})]})})}const z$="textarea-module__wrapper___NbiNO",O$="textarea-module__label___ejhyZ",U$="textarea-module__textarea___0y-7v",W$="textarea-module__small___yPyr8",H$="textarea-module__medium___ezQxA",K$="textarea-module__large___xfeKi",G$="textarea-module__error___EkXKJ",Y$="textarea-module__helperText___l1sPh",X$="textarea-module__helperError___VfTLy",Q$="textarea-module__chalkboard___zZ0X0",jr={wrapper:z$,label:O$,textarea:U$,small:W$,medium:H$,large:K$,error:G$,helperText:Y$,helperError:X$,chalkboard:Q$};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 M.jsxs("div",{className:ie(jr.wrapper,i==="chalkboard"&&jr.chalkboard,s),children:[e&&M.jsx("label",{htmlFor:l,className:jr.label,children:e}),M.jsx("textarea",{id:l,className:ie(jr.textarea,jr[r],n&&jr.error),...a}),t&&M.jsx("span",{className:ie(jr.helperText,n&&jr.helperError),children:t})]})}const q$="progress-module__track___a5BMO",Z$="progress-module__fill___E9mUF",K0={track:q$,fill:Z$};function JC({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 M.jsx("div",{className:ie(K0.track,i),style:{height:r,borderRadius:r/2},children:M.jsx("div",{className:K0.fill,style:{width:`${s}%`,height:r,borderRadius:r/2,background:n}})})}function J$(e){return C.useMemo(()=>{const t=Math.random();return{blob:GB({seed:t,wobble:e}),ring:YB(t,e)}},[e])}const ez="list-item-module__listItem___-tw9O",tz="list-item-module__clickable___GLJmd",nz="list-item-module__blobBg___O3Mzh",rz="list-item-module__blobFill___dXHk1",iz="list-item-module__blobRing___S9mas",sz="list-item-module__active___UsL8O",oz="list-item-module__small___9dphK",az="list-item-module__medium___yGZCr",lz="list-item-module__icon___2b4wU",uz="list-item-module__label___SIzJ4",cz="list-item-module__action___qGh0-",wn={listItem:ez,static:"list-item-module__static___qtEX6",clickable:tz,blobBg:nz,blobFill:rz,blobRing:iz,active:sz,small:oz,medium:az,icon:lz,label:uz,action:cz};function cr({active:e=!1,icon:t,action:n,size:r="medium",wobble:i=.5,children:s,className:o,...a}){const l=J$(i),u=!!a.onClick;return M.jsxs("button",{type:"button",className:ie(wn.listItem,wn[r],u&&wn.clickable,!u&&!e&&wn.static,e&&wn.active,o),"aria-current":e?"page":void 0,...a,children:[M.jsxs("svg",{className:wn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[M.jsx("path",{d:l.blob,className:wn.blobFill}),M.jsx("path",{d:l.ring,className:wn.blobRing})]}),t&&M.jsx("span",{className:wn.icon,children:t}),M.jsx("span",{className:wn.label,children:s}),n&&M.jsx("span",{className:wn.action,children:n})]})}const dz="accordion-module__accordion___mqGl-",hz="accordion-module__header___mLfbd",fz="accordion-module__icon___Z90NR",pz="accordion-module__title___HusgG",mz="accordion-module__content___1K0td",us={accordion:dz,header:hz,icon:fz,title:pz,content:mz};function gz({title:e,children:t,expanded:n=!1,onToggle:r,className:i}){return M.jsxs("div",{className:ie(us.accordion,n&&us.expanded,i),children:[M.jsxs("button",{type:"button",className:us.header,onClick:r,"aria-expanded":n,children:[M.jsx("span",{className:us.icon,"aria-hidden":"true",children:n?"▼":"▶"}),M.jsx("span",{className:us.title,children:e})]}),n&&M.jsx("div",{className:us.content,children:t})]})}const yz="icon-module__icon___2vrJz",vz="icon-module__blobBg___ENPYJ",xz="icon-module__blobFill___IPbwQ",wz="icon-module__blobRing___1awqV",Sz="icon-module__content___TaZR6",bz="icon-module__small___Xp--F",kz="icon-module__medium___tCjMB",_z="icon-module__large___vBtP7",cs={icon:yz,blobBg:vz,blobFill:xz,blobRing:wz,content:Sz,small:bz,medium:kz,large:_z},Cz={small:20,medium:24,large:28};function eP({icon:e,size:t="medium",wobble:n=.5,fillColor:r,className:i}){const s=nl(n),o=Cz[t];return M.jsxs("span",{className:ie(cs.icon,cs[t],i),children:[M.jsxs("svg",{className:cs.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[M.jsx("path",{d:s.blob,className:cs.blobFill,style:r?{fill:r}:void 0}),M.jsx("path",{d:s.ring,className:cs.blobRing})]}),M.jsx("span",{className:cs.content,style:{width:o,height:o},children:e})]})}const Og=C.createContext({});function Ug(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const Pz=typeof window<"u",tP=Pz?C.useLayoutEffect:C.useEffect,md=C.createContext(null);function Wg(e,t){e.indexOf(t)===-1&&e.push(t)}function bc(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 Hg=()=>{};const li={},nP=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),rP=e=>typeof e=="object"&&e!==null,iP=e=>/^0[^.\s]+$/u.test(e);function sP(e){let t;return()=>(t===void 0&&(t=e()),t)}const pn=e=>e,sl=(...e)=>e.reduce((t,n)=>r=>n(t(r))),za=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Kg{constructor(){this.subscriptions=[]}add(t){return Wg(this.subscriptions,t),()=>bc(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 Qt=e=>e*1e3,cn=e=>e/1e3,oP=(e,t)=>t?e*(1e3/t):0,aP=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Tz=1e-7,Ez=12;function jz(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=aP(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>Tz&&++a<Ez);return o}function ol(e,t,n,r){if(e===t&&n===r)return pn;const i=s=>jz(s,0,1,e,n);return s=>s===0||s===1?s:aP(i(s),t,r)}const lP=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uP=e=>t=>1-e(1-t),cP=ol(.33,1.53,.69,.99),Gg=uP(cP),dP=lP(Gg),hP=e=>e>=1?1:(e*=2)<1?.5*Gg(e):.5*(2-Math.pow(2,-10*(e-1))),Yg=e=>1-Math.sin(Math.acos(e)),fP=uP(Yg),pP=lP(Yg),Az=ol(.42,0,1,1),Rz=ol(0,0,.58,1),mP=ol(.42,0,.58,1),Lz=e=>Array.isArray(e)&&typeof e[0]!="number",gP=e=>Array.isArray(e)&&typeof e[0]=="number",Mz={linear:pn,easeIn:Az,easeInOut:mP,easeOut:Rz,circIn:Yg,circInOut:pP,circOut:fP,backIn:Gg,backInOut:dP,backOut:cP,anticipate:hP},Iz=e=>typeof e=="string",G0=e=>{if(gP(e)){Hg(e.length===4);const[t,n,r,i]=e;return ol(t,n,r,i)}else if(Iz(e))return Mz[e];return e},zl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Dz(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 m=h&&i?n:r;return d&&o.add(c),m.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 Nz=40;function yP(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=zl.reduce((w,S)=>(w[S]=Dz(s),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:m}=o,y=()=>{const w=li.useManualTiming,S=w?i.timestamp:performance.now();n=!1,w||(i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,Nz),1)),i.timestamp=S,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),f.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},x=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:zl.reduce((w,S)=>{const P=o[S];return w[S]=(T,E=!1,_=!1)=>(n||x(),P.schedule(T,E,_)),w},{}),cancel:w=>{for(let S=0;S<zl.length;S++)o[zl[S]].cancel(w)},state:i,steps:o}}const{schedule:Se,cancel:ui,state:rt,steps:bh}=yP(typeof requestAnimationFrame<"u"?requestAnimationFrame:pn,!0);let ku;function Bz(){ku=void 0}const St={now:()=>(ku===void 0&&St.set(rt.isProcessing||li.useManualTiming?rt.timestamp:performance.now()),ku),set:e=>{ku=e,queueMicrotask(Bz)}},vP=e=>t=>typeof t=="string"&&t.startsWith(e),xP=vP("--"),Fz=vP("var(--"),Xg=e=>Fz(e)?Vz.test(e.split("/*")[0].trim()):!1,Vz=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Y0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const go={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Oa={...go,transform:e=>Zn(0,1,e)},Ol={...go,default:1},ua=e=>Math.round(e*1e5)/1e5,Qg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $z(e){return e==null}const zz=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qg=(e,t)=>n=>!!(typeof n=="string"&&zz.test(n)&&n.startsWith(e)||t&&!$z(n)&&Object.prototype.hasOwnProperty.call(n,t)),wP=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Qg);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Oz=e=>Zn(0,255,e),kh={...go,transform:e=>Math.round(Oz(e))},Mi={test:qg("rgb","red"),parse:wP("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kh.transform(e)+", "+kh.transform(t)+", "+kh.transform(n)+", "+ua(Oa.transform(r))+")"};function Uz(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 Cp={test:qg("#"),parse:Uz,transform:Mi.transform},al=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),sr=al("deg"),Xn=al("%"),Q=al("px"),Wz=al("vh"),Hz=al("vw"),X0={...Xn,parse:e=>Xn.parse(e)/100,transform:e=>Xn.transform(e*100)},Ls={test:qg("hsl","hue"),parse:wP("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xn.transform(ua(t))+", "+Xn.transform(ua(n))+", "+ua(Oa.transform(r))+")"},Ue={test:e=>Mi.test(e)||Cp.test(e)||Ls.test(e),parse:e=>Mi.test(e)?Mi.parse(e):Ls.test(e)?Ls.parse(e):Cp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mi.transform(e):Ls.transform(e),getAnimatableNone:e=>{const t=Ue.parse(e);return t.alpha=0,Ue.transform(t)}},Kz=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Gz(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Qg))==null?void 0:t.length)||0)+(((n=e.match(Kz))==null?void 0:n.length)||0)>0}const SP="number",bP="color",Yz="var",Xz="var(",Q0="${}",Qz=/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(Qz,l=>(Ue.test(l)?(r.color.push(s),i.push(bP),n.push(Ue.parse(l))):l.startsWith(Xz)?(r.var.push(s),i.push(Yz),n.push(l)):(r.number.push(s),i.push(SP),n.push(parseFloat(l))),++s,Q0)).split(Q0);return{values:n,split:a,indexes:r,types:i}}function qz(e){return io(e).values}function kP({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===SP?i+=ua(r[s]):o===bP?i+=Ue.transform(r[s]):i+=r[s]}return i}}function Zz(e){return kP(io(e))}const Jz=e=>typeof e=="number"?0:Ue.test(e)?Ue.getAnimatableNone(e):e,eO=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Jz(e);function tO(e){const t=io(e);return kP(t)(t.values.map((r,i)=>eO(r,t.split[i])))}const Ln={test:Gz,parse:qz,createTransformer:Zz,getAnimatableNone:tO};function _h(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 nO({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=_h(l,a,e+1/3),s=_h(l,a,e),o=_h(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function kc(e,t){return n=>n>0?t:e}const xe=(e,t,n)=>e+(t-e)*n,Ch=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},rO=[Cp,Mi,Ls],iO=e=>rO.find(t=>t.test(e));function q0(e){const t=iO(e);if(!t)return!1;let n=t.parse(e);return t===Ls&&(n=nO(n)),n}const Z0=(e,t)=>{const n=q0(e),r=q0(t);if(!n||!r)return kc(e,t);const i={...n};return s=>(i.red=Ch(n.red,r.red,s),i.green=Ch(n.green,r.green,s),i.blue=Ch(n.blue,r.blue,s),i.alpha=xe(n.alpha,r.alpha,s),Mi.transform(i))},Pp=new Set(["none","hidden"]);function sO(e,t){return Pp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function oO(e,t){return n=>xe(e,t,n)}function Zg(e){return typeof e=="number"?oO:typeof e=="string"?Xg(e)?kc:Ue.test(e)?Z0:uO:Array.isArray(e)?_P:typeof e=="object"?Ue.test(e)?Z0:aO:kc}function _P(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Zg(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function aO(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Zg(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function lO(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 uO=(e,t)=>{const n=Ln.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?Pp.has(e)&&!i.values.length||Pp.has(t)&&!r.values.length?sO(e,t):sl(_P(lO(r,i),i.values),n):kc(e,t)};function CP(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xe(e,t,n):Zg(e)(e,t)}const cO=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Se.update(t,n),stop:()=>ui(t),now:()=>rt.isProcessing?rt.timestamp:St.now()}},PP=(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)})`},_c=2e4;function Jg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<_c;)t+=n,r=e.next(t);return t>=_c?1/0:t}function dO(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Jg(r),_c);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:cn(i)}}const Ne={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 Tp(e,t){return e*Math.sqrt(1-t*t)}const hO=12;function fO(e,t,n){let r=n;for(let i=1;i<hO;i++)r=r-e(r)/t(r);return r}const Ph=.001;function pO({duration:e=Ne.duration,bounce:t=Ne.bounce,velocity:n=Ne.velocity,mass:r=Ne.mass}){let i,s,o=1-t;o=Zn(Ne.minDamping,Ne.maxDamping,o),e=Zn(Ne.minDuration,Ne.maxDuration,cn(e)),o<1?(i=u=>{const c=u*o,d=c*e,h=c-n,f=Tp(u,o),m=Math.exp(-d);return Ph-h/f*m},s=u=>{const d=u*o*e,h=d*n+n,f=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),y=Tp(Math.pow(u,2),o);return(-i(u)+Ph>0?-1:1)*((h-f)*m)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Ph+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=fO(i,s,a);if(e=Qt(e),isNaN(l))return{stiffness:Ne.stiffness,damping:Ne.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const mO=["duration","bounce"],gO=["stiffness","damping","mass"];function J0(e,t){return t.some(n=>e[n]!==void 0)}function yO(e){let t={velocity:Ne.velocity,stiffness:Ne.stiffness,damping:Ne.damping,mass:Ne.mass,isResolvedFromDuration:!1,...e};if(!J0(e,gO)&&J0(e,mO))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:Ne.mass,stiffness:i,damping:s}}else{const n=pO({...e,velocity:0});t={...t,...n,mass:Ne.mass},t.isResolvedFromDuration=!0}return t}function Cc(e=Ne.visualDuration,t=Ne.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}=yO({...n,velocity:-cn(n.velocity||0)}),m=h||0,y=u/(2*Math.sqrt(l*c)),x=o-s,g=cn(Math.sqrt(l/c)),v=Math.abs(x)<5;r||(r=v?Ne.restSpeed.granular:Ne.restSpeed.default),i||(i=v?Ne.restDelta.granular:Ne.restDelta.default);let w,S,P,T,E,_;if(y<1)P=Tp(g,y),T=(m+y*g*x)/P,w=k=>{const L=Math.exp(-y*g*k);return o-L*(T*Math.sin(P*k)+x*Math.cos(P*k))},E=y*g*T+x*P,_=y*g*x-T*P,S=k=>Math.exp(-y*g*k)*(E*Math.sin(P*k)+_*Math.cos(P*k));else if(y===1){w=L=>o-Math.exp(-g*L)*(x+(m+g*x)*L);const k=m+g*x;S=L=>Math.exp(-g*L)*(g*k*L-m)}else{const k=g*Math.sqrt(y*y-1);w=B=>{const F=Math.exp(-y*g*B),$=Math.min(k*B,300);return o-F*((m+y*g*x)*Math.sinh($)+k*x*Math.cosh($))/k};const L=(m+y*g*x)/k,I=y*g*L-x*k,V=y*g*x-L*k;S=B=>{const F=Math.exp(-y*g*B),$=Math.min(k*B,300);return F*(I*Math.sinh($)+V*Math.cosh($))}}const R={calculatedDuration:f&&d||null,velocity:k=>Qt(S(k)),next:k=>{if(!f&&y<1){const I=Math.exp(-y*g*k),V=Math.sin(P*k),B=Math.cos(P*k),F=o-I*(T*V+x*B),$=Qt(I*(E*V+_*B));return a.done=Math.abs($)<=r&&Math.abs(o-F)<=i,a.value=a.done?o:F,a}const L=w(k);if(f)a.done=k>=d;else{const I=Qt(S(k));a.done=Math.abs(I)<=r&&Math.abs(o-L)<=i}return a.value=a.done?o:L,a},toString:()=>{const k=Math.min(Jg(R),_c),L=PP(I=>R.next(k*I).value,k,30);return k+"ms "+L},toTransition:()=>{}};return R}Cc.applyToOptions=e=>{const t=dO(e,100,Cc);return e.ease=t.ease,e.duration=Qt(t.duration),e.type="keyframes",e};const vO=5;function TP(e,t,n){const r=Math.max(t-vO,0);return oP(n-e(r),t-r)}function Ep({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=_=>a!==void 0&&_<a||l!==void 0&&_>l,m=_=>a===void 0?l:l===void 0||Math.abs(a-_)<Math.abs(l-_)?a:l;let y=n*t;const x=d+y,g=o===void 0?x:o(x);g!==x&&(y=g-d);const v=_=>-y*Math.exp(-_/r),w=_=>g+v(_),S=_=>{const R=v(_),k=w(_);h.done=Math.abs(R)<=u,h.value=h.done?g:k};let P,T;const E=_=>{f(h.value)&&(P=_,T=Cc({keyframes:[h.value,m(h.value)],velocity:TP(w,_,h.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:_=>{let R=!1;return!T&&P===void 0&&(R=!0,S(_),E(_)),P!==void 0&&_>=P?T.next(_-P):(!R&&S(_),h)}}}function xO(e,t,n){const r=[],i=n||li.mix||CP,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]||pn:t;a=sl(l,a)}r.push(a)}return r}function wO(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Hg(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=xO(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=za(e[d],e[d+1],c);return a[d](h)};return n?c=>u(Zn(e[0],e[s-1],c)):u}function SO(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=za(0,t,r);e.push(xe(n,1,i))}}function bO(e){const t=[0];return SO(t,e.length-1),t}function kO(e,t){return e.map(n=>n*t)}function _O(e,t){return e.map(()=>t||mP).splice(0,e.length-1)}function ca({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Lz(r)?r.map(G0):G0(r),s={done:!1,value:t[0]},o=kO(n&&n.length===t.length?n:bO(t),e),a=wO(o,t,{ease:Array.isArray(i)?i:_O(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const CO=e=>e!==null;function gd(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(CO),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const PO={decay:Ep,inertia:Ep,tween:ca,keyframes:ca,spring:Cc};function EP(e){typeof e.type=="string"&&(e.type=PO[e.type])}class ey{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 TO=e=>e/100;class Pc extends ey{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;EP(t);const{type:n=ca,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||ca;l!==ca&&typeof a[0]!="number"&&(this.mixKeyframes=sl(TO,CP(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=Jg(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:m,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 g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,S=r;if(d){const _=Math.min(this.currentTime,i)/a;let R=Math.floor(_),k=_%1;!k&&_>=1&&(k=1),k===1&&R--,R=Math.min(R,d+1),!!(R%2)&&(h==="reverse"?(k=1-k,f&&(k-=f/a)):h==="mirror"&&(S=o)),w=Zn(0,1,k)*a}let P;v?(this.delayState.value=c[0],P=this.delayState):P=S.next(w),s&&!v&&(P.value=s(P.value));let{done:T}=P;!v&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return E&&m!==Ep&&(P.value=gd(c,this.options,x,this.speed)),y&&y(P.value),E&&this.finish(),P}then(t,n){return this.finished.then(t,n)}get duration(){return cn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+cn(t)}get time(){return cn(this.currentTime)}set time(t){t=Qt(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 TP(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=cn(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=cO,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 EO(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ii=e=>e*180/Math.PI,jp=e=>{const t=Ii(Math.atan2(e[1],e[0]));return Ap(t)},jO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:jp,rotateZ:jp,skewX:e=>Ii(Math.atan(e[1])),skewY:e=>Ii(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ap=e=>(e=e%360,e<0&&(e+=360),e),ew=jp,tw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),nw=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),AO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tw,scaleY:nw,scale:e=>(tw(e)+nw(e))/2,rotateX:e=>Ap(Ii(Math.atan2(e[6],e[5]))),rotateY:e=>Ap(Ii(Math.atan2(-e[2],e[0]))),rotateZ:ew,rotate:ew,skewX:e=>Ii(Math.atan(e[4])),skewY:e=>Ii(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Rp(e){return e.includes("scale")?1:0}function Lp(e,t){if(!e||e==="none")return Rp(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=AO,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=jO,i=a}if(!i)return Rp(t);const s=r[t],o=i[1].split(",").map(LO);return typeof s=="function"?s(o):o[s]}const RO=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Lp(n,t)};function LO(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"]),rw=e=>e===go||e===Q,MO=new Set(["x","y","z"]),IO=yo.filter(e=>!MO.has(e));function DO(e){const t=[];return IO.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})=>Lp(t,"x"),y:(e,{transform:t})=>Lp(t,"y")};Gr.translateX=Gr.x;Gr.translateY=Gr.y;const Oi=new Set;let Mp=!1,Ip=!1,Dp=!1;function jP(){if(Ip){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=DO(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)})}Ip=!1,Mp=!1,Oi.forEach(e=>e.complete(Dp)),Oi.clear()}function AP(){Oi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ip=!0)})}function NO(){Dp=!0,AP(),jP(),Dp=!1}class ty{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),Mp||(Mp=!0,Se.read(AP),Se.resolveKeyframes(jP))):(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])}EO(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 BO=e=>e.startsWith("--");function RP(e,t,n){BO(t)?e.style.setProperty(t,n):e.style[t]=n}const FO={};function LP(e,t){const n=sP(e);return()=>FO[t]??n()}const VO=LP(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),MP=LP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Xo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,iw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xo([0,.65,.55,1]),circOut:Xo([.55,0,1,.45]),backIn:Xo([.31,.01,.66,-.59]),backOut:Xo([.33,1.53,.69,.99])};function IP(e,t){if(e)return typeof e=="function"?MP()?PP(e,t):"ease-out":gP(e)?Xo(e):Array.isArray(e)?e.map(n=>IP(n,t)||iw.easeOut):iw[e]}function $O(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=IP(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 DP(e){return typeof e=="function"&&"applyToOptions"in e}function zO({type:e,...t}){return DP(e)&&MP()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class NP extends ey{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,Hg(typeof t.type!="string");const u=zO(t);this.animation=$O(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=gd(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),RP(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 cn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+cn(t)}get time(){return cn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Qt(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&&VO()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),pn):i(this)}}const BP={anticipate:hP,backInOut:dP,circInOut:pP};function OO(e){return e in BP}function UO(e){typeof e.ease=="string"&&OO(e.ease)&&(e.ease=BP[e.ease])}const Th=10;class WO extends NP{constructor(t){UO(t),EP(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 Pc({...o,autoplay:!1}),l=Math.max(Th,St.now()-this.startTime),u=Zn(0,Th,l-Th),c=a.sample(l).value,{name:d}=this.options;s&&d&&RP(s,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const sw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ln.test(e)||e==="0")&&!e.startsWith("url("));function HO(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 KO(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=sw(i,t),a=sw(s,t);return!o||!a?!1:HO(e)||(n==="spring"||DP(n))&&r}function Np(e){e.duration=0,e.type="keyframes"}const FP=new Set(["opacity","clipPath","filter","transform"]),GO=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function YO(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&GO.test(e[t]))return!0;return!1}const XO=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),QO=sP(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function qO(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 QO()&&n&&(FP.has(n)||XO.has(n)&&YO(a))&&(n!=="transform"||!c)&&!u&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const ZO=40;class JO extends ey{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 m;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)||ty;this.keyframeResolver=new f(a,(y,x,g)=>this.onKeyframesResolved(y,x,h,!g),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,i){var g,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;KO(t,s,o,a)||(d=!1,(li.instantAnimations||!l)&&(c==null||c(gd(t,r,n))),t[0]=t[t.length-1],Np(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ZO?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=d&&!u&&qO(f),y=(v=(g=f.motionValue)==null?void 0:g.owner)==null?void 0:v.current;let x;if(m)try{x=new WO({...f,element:y})}catch{x=new Pc(f)}else x=new Pc(f);x.finished.then(()=>{this.notifyFinished()}).catch(pn),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(),NO()),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 VP(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 ow=30,e5=e=>!isNaN(parseFloat(e));class t5{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=e5(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 Kg);const r=this.events[t].add(n);return t==="change"?()=>{r(),Se.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>ow)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ow);return oP(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 t5(e,t)}function $P(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function ny(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?$P(n,e):n}const n5={type:"spring",stiffness:500,damping:25,restSpeed:10},r5=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),i5={type:"keyframes",duration:.8},s5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},o5=(e,{keyframes:t})=>t.length>2?i5:vo.has(e)?e.startsWith("scale")?r5(t[1]):n5:s5,a5=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function l5(e){for(const t in e)if(!a5.has(t))return!0;return!1}const ry=(e,t,n,r={},i,s)=>o=>{const a=ny(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Qt(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};l5(a)||Object.assign(c,o5(e,c)),c.duration&&(c.duration=Qt(c.duration)),c.repeatDelay&&(c.repeatDelay=Qt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Np(c),c.delay===0&&(d=!0)),(li.instantAnimations||li.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,Np(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=gd(c.keyframes,a);if(h!==void 0){Se.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new Pc(c):new JO(c)},u5=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function c5(e){const t=u5.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function zP(e,t,n=1){const[r,i]=c5(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return nP(o)?parseFloat(o):o}return Xg(i)?zP(i,t,n+1):i}function aw(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function iy(e,t,n,r){if(typeof t=="function"){const[i,s]=aw(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]=aw(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Ui(e,t,n){const r=e.getProps();return iy(r,t,n!==void 0?n:r.custom,e)}const OP=new Set(["width","height","top","left","right","bottom",...yo]),Bp=e=>Array.isArray(e);function d5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,so(n))}function h5(e){return Bp(e)?e[e.length-1]||0:e}function f5(e,t){const n=Ui(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=h5(s[o]);d5(e,o,a)}}const ot=e=>!!(e&&e.getVelocity);function p5(e){return!!(ot(e)&&e.add)}function Fp(e,t){const n=e.getValue("willChange");if(p5(n))return n.add(t);if(!n&&li.WillChange){const r=new li.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function sy(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const m5="framerAppearId",UP="data-"+sy(m5);function WP(e){return e.props[UP]}function g5({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function HP(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?$P(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 m in a){const y=e.getValue(m,e.latestValues[m]??null),x=a[m];if(x===void 0||h&&g5(h,m))continue;const g={delay:n,...ny(s||{},m)};c&&(g.skipAnimations=!0);const v=y.get();if(v!==void 0&&!y.isAnimating()&&!Array.isArray(x)&&x===v&&!g.velocity){Se.update(()=>y.set(x));continue}let w=!1;if(window.MotionHandoffAnimation){const T=WP(e);if(T){const E=window.MotionHandoffAnimation(T,m,Se);E!==null&&(g.startTime=E,w=!0)}}Fp(e,m);const S=u??e.shouldReduceMotion;y.start(ry(m,y,x,S&&OP.has(m)?{type:!1}:g,e,w));const P=y.animation;P&&d.push(P)}if(o){const m=()=>Se.update(()=>{o&&f5(e,o)});d.length?Promise.all(d).then(m):m()}return d}function Vp(e,t,n={}){var l;const r=Ui(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(HP(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=i;return y5(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 y5(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(Vp(l,t,{...o,delay:n+(typeof r=="function"?0:r)+VP(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function v5(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Vp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Vp(e,t,n);else{const i=typeof t=="function"?Ui(e,t,n.custom):t;r=Promise.all(HP(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const x5={test:e=>e==="auto",parse:e=>e},KP=e=>t=>t.test(e),GP=[go,Q,Xn,sr,Hz,Wz,x5],lw=e=>GP.find(KP(e));function w5(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||iP(e):!0}const S5=new Set(["brightness","contrast","saturate","opacity"]);function b5(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Qg)||[];if(!r)return e;const i=n.replace(r,"");let s=S5.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const k5=/\b([a-z-]*)\(.*?\)/gu,$p={...Ln,getAnimatableNone:e=>{const t=e.match(k5);return t?t.map(b5).join(" "):e}},zp={...Ln,getAnimatableNone:e=>{const t=Ln.parse(e);return Ln.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},uw={...go,transform:Math.round},_5={rotate:sr,pathRotation:sr,rotateX:sr,rotateY:sr,rotateZ:sr,scale:Ol,scaleX:Ol,scaleY:Ol,scaleZ:Ol,skew:sr,skewX:sr,skewY:sr,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:Oa,originX:X0,originY:X0,originZ:Q},Tc={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,..._5,zIndex:uw,fillOpacity:Oa,strokeOpacity:Oa,numOctaves:uw},C5={...Tc,color:Ue,backgroundColor:Ue,outlineColor:Ue,fill:Ue,stroke:Ue,borderColor:Ue,borderTopColor:Ue,borderRightColor:Ue,borderBottomColor:Ue,borderLeftColor:Ue,filter:$p,WebkitFilter:$p,mask:zp,WebkitMask:zp},YP=e=>C5[e],P5=new Set([$p,zp]);function XP(e,t){let n=YP(e);return P5.has(n)||(n=Ln),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const T5=new Set(["auto","none","0"]);function E5(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!T5.has(s)&&io(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=XP(n,i)}class j5 extends ty{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(),Xg(d))){const h=zP(d,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!OP.has(r)||t.length!==2)return;const[i,s]=t,o=lw(i),a=lw(s),l=Y0(i),u=Y0(s);if(l!==u&&Gr[r]){this.needsMeasurement=!0;return}if(o!==a)if(rw(o)&&rw(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||w5(t[i]))&&r.push(i);r.length&&E5(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 QP(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 Op=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function _u(e){return rP(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:oy}=yP(queueMicrotask,!1),_n={x:!1,y:!1};function qP(){return _n.x||_n.y}function A5(e){return e==="x"||e==="y"?_n[e]?null:(_n[e]=!0,()=>{_n[e]=!1}):_n.x||_n.y?null:(_n.x=_n.y=!0,()=>{_n.x=_n.y=!1})}function ZP(e,t){const n=QP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function R5(e){return!(e.pointerType==="touch"||qP())}function L5(e,t,n={}){const[r,i,s]=ZP(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",m)},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)},m=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},y=x=>{if(!R5(x))return;l=!1;const g=t(o,x);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",f,i)}),s}const JP=(e,t)=>t?e===t?!0:JP(e,t.parentElement):!1,ay=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,M5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function I5(e){return M5.has(e.tagName)||e.isContentEditable===!0}const D5=new Set(["INPUT","SELECT","TEXTAREA"]);function N5(e){return D5.has(e.tagName)||e.isContentEditable===!0}const Cu=new WeakSet;function cw(e){return t=>{t.key==="Enter"&&e(t)}}function Eh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const B5=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=cw(()=>{if(Cu.has(n))return;Eh(n,"down");const i=cw(()=>{Eh(n,"up")}),s=()=>Eh(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 dw(e){return ay(e)&&!qP()}const hw=new WeakSet;function F5(e,t,n={}){const[r,i,s]=ZP(e,n),o=a=>{const l=a.currentTarget;if(!dw(a)||hw.has(a))return;Cu.add(l),n.stopPropagation&&hw.add(a);const u=t(l,a),c=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Cu.has(l)&&Cu.delete(l),dw(f)&&typeof u=="function"&&u(f,{success:m})},d=f=>{c(f,l===window||l===document||n.useGlobalTarget||JP(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),_u(a)&&(a.addEventListener("focus",u=>B5(u,i)),!I5(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function ly(e){return rP(e)&&"ownerSVGElement"in e}const Pu=new WeakMap;let Mr;const eT=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:ly(r)&&"getBBox"in r?r.getBBox()[t]:r[n],V5=eT("inline","width","offsetWidth"),$5=eT("block","height","offsetHeight");function z5({target:e,borderBoxSize:t}){var n;(n=Pu.get(e))==null||n.forEach(r=>{r(e,{get width(){return V5(e,t)},get height(){return $5(e,t)}})})}function O5(e){e.forEach(z5)}function U5(){typeof ResizeObserver>"u"||(Mr=new ResizeObserver(O5))}function W5(e,t){Mr||U5();const n=QP(e);return n.forEach(r=>{let i=Pu.get(r);i||(i=new Set,Pu.set(r,i)),i.add(t),Mr==null||Mr.observe(r)}),()=>{n.forEach(r=>{const i=Pu.get(r);i==null||i.delete(t),i!=null&&i.size||Mr==null||Mr.unobserve(r)})}}const Tu=new Set;let Ms;function H5(){Ms=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Tu.forEach(t=>t(e))},window.addEventListener("resize",Ms)}function K5(e){return Tu.add(e),Ms||H5(),()=>{Tu.delete(e),!Tu.size&&typeof Ms=="function"&&(window.removeEventListener("resize",Ms),Ms=void 0)}}function fw(e,t){return typeof e=="function"?K5(e):W5(e,t)}function G5(e){return ly(e)&&e.tagName==="svg"}const Y5=[...GP,Ue,Ln],X5=e=>Y5.find(KP(e)),pw=()=>({translate:0,scale:1,origin:0,originPoint:0}),Is=()=>({x:pw(),y:pw()}),mw=()=>({min:0,max:0}),Ge=()=>({x:mw(),y:mw()}),Q5=new WeakMap;function yd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ua(e){return typeof e=="string"||Array.isArray(e)}const uy=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cy=["initial",...uy];function vd(e){return yd(e.animate)||cy.some(t=>Ua(e[t]))}function tT(e){return!!(vd(e)||e.variants)}function q5(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ot(i))e.addValue(r,i);else if(ot(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 Ec={current:null},dy={current:!1},Z5=typeof window<"u";function nT(){if(dy.current=!0,!!Z5)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ec.current=e.matches;e.addEventListener("change",t),t()}else Ec.current=!1}const gw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let jc={};function rT(e){jc=e}function J5(){return jc}class e4{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=ty,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,Se.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=vd(n),this.isVariantNode=tT(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 m=h[f];u[f]!==void 0&&ot(m)&&m.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,Q5.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:(dy.current||nT(),this.shouldReduceMotion=Ec.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&&FP.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new NP({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:Qt(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&&Se.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 jc){const n=jc[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):Ge()}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<gw.length;r++){const i=gw[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=q5(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"&&(nP(r)||iP(r))?r=parseFloat(r):!X5(r)&&Ln.test(n)&&(r=XP(t,n)),this.setBaseTarget(t,ot(r)?r.get():r)),ot(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=iy(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&&!ot(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 Kg),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){oy.render(this.render)}}class iT extends e4{constructor(){super(...arguments),this.KeyframeResolver=j5}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;ot(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 sT({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function t4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function n4(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 jh(e){return e===void 0||e===1}function Up({scale:e,scaleX:t,scaleY:n}){return!jh(e)||!jh(t)||!jh(n)}function _i(e){return Up(e)||oT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function oT(e){return yw(e.x)||yw(e.y)}function yw(e){return e&&e!=="0%"}function Ac(e,t,n){const r=e-n,i=t*r;return n+i}function vw(e,t,n,r,i){return i!==void 0&&(e=Ac(e,i,r)),Ac(e,n,r)+t}function Wp(e,t=0,n=1,r,i){e.min=vw(e.min,t,n,r,i),e.max=vw(e.max,t,n,r,i)}function aT(e,{x:t,y:n}){Wp(e.x,t.translate,t.scale,t.originPoint),Wp(e.y,n.translate,n.scale,n.originPoint)}const xw=.999999999999,ww=1.0000000000001;function r4(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,aT(e,o)),r&&_i(s.latestValues)&&Eu(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<ww&&t.x>xw&&(t.x=1),t.y<ww&&t.y>xw&&(t.y=1)}function Un(e,t){e.min+=t,e.max+=t}function Sw(e,t,n,r,i=.5){const s=xe(e.min,e.max,i);Wp(e,t,n,s,r)}function bw(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Eu(e,t,n){const r=n??e;Sw(e.x,bw(t.x,r.x),t.scaleX,t.scale,t.originX),Sw(e.y,bw(t.y,r.y),t.scaleY,t.scale,t.originY)}function lT(e,t){return sT(n4(e.getBoundingClientRect(),t))}function i4(e,t,n){const r=lT(e,n),{scroll:i}=t;return i&&(Un(r.x,i.offset.x),Un(r.y,i.offset.y)),r}const s4={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},o4=yo.length;function a4(e,t,n){let r="",i=!0;for(let o=0;o<o4;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=Op(l,Tc[a]);if(!u){i=!1;const d=s4[a]||a;r+=`${d}(${c}) `}n&&(t[a]=c)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${Op(s,Tc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function hy(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(xP(l)){i[l]=u;continue}else{const c=Op(u,Tc[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=a4(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 uT(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 kw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Q.test(e))e=parseFloat(e);else return e;const n=kw(e,t.target.x),r=kw(e,t.target.y);return`${n}% ${r}%`}},l4={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ln.parse(e);if(i.length>5)return r;const s=Ln.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=xe(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},Hp={borderRadius:{...Vo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vo,borderTopRightRadius:Vo,borderBottomLeftRadius:Vo,borderBottomRightRadius:Vo,boxShadow:l4};function cT(e,{layout:t,layoutId:n}){return vo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Hp[e]||e==="opacity")}function fy(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)(ot(r[a])||i&&ot(i[a])||cT(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function u4(e){return window.getComputedStyle(e)}class c4 extends iT{constructor(){super(...arguments),this.type="html",this.renderInstance=uT}readValueFromInstance(t,n){var r;if(vo.has(n))return(r=this.projection)!=null&&r.isProjecting?Rp(n):RO(t,n);{const i=u4(t),s=(xP(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return lT(t,n)}build(t,n,r){hy(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fy(t,n,r)}}const d4={offset:"stroke-dashoffset",array:"stroke-dasharray"},h4={offset:"strokeDashoffset",array:"strokeDasharray"};function f4(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?d4:h4;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const p4=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dT(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(hy(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 p4)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&&f4(d,i,s,o,!1)}const hT=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"]),fT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function m4(e,t,n,r){uT(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(hT.has(i)?i:sy(i),t.attrs[i])}function pT(e,t,n){const r=fy(e,t,n);for(const i in e)if(ot(e[i])||ot(t[i])){const s=yo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class g4 extends iT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ge}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(vo.has(n)){const r=YP(n);return r&&r.default||0}return n=hT.has(n)?n:sy(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return pT(t,n,r)}build(t,n,r){dT(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){m4(t,n,r,i)}mount(t){this.isSVGTag=fT(t.tagName),super.mount(t)}}const y4=cy.length;function mT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?mT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<y4;n++){const r=cy[n],i=e.props[r];(Ua(i)||i===!1)&&(t[r]=i)}return t}function gT(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 v4=[...uy].reverse(),x4=uy.length;function w4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>v5(e,n,r)))}function S4(e){let t=w4(e),n=_w(),r=!0,i=!1;const s=u=>(c,d)=>{var f;const h=Ui(e,d,u==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:m,transitionEnd:y,...x}=h;c={...c,...x,...y}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=mT(e.parent)||{},h=[],f=new Set;let m={},y=1/0;for(let g=0;g<x4;g++){const v=v4[g],w=n[v],S=c[v]!==void 0?c[v]:d[v],P=Ua(S),T=v===u?w.isActive:null;T===!1&&(y=g);let E=S===d[v]&&S!==c[v]&&P;if(E&&(r||i)&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...m},!w.isActive&&T===null||!S&&!w.prevProp||yd(S)||typeof S=="boolean")continue;if(v==="exit"&&w.isActive&&T!==!0){w.prevResolvedValues&&(m={...m,...w.prevResolvedValues});continue}const _=b4(w.prevProp,S);let R=_||v===u&&w.isActive&&!E&&P||g>y&&P,k=!1;const L=Array.isArray(S)?S:[S];let I=L.reduce(s(v),{});T===!1&&(I={});const{prevResolvedValues:V={}}=w,B={...V,...I},F=N=>{R=!0,f.has(N)&&(k=!0,f.delete(N)),w.needsAnimating[N]=!0;const z=e.getValue(N);z&&(z.liveStyle=!1)};for(const N in B){const z=I[N],b=V[N];if(m.hasOwnProperty(N))continue;let U=!1;Bp(z)&&Bp(b)?U=!gT(z,b)||_:U=z!==b,U?z!=null?F(N):f.add(N):z!==void 0&&f.has(N)?F(N):w.protectedKeys[N]=!0}w.prevProp=S,w.prevResolvedValues=I,w.isActive&&(m={...m,...I}),(r||i)&&e.blockInitialAnimation&&(R=!1);const $=E&&_;R&&(!$||k)&&h.push(...L.map(N=>{const z={type:v};if(typeof N=="string"&&(r||i)&&!$&&e.manuallyAnimateOnMount&&e.parent){const{parent:b}=e,U=Ui(b,N);if(b.enteringChildren&&U){const{delayChildren:Z}=U.transition||{};z.delay=VP(b.enteringChildren,e,Z)}}return{animation:N,options:z}}))}if(f.size){const g={};if(typeof c.initial!="boolean"){const v=Ui(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(g.transition=v.transition)}f.forEach(v=>{const w=e.getBaseTarget(v),S=e.getValue(v);S&&(S.liveStyle=!0),g[v]=w??null}),h.push({animation:g})}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 m;return(m=f.animationState)==null?void 0:m.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=_w(),i=!0}}}function b4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gT(t,e):!1}function xi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _w(){return{animate:xi(!0),whileInView:xi(),whileHover:xi(),whileTap:xi(),whileDrag:xi(),whileFocus:xi(),exit:xi()}}function Kp(e,t){e.min=t.min,e.max=t.max}function Sn(e,t){Kp(e.x,t.x),Kp(e.y,t.y)}function Cw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const yT=1e-4,k4=1-yT,_4=1+yT,vT=.01,C4=0-vT,P4=0+vT;function bt(e){return e.max-e.min}function T4(e,t,n){return Math.abs(e-t)<=n}function Pw(e,t,n,r=.5){e.origin=r,e.originPoint=xe(t.min,t.max,e.origin),e.scale=bt(n)/bt(t),e.translate=xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=k4&&e.scale<=_4||isNaN(e.scale))&&(e.scale=1),(e.translate>=C4&&e.translate<=P4||isNaN(e.translate))&&(e.translate=0)}function da(e,t,n,r){Pw(e.x,t.x,n.x,r?r.originX:void 0),Pw(e.y,t.y,n.y,r?r.originY:void 0)}function Tw(e,t,n,r=0){const i=r?xe(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+bt(t)}function E4(e,t,n,r){Tw(e.x,t.x,n.x,r==null?void 0:r.x),Tw(e.y,t.y,n.y,r==null?void 0:r.y)}function Ew(e,t,n,r=0){const i=r?xe(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+bt(t)}function Rc(e,t,n,r){Ew(e.x,t.x,n.x,r==null?void 0:r.x),Ew(e.y,t.y,n.y,r==null?void 0:r.y)}function jw(e,t,n,r,i){return e-=t,e=Ac(e,1/n,r),i!==void 0&&(e=Ac(e,1/i,r)),e}function j4(e,t=0,n=1,r=.5,i,s=e,o=e){if(Xn.test(t)&&(t=parseFloat(t),t=xe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=xe(s.min,s.max,r);e===s&&(a-=t),e.min=jw(e.min,t,n,a,i),e.max=jw(e.max,t,n,a,i)}function Aw(e,t,[n,r,i],s,o){j4(e,t[n],t[r],t[i],t.scale,s,o)}const A4=["x","scaleX","originX"],R4=["y","scaleY","originY"];function Rw(e,t,n,r){Aw(e.x,t,A4,n?n.x:void 0,r?r.x:void 0),Aw(e.y,t,R4,n?n.y:void 0,r?r.y:void 0)}function Lw(e){return e.translate===0&&e.scale===1}function xT(e){return Lw(e.x)&&Lw(e.y)}function Mw(e,t){return e.min===t.min&&e.max===t.max}function L4(e,t){return Mw(e.x,t.x)&&Mw(e.y,t.y)}function Iw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wT(e,t){return Iw(e.x,t.x)&&Iw(e.y,t.y)}function Dw(e){return bt(e.x)/bt(e.y)}function Nw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Vn(e){return[e("x"),e("y")]}function M4(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:m,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) `),m&&(r+=`skewX(${m}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 ST=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],I4=ST.length,Bw=e=>typeof e=="string"?parseFloat(e):e,Fw=e=>typeof e=="number"||Q.test(e);function D4(e,t,n,r,i,s){i?(e.opacity=xe(0,n.opacity??1,N4(r)),e.opacityExit=xe(t.opacity??1,0,B4(r))):s&&(e.opacity=xe(t.opacity??1,n.opacity??1,r));for(let o=0;o<I4;o++){const a=ST[o];let l=Vw(t,a),u=Vw(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Fw(l)===Fw(u)?(e[a]=Math.max(xe(Bw(l),Bw(u),r),0),(Xn.test(u)||Xn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=xe(t.rotate||0,n.rotate||0,r))}function Vw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const N4=bT(0,.5,fP),B4=bT(.5,.95,pn);function bT(e,t,n){return r=>r<e?0:r>t?1:n(za(e,t,r))}function F4(e,t,n){const r=ot(e)?e:so(e);return r.start(ry("",r,t,n)),r.animation}function Wa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const V4=(e,t)=>e.depth-t.depth;class $4{constructor(){this.children=[],this.isDirty=!1}add(t){Wg(this.children,t),this.isDirty=!0}remove(t){bc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(V4),this.isDirty=!1,this.children.forEach(t)}}function z4(e,t){const n=St.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ui(r),e(s-t))};return Se.setup(r,!0),()=>ui(r)}function ju(e){return ot(e)?e.get():e}class O4{constructor(){this.members=[]}add(t){Wg(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&&(bc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(bc(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 Au={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ah=["","X","Y","Z"],U4=1e3;let W4=0;function Rh(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function kT(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=WP(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Se,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&kT(r)}function _T({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=W4++,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(G4),this.nodes.forEach(J4),this.nodes.forEach(e6),this.nodes.forEach(Y4)},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 $4)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Kg),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=ly(o)&&!G5(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;Se.read(()=>{d=window.innerWidth}),e(o,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=z4(h,250),Au.hasAnimatedSinceResize&&(Au.hasAnimatedSinceResize=!1,this.nodes.forEach(Ow)))})}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 m=this.options.transition||u.getDefaultTransition()||s6,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),g=!this.targetLayout||!wT(this.targetLayout,f),v=!d&&h;if(this.options.layoutRoot||this.resumeFrom||v||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...ny(m,"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||Ow(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(t6),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&&kT(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(Q4),this.nodes.forEach($w);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(q4),this.nodes.forEach(Z4),this.nodes.forEach(H4),this.nodes.forEach(K4)):this.nodes.forEach(zw),this.clearAllSnapshots();const a=St.now();rt.delta=Zn(0,1e3/60,a-rt.timestamp),rt.timestamp=a,rt.isProcessing=!0,bh.update.process(rt),bh.preRender.process(rt),bh.render.process(rt),rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,oy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(X4),this.sharedNodes.forEach(n6)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Se.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=Ge()),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&&!xT(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||_i(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)),o6(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ge();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(a6))){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=Ge();if(Sn(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&&Sn(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||Ge();Sn(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)),_i(f.latestValues)&&Eu(u,f.latestValues,(c=f.layout)==null?void 0:c.layoutBox)}return _i(this.latestValues)&&Eu(u,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),u}removeTransform(o){var l;const a=Ge();Sn(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!_i(c.latestValues))continue;let d;c.instance&&(Up(c.latestValues)&&c.updateSnapshot(),d=Ge(),Sn(d,c.measurePageBox())),Rw(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,d)}return _i(this.latestValues)&&Rw(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!==rt.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=rt.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=Ge(),this.targetWithTransforms=Ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),E4(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Sn(this.target,this.layout.layoutBox),aT(this.target,this.targetDelta)):Sn(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||Up(this.parent.latestValues)||oT(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=Ge(),this.relativeTargetOrigin=Ge(),Rc(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),Sn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===rt.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;Sn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;r4(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=Ge());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Cw(this.prevProjectionDelta.x,this.projectionDelta.x),Cw(this.prevProjectionDelta.y,this.projectionDelta.y)),da(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Nw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Nw(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=Ge(),m=u?u.source:void 0,y=this.layout?this.layout.source:void 0,x=m!==y,g=this.getStack(),v=!g||g.members.length<=1,w=!!(x&&!v&&this.options.crossfade===!0&&!this.path.some(i6));this.animationProgress=0;let S;const P=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=T=>{const E=T/1e3,_=P==null?void 0:P(E);_?(h.x.translate=_.x,h.x.scale=xe(o.x.scale,1,E),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=_.y,h.y.scale=xe(o.y.scale,1,E),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(Uw(h.x,o.x,E),Uw(h.y,o.y,E)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),r6(this.relativeTarget,this.relativeTargetOrigin,f,E),S&&L4(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Ge()),Sn(S,this.relativeTarget)),x&&(this.animationValues=d,D4(d,c,this.latestValues,E,w,v)),_&&_.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=_.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},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=Se.update(()=>{Au.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=so(0)),this.motionValue.jump(0,!1),this.currentAnimation=F4(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(U4),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&&CT(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ge();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}Sn(a,l),Eu(a,c),da(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new O4),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&&Rh("z",o,u,this.animationValues);for(let c=0;c<Ah.length;c++)Rh(`rotate${Ah[c]}`,o,u,this.animationValues),Rh(`skew${Ah[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=ju(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=ju(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!_i(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=M4(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 m in Hp){if(c[m]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:g}=Hp[m],v=d==="none"?c[m]:y(c[m],u);if(x){const w=x.length;for(let S=0;S<w;S++)o[x[S]]=v}else g?this.options.visualElement.renderState.vars[m]=v:o[m]=v}this.options.layoutId&&(o.pointerEvents=u===this?ju(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($w),this.root.sharedNodes.clear()}}}function H4(e){e.updateLayout()}function K4(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";Kp(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else CT(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();da(a,r,t.layoutBox);const l=Is();o?da(l,e.applyTransform(i,!0),t.measuredBox):da(l,r,t.layoutBox);const u=!xT(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 m=e.options.layoutAnchor||void 0,y=Ge();Rc(y,t.layoutBox,h.layoutBox,m);const x=Ge();Rc(x,r,f.layoutBox,m),wT(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 G4(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 Y4(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function X4(e){e.clearSnapshot()}function $w(e){e.clearMeasurements()}function Q4(e){e.isLayoutDirty=!0,e.updateLayout()}function zw(e){e.isLayoutDirty=!1}function q4(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Z4(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ow(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function J4(e){e.resolveTargetDelta()}function e6(e){e.calcProjection()}function t6(e){e.resetSkewAndRotation()}function n6(e){e.removeLeadSnapshot()}function Uw(e,t,n){e.translate=xe(t.translate,0,n),e.scale=xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ww(e,t,n,r){e.min=xe(t.min,n.min,r),e.max=xe(t.max,n.max,r)}function r6(e,t,n,r){Ww(e.x,t.x,n.x,r),Ww(e.y,t.y,n.y,r)}function i6(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const s6={duration:.45,ease:[.4,0,.1,1]},Hw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Kw=Hw("applewebkit/")&&!Hw("chrome/")?Math.round:pn;function Gw(e){e.min=Kw(e.min),e.max=Kw(e.max)}function o6(e){Gw(e.x),Gw(e.y)}function CT(e,t,n){return e==="position"||e==="preserve-aspect"&&!T4(Dw(t),Dw(n),.2)}function a6(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const l6=_T({attachResizeListener:(e,t)=>Wa(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}),Lh={current:void 0},PT=_T({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Lh.current){const e=new l6({});e.mount(window),e.setOptions({layoutScroll:!0}),Lh.current=e}return Lh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),py=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Yw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function u6(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Yw(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():Yw(e[i],null)}}}}function c6(...e){return C.useCallback(u6(...e),e)}class d6 extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(_u(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=_u(r)&&r.offsetWidth||0,s=_u(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 h6({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(py),c=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=c6(a,c);return C.useInsertionEffect(()=>{const{width:f,height:m,top:y,left:x,right:g,bottom:v,direction:w}=l.current;if(t||s===!1||!a.current||!f||!m)return;const S=w==="rtl",P=n==="left"?S?`right: ${g}`:`left: ${x}`:S?`left: ${x}`:`right: ${g}`,T=r==="bottom"?`bottom: ${v}`:`top: ${y}`;a.current.dataset.motionPopId=o;const E=document.createElement("style");u&&(E.nonce=u);const _=i??document.head;return _.appendChild(E),E.sheet&&E.sheet.insertRule(`
73
+ [data-motion-pop-id="${o}"] {
74
+ position: absolute !important;
75
+ width: ${f}px !important;
76
+ height: ${m}px !important;
77
+ ${P}px !important;
78
+ ${T}px !important;
79
+ }
80
+ `),()=>{var R;(R=a.current)==null||R.removeAttribute("data-motion-pop-id"),_.contains(E)&&_.removeChild(E)}},[t]),p.jsx(d6,{isPresent:t,childRef:a,sizeRef:l,pop:s,children:s===!1?e:C.cloneElement(e,{ref:d})})}const f6=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=Ug(p6),d=C.useId();let h=!0,f=C.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:m=>{c.set(m,!0);for(const y of c.values())if(!y)return;r&&r()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,r]);return s&&h&&(f={...f}),C.useMemo(()=>{c.forEach((m,y)=>c.set(y,!1))},[n]),C.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=p.jsx(h6,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),p.jsx(md.Provider,{value:f,children:e})};function p6(){return new Map}function TT(e=!0){const t=C.useContext(md);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 Ul=e=>e.key||"";function Xw(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const my=({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]=TT(o),h=C.useMemo(()=>Xw(e),[e]),f=o&&!c?[]:h.map(Ul),m=C.useRef(!0),y=C.useRef(h),x=Ug(()=>new Map),g=C.useRef(new Set),[v,w]=C.useState(h),[S,P]=C.useState(h);tP(()=>{m.current=!1,y.current=h;for(let _=0;_<S.length;_++){const R=Ul(S[_]);f.includes(R)?(x.delete(R),g.current.delete(R)):x.get(R)!==!0&&x.set(R,!1)}},[S,f.length,f.join("-")]);const T=[];if(h!==v){let _=[...h];for(let R=0;R<S.length;R++){const k=S[R],L=Ul(k);f.includes(L)||(_.splice(R,0,k),T.push(k))}return s==="wait"&&T.length&&(_=T),P(Xw(_)),w(h),null}const{forceRender:E}=C.useContext(Og);return p.jsx(p.Fragment,{children:S.map(_=>{const R=Ul(_),k=o&&!c?!1:h===S||f.includes(R),L=()=>{if(g.current.has(R))return;if(x.has(R))g.current.add(R),x.set(R,!0);else return;let I=!0;x.forEach(V=>{V||(I=!1)}),I&&(E==null||E(),P(y.current),o&&(d==null||d()),r&&r())};return p.jsx(f6,{isPresent:k,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:k?void 0:L,anchorX:a,anchorY:l,children:_},R)})})},ET=C.createContext({strict:!1}),Qw={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 qw=!1;function m6(){if(qw)return;const e={};for(const t in Qw)e[t]={isEnabled:n=>Qw[t].some(r=>!!n[r])};rT(e),qw=!0}function jT(){return m6(),J5()}function g6(e){const t=jT();for(const n in e)t[n]={...t[n],...e[n]};rT(t)}const y6=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 Lc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||y6.has(e)}let AT=e=>!Lc(e);function v6(e){typeof e=="function"&&(AT=t=>t.startsWith("on")?!Lc(t):e(t))}try{v6(require("@emotion/is-prop-valid").default)}catch{}function x6(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||ot(e[i])||(AT(i)||n===!0&&Lc(i)||!t&&!Lc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const xd=C.createContext({});function w6(e,t){if(vd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ua(n)?n:void 0,animate:Ua(r)?r:void 0}}return e.inherit!==!1?t:{}}function S6(e){const{initial:t,animate:n}=w6(e,C.useContext(xd));return C.useMemo(()=>({initial:t,animate:n}),[Zw(t),Zw(n)])}function Zw(e){return Array.isArray(e)?e.join(" "):e}const gy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function RT(e,t,n){for(const r in t)!ot(t[r])&&!cT(r,n)&&(e[r]=t[r])}function b6({transformTemplate:e},t){return C.useMemo(()=>{const n=gy();return hy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function k6(e,t){const n=e.style||{},r={};return RT(r,n,e),Object.assign(r,b6(e,t)),r}function _6(e,t){const n={},r=k6(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 LT=()=>({...gy(),attrs:{}});function C6(e,t,n,r){const i=C.useMemo(()=>{const s=LT();return dT(s,t,fT(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};RT(s,e.style,e),i.style={...s,...i.style}}return i}const P6=["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 yy(e){return typeof e!="string"||e.includes("-")?!1:!!(P6.indexOf(e)>-1||/[A-Z]/u.test(e))}function T6(e,t,n,{latestValues:r},i,s=!1,o){const l=(o??yy(e)?C6:_6)(t,r,i,e),u=x6(t,typeof e=="string",s),c=e!==C.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=C.useMemo(()=>ot(d)?d.get():d,[d]);return C.createElement(e,{...c,children:h})}function E6({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:j6(n,r,i,e),renderState:t()}}function j6(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=ju(s[h]);let{initial:o,animate:a}=e;const l=vd(e),u=tT(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"&&!yd(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const m=iy(e,h[f]);if(m){const{transitionEnd:y,transition:x,...g}=m;for(const v in g){let w=g[v];if(Array.isArray(w)){const S=c?w.length-1:0;w=w[S]}w!==null&&(i[v]=w)}for(const v in y)i[v]=y[v]}}}return i}const MT=e=>(t,n)=>{const r=C.useContext(xd),i=C.useContext(md),s=()=>E6(e,t,r,i);return n?s():Ug(s)},A6=MT({scrapeMotionValuesFromProps:fy,createRenderState:gy}),R6=MT({scrapeMotionValuesFromProps:pT,createRenderState:LT}),L6=Symbol.for("motionComponentSymbol");function M6(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 IT=C.createContext({});function gs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function I6(e,t,n,r,i,s){var w,S;const{visualElement:o}=C.useContext(xd),a=C.useContext(ET),l=C.useContext(md),u=C.useContext(py),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 m=h.current,y=C.useContext(IT);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&D6(h.current,n,i,y);const x=C.useRef(!1);C.useInsertionEffect(()=>{m&&x.current&&m.update(n,l)});const g=n[UP],v=C.useRef(!!g&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,g))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,g)));return tP(()=>{f.current=!0,m&&(x.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),C.useEffect(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var P;(P=window.MotionHandoffMarkAsComplete)==null||P.call(window,g)}),v.current=!1),m.enteringChildren=void 0)}),m}function D6(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:DT(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 DT(e){if(e)return e.options.allowProjection!==!1?e.projection:DT(e.parent)}function Mh(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&g6(r);const s=n?n==="svg":yy(e),o=s?R6:A6;function a(u,c){let d;const h={...C.useContext(py),...u,layoutId:N6(u)},{isStatic:f}=h,m=S6(u),y=o(u,f);if(!f&&typeof window<"u"){B6();const x=F6(h);d=x.MeasureLayout,m.visualElement=I6(e,y,h,i,x.ProjectionNode,s)}return p.jsxs(xd.Provider,{value:m,children:[d&&m.visualElement?p.jsx(d,{visualElement:m.visualElement,...h}):null,T6(e,u,M6(y,m.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[L6]=e,l}function N6({layoutId:e}){const t=C.useContext(Og).id;return t&&e!==void 0?t+"-"+e:e}function B6(e,t){C.useContext(ET).strict}function F6(e){const t=jT(),{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 V6(e,t){if(typeof Proxy>"u")return Mh;const n=new Map,r=(s,o)=>Mh(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,Mh(o,void 0,e,t)),n.get(o))})}const $6=(e,t)=>t.isSVG??yy(e)?new g4(t):new c4(t,{allowProjection:e!==C.Fragment});class z6 extends pi{constructor(t){super(t),t.animationState||(t.animationState=S4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();yd(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 O6=0;class U6 extends pi{constructor(){super(...arguments),this.id=O6++,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=Ui(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 W6={animation:{Feature:z6},exit:{Feature:U6}};function ll(e){return{point:{x:e.pageX,y:e.pageY}}}const H6=e=>t=>ay(t)&&e(t,ll(t));function ha(e,t,n,r){return Wa(e,t,H6(n),r)}const NT=({current:e})=>e?e.ownerDocument.defaultView:null,Jw=(e,t)=>Math.abs(e-t);function K6(e,t){const n=Jw(e.x,t.x),r=Jw(e.y,t.y);return Math.sqrt(n**2+r**2)}const e1=new Set(["auto","scroll"]);class BT{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=Wl(this.lastRawMoveEventInfo,this.transformPagePoint));const f=Ih(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=K6(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:x}=f,{timestamp:g}=rt;this.history.push({...x,timestamp:g});const{onStart:v,onMove:w}=this.handlers;m||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Wl(m,this.transformPagePoint),Se.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Ih(f.type==="pointercancel"?this.lastMoveEventInfo:Wl(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,v),x&&x(f,v)},!ay(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=ll(t),u=Wl(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=rt;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,Ih(u,this.history)),this.removeListeners=sl(ha(this.contextWindow,"pointermove",this.handlePointerMove),ha(this.contextWindow,"pointerup",this.handlePointerUp),ha(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(e1.has(r.overflowX)||e1.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),Se.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 Wl(e,t){return t?{point:t(e.point)}:e}function t1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ih({point:e},t){return{point:e,delta:t1(e,FT(t)),offset:t1(e,G6(t)),velocity:Y6(t,.1)}}function G6(e){return e[0]}function FT(e){return e[e.length-1]}function Y6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=FT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Qt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Qt(t)*2&&(r=e[1]);const s=cn(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 X6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?xe(n,e,r.max):Math.min(e,n)),e}function n1(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 Q6(e,{top:t,left:n,bottom:r,right:i}){return{x:n1(e.x,n,i),y:n1(e.y,t,r)}}function r1(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 q6(e,t){return{x:r1(e.x,t.x),y:r1(e.y,t.y)}}function Z6(e,t){let n=.5;const r=bt(e),i=bt(t);return i>r?n=za(t.min,t.max-r,e.min):r>i&&(n=za(e.min,e.max-i,t.min)),Zn(0,1,n)}function J6(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 Gp=.35;function eU(e=Gp){return e===!1?e=0:e===!0&&(e=Gp),{x:i1(e,"left","right"),y:i1(e,"top","bottom")}}function i1(e,t,n){return{min:s1(e,t),max:s1(e,n)}}function s1(e,t){return typeof e=="number"?e:e[t]||0}const tU=new WeakMap;class nU{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=Ge(),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(ll(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:f,dragPropagation:m,onDragStart:y}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=A5(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(g=>{let v=this.getAxisMotionValue(g).get()||0;if(Xn.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[g];S&&(v=bt(S)*(parseFloat(v)/100))}}this.originPoint[g]=v}),y&&Se.update(()=>y(d,h),!1,!0),Fp(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:m,onDirectionLock:y,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:g}=h;if(m&&this.currentDirection===null){this.currentDirection=iU(g),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,g),this.updateAxis("y",h.point,g),this.visualElement.render(),x&&Se.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 BT(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:NT(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&&Se.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||!Hl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=X6(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=Q6(r.layoutBox,t):this.constraints=!1,this.elastic=eU(n),i!==this.constraints&&!gs(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Vn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=J6(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=i4(r,i.root,this.visualElement.getTransformPagePoint());let o=q6(i.layout.layoutBox,s);if(n){const a=n(t4(o));this.hasMutatedConstraints=!!a,a&&(o=sT(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(!Hl(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,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Fp(this.visualElement,t),r.start(ry(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(!Hl(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]-xe(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]=Z6({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(!Hl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(xe(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;tU.set(this.visualElement,this);const t=this.visualElement.current,n=ha(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,f=h!==t&&N5(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=rU(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Se.read(i);const a=Wa(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=Gp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function o1(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function rU(e,t,n){const r=fw(e,o1(n)),i=fw(t,o1(n));return()=>{r(),i()}}function Hl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iU(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sU extends pi{constructor(t){super(t),this.removeGroupControls=pn,this.removeListeners=pn,this.controls=new nU(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pn}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 Dh=e=>(t,n)=>{e&&Se.update(()=>e(t,n),!1,!0)};class oU extends pi{constructor(){super(...arguments),this.removePointerDownListener=pn}onPointerDown(t){this.session=new BT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:NT(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Dh(t),onStart:Dh(n),onMove:Dh(r),onEnd:(s,o)=>{delete this.session,i&&Se.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ha(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 Nh=!1;class aU 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),Nh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Au.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}),Nh=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Se.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(),oy.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Nh=!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 VT(e){const[t,n]=TT(),r=C.useContext(Og);return p.jsx(aU,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(IT),isPresent:t,safeToRemove:n})}const lU={pan:{Feature:oU},drag:{Feature:sU,ProjectionNode:PT,MeasureLayout:VT}};function a1(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&&Se.postRender(()=>s(t,ll(t)))}class uU extends pi{mount(){const{current:t}=this.node;t&&(this.unmount=L5(t,(n,r)=>(a1(this.node,r,"Start"),i=>a1(this.node,i,"End"))))}unmount(){}}class cU 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=sl(Wa(this.node.current,"focus",()=>this.onFocus()),Wa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function l1(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&&Se.postRender(()=>s(t,ll(t)))}class dU extends pi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=F5(t,(i,s)=>(l1(this.node,s,"Start"),(o,{success:a})=>l1(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Yp=new WeakMap,Bh=new WeakMap,hU=e=>{const t=Yp.get(e.target);t&&t(e)},fU=e=>{e.forEach(hU)};function pU({root:e,...t}){const n=e||document;Bh.has(n)||Bh.set(n,{});const r=Bh.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(fU,{root:e,...t})),r[i]}function mU(e,t,n){const r=pU(t);return Yp.set(e,n),r.observe(e),()=>{Yp.delete(e),r.unobserve(e)}}const gU={some:0,all:1};class yU 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:gU[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=mU(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(vU(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function vU({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xU={inView:{Feature:yU},tap:{Feature:dU},focus:{Feature:cU},hover:{Feature:uU}},wU={layout:{ProjectionNode:PT,MeasureLayout:VT}},SU={...W6,...xU,...lU,...wU},Mc=V6(SU,$6);function vy(){!dy.current&&nT();const[e]=C.useState(Ec.current);return e}const se={serif:"'Luminari', 'Cormorant Garamond', Georgia, serif",body:"'Cormorant Garamond', Georgia, serif",handwritten:"'Caveat', cursive",mono:"'JetBrains Mono', monospace"},D={1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem"},me={"2xs":"0.75rem",xs:"0.875rem",sm:"1rem",base:"1.125rem",md:"1.25rem",lg:"1.5rem"},Dt={tight:1.2,normal:1.5,relaxed:1.7},Ae={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"},Ru="1px solid rgba(61, 53, 43, 0.1)",$T={sidebarWidth:220,stackPanelWidth:480},bU=["idea","planned","in-progress","review","done","dropped"],kU=["feat","fix","chore","docs","refactor"],zT=["claude-code","opencode"],xy={"claude-code":"Claude Code",opencode:"OpenCode"},Fh={"claude-code":{model:["opus","sonnet","fable","haiku"],effort:["low","medium","high","xhigh","max"]},opencode:{model:null}},$o={phase:{agent:"opencode"},planDraft:{agent:"claude-code"},ideaExtend:{agent:"claude-code"},commitSuggest:{agent:"claude-code"}},_U=kU.map(e=>({value:e,label:e})),CU=({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 p.jsx(il,{open:e,onClose:t,title:"Add to backlog",size:"small",children:p.jsxs("form",{onSubmit:d,style:{display:"flex",flexDirection:"column",gap:D[4]},children:[p.jsx(qn,{label:"Title",value:r,onChange:h=>i(h.target.value),placeholder:"Backlog item title…",disabled:u,autoFocus:!0,required:!0}),p.jsx(Ws,{label:"Kind",value:a,onChange:h=>l(h),options:_U,disabled:u}),p.jsx(mo,{label:"Description",value:s,onChange:h=>o(h.target.value),placeholder:"Optional details…",disabled:u,rows:4}),p.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:D[2]},children:[p.jsx(ne,{type:"button",variant:"ghost",onClick:t,disabled:u,children:"Cancel"}),p.jsx(ne,{type:"submit",variant:"primary",disabled:!r.trim()||u,children:"Add"})]})]})})},Xp=({children:e,onClick:t})=>p.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",padding:0,color:Ae.accentAmberDark,cursor:"pointer",textDecoration:"underline",font:"inherit"},children:e});function PU(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const TU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,EU=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jU={};function u1(e,t){return(jU.jsx?EU:TU).test(e)}const AU=/[ \t\n\f\r]/g;function RU(e){return typeof e=="object"?e.type==="text"?c1(e.value):!1:c1(e)}function c1(e){return e.replace(AU,"")===""}class ul{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ul.prototype.normal={};ul.prototype.property={};ul.prototype.space=void 0;function OT(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ul(n,r,t)}function Qp(e){return e.toLowerCase()}class Ft{constructor(t,n){this.attribute=n,this.property=t}}Ft.prototype.attribute="";Ft.prototype.booleanish=!1;Ft.prototype.boolean=!1;Ft.prototype.commaOrSpaceSeparated=!1;Ft.prototype.commaSeparated=!1;Ft.prototype.defined=!1;Ft.prototype.mustUseProperty=!1;Ft.prototype.number=!1;Ft.prototype.overloadedBoolean=!1;Ft.prototype.property="";Ft.prototype.spaceSeparated=!1;Ft.prototype.space=void 0;let LU=0;const ee=ns(),ze=ns(),qp=ns(),K=ns(),ye=ns(),Wi=ns(),Ut=ns();function ns(){return 2**++LU}const Zp=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:ze,commaOrSpaceSeparated:Ut,commaSeparated:Wi,number:K,overloadedBoolean:qp,spaceSeparated:ye},Symbol.toStringTag,{value:"Module"})),Vh=Object.keys(Zp);class wy extends Ft{constructor(t,n,r,i){let s=-1;if(super(t,n),d1(this,"space",i),typeof r=="number")for(;++s<Vh.length;){const o=Vh[s];d1(this,Vh[s],(r&Zp[o])===Zp[o])}}}wy.prototype.defined=!0;function d1(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 wy(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Qp(r)]=r,n[Qp(s.attribute)]=r}return new ul(t,n,e.space)}const UT=xo({properties:{ariaActiveDescendant:null,ariaAtomic:ze,ariaAutoComplete:null,ariaBusy:ze,ariaChecked:ze,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:ye,ariaCurrent:null,ariaDescribedBy:ye,ariaDetails:null,ariaDisabled:ze,ariaDropEffect:ye,ariaErrorMessage:null,ariaExpanded:ze,ariaFlowTo:ye,ariaGrabbed:ze,ariaHasPopup:null,ariaHidden:ze,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ye,ariaLevel:K,ariaLive:null,ariaModal:ze,ariaMultiLine:ze,ariaMultiSelectable:ze,ariaOrientation:null,ariaOwns:ye,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:ze,ariaReadOnly:ze,ariaRelevant:null,ariaRequired:ze,ariaRoleDescription:ye,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:ze,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function WT(e,t){return t in e?e[t]:t}function HT(e,t){return WT(e,t.toLowerCase())}const MU=xo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wi,acceptCharset:ye,accessKey:ye,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alpha:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:ye,autoFocus:ee,autoPlay:ee,blocking:ye,capture:null,charSet:null,checked:ee,cite:null,className:ye,closedBy:null,colorSpace:null,cols:K,colSpan:K,command:null,commandFor:null,content:null,contentEditable:ze,controls:ee,controlsList:ye,coords:K|Wi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:qp,draggable:ze,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:ye,height:K,hidden:qp,high:K,href:null,hrefLang:null,htmlFor:ye,httpEquiv:ye,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:ye,itemRef:ye,itemScope:ee,itemType:ye,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:K,pattern:null,ping:ye,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:ye,required:ee,reversed:ee,rows:K,rowSpan:K,sandbox:ye,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootCustomElementRegistry:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shadowRootSerializable:ee,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:ze,src:null,srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:ze,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ye,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:ze,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ee,disablePictureInPicture:ee,disableRemotePlayback:ee,exportParts:Wi,part:ye,prefix:null,property:null,results:K,security:null,unselectable:null},space:"html",transform:HT}),IU=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:Ut,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:ye,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:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,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:Wi,g2:Wi,glyphName:Wi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:Ut,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,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:K,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:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ye,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ut,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ut,rev:Ut,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ut,requiredFeatures:Ut,requiredFonts:Ut,requiredFormats:Ut,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:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:Ut,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ut,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ut,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:WT}),KT=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()}}),GT=xo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:HT}),YT=xo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),DU={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"},NU=/[A-Z]/g,h1=/-[a-z]/g,BU=/^data[-\w.:]+$/i;function FU(e,t){const n=Qp(t);let r=t,i=Ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&BU.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(h1,$U);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!h1.test(s)){let o=s.replace(NU,VU);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=wy}return new i(r,t)}function VU(e){return"-"+e.toLowerCase()}function $U(e){return e.charAt(1).toUpperCase()}const zU=OT([UT,MU,KT,GT,YT],"html"),Sy=OT([UT,IU,KT,GT,YT],"svg");function OU(e){return e.join(" ").trim()}var by={},f1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,UU=/\n/g,WU=/^\s*/,HU=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,KU=/^:\s*/,GU=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,YU=/^[;\s]*/,XU=/^\s+|\s+$/g,QU=`
81
+ `,p1="/",m1="*",Ci="",qU="comment",ZU="declaration";function JU(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(m){var y=m.match(UU);y&&(n+=y.length);var x=m.lastIndexOf(QU);r=~x?m.length-x:r+m.length}function s(){var m={line:n,column:r};return function(y){return y.position=new o(m),u(),y}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function l(m){var y=m.exec(e);if(y){var x=y[0];return i(x),e=e.slice(x.length),y}}function u(){l(WU)}function c(m){var y;for(m=m||[];y=d();)y!==!1&&m.push(y);return m}function d(){var m=s();if(!(p1!=e.charAt(0)||m1!=e.charAt(1))){for(var y=2;Ci!=e.charAt(y)&&(m1!=e.charAt(y)||p1!=e.charAt(y+1));)++y;if(y+=2,Ci===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,m({type:qU,comment:x})}}function h(){var m=s(),y=l(HU);if(y){if(d(),!l(KU))return a("property missing ':'");var x=l(GU),g=m({type:ZU,property:g1(y[0].replace(f1,Ci)),value:x?g1(x[0].replace(f1,Ci)):Ci});return l(YU),g}}function f(){var m=[];c(m);for(var y;y=h();)y!==!1&&(m.push(y),c(m));return m}return u(),f()}function g1(e){return e?e.replace(XU,Ci):Ci}var eW=JU,tW=Du&&Du.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(by,"__esModule",{value:!0});by.default=rW;const nW=tW(eW);function rW(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,nW.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 wd={};Object.defineProperty(wd,"__esModule",{value:!0});wd.camelCase=void 0;var iW=/^--[a-zA-Z0-9_-]+$/,sW=/-([a-z])/g,oW=/^[^-]+$/,aW=/^-(webkit|moz|ms|o|khtml)-/,lW=/^-(ms)-/,uW=function(e){return!e||oW.test(e)||iW.test(e)},cW=function(e,t){return t.toUpperCase()},y1=function(e,t){return"".concat(t,"-")},dW=function(e,t){return t===void 0&&(t={}),uW(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(lW,y1):e=e.replace(aW,y1),e.replace(sW,cW))};wd.camelCase=dW;var hW=Du&&Du.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fW=hW(by),pW=wd;function Jp(e,t){var n={};return!e||typeof e!="string"||(0,fW.default)(e,function(r,i){r&&i&&(n[(0,pW.camelCase)(r,t)]=i)}),n}Jp.default=Jp;var mW=Jp;const gW=Vc(mW),XT=QT("end"),ky=QT("start");function QT(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 yW(e){const t=ky(e),n=XT(e);if(t&&n)return{start:t,end:n}}function fa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?v1(e.position):"start"in e||"end"in e?v1(e):"line"in e||"column"in e?em(e):""}function em(e){return x1(e&&e.line)+":"+x1(e&&e.column)}function v1(e){return em(e&&e.start)+"-"+em(e&&e.end)}function x1(e){return e&&typeof e=="number"?e:1}class mt 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=fa(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}}mt.prototype.file="";mt.prototype.name="";mt.prototype.reason="";mt.prototype.message="";mt.prototype.stack="";mt.prototype.column=void 0;mt.prototype.line=void 0;mt.prototype.ancestors=void 0;mt.prototype.cause=void 0;mt.prototype.fatal=void 0;mt.prototype.place=void 0;mt.prototype.ruleId=void 0;mt.prototype.source=void 0;const _y={}.hasOwnProperty,vW=new Map,xW=/[A-Z]/g,wW=new Set(["table","tbody","thead","tfoot","tr"]),SW=new Set(["td","th"]),qT="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bW(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=AW(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=jW(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"?Sy:zU,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=ZT(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function ZT(e,t,n){if(t.type==="element")return kW(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _W(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return PW(e,t,n);if(t.type==="mdxjsEsm")return CW(e,t);if(t.type==="root")return TW(e,t,n);if(t.type==="text")return EW(e,t)}function kW(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Sy,e.schema=i),e.ancestors.push(t);const s=eE(e,t.tagName,!1),o=RW(e,t);let a=Py(e,t);return wW.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!RU(l):!0})),JT(e,o,s,t),Cy(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function _W(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)}Ha(e,t.position)}function CW(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ha(e,t.position)}function PW(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Sy,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:eE(e,t.name,!0),o=LW(e,t),a=Py(e,t);return JT(e,o,s,t),Cy(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function TW(e,t,n){const r={};return Cy(r,Py(e,t)),e.create(t,e.Fragment,r,n)}function EW(e,t){return t.value}function JT(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Cy(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function jW(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 AW(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=ky(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 RW(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&_y.call(t.properties,i)){const s=MW(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&SW.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 LW(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 Ha(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 Ha(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Py(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:vW;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=ZT(e,s,o);a!==void 0&&n.push(a)}return n}function MW(e,t,n){const r=FU(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?PU(n):OU(n)),r.property==="style"){let i=typeof n=="object"?n:IW(e,String(n));return e.stylePropertyNameCase==="css"&&(i=DW(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?DU[r.property]||r.property:r.attribute,n]}}function IW(e,t){try{return gW(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new mt("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=qT+"#cannot-parse-style-attribute",i}}function eE(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=u1(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=u1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return _y.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ha(e)}function Ha(e,t){const n=new mt("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=qT+"#cannot-handle-mdx-estrees-without-createevaluater",n}function DW(e){const t={};let n;for(n in e)_y.call(e,n)&&(t[NW(n)]=e[n]);return t}function NW(e){let t=e.replace(xW,BW);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function BW(e){return"-"+e.toLowerCase()}const $h={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"]},FW={};function VW(e,t){const n=FW,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return tE(e,r,i)}function tE(e,t,n){if($W(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 w1(e.children,t,n)}return Array.isArray(e)?w1(e,t,n):""}function w1(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=tE(e[i],t,n);return r.join("")}function $W(e){return!!(e&&typeof e=="object")}const S1=document.createElement("i");function Ty(e){const t="&"+e+";";S1.innerHTML=t;const n=S1.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 an(e,t){return e.length>0?(Jn(e,e.length,0,t),e):t}const b1={}.hasOwnProperty;function zW(e){const t={};let n=-1;for(;++n<e.length;)OW(t,e[n]);return t}function OW(e,t){let n;for(n in t){const i=(b1.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){b1.call(i,o)||(i[o]=[]);const a=s[o];UW(i[o],Array.isArray(a)?a:a?[a]:[])}}}function UW(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 nE(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]/),Yt=mi(/[\dA-Za-z]/),WW=mi(/[#-'*+\--9=?A-Z^-~]/);function tm(e){return e!==null&&(e<32||e===127)}const nm=mi(/\d/),HW=mi(/[\dA-Fa-f]/),KW=mi(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Nt(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const GW=mi(new RegExp("\\p{P}|\\p{S}","u")),YW=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&&Yt(e.charCodeAt(n+1))&&Yt(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 ke(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return he(l)?(e.enter(n),a(l)):t(l)}function a(l){return he(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const XW={tokenize:QW};function QW(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"),ke(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 J(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const qW={tokenize:ZW},k1={tokenize:JW};function ZW(e){const t=this,n=[];let r=0,i,s,o;return a;function a(w){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const S=t.events.length;let P=S,T;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){T=t.events[P][1].end;break}g(r);let E=S;for(;E<t.events.length;)t.events[E][1].end={...T},E++;return Jn(t.events,P+1,0,t.events.slice(S)),t.events.length=E,u(w)}return a(w)}function u(w){if(r===n.length){if(!i)return h(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(k1,c,d)(w)}function c(w){return i&&v(),g(r),h(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(w)}function h(w){return t.containerState={},e.attempt(k1,f,m)(w)}function f(w){return r++,n.push([t.currentConstruct,t.containerState]),h(w)}function m(w){if(w===null){i&&v(),g(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),g(0),e.consume(w);return}return J(w)?(e.consume(w),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(w),y)}function x(w,S){const P=t.sliceStream(w);if(S&&P.push(null),w.previous=s,s&&(s.next=w),s=w,i.defineSkip(w.start),i.write(P),t.parser.lazy[w.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<o&&(!i.events[T][1].end||i.events[T][1].end.offset>o))return;const E=t.events.length;let _=E,R,k;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(R){k=t.events[_][1].end;break}R=!0}for(g(r),T=E;T<t.events.length;)t.events[T][1].end={...k},T++;Jn(t.events,_+1,0,t.events.slice(E)),t.events.length=T}}function g(w){let S=n.length;for(;S-- >w;){const P=n[S];t.containerState=P[1],P[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 JW(e,t,n){return ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _1(e){if(e===null||Nt(e)||YW(e))return 1;if(GW(e))return 2}function Ey(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 rm={name:"attention",resolveAll:e8,tokenize:t8};function e8(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};C1(d,-l),C1(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=an(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=an(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),u=an(u,Ey(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=an(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=an(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 t8(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_1(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=_1(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 C1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const n8={name:"autolink",tokenize:r8};function r8(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||Yt(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||Yt(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||tm(f)?n(f):(e.consume(f),l)}function u(f){return f===64?(e.consume(f),c):WW(f)?(e.consume(f),u):n(f)}function c(f){return Yt(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||Yt(f))&&r++<63){const m=f===45?h:d;return e.consume(f),m}return n(f)}}const Sd={partial:!0,tokenize:i8};function i8(e,t,n){return r;function r(s){return he(s)?ke(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||J(s)?t(s):n(s)}}const rE={continuation:{tokenize:o8},exit:a8,name:"blockQuote",tokenize:s8};function s8(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 he(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function o8(e,t,n){const r=this;return i;function i(o){return he(o)?ke(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(rE,t,n)(o)}}function a8(e){e.exit("blockQuote")}const iE={name:"characterEscape",tokenize:l8};function l8(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 KW(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const sE={name:"characterReference",tokenize:u8};function u8(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=Yt,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=HW,c):(e.enter("characterReferenceValue"),s=7,o=nm,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Yt&&!Ty(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 P1={partial:!0,tokenize:d8},T1={concrete:!0,name:"codeFenced",tokenize:c8};function c8(e,t,n){const r=this,i={partial:!0,tokenize:P};let s=0,o=0,a;return l;function l(T){return u(T)}function u(T){const E=r.events[r.events.length-1];return s=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,a=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(T)}function c(T){return T===a?(o++,e.consume(T),c):o<3?n(T):(e.exit("codeFencedFenceSequence"),he(T)?ke(e,d,"whitespace")(T):d(T))}function d(T){return T===null||J(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(P1,y,S)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(T))}function h(T){return T===null||J(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(T)):he(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ke(e,f,"whitespace")(T)):T===96&&T===a?n(T):(e.consume(T),h)}function f(T){return T===null||J(T)?d(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===null||J(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(T)):T===96&&T===a?n(T):(e.consume(T),m)}function y(T){return e.attempt(i,S,x)(T)}function x(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),g}function g(T){return s>0&&he(T)?ke(e,v,"linePrefix",s+1)(T):v(T)}function v(T){return T===null||J(T)?e.check(P1,y,S)(T):(e.enter("codeFlowValue"),w(T))}function w(T){return T===null||J(T)?(e.exit("codeFlowValue"),v(T)):(e.consume(T),w)}function S(T){return e.exit("codeFenced"),t(T)}function P(T,E,_){let R=0;return k;function k(F){return T.enter("lineEnding"),T.consume(F),T.exit("lineEnding"),L}function L(F){return T.enter("codeFencedFence"),he(F)?ke(T,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):I(F)}function I(F){return F===a?(T.enter("codeFencedFenceSequence"),V(F)):_(F)}function V(F){return F===a?(R++,T.consume(F),V):R>=o?(T.exit("codeFencedFenceSequence"),he(F)?ke(T,B,"whitespace")(F):B(F)):_(F)}function B(F){return F===null||J(F)?(T.exit("codeFencedFence"),E(F)):_(F)}}}function d8(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 zh={name:"codeIndented",tokenize:f8},h8={partial:!0,tokenize:p8};function f8(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ke(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):J(u)?e.attempt(h8,o,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||J(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function p8(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):J(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ke(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):J(o)?i(o):n(o)}}const m8={name:"codeText",previous:y8,resolve:g8,tokenize:v8};function g8(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 y8(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function v8(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)):J(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||J(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 x8{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&&zo(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),zo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zo(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);zo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zo(this.left,n.reverse())}}}function zo(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 oE(e){const t={};let n=-1,r,i,s,o,a,l,u;const c=new x8(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,w8(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 w8(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,m=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 g=a.slice(x[h],x[h+1]),v=s.pop();l.push([v,v+g.length-1]),e.splice(v,2,g)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const S8={resolve:k8,tokenize:_8},b8={partial:!0,tokenize:C8};function k8(e){return oE(e),e}function _8(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):J(a)?e.check(b8,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 C8(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ke(e,s,"linePrefix")}function s(o){if(o===null||J(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 aE(e,t,n,r,i,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),h):g===null||g===32||g===41||tm(g)?n(g):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(g))}function h(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(a),h(g)):g===null||g===60||J(g)?n(g):(e.consume(g),g===92?m:f)}function m(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function y(g){return!c&&(g===null||g===41||Nt(g))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(g)):c<u&&g===40?(e.consume(g),c++,y):g===41?(e.consume(g),c--,y):g===null||g===32||g===40||tm(g)?n(g):(e.consume(g),g===92?x:y)}function x(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function lE(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):J(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||J(f)||a++>999?(e.exit("chunkString"),c(f)):(e.consume(f),l||(l=!he(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function uE(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):J(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ke(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===o||h===null||J(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 pa(e,t){let n;return r;function r(i){return J(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):he(i)?ke(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const P8={name:"definition",tokenize:E8},T8={partial:!0,tokenize:j8};function E8(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),o(f)}function o(f){return lE.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 Nt(f)?pa(e,u)(f):u(f)}function u(f){return aE(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(T8,d,d)(f)}function d(f){return he(f)?ke(e,h,"whitespace")(f):h(f)}function h(f){return f===null||J(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function j8(e,t,n){return r;function r(a){return Nt(a)?pa(e,i)(a):n(a)}function i(a){return uE(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return he(a)?ke(e,o,"whitespace")(a):o(a)}function o(a){return a===null||J(a)?t(a):n(a)}}const A8={name:"hardBreakEscape",tokenize:R8};function R8(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return J(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const L8={name:"headingAtx",resolve:M8,tokenize:I8};function M8(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 I8(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||Nt(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||J(c)?(e.exit("atxHeading"),t(c)):he(c)?ke(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||Nt(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const D8=["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"],E1=["pre","script","style","textarea"],N8={concrete:!0,name:"htmlFlow",resolveTo:V8,tokenize:$8},B8={partial:!0,tokenize:O8},F8={partial:!0,tokenize:z8};function V8(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 $8(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:b):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,m):Hn(A)?(e.consume(A),i=4,r.interrupt?t:b):n(A)}function f(A){return A===45?(e.consume(A),r.interrupt?t:b):n(A)}function m(A){const le="CDATA[";return A===le.charCodeAt(a++)?(e.consume(A),a===le.length?r.interrupt?t:I:m):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||Nt(A)){const le=A===47,fe=o.toLowerCase();return!le&&!s&&E1.includes(fe)?(i=1,r.interrupt?t(A):I(A)):D8.includes(o.toLowerCase())?(i=6,le?(e.consume(A),g):r.interrupt?t(A):I(A)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):s?v(A):w(A))}return A===45||Yt(A)?(e.consume(A),o+=String.fromCharCode(A),x):n(A)}function g(A){return A===62?(e.consume(A),r.interrupt?t:I):n(A)}function v(A){return he(A)?(e.consume(A),v):k(A)}function w(A){return A===47?(e.consume(A),k):A===58||A===95||Hn(A)?(e.consume(A),S):he(A)?(e.consume(A),w):k(A)}function S(A){return A===45||A===46||A===58||A===95||Yt(A)?(e.consume(A),S):P(A)}function P(A){return A===61?(e.consume(A),T):he(A)?(e.consume(A),P):w(A)}function T(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),l=A,E):he(A)?(e.consume(A),T):_(A)}function E(A){return A===l?(e.consume(A),l=null,R):A===null||J(A)?n(A):(e.consume(A),E)}function _(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Nt(A)?P(A):(e.consume(A),_)}function R(A){return A===47||A===62||he(A)?w(A):n(A)}function k(A){return A===62?(e.consume(A),L):n(A)}function L(A){return A===null||J(A)?I(A):he(A)?(e.consume(A),L):n(A)}function I(A){return A===45&&i===2?(e.consume(A),$):A===60&&i===1?(e.consume(A),W):A===62&&i===4?(e.consume(A),U):A===63&&i===3?(e.consume(A),b):A===93&&i===5?(e.consume(A),z):J(A)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(B8,Z,V)(A)):A===null||J(A)?(e.exit("htmlFlowData"),V(A)):(e.consume(A),I)}function V(A){return e.check(F8,B,Z)(A)}function B(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),F}function F(A){return A===null||J(A)?V(A):(e.enter("htmlFlowData"),I(A))}function $(A){return A===45?(e.consume(A),b):I(A)}function W(A){return A===47?(e.consume(A),o="",N):I(A)}function N(A){if(A===62){const le=o.toLowerCase();return E1.includes(le)?(e.consume(A),U):I(A)}return Hn(A)&&o.length<8?(e.consume(A),o+=String.fromCharCode(A),N):I(A)}function z(A){return A===93?(e.consume(A),b):I(A)}function b(A){return A===62?(e.consume(A),U):A===45&&i===2?(e.consume(A),b):I(A)}function U(A){return A===null||J(A)?(e.exit("htmlFlowData"),Z(A)):(e.consume(A),U)}function Z(A){return e.exit("htmlFlow"),t(A)}}function z8(e,t,n){const r=this;return i;function i(o){return J(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 O8(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Sd,t,n)}}const U8={name:"htmlText",tokenize:W8};function W8(e,t,n){const r=this;let i,s,o;return a;function a(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),l}function l(b){return b===33?(e.consume(b),u):b===47?(e.consume(b),P):b===63?(e.consume(b),w):Hn(b)?(e.consume(b),_):n(b)}function u(b){return b===45?(e.consume(b),c):b===91?(e.consume(b),s=0,m):Hn(b)?(e.consume(b),v):n(b)}function c(b){return b===45?(e.consume(b),f):n(b)}function d(b){return b===null?n(b):b===45?(e.consume(b),h):J(b)?(o=d,W(b)):(e.consume(b),d)}function h(b){return b===45?(e.consume(b),f):d(b)}function f(b){return b===62?$(b):b===45?h(b):d(b)}function m(b){const U="CDATA[";return b===U.charCodeAt(s++)?(e.consume(b),s===U.length?y:m):n(b)}function y(b){return b===null?n(b):b===93?(e.consume(b),x):J(b)?(o=y,W(b)):(e.consume(b),y)}function x(b){return b===93?(e.consume(b),g):y(b)}function g(b){return b===62?$(b):b===93?(e.consume(b),g):y(b)}function v(b){return b===null||b===62?$(b):J(b)?(o=v,W(b)):(e.consume(b),v)}function w(b){return b===null?n(b):b===63?(e.consume(b),S):J(b)?(o=w,W(b)):(e.consume(b),w)}function S(b){return b===62?$(b):w(b)}function P(b){return Hn(b)?(e.consume(b),T):n(b)}function T(b){return b===45||Yt(b)?(e.consume(b),T):E(b)}function E(b){return J(b)?(o=E,W(b)):he(b)?(e.consume(b),E):$(b)}function _(b){return b===45||Yt(b)?(e.consume(b),_):b===47||b===62||Nt(b)?R(b):n(b)}function R(b){return b===47?(e.consume(b),$):b===58||b===95||Hn(b)?(e.consume(b),k):J(b)?(o=R,W(b)):he(b)?(e.consume(b),R):$(b)}function k(b){return b===45||b===46||b===58||b===95||Yt(b)?(e.consume(b),k):L(b)}function L(b){return b===61?(e.consume(b),I):J(b)?(o=L,W(b)):he(b)?(e.consume(b),L):R(b)}function I(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,V):J(b)?(o=I,W(b)):he(b)?(e.consume(b),I):(e.consume(b),B)}function V(b){return b===i?(e.consume(b),i=void 0,F):b===null?n(b):J(b)?(o=V,W(b)):(e.consume(b),V)}function B(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||Nt(b)?R(b):(e.consume(b),B)}function F(b){return b===47||b===62||Nt(b)?R(b):n(b)}function $(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function W(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),N}function N(b){return he(b)?ke(e,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):z(b)}function z(b){return e.enter("htmlTextData"),o(b)}}const jy={name:"labelEnd",resolveAll:Y8,resolveTo:X8,tokenize:Q8},H8={tokenize:q8},K8={tokenize:Z8},G8={tokenize:J8};function Y8(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 X8(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=an(a,e.slice(s+1,s+r+3)),a=an(a,[["enter",c,t]]),a=an(a,Ey(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=an(a,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),a=an(a,e.slice(o+1)),a=an(a,[["exit",l,t]]),Jn(e,s,e.length,a),e}function Q8(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(H8,c,o?c:d)(h):h===91?e.attempt(K8,c,o?u:d)(h):o?c(h):d(h)}function u(h){return e.attempt(G8,c,d)(h)}function c(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function q8(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 Nt(d)?pa(e,s)(d):s(d)}function s(d){return d===41?c(d):aE(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Nt(d)?pa(e,l)(d):c(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?uE(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Nt(d)?pa(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 Z8(e,t,n){const r=this;return i;function i(a){return lE.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 J8(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 eH={name:"labelStartImage",resolveAll:jy.resolveAll,tokenize:tH};function tH(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 nH={name:"labelStartLink",resolveAll:jy.resolveAll,tokenize:rH};function rH(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 Oh={name:"lineEnding",tokenize:iH};function iH(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ke(e,t,"linePrefix")}}const Lu={name:"thematicBreak",tokenize:sH};function sH(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||J(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),he(u)?ke(e,a,"whitespace")(u):a(u))}}const Tt={continuation:{tokenize:uH},exit:dH,name:"list",tokenize:lH},oH={partial:!0,tokenize:hH},aH={partial:!0,tokenize:cH};function lH(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 m=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:nm(f)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Lu,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 nm(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(Sd,r.interrupt?n:c,e.attempt(oH,h,d))}function c(f){return r.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return he(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 uH(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Sd,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ke(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!he(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(aH,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ke(e,e.attempt(Tt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function cH(e,t,n){const r=this;return ke(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 dH(e){e.exit(this.containerState.type)}function hH(e,t,n){const r=this;return ke(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!he(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const j1={name:"setextUnderline",resolveTo:fH,tokenize:pH};function fH(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 pH(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"),he(u)?ke(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||J(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const mH={tokenize:gH};function gH(e){const t=this,n=e.attempt(Sd,r,e.attempt(this.parser.constructs.flowInitial,i,ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(S8,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 yH={resolveAll:dE()},vH=cE("string"),xH=cE("text");function cE(e){return{resolveAll:dE(e==="text"?wH: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 dE(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 wH(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 SH={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:rE},bH={91:P8},kH={[-2]:zh,[-1]:zh,32:zh},_H={35:L8,42:Lu,45:[j1,Lu],60:N8,61:j1,95:Lu,96:T1,126:T1},CH={38:sE,92:iE},PH={[-5]:Oh,[-4]:Oh,[-3]:Oh,33:eH,38:sE,42:rm,60:[n8,U8],91:nH,92:[A8,iE],93:jy,95:rm,96:m8},TH={null:[rm,yH]},EH={null:[42,95]},jH={null:[]},AH=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:EH,contentInitial:bH,disable:jH,document:SH,flow:_H,flowInitial:kH,insideSpan:TH,string:CH,text:PH},Symbol.toStringTag,{value:"Module"}));function RH(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:E(P),check:E(T),consume:v,enter:w,exit:S,interrupt:E(T,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:m,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=an(o,L),x(),o[o.length-1]!==null?[]:(_(t,0),u.events=Ey(s,u.events,u),u.events)}function h(L,I){return MH(f(L),I)}function f(L){return LH(o,L)}function m(){const{_bufferIndex:L,_index:I,line:V,column:B,offset:F}=r;return{_bufferIndex:L,_index:I,line:V,column:B,offset:F}}function y(L){i[L.line]=L.column,k()}function x(){let L;for(;r._index<o.length;){const I=o[r._index];if(typeof I=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<I.length;)g(I.charCodeAt(r._bufferIndex));else g(I)}}function g(L){c=c(L)}function v(L){J(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,k()):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,I){const V=I||{};return V.type=L,V.start=m(),u.events.push(["enter",V,u]),a.push(V),V}function S(L){const I=a.pop();return I.end=m(),u.events.push(["exit",I,u]),I}function P(L,I){_(L,I.from)}function T(L,I){I.restore()}function E(L,I){return V;function V(B,F,$){let W,N,z,b;return Array.isArray(B)?Z(B):"tokenize"in B?Z([B]):U(B);function U(de){return Ze;function Ze(Fe){const gt=Fe!==null&&de[Fe],Vt=Fe!==null&&de.null,$t=[...Array.isArray(gt)?gt:gt?[gt]:[],...Array.isArray(Vt)?Vt:Vt?[Vt]:[]];return Z($t)(Fe)}}function Z(de){return W=de,N=0,de.length===0?$:A(de[N])}function A(de){return Ze;function Ze(Fe){return b=R(),z=de,de.partial||(u.currentConstruct=de),de.name&&u.parser.constructs.disable.null.includes(de.name)?fe():de.tokenize.call(I?Object.assign(Object.create(u),I):u,l,le,fe)(Fe)}}function le(de){return L(z,b),F}function fe(de){return b.restore(),++N<W.length?A(W[N]):$}}}function _(L,I){L.resolveAll&&!s.includes(L)&&s.push(L),L.resolve&&Jn(u.events,I,u.events.length-I,L.resolve(u.events.slice(I),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function R(){const L=m(),I=u.previous,V=u.currentConstruct,B=u.events.length,F=Array.from(a);return{from:B,restore:$};function $(){r=L,u.previous=I,u.currentConstruct=V,u.events.length=B,a=F,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function LH(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 MH(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 IH(e){const r={constructs:zW([AH,...(e||{}).extensions||[]]),content:i(XW),defined:[],document:i(qW),flow:i(mH),lazy:{},string:i(vH),text:i(xH)};return r;function i(s){return o;function o(a){return RH(r,s,a)}}}function DH(e){for(;!oE(e););return e}const A1=/[\0\t\n\r]/g;function NH(){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(A1.lastIndex=d,u=A1.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 BH=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function FH(e){return e.replace(BH,VH)}function VH(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return nE(n.slice(s?2:1),s?16:10)}return Ty(n)||e}const hE={}.hasOwnProperty;function $H(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),zH(n)(DH(IH(n).document().write(NH()(e,t,!0))))}function zH(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Dn),autolinkProtocol:R,autolinkEmail:R,atxHeading:s(Te),blockQuote:s(Vt),characterEscape:R,characterReference:R,codeFenced:s($t),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s($t,o),codeText:s(yn,o),codeTextData:R,data:R,codeFlowValue:R,definition:s(xr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(Je),hardBreakEscape:s(er),hardBreakTrailing:s(er),htmlFlow:s(In,o),htmlFlowData:R,htmlText:s(In,o),htmlTextData:R,image:s(Pt),label:o,link:s(Dn),listItem:s(So),listItemValue:h,listOrdered:s(tn,d),listUnordered:s(tn),paragraph:s(rs),reference:A,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Te),strong:s(bo),thematicBreak:s(pe)},exit:{atxHeading:l(),atxHeadingSequence:P,autolink:l(),autolinkEmail:gt,autolinkProtocol:Fe,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:de,characterReference:Ze,codeFenced:l(x),codeFencedFence:y,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:k,codeIndented:l(g),codeText:l(F),codeTextData:k,data:k,definition:l(),definitionDestinationString:S,definitionLabelString:v,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(I),hardBreakTrailing:l(I),htmlFlow:l(V),htmlFlowData:k,htmlText:l(B),htmlTextData:k,image:l(W),label:z,labelText:N,lineEnding:L,link:l($),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:le,resourceDestinationString:b,resourceTitleString:U,resource:Z,setextHeading:l(_),setextHeadingLineSequence:E,setextHeadingText:T,strong:l(),thematicBreak:l()}};fE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(j){let O={type:"root",children:[]};const q={stack:[O],tokenStack:[],config:t,enter:a,exit:u,buffer:o,resume:c,data:n},re=[];let ae=-1;for(;++ae<j.length;)if(j[ae][1].type==="listOrdered"||j[ae][1].type==="listUnordered")if(j[ae][0]==="enter")re.push(ae);else{const He=re.pop();ae=i(j,He,ae)}for(ae=-1;++ae<j.length;){const He=t[j[ae][0]];hE.call(He,j[ae][1].type)&&He[j[ae][1].type].call(Object.assign({sliceSerialize:j[ae][2].sliceSerialize},q),j[ae][1])}if(q.tokenStack.length>0){const He=q.tokenStack[q.tokenStack.length-1];(He[1]||R1).call(q,void 0,He[0])}for(O.position={start:Ar(j.length>0?j[0][1].start:{line:1,column:1,offset:0}),end:Ar(j.length>0?j[j.length-2][1].end:{line:1,column:1,offset:0})},ae=-1;++ae<t.transforms.length;)O=t.transforms[ae](O)||O;return O}function i(j,O,q){let re=O-1,ae=-1,He=!1,et,yt,gi,wr;for(;++re<=q;){const ut=j[re];switch(ut[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ut[0]==="enter"?ae++:ae--,wr=void 0;break}case"lineEndingBlank":{ut[0]==="enter"&&(et&&!wr&&!ae&&!gi&&(gi=re),wr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:wr=void 0}if(!ae&&ut[0]==="enter"&&ut[1].type==="listItemPrefix"||ae===-1&&ut[0]==="exit"&&(ut[1].type==="listUnordered"||ut[1].type==="listOrdered")){if(et){let tr=re;for(yt=void 0;tr--;){const nn=j[tr];if(nn[1].type==="lineEnding"||nn[1].type==="lineEndingBlank"){if(nn[0]==="exit")continue;yt&&(j[yt][1].type="lineEndingBlank",He=!0),nn[1].type="lineEnding",yt=tr}else if(!(nn[1].type==="linePrefix"||nn[1].type==="blockQuotePrefix"||nn[1].type==="blockQuotePrefixWhitespace"||nn[1].type==="blockQuoteMarker"||nn[1].type==="listItemIndent"))break}gi&&(!yt||gi<yt)&&(et._spread=!0),et.end=Object.assign({},yt?j[yt][1].start:ut[1].end),j.splice(yt||re,0,["exit",et,ut[2]]),re++,q++}if(ut[1].type==="listItemPrefix"){const tr={type:"listItem",_spread:!1,start:Object.assign({},ut[1].start),end:void 0};et=tr,j.splice(re,0,["enter",tr,ut[2]]),re++,q++,gi=void 0,wr=!0}}}return j[O][1]._spread=He,q}function s(j,O){return q;function q(re){a.call(this,j(re),re),O&&O.call(this,re)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(j,O,q){this.stack[this.stack.length-1].children.push(j),this.stack.push(j),this.tokenStack.push([O,q||void 0]),j.position={start:Ar(O.start),end:void 0}}function l(j){return O;function O(q){j&&j.call(this,q),u.call(this,q)}}function u(j,O){const q=this.stack.pop(),re=this.tokenStack.pop();if(re)re[0].type!==j.type&&(O?O.call(this,j,re[0]):(re[1]||R1).call(this,j,re[0]));else throw new Error("Cannot close `"+j.type+"` ("+fa({start:j.start,end:j.end})+"): it’s not open");q.position.end=Ar(j.end)}function c(){return VW(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(j){if(this.data.expectingFirstListItemValue){const O=this.stack[this.stack.length-2];O.start=Number.parseInt(this.sliceSerialize(j),10),this.data.expectingFirstListItemValue=void 0}}function f(){const j=this.resume(),O=this.stack[this.stack.length-1];O.lang=j}function m(){const j=this.resume(),O=this.stack[this.stack.length-1];O.meta=j}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const j=this.resume(),O=this.stack[this.stack.length-1];O.value=j.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const j=this.resume(),O=this.stack[this.stack.length-1];O.value=j.replace(/(\r?\n|\r)$/g,"")}function v(j){const O=this.resume(),q=this.stack[this.stack.length-1];q.label=O,q.identifier=Hs(this.sliceSerialize(j)).toLowerCase()}function w(){const j=this.resume(),O=this.stack[this.stack.length-1];O.title=j}function S(){const j=this.resume(),O=this.stack[this.stack.length-1];O.url=j}function P(j){const O=this.stack[this.stack.length-1];if(!O.depth){const q=this.sliceSerialize(j).length;O.depth=q}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function E(j){const O=this.stack[this.stack.length-1];O.depth=this.sliceSerialize(j).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function R(j){const q=this.stack[this.stack.length-1].children;let re=q[q.length-1];(!re||re.type!=="text")&&(re=is(),re.position={start:Ar(j.start),end:void 0},q.push(re)),this.stack.push(re)}function k(j){const O=this.stack.pop();O.value+=this.sliceSerialize(j),O.position.end=Ar(j.end)}function L(j){const O=this.stack[this.stack.length-1];if(this.data.atHardBreak){const q=O.children[O.children.length-1];q.position.end=Ar(j.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(O.type)&&(R.call(this,j),k.call(this,j))}function I(){this.data.atHardBreak=!0}function V(){const j=this.resume(),O=this.stack[this.stack.length-1];O.value=j}function B(){const j=this.resume(),O=this.stack[this.stack.length-1];O.value=j}function F(){const j=this.resume(),O=this.stack[this.stack.length-1];O.value=j}function $(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const O=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=O,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function W(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const O=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=O,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function N(j){const O=this.sliceSerialize(j),q=this.stack[this.stack.length-2];q.label=FH(O),q.identifier=Hs(O).toLowerCase()}function z(){const j=this.stack[this.stack.length-1],O=this.resume(),q=this.stack[this.stack.length-1];if(this.data.inReference=!0,q.type==="link"){const re=j.children;q.children=re}else q.alt=O}function b(){const j=this.resume(),O=this.stack[this.stack.length-1];O.url=j}function U(){const j=this.resume(),O=this.stack[this.stack.length-1];O.title=j}function Z(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function le(j){const O=this.resume(),q=this.stack[this.stack.length-1];q.label=O,q.identifier=Hs(this.sliceSerialize(j)).toLowerCase(),this.data.referenceType="full"}function fe(j){this.data.characterReferenceType=j.type}function de(j){const O=this.sliceSerialize(j),q=this.data.characterReferenceType;let re;q?(re=nE(O,q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):re=Ty(O);const ae=this.stack[this.stack.length-1];ae.value+=re}function Ze(j){const O=this.stack.pop();O.position.end=Ar(j.end)}function Fe(j){k.call(this,j);const O=this.stack[this.stack.length-1];O.url=this.sliceSerialize(j)}function gt(j){k.call(this,j);const O=this.stack[this.stack.length-1];O.url="mailto:"+this.sliceSerialize(j)}function Vt(){return{type:"blockquote",children:[]}}function $t(){return{type:"code",lang:null,meta:null,value:""}}function yn(){return{type:"inlineCode",value:""}}function xr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Je(){return{type:"emphasis",children:[]}}function Te(){return{type:"heading",depth:0,children:[]}}function er(){return{type:"break"}}function In(){return{type:"html",value:""}}function Pt(){return{type:"image",title:null,url:"",alt:null}}function Dn(){return{type:"link",title:null,url:"",children:[]}}function tn(j){return{type:"list",ordered:j.type==="listOrdered",start:null,spread:j._spread,children:[]}}function So(j){return{type:"listItem",spread:j._spread,checked:null,children:[]}}function rs(){return{type:"paragraph",children:[]}}function bo(){return{type:"strong",children:[]}}function is(){return{type:"text",value:""}}function pe(){return{type:"thematicBreak"}}}function Ar(e){return{line:e.line,column:e.column,offset:e.offset}}function fE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fE(e,r):OH(e,r)}}function OH(e,t){let n;for(n in t)if(hE.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 R1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fa({start:t.start,end:t.end})+") is still open")}function UH(e){const t=this;t.parser=n;function n(r){return $H(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function WH(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 HH(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
84
+ `}]}function KH(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 GH(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YH(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XH(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 QH(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 qH(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function pE(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 ZH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pE(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 JH(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 e9(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 t9(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pE(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 n9(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 r9(e,t,n){const r=e.all(t),i=n?i9(n):mE(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 i9(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=mE(n[r])}return t}function mE(e){const t=e.spread;return t??e.children.length>1}function s9(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 o9(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function a9(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function l9(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function u9(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=ky(t.children[1]),l=XT(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 c9(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 m={type:"element",tagName:s,properties:h,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function d9(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const L1=9,M1=32;function h9(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(I1(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(I1(t.slice(i),i>0,!1)),s.join("")}function I1(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===L1||s===M1;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===L1||s===M1;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function f9(e,t){const n={type:"text",value:h9(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function p9(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const m9={blockquote:WH,break:HH,code:KH,delete:GH,emphasis:YH,footnoteReference:XH,heading:QH,html:qH,imageReference:ZH,image:JH,inlineCode:e9,linkReference:t9,link:n9,listItem:r9,list:s9,paragraph:o9,root:a9,strong:l9,table:u9,tableCell:d9,tableRow:c9,text:f9,thematicBreak:p9,toml:Kl,yaml:Kl,definition:Kl,footnoteDefinition:Kl};function Kl(){}const gE=-1,bd=0,ma=1,Ic=2,Ay=3,Ry=4,Ly=5,My=6,yE=7,vE=8,g9=typeof self=="object"?self:globalThis,D1=(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 g9[e](t)},y9=(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 bd:case gE:return n(o,i);case ma:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Ic:{const a=n({},i);for(const[l,u]of o)a[r(l)]=r(u);return a}case Ay:return n(new Date(o),i);case Ry:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Ly:{const a=n(new Map,i);for(const[l,u]of o)a.set(r(l),r(u));return a}case My:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case yE:{const{name:a,message:l}=o;return n(D1(a,l),i)}case vE: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(D1(s,o),i)};return r},N1=e=>y9(new Map,e)(0),ds="",{toString:v9}={},{keys:x9}=Object,Oo=e=>{const t=typeof e;if(t!=="object"||!e)return[bd,t];const n=v9.call(e).slice(8,-1);switch(n){case"Array":return[ma,ds];case"Object":return[Ic,ds];case"Date":return[Ay,ds];case"RegExp":return[Ry,ds];case"Map":return[Ly,ds];case"Set":return[My,ds];case"DataView":return[ma,n]}return n.includes("Array")?[ma,n]:n.includes("Error")?[yE,n]:[Ic,n]},Gl=([e,t])=>e===bd&&(t==="function"||t==="symbol"),w9=(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]=Oo(o);switch(a){case bd:{let c=o;switch(l){case"bigint":a=vE,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([gE],o)}return i([a,c],o)}case ma:{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 Ic:{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 x9(o))(e||!Gl(Oo(o[h])))&&c.push([s(h),s(o[h])]);return d}case Ay:return i([a,o.toISOString()],o);case Ry:{const{source:c,flags:d}=o;return i([a,{source:c,flags:d}],o)}case Ly:{const c=[],d=i([a,c],o);for(const[h,f]of o)(e||!(Gl(Oo(h))||Gl(Oo(f))))&&c.push([s(h),s(f)]);return d}case My:{const c=[],d=i([a,c],o);for(const h of o)(e||!Gl(Oo(h)))&&c.push(s(h));return d}}const{message:u}=o;return i([a,{name:l,message:u}],o)};return s},B1=(e,{json:t,lossy:n}={})=>{const r=[];return w9(!(t||n),!!t,new Map,r)(e),r},Dc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?N1(B1(e,t)):structuredClone(e):(e,t)=>N1(B1(e,t));function S9(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 b9(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function k9(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||S9,r=e.options.footnoteBackLabel||b9,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 m=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++f<=y;){m.length>0&&m.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,f);typeof v=="string"&&(v={type:"text",value:v}),m.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(...m)}else c.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Dc(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 xE=function(e){if(e==null)return T9;if(typeof e=="function")return kd(e);if(typeof e=="object")return Array.isArray(e)?_9(e):C9(e);if(typeof e=="string")return P9(e);throw new Error("Expected function, string, or object as test")};function _9(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xE(e[n]);return kd(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function C9(e){const t=e;return kd(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function P9(e){return kd(t);function t(n){return n&&n.type===e}}function kd(e){return t;function t(n,r,i){return!!(E9(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function T9(){return!0}function E9(e){return e!==null&&typeof e=="object"&&"type"in e}const wE=[],j9=!0,F1=!1,A9="skip";function R9(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=xE(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=wE,m,y,x;if((!t||s(l,u,c[c.length-1]||void 0))&&(f=L9(n(l,c)),f[0]===F1))return f;if("children"in l&&l.children){const g=l;if(g.children&&f[0]!==A9)for(y=(r?g.children.length:-1)+o,x=c.concat(g);y>-1&&y<g.children.length;){const v=g.children[y];if(m=a(v,y,x)(),m[0]===F1)return m;y=typeof m[1]=="number"?m[1]:y+o}}return f}}}function L9(e){return Array.isArray(e)?e:typeof e=="number"?[j9,e]:e==null?wE:[e]}function SE(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),R9(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 im={}.hasOwnProperty,M9={};function I9(e,t){const n=t||M9,r=new Map,i=new Map,s=new Map,o={...m9,...n.handlers},a={all:u,applyData:N9,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:D9,wrap:F9};return SE(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(im.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,g=Dc(x);return g.children=a.all(c),g}return Dc(c)}return(a.options.unknownHandler||B9)(a,c,d)}function u(c){const d=[];if("children"in c){const h=c.children;let f=-1;for(;++f<h.length;){const m=a.one(h[f],c);if(m){if(f&&h[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=V1(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=V1(y.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function D9(e,t){e.position&&(t.position=yW(e))}function N9(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,Dc(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function B9(e,t){const n=t.data||{},r="value"in t&&!(im.call(n,"hProperties")||im.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 F9(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 V1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $1(e,t){const n=I9(e,t),r=n.one(e,void 0),i=k9(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 V9(e,t){return e&&"run"in e?async function(n,r){const i=$1(n,{file:r,...t});await e.run(i,r)}:function(n,r){return $1(n,{file:r,...e||t})}}function z1(e){if(e)throw e}var Mu=Object.prototype.hasOwnProperty,bE=Object.prototype.toString,O1=Object.defineProperty,U1=Object.getOwnPropertyDescriptor,W1=function(t){return typeof Array.isArray=="function"?Array.isArray(t):bE.call(t)==="[object Array]"},H1=function(t){if(!t||bE.call(t)!=="[object Object]")return!1;var n=Mu.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Mu.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Mu.call(t,i)},K1=function(t,n){O1&&n.name==="__proto__"?O1(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},G1=function(t,n){if(n==="__proto__")if(Mu.call(t,n)){if(U1)return U1(t,n).value}else return;return t[n]},$9=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=G1(a,n),i=G1(t,n),a!==i&&(c&&i&&(H1(i)||(s=W1(i)))?(s?(s=!1,o=r&&W1(r)?r:[]):o=r&&H1(r)?r:{},K1(a,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&K1(a,{name:n,newValue:i}));return a};const Uh=Vc($9);function sm(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 z9(){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?O9(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 O9(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:U9,dirname:W9,extname:H9,join:K9,sep:"/"};function U9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');cl(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 W9(e){if(cl(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 H9(e){cl(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 K9(...e){let t=-1,n;for(;++t<e.length;)cl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":G9(n)}function G9(e){cl(e);const t=e.codePointAt(0)===47;let n=Y9(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Y9(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 cl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const X9={cwd:Q9};function Q9(){return"/"}function om(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function q9(e){if(typeof e=="string")e=new URL(e);else if(!om(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 Z9(e)}function Z9(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 Wh=["history","path","basename","stem","extname","dirname"];class kE{constructor(t){let n;t?om(t)?n={path:t}:typeof t=="string"||J9(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":X9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Wh.length;){const s=Wh[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)Wh.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?$n.basename(this.path):void 0}set basename(t){Kh(t,"basename"),Hh(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){Y1(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(Hh(t,"extname"),Y1(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){om(t)&&(t=q9(t)),Kh(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){Kh(t,"stem"),Hh(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 mt(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 Hh(e,t){if(e&&e.includes($n.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$n.sep+"`")}function Kh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Y1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function J9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const eK=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},tK={}.hasOwnProperty;class Iy extends eK{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=z9()}copy(){const t=new Iy;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Uh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Xh("data",this.frozen),this.namespace[t]=n,this):tK.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Xh("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=Yl(t),r=this.parser||this.Parser;return Gh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Gh("process",this.parser||this.Parser),Yh("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=Yl(t),l=r.parse(a);r.run(l,a,function(c,d,h){if(c||!d||!h)return u(c);const f=d,m=r.stringify(f,h);iK(m)?h.value=m:h.result=m,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(),Gh("processSync",this.parser||this.Parser),Yh("processSync",this.compiler||this.Compiler),this.process(t,i),Q1("processSync","process",n),r;function i(s,o){n=!0,z1(s),r=o}}run(t,n,r){X1(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=Yl(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),Q1("runSync","run",r),i;function s(o,a){z1(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=Yl(n),i=this.compiler||this.Compiler;return Yh("stringify",i),X1(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Xh("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=Uh(!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,...m]=c;const y=r[h][1];sm(y)&&sm(f)&&(f=Uh(!0,y,f)),r[h]=[u,f,...m]}}}}const nK=new Iy().freeze();function Gh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xh(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 X1(e){if(!sm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Q1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Yl(e){return rK(e)?e:new kE(e)}function rK(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function iK(e){return typeof e=="string"||sK(e)}function sK(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oK="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",q1=[],Z1={allowDangerousHtml:!0},aK=/^(https?|ircs?|mailto|xmpp)$/i,lK=[{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 uK(e){const t=cK(e),n=dK(e);return hK(t.runSync(t.parse(n),n),e)}function cK(e){const t=e.rehypePlugins||q1,n=e.remarkPlugins||q1,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Z1}:Z1;return nK().use(UH).use(n).use(V9,r).use(t)}function dK(e){const t=e.children||"",n=new kE;return typeof t=="string"&&(n.value=t),n}function hK(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||fK;for(const c of lK)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+oK+c.id,void 0);return SE(e,u),bW(e,{Fragment:p.Fragment,components:i,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.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 $h)if(Object.hasOwn($h,f)&&Object.hasOwn(c.properties,f)){const m=c.properties[f],y=$h[f];(y===null||y.includes(c.tagName))&&(c.properties[f]=l(String(m||""),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 fK(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||aK.test(e.slice(0,t))?e:""}const Qh=e=>({fontFamily:se.serif,fontWeight:600,fontSize:e,margin:`${D[6]} 0 ${D[3]}`,lineHeight:1.25}),pK={p:({children:e})=>p.jsx("p",{style:{margin:`0 0 ${D[4]}`},children:e}),strong:({children:e})=>p.jsx("strong",{style:{fontWeight:700},children:e}),h1:({children:e})=>p.jsx("h1",{style:Qh(me.lg),children:e}),h2:({children:e})=>p.jsx("h2",{style:Qh("1.3rem"),children:e}),h3:({children:e})=>p.jsx("h3",{style:Qh("1.1rem"),children:e}),a:({children:e,href:t})=>p.jsx("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:Ae.accentAmberDark},children:e}),code:({children:e})=>p.jsx("code",{style:{fontFamily:se.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:3,padding:"0.1em 0.35em"},children:e}),pre:({children:e})=>p.jsx("pre",{style:{fontFamily:se.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:6,padding:`${D[3]} ${D[4]}`,overflowX:"auto",margin:`0 0 ${D[4]}`},children:e}),ul:({children:e})=>p.jsx("ul",{style:{listStyle:"disc",margin:`0 0 ${D[4]}`,paddingLeft:"1.4rem"},children:e}),ol:({children:e})=>p.jsx("ol",{style:{listStyle:"decimal",margin:`0 0 ${D[4]}`,paddingLeft:"1.4rem"},children:e}),li:({children:e})=>p.jsx("li",{style:{marginBottom:"0.4rem"},children:e}),blockquote:({children:e})=>p.jsx("blockquote",{style:{margin:`0 0 ${D[4]}`,paddingLeft:D[4],borderLeft:"3px solid rgba(0,0,0,0.15)",opacity:.85},children:e})},dl=({children:e})=>p.jsx(uK,{components:pK,children:e}),mK=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}},gK=async e=>{try{return(await fetch("/api/icon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUri:e})})).ok}catch{return!1}},yK=async()=>{try{return(await fetch("/api/package-name")).json()}catch{return null}},vK=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase()),_E=()=>{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([yK().then(a=>{!o&&a&&t(vK(a))}),mK().then(a=>{o||r(a)})]).finally(()=>{o||s(!1)}),()=>{o=!0}},[]),{projectName:e,iconDataUri:n,loading:i}},CE=({size:e="md"})=>{const{projectName:t,iconDataUri:n,loading:r}=_E(),i=e==="sm"?20:18,s=e==="sm"?me.sm:me.md;return p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[3]},children:[n?p.jsx("img",{src:n,alt:"",style:{width:i,height:i,objectFit:"contain"}}):p.jsx(eP,{icon:p.jsx(g$,{}),size:"small"}),p.jsx("span",{style:{fontFamily:se.serif,fontWeight:600,fontSize:s,whiteSpace:"nowrap"},children:r?"Loading…":t??"Paper Camp"})]})},En=({children:e})=>p.jsx("h1",{className:"text-4xl",style:{fontFamily:se.serif,fontWeight:600,color:Ae.textPrimary,margin:`0 0 ${D[6]}`,lineHeight:1.1},children:e}),xK=({routeKey:e,children:t})=>{const n=vy();return p.jsxs("aside",{style:{width:$T.sidebarWidth,flexShrink:0,height:"100%",position:"sticky",top:0,display:"flex",flexDirection:"column",background:"transparent",overflow:"hidden"},children:[p.jsx("div",{style:{padding:`${D[5]} ${D[3]} ${D[4]}`,flexShrink:0},children:p.jsx(CE,{})}),p.jsx("div",{style:{height:1,background:"rgba(0,0,0,0.08)",margin:`${D[3]} ${D[3]}`}}),p.jsx("div",{style:{flex:1,overflowY:"auto",paddingTop:D[1],position:"relative"},children:p.jsx(my,{mode:"wait",children:p.jsx(Mc.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)})})]})},Nc=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`},PE=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)}},wK=e=>e.phases.length===0?null:Math.round(e.phases.filter(t=>t.done).length/e.phases.length*100),SK=(e,t)=>{if(e)return e.find(n=>n.status==="in-progress"||n.status==="review")};async function hl(e,t){if(e.ok)return;const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}const bK=async()=>{const e=await fetch("/api/git/status");return await hl(e,"Failed to load git status"),e.json()},kK=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})});await hl(r,"Commit failed")},_K=async()=>{const e=await fetch("/api/git/push",{method:"POST"});await hl(e,"Push failed")},CK=async e=>{const t=await fetch("/api/git/suggest-commit-message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})});return await hl(t,"Failed to suggest a commit message"),t.json()},PK=async e=>{const t=await fetch("/api/git/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e})});await hl(t,"Sync failed")};function J1(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 TK={},eS=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(m=>m(t,f))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(TK?"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},EK=e=>e?eS(e):eS,TE={},{useDebugValue:jK}=Hi,{useSyncExternalStoreWithSelector:AK}=NL;let tS=!1;const RK=e=>e;function LK(e,t=RK,n){(TE?"production":void 0)!=="production"&&n&&!tS&&(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"),tS=!0);const r=AK(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return jK(r),r}const nS=e=>{(TE?"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"?EK(e):e,n=(r,i)=>LK(t,r,i);return Object.assign(n,t),n},MK=e=>e?nS(e):nS,IK=async()=>(await fetch("/api/agent/status")).json(),DK=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)}},NK=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)}},BK=async(e,t)=>{const n=await fetch("/api/agent/launch-reconcile",{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)}},FK=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)}},VK=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)}},$K=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)}},zK=async e=>{const t=await fetch("/api/agent/launch-run-all",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Launch failed"}));throw new Error(n.error)}},OK=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)}},UK="modulepreload",WK=function(e){return"/"+e},rS={},HK=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=WK(l),l in rS)return;rS[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":UK,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)})},KK=async()=>(await fetch("/api/decisions")).json(),GK=async()=>(await fetch("/api/open-questions")).json(),YK=async()=>(await fetch("/api/progress")).json(),XK=async()=>(await fetch("/api/docs")).json(),QK=async()=>(await fetch("/api/consistency")).json(),qK=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 HK(async()=>{const{loadDecisions:o,loadOpenQuestions:a}=await Promise.resolve().then(()=>o7);return{loadDecisions:o,loadOpenQuestions:a}},void 0).then(o=>o.useAppStore.getState());return await Promise.all([i(),s()]),r.json()},ZK=async()=>(await fetch("/api/ideas")).json(),JK=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},e7=async()=>(await fetch("/api/plans")).json(),t7=async e=>{await fetch("/api/plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},n7=async e=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"DELETE"})},bn=async(e,t)=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},r7=async()=>(await fetch("/api/status")).json(),i7=async e=>{await fetch(`/api/status/check?name=${e}`,{method:"POST"})},s7=async()=>{await fetch("/api/status/fix",{method:"POST"})},G=MK((e,t)=>({plans:null,plansLoading:!1,plansError:null,loadPlans:async()=>{e({plansLoading:!0});try{const n=await e7(),{ideaEntries:r}=t();e({plans:n,plansError:null,plansLoading:!1,ideaEntries:J1(r,n.entries)})}catch(n){e({plansError:String(n),plansLoading:!1})}},ideaEntries:[],loadIdeas:async()=>{try{const n=await ZK(),{plans:r}=t();e({ideaEntries:J1(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 KK();e({decisions:n.entries,decisionsLoading:!1})}catch{e({decisions:[],decisionsLoading:!1})}},openQuestions:[],openQuestionsLoading:!0,loadOpenQuestions:async()=>{e({openQuestionsLoading:!0});try{const n=await GK();e({openQuestions:n.entries,openQuestionsLoading:!1})}catch{e({openQuestions:[],openQuestionsLoading:!1})}},progress:[],progressLoading:!0,loadProgress:async()=>{e({progressLoading:!0});try{const n=await YK();e({progress:n.entries,progressLoading:!1})}catch{e({progress:[],progressLoading:!1})}},repoDocs:[],repoDocsLoading:!0,loadRepoDocs:async()=>{e({repoDocsLoading:!0});try{const n=await XK();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 r7();e({status:n})}catch{}},runCheck:async n=>{try{await i7(n)}catch{}},fixQuality:async()=>{try{await s7()}catch{}},consistency:[],loadConsistency:async()=>{try{const n=await QK();e({consistency:n})}catch{}},gitStatus:null,gitBranch:null,gitAhead:0,gitBranchHygiene:null,loadGitStatus:async()=>{try{const{branch:n,entries:r,ahead:i,branchHygiene:s}=await bK();e({gitStatus:r,gitBranch:n,gitAhead:i,gitBranchHygiene:s})}catch{}},agentStatus:null,loadAgentStatus:async()=>{try{const n=await IK();e({agentStatus:n});const r=t().pendingReconcile;r&&(n==null?void 0:n.taskKind)==="reconcile"&&n.planId===r.planId&&(n.status==="done"?(await t().loadPlans(),e({reconcilePreview:r,pendingReconcile:null})):n.status==="error"&&e({pendingReconcile:null}))}catch{}},launchAgent:async(n,r)=>{await DK(n,r),await t().loadAgentStatus()},launchPlanAudit:async(n,r)=>{await NK(n,r),await t().loadAgentStatus()},launchPlanReconcile:async(n,r,i)=>{const s=t().pendingReconcile;if(s)throw new Error(s.planId===n?"A reconcile is already in progress for this plan":"A reconcile is already in progress for another plan");e({pendingReconcile:{planId:n,before:i}});try{await BK(n,r)}catch(o){throw e({pendingReconcile:null}),o}await t().loadAgentStatus()},launchPlanDraft:async(n,r)=>{await FK(n,r),await t().loadAgentStatus()},launchIdeaExtend:async(n,r)=>{await VK(n,r),await t().loadAgentStatus()},launchBatchAudit:async()=>{await $K(),await t().loadAgentStatus()},launchRunAll:async n=>{await zK(n),await t().loadAgentStatus()},stopAgent:async()=>{await OK(),await t().loadAgentStatus()},pendingReconcile:null,reconcilePreview:null,setReconcilePreview:n=>e({reconcilePreview:n})})),o7=Object.freeze(Object.defineProperty({__proto__:null,useAppStore:G},Symbol.toStringTag,{value:"Module"}));function iS(e){const t=e.match(/Found (\d+) errors?\./);return t?Number(t[1]):0}function a7(e,t){const n=iS(e)+iS(t);return n>0?`${n} lint/format issue${n===1?"":"s"} found.`:"Lint or format check failed."}function l7(e){const t=e.match(/Tests\s+(\d+) failed/);return t?`${t[1]} test${t[1]==="1"?"":"s"} failed.`:"Tests failed."}async function Dy(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 u7=({prompt:e,label:t="Copy fix prompt",variant:n="icon"})=>{const[r,i]=C.useState("idle"),s=async o=>{o.stopPropagation();const a=await Dy(e);i(a?"copied":"failed"),setTimeout(()=>i("idle"),1500)};if(n==="link"){const o=r==="copied"?"Copied!":r==="failed"?"Copy failed":t;return p.jsx("button",{type:"button",onClick:s,style:{background:"none",border:"none",padding:0,color:"inherit",textDecoration:"underline",cursor:"pointer",font:"inherit",fontFamily:se.handwritten,fontSize:me.sm},children:o})}return p.jsx(Kt,{icon:r==="copied"?p.jsx(pd,{size:16}):r==="failed"?p.jsx(ts,{size:16}):p.jsx(zg,{size:16}),variant:"chalkboard",size:"small",label:r==="copied"?"Copied":r==="failed"?"Copy failed":t,onClick:s})},sS="papercamp.commitTitle",oS="papercamp.commitMessage",c7=["core","cli","app","server","agent","plans","ideas","docs","settings","stack","ui","ci","config","deps","repo"];function aS(e){try{return localStorage.getItem(e)??""}catch{return""}}function lS(e,t){try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}const d7=({size:e=16})=>p.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:[p.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"}),p.jsx("path",{d:"M19 3v3"}),p.jsx("path",{d:"M20.5 4.5h-3"})]}),h7=({size:e=16})=>p.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:[p.jsx("path",{d:"M12 19V5"}),p.jsx("path",{d:"m5 12 7-7 7 7"})]}),f7=({size:e=16})=>p.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:[p.jsx("circle",{cx:"18",cy:"18",r:"3"}),p.jsx("circle",{cx:"6",cy:"6",r:"3"}),p.jsx("path",{d:"M6 9v5c0 .667 3 1 6 1s6-.333 6-1V9"}),p.jsx("path",{d:"M12 17v2"})]}),uS=`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")`,Xl=Ae.deskBg,cS=Ae.deskLight,p7=Ae.deskText,Ir=Ae.deskTextMuted,Ql=Ae.deskBorder,Rr=Ae.deskChalk,qh={fontFamily:se.serif,fontSize:me.base,fontWeight:600,color:Ir,marginBottom:D[3]},m7=({open:e,onToggle:t})=>{const n=G(j=>j.plans),r=G(j=>j.loadProgress),i=G(j=>j.loadPlans),s=G(j=>j.status),o=G(j=>j.loadStatus),a=G(j=>j.runCheck),l=G(j=>j.fixQuality),u=G(j=>j.consistency),c=G(j=>j.loadConsistency),d=G(j=>j.setActiveDocSection),h=G(j=>j.setActiveDocTitle),f=G(j=>j.setActivePlanTitle),m=G(j=>j.loadGitStatus),y=G(j=>j.gitStatus),x=G(j=>j.gitBranch),g=G(j=>j.gitAhead),v=G(j=>j.gitBranchHygiene),w=G(j=>j.agentStatus),S=G(j=>j.loadAgentStatus),P=G(j=>j.stopAgent),[T,E]=C.useState(!1),[_,R]=C.useState(!1),[k,L]=C.useState(new Set),[I,V]=C.useState(()=>aS(sS)),[B,F]=C.useState(()=>aS(oS)),[$,W]=C.useState(!1),[N,z]=C.useState(!1),[b,U]=C.useState(null),[Z,A]=C.useState(null),[le,fe]=C.useState(!1),[de,Ze]=C.useState(null),[Fe,gt]=C.useState(!1),[Vt,$t]=C.useState(null),yn=vy(),xr=uo(),Je=C.useRef({loadProgress:r,loadPlans:i,loadStatus:o,loadConsistency:c,loadGitStatus:m,loadAgentStatus:S});Je.current={loadProgress:r,loadPlans:i,loadStatus:o,loadConsistency:c,loadGitStatus:m,loadAgentStatus:S},C.useEffect(()=>{Je.current.loadProgress(),Je.current.loadStatus(),Je.current.loadConsistency(),Je.current.loadGitStatus(),Je.current.loadAgentStatus()},[]),C.useEffect(()=>{const j=new EventSource("/api/activity/stream");return j.onmessage=()=>{Je.current.loadProgress(),Je.current.loadPlans(),Je.current.loadStatus(),Je.current.loadConsistency(),Je.current.loadGitStatus(),Je.current.loadAgentStatus()},()=>j.close()},[]);const Te=C.useMemo(()=>SK(n==null?void 0:n.entries),[n==null?void 0:n.entries]),er=C.useMemo(()=>{var O;return((O=Te==null?void 0:Te.tags)==null?void 0:O.find(q=>c7.includes(q)))??"repo"},[Te]),In=C.useMemo(()=>!!(Te!=null&&Te.phases.length)&&Te.phases.every(j=>j.done),[Te]),Pt=C.useMemo(()=>{if(!Te)return"";const j=Te.kind??"feat";return In?`${j}(${er}): updates`:`${j}(${er}): ${Te.title}`},[Te,er,In]),Dn=C.useMemo(()=>{if(!Te)return"";const j=Te.id?`Refs: ${Te.id}`:"";return[!In&&Te.phases.length?Te.phases.map(q=>`- ${q.text}`).join(`
94
+ `):"",j].filter(Boolean).join(`
95
+
96
+ `)},[Te,In]);C.useEffect(()=>{Pt&&!I&&V(Pt)},[Pt,I]),C.useEffect(()=>{Dn&&!B&&F(Dn)},[Dn,B]),C.useEffect(()=>{lS(sS,I)},[I]),C.useEffect(()=>{lS(oS,B)},[B]),C.useEffect(()=>{y&&L(new Set(y.map(j=>j.path)))},[y]);const tn=C.useCallback(j=>{L(O=>{const q=new Set(O);return q.has(j)?q.delete(j):q.add(j),q})},[]),So=C.useCallback(async()=>{if(I.trim()){W(!0),A(null);try{await kK([...k],I.trim(),B.trim()||void 0),V(Pt),F(""),R(!1),await m()}catch(j){A(j.message)}finally{W(!1)}}},[I,B,k,Pt,m]),rs=C.useCallback(async()=>{z(!0),U(null);try{await _K(),await m()}catch(j){U(j.message)}finally{z(!1)}},[m]),bo=C.useCallback(async()=>{gt(!0),$t(null);try{const j=y&&y.length===0;await PK(j?"clean":"dirty"),await m()}catch(j){$t(j.message)}finally{gt(!1)}},[y,m]),is=C.useCallback(async()=>{if(k.size!==0){fe(!0),Ze(null);try{const j=await CK([...k]);V(j.title),F(j.message)}catch(j){Ze(j.message)}finally{fe(!1)}}},[k]),pe=C.useCallback(j=>{if(j.kind==="blocked-plan-active"&&j.planId){const O=n==null?void 0:n.entries.find(q=>q.id===j.planId);if(O){f(O.title),xr({to:"/"});return}}d(j.section==="open-questions"?"questions":"decisions"),h(j.title),xr({to:"/docs"})},[n==null?void 0:n.entries,xr,f,d,h]);return p.jsxs(p.Fragment,{children:[p.jsx(my,{children:!e&&p.jsx(Mc.div,{initial:yn?void 0:{opacity:0,x:20},animate:{opacity:1,x:0},exit:yn?void 0:{opacity:0,x:20},transition:{duration:yn?0:.2,ease:"easeOut"},style:{position:"fixed",right:0,top:"50%",transform:"translateY(-50%)",zIndex:100,borderRadius:"6px 0 0 6px",background:Xl,backgroundImage:`${uS}, linear-gradient(135deg, ${cS} 0%, ${Xl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)"},children:p.jsx(Kt,{icon:p.jsx("span",{style:{fontSize:me["2xs"]},children:"S"}),variant:"chalkboard",size:"small",label:"Open stack panel",onClick:t,style:{width:28,height:64,borderRadius:"6px 0 0 6px"}})})}),p.jsxs(Mc.div,{animate:{x:e?0:"100%"},transition:{duration:yn?0:.3,ease:[.4,0,.2,1]},style:{position:"fixed",top:0,right:0,bottom:0,width:$T.stackPanelWidth,borderLeft:"4px solid rgba(61, 53, 43, 0.12)",backgroundColor:Xl,backgroundImage:`${uS}, linear-gradient(135deg, ${cS} 0%, ${Xl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",color:p7,display:"flex",flexDirection:"column",overflow:"hidden",zIndex:100},children:[p.jsxs("div",{style:{height:80,padding:`0 ${D[6]}`,borderBottom:`1px solid ${Ql}`,display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[p.jsx("span",{style:{fontFamily:se.serif,fontSize:me.base,fontWeight:700,color:Rr},children:"Stack"}),p.jsx(Kt,{icon:p.jsx("span",{style:{fontSize:me.sm,lineHeight:1},children:"×"}),variant:"chalkboard",size:"small",label:"Close stack panel",onClick:t,style:{width:28,height:28,border:`1px solid ${Ql}`}})]}),p.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontFamily:se.body},children:[p.jsxs("div",{style:{flex:2,minHeight:0,display:"flex",flexDirection:"column",padding:D[6],borderBottom:`1px solid ${Ql}`},children:[p.jsx("div",{style:qh,children:"Agent"}),p.jsx(Us,{variant:"chalkboard",size:"small",className:"stack-card-fill",children:w?p.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:D[2],marginBottom:D[2],flexShrink:0},children:[p.jsxs("span",{style:{fontFamily:se.serif,fontWeight:600,fontSize:me.sm,color:Rr},children:[w.planTitle,w.taskKind==="phase"&&w.phaseIndex!==void 0?` — phase ${w.phaseIndex+1}`:w.taskKind==="audit"?" — audit":w.taskKind==="batch-audit"?" — batch audit":w.taskKind==="draft"?" — drafting":w.taskKind==="extend"?" — extending":w.taskKind==="commit-suggest"?" — suggesting commit message":w.taskKind==="sync"?" — syncing to main":w.taskKind==="run-all"?" — run all phases":""," ","· ",xy[w.agentId]]}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[2]},children:[(()=>{const j={starting:"#5a4a2d",running:"#5a4a2d",stopping:"#5a4a2d",done:"#2d5a3b",error:"#5a2d2d"},O={starting:"#d6c4a0",running:"#d6c4a0",stopping:"#d6c4a0",done:"#b5d6b5",error:"#d6a0a0"};return p.jsx(it,{variant:"chalkboard",size:"small",fillColor:j[w.status],textColor:O[w.status],children:w.status})})(),(w.status==="running"||w.status==="starting"||w.status==="stopping")&&p.jsx(Kt,{icon:p.jsx(ts,{}),variant:"ghost",size:"small",label:"Stop agent",onClick:P,disabled:w.status==="stopping"})]})]}),w.lines.length>0&&p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:D[1],fontFamily:se.mono,fontSize:me["2xs"],color:Ir,flex:1,minHeight:0,overflowY:"auto"},children:w.lines.map((j,O)=>p.jsx("span",{style:{whiteSpace:"pre-wrap"},children:j},`${O}-${j}`))})]}):p.jsx("div",{style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center"},children:p.jsx("p",{style:{opacity:.5,fontSize:me.xs,margin:0},children:"No agent running."})})})]}),p.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",padding:D[6],borderBottom:`1px solid ${Ql}`},children:[p.jsx("div",{style:qh,children:"Status"}),p.jsx(Us,{variant:"chalkboard",size:"small",className:"stack-card-fill",children:(()=>{var wr,ut,tr,nn,Fy,Vy;const j={pass:"#2d5a3b",fail:"#5a2d2d",running:"#5a4a2d",stale:"transparent"},O={pass:"#b5d6b5",fail:"#d6a0a0",running:"#d6c4a0",stale:void 0},q=((wr=s==null?void 0:s.lint)==null?void 0:wr.status)??"stale",re=((ut=s==null?void 0:s.format)==null?void 0:ut.status)??"stale",ae=((tr=s==null?void 0:s.test)==null?void 0:tr.status)??"stale",He=q==="running"||re==="running"?"running":q==="fail"||re==="fail"?"fail":q==="stale"&&re==="stale"?"stale":"pass",et=He==="running"||ae==="running",yt=u.length>0;`${((nn=s==null?void 0:s.lint)==null?void 0:nn.output)||"(none)"}${((Fy=s==null?void 0:s.format)==null?void 0:Fy.output)||"(none)"}`;const gi=`Fix the failing tests in this repo. Output from the last test run:
97
+
98
+ ${((Vy=s==null?void 0:s.test)==null?void 0:Vy.output)||"(no output captured)"}`;return p.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:D[3]},children:[p.jsxs("div",{style:{display:"flex",gap:D[2],flexWrap:"wrap",justifyContent:"center"},children:[p.jsx("button",{type:"button",onClick:()=>{et||(a("lint"),a("format"))},disabled:et,style:{cursor:et?"not-allowed":"pointer",opacity:et&&He!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:p.jsxs(it,{variant:"chalkboard",size:"small",fillColor:j[He],textColor:O[He],children:["Quality",p.jsx("span",{style:{visibility:He==="running"?"visible":"hidden"},children:"…"})]})}),p.jsx("button",{type:"button",onClick:()=>{et||a("test")},disabled:et,style:{cursor:et?"not-allowed":"pointer",opacity:et&&ae!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:p.jsxs(it,{variant:"chalkboard",size:"small",fillColor:j[ae],textColor:O[ae],children:["Tests",p.jsx("span",{style:{visibility:ae==="running"?"visible":"hidden"},children:"…"})]})}),p.jsxs("div",{children:[p.jsx("button",{type:"button",onClick:()=>{yt&&E(zt=>!zt)},style:{cursor:yt?"pointer":"default",display:"inline-flex",background:"none",border:"none",padding:0},children:p.jsx(it,{variant:"chalkboard",size:"small",fillColor:yt?"#5a2d2d":"#2d5a3b",textColor:yt?"#d6a0a0":"#b5d6b5",children:"Consistency"})}),T&&yt&&p.jsx("div",{style:{marginTop:D[2],display:"flex",flexDirection:"column",gap:D[2]},children:u.map((zt,ss)=>p.jsx("div",{style:{fontFamily:se.mono,fontSize:me["2xs"],color:Ir},children:p.jsx("button",{type:"button",onClick:()=>pe(zt),style:{background:"none",border:"none",padding:0,color:Rr,textDecoration:"underline",cursor:"pointer",font:"inherit",textAlign:"left"},children:zt.message})},`${zt.kind}-${zt.title}-${ss}`))})]})]}),(()=>{var $y,zy,Oy;let zt,ss=null;return et?zt=p.jsx("span",{style:{color:Ir},children:"Running checks…"}):He==="fail"?(zt=p.jsx("span",{style:{color:Ir},children:a7((($y=s==null?void 0:s.lint)==null?void 0:$y.output)??"",((zy=s==null?void 0:s.format)==null?void 0:zy.output)??"")}),ss=p.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"})):ae==="fail"?(zt=p.jsx("span",{style:{color:Ir},children:l7(((Oy=s==null?void 0:s.test)==null?void 0:Oy.output)??"")}),ss=p.jsxs("span",{style:{color:Rr},children:["Suggested fix:"," ",p.jsx(u7,{prompt:gi,label:"copy a fix prompt",variant:"link"})]})):He==="pass"&&ae==="pass"?zt=p.jsx("span",{style:{color:"#b5d6b5"},children:"All checks passing."}):zt=p.jsx("span",{style:{color:Ir,opacity:.6},children:"Checks haven't run yet."}),p.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",gap:D[1],fontFamily:se.handwritten,fontSize:me.sm},children:[zt,p.jsx("span",{style:{visibility:ss?"visible":"hidden"},children:ss??" "})]})})()]})})()})]}),p.jsxs("div",{style:{flex:2,minHeight:0,display:"flex",flexDirection:"column",padding:D[6]},children:[p.jsxs("div",{style:{...qh,display:"flex",alignItems:"center",gap:D[2]},children:["Commit",x&&p.jsx(it,{variant:"chalkboard",size:"small",children:x})]}),p.jsx(Us,{variant:"chalkboard",size:"small",className:"stack-card-fill",children:y&&y.length>0?p.jsxs(p.Fragment,{children:[p.jsx(gz,{title:`${y.length} file${y.length===1?"":"s"} changed`,expanded:_,onToggle:()=>R(!_),children:p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:D[2],paddingTop:D[2]},children:y.map(j=>p.jsxs("label",{style:{display:"flex",alignItems:"center",gap:D[2],fontFamily:se.mono,fontSize:me["2xs"],color:Rr,cursor:"pointer"},children:[p.jsx("input",{type:"checkbox",checked:k.has(j.path),onChange:()=>tn(j.path),style:{accentColor:Rr}}),p.jsx("span",{style:{color:j.staged?Rr:Ir,minWidth:24},children:j.status}),p.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:j.path})]},j.path))})}),p.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:D[3],marginTop:D[3]},children:[de&&p.jsx(Gt,{variant:"chalkboard",dismissible:!0,onDismiss:()=>Ze(null),children:de}),p.jsxs("div",{style:{display:"flex",gap:D[2],alignItems:"center"},children:[p.jsx("div",{style:{flex:1},children:p.jsx(qn,{variant:"chalkboard",size:"small",placeholder:"Commit title",value:I,onChange:j=>V(j.currentTarget.value)})}),p.jsx(Kt,{icon:p.jsx(d7,{size:16}),variant:"chalkboard",size:"small",label:"Suggest title and message from the diff",disabled:k.size===0||le,onClick:is,wobble:le?1:0})]}),p.jsx(mo,{variant:"chalkboard",size:"small",placeholder:"Commit message (optional)",value:B,onChange:j=>F(j.currentTarget.value),rows:2}),Z&&p.jsx(Gt,{variant:"chalkboard",dismissible:!0,onDismiss:()=>A(null),children:Z}),p.jsx(ne,{variant:"chalkboard",size:"small",fullWidth:!0,disabled:k.size===0||!I.trim()||$,onClick:So,children:$?"Committing…":"Commit"})]})]}):p.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:D[3]},children:g>0?p.jsxs(p.Fragment,{children:[p.jsxs("p",{style:{opacity:.5,fontSize:me.xs,margin:0},children:["All changes committed — ",g," commit",g===1?"":"s"," ready to push."]}),b&&p.jsx(Gt,{variant:"chalkboard",dismissible:!0,onDismiss:()=>U(null),children:b}),p.jsx(ne,{variant:"chalkboard",size:"small",icon:p.jsx(h7,{size:14}),disabled:N,onClick:rs,children:N?"Pushing…":`Push ${g} commit${g===1?"":"s"}`})]}):p.jsxs(p.Fragment,{children:[p.jsx("p",{style:{opacity:.5,fontSize:me.xs,margin:0},children:"No changed files."}),Vt&&p.jsx(Gt,{variant:"chalkboard",dismissible:!0,onDismiss:()=>$t(null),children:Vt}),p.jsx(ne,{variant:"chalkboard",size:"small",icon:p.jsx(f7,{size:14}),disabled:Fe||v==="clean-on-main",onClick:bo,title:v==="clean-on-main"?"Already on clean main":"",children:Fe?"Syncing…":"Sync to main"})]})})})]})]})]})]})},g7=()=>{const e=G(a=>a.decisions),t=G(a=>a.openQuestions),n=G(a=>a.activeDocTitle),r=G(a=>a.setActiveDocSection),i=G(a=>a.setActiveDocTitle),s=e.find(a=>a.title===n);if(!s)return null;const o=t.filter(a=>a.resolvedBy===s.title);return p.jsxs("div",{children:[p.jsx("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${D[3]}`,lineHeight:Dt.tight},children:s.title}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[2],marginBottom:D[5]},children:[p.jsx("span",{className:"text-sm",style:{opacity:.5},children:s.date}),p.jsx(it,{size:"small",fillColor:s.status==="decided"?"rgba(143, 185, 150, 0.25)":"rgba(201, 139, 139, 0.25)",textColor:s.status==="decided"?Ae.accentGreenDark:"#6E3A3A",children:s.status}),s.supersededBy&&p.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Superseded by"," ",p.jsx(Xp,{onClick:()=>i(s.supersededBy),children:s.supersededBy})]}),o.length>0&&p.jsxs("span",{className:"text-sm",style:{opacity:.5},children:[o.length===1?"Resolves":"Resolves all of"," ",o.map((a,l)=>p.jsxs("span",{children:[l>0&&", ",p.jsx(Xp,{onClick:()=>{r("questions"),i(a.title)},children:a.title})]},a.title))]})]}),p.jsx("div",{style:{fontFamily:se.body,fontSize:me.base,lineHeight:Dt.relaxed,color:"#1C1B18"},children:p.jsx(dl,{children:s.body})})]})},wi=(e,t)=>e.toLowerCase().includes(t.toLowerCase()),ql=(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},y7=({query:e})=>{const{decisions:t,openQuestions:n,progress:r,repoDocs:i,setActiveDocSection:s,setActiveDocTitle:o,setDocSearchQuery:a}=G(),l=[];for(const d of t)(wi(d.title,e)||wi(d.body,e))&&l.push({section:"decisions",sectionLabel:"Decisions",title:d.title,snippet:ql(d.body||d.title,e)});for(const d of n)(wi(d.title,e)||wi(d.body,e))&&l.push({section:"questions",sectionLabel:"Open Questions",title:d.title,snippet:ql(d.body||d.title,e)});for(const d of r)for(const h of d.items)if(wi(h,e)){l.push({section:"progress",sectionLabel:"Progress",title:d.date,snippet:ql(h,e)});break}for(const d of i)(wi(d.name,e)||wi(d.content,e))&&l.push({section:"repo-docs",sectionLabel:"Repo Docs",title:d.name,snippet:ql(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?p.jsxs("p",{style:{opacity:.5},children:['No results found for "',e,'".']}):p.jsxs("div",{children:[p.jsxs("p",{className:"text-sm",style:{opacity:.5,marginBottom:D[3]},children:[l.length," result",l.length===1?"":"s",' for "',e,'"']}),Object.entries(u).map(([d,h])=>p.jsxs("div",{style:{marginBottom:D[6]},children:[p.jsx("h3",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4,margin:`0 0 ${D[2]}`},children:h[0].sectionLabel}),p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:D[1]},children:h.map(f=>p.jsx(ne,{variant:"ghost",size:"small",fullWidth:!0,onClick:()=>c(f.section,f.title),style:{justifyContent:"flex-start",padding:`${D[2]} ${D[3]}`},children:p.jsxs("span",{style:{textAlign:"left"},children:[p.jsx("span",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"0.95rem",display:"block",marginBottom:"0.2rem"},children:f.title}),p.jsx("span",{className:"text-sm",style:{opacity:.6},children:f.snippet})]})},`${f.section}-${f.title}`))})]},d))]})},v7=()=>{const e=G(g=>g.openQuestions),t=G(g=>g.activeDocTitle),n=G(g=>g.setActiveDocSection),r=G(g=>g.setActiveDocTitle),[i,s]=C.useState(!1),[o,a]=C.useState(""),[l,u]=C.useState(""),[c,d]=C.useState(!1),h=e.find(g=>g.title===t);if(!h)return null;const f=()=>{h.resolvedBy&&(n("decisions"),r(h.resolvedBy))},m=()=>{a(""),u(""),d(!1),s(!0)},y=()=>{s(!1)},x=async g=>{if(g.preventDefault(),!(!o.trim()||c)){d(!0);try{await qK(h.title,o.trim(),l.trim()||void 0),s(!1)}catch{d(!1)}}};return p.jsxs("div",{children:[p.jsx("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${D[3]}`,lineHeight:Dt.tight},children:h.title}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[2],marginBottom:D[5]},children:[p.jsx("span",{className:"text-sm",style:{opacity:.5},children:h.raised}),p.jsx(it,{size:"small",fillColor:h.status==="open"?"rgba(212, 163, 115, 0.25)":"rgba(143, 185, 150, 0.25)",textColor:h.status==="open"?Ae.accentAmberDark:Ae.accentGreenDark,children:h.status}),h.resolvedBy&&p.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Resolved by"," ",p.jsx(Xp,{onClick:f,children:h.resolvedBy})]}),h.status==="open"&&p.jsx(ne,{variant:"chalkboard",onClick:m,children:"Resolve"})]}),p.jsx("div",{style:{fontFamily:se.body,fontSize:me.base,lineHeight:Dt.relaxed,color:"#1C1B18"},children:p.jsx(dl,{children:h.body})}),p.jsx(il,{open:i,onClose:y,title:"Resolve question",size:"small",children:p.jsxs("form",{onSubmit:x,style:{display:"flex",flexDirection:"column",gap:D[4]},children:[p.jsx(qn,{label:"Decision",value:o,onChange:g=>a(g.target.value),placeholder:"What was decided?",disabled:c,autoFocus:!0,required:!0}),p.jsx(mo,{label:"Rationale",value:l,onChange:g=>u(g.target.value),placeholder:"Optional reasoning…",disabled:c,rows:4}),p.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:D[2]},children:[p.jsx(ne,{type:"button",variant:"ghost",onClick:y,disabled:c,children:"Cancel"}),p.jsx(ne,{type:"submit",variant:"primary",disabled:!o.trim()||c,children:"Resolve"})]})]})})]})},x7=()=>{const e=G(i=>i.progress),t=G(i=>i.activeDocTitle),r=[...t?e.filter(i=>i.date===t):e].sort((i,s)=>s.date.localeCompare(i.date));return r.length===0?p.jsx("p",{style:{opacity:.5},children:"No progress entries found."}):p.jsx("div",{children:r.map(i=>p.jsxs("div",{style:{marginBottom:D[8]},children:[p.jsx("h3",{style:{fontFamily:se.serif,fontWeight:600,fontSize:me.md,margin:`0 0 ${D[3]}`,lineHeight:Dt.tight,opacity:.8},children:i.date}),p.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:D[2]},children:i.items.map((s,o)=>p.jsx("li",{style:{fontFamily:se.body,fontSize:me.sm,lineHeight:1.55,color:"#1C1B18",paddingLeft:D[4],borderLeft:"2px solid rgba(0,0,0,0.08)"},children:p.jsx(dl,{children:s})},`${i.date}-${o}`))})]},i.date))})},w7=()=>{const e=G(i=>i.repoDocs),t=G(i=>i.activeDocTitle),n=e.find(i=>i.name===t);if(!n)return null;const r=n.name.endsWith(".md");return p.jsxs("div",{children:[p.jsx("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${D[4]}`,lineHeight:Dt.tight},children:n.name}),r?p.jsx("div",{style:{fontFamily:se.body,fontSize:me.base,lineHeight:Dt.relaxed,color:"#1C1B18"},children:p.jsx(dl,{children:n.content})}):p.jsx("pre",{style:{fontFamily:se.mono,fontSize:me.xs,background:"rgba(0,0,0,0.04)",borderRadius:6,padding:D[4],overflowX:"auto",lineHeight:Dt.normal,whiteSpace:"pre-wrap"},children:n.content})]})},S7=()=>{const e=G(r=>r.docSearchQuery),t=G(r=>r.activeDocSection),n=G(r=>r.activeDocTitle);return e.trim()?p.jsx("div",{children:p.jsx(y7,{query:e})}):t==="decisions"&&n?p.jsxs("div",{children:[p.jsx(En,{children:"Decisions"}),p.jsx(g7,{})]}):t==="questions"&&n?p.jsxs("div",{children:[p.jsx(En,{children:"Open Questions"}),p.jsx(v7,{})]}):t==="progress"?p.jsxs("div",{children:[p.jsx(En,{children:"Progress"}),p.jsx(x7,{})]}):t==="repo-docs"&&n?p.jsx("div",{children:p.jsx(w7,{})}):p.jsxs("div",{children:[p.jsx(En,{children:"Docs"}),p.jsx("p",{style:{opacity:.5},children:"Select a section from the sidebar."})]})},dn=({label:e,children:t,action:n})=>p.jsxs("div",{style:{marginBottom:D[5]},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.35rem",padding:`0 ${D[3]}`},children:[p.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),n]}),t]}),b7=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Lr=({children:e})=>p.jsx("span",{className:"text-sm",style:{display:"block",padding:`${D[1]} ${D[3]}`,opacity:.35,fontStyle:"italic"},children:e}),k7=()=>{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:m,setActiveDocTitle:y}=G();C.useEffect(()=>{l(),u(),c(),d()},[l,u,c,d]);const x=g=>{f("decisions"),y(g)};return p.jsxs(p.Fragment,{children:[p.jsx(dn,{label:"Repo Docs",children:a&&r.length===0?p.jsx(Lr,{children:"Loading…"}):r.length>0?r.map(g=>p.jsx(cr,{size:"small",active:h==="repo-docs"&&m===g.name,onClick:()=>{f("repo-docs"),y(g.name)},children:b7(g.name)},g.name)):p.jsx(Lr,{children:"No repo docs found"})}),p.jsx(dn,{label:"Decisions",children:i&&e.length===0?p.jsx(Lr,{children:"Loading…"}):e.length>0?e.map(g=>p.jsx(cr,{size:"small",active:h==="decisions"&&m===g.title,onClick:()=>x(g.title),children:g.title},g.title)):p.jsx(Lr,{children:"No decisions yet"})}),p.jsx(dn,{label:"Open Questions",children:s&&t.length===0?p.jsx(Lr,{children:"Loading…"}):t.length>0?t.map(g=>p.jsx(cr,{size:"small",active:h==="questions"&&m===g.title,onClick:()=>{f("questions"),y(g.title)},children:g.title},g.title)):p.jsx(Lr,{children:"No open questions"})}),p.jsx(dn,{label:"Progress",children:o&&n.length===0?p.jsx(Lr,{children:"Loading…"}):n.length>0?n.map(g=>p.jsx(cr,{size:"small",active:h==="progress"&&m===g.date,onClick:()=>{f("progress"),y(g.date)},children:g.date},g.date)):p.jsx(Lr,{children:"No progress entries"})})]})};function EE(){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 _7=()=>{const e=G(o=>o.launchBatchAudit),t=G(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 p.jsx(ne,{variant:"ghost",size:"small",onClick:s,disabled:i||n,style:{color:Ae.textSecondary},children:"Audit all"})},Ny={"in-progress":"#C89A5A",planned:"#6A9B72",idea:"#8A9BAA",review:"#9B7AB5",done:"#8A7A8A",dropped:"#A06060"},jE={idea:"Idea",planned:"Planned","in-progress":"In progress",review:"Review",done:"Done",dropped:"Dropped"},Bc={idea:"slate",planned:"blue","in-progress":"amber",review:"slate",done:"green",dropped:"rose"},dS={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"}},C7=[{status:"planned",label:"Planned"},{status:"in-progress",label:"In Progress"}],By=({id:e})=>e?p.jsx(it,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}):null,P7=({plan:e})=>p.jsxs("div",{children:[p.jsxs("div",{className:"text-sm",style:{fontWeight:500,lineHeight:1.3,display:"flex",alignItems:"center",gap:D[1]},children:[p.jsx(By,{id:e.id}),e.title]}),e.tags.length>0&&p.jsx("div",{style:{display:"flex",gap:D[1],flexWrap:"wrap",marginTop:"0.4rem"},children:e.tags.map(t=>p.jsx(it,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:t},t))})]}),T7=({plans:e})=>p.jsx(rl,{board:C7.map(({status:t,label:n})=>({key:t,label:n,accent:Bc[t],items:e.filter(r=>r.status===t||t==="in-progress"&&r.status==="review"),getKey:r=>r.title,renderItem:r=>p.jsx(P7,{plan:r})}))}),AE=({pct:e,color:t,height:n=6})=>p.jsx(JC,{value:e,color:t,height:n}),Fc=({plan:e,highlighted:t,onOpen:n,rank:r})=>{const i=PE(e);return p.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:p.jsxs(Us,{texture:"kraft",accent:!0,accentColor:Bc[e.status],children:[p.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:D[3]},children:[p.jsxs("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.3rem",margin:0,lineHeight:1.3,display:"flex",alignItems:"center",gap:D[2]},children:[r!==void 0&&p.jsxs("span",{className:"text-sm",style:{opacity:.4,fontWeight:600},children:[r,"."]}),p.jsx(By,{id:e.id}),e.title]}),p.jsx(it,{size:"small",fillColor:dS[e.status].fill,textColor:dS[e.status].text,children:jE[e.status]})]}),p.jsxs("div",{style:{marginTop:"0.3rem",display:"flex",alignItems:"center",gap:D[2],flexWrap:"wrap"},children:[p.jsx("span",{className:"text-sm",style:{opacity:.45},children:e.updated?`updated ${Nc(e.updated)}`:`created ${Nc(e.created)}`}),e.tags.map(s=>p.jsx(it,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:s},s))]}),i!==null&&p.jsx("div",{style:{marginTop:D[3]},children:p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[3]},children:[p.jsx("div",{style:{flex:1},children:p.jsx(AE,{pct:i.pct,color:Ny[e.status]})}),p.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[i.done,"/",i.total]})]})})]})})},E7=({plans:e,onOpen:t})=>{const[n,r]=C.useState(!1);return e.length===0?null:p.jsxs("div",{style:{marginTop:D[8]},children:[p.jsxs(ne,{type:"button",variant:"ghost",size:"small",onClick:()=>r(i=>!i),style:{display:"flex",alignItems:"baseline",gap:"0.35rem"},children:[p.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.35},children:"Closed"}),p.jsx("span",{className:"text-xs",style:{opacity:.3},children:e.length}),p.jsx("span",{className:"text-xs",style:{opacity:.3},children:n?"▴":"▾"})]}),n&&p.jsx("div",{style:{marginTop:"0.65rem",display:"flex",flexDirection:"column",gap:"0.65rem"},children:e.map(i=>p.jsx(Fc,{plan:i,onOpen:t},i.title))})]})};function j7(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 are auditing the plan "${e.title}" (${e.id??"no id"}) for missing phases. The plan is a single file at papercamp/plans/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/plans/archive/${e.id??"<ID>"}.md. 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 recorded so far):
109
+ ${n}
110
+
111
+ Clarifications (answered scope/design questions):
112
+ ${r}
113
+
114
+ Task:
115
+ 1. Read the plan above, then inspect the relevant code in this repo.
116
+ 2. Identify work that is clearly required to fulfil this plan but is covered by no existing phase. The Log entries are the best source — they often record bugs or gaps that were never turned into phases.
117
+ 3. If you found missing work: append one \`- [ ] <short phase title>\` line per item at the end of the \`### Phases\` list. You may add detail below a checkbox line as continuation lines indented with 6 spaces. Then append exactly one line to the \`### Log\` section, formatted \`- YYYY-MM-DD: <what was found and appended>\`, creating that section after the Phases list if it does not exist.
118
+ 4. If nothing is missing: make no edits at all — no Log line, no empty heading, no "nothing found" note. This audit re-runs regularly and must leave no trace when there is nothing to add.
119
+
120
+ Rules:
121
+ - Never modify, reorder, check, uncheck, or delete any existing line, even if it looks stale, wrong, or redundant.
122
+ - Never touch the YAML frontmatter.
123
+ - Append only: new unchecked phases at the end of the list, plus the single Log line.`}function A7(e){const t=e.phases.map((n,r)=>`${r+1}. [${n.done?"x":" "}] ${n.text}`).join(`
124
+ `);return`You are reconciling the plan "${e.title}" (${e.id??"no id"}), stored as a single file at papercamp/plans/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/plans/archive/${e.id??"<ID>"}.md. Edit only that file.
125
+
126
+ Plan body: ${e.body}
127
+
128
+ Current phases:
129
+ ${t}
130
+
131
+ Task: this plan has drifted from the codebase — some phase descriptions and body prose may reference file paths that moved, code symbols that were renamed or removed, or approaches that were superseded during implementation. Find and fix only that drift.
132
+
133
+ 1. Read the plan above, then inspect the relevant code in this repo to find what has actually changed since the prose was written.
134
+ 2. Reword only the sentences or phrases that are now stale: fix references and superseded approaches. Leave everything else byte-identical.
135
+ 3. Do not summarize, restructure, or "improve" prose that is still accurate — an unnecessary rewrite is a failure of this task, not a bonus.
136
+
137
+ Hard guardrails, never violate these:
138
+ - Never touch the YAML frontmatter (id, title, kind, status, created, idea, tags, or any other field).
139
+ - Never un-check, check, delete, or reorder any phase line, checked or unchecked.
140
+ - Never add or remove phases.
141
+ - Never touch the Log or Clarifications sections.
142
+ - If nothing is stale, make no edits at all.`}function R7(e){return`You are expanding the idea ${e.id??"no id"} ("${e.title}"), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md. Edit only that file.
143
+
144
+ Current idea body, in full:
145
+ ${e.body}
146
+
147
+ Task:
148
+ 1. Explore this codebase and find what is relevant to the idea: the files it would touch, existing helpers or patterns it should build on, and constraints visible in the code.
149
+ 2. Rewrite the idea's prose body in that file so it is concrete and actionable: name specific files and symbols, describe a workable approach, and include the architectural context you found. Keep the idea's original intent — sharpen it, do not redirect it.
150
+
151
+ Keep unchanged:
152
+ - the YAML frontmatter (id, title)
153
+ - the \`## ${e.id??"IDEA-N"}: ${e.title}\` heading line
154
+
155
+ Replace everything below that heading with the improved body.`}function L7(e){return`You are 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 archived). Edit only that file, and within it only the \`### Clarifications\` section.
156
+
157
+ Plan body: ${e.body}
158
+
159
+ Current phases:
160
+ ${e.phases.length>0?e.phases.map((t,n)=>`${n+1}. [${t.done?"x":" "}] ${t.text}`).join(`
161
+ `):"(none yet)"}
162
+
163
+ Task: surface the plan's most important unanswered questions and get them answered by the user, one at a time.
164
+
165
+ 1. Check the plan for gaps in: functional scope, data model, UX flow, non-functional requirements, edge cases, terminology, and completion criteria.
166
+ 2. Pick the gaps that would most change the implementation — at most 5. If the plan has no meaningful gaps, say so and stop; do not invent questions.
167
+ 3. Ask the user one question at a time. With each question, propose an answer marked **Recommended:** so the user can accept it with a single word. Wait for the user's reply before asking the next question.
168
+ 4. After each answered question, append one line to the plan file's \`### Clarifications\` section, creating the section between the body and \`### Phases\` if it does not exist:
169
+
170
+ \`\`\`
171
+ - YYYY-MM-DD: Q: <question> → A: <the user's answer>
172
+ \`\`\`
173
+
174
+ Rules:
175
+ - Record only answers the user actually gave (accepting your recommendation counts).
176
+ - Append only — never rewrite or delete existing Clarifications lines.
177
+ - Use today's date.`}function M7(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(`
178
+ `);return`### ${i.id??"no id"}: ${i.title} (status: ${i.status}${i.idea?`, idea: ${i.idea}`:""})
179
+ ${i.body}
180
+ ${s||" (no phases yet)"}`}).join(`
181
+
182
+ `):"(no other open plans exist yet)";return`You are drafting a new plan from an idea: ${e.id??"no id"} ("${e.title}"), stored at papercamp/ideas/${e.id??"<ID>"}.md.
183
+
184
+ Idea body, in full:
185
+ ${e.body}
186
+
187
+ ## Plan file shape (see papercamp/about.md)
188
+
189
+ 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, then a \`### Phases\` checklist:
190
+
191
+ \`\`\`
192
+ ---
193
+ id: <KIND>-<N>
194
+ title: <Short headline>
195
+ kind: feat | fix | chore | docs | refactor
196
+ status: idea
197
+ created: <today, YYYY-MM-DD>
198
+ idea: ${e.id??"IDEA-N"}
199
+ tags:
200
+ - app
201
+ - agent
202
+ ---
203
+
204
+ One or two paragraphs of free prose giving context — what this is and why,
205
+ in the same voice as the plans shown below.
206
+
207
+ ### Phases
208
+ - [ ] Short phase title
209
+ Optional description of the phase, indented with 6 spaces.
210
+ \`\`\`
211
+
212
+ Field rules:
213
+ - \`title\`: a short verb-led headline, 2-6 words.
214
+ - \`kind\`: the Conventional Commits type that best fits this idea (most are \`feat\`). It determines the ID prefix.
215
+ - \`id\`: read \`nextId.<kind>\` from \`papercamp/config.json\` (e.g. \`nextId.feat\`), use that number as \`<KIND>-<N>\`, and write the incremented counter back to config.json. Never derive the number by scanning existing plan files for the highest one — a deleted plan's number must never be reused.
216
+ - \`idea\`: exactly \`${e.id??"this idea's id"}\`. This backlink is how the dashboard (and this task's own success check) finds the plan you wrote — without it the draft counts as failed.
217
+ - \`status\`: exactly \`idea\`, never anything further along. Drafts land in the Backlog and a human promotes them from there (per papercamp/decisions.md, "Plan-drafting agent writes directly, same as phase execution").
218
+ - \`tags\`: 1-4 short subsystem tags that fit the idea (the example values above are placeholders).
219
+ - Phases: actionable steps a future agent or human could pick up one at a time — match the granularity of the phases in the plans shown below, not one giant phase.
220
+
221
+ ## Every other open (non-done) plan, for scope context
222
+
223
+ ${r}
224
+
225
+ ## What to do
226
+
227
+ 1. Read \`papercamp/config.json\` and take the current \`nextId.<kind>\` value for your chosen kind.
228
+ 2. Create exactly one new file, \`papercamp/plans/<KIND>-<N>.md\`, in the shape above.
229
+ 3. Write the incremented counter back to \`papercamp/config.json\`.
230
+
231
+ Use the open plans above only to avoid duplicating an in-flight plan's scope and to match phase granularity. Never create, edit, move, or rename any other plan file, and never write to the legacy monolithic file \`papercamp/plans.md\` — it is unused under per-file storage.`}const I7=({idea:e,otherPlans:t})=>{const n=G(d=>d.launchPlanDraft),r=G(d=>d.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,errorMessage:o,run:a}=EE(),l=()=>{const d=e.id;d&&a(async()=>{await n(d,M7(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 p.jsx(ne,{variant:"ghost",size:"small",onClick:l,disabled:i||s==="loading"||!e.id,title:c,style:{color:s==="error"?Ae.accentRoseDark:Ae.textSecondary},children:u})},D7=[{key:"planned",label:"Planned",accent:Bc.planned,icon:p.jsx(m$,{}),iconFill:void 0,filter:e=>!e.status||e.status==="planned"},{key:"done",label:"Done",accent:Bc.done,icon:p.jsx(pd,{size:14}),iconFill:"rgba(143, 185, 150, 0.35)",filter:e=>e.status==="done"}],N7=({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 p.jsx(rl,{board:D7.map(({key:c,label:d,accent:h,icon:f,iconFill:m,filter:y})=>{const x=e.filter(y),g=c==="done",v=g?x.length-l:0,S=v>0&&!o?[...x.slice(0,l),{__overflow:!0,count:v}]:x;return{key:c,label:g?`${d} (${x.length})`:d,accent:h,items:S,getKey:P=>"__overflow"in P?"__overflow":P.title,renderItem:P=>{if("__overflow"in P)return p.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:`${D[2]} 0`},children:p.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:[P.count," more idea",P.count===1?"":"s"]})});const T=i===P.title,E=P.id?u(P.id):[],_=E.length>0;return p.jsxs("div",{children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[2]},children:[p.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(P.title),style:{flex:1,minWidth:0,background:"none",border:"none",padding:0,cursor:"pointer",display:"flex",alignItems:"center",gap:D[2],textAlign:"left",font:"inherit",color:"inherit"},children:[p.jsx(eP,{icon:f,size:"small",fillColor:m}),p.jsx("span",{className:"text-sm",style:{fontWeight:500,lineHeight:1.3},children:P.title})]}),_&&p.jsxs("button",{type:"button","aria-label":T?"Hide linked plans":"Show linked plans",onClick:()=>s(T?null:P.title),style:{flexShrink:0,background:"none",border:"none",padding:0,opacity:.45,cursor:"pointer",fontSize:"0.7rem",font:"inherit"},children:[T?"▾":"▸"," ",E.length]}),!_&&P.id&&p.jsx("div",{style:{flexShrink:0},children:p.jsx(I7,{idea:P,otherPlans:t})})]}),T&&_&&p.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:D[1],marginTop:D[2]},children:E.map(R=>p.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(R.title),style:{background:"none",border:"none",padding:0,cursor:"pointer",font:"inherit"},children:p.jsx(it,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:R.id})},R.title))})]})}}})})},B7=({ideaId:e})=>p.jsxs(Us,{texture:"kraft",children:[p.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:D[3]},children:[p.jsxs("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.3rem",margin:0,lineHeight:1.3,display:"flex",alignItems:"center",gap:D[2]},children:[p.jsx(it,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}),p.jsx("span",{style:{opacity:.55},children:"Creating a plan…"})]}),p.jsx("div",{className:"paper-camp-skeleton",style:{width:60,height:20,opacity:.18}})]}),p.jsxs("div",{style:{marginTop:"0.3rem",display:"flex",alignItems:"center",gap:D[2]},children:[p.jsx("div",{className:"paper-camp-skeleton",style:{width:90,height:12,opacity:.18}}),p.jsx("div",{className:"paper-camp-skeleton",style:{width:50,height:18,borderRadius:999,opacity:.18}})]}),p.jsx("div",{style:{marginTop:D[3]},children:p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[3]},children:[p.jsx("div",{className:"paper-camp-skeleton",style:{flex:1,height:6,opacity:.18}}),p.jsx("div",{className:"paper-camp-skeleton",style:{width:28,height:12,flexShrink:0,opacity:.18}})]})})]}),Zh=({label:e,count:t})=>p.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"0.4rem",marginBottom:"0.65rem"},children:[p.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),p.jsx("span",{className:"text-xs",style:{opacity:.3},children:t})]}),F7=({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 p.jsxs("div",{children:[a.length>0&&p.jsxs("section",{style:{marginBottom:D[8]},children:[p.jsx(Zh,{label:"In progress",count:a.length}),p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:D[3]},children:a.map(h=>p.jsx("div",{ref:d(h.title),children:p.jsx(Fc,{plan:h,highlighted:t===h.title,onOpen:n})},h.title))})]}),(l.length>0||c)&&p.jsxs("section",{style:{marginBottom:D[8]},children:[p.jsx(Zh,{label:"Backlog",count:l.length}),p.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:D[3]},children:[c&&s&&p.jsx(B7,{ideaId:s}),l.map((h,f)=>p.jsx("div",{ref:d(h.title),children:p.jsx(Fc,{plan:h,highlighted:t===h.title,onOpen:n,rank:f+1})},h.title))]})]}),r&&r.length>0&&p.jsxs("section",{style:{marginBottom:D[8]},children:[p.jsx(Zh,{label:"Ideas",count:r.length}),p.jsx(N7,{ideas:r,plans:e,onOpenIdea:i,onOpenPlan:n})]}),p.jsx(E7,{plans:u,onOpen:n})]})},V7=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}`},$7=(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=[V7(e),e.failure_scenario??e.reasoning].filter(Boolean).join(" — ");return{done:!1,text:n.trim(),description:r||void 0,source:"review"}},z7=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)=>$7(r,i))},O7=({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=z7(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 p.jsxs(p.Fragment,{children:[p.jsx(ne,{variant:"ghost",size:"small",onClick:()=>r(!0),disabled:t,children:"Add as phases"}),p.jsx(il,{open:n,onClose:c,title:"Add /code-review findings",size:"small",children:p.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:D[4]},children:[p.jsxs("p",{className:"text-sm",style:{margin:0,opacity:.7},children:["Paste the JSON findings from a ",p.jsx("code",{children:"/code-review"})," run. Each finding becomes a new, unchecked phase on this plan."]}),p.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&&p.jsx(Gt,{variant:"warning",title:"Could not add phases",children:o}),p.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:D[2]},children:[p.jsx(ne,{type:"button",variant:"ghost",onClick:c,disabled:l,children:"Cancel"}),p.jsx(ne,{type:"button",variant:"primary",onClick:d,disabled:l||!i.trim(),children:"Add phases"})]})]})})]})},U7=({planId:e,phaseIndex:t,disabled:n})=>{const r=G(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 p.jsx(Kt,{icon:p.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:Ae.textSecondary}})},W7=({plan:e,disabled:t})=>{const n=G(o=>o.launchPlanAudit),[r,i]=C.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,j7(e))}catch(o){alert(o.message)}finally{i(!1)}}};return p.jsx(ne,{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:Ae.textSecondary},children:"Audit phases against code"})},H7=({plan:e,disabled:t})=>{const[n,r]=C.useState("idle"),i=async()=>{const s=L7(e),o=await Dy(s);r(o?"copied":"failed"),setTimeout(()=>r("idle"),1500)};return p.jsx(ne,{variant:"ghost",size:"small",onClick:i,disabled:t,icon:n==="copied"?p.jsx(pd,{size:14}):n==="failed"?p.jsx(ts,{size:14}):p.jsx(zg,{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":Ae.textSecondary},children:"Copy Clarifications Prompt"})},K7=({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 Dy(o);r(a?"copied":"failed"),setTimeout(()=>r("idle"),1500)};return p.jsx(Kt,{icon:n==="copied"?p.jsx(pd,{size:16}):n==="failed"?p.jsx(ts,{size:16}):p.jsx(zg,{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":Ae.textSecondary}})},G7=({plan:e,disabled:t})=>{const n=G(o=>o.launchPlanReconcile),[r,i]=C.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,A7(e),{body:e.body,phases:e.phases})}catch(o){alert(o.message)}finally{i(!1)}}};return p.jsx(ne,{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:Ae.textSecondary},children:"Reconcile"})};function Jh(e,t){const n=e.split(/(\s+)/).filter(c=>c!==""),r=t.split(/(\s+)/).filter(c=>c!==""),i=n.length,s=r.length,o=Array.from({length:i+1},()=>new Array(s+1).fill(0));for(let c=i-1;c>=0;c--)for(let d=s-1;d>=0;d--)o[c][d]=n[c]===r[d]?o[c+1][d+1]+1:Math.max(o[c+1][d],o[c][d+1]);const a=[];let l=0,u=0;for(;l<i&&u<s;)n[l]===r[u]?(a.push({type:"same",text:n[l]}),l++,u++):o[l+1][u]>=o[l][u+1]?(a.push({type:"removed",text:n[l]}),l++):(a.push({type:"added",text:r[u]}),u++);for(;l<i;)a.push({type:"removed",text:n[l]}),l++;for(;u<s;)a.push({type:"added",text:r[u]}),u++;return Y7(a)}function Y7(e){const t=[];for(const n of e){const r=t[t.length-1];r&&r.type===n.type?r.text+=n.text:t.push({...n})}return t}const ef=({tokens:e})=>p.jsx(p.Fragment,{children:e.map((t,n)=>{if(t.type==="same")return p.jsx("span",{children:t.text},`${t.type}-${n}`);const r=t.type==="added";return p.jsx("span",{style:{backgroundColor:r?"rgba(143, 185, 150, 0.3)":"rgba(201, 139, 139, 0.3)",textDecoration:r?"none":"line-through",color:r?Ae.accentGreenDark:Ae.accentRoseDark},children:t.text},`${t.type}-${n}`)})}),hS=e=>p.jsx("h4",{style:{fontFamily:se.serif,fontSize:me.xs,fontWeight:600,margin:`0 0 ${D[2]}`,opacity:.65},children:e}),X7=({plan:e,before:t,onApprove:n,onDiscard:r})=>{const[i,s]=C.useState(!1),o=e.body!==t.body,a=e.phases.map((u,c)=>({phase:u,before:t.phases[c],index:c})).filter(({phase:u,before:c})=>c!==void 0&&(u.text!==c.text||(u.description??"")!==(c.description??""))),l=async()=>{s(!0);try{await r()}finally{s(!1)}};return p.jsx(il,{open:!0,title:"Review reconcile changes",size:"large",onClose:l,children:p.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:D[5]},children:[p.jsxs("p",{className:"text-sm",style:{margin:0,opacity:.7},children:['The reconcile agent proposed the rewrite below for "',e.title,'". Approve to keep it, or discard to revert to the prior wording.']}),!o&&a.length===0&&p.jsx("p",{className:"text-sm",style:{margin:0,opacity:.6},children:"No wording changed."}),o&&p.jsxs("div",{children:[hS("Body"),p.jsx("p",{className:"text-base",style:{margin:0,lineHeight:Dt.normal},children:p.jsx(ef,{tokens:Jh(t.body,e.body)})})]}),a.length>0&&p.jsxs("div",{children:[hS("Phases"),p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:D[3]},children:a.map(({phase:u,before:c,index:d})=>p.jsxs("div",{className:"text-sm",style:{lineHeight:Dt.normal},children:[p.jsx(ef,{tokens:Jh(c.text,u.text)}),(u.description||c.description)&&p.jsx("div",{style:{opacity:.85,marginTop:D[1]},children:p.jsx(ef,{tokens:Jh(c.description??"",u.description??"")})})]},d))})]}),p.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:D[2]},children:[p.jsx(ne,{variant:"primary",size:"small",className:"btn-orange",onClick:l,disabled:i,children:"Discard"}),p.jsx(ne,{variant:"primary",size:"small",className:"btn-green",onClick:n,disabled:i,children:"Approve"})]})]})})},Q7=({plan:e,disabled:t})=>{const n=G(o=>o.launchRunAll),[r,i]=C.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id)}catch(o){alert(o.message)}finally{i(!1)}}};return p.jsx(ne,{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:Ae.textSecondary},children:"Run all phases"})},RE=({plan:e})=>{const t=G(k=>k.loadPlans),n=G(k=>k.agentStatus),r=G(k=>k.reconcilePreview),i=G(k=>k.setReconcilePreview),s=n!==null&&n.status!=="done"&&n.status!=="error",o=s&&n!==null&&n.planId===e.id?n.phaseIndex:null,a=s&&n!==null&&n.planId===e.id&&n.phaseIndex===void 0,[l,u]=C.useState(!1),[c,d]=C.useState(""),h=PE(e),f=e.status==="in-progress",m=e.status==="review";h!==null&&h.done===h.total&&h.total>0;const y=async()=>{u(!0),await bn(e.title,{status:"in-progress"}),await t(),u(!1)},x=async()=>{u(!0),await bn(e.title,{status:"planned"}),await t(),u(!1)},g=async k=>{const L=e.phases.map((V,B)=>B===k?{...V,done:!V.done}:V);u(!0),L.every(V=>V.done)&&e.status==="in-progress"?await bn(e.title,{phases:L,status:"review"}):await bn(e.title,{phases:L}),await t(),u(!1)},v=async()=>{u(!0),await bn(e.title,{status:"done"}),await t(),u(!1)},w=async()=>{u(!0),await bn(e.title,{status:"in-progress"}),await t(),u(!1)},S=async k=>{u(!0),await bn(e.title,{status:k}),await t(),u(!1)},P=async k=>{u(!0),await bn(e.title,{agent:k||null}),await t(),u(!1)},T=async k=>{u(!0),await bn(e.title,{phases:[...e.phases,...k]}),await t(),u(!1)},E=()=>{i(null)},_=async()=>{!r||r.planId!==e.id||(u(!0),await bn(e.title,{body:r.before.body,phases:r.before.phases}),await t(),i(null),u(!1))},R=async()=>{if(!c.trim())return;const L={date:new Date().toISOString().slice(0,10),text:c.trim().replace(/\n/g," ")},I=[...e.log??[],L];u(!0),await bn(e.title,{log:I}),await t(),d(""),u(!1)};return p.jsxs("div",{children:[r&&r.planId===e.id&&p.jsx(X7,{plan:e,before:r.before,onApprove:E,onDiscard:_}),p.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:D[4],marginBottom:D[3]},children:[p.jsxs("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:0,lineHeight:Dt.tight,display:"flex",alignItems:"center",gap:D[3]},children:[p.jsx(By,{id:e.id}),e.title]}),!m&&p.jsx(ne,{variant:"primary",size:"small",className:f?"btn-orange":"btn-green",onClick:f?x:y,disabled:l,children:f?"Stop":"Start"})]}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[2],flexWrap:"wrap",marginBottom:D[4]},children:[p.jsx(Ws,{size:"small",width:140,value:e.status,onChange:S,disabled:l,options:bU.map(k=>({value:k,label:jE[k]}))}),p.jsx("span",{className:"text-sm",style:{opacity:.45},children:e.updated?`updated ${Nc(e.updated)}`:`created ${Nc(e.created)}`}),e.tags.map(k=>p.jsx(it,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:k},k))]}),p.jsx("div",{style:{marginBottom:D[1]},children:p.jsx(H7,{plan:e,disabled:s})}),e.body&&p.jsx("p",{className:"text-base",style:{margin:`0 0 ${D[4]}`,opacity:.8,lineHeight:Dt.normal},children:e.body}),e.clarifications&&e.clarifications.length>0&&p.jsxs("div",{style:{marginBottom:D[5]},children:[p.jsx("h3",{style:{fontFamily:se.serif,fontSize:me.sm,fontWeight:600,margin:`0 0 ${D[3]}`,opacity:.65},children:"Clarifications"}),p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:D[2],marginBottom:D[3]},children:e.clarifications.map((k,L)=>p.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[p.jsx("span",{style:{fontWeight:600,marginRight:D[2]},children:k.date}),k.text]},`clar-${k.date}-${L}`))})]}),h!==null&&p.jsx("div",{style:{marginBottom:D[5]},children:p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[3]},children:[p.jsx("div",{style:{flex:1},children:p.jsx(AE,{pct:h.pct,color:Ny[e.status]})}),p.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[h.done,"/",h.total]})]})}),p.jsx("div",{style:{marginBottom:D[5]},children:p.jsx(Ws,{size:"small",width:220,value:e.agent??"",onChange:P,disabled:l,options:[{value:"",label:"Project default agent"},...zT.map(k=>({value:k,label:xy[k]}))]})}),e.phases.length>0&&p.jsxs("div",{style:{marginBottom:D[8]},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:D[3],marginBottom:D[3]},children:[p.jsx("h3",{style:{fontFamily:se.serif,fontSize:me.sm,fontWeight:600,margin:0,opacity:.65},children:"Phases"}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[2]},children:[a&&p.jsx("span",{className:"spinner",style:{opacity:.6},title:"Audit running…"}),(e.status==="planned"||e.status==="in-progress")&&e.phases.some(k=>!k.done)&&p.jsx(Q7,{plan:e,disabled:s}),(e.status==="review"||e.status==="done")&&p.jsx(W7,{plan:e,disabled:s}),e.status!=="done"&&p.jsx(G7,{plan:e,disabled:s}),p.jsx(O7,{onAdd:T,disabled:l})]})]}),p.jsx(rl,{data:e.phases,columns:[{key:"checkbox",header:"Status",cell:(k,L)=>p.jsx(l3,{checked:k.done,onChange:()=>g(L),disabled:l}),width:2},{key:"title",header:"Title",cell:k=>p.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:D[2],textDecoration:k.done?"line-through":"none",opacity:k.done?.45:1},children:[k.text,k.source==="review"&&p.jsx(it,{size:"small",fillColor:"rgba(155, 122, 181, 0.25)",textColor:"#7B5E9E",children:"review"})]})},{key:"actions",header:"Actions",cell:(k,L)=>p.jsxs("div",{style:{display:"flex",gap:D[2],alignItems:"center"},children:[p.jsx(K7,{planTitle:e.title,phaseIndex:L}),!k.done&&o===L?p.jsx("span",{className:"spinner",style:{opacity:.6},title:`Agent ${n==null?void 0:n.status}…`}):!k.done&&p.jsx(U7,{planId:e.id,phaseIndex:L,disabled:s})]}),width:5}],expandable:{render:k=>k.description??null},showExpandColumn:!1,rowClassName:k=>k.source==="review"?"phase-row-review":void 0})]}),m&&p.jsxs("div",{style:{display:"flex",gap:D[3],marginBottom:D[6]},children:[p.jsx(ne,{variant:"primary",size:"small",className:"btn-green",onClick:v,disabled:l,children:"Approve & close"}),p.jsx(ne,{variant:"primary",size:"small",className:"btn-orange",onClick:w,disabled:l,children:"Needs changes"})]}),p.jsxs("div",{style:{marginBottom:D[8]},children:[p.jsx("h3",{style:{fontFamily:se.serif,fontSize:me.sm,fontWeight:600,margin:`0 0 ${D[3]}`,opacity:.65},children:"Log"}),e.log&&e.log.length>0&&p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:D[2],marginBottom:D[3]},children:e.log.map((k,L)=>p.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[p.jsx("span",{style:{fontWeight:600,marginRight:D[2]},children:k.date}),k.text]},`${k.date}-${L}`))}),p.jsxs("div",{style:{display:"flex",gap:D[2],alignItems:"flex-end"},children:[p.jsx(mo,{value:c,onChange:k=>d(k.target.value),placeholder:"Add a log entry…",rows:2}),p.jsx(ne,{variant:"primary",size:"small",className:"btn-violet",onClick:R,disabled:l||!c.trim(),children:"Add entry"})]})]})]})},q7=({view:e,onChange:t})=>p.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[p.jsx(Kt,{icon:p.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[p.jsx("title",{children:"List view icon"}),p.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),p.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),p.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),p.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),p.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),p.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")}),p.jsx(Kt,{icon:p.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[p.jsx("title",{children:"Board view icon"}),p.jsx("rect",{x:"3",y:"3",width:"5",height:"18",rx:"1"}),p.jsx("rect",{x:"10",y:"3",width:"5",height:"12",rx:"1"}),p.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")})]}),Z7=()=>{const{plans:e,plansError:t,activePlanTitle:n,setActivePlanTitle:r,activeIdeaTitle:i,setActiveIdeaTitle:s,view:o,setView:a,ideaEntries:l,agentStatus:u}=G(),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)},m=n?e==null?void 0:e.entries.find(x=>x.title===n):null,y=i?l.find(x=>x.title===i):null;return t?p.jsxs("div",{children:[p.jsx(En,{children:"Plans"}),p.jsx(Gt,{variant:"error",title:"Couldn't load plans.md",children:t})]}):e?m?p.jsxs("div",{children:[p.jsx("div",{style:{marginBottom:D[4]},children:p.jsx(ne,{variant:"ghost",size:"small",onClick:d,children:"← All plans"})}),p.jsx(RE,{plan:m})]}):y?p.jsxs("div",{children:[p.jsx("div",{style:{marginBottom:D[4]},children:p.jsx(ne,{variant:"ghost",size:"small",onClick:d,children:"← All plans"})}),p.jsxs("div",{style:{fontFamily:se.body,fontSize:me.base,lineHeight:Dt.relaxed,color:"#1C1B18"},children:[p.jsxs("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${D[4]}`,lineHeight:Dt.tight,display:"flex",alignItems:"center",gap:D[3]},children:[y.id&&p.jsx(it,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:y.id}),y.title]}),p.jsx(dl,{children:y.body.replace(/^#{1,3}\s+.+(\n|$)/,"").replace(/^-{3,}\s*$/m,"").trim()}),p.jsx("div",{style:{marginTop:D[6]},children:p.jsx(J7,{ideaId:y.id})})]})]}):p.jsxs("div",{children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:D[7]},children:[p.jsx(En,{children:"Plans"}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[2]},children:[p.jsx(_7,{}),p.jsx(q7,{view:o,onChange:a})]})]}),e.warnings.length>0&&p.jsx(Gt,{variant:"warning",title:"Some entries couldn't be parsed",children:p.jsx("ul",{children:e.warnings.map(x=>p.jsxs("li",{children:[x.title,": ",x.message]},x.title))})}),e.entries.length===0&&l.length===0?p.jsxs("p",{style:{opacity:.5},children:["No plans yet. Run ",p.jsx("code",{children:'paper-camp add plan "name"'}),", or add an idea from the sidebar."]}):o==="board"?p.jsx(T7,{plans:e.entries}):p.jsx(F7,{plans:e.entries,activePlanTitle:n,onOpenPlan:h,ideaEntries:l,onOpenIdea:f,draftingIdeaId:c})]}):p.jsxs("div",{children:[p.jsx(En,{children:"Plans"}),p.jsx("p",{style:{opacity:.5},children:"Loading…"})]})},J7=({ideaId:e})=>{const t=G(u=>u.launchIdeaExtend),n=G(u=>u.agentStatus),r=n!==null&&n.status!=="done"&&n.status!=="error",{state:i,errorMessage:s,run:o}=EE(),a=()=>{e&&o(async()=>{const u=G.getState().ideaEntries.find(c=>c.id===e);u&&await t(e,R7(u))})},l=i==="error"?s??"Extension failed":e?void 0:"Idea needs an ID before an agent can run";return p.jsx(ne,{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"})},eG=({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 p.jsx(il,{open:e,onClose:t,title:"New idea",size:"small",children:p.jsxs("form",{onSubmit:u,style:{display:"flex",flexDirection:"column",gap:D[4]},children:[p.jsx(qn,{label:"Title",value:r,onChange:c=>i(c.target.value),placeholder:"Idea title…",disabled:a,autoFocus:!0,required:!0}),p.jsx(mo,{label:"Description",value:s,onChange:c=>o(c.target.value),placeholder:"Optional details…",disabled:a,rows:4}),p.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:D[2]},children:[p.jsx(ne,{type:"button",variant:"ghost",onClick:t,disabled:a,children:"Cancel"}),p.jsx(ne,{type:"submit",variant:"primary",disabled:!r.trim()||a,children:"Add"})]})]})})},tG=({pct:e,color:t})=>p.jsx("div",{style:{width:40,flexShrink:0},children:p.jsx(JC,{value:e,color:t,height:3})}),Iu=({plan:e,active:t,onClick:n,action:r})=>{const i=wK(e),s=Ny[e.status];return p.jsx(cr,{active:t,onClick:n,size:"small",icon:p.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:s,flexShrink:0}}),action:p.jsxs(p.Fragment,{children:[i!==null&&p.jsx(tG,{pct:i,color:s}),r]}),children:e.title})},nG=()=>{const e=uo(),t=lg({select:_=>_.location.pathname}),{plans:n,loadPlans:r,loadIdeas:i,activePlanTitle:s,setActivePlanTitle:o,activeIdeaTitle:a,setActiveIdeaTitle:l,ideaEntries:u,gitBranchHygiene:c}=G(),[d,h]=C.useState(!1),[f,m]=C.useState(!1),y=c==="stale-merged",x=(n==null?void 0:n.entries.filter(_=>_.status==="in-progress"||_.status==="review"))??[],g=(n==null?void 0:n.entries.filter(_=>_.status==="planned"))??[],v=(n==null?void 0:n.entries.filter(_=>_.status==="idea"))??[],w=async _=>{await t7(_),await r(),h(!1)},S=async _=>{await JK(_),await i(),m(!1)},P=async _=>{window.confirm(`Delete idea "${_}"?`)&&(await n7(_),await r(),s===_&&o(null))},T=_=>{e({to:"/"}),o(_.title),l(null)},E=_=>{l(_),o(null),e({to:"/"})};return p.jsxs(p.Fragment,{children:[y&&p.jsx("div",{style:{marginBottom:D[4]},children:p.jsx(Gt,{variant:"warning",title:"Branch hygiene alert",children:"This branch is already merged into main. Switch to main before creating new plans."})}),x.length>0&&p.jsx(dn,{label:"In progress",children:x.map(_=>p.jsx(Iu,{plan:_,active:t==="/"&&s===_.title,onClick:()=>T(_)},_.title))}),g.length>0&&p.jsx(dn,{label:"Planned",children:g.map(_=>p.jsx(Iu,{plan:_,active:t==="/"&&s===_.title,onClick:()=>T(_)},_.title))}),u.filter(_=>_.status!=="done").length>0&&p.jsx(dn,{label:"Ideas",action:p.jsx(Kt,{icon:p.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:"New idea",onClick:()=>m(!0)}),children:u.filter(_=>_.status!=="done").map(_=>p.jsx(cr,{size:"small",active:a===_.title,onClick:()=>E(_.title),children:_.title},_.title))}),p.jsxs(dn,{label:"Backlog",action:p.jsx(Kt,{icon:p.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:y?"Switch to main first":"Add to backlog",disabled:y,onClick:()=>h(!0),title:y?"Switch to main first":void 0}),children:[v.map(_=>p.jsx(Iu,{plan:_,active:t==="/"&&s===_.title,onClick:()=>T(_),action:p.jsx(Kt,{icon:p.jsx("span",{children:"×"}),variant:"ghost",size:"small",label:"Delete",onClick:R=>{R.stopPropagation(),P(_.title)}})},_.title)),v.length===0&&p.jsx("span",{className:"text-sm",style:{display:"block",padding:`${D[1]} ${D[3]}`,opacity:.35,fontStyle:"italic"},children:"Nothing yet"})]}),p.jsx(CU,{open:d,onClose:()=>h(!1),onAdd:w}),p.jsx(eG,{open:f,onClose:()=>m(!1),onAdd:S})]})},rG=()=>{const{plans:e,plansError:t,activePlanTitle:n,setActivePlanTitle:r,setActiveIdeaTitle:i}=G(),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?p.jsxs("div",{children:[p.jsx(En,{children:"Review"}),p.jsx(Gt,{variant:"error",title:"Couldn't load plans.md",children:t})]}):e?l?p.jsxs("div",{children:[p.jsx("div",{style:{marginBottom:D[4]},children:p.jsx(ne,{variant:"ghost",size:"small",onClick:s,children:"← Back to review"})}),p.jsx(RE,{plan:l})]}):p.jsxs("div",{children:[p.jsx(En,{children:"Review"}),a.length===0?p.jsx("p",{style:{opacity:.5},children:"No plans pending review."}):p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:D[3]},children:a.map(u=>p.jsx(Fc,{plan:u,onOpen:o},u.title))})]}):p.jsxs("div",{children:[p.jsx(En,{children:"Review"}),p.jsx("p",{style:{opacity:.5},children:"Loading…"})]})},iG=()=>{const e=uo(),t=lg({select:l=>l.location.pathname}),{plans:n,activePlanTitle:r,setActivePlanTitle:i,setActiveIdeaTitle:s}=G(),o=(n==null?void 0:n.entries.filter(l=>l.status==="review"))??[],a=l=>{e({to:"/review"}),i(l),s(null)};return p.jsx(dn,{label:"Pending review",children:o.length===0?p.jsx("span",{className:"text-sm",style:{display:"block",padding:"0.25rem 0.75rem",opacity:.35,fontStyle:"italic"},children:"None"}):o.map(l=>p.jsx(Iu,{plan:l,active:t==="/review"&&r===l.title,onClick:()=>a(l.title)},l.title))})},sG=async()=>{try{return(await fetch("/api/config")).json()}catch{return null}},tf=async e=>{try{return(await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok}catch{return!1}},oG=async()=>{try{return(await(await fetch("/api/configs")).json()).files}catch{return[]}},aG=async e=>{try{const t=await fetch(`/api/configs?name=${encodeURIComponent(e)}`);return t.ok?(await t.json()).content:null}catch{return null}},LE=async()=>{try{return await(await fetch("/api/env")).json()}catch{return{exists:!1,exampleExists:!1,entries:[],missingKeys:[]}}},lG=async e=>{try{return(await fetch("/api/env",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entries:e})})).ok}catch{return!1}},fS=["phase","planDraft","ideaExtend","commitSuggest"],uG={phase:"Phase run",planDraft:"Plan draft",ideaExtend:"Idea extend",commitSuggest:"Commit suggest"},cG=({taskKey:e,agentConfig:t,isLast:n,onSave:r,isSaved:i})=>{const s=Fh[t.agent]??Fh["claude-code"],o=s.model,a=s.effort,[l,u]=C.useState(t.model??"");C.useEffect(()=>{u(t.model??"")},[t.model]);const c=m=>{var v;const y=m,x=Fh[y],g={agent:y};t.model&&(x.model===null||(v=x.model)!=null&&v.includes(t.model))&&(g.model=t.model),t.effort&&Array.isArray(x.effort)&&(g.effort=t.effort),r(e,g)},d=m=>{r(e,{...t,model:m||void 0})},h=()=>{r(e,{...t,model:l||void 0})},f=m=>{r(e,{...t,effort:m||void 0})};return p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[3],...!n&&{borderBottom:Ru},paddingBottom:D[2],paddingTop:D[2]},children:[p.jsx("span",{style:{width:110,flexShrink:0,fontSize:me.sm,opacity:.65},children:uG[e]}),p.jsx(Ws,{size:"small",value:t.agent,onChange:c,options:zT.map(m=>({value:m,label:xy[m]}))}),Array.isArray(o)?p.jsx(Ws,{size:"small",value:t.model??"",onChange:d,options:[{value:"",label:"Default"},...o.map(m=>({value:m,label:m}))]}):o===null?p.jsx(qn,{size:"small",value:l,placeholder:"Default model",onChange:m=>u(m.target.value),onBlur:h}):null,p.jsx("div",{style:{visibility:Array.isArray(a)?"visible":"hidden"},children:p.jsx(Ws,{size:"small",value:t.effort??"",onChange:f,options:[{value:"",label:"Default"},...(Array.isArray(a)?a:[]).map(m=>({value:m,label:m}))]})}),i&&p.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]})},dG=()=>{const e=C.useRef(null),[t,n]=C.useState(void 0),{iconDataUri:r,loading:i}=_E(),[s,o]=C.useState(null),a=s??r,[l,u]=C.useState(!1),[c,d]=C.useState(!1),[h,f]=C.useState(""),[m,y]=C.useState(!1),[x,g]=C.useState(!1),[v,w]=C.useState(""),[S,P]=C.useState(!1),[T,E]=C.useState(!1),[_,R]=C.useState(null);C.useEffect(()=>{sG().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 k=async(B,F)=>{const $=t==null?void 0:t.defaultAgents,W={phase:($==null?void 0:$.phase)??$o.phase,planDraft:($==null?void 0:$.planDraft)??$o.planDraft,ideaExtend:($==null?void 0:$.ideaExtend)??$o.ideaExtend,commitSuggest:($==null?void 0:$.commitSuggest)??$o.commitSuggest,[B]:F};await tf({defaultAgents:W})&&(n(z=>z&&{...z,defaultAgents:W}),R(B),setTimeout(()=>R(null),2e3))},L=async()=>{const B=Number(h);if(!Number.isInteger(B)||B<=0)return;y(!0);const F=await tf({port:B});y(!1),F&&(n($=>$&&{...$,port:B}),g(!0),setTimeout(()=>g(!1),2e3))},I=async()=>{const B=v.trim();if(!B)return;P(!0);const F=await tf({projectName:B});P(!1),F&&(n($=>$&&{...$,projectName:B}),w(B),E(!0),setTimeout(()=>E(!1),2e3))},V=async B=>{var W;const F=(W=B.target.files)==null?void 0:W[0];if(!F)return;u(!0);const $=new FileReader;$.onloadend=async()=>{const N=$.result,z=await gK(N);u(!1),z&&(d(!0),o(N),setTimeout(()=>d(!1),2e3))},$.readAsDataURL(F)};return p.jsxs("div",{children:[p.jsx("div",{style:{marginBottom:D[6]},children:p.jsx("h2",{style:{margin:0},children:"Project Info"})}),t===void 0&&p.jsx("p",{children:"Loading…"}),t===null&&p.jsxs(Gt,{variant:"warning",title:"No papercamp/config.json found",children:["Run ",p.jsx("code",{children:"paper-camp init"})," in this directory first."]}),t&&p.jsxs(Us,{size:"small",children:[p.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:D[3],borderBottom:Ru,paddingBottom:D[3]},children:[p.jsx(qn,{value:v,onChange:B=>w(B.target.value),label:"Project Name"}),p.jsx(ne,{variant:"secondary",size:"small",onClick:I,disabled:S||!v.trim()||v.trim()===t.projectName,children:S?"Saving…":"Save"}),p.jsxs(it,{size:"small",fillColor:"rgba(143, 185, 150, 0.25)",textColor:Ae.accentGreenDark,children:["v",t.version]}),T&&p.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[3],borderBottom:Ru,paddingBottom:D[3],paddingTop:D[3]},children:[a&&p.jsx("img",{src:a,alt:"Project icon",style:{width:40,height:40,objectFit:"contain",flexShrink:0,borderRadius:4}}),p.jsxs("div",{children:[p.jsx("input",{ref:e,type:"file",accept:".svg,.png,.jpg,.jpeg,.gif,.webp",onChange:V,style:{display:"none"}}),p.jsx(ne,{variant:"secondary",size:"small",onClick:()=>{var B;return(B=e.current)==null?void 0:B.click()},disabled:l,children:l?"Uploading…":"Choose File"}),c&&p.jsx("span",{className:"text-sm",style:{opacity:.6,marginLeft:D[2]},children:"Saved"}),i&&p.jsx("p",{className:"text-sm",style:{opacity:.5,margin:`${D[1]} 0 0`},children:"Loading…"}),!i&&!a&&!l&&p.jsx("p",{className:"text-sm",style:{opacity:.45,margin:`${D[1]} 0 0`},children:"No icon set."})]})]}),p.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:D[3],borderBottom:Ru,paddingBottom:D[3],paddingTop:D[3]},children:[p.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."}),p.jsx(ne,{variant:"secondary",size:"small",onClick:L,disabled:m||!h,children:m?"Saving…":"Save"}),x&&p.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),fS.map((B,F)=>{var $;return p.jsx(cG,{taskKey:B,agentConfig:(($=t.defaultAgents)==null?void 0:$[B])??$o[B],isLast:F===fS.length-1,onSave:k,isSaved:_===B},B)})]}),p.jsxs("p",{style:{opacity:.45,fontSize:me.sm,marginTop:D[4]},children:[p.jsx("strong",{children:"Initialized:"})," ",t?new Date(t.initializedAt).toLocaleString():"—"]})]})},hG=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}},fG=({fileName:e})=>{const[t,n]=C.useState(null),[r,i]=C.useState(!0);if(C.useEffect(()=>{i(!0),aG(e).then(o=>{n(o),i(!1)})},[e]),r)return p.jsx("p",{children:"Loading…"});if(t===null)return p.jsxs(Gt,{variant:"warning",title:"Could not load file",children:[e," not found."]});const s=e==="package.json"?hG(t):null;return p.jsxs("div",{children:[p.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:D[4]},children:p.jsx("h2",{style:{margin:0},children:e})}),s?p.jsx(rl,{data:s,columns:[{key:"name",header:"Script",cell:o=>p.jsx("span",{style:{fontFamily:se.mono},children:o.name}),width:4},{key:"command",header:"Command",cell:o=>p.jsx("span",{style:{fontFamily:se.mono},children:o.command})}]}):p.jsx(z3,{code:t,filename:e})]})},pS=e=>/key|secret|token|password/i.test(e),pG=()=>{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(()=>{LE().then(S=>{r(S.entries),s(S.missingKeys),t(!1)})},[]);const m=(S,P)=>{r(T=>T.map((E,_)=>_===S?{...E,...P}:E))},y=()=>r(S=>[...S,{key:"",value:""}]),x=S=>{r(P=>[...P,{key:S,value:""}]),s(P=>P.filter(T=>T!==S))},g=S=>{r(P=>P.filter((T,E)=>E!==S)),a(P=>{const T=new Set(P);return T.delete(S),T})},v=S=>a(P=>{const T=new Set(P);return T.has(S)?T.delete(S):T.add(S),T}),w=async()=>{const S=n.map(E=>({key:E.key.trim(),value:E.value})).filter(E=>E.key.length>0);if(new Set(S.map(E=>E.key)).size!==S.length){f("Duplicate keys are not allowed");return}f(null),u(!0);const T=await lG(S);u(!1),T?(r(S),d(!0),setTimeout(()=>d(!1),2e3)):f("Failed to save .env")};return e?p.jsx("p",{children:"Loading…"}):p.jsxs("div",{children:[p.jsx("h2",{style:{margin:0,marginBottom:D[4]},children:"Environment Variables"}),h&&p.jsx(Gt,{variant:"warning",title:"Could not save",children:h}),i.length>0&&p.jsx(Gt,{variant:"warning",title:"Missing from .env",children:p.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:D[2],alignItems:"center"},children:[p.jsx("span",{children:"Present in .env.example but not set:"}),i.map(S=>p.jsxs(ne,{variant:"secondary",size:"small",onClick:()=>x(S),children:["+ ",S]},S))]})}),p.jsx(rl,{data:n,columns:[{key:"key",header:"Key",cell:(S,P)=>p.jsx(qn,{value:S.key,placeholder:"KEY",style:{fontFamily:se.mono},onChange:T=>m(P,{key:T.target.value})}),width:6},{key:"value",header:"Value",cell:(S,P)=>{const T=pS(S.key)&&!o.has(P);return p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[2]},children:[p.jsx(qn,{type:T?"password":"text",value:S.value,placeholder:"value",style:{fontFamily:se.mono,flex:1},onChange:E=>m(P,{value:E.target.value})}),pS(S.key)&&p.jsx(ne,{variant:"ghost",size:"small",onClick:()=>v(P),children:T?"Show":"Hide"})]})}},{key:"actions",header:"",width:2,cell:(S,P)=>p.jsx(Kt,{icon:p.jsx(ts,{}),variant:"ghost",size:"small",label:"Remove variable",onClick:()=>g(P)})}]}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:D[3],marginTop:D[4]},children:[p.jsx(ne,{variant:"secondary",size:"small",onClick:y,children:"+ Add variable"}),p.jsx(ne,{variant:"primary",size:"small",onClick:w,disabled:l,children:l?"Saving…":"Save"}),c&&p.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]})]})},mG=()=>{const e=G(t=>t.activeSettingsSection);return p.jsxs("div",{children:[p.jsx(En,{children:"Settings"}),e==="general"&&p.jsx(dG,{}),e==="env"&&p.jsx(pG,{}),e.startsWith("config:")&&p.jsx(fG,{fileName:e.slice(7)})]})},gG=()=>{const e=G(o=>o.activeSettingsSection),t=G(o=>o.setActiveSettingsSection),n=G(o=>o.settingsConfigFiles),r=G(o=>o.setSettingsConfigFiles),[i,s]=C.useState(!1);return C.useEffect(()=>{oG().then(r),LE().then(o=>s(o.exists||o.exampleExists))},[r]),p.jsxs(p.Fragment,{children:[p.jsx(dn,{label:"General",children:p.jsx(cr,{size:"small",active:e==="general",onClick:()=>t("general"),children:"Project Info"})}),i&&p.jsx(dn,{label:"Environment",children:p.jsx(cr,{size:"small",active:e==="env",onClick:()=>t("env"),children:"Env Vars"})}),n.length>0&&p.jsx(dn,{label:"Config Files",children:n.map(o=>p.jsx(cr,{size:"small",active:e===`config:${o}`,onClick:()=>t(`config:${o}`),children:o},o))})]})},mS=[{id:"plans",label:"Plans",path:"/"},{id:"review",label:"Review",path:"/review"},{id:"docs",label:"Docs",path:"/docs"},{id:"settings",label:"Settings",path:"/settings"}],yG=()=>{var h;const e=uo(),t=lg({select:f=>f.location.pathname}),n=G(f=>f.loadPlans),r=G(f=>f.loadIdeas),i=G(f=>f.setActivePlanTitle),s=G(f=>f.setActiveIdeaTitle),o=(h=mS.find(f=>f.path===t))==null?void 0:h.id,a=G(f=>f.docSearchQuery),l=G(f=>f.setDocSearchQuery),[u,c]=C.useState(!0),d=vy();return C.useEffect(()=>{n(),r()},[n,r]),C.useEffect(()=>{i(null),s(null)},[t,i,s]),p.jsxs(KF,{background:{texture:"paper",ruledType:"grid",ruledColor:"blue"},showHeader:!1,showSidebar:!1,showPage:!1,bleedBottom:!0,stackOpen:u,navigationIsland:p.jsx("nav",{"aria-label":"Navigation island",children:p.jsxs(XF,{children:[p.jsx(CE,{size:"sm"}),p.jsx("div",{style:{width:1,height:24,background:"rgba(0,0,0,0.12)"}}),t==="/docs"&&p.jsx("div",{style:{width:180},children:p.jsx(qn,{size:"small",placeholder:"Search docs…",value:a,onChange:f=>l(f.target.value)})}),p.jsx("div",{style:{width:1,height:24,background:"rgba(0,0,0,0.12)"}}),p.jsx("div",{className:"flex items-center gap-1",children:mS.map(f=>p.jsx(ne,{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:[p.jsx("div",{className:"flex h-full min-h-0 justify-center items-stretch box-border overflow-hidden",style:{paddingRight:u?Li.stackPanelWidth:0},children:p.jsxs("div",{className:"flex h-full min-h-0 w-full max-w-layout",style:{gap:Li.contentGap},children:[p.jsxs(xK,{routeKey:t,children:[t==="/"&&p.jsx(nG,{}),t==="/review"&&p.jsx(iG,{}),t==="/docs"&&p.jsx(k7,{}),t==="/settings"&&p.jsx(gG,{})]}),p.jsx("div",{className:"flex flex-1 flex-col min-h-0 min-w-0",children:p.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:p.jsx(qC,{texture:{texture:"parchment"},style:{height:"auto",paddingBottom:`calc(${Li.navIslandBottom} + ${Li.navIslandHeight} + ${ZC[4]})`},children:p.jsx(my,{mode:"wait",children:p.jsx(Mc.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:p.jsx(i_,{})},t)})})})})]})}),p.jsx(m7,{open:u,onToggle:()=>c(f=>!f)})]})},fl=QL({component:yG}),vG=od({getParentRoute:()=>fl,path:"/",component:Z7}),xG=od({getParentRoute:()=>fl,path:"/review",component:rG}),wG=od({getParentRoute:()=>fl,path:"/docs",component:S7}),SG=od({getParentRoute:()=>fl,path:"/settings",component:mG}),bG=fl.addChildren([vG,xG,wG,SG]),kG=aM({routeTree:bG}),ME=document.getElementById("root");if(!ME)throw new Error("#root element not found");Ek(ME).render(p.jsx(C.StrictMode,{children:p.jsx(cM,{router:kG})}));
232
+ //# sourceMappingURL=main-6nYButky.js.map