@dendelion/paper-camp 0.7.0 → 0.8.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 (98) hide show
  1. package/dist/app/assets/index-CF8jC3IN.js +2 -0
  2. package/dist/app/assets/index-CF8jC3IN.js.map +1 -0
  3. package/dist/app/assets/index-DGXi8vpJ.js +2 -0
  4. package/dist/app/assets/index-DGXi8vpJ.js.map +1 -0
  5. package/dist/app/assets/main-D66GnCKz.css +1 -0
  6. package/dist/app/assets/main-DJDNx4Xs.js +218 -0
  7. package/dist/app/assets/main-DJDNx4Xs.js.map +1 -0
  8. package/dist/app/assets/sidebar-section-C2j12TzE.js +2 -0
  9. package/dist/app/assets/sidebar-section-C2j12TzE.js.map +1 -0
  10. package/dist/app/img/paper-logo.png +0 -0
  11. package/dist/app/img/paper-logo.svg +7 -0
  12. package/dist/app/index.html +7 -3
  13. package/dist/app/manifest.json +13 -0
  14. package/dist/chunks/{serializer.DiYtNSka.js → serializer.BfH7zTwv.js} +1767 -1395
  15. package/dist/chunks/serializer.BfH7zTwv.js.map +1 -0
  16. package/dist/cli/index.js +6501 -6167
  17. package/dist/cli/index.js.map +1 -1
  18. package/dist/core/git-pr/branch.d.ts.map +1 -0
  19. package/dist/core/git-pr/index.d.ts +4 -0
  20. package/dist/core/git-pr/index.d.ts.map +1 -0
  21. package/dist/core/git-pr/pr-lookup.d.ts +57 -0
  22. package/dist/core/git-pr/pr-lookup.d.ts.map +1 -0
  23. package/dist/core/git-pr/pr.d.ts +101 -0
  24. package/dist/core/git-pr/pr.d.ts.map +1 -0
  25. package/dist/core/{pr.test.d.ts.map → git-pr/pr.test.d.ts.map} +1 -1
  26. package/dist/core/git-pr/scopes.d.ts +8 -0
  27. package/dist/core/git-pr/scopes.d.ts.map +1 -0
  28. package/dist/core/index.d.ts +3 -3
  29. package/dist/core/index.d.ts.map +1 -1
  30. package/dist/core/index.js +76 -55
  31. package/dist/core/parse/entity.test.d.ts.map +1 -0
  32. package/dist/core/parse/frontmatter-schemas.d.ts.map +1 -0
  33. package/dist/core/parse/frontmatter.test.d.ts.map +1 -0
  34. package/dist/core/parse/index.d.ts +3 -0
  35. package/dist/core/parse/index.d.ts.map +1 -0
  36. package/dist/core/{parser.d.ts → parse/parser.d.ts} +16 -11
  37. package/dist/core/parse/parser.d.ts.map +1 -0
  38. package/dist/core/parse/parser.test.d.ts.map +1 -0
  39. package/dist/core/parse/schemas.d.ts.map +1 -0
  40. package/dist/core/readers.d.ts +8 -0
  41. package/dist/core/readers.d.ts.map +1 -1
  42. package/dist/core/scaffold/index.d.ts +3 -0
  43. package/dist/core/scaffold/index.d.ts.map +1 -0
  44. package/dist/core/scaffold/scaffold.d.ts.map +1 -0
  45. package/dist/core/scaffold/scaffold.test.d.ts.map +1 -0
  46. package/dist/core/scaffold/templates.d.ts.map +1 -0
  47. package/dist/core/{content-hash.d.ts → serialize/content-hash.d.ts} +1 -1
  48. package/dist/core/serialize/content-hash.d.ts.map +1 -0
  49. package/dist/core/serialize/content-hash.test.d.ts.map +1 -0
  50. package/dist/core/serialize/index.d.ts +3 -0
  51. package/dist/core/serialize/index.d.ts.map +1 -0
  52. package/dist/core/{serializer.d.ts → serialize/serializer.d.ts} +19 -7
  53. package/dist/core/serialize/serializer.d.ts.map +1 -0
  54. package/dist/core/status/index.d.ts +2 -0
  55. package/dist/core/status/index.d.ts.map +1 -0
  56. package/dist/core/{status.d.ts → status/status.d.ts} +4 -4
  57. package/dist/core/status/status.d.ts.map +1 -0
  58. package/dist/core/status/status.test.d.ts.map +1 -0
  59. package/dist/img/paper-logo.png +0 -0
  60. package/dist/img/paper-logo.svg +7 -0
  61. package/dist/manifest.json +13 -0
  62. package/dist/types/index.d.ts +45 -1
  63. package/dist/types/index.d.ts.map +1 -1
  64. package/dist/types/index.js.map +1 -1
  65. package/package.json +7 -2
  66. package/dist/app/assets/main-5JSkR2Qf.js +0 -182
  67. package/dist/app/assets/main-5JSkR2Qf.js.map +0 -1
  68. package/dist/app/assets/main-B8HU5n_F.css +0 -1
  69. package/dist/chunks/serializer.DiYtNSka.js.map +0 -1
  70. package/dist/core/branch.d.ts.map +0 -1
  71. package/dist/core/content-hash.d.ts.map +0 -1
  72. package/dist/core/content-hash.test.d.ts.map +0 -1
  73. package/dist/core/entity.test.d.ts.map +0 -1
  74. package/dist/core/frontmatter-schemas.d.ts.map +0 -1
  75. package/dist/core/frontmatter.test.d.ts.map +0 -1
  76. package/dist/core/parser.d.ts.map +0 -1
  77. package/dist/core/parser.test.d.ts.map +0 -1
  78. package/dist/core/pr.d.ts +0 -27
  79. package/dist/core/pr.d.ts.map +0 -1
  80. package/dist/core/scaffold.d.ts.map +0 -1
  81. package/dist/core/scaffold.test.d.ts.map +0 -1
  82. package/dist/core/schemas.d.ts.map +0 -1
  83. package/dist/core/serializer.d.ts.map +0 -1
  84. package/dist/core/status.d.ts.map +0 -1
  85. package/dist/core/status.test.d.ts.map +0 -1
  86. package/dist/core/templates.d.ts.map +0 -1
  87. /package/dist/core/{branch.d.ts → git-pr/branch.d.ts} +0 -0
  88. /package/dist/core/{pr.test.d.ts → git-pr/pr.test.d.ts} +0 -0
  89. /package/dist/core/{entity.test.d.ts → parse/entity.test.d.ts} +0 -0
  90. /package/dist/core/{frontmatter-schemas.d.ts → parse/frontmatter-schemas.d.ts} +0 -0
  91. /package/dist/core/{frontmatter.test.d.ts → parse/frontmatter.test.d.ts} +0 -0
  92. /package/dist/core/{parser.test.d.ts → parse/parser.test.d.ts} +0 -0
  93. /package/dist/core/{schemas.d.ts → parse/schemas.d.ts} +0 -0
  94. /package/dist/core/{scaffold.d.ts → scaffold/scaffold.d.ts} +0 -0
  95. /package/dist/core/{scaffold.test.d.ts → scaffold/scaffold.test.d.ts} +0 -0
  96. /package/dist/core/{templates.d.ts → scaffold/templates.d.ts} +0 -0
  97. /package/dist/core/{content-hash.test.d.ts → serialize/content-hash.test.d.ts} +0 -0
  98. /package/dist/core/{status.test.d.ts → status/status.test.d.ts} +0 -0
@@ -1,182 +0,0 @@
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 uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function su(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kv={exports:{}},ou={},Qv={exports:{}},le={};/**
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 La=Symbol.for("react.element"),US=Symbol.for("react.portal"),HS=Symbol.for("react.fragment"),GS=Symbol.for("react.strict_mode"),KS=Symbol.for("react.profiler"),QS=Symbol.for("react.provider"),YS=Symbol.for("react.context"),qS=Symbol.for("react.forward_ref"),XS=Symbol.for("react.suspense"),ZS=Symbol.for("react.memo"),JS=Symbol.for("react.lazy"),yg=Symbol.iterator;function eC(e){return e===null||typeof e!="object"?null:(e=yg&&e[yg]||e["@@iterator"],typeof e=="function"?e:null)}var Yv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qv=Object.assign,Xv={};function qs(e,t,n){this.props=e,this.context=t,this.refs=Xv,this.updater=n||Yv}qs.prototype.isReactComponent={};qs.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")};qs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zv(){}Zv.prototype=qs.prototype;function ap(e,t,n){this.props=e,this.context=t,this.refs=Xv,this.updater=n||Yv}var lp=ap.prototype=new Zv;lp.constructor=ap;qv(lp,qs.prototype);lp.isPureReactComponent=!0;var xg=Array.isArray,Jv=Object.prototype.hasOwnProperty,cp={current:null},e1={key:!0,ref:!0,__self:!0,__source:!0};function t1(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)Jv.call(t,r)&&!e1.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),c=0;c<a;c++)l[c]=arguments[c+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:La,type:e,key:s,ref:o,props:i,_owner:cp.current}}function tC(e,t){return{$$typeof:La,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function up(e){return typeof e=="object"&&e!==null&&e.$$typeof===La}function nC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var vg=/\/+/g;function Uu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?nC(""+e.key):t.toString(36)}function Al(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 La:case US:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Uu(o,0):r,xg(i)?(n="",e!=null&&(n=e.replace(vg,"$&/")+"/"),Al(i,t,n,"",function(c){return c})):i!=null&&(up(i)&&(i=tC(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(vg,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",xg(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Uu(s,a);o+=Al(s,t,n,l,i)}else if(l=eC(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Uu(s,a++),o+=Al(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 Ha(e,t,n){if(e==null)return e;var r=[],i=0;return Al(e,r,"","",function(s){return t.call(n,s,i++)}),r}function rC(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 bt={current:null},Dl={transition:null},iC={ReactCurrentDispatcher:bt,ReactCurrentBatchConfig:Dl,ReactCurrentOwner:cp};function n1(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:Ha,forEach:function(e,t,n){Ha(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ha(e,function(){t++}),t},toArray:function(e){return Ha(e,function(t){return t})||[]},only:function(e){if(!up(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Component=qs;le.Fragment=HS;le.Profiler=KS;le.PureComponent=ap;le.StrictMode=GS;le.Suspense=XS;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iC;le.act=n1;le.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=qv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=cp.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Jv.call(t,l)&&!e1.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 c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:La,type:e.type,key:i,ref:s,props:r,_owner:o}};le.createContext=function(e){return e={$$typeof:YS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:QS,_context:e},e.Consumer=e};le.createElement=t1;le.createFactory=function(e){var t=t1.bind(null,e);return t.type=e,t};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:qS,render:e}};le.isValidElement=up;le.lazy=function(e){return{$$typeof:JS,_payload:{_status:-1,_result:e},_init:rC}};le.memo=function(e,t){return{$$typeof:ZS,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=Dl.transition;Dl.transition={};try{e()}finally{Dl.transition=t}};le.unstable_act=n1;le.useCallback=function(e,t){return bt.current.useCallback(e,t)};le.useContext=function(e){return bt.current.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e){return bt.current.useDeferredValue(e)};le.useEffect=function(e,t){return bt.current.useEffect(e,t)};le.useId=function(){return bt.current.useId()};le.useImperativeHandle=function(e,t,n){return bt.current.useImperativeHandle(e,t,n)};le.useInsertionEffect=function(e,t){return bt.current.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return bt.current.useLayoutEffect(e,t)};le.useMemo=function(e,t){return bt.current.useMemo(e,t)};le.useReducer=function(e,t,n){return bt.current.useReducer(e,t,n)};le.useRef=function(e){return bt.current.useRef(e)};le.useState=function(e){return bt.current.useState(e)};le.useSyncExternalStore=function(e,t,n){return bt.current.useSyncExternalStore(e,t,n)};le.useTransition=function(){return bt.current.useTransition()};le.version="18.3.1";Qv.exports=le;var _=Qv.exports;const Ns=su(_);/**
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 sC=_,oC=Symbol.for("react.element"),aC=Symbol.for("react.fragment"),lC=Object.prototype.hasOwnProperty,cC=sC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uC={key:!0,ref:!0,__self:!0,__source:!0};function r1(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)lC.call(t,r)&&!uC.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:oC,type:e,key:s,ref:o,props:i,_owner:cC.current}}ou.Fragment=aC;ou.jsx=r1;ou.jsxs=r1;Kv.exports=ou;var f=Kv.exports,i1={exports:{}},qt={},s1={exports:{}},o1={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(D,O){var k=D.length;D.push(O);e:for(;0<k;){var V=k-1>>>1,q=D[V];if(0<i(q,O))D[V]=O,D[k]=q,k=V;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var O=D[0],k=D.pop();if(k!==O){D[0]=k;e:for(var V=0,q=D.length,T=q>>>1;V<T;){var ue=2*(V+1)-1,he=D[ue],pe=ue+1,ot=D[pe];if(0>i(he,k))pe<q&&0>i(ot,he)?(D[V]=ot,D[pe]=k,V=pe):(D[V]=he,D[ue]=k,V=ue);else if(pe<q&&0>i(ot,k))D[V]=ot,D[pe]=k,V=pe;else break e}}return O}function i(D,O){var k=D.sortIndex-O.sortIndex;return k!==0?k:D.id-O.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=[],c=[],u=1,d=null,h=3,p=!1,m=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(D){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=D)r(c),O.sortIndex=O.expirationTime,t(l,O);else break;O=n(c)}}function b(D){if(y=!1,v(D),!m)if(n(l)!==null)m=!0,G(S);else{var O=n(c);O!==null&&A(b,O.startTime-D)}}function S(D,O){m=!1,y&&(y=!1,g(j),j=-1),p=!0;var k=h;try{for(v(O),d=n(l);d!==null&&(!(d.expirationTime>O)||D&&!R());){var V=d.callback;if(typeof V=="function"){d.callback=null,h=d.priorityLevel;var q=V(d.expirationTime<=O);O=e.unstable_now(),typeof q=="function"?d.callback=q:d===n(l)&&r(l),v(O)}else r(l);d=n(l)}if(d!==null)var T=!0;else{var ue=n(c);ue!==null&&A(b,ue.startTime-O),T=!1}return T}finally{d=null,h=k,p=!1}}var C=!1,E=null,j=-1,L=5,P=-1;function R(){return!(e.unstable_now()-P<L)}function I(){if(E!==null){var D=e.unstable_now();P=D;var O=!0;try{O=E(!0,D)}finally{O?F():(C=!1,E=null)}}else C=!1}var F;if(typeof x=="function")F=function(){x(I)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,z=B.port2;B.port1.onmessage=I,F=function(){z.postMessage(null)}}else F=function(){w(I,0)};function G(D){E=D,C||(C=!0,F())}function A(D,O){j=w(function(){D(e.unstable_now())},O)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,G(S))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(D){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var k=h;h=O;try{return D()}finally{h=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,O){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var k=h;h=D;try{return O()}finally{h=k}},e.unstable_scheduleCallback=function(D,O,k){var V=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?V+k:V):k=V,D){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=k+q,D={id:u++,callback:O,priorityLevel:D,startTime:k,expirationTime:q,sortIndex:-1},k>V?(D.sortIndex=k,t(c,D),n(l)===null&&D===n(c)&&(y?(g(j),j=-1):y=!0,A(b,k-V))):(D.sortIndex=q,t(l,D),m||p||(m=!0,G(S))),D},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(D){var O=h;return function(){var k=h;h=O;try{return D.apply(this,arguments)}finally{h=k}}}})(o1);s1.exports=o1;var dC=s1.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 fC=_,Kt=dC;function U(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 a1=new Set,ia={};function Hi(e,t){zs(e,t),zs(e+"Capture",t)}function zs(e,t){for(ia[e]=t,e=0;e<t.length;e++)a1.add(t[e])}var lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xf=Object.prototype.hasOwnProperty,hC=/^[: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]*$/,wg={},bg={};function pC(e){return xf.call(bg,e)?!0:xf.call(wg,e)?!1:hC.test(e)?bg[e]=!0:(wg[e]=!0,!1)}function mC(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 gC(e,t,n,r){if(t===null||typeof t>"u"||mC(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 kt(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 st={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){st[e]=new kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];st[t]=new kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){st[e]=new kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){st[e]=new kt(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){st[e]=new kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){st[e]=new kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){st[e]=new kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){st[e]=new kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){st[e]=new kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var dp=/[\-:]([a-z])/g;function fp(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(dp,fp);st[t]=new kt(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(dp,fp);st[t]=new kt(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(dp,fp);st[t]=new kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){st[e]=new kt(e,1,!1,e.toLowerCase(),null,!1,!1)});st.xlinkHref=new kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){st[e]=new kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function hp(e,t,n,r){var i=st.hasOwnProperty(t)?st[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(gC(t,n,i,r)&&(n=null),r||i===null?pC(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 fr=fC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ga=Symbol.for("react.element"),cs=Symbol.for("react.portal"),us=Symbol.for("react.fragment"),pp=Symbol.for("react.strict_mode"),vf=Symbol.for("react.profiler"),l1=Symbol.for("react.provider"),c1=Symbol.for("react.context"),mp=Symbol.for("react.forward_ref"),wf=Symbol.for("react.suspense"),bf=Symbol.for("react.suspense_list"),gp=Symbol.for("react.memo"),Rr=Symbol.for("react.lazy"),u1=Symbol.for("react.offscreen"),kg=Symbol.iterator;function po(e){return e===null||typeof e!="object"?null:(e=kg&&e[kg]||e["@@iterator"],typeof e=="function"?e:null)}var De=Object.assign,Hu;function Do(e){if(Hu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Hu=t&&t[1]||""}return`
34
- `+Hu+e}var Gu=!1;function Ku(e,t){if(!e||Gu)return"";Gu=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.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{Gu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Do(e):""}function yC(e){switch(e.tag){case 5:return Do(e.type);case 16:return Do("Lazy");case 13:return Do("Suspense");case 19:return Do("SuspenseList");case 0:case 2:case 15:return e=Ku(e.type,!1),e;case 11:return e=Ku(e.type.render,!1),e;case 1:return e=Ku(e.type,!0),e;default:return""}}function kf(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 us:return"Fragment";case cs:return"Portal";case vf:return"Profiler";case pp:return"StrictMode";case wf:return"Suspense";case bf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c1:return(e.displayName||"Context")+".Consumer";case l1:return(e._context.displayName||"Context")+".Provider";case mp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gp:return t=e.displayName||null,t!==null?t:kf(e.type)||"Memo";case Rr:t=e._payload,e=e._init;try{return kf(e(t))}catch{}}return null}function xC(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 kf(t);case 8:return t===pp?"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 ei(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function d1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vC(e){var t=d1(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 Ka(e){e._valueTracker||(e._valueTracker=vC(e))}function f1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=d1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function dc(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 _f(e,t){var n=t.checked;return De({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _g(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ei(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 h1(e,t){t=t.checked,t!=null&&hp(e,"checked",t,!1)}function Sf(e,t){h1(e,t);var n=ei(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,ei(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sg(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"||dc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var No=Array.isArray;function Cs(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=""+ei(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 Pf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return De({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Cg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(No(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ei(n)}}function p1(e,t){var n=ei(t.value),r=ei(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 Pg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function m1(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 jf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?m1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qa,g1=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(Qa=Qa||document.createElement("div"),Qa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vo={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},wC=["Webkit","ms","Moz","O"];Object.keys(Vo).forEach(function(e){wC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vo[t]=Vo[e]})});function y1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vo.hasOwnProperty(e)&&Vo[e]?(""+t).trim():t+"px"}function x1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=y1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var bC=De({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ef(e,t){if(t){if(bC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function Tf(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 Rf=null;function yp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lf=null,Ps=null,js=null;function jg(e){if(e=Aa(e)){if(typeof Lf!="function")throw Error(U(280));var t=e.stateNode;t&&(t=du(t),Lf(e.stateNode,e.type,t))}}function v1(e){Ps?js?js.push(e):js=[e]:Ps=e}function w1(){if(Ps){var e=Ps,t=js;if(js=Ps=null,jg(e),t)for(e=0;e<t.length;e++)jg(t[e])}}function b1(e,t){return e(t)}function k1(){}var Qu=!1;function _1(e,t,n){if(Qu)return e(t,n);Qu=!0;try{return b1(e,t,n)}finally{Qu=!1,(Ps!==null||js!==null)&&(k1(),w1())}}function oa(e,t){var n=e.stateNode;if(n===null)return null;var r=du(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(U(231,t,typeof n));return n}var Mf=!1;if(lr)try{var mo={};Object.defineProperty(mo,"passive",{get:function(){Mf=!0}}),window.addEventListener("test",mo,mo),window.removeEventListener("test",mo,mo)}catch{Mf=!1}function kC(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Wo=!1,fc=null,hc=!1,If=null,_C={onError:function(e){Wo=!0,fc=e}};function SC(e,t,n,r,i,s,o,a,l){Wo=!1,fc=null,kC.apply(_C,arguments)}function CC(e,t,n,r,i,s,o,a,l){if(SC.apply(this,arguments),Wo){if(Wo){var c=fc;Wo=!1,fc=null}else throw Error(U(198));hc||(hc=!0,If=c)}}function Gi(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 S1(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 Eg(e){if(Gi(e)!==e)throw Error(U(188))}function PC(e){var t=e.alternate;if(!t){if(t=Gi(e),t===null)throw Error(U(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 Eg(i),e;if(s===r)return Eg(i),t;s=s.sibling}throw Error(U(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(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function C1(e){return e=PC(e),e!==null?P1(e):null}function P1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=P1(e);if(t!==null)return t;e=e.sibling}return null}var j1=Kt.unstable_scheduleCallback,Tg=Kt.unstable_cancelCallback,jC=Kt.unstable_shouldYield,EC=Kt.unstable_requestPaint,$e=Kt.unstable_now,TC=Kt.unstable_getCurrentPriorityLevel,xp=Kt.unstable_ImmediatePriority,E1=Kt.unstable_UserBlockingPriority,pc=Kt.unstable_NormalPriority,RC=Kt.unstable_LowPriority,T1=Kt.unstable_IdlePriority,au=null,Un=null;function LC(e){if(Un&&typeof Un.onCommitFiberRoot=="function")try{Un.onCommitFiberRoot(au,e,void 0,(e.current.flags&128)===128)}catch{}}var Pn=Math.clz32?Math.clz32:AC,MC=Math.log,IC=Math.LN2;function AC(e){return e>>>=0,e===0?32:31-(MC(e)/IC|0)|0}var Ya=64,qa=4194304;function zo(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 mc(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=zo(a):(s&=o,s!==0&&(r=zo(s)))}else o=n&~i,o!==0?r=zo(o):s!==0&&(r=zo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Pn(t),i=1<<n,r|=e[n],t&=~i;return r}function DC(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 NC(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Pn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=DC(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Af(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function R1(){var e=Ya;return Ya<<=1,!(Ya&4194240)&&(Ya=64),e}function Yu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ma(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pn(t),e[t]=n}function zC(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Pn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function vp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var xe=0;function L1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var M1,wp,I1,A1,D1,Df=!1,Xa=[],Ur=null,Hr=null,Gr=null,aa=new Map,la=new Map,Ir=[],FC="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 Rg(e,t){switch(e){case"focusin":case"focusout":Ur=null;break;case"dragenter":case"dragleave":Hr=null;break;case"mouseover":case"mouseout":Gr=null;break;case"pointerover":case"pointerout":aa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":la.delete(t.pointerId)}}function go(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=Aa(t),t!==null&&wp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function BC(e,t,n,r,i){switch(t){case"focusin":return Ur=go(Ur,e,t,n,r,i),!0;case"dragenter":return Hr=go(Hr,e,t,n,r,i),!0;case"mouseover":return Gr=go(Gr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return aa.set(s,go(aa.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,la.set(s,go(la.get(s)||null,e,t,n,r,i)),!0}return!1}function N1(e){var t=Ci(e.target);if(t!==null){var n=Gi(t);if(n!==null){if(t=n.tag,t===13){if(t=S1(n),t!==null){e.blockedOn=t,D1(e.priority,function(){I1(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 Nl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Nf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Rf=r,n.target.dispatchEvent(r),Rf=null}else return t=Aa(n),t!==null&&wp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lg(e,t,n){Nl(e)&&n.delete(t)}function OC(){Df=!1,Ur!==null&&Nl(Ur)&&(Ur=null),Hr!==null&&Nl(Hr)&&(Hr=null),Gr!==null&&Nl(Gr)&&(Gr=null),aa.forEach(Lg),la.forEach(Lg)}function yo(e,t){e.blockedOn===t&&(e.blockedOn=null,Df||(Df=!0,Kt.unstable_scheduleCallback(Kt.unstable_NormalPriority,OC)))}function ca(e){function t(i){return yo(i,e)}if(0<Xa.length){yo(Xa[0],e);for(var n=1;n<Xa.length;n++){var r=Xa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ur!==null&&yo(Ur,e),Hr!==null&&yo(Hr,e),Gr!==null&&yo(Gr,e),aa.forEach(t),la.forEach(t),n=0;n<Ir.length;n++)r=Ir[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ir.length&&(n=Ir[0],n.blockedOn===null);)N1(n),n.blockedOn===null&&Ir.shift()}var Es=fr.ReactCurrentBatchConfig,gc=!0;function $C(e,t,n,r){var i=xe,s=Es.transition;Es.transition=null;try{xe=1,bp(e,t,n,r)}finally{xe=i,Es.transition=s}}function VC(e,t,n,r){var i=xe,s=Es.transition;Es.transition=null;try{xe=4,bp(e,t,n,r)}finally{xe=i,Es.transition=s}}function bp(e,t,n,r){if(gc){var i=Nf(e,t,n,r);if(i===null)sd(e,t,r,yc,n),Rg(e,r);else if(BC(i,e,t,n,r))r.stopPropagation();else if(Rg(e,r),t&4&&-1<FC.indexOf(e)){for(;i!==null;){var s=Aa(i);if(s!==null&&M1(s),s=Nf(e,t,n,r),s===null&&sd(e,t,r,yc,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else sd(e,t,r,null,n)}}var yc=null;function Nf(e,t,n,r){if(yc=null,e=yp(r),e=Ci(e),e!==null)if(t=Gi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=S1(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 yc=e,null}function z1(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(TC()){case xp:return 1;case E1:return 4;case pc:case RC:return 16;case T1:return 536870912;default:return 16}default:return 16}}var Dr=null,kp=null,zl=null;function F1(){if(zl)return zl;var e,t=kp,n=t.length,r,i="value"in Dr?Dr.value:Dr.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 zl=i.slice(e,1<r?1-r:void 0)}function Fl(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 Za(){return!0}function Mg(){return!1}function Xt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Za:Mg,this.isPropagationStopped=Mg,this}return De(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Za)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Za)},persist:function(){},isPersistent:Za}),t}var Xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_p=Xt(Xs),Ia=De({},Xs,{view:0,detail:0}),WC=Xt(Ia),qu,Xu,xo,lu=De({},Ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sp,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!==xo&&(xo&&e.type==="mousemove"?(qu=e.screenX-xo.screenX,Xu=e.screenY-xo.screenY):Xu=qu=0,xo=e),qu)},movementY:function(e){return"movementY"in e?e.movementY:Xu}}),Ig=Xt(lu),UC=De({},lu,{dataTransfer:0}),HC=Xt(UC),GC=De({},Ia,{relatedTarget:0}),Zu=Xt(GC),KC=De({},Xs,{animationName:0,elapsedTime:0,pseudoElement:0}),QC=Xt(KC),YC=De({},Xs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qC=Xt(YC),XC=De({},Xs,{data:0}),Ag=Xt(XC),ZC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},JC={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"},eP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tP(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=eP[e])?!!t[e]:!1}function Sp(){return tP}var nP=De({},Ia,{key:function(e){if(e.key){var t=ZC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?JC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sp,charCode:function(e){return e.type==="keypress"?Fl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rP=Xt(nP),iP=De({},lu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dg=Xt(iP),sP=De({},Ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sp}),oP=Xt(sP),aP=De({},Xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),lP=Xt(aP),cP=De({},lu,{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}),uP=Xt(cP),dP=[9,13,27,32],Cp=lr&&"CompositionEvent"in window,Uo=null;lr&&"documentMode"in document&&(Uo=document.documentMode);var fP=lr&&"TextEvent"in window&&!Uo,B1=lr&&(!Cp||Uo&&8<Uo&&11>=Uo),Ng=" ",zg=!1;function O1(e,t){switch(e){case"keyup":return dP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ds=!1;function hP(e,t){switch(e){case"compositionend":return $1(t);case"keypress":return t.which!==32?null:(zg=!0,Ng);case"textInput":return e=t.data,e===Ng&&zg?null:e;default:return null}}function pP(e,t){if(ds)return e==="compositionend"||!Cp&&O1(e,t)?(e=F1(),zl=kp=Dr=null,ds=!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 B1&&t.locale!=="ko"?null:t.data;default:return null}}var mP={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 Fg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mP[e.type]:t==="textarea"}function V1(e,t,n,r){v1(r),t=xc(t,"onChange"),0<t.length&&(n=new _p("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ho=null,ua=null;function gP(e){J1(e,0)}function cu(e){var t=ps(e);if(f1(t))return e}function yP(e,t){if(e==="change")return t}var W1=!1;if(lr){var Ju;if(lr){var ed="oninput"in document;if(!ed){var Bg=document.createElement("div");Bg.setAttribute("oninput","return;"),ed=typeof Bg.oninput=="function"}Ju=ed}else Ju=!1;W1=Ju&&(!document.documentMode||9<document.documentMode)}function Og(){Ho&&(Ho.detachEvent("onpropertychange",U1),ua=Ho=null)}function U1(e){if(e.propertyName==="value"&&cu(ua)){var t=[];V1(t,ua,e,yp(e)),_1(gP,t)}}function xP(e,t,n){e==="focusin"?(Og(),Ho=t,ua=n,Ho.attachEvent("onpropertychange",U1)):e==="focusout"&&Og()}function vP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cu(ua)}function wP(e,t){if(e==="click")return cu(t)}function bP(e,t){if(e==="input"||e==="change")return cu(t)}function kP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:kP;function da(e,t){if(Tn(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(!xf.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function $g(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vg(e,t){var n=$g(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=$g(n)}}function H1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?H1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function G1(){for(var e=window,t=dc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=dc(e.document)}return t}function Pp(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 _P(e){var t=G1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&H1(n.ownerDocument.documentElement,n)){if(r!==null&&Pp(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=Vg(n,s);var o=Vg(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 SP=lr&&"documentMode"in document&&11>=document.documentMode,fs=null,zf=null,Go=null,Ff=!1;function Wg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ff||fs==null||fs!==dc(r)||(r=fs,"selectionStart"in r&&Pp(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}),Go&&da(Go,r)||(Go=r,r=xc(zf,"onSelect"),0<r.length&&(t=new _p("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fs)))}function Ja(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hs={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionend:Ja("Transition","TransitionEnd")},td={},K1={};lr&&(K1=document.createElement("div").style,"AnimationEvent"in window||(delete hs.animationend.animation,delete hs.animationiteration.animation,delete hs.animationstart.animation),"TransitionEvent"in window||delete hs.transitionend.transition);function uu(e){if(td[e])return td[e];if(!hs[e])return e;var t=hs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in K1)return td[e]=t[n];return e}var Q1=uu("animationend"),Y1=uu("animationiteration"),q1=uu("animationstart"),X1=uu("transitionend"),Z1=new Map,Ug="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 si(e,t){Z1.set(e,t),Hi(t,[e])}for(var nd=0;nd<Ug.length;nd++){var rd=Ug[nd],CP=rd.toLowerCase(),PP=rd[0].toUpperCase()+rd.slice(1);si(CP,"on"+PP)}si(Q1,"onAnimationEnd");si(Y1,"onAnimationIteration");si(q1,"onAnimationStart");si("dblclick","onDoubleClick");si("focusin","onFocus");si("focusout","onBlur");si(X1,"onTransitionEnd");zs("onMouseEnter",["mouseout","mouseover"]);zs("onMouseLeave",["mouseout","mouseover"]);zs("onPointerEnter",["pointerout","pointerover"]);zs("onPointerLeave",["pointerout","pointerover"]);Hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Hi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fo="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(" "),jP=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fo));function Hg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,CC(r,t,void 0,e),e.currentTarget=null}function J1(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,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;Hg(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;Hg(i,a,c),s=l}}}if(hc)throw e=If,hc=!1,If=null,e}function Ee(e,t){var n=t[Wf];n===void 0&&(n=t[Wf]=new Set);var r=e+"__bubble";n.has(r)||(ew(t,e,2,!1),n.add(r))}function id(e,t,n){var r=0;t&&(r|=4),ew(n,e,r,t)}var el="_reactListening"+Math.random().toString(36).slice(2);function fa(e){if(!e[el]){e[el]=!0,a1.forEach(function(n){n!=="selectionchange"&&(jP.has(n)||id(n,!1,e),id(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[el]||(t[el]=!0,id("selectionchange",!1,t))}}function ew(e,t,n,r){switch(z1(t)){case 1:var i=$C;break;case 4:i=VC;break;default:i=bp}n=i.bind(null,t,n,e),i=void 0,!Mf||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 sd(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=Ci(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}_1(function(){var c=s,u=yp(n),d=[];e:{var h=Z1.get(e);if(h!==void 0){var p=_p,m=e;switch(e){case"keypress":if(Fl(n)===0)break e;case"keydown":case"keyup":p=rP;break;case"focusin":m="focus",p=Zu;break;case"focusout":m="blur",p=Zu;break;case"beforeblur":case"afterblur":p=Zu;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":p=Ig;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=HC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=oP;break;case Q1:case Y1:case q1:p=QC;break;case X1:p=lP;break;case"scroll":p=WC;break;case"wheel":p=uP;break;case"copy":case"cut":case"paste":p=qC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Dg}var y=(t&4)!==0,w=!y&&e==="scroll",g=y?h!==null?h+"Capture":null:h;y=[];for(var x=c,v;x!==null;){v=x;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,g!==null&&(b=oa(x,g),b!=null&&y.push(ha(x,b,v)))),w)break;x=x.return}0<y.length&&(h=new p(h,m,null,n,u),d.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Rf&&(m=n.relatedTarget||n.fromElement)&&(Ci(m)||m[cr]))break e;if((p||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=c,m=m?Ci(m):null,m!==null&&(w=Gi(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=c),p!==m)){if(y=Ig,b="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=Dg,b="onPointerLeave",g="onPointerEnter",x="pointer"),w=p==null?h:ps(p),v=m==null?h:ps(m),h=new y(b,x+"leave",p,n,u),h.target=w,h.relatedTarget=v,b=null,Ci(u)===c&&(y=new y(g,x+"enter",m,n,u),y.target=v,y.relatedTarget=w,b=y),w=b,p&&m)t:{for(y=p,g=m,x=0,v=y;v;v=Xi(v))x++;for(v=0,b=g;b;b=Xi(b))v++;for(;0<x-v;)y=Xi(y),x--;for(;0<v-x;)g=Xi(g),v--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=Xi(y),g=Xi(g)}y=null}else y=null;p!==null&&Gg(d,h,p,y,!1),m!==null&&w!==null&&Gg(d,w,m,y,!0)}}e:{if(h=c?ps(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var S=yP;else if(Fg(h))if(W1)S=bP;else{S=vP;var C=xP}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(S=wP);if(S&&(S=S(e,c))){V1(d,S,n,u);break e}C&&C(e,h,c),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&Cf(h,"number",h.value)}switch(C=c?ps(c):window,e){case"focusin":(Fg(C)||C.contentEditable==="true")&&(fs=C,zf=c,Go=null);break;case"focusout":Go=zf=fs=null;break;case"mousedown":Ff=!0;break;case"contextmenu":case"mouseup":case"dragend":Ff=!1,Wg(d,n,u);break;case"selectionchange":if(SP)break;case"keydown":case"keyup":Wg(d,n,u)}var E;if(Cp)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else ds?O1(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(B1&&n.locale!=="ko"&&(ds||j!=="onCompositionStart"?j==="onCompositionEnd"&&ds&&(E=F1()):(Dr=u,kp="value"in Dr?Dr.value:Dr.textContent,ds=!0)),C=xc(c,j),0<C.length&&(j=new Ag(j,e,null,n,u),d.push({event:j,listeners:C}),E?j.data=E:(E=$1(n),E!==null&&(j.data=E)))),(E=fP?hP(e,n):pP(e,n))&&(c=xc(c,"onBeforeInput"),0<c.length&&(u=new Ag("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=E))}J1(d,t)})}function ha(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=oa(e,n),s!=null&&r.unshift(ha(e,s,i)),s=oa(e,t),s!=null&&r.push(ha(e,s,i))),e=e.return}return r}function Xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Gg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=oa(n,s),l!=null&&o.unshift(ha(n,l,a))):i||(l=oa(n,s),l!=null&&o.push(ha(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var EP=/\r\n?/g,TP=/\u0000|\uFFFD/g;function Kg(e){return(typeof e=="string"?e:""+e).replace(EP,`
38
- `).replace(TP,"")}function tl(e,t,n){if(t=Kg(t),Kg(e)!==t&&n)throw Error(U(425))}function vc(){}var Bf=null,Of=null;function $f(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 Vf=typeof setTimeout=="function"?setTimeout:void 0,RP=typeof clearTimeout=="function"?clearTimeout:void 0,Qg=typeof Promise=="function"?Promise:void 0,LP=typeof queueMicrotask=="function"?queueMicrotask:typeof Qg<"u"?function(e){return Qg.resolve(null).then(e).catch(MP)}:Vf;function MP(e){setTimeout(function(){throw e})}function od(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),ca(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ca(t)}function Kr(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 Yg(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 Zs=Math.random().toString(36).slice(2),Vn="__reactFiber$"+Zs,pa="__reactProps$"+Zs,cr="__reactContainer$"+Zs,Wf="__reactEvents$"+Zs,IP="__reactListeners$"+Zs,AP="__reactHandles$"+Zs;function Ci(e){var t=e[Vn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cr]||n[Vn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Yg(e);e!==null;){if(n=e[Vn])return n;e=Yg(e)}return t}e=n,n=e.parentNode}return null}function Aa(e){return e=e[Vn]||e[cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ps(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function du(e){return e[pa]||null}var Uf=[],ms=-1;function oi(e){return{current:e}}function Te(e){0>ms||(e.current=Uf[ms],Uf[ms]=null,ms--)}function Se(e,t){ms++,Uf[ms]=e.current,e.current=t}var ti={},mt=oi(ti),Tt=oi(!1),Oi=ti;function Fs(e,t){var n=e.type.contextTypes;if(!n)return ti;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 Rt(e){return e=e.childContextTypes,e!=null}function wc(){Te(Tt),Te(mt)}function qg(e,t,n){if(mt.current!==ti)throw Error(U(168));Se(mt,t),Se(Tt,n)}function tw(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(U(108,xC(e)||"Unknown",i));return De({},n,r)}function bc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Oi=mt.current,Se(mt,e),Se(Tt,Tt.current),!0}function Xg(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=tw(e,t,Oi),r.__reactInternalMemoizedMergedChildContext=e,Te(Tt),Te(mt),Se(mt,e)):Te(Tt),Se(Tt,n)}var rr=null,fu=!1,ad=!1;function nw(e){rr===null?rr=[e]:rr.push(e)}function DP(e){fu=!0,nw(e)}function ai(){if(!ad&&rr!==null){ad=!0;var e=0,t=xe;try{var n=rr;for(xe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}rr=null,fu=!1}catch(i){throw rr!==null&&(rr=rr.slice(e+1)),j1(xp,ai),i}finally{xe=t,ad=!1}}return null}var gs=[],ys=0,kc=null,_c=0,on=[],an=0,$i=null,ir=1,sr="";function vi(e,t){gs[ys++]=_c,gs[ys++]=kc,kc=e,_c=t}function rw(e,t,n){on[an++]=ir,on[an++]=sr,on[an++]=$i,$i=e;var r=ir;e=sr;var i=32-Pn(r)-1;r&=~(1<<i),n+=1;var s=32-Pn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ir=1<<32-Pn(t)+i|n<<i|r,sr=s+e}else ir=1<<s|n<<i|r,sr=e}function jp(e){e.return!==null&&(vi(e,1),rw(e,1,0))}function Ep(e){for(;e===kc;)kc=gs[--ys],gs[ys]=null,_c=gs[--ys],gs[ys]=null;for(;e===$i;)$i=on[--an],on[an]=null,sr=on[--an],on[an]=null,ir=on[--an],on[an]=null}var Ut=null,$t=null,Le=!1,Sn=null;function iw(e,t){var n=cn(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 Zg(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,Ut=e,$t=Kr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ut=e,$t=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=$i!==null?{id:ir,overflow:sr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=cn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ut=e,$t=null,!0):!1;default:return!1}}function Hf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gf(e){if(Le){var t=$t;if(t){var n=t;if(!Zg(e,t)){if(Hf(e))throw Error(U(418));t=Kr(n.nextSibling);var r=Ut;t&&Zg(e,t)?iw(r,n):(e.flags=e.flags&-4097|2,Le=!1,Ut=e)}}else{if(Hf(e))throw Error(U(418));e.flags=e.flags&-4097|2,Le=!1,Ut=e}}}function Jg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ut=e}function nl(e){if(e!==Ut)return!1;if(!Le)return Jg(e),Le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$f(e.type,e.memoizedProps)),t&&(t=$t)){if(Hf(e))throw sw(),Error(U(418));for(;t;)iw(e,t),t=Kr(t.nextSibling)}if(Jg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){$t=Kr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$t=null}}else $t=Ut?Kr(e.stateNode.nextSibling):null;return!0}function sw(){for(var e=$t;e;)e=Kr(e.nextSibling)}function Bs(){$t=Ut=null,Le=!1}function Tp(e){Sn===null?Sn=[e]:Sn.push(e)}var NP=fr.ReactCurrentBatchConfig;function vo(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(U(309));var r=n.stateNode}if(!r)throw Error(U(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(U(284));if(!n._owner)throw Error(U(290,e))}return e}function rl(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ey(e){var t=e._init;return t(e._payload)}function ow(e){function t(g,x){if(e){var v=g.deletions;v===null?(g.deletions=[x],g.flags|=16):v.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=Xr(g,x),g.index=0,g.sibling=null,g}function s(g,x,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<x?(g.flags|=2,x):v):(g.flags|=2,x)):(g.flags|=1048576,x)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,x,v,b){return x===null||x.tag!==6?(x=pd(v,g.mode,b),x.return=g,x):(x=i(x,v),x.return=g,x)}function l(g,x,v,b){var S=v.type;return S===us?u(g,x,v.props.children,b,v.key):x!==null&&(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Rr&&ey(S)===x.type)?(b=i(x,v.props),b.ref=vo(g,x,v),b.return=g,b):(b=Hl(v.type,v.key,v.props,null,g.mode,b),b.ref=vo(g,x,v),b.return=g,b)}function c(g,x,v,b){return x===null||x.tag!==4||x.stateNode.containerInfo!==v.containerInfo||x.stateNode.implementation!==v.implementation?(x=md(v,g.mode,b),x.return=g,x):(x=i(x,v.children||[]),x.return=g,x)}function u(g,x,v,b,S){return x===null||x.tag!==7?(x=Ii(v,g.mode,b,S),x.return=g,x):(x=i(x,v),x.return=g,x)}function d(g,x,v){if(typeof x=="string"&&x!==""||typeof x=="number")return x=pd(""+x,g.mode,v),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ga:return v=Hl(x.type,x.key,x.props,null,g.mode,v),v.ref=vo(g,null,x),v.return=g,v;case cs:return x=md(x,g.mode,v),x.return=g,x;case Rr:var b=x._init;return d(g,b(x._payload),v)}if(No(x)||po(x))return x=Ii(x,g.mode,v,null),x.return=g,x;rl(g,x)}return null}function h(g,x,v,b){var S=x!==null?x.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(g,x,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ga:return v.key===S?l(g,x,v,b):null;case cs:return v.key===S?c(g,x,v,b):null;case Rr:return S=v._init,h(g,x,S(v._payload),b)}if(No(v)||po(v))return S!==null?null:u(g,x,v,b,null);rl(g,v)}return null}function p(g,x,v,b,S){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(v)||null,a(x,g,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Ga:return g=g.get(b.key===null?v:b.key)||null,l(x,g,b,S);case cs:return g=g.get(b.key===null?v:b.key)||null,c(x,g,b,S);case Rr:var C=b._init;return p(g,x,v,C(b._payload),S)}if(No(b)||po(b))return g=g.get(v)||null,u(x,g,b,S,null);rl(x,b)}return null}function m(g,x,v,b){for(var S=null,C=null,E=x,j=x=0,L=null;E!==null&&j<v.length;j++){E.index>j?(L=E,E=null):L=E.sibling;var P=h(g,E,v[j],b);if(P===null){E===null&&(E=L);break}e&&E&&P.alternate===null&&t(g,E),x=s(P,x,j),C===null?S=P:C.sibling=P,C=P,E=L}if(j===v.length)return n(g,E),Le&&vi(g,j),S;if(E===null){for(;j<v.length;j++)E=d(g,v[j],b),E!==null&&(x=s(E,x,j),C===null?S=E:C.sibling=E,C=E);return Le&&vi(g,j),S}for(E=r(g,E);j<v.length;j++)L=p(E,g,j,v[j],b),L!==null&&(e&&L.alternate!==null&&E.delete(L.key===null?j:L.key),x=s(L,x,j),C===null?S=L:C.sibling=L,C=L);return e&&E.forEach(function(R){return t(g,R)}),Le&&vi(g,j),S}function y(g,x,v,b){var S=po(v);if(typeof S!="function")throw Error(U(150));if(v=S.call(v),v==null)throw Error(U(151));for(var C=S=null,E=x,j=x=0,L=null,P=v.next();E!==null&&!P.done;j++,P=v.next()){E.index>j?(L=E,E=null):L=E.sibling;var R=h(g,E,P.value,b);if(R===null){E===null&&(E=L);break}e&&E&&R.alternate===null&&t(g,E),x=s(R,x,j),C===null?S=R:C.sibling=R,C=R,E=L}if(P.done)return n(g,E),Le&&vi(g,j),S;if(E===null){for(;!P.done;j++,P=v.next())P=d(g,P.value,b),P!==null&&(x=s(P,x,j),C===null?S=P:C.sibling=P,C=P);return Le&&vi(g,j),S}for(E=r(g,E);!P.done;j++,P=v.next())P=p(E,g,j,P.value,b),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?j:P.key),x=s(P,x,j),C===null?S=P:C.sibling=P,C=P);return e&&E.forEach(function(I){return t(g,I)}),Le&&vi(g,j),S}function w(g,x,v,b){if(typeof v=="object"&&v!==null&&v.type===us&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ga:e:{for(var S=v.key,C=x;C!==null;){if(C.key===S){if(S=v.type,S===us){if(C.tag===7){n(g,C.sibling),x=i(C,v.props.children),x.return=g,g=x;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Rr&&ey(S)===C.type){n(g,C.sibling),x=i(C,v.props),x.ref=vo(g,C,v),x.return=g,g=x;break e}n(g,C);break}else t(g,C);C=C.sibling}v.type===us?(x=Ii(v.props.children,g.mode,b,v.key),x.return=g,g=x):(b=Hl(v.type,v.key,v.props,null,g.mode,b),b.ref=vo(g,x,v),b.return=g,g=b)}return o(g);case cs:e:{for(C=v.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===v.containerInfo&&x.stateNode.implementation===v.implementation){n(g,x.sibling),x=i(x,v.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=md(v,g.mode,b),x.return=g,g=x}return o(g);case Rr:return C=v._init,w(g,x,C(v._payload),b)}if(No(v))return m(g,x,v,b);if(po(v))return y(g,x,v,b);rl(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,v),x.return=g,g=x):(n(g,x),x=pd(v,g.mode,b),x.return=g,g=x),o(g)):n(g,x)}return w}var Os=ow(!0),aw=ow(!1),Sc=oi(null),Cc=null,xs=null,Rp=null;function Lp(){Rp=xs=Cc=null}function Mp(e){var t=Sc.current;Te(Sc),e._currentValue=t}function Kf(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 Ts(e,t){Cc=e,Rp=xs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function pn(e){var t=e._currentValue;if(Rp!==e)if(e={context:e,memoizedValue:t,next:null},xs===null){if(Cc===null)throw Error(U(308));xs=e,Cc.dependencies={lanes:0,firstContext:e}}else xs=xs.next=e;return t}var Pi=null;function Ip(e){Pi===null?Pi=[e]:Pi.push(e)}function lw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ip(t)):(n.next=i.next,i.next=n),t.interleaved=n,ur(e,r)}function ur(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 Lr=!1;function Ap(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cw(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 or(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,de&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ur(e,n)}return i=r.interleaved,i===null?(t.next=t,Ip(r)):(t.next=i.next,i.next=t),r.interleaved=t,ur(e,n)}function Bl(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,vp(e,n)}}function ty(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 Pc(e,t,n,r){var i=e.updateQueue;Lr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,u=c=l=null,a=s;do{var h=a.lane,p=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(h=t,p=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(p,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(p,d,h):m,h==null)break e;d=De({},d,h);break e;case 2:Lr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,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(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,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);Wi|=o,e.lanes=o,e.memoizedState=d}}function ny(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(U(191,i));i.call(r)}}}var Da={},Hn=oi(Da),ma=oi(Da),ga=oi(Da);function ji(e){if(e===Da)throw Error(U(174));return e}function Dp(e,t){switch(Se(ga,t),Se(ma,e),Se(Hn,Da),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jf(t,e)}Te(Hn),Se(Hn,t)}function $s(){Te(Hn),Te(ma),Te(ga)}function uw(e){ji(ga.current);var t=ji(Hn.current),n=jf(t,e.type);t!==n&&(Se(ma,e),Se(Hn,n))}function Np(e){ma.current===e&&(Te(Hn),Te(ma))}var Ie=oi(0);function jc(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 ld=[];function zp(){for(var e=0;e<ld.length;e++)ld[e]._workInProgressVersionPrimary=null;ld.length=0}var Ol=fr.ReactCurrentDispatcher,cd=fr.ReactCurrentBatchConfig,Vi=0,Ae=null,Ye=null,Je=null,Ec=!1,Ko=!1,ya=0,zP=0;function ut(){throw Error(U(321))}function Fp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function Bp(e,t,n,r,i,s){if(Vi=s,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ol.current=e===null||e.memoizedState===null?$P:VP,e=n(r,i),Ko){s=0;do{if(Ko=!1,ya=0,25<=s)throw Error(U(301));s+=1,Je=Ye=null,t.updateQueue=null,Ol.current=WP,e=n(r,i)}while(Ko)}if(Ol.current=Tc,t=Ye!==null&&Ye.next!==null,Vi=0,Je=Ye=Ae=null,Ec=!1,t)throw Error(U(300));return e}function Op(){var e=ya!==0;return ya=0,e}function zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?Ae.memoizedState=Je=e:Je=Je.next=e,Je}function mn(){if(Ye===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=Je===null?Ae.memoizedState:Je.next;if(t!==null)Je=t,Ye=e;else{if(e===null)throw Error(U(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},Je===null?Ae.memoizedState=Je=e:Je=Je.next=e}return Je}function xa(e,t){return typeof t=="function"?t(e):t}function ud(e){var t=mn(),n=t.queue;if(n===null)throw Error(U(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,c=s;do{var u=c.lane;if((Vi&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Ae.lanes|=u,Wi|=u}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Tn(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,Ae.lanes|=s,Wi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function dd(e){var t=mn(),n=t.queue;if(n===null)throw Error(U(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);Tn(s,t.memoizedState)||(jt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function dw(){}function fw(e,t){var n=Ae,r=mn(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,jt=!0),r=r.queue,$p(mw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Je!==null&&Je.memoizedState.tag&1){if(n.flags|=2048,va(9,pw.bind(null,n,r,i,t),void 0,null),et===null)throw Error(U(349));Vi&30||hw(n,t,i)}return i}function hw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function pw(e,t,n,r){t.value=n,t.getSnapshot=r,gw(t)&&yw(e)}function mw(e,t,n){return n(function(){gw(t)&&yw(e)})}function gw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function yw(e){var t=ur(e,1);t!==null&&jn(t,e,1,-1)}function ry(e){var t=zn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t.queue=e,e=e.dispatch=OP.bind(null,Ae,e),[t.memoizedState,e]}function va(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.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 xw(){return mn().memoizedState}function $l(e,t,n,r){var i=zn();Ae.flags|=e,i.memoizedState=va(1|t,n,void 0,r===void 0?null:r)}function hu(e,t,n,r){var i=mn();r=r===void 0?null:r;var s=void 0;if(Ye!==null){var o=Ye.memoizedState;if(s=o.destroy,r!==null&&Fp(r,o.deps)){i.memoizedState=va(t,n,s,r);return}}Ae.flags|=e,i.memoizedState=va(1|t,n,s,r)}function iy(e,t){return $l(8390656,8,e,t)}function $p(e,t){return hu(2048,8,e,t)}function vw(e,t){return hu(4,2,e,t)}function ww(e,t){return hu(4,4,e,t)}function bw(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 kw(e,t,n){return n=n!=null?n.concat([e]):null,hu(4,4,bw.bind(null,t,e),n)}function Vp(){}function _w(e,t){var n=mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sw(e,t){var n=mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cw(e,t,n){return Vi&21?(Tn(n,t)||(n=R1(),Ae.lanes|=n,Wi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jt=!0),e.memoizedState=n)}function FP(e,t){var n=xe;xe=n!==0&&4>n?n:4,e(!0);var r=cd.transition;cd.transition={};try{e(!1),t()}finally{xe=n,cd.transition=r}}function Pw(){return mn().memoizedState}function BP(e,t,n){var r=qr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jw(e))Ew(t,n);else if(n=lw(e,t,n,r),n!==null){var i=wt();jn(n,e,r,i),Tw(n,t,r)}}function OP(e,t,n){var r=qr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jw(e))Ew(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,Tn(a,o)){var l=t.interleaved;l===null?(i.next=i,Ip(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lw(e,t,i,r),n!==null&&(i=wt(),jn(n,e,r,i),Tw(n,t,r))}}function jw(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function Ew(e,t){Ko=Ec=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Tw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vp(e,n)}}var Tc={readContext:pn,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},$P={readContext:pn,useCallback:function(e,t){return zn().memoizedState=[e,t===void 0?null:t],e},useContext:pn,useEffect:iy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$l(4194308,4,bw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $l(4194308,4,e,t)},useInsertionEffect:function(e,t){return $l(4,2,e,t)},useMemo:function(e,t){var n=zn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zn();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=BP.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=zn();return e={current:e},t.memoizedState=e},useState:ry,useDebugValue:Vp,useDeferredValue:function(e){return zn().memoizedState=e},useTransition:function(){var e=ry(!1),t=e[0];return e=FP.bind(null,e[1]),zn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ae,i=zn();if(Le){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),et===null)throw Error(U(349));Vi&30||hw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,iy(mw.bind(null,r,s,e),[e]),r.flags|=2048,va(9,pw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=zn(),t=et.identifierPrefix;if(Le){var n=sr,r=ir;n=(r&~(1<<32-Pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ya++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=zP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},VP={readContext:pn,useCallback:_w,useContext:pn,useEffect:$p,useImperativeHandle:kw,useInsertionEffect:vw,useLayoutEffect:ww,useMemo:Sw,useReducer:ud,useRef:xw,useState:function(){return ud(xa)},useDebugValue:Vp,useDeferredValue:function(e){var t=mn();return Cw(t,Ye.memoizedState,e)},useTransition:function(){var e=ud(xa)[0],t=mn().memoizedState;return[e,t]},useMutableSource:dw,useSyncExternalStore:fw,useId:Pw,unstable_isNewReconciler:!1},WP={readContext:pn,useCallback:_w,useContext:pn,useEffect:$p,useImperativeHandle:kw,useInsertionEffect:vw,useLayoutEffect:ww,useMemo:Sw,useReducer:dd,useRef:xw,useState:function(){return dd(xa)},useDebugValue:Vp,useDeferredValue:function(e){var t=mn();return Ye===null?t.memoizedState=e:Cw(t,Ye.memoizedState,e)},useTransition:function(){var e=dd(xa)[0],t=mn().memoizedState;return[e,t]},useMutableSource:dw,useSyncExternalStore:fw,useId:Pw,unstable_isNewReconciler:!1};function kn(e,t){if(e&&e.defaultProps){t=De({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Qf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:De({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var pu={isMounted:function(e){return(e=e._reactInternals)?Gi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wt(),i=qr(e),s=or(r,i);s.payload=t,n!=null&&(s.callback=n),t=Qr(e,s,i),t!==null&&(jn(t,e,i,r),Bl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wt(),i=qr(e),s=or(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Qr(e,s,i),t!==null&&(jn(t,e,i,r),Bl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),r=qr(e),i=or(n,r);i.tag=2,t!=null&&(i.callback=t),t=Qr(e,i,r),t!==null&&(jn(t,e,r,n),Bl(t,e,r))}};function sy(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?!da(n,r)||!da(i,s):!0}function Rw(e,t,n){var r=!1,i=ti,s=t.contextType;return typeof s=="object"&&s!==null?s=pn(s):(i=Rt(t)?Oi:mt.current,r=t.contextTypes,s=(r=r!=null)?Fs(e,i):ti),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=pu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function oy(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&&pu.enqueueReplaceState(t,t.state,null)}function Yf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ap(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=pn(s):(s=Rt(t)?Oi:mt.current,i.context=Fs(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Qf(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&&pu.enqueueReplaceState(i,i.state,null),Pc(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Vs(e,t){try{var n="",r=t;do n+=yC(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 fd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function qf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UP=typeof WeakMap=="function"?WeakMap:Map;function Lw(e,t,n){n=or(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Lc||(Lc=!0,oh=r),qf(e,t)},n}function Mw(e,t,n){n=or(-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(){qf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){qf(e,t),typeof r!="function"&&(Yr===null?Yr=new Set([this]):Yr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function ay(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UP;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=ij.bind(null,e,t,n),t.then(e,e))}function ly(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 cy(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=or(-1,1),t.tag=2,Qr(n,t,1))),n.lanes|=1),e)}var HP=fr.ReactCurrentOwner,jt=!1;function yt(e,t,n,r){t.child=e===null?aw(t,null,n,r):Os(t,e.child,n,r)}function uy(e,t,n,r,i){n=n.render;var s=t.ref;return Ts(t,i),r=Bp(e,t,n,r,s,i),n=Op(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Le&&n&&jp(t),t.flags|=1,yt(e,t,r,i),t.child)}function dy(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!qp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Iw(e,t,s,r,i)):(e=Hl(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:da,n(o,r)&&e.ref===t.ref)return dr(e,t,i)}return t.flags|=1,e=Xr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Iw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(da(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,dr(e,t,i)}return Xf(e,t,n,r,i)}function Aw(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},Se(ws,Ot),Ot|=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,Se(ws,Ot),Ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Se(ws,Ot),Ot|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Se(ws,Ot),Ot|=r;return yt(e,t,i,n),t.child}function Dw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xf(e,t,n,r,i){var s=Rt(n)?Oi:mt.current;return s=Fs(t,s),Ts(t,i),n=Bp(e,t,n,r,s,i),r=Op(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Le&&r&&jp(t),t.flags|=1,yt(e,t,n,i),t.child)}function fy(e,t,n,r,i){if(Rt(n)){var s=!0;bc(t)}else s=!1;if(Ts(t,i),t.stateNode===null)Vl(e,t),Rw(t,n,r),Yf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=pn(c):(c=Rt(n)?Oi:mt.current,c=Fs(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&oy(t,o,r,c),Lr=!1;var h=t.memoizedState;o.state=h,Pc(t,r,o,i),l=t.memoizedState,a!==r||h!==l||Tt.current||Lr?(typeof u=="function"&&(Qf(t,n,u,r),l=t.memoizedState),(a=Lr||sy(t,n,a,r,h,l,c))?(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=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,cw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:kn(t.type,a),o.props=c,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=pn(l):(l=Rt(n)?Oi:mt.current,l=Fs(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&oy(t,o,r,l),Lr=!1,h=t.memoizedState,o.state=h,Pc(t,r,o,i);var m=t.memoizedState;a!==d||h!==m||Tt.current||Lr?(typeof p=="function"&&(Qf(t,n,p,r),m=t.memoizedState),(c=Lr||sy(t,n,c,r,h,m,l)||!1)?(u||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=c):(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 Zf(e,t,n,r,s,i)}function Zf(e,t,n,r,i,s){Dw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Xg(t,n,!1),dr(e,t,s);r=t.stateNode,HP.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Os(t,e.child,null,s),t.child=Os(t,null,a,s)):yt(e,t,a,s),t.memoizedState=r.state,i&&Xg(t,n,!0),t.child}function Nw(e){var t=e.stateNode;t.pendingContext?qg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&qg(e,t.context,!1),Dp(e,t.containerInfo)}function hy(e,t,n,r,i){return Bs(),Tp(i),t.flags|=256,yt(e,t,n,r),t.child}var Jf={dehydrated:null,treeContext:null,retryLane:0};function eh(e){return{baseLanes:e,cachePool:null,transitions:null}}function zw(e,t,n){var r=t.pendingProps,i=Ie.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),Se(Ie,i&1),e===null)return Gf(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=yu(o,r,0,null),e=Ii(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=eh(n),t.memoizedState=Jf,e):Wp(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return GP(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=Xr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Xr(a,s):(s=Ii(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?eh(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Jf,r}return s=e.child,e=s.sibling,r=Xr(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 Wp(e,t){return t=yu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function il(e,t,n,r){return r!==null&&Tp(r),Os(t,e.child,null,n),e=Wp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GP(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=fd(Error(U(422))),il(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=yu({mode:"visible",children:r.children},i,0,null),s=Ii(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Os(t,e.child,null,o),t.child.memoizedState=eh(o),t.memoizedState=Jf,s);if(!(t.mode&1))return il(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(U(419)),r=fd(s,r,void 0),il(e,t,o,r)}if(a=(o&e.childLanes)!==0,jt||a){if(r=et,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,ur(e,i),jn(r,e,i,-1))}return Yp(),r=fd(Error(U(421))),il(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=sj.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,$t=Kr(i.nextSibling),Ut=t,Le=!0,Sn=null,e!==null&&(on[an++]=ir,on[an++]=sr,on[an++]=$i,ir=e.id,sr=e.overflow,$i=t),t=Wp(t,r.children),t.flags|=4096,t)}function py(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Kf(e.return,t,n)}function hd(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 Fw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(yt(e,t,r.children,n),r=Ie.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&&py(e,n,t);else if(e.tag===19)py(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(Se(Ie,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&&jc(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),hd(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&&jc(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}hd(t,!0,n,null,s);break;case"together":hd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Xr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function KP(e,t,n){switch(t.tag){case 3:Nw(t),Bs();break;case 5:uw(t);break;case 1:Rt(t.type)&&bc(t);break;case 4:Dp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Se(Sc,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Se(Ie,Ie.current&1),t.flags|=128,null):n&t.child.childLanes?zw(e,t,n):(Se(Ie,Ie.current&1),e=dr(e,t,n),e!==null?e.sibling:null);Se(Ie,Ie.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Fw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Se(Ie,Ie.current),r)break;return null;case 22:case 23:return t.lanes=0,Aw(e,t,n)}return dr(e,t,n)}var Bw,th,Ow,$w;Bw=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}};th=function(){};Ow=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ji(Hn.current);var s=null;switch(n){case"input":i=_f(e,i),r=_f(e,r),s=[];break;case"select":i=De({},i,{value:void 0}),r=De({},r,{value:void 0}),s=[];break;case"textarea":i=Pf(e,i),r=Pf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=vc)}Ef(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ia.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="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(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ia.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ee("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};$w=function(e,t,n,r){n!==r&&(t.flags|=4)};function wo(e,t){if(!Le)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 QP(e,t,n){var r=t.pendingProps;switch(Ep(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 Rt(t.type)&&wc(),dt(t),null;case 3:return r=t.stateNode,$s(),Te(Tt),Te(mt),zp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(nl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Sn!==null&&(ch(Sn),Sn=null))),th(e,t),dt(t),null;case 5:Np(t);var i=ji(ga.current);if(n=t.type,e!==null&&t.stateNode!=null)Ow(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return dt(t),null}if(e=ji(Hn.current),nl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Vn]=t,r[pa]=s,e=(t.mode&1)!==0,n){case"dialog":Ee("cancel",r),Ee("close",r);break;case"iframe":case"object":case"embed":Ee("load",r);break;case"video":case"audio":for(i=0;i<Fo.length;i++)Ee(Fo[i],r);break;case"source":Ee("error",r);break;case"img":case"image":case"link":Ee("error",r),Ee("load",r);break;case"details":Ee("toggle",r);break;case"input":_g(r,s),Ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ee("invalid",r);break;case"textarea":Cg(r,s),Ee("invalid",r)}Ef(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&&tl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&tl(r.textContent,a,e),i=["children",""+a]):ia.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ee("scroll",r)}switch(n){case"input":Ka(r),Sg(r,s,!0);break;case"textarea":Ka(r),Pg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=vc)}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=m1(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[Vn]=t,e[pa]=r,Bw(e,t,!1,!1),t.stateNode=e;e:{switch(o=Tf(n,r),n){case"dialog":Ee("cancel",e),Ee("close",e),i=r;break;case"iframe":case"object":case"embed":Ee("load",e),i=r;break;case"video":case"audio":for(i=0;i<Fo.length;i++)Ee(Fo[i],e);i=r;break;case"source":Ee("error",e),i=r;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),i=r;break;case"details":Ee("toggle",e),i=r;break;case"input":_g(e,r),i=_f(e,r),Ee("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=De({},r,{value:void 0}),Ee("invalid",e);break;case"textarea":Cg(e,r),i=Pf(e,r),Ee("invalid",e);break;default:i=r}Ef(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?x1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&g1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&sa(e,l):typeof l=="number"&&sa(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ia.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ee("scroll",e):l!=null&&hp(e,s,l,o))}switch(n){case"input":Ka(e),Sg(e,r,!1);break;case"textarea":Ka(e),Pg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ei(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Cs(e,!!r.multiple,s,!1):r.defaultValue!=null&&Cs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=vc)}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)$w(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=ji(ga.current),ji(Hn.current),nl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Vn]=t,(s=r.nodeValue!==n)&&(e=Ut,e!==null))switch(e.tag){case 3:tl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&tl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vn]=t,t.stateNode=r}return dt(t),null;case 13:if(Te(Ie),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Le&&$t!==null&&t.mode&1&&!(t.flags&128))sw(),Bs(),t.flags|=98560,s=!1;else if(s=nl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(U(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(U(317));s[Vn]=t}else Bs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dt(t),s=!1}else Sn!==null&&(ch(Sn),Sn=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||Ie.current&1?qe===0&&(qe=3):Yp())),t.updateQueue!==null&&(t.flags|=4),dt(t),null);case 4:return $s(),th(e,t),e===null&&fa(t.stateNode.containerInfo),dt(t),null;case 10:return Mp(t.type._context),dt(t),null;case 17:return Rt(t.type)&&wc(),dt(t),null;case 19:if(Te(Ie),s=t.memoizedState,s===null)return dt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)wo(s,!1);else{if(qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=jc(e),o!==null){for(t.flags|=128,wo(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 Se(Ie,Ie.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>Ws&&(t.flags|=128,r=!0,wo(s,!1),t.lanes=4194304)}else{if(!r)if(e=jc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Le)return dt(t),null}else 2*$e()-s.renderingStartTime>Ws&&n!==1073741824&&(t.flags|=128,r=!0,wo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=$e(),t.sibling=null,n=Ie.current,Se(Ie,r?n&1|2:n&1),t):(dt(t),null);case 22:case 23:return Qp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ot&1073741824&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function YP(e,t){switch(Ep(t),t.tag){case 1:return Rt(t.type)&&wc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $s(),Te(Tt),Te(mt),zp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Np(t),null;case 13:if(Te(Ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Bs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Ie),null;case 4:return $s(),null;case 10:return Mp(t.type._context),null;case 22:case 23:return Qp(),null;case 24:return null;default:return null}}var sl=!1,ht=!1,qP=typeof WeakSet=="function"?WeakSet:Set,Q=null;function vs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fe(e,t,r)}else n.current=null}function nh(e,t,n){try{n()}catch(r){Fe(e,t,r)}}var my=!1;function XP(e,t){if(Bf=gc,e=G1(),Pp(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,c=0,u=0,d=e,h=null;t:for(;;){for(var p;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),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===i&&(a=o),h===s&&++u===r&&(l=o),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Of={focusedElem:e,selectionRange:n},gc=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;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,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:kn(t.type,y),w);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(b){Fe(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return m=my,my=!1,m}function Qo(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&&nh(t,n,s)}i=i.next}while(i!==r)}}function mu(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 rh(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 Vw(e){var t=e.alternate;t!==null&&(e.alternate=null,Vw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vn],delete t[pa],delete t[Wf],delete t[IP],delete t[AP])),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 Ww(e){return e.tag===5||e.tag===3||e.tag===4}function gy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ww(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 ih(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=vc));else if(r!==4&&(e=e.child,e!==null))for(ih(e,t,n),e=e.sibling;e!==null;)ih(e,t,n),e=e.sibling}function sh(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(sh(e,t,n),e=e.sibling;e!==null;)sh(e,t,n),e=e.sibling}var tt=null,_n=!1;function xr(e,t,n){for(n=n.child;n!==null;)Uw(e,t,n),n=n.sibling}function Uw(e,t,n){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(au,n)}catch{}switch(n.tag){case 5:ht||vs(n,t);case 6:var r=tt,i=_n;tt=null,xr(e,t,n),tt=r,_n=i,tt!==null&&(_n?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(_n?(e=tt,n=n.stateNode,e.nodeType===8?od(e.parentNode,n):e.nodeType===1&&od(e,n),ca(e)):od(tt,n.stateNode));break;case 4:r=tt,i=_n,tt=n.stateNode.containerInfo,_n=!0,xr(e,t,n),tt=r,_n=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)&&nh(n,t,o),i=i.next}while(i!==r)}xr(e,t,n);break;case 1:if(!ht&&(vs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Fe(n,t,a)}xr(e,t,n);break;case 21:xr(e,t,n);break;case 22:n.mode&1?(ht=(r=ht)||n.memoizedState!==null,xr(e,t,n),ht=r):xr(e,t,n);break;default:xr(e,t,n)}}function yy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qP),t.forEach(function(r){var i=oj.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function xn(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,_n=!1;break e;case 3:tt=a.stateNode.containerInfo,_n=!0;break e;case 4:tt=a.stateNode.containerInfo,_n=!0;break e}a=a.return}if(tt===null)throw Error(U(160));Uw(s,o,i),tt=null,_n=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Fe(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hw(t,e),t=t.sibling}function Hw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xn(t,e),Mn(e),r&4){try{Qo(3,e,e.return),mu(3,e)}catch(y){Fe(e,e.return,y)}try{Qo(5,e,e.return)}catch(y){Fe(e,e.return,y)}}break;case 1:xn(t,e),Mn(e),r&512&&n!==null&&vs(n,n.return);break;case 5:if(xn(t,e),Mn(e),r&512&&n!==null&&vs(n,n.return),e.flags&32){var i=e.stateNode;try{sa(i,"")}catch(y){Fe(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&&h1(i,s),Tf(a,o);var c=Tf(a,s);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?x1(i,d):u==="dangerouslySetInnerHTML"?g1(i,d):u==="children"?sa(i,d):hp(i,u,d,c)}switch(a){case"input":Sf(i,s);break;case"textarea":p1(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Cs(i,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?Cs(i,!!s.multiple,s.defaultValue,!0):Cs(i,!!s.multiple,s.multiple?[]:"",!1))}i[pa]=s}catch(y){Fe(e,e.return,y)}}break;case 6:if(xn(t,e),Mn(e),r&4){if(e.stateNode===null)throw Error(U(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){Fe(e,e.return,y)}}break;case 3:if(xn(t,e),Mn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ca(t.containerInfo)}catch(y){Fe(e,e.return,y)}break;case 4:xn(t,e),Mn(e);break;case 13:xn(t,e),Mn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Gp=$e())),r&4&&yy(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(ht=(c=ht)||u,xn(t,e),ht=c):xn(t,e),Mn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(Q=e,u=e.child;u!==null;){for(d=Q=u;Q!==null;){switch(h=Q,p=h.child,h.tag){case 0:case 11:case 14:case 15:Qo(4,h,h.return);break;case 1:vs(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){Fe(r,n,y)}}break;case 5:vs(h,h.return);break;case 22:if(h.memoizedState!==null){vy(d);continue}}p!==null?(p.return=h,Q=p):vy(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,c?(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=y1("display",o))}catch(y){Fe(e,e.return,y)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(y){Fe(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;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:xn(t,e),Mn(e),r&4&&yy(e);break;case 21:break;default:xn(t,e),Mn(e)}}function Mn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ww(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(sa(i,""),r.flags&=-33);var s=gy(e);sh(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=gy(e);ih(e,a,o);break;default:throw Error(U(161))}}catch(l){Fe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ZP(e,t,n){Q=e,Gw(e)}function Gw(e,t,n){for(var r=(e.mode&1)!==0;Q!==null;){var i=Q,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||sl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||ht;a=sl;var c=ht;if(sl=o,(ht=l)&&!c)for(Q=i;Q!==null;)o=Q,l=o.child,o.tag===22&&o.memoizedState!==null?wy(i):l!==null?(l.return=o,Q=l):wy(i);for(;s!==null;)Q=s,Gw(s),s=s.sibling;Q=i,sl=a,ht=c}xy(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Q=s):xy(e)}}function xy(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ht||mu(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:kn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ny(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}ny(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 c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&ca(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}ht||t.flags&512&&rh(t)}catch(h){Fe(t,t.return,h)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function vy(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function wy(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{mu(4,t)}catch(l){Fe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Fe(t,i,l)}}var s=t.return;try{rh(t)}catch(l){Fe(t,s,l)}break;case 5:var o=t.return;try{rh(t)}catch(l){Fe(t,o,l)}}}catch(l){Fe(t,t.return,l)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var JP=Math.ceil,Rc=fr.ReactCurrentDispatcher,Up=fr.ReactCurrentOwner,dn=fr.ReactCurrentBatchConfig,de=0,et=null,He=null,it=0,Ot=0,ws=oi(0),qe=0,wa=null,Wi=0,gu=0,Hp=0,Yo=null,Pt=null,Gp=0,Ws=1/0,nr=null,Lc=!1,oh=null,Yr=null,ol=!1,Nr=null,Mc=0,qo=0,ah=null,Wl=-1,Ul=0;function wt(){return de&6?$e():Wl!==-1?Wl:Wl=$e()}function qr(e){return e.mode&1?de&2&&it!==0?it&-it:NP.transition!==null?(Ul===0&&(Ul=R1()),Ul):(e=xe,e!==0||(e=window.event,e=e===void 0?16:z1(e.type)),e):1}function jn(e,t,n,r){if(50<qo)throw qo=0,ah=null,Error(U(185));Ma(e,n,r),(!(de&2)||e!==et)&&(e===et&&(!(de&2)&&(gu|=n),qe===4&&Ar(e,it)),Lt(e,r),n===1&&de===0&&!(t.mode&1)&&(Ws=$e()+500,fu&&ai()))}function Lt(e,t){var n=e.callbackNode;NC(e,t);var r=mc(e,e===et?it:0);if(r===0)n!==null&&Tg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Tg(n),t===1)e.tag===0?DP(by.bind(null,e)):nw(by.bind(null,e)),LP(function(){!(de&6)&&ai()}),n=null;else{switch(L1(r)){case 1:n=xp;break;case 4:n=E1;break;case 16:n=pc;break;case 536870912:n=T1;break;default:n=pc}n=eb(n,Kw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Kw(e,t){if(Wl=-1,Ul=0,de&6)throw Error(U(327));var n=e.callbackNode;if(Rs()&&e.callbackNode!==n)return null;var r=mc(e,e===et?it:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ic(e,r);else{t=r;var i=de;de|=2;var s=Yw();(et!==e||it!==t)&&(nr=null,Ws=$e()+500,Mi(e,t));do try{nj();break}catch(a){Qw(e,a)}while(!0);Lp(),Rc.current=s,de=i,He!==null?t=0:(et=null,it=0,t=qe)}if(t!==0){if(t===2&&(i=Af(e),i!==0&&(r=i,t=lh(e,i))),t===1)throw n=wa,Mi(e,0),Ar(e,r),Lt(e,$e()),n;if(t===6)Ar(e,r);else{if(i=e.current.alternate,!(r&30)&&!ej(i)&&(t=Ic(e,r),t===2&&(s=Af(e),s!==0&&(r=s,t=lh(e,s))),t===1))throw n=wa,Mi(e,0),Ar(e,r),Lt(e,$e()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:wi(e,Pt,nr);break;case 3:if(Ar(e,r),(r&130023424)===r&&(t=Gp+500-$e(),10<t)){if(mc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Vf(wi.bind(null,e,Pt,nr),t);break}wi(e,Pt,nr);break;case 4:if(Ar(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Pn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JP(r/1960))-r,10<r){e.timeoutHandle=Vf(wi.bind(null,e,Pt,nr),r);break}wi(e,Pt,nr);break;case 5:wi(e,Pt,nr);break;default:throw Error(U(329))}}}return Lt(e,$e()),e.callbackNode===n?Kw.bind(null,e):null}function lh(e,t){var n=Yo;return e.current.memoizedState.isDehydrated&&(Mi(e,t).flags|=256),e=Ic(e,t),e!==2&&(t=Pt,Pt=n,t!==null&&ch(t)),e}function ch(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function ej(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(!Tn(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 Ar(e,t){for(t&=~Hp,t&=~gu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Pn(t),r=1<<n;e[n]=-1,t&=~r}}function by(e){if(de&6)throw Error(U(327));Rs();var t=mc(e,0);if(!(t&1))return Lt(e,$e()),null;var n=Ic(e,t);if(e.tag!==0&&n===2){var r=Af(e);r!==0&&(t=r,n=lh(e,r))}if(n===1)throw n=wa,Mi(e,0),Ar(e,t),Lt(e,$e()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wi(e,Pt,nr),Lt(e,$e()),null}function Kp(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(Ws=$e()+500,fu&&ai())}}function Ui(e){Nr!==null&&Nr.tag===0&&!(de&6)&&Rs();var t=de;de|=1;var n=dn.transition,r=xe;try{if(dn.transition=null,xe=1,e)return e()}finally{xe=r,dn.transition=n,de=t,!(de&6)&&ai()}}function Qp(){Ot=ws.current,Te(ws)}function Mi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,RP(n)),He!==null)for(n=He.return;n!==null;){var r=n;switch(Ep(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&wc();break;case 3:$s(),Te(Tt),Te(mt),zp();break;case 5:Np(r);break;case 4:$s();break;case 13:Te(Ie);break;case 19:Te(Ie);break;case 10:Mp(r.type._context);break;case 22:case 23:Qp()}n=n.return}if(et=e,He=e=Xr(e.current,null),it=Ot=t,qe=0,wa=null,Hp=gu=Wi=0,Pt=Yo=null,Pi!==null){for(t=0;t<Pi.length;t++)if(n=Pi[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}Pi=null}return e}function Qw(e,t){do{var n=He;try{if(Lp(),Ol.current=Tc,Ec){for(var r=Ae.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ec=!1}if(Vi=0,Je=Ye=Ae=null,Ko=!1,ya=0,Up.current=null,n===null||n.return===null){qe=1,wa=t,He=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=it,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=ly(o);if(p!==null){p.flags&=-257,cy(p,o,a,s,t),p.mode&1&&ay(s,c,t),t=p,l=c;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)){ay(s,c,t),Yp();break e}l=Error(U(426))}}else if(Le&&a.mode&1){var w=ly(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),cy(w,o,a,s,t),Tp(Vs(l,a));break e}}s=l=Vs(l,a),qe!==4&&(qe=2),Yo===null?Yo=[s]:Yo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=Lw(s,l,t);ty(s,g);break e;case 1:a=l;var x=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Yr===null||!Yr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=Mw(s,a,t);ty(s,b);break e}}s=s.return}while(s!==null)}Xw(n)}catch(S){t=S,He===n&&n!==null&&(He=n=n.return);continue}break}while(!0)}function Yw(){var e=Rc.current;return Rc.current=Tc,e===null?Tc:e}function Yp(){(qe===0||qe===3||qe===2)&&(qe=4),et===null||!(Wi&268435455)&&!(gu&268435455)||Ar(et,it)}function Ic(e,t){var n=de;de|=2;var r=Yw();(et!==e||it!==t)&&(nr=null,Mi(e,t));do try{tj();break}catch(i){Qw(e,i)}while(!0);if(Lp(),de=n,Rc.current=r,He!==null)throw Error(U(261));return et=null,it=0,qe}function tj(){for(;He!==null;)qw(He)}function nj(){for(;He!==null&&!jC();)qw(He)}function qw(e){var t=Jw(e.alternate,e,Ot);e.memoizedProps=e.pendingProps,t===null?Xw(e):He=t,Up.current=null}function Xw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=YP(n,t),n!==null){n.flags&=32767,He=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qe=6,He=null;return}}else if(n=QP(n,t,Ot),n!==null){He=n;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);qe===0&&(qe=5)}function wi(e,t,n){var r=xe,i=dn.transition;try{dn.transition=null,xe=1,rj(e,t,n,r)}finally{dn.transition=i,xe=r}return null}function rj(e,t,n,r){do Rs();while(Nr!==null);if(de&6)throw Error(U(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(U(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(zC(e,s),e===et&&(He=et=null,it=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ol||(ol=!0,eb(pc,function(){return Rs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=dn.transition,dn.transition=null;var o=xe;xe=1;var a=de;de|=4,Up.current=null,XP(e,n),Hw(n,e),_P(Of),gc=!!Bf,Of=Bf=null,e.current=n,ZP(n),EC(),de=a,xe=o,dn.transition=s}else e.current=n;if(ol&&(ol=!1,Nr=e,Mc=i),s=e.pendingLanes,s===0&&(Yr=null),LC(n.stateNode),Lt(e,$e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Lc)throw Lc=!1,e=oh,oh=null,e;return Mc&1&&e.tag!==0&&Rs(),s=e.pendingLanes,s&1?e===ah?qo++:(qo=0,ah=e):qo=0,ai(),null}function Rs(){if(Nr!==null){var e=L1(Mc),t=dn.transition,n=xe;try{if(dn.transition=null,xe=16>e?16:e,Nr===null)var r=!1;else{if(e=Nr,Nr=null,Mc=0,de&6)throw Error(U(331));var i=de;for(de|=4,Q=e.current;Q!==null;){var s=Q,o=s.child;if(Q.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Q=c;Q!==null;){var u=Q;switch(u.tag){case 0:case 11:case 15:Qo(8,u,s)}var d=u.child;if(d!==null)d.return=u,Q=d;else for(;Q!==null;){u=Q;var h=u.sibling,p=u.return;if(Vw(u),u===c){Q=null;break}if(h!==null){h.return=p,Q=h;break}Q=p}}}var m=s.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var w=y.sibling;y.sibling=null,y=w}while(y!==null)}}Q=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Q=o;else e:for(;Q!==null;){if(s=Q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Qo(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,Q=g;break e}Q=s.return}}var x=e.current;for(Q=x;Q!==null;){o=Q;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,Q=v;else e:for(o=x;Q!==null;){if(a=Q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:mu(9,a)}}catch(S){Fe(a,a.return,S)}if(a===o){Q=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,Q=b;break e}Q=a.return}}if(de=i,ai(),Un&&typeof Un.onPostCommitFiberRoot=="function")try{Un.onPostCommitFiberRoot(au,e)}catch{}r=!0}return r}finally{xe=n,dn.transition=t}}return!1}function ky(e,t,n){t=Vs(n,t),t=Lw(e,t,1),e=Qr(e,t,1),t=wt(),e!==null&&(Ma(e,1,t),Lt(e,t))}function Fe(e,t,n){if(e.tag===3)ky(e,e,n);else for(;t!==null;){if(t.tag===3){ky(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yr===null||!Yr.has(r))){e=Vs(n,e),e=Mw(t,e,1),t=Qr(t,e,1),e=wt(),t!==null&&(Ma(t,1,e),Lt(t,e));break}}t=t.return}}function ij(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,et===e&&(it&n)===n&&(qe===4||qe===3&&(it&130023424)===it&&500>$e()-Gp?Mi(e,0):Hp|=n),Lt(e,t)}function Zw(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=wt();e=ur(e,t),e!==null&&(Ma(e,t,n),Lt(e,n))}function sj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zw(e,n)}function oj(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(U(314))}r!==null&&r.delete(t),Zw(e,n)}var Jw;Jw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jt=!1,KP(e,t,n);jt=!!(e.flags&131072)}else jt=!1,Le&&t.flags&1048576&&rw(t,_c,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vl(e,t),e=t.pendingProps;var i=Fs(t,mt.current);Ts(t,n),i=Bp(null,t,r,e,i,n);var s=Op();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,Rt(r)?(s=!0,bc(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ap(t),i.updater=pu,t.stateNode=i,i._reactInternals=t,Yf(t,r,e,n),t=Zf(null,t,r,!0,s,n)):(t.tag=0,Le&&s&&jp(t),yt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lj(r),e=kn(r,e),i){case 0:t=Xf(null,t,r,e,n);break e;case 1:t=fy(null,t,r,e,n);break e;case 11:t=uy(null,t,r,e,n);break e;case 14:t=dy(null,t,r,kn(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kn(r,i),Xf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kn(r,i),fy(e,t,r,i,n);case 3:e:{if(Nw(t),e===null)throw Error(U(387));r=t.pendingProps,s=t.memoizedState,i=s.element,cw(e,t),Pc(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=Vs(Error(U(423)),t),t=hy(e,t,r,n,i);break e}else if(r!==i){i=Vs(Error(U(424)),t),t=hy(e,t,r,n,i);break e}else for($t=Kr(t.stateNode.containerInfo.firstChild),Ut=t,Le=!0,Sn=null,n=aw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Bs(),r===i){t=dr(e,t,n);break e}yt(e,t,r,n)}t=t.child}return t;case 5:return uw(t),e===null&&Gf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,$f(r,i)?o=null:s!==null&&$f(r,s)&&(t.flags|=32),Dw(e,t),yt(e,t,o,n),t.child;case 6:return e===null&&Gf(t),null;case 13:return zw(e,t,n);case 4:return Dp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Os(t,null,r,n):yt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kn(r,i),uy(e,t,r,i,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(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,Se(Sc,r._currentValue),r._currentValue=o,s!==null)if(Tn(s.value,o)){if(s.children===i.children&&!Tt.current){t=dr(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=or(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Kf(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(U(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Kf(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}yt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ts(t,n),i=pn(i),r=r(i),t.flags|=1,yt(e,t,r,n),t.child;case 14:return r=t.type,i=kn(r,t.pendingProps),i=kn(r.type,i),dy(e,t,r,i,n);case 15:return Iw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kn(r,i),Vl(e,t),t.tag=1,Rt(r)?(e=!0,bc(t)):e=!1,Ts(t,n),Rw(t,r,i),Yf(t,r,i,n),Zf(null,t,r,!0,e,n);case 19:return Fw(e,t,n);case 22:return Aw(e,t,n)}throw Error(U(156,t.tag))};function eb(e,t){return j1(e,t)}function aj(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 cn(e,t,n,r){return new aj(e,t,n,r)}function qp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lj(e){if(typeof e=="function")return qp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mp)return 11;if(e===gp)return 14}return 2}function Xr(e,t){var n=e.alternate;return n===null?(n=cn(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 Hl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")qp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case us:return Ii(n.children,i,s,t);case pp:o=8,i|=8;break;case vf:return e=cn(12,n,t,i|2),e.elementType=vf,e.lanes=s,e;case wf:return e=cn(13,n,t,i),e.elementType=wf,e.lanes=s,e;case bf:return e=cn(19,n,t,i),e.elementType=bf,e.lanes=s,e;case u1:return yu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l1:o=10;break e;case c1:o=9;break e;case mp:o=11;break e;case gp:o=14;break e;case Rr:o=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=cn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Ii(e,t,n,r){return e=cn(7,e,r,t),e.lanes=n,e}function yu(e,t,n,r){return e=cn(22,e,r,t),e.elementType=u1,e.lanes=n,e.stateNode={isHidden:!1},e}function pd(e,t,n){return e=cn(6,e,null,t),e.lanes=n,e}function md(e,t,n){return t=cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cj(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=Yu(0),this.expirationTimes=Yu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Xp(e,t,n,r,i,s,o,a,l){return e=new cj(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=cn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ap(s),e}function uj(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:cs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function tb(e){if(!e)return ti;e=e._reactInternals;e:{if(Gi(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Rt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var n=e.type;if(Rt(n))return tw(e,n,t)}return t}function nb(e,t,n,r,i,s,o,a,l){return e=Xp(n,r,!0,e,i,s,o,a,l),e.context=tb(null),n=e.current,r=wt(),i=qr(n),s=or(r,i),s.callback=t??null,Qr(n,s,i),e.current.lanes=i,Ma(e,i,r),Lt(e,r),e}function xu(e,t,n,r){var i=t.current,s=wt(),o=qr(i);return n=tb(n),t.context===null?t.context=n:t.pendingContext=n,t=or(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Qr(i,t,o),e!==null&&(jn(e,i,o,s),Bl(e,i,o)),o}function Ac(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 _y(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zp(e,t){_y(e,t),(e=e.alternate)&&_y(e,t)}function dj(){return null}var rb=typeof reportError=="function"?reportError:function(e){console.error(e)};function Jp(e){this._internalRoot=e}vu.prototype.render=Jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));xu(e,t,null,null)};vu.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ui(function(){xu(null,e,null,null)}),t[cr]=null}};function vu(e){this._internalRoot=e}vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=A1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ir.length&&t!==0&&t<Ir[n].priority;n++);Ir.splice(n,0,e),n===0&&N1(e)}};function em(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function wu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Sy(){}function fj(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Ac(o);s.call(c)}}var o=nb(t,r,e,0,null,!1,!1,"",Sy);return e._reactRootContainer=o,e[cr]=o.current,fa(e.nodeType===8?e.parentNode:e),Ui(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Ac(l);a.call(c)}}var l=Xp(e,0,!1,null,null,!1,!1,"",Sy);return e._reactRootContainer=l,e[cr]=l.current,fa(e.nodeType===8?e.parentNode:e),Ui(function(){xu(t,l,n,r)}),l}function bu(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=Ac(o);a.call(l)}}xu(t,o,e,i)}else o=fj(n,t,e,i,r);return Ac(o)}M1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=zo(t.pendingLanes);n!==0&&(vp(t,n|1),Lt(t,$e()),!(de&6)&&(Ws=$e()+500,ai()))}break;case 13:Ui(function(){var r=ur(e,1);if(r!==null){var i=wt();jn(r,e,1,i)}}),Zp(e,1)}};wp=function(e){if(e.tag===13){var t=ur(e,134217728);if(t!==null){var n=wt();jn(t,e,134217728,n)}Zp(e,134217728)}};I1=function(e){if(e.tag===13){var t=qr(e),n=ur(e,t);if(n!==null){var r=wt();jn(n,e,t,r)}Zp(e,t)}};A1=function(){return xe};D1=function(e,t){var n=xe;try{return xe=e,t()}finally{xe=n}};Lf=function(e,t,n){switch(t){case"input":if(Sf(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=du(r);if(!i)throw Error(U(90));f1(r),Sf(r,i)}}}break;case"textarea":p1(e,n);break;case"select":t=n.value,t!=null&&Cs(e,!!n.multiple,t,!1)}};b1=Kp;k1=Ui;var hj={usingClientEntryPoint:!1,Events:[Aa,ps,du,v1,w1,Kp]},bo={findFiberByHostInstance:Ci,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},pj={bundleType:bo.bundleType,version:bo.version,rendererPackageName:bo.rendererPackageName,rendererConfig:bo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:fr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=C1(e),e===null?null:e.stateNode},findFiberByHostInstance:bo.findFiberByHostInstance||dj,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{au=al.inject(pj),Un=al}catch{}}qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hj;qt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!em(t))throw Error(U(200));return uj(e,t,null,n)};qt.createRoot=function(e,t){if(!em(e))throw Error(U(299));var n=!1,r="",i=rb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Xp(e,1,!1,null,null,n,!1,r,i),e[cr]=t.current,fa(e.nodeType===8?e.parentNode:e),new Jp(t)};qt.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(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=C1(t),e=e===null?null:e.stateNode,e};qt.flushSync=function(e){return Ui(e)};qt.hydrate=function(e,t,n){if(!wu(t))throw Error(U(200));return bu(null,e,t,!0,n)};qt.hydrateRoot=function(e,t,n){if(!em(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=rb;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=nb(t,null,e,1,n??null,i,!1,s,o),e[cr]=t.current,fa(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 vu(t)};qt.render=function(e,t,n){if(!wu(t))throw Error(U(200));return bu(null,e,t,!1,n)};qt.unmountComponentAtNode=function(e){if(!wu(e))throw Error(U(40));return e._reactRootContainer?(Ui(function(){bu(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1};qt.unstable_batchedUpdates=Kp;qt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!wu(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return bu(e,t,n,!1,r)};qt.version="18.3.1-next-f1338f8080-20240426";function ib(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ib)}catch(e){console.error(e)}}ib(),i1.exports=qt;var Js=i1.exports,sb,Cy=Js;sb=Cy.createRoot,Cy.hydrateRoot;var Bo=typeof window<"u"?_.useLayoutEffect:_.useEffect;function gd(e){const t=_.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function mj(e,t,n={},r={}){_.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 gj(e){const t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}const ob=!1;function ba(e){return e[e.length-1]}function yj(e){return typeof e=="function"}function zr(e,t){return yj(e)?e(t):e}const xj=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,vj=()=>Object.create(null),pi=(e,t)=>Fr(e,t,vj);function Fr(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,s=Ty(e)&&Ty(i);if(!s&&!(Us(e)&&Us(i)))return i;const o=s?e:jy(e);if(!o)return i;const a=s?i:jy(i);if(!a)return i;const l=o.length,c=a.length,u=s?new Array(c):n();let d=0;for(let h=0;h<c;h++){const p=s?h:a[h],m=e[p],y=i[p];if(m===y){u[p]=m,(s?h<l:xj.call(e,p))&&d++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){u[p]=y;continue}const w=Fr(m,y,n,r+1);u[p]=w,w===m&&d++}return l===c&&d===l?e:u}function jy(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!Py.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(!Py.call(e,i))return!1;r.push(i)}return r}function Us(e){if(!Ey(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Ey(n)||!n.hasOwnProperty("isPrototypeOf"))}function Ey(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ty(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ai(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(!Ai(e[r],t[r],n))return!1;return!0}if(Us(e)&&Us(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)&&!Ai(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||!Ai(e[o],t[o],n)))return!1;return i===s}return!1}function Hs(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 ka(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function wj(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Ry(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 wj(t)}const bj=["http:","https:","mailto:","tel:"];function Dc(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function ko(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+=Ry(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+Ry(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function kj(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function _j(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 ar(){throw new Error("Invariant failed")}function _a(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 Br=4,ab=5;function Sj(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 tm(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=Sj(s);if(o){const[a,l]=o,c=s.charCodeAt(a+1);if(c===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const u=a+3,d=l;if(u<d)return n[0]=3,n[1]=t+a,n[2]=t+u,n[3]=t+d,n[4]=t+l+1,n[5]=i,n}}else if(c===36){const u=a+1,d=a+2;return d===l?(n[0]=2,n[1]=t+a,n[2]=t+u,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 ku(e,t,n,r,i,s,o){var l,c,u,d,h,p,m,y,w,g,x,v,b;o==null||o(n);let a=r;{const S=n.fullPath??n.from,C=S.length,E=((l=n.options)==null?void 0:l.caseSensitive)??e,j=!!((u=(c=n.options)==null?void 0:c.params)!=null&&u.parse&&((h=(d=n.options)==null?void 0:d.skipRouteOnParseError)!=null&&h.params));for(;a<C;){const P=tm(S,a,t);let R;const I=a,F=P[5];switch(a=F+1,s++,P[0]){case 0:{const B=S.substring(P[2],P[3]);if(E){const z=(p=i.static)==null?void 0:p.get(B);if(z)R=z;else{i.static??(i.static=new Map);const G=Ei(n.fullPath??n.from);G.parent=i,G.depth=s,R=G,i.static.set(B,G)}}else{const z=B.toLowerCase(),G=(m=i.staticInsensitive)==null?void 0:m.get(z);if(G)R=G;else{i.staticInsensitive??(i.staticInsensitive=new Map);const A=Ei(n.fullPath??n.from);A.parent=i,A.depth=s,R=A,i.staticInsensitive.set(z,A)}}break}case 1:{const B=S.substring(I,P[1]),z=S.substring(P[4],F),G=E&&!!(B||z),A=B?G?B:B.toLowerCase():void 0,D=z?G?z:z.toLowerCase():void 0,O=!j&&((y=i.dynamic)==null?void 0:y.find(k=>!k.skipOnParamError&&k.caseSensitive===G&&k.prefix===A&&k.suffix===D));if(O)R=O;else{const k=xd(1,n.fullPath??n.from,G,A,D);R=k,k.depth=s,k.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(k)}break}case 3:{const B=S.substring(I,P[1]),z=S.substring(P[4],F),G=E&&!!(B||z),A=B?G?B:B.toLowerCase():void 0,D=z?G?z:z.toLowerCase():void 0,O=!j&&((w=i.optional)==null?void 0:w.find(k=>!k.skipOnParamError&&k.caseSensitive===G&&k.prefix===A&&k.suffix===D));if(O)R=O;else{const k=xd(3,n.fullPath??n.from,G,A,D);R=k,k.parent=i,k.depth=s,i.optional??(i.optional=[]),i.optional.push(k)}break}case 2:{const B=S.substring(I,P[1]),z=S.substring(P[4],F),G=E&&!!(B||z),A=B?G?B:B.toLowerCase():void 0,D=z?G?z:z.toLowerCase():void 0,O=xd(2,n.fullPath??n.from,G,A,D);R=O,O.parent=i,O.depth=s,i.wildcard??(i.wildcard=[]),i.wildcard.push(O)}}i=R}if(j&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const P=Ei(n.fullPath??n.from);P.kind=ab,P.parent=i,s++,P.depth=s,i.pathless??(i.pathless=[]),i.pathless.push(P),i=P}const L=(n.path||!n.children)&&!n.isRoot;if(L&&S.endsWith("/")){const P=Ei(n.fullPath??n.from);P.kind=Br,P.parent=i,s++,P.depth=s,i.index=P,i=P}i.parse=((x=(g=n.options)==null?void 0:g.params)==null?void 0:x.parse)??null,i.skipOnParamError=j,i.parsingPriority=((b=(v=n.options)==null?void 0:v.skipRouteOnParseError)==null?void 0:b.priority)??0,L&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const S of n.children)ku(e,t,S,a,i,s,o)}function yd(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Mr(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Mr(i);if(e.static)for(const i of e.static.values())Mr(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Mr(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(yd);for(const i of e.dynamic)Mr(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(yd);for(const i of e.optional)Mr(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(yd);for(const i of e.wildcard)Mr(i)}}function Ei(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function xd(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function Cj(e,t){const n=Ei("/"),r=new Uint16Array(6);for(const i of e)ku(!1,r,i,1,n,0);Mr(n),t.masksTree=n,t.flatCache=_a(1e3)}function Pj(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=nm(e,t.masksTree);return t.flatCache.set(e,r),r}function jj(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=Ei("/"),ku(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(s,o)),nm(r,o,n)}function Ej(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=nm(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)s=null;else throw o}return s&&(s.branch=Lj(s.route)),t.matchCache.set(r,s),s}function Tj(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Rj(e,t=!1,n){const r=Ei(e.fullPath),i=new Uint16Array(6),s={},o={};let a=0;return ku(t,i,e,1,r,0,l=>{if(n==null||n(l,a),l.id in s&&ar(),s[l.id]=l,a!==0&&l.path){const c=Tj(l.fullPath);(!o[c]||l.fullPath.endsWith("/"))&&(o[c]=l)}a++}),Mr(r),{processedTree:{segmentTree:r,singleCache:_a(1e3),matchCache:_a(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:o}}function nm(e,t,n=!1){const r=e.split("/"),i=Ij(e,r,t,n);if(!i)return null;const[s]=lb(e,r,i);return{route:i.node.route,rawParams:s,parsedParams:i.parsedParams}}function lb(e,t,n){var u,d,h,p,m,y,w,g,x,v;const r=Mj(n.node);let i=null;const s=Object.create(null);let o=((u=n.extract)==null?void 0:u.part)??0,a=((d=n.extract)==null?void 0:d.node)??0,l=((h=n.extract)==null?void 0:h.path)??0,c=((p=n.extract)==null?void 0:p.segment)??0;for(;a<r.length;o++,a++,l++,c++){const b=r[a];if(b.kind===Br)break;if(b.kind===ab){c--,o--,l--;continue}const S=t[o],C=l;if(S&&(l+=S.length),b.kind===1){i??(i=n.node.fullPath.split("/"));const E=i[c],j=((m=b.prefix)==null?void 0:m.length)??0;if(E.charCodeAt(j)===123){const L=((y=b.suffix)==null?void 0:y.length)??0,P=E.substring(j+2,E.length-L-1),R=S.substring(j,S.length-L);s[P]=decodeURIComponent(R)}else{const L=E.substring(1);s[L]=decodeURIComponent(S)}}else if(b.kind===3){if(n.skipped&1<<a){o--,l=C-1;continue}i??(i=n.node.fullPath.split("/"));const E=i[c],j=((w=b.prefix)==null?void 0:w.length)??0,L=((g=b.suffix)==null?void 0:g.length)??0,P=E.substring(j+3,E.length-L-1),R=b.suffix||b.prefix?S.substring(j,S.length-L):S;R&&(s[P]=decodeURIComponent(R))}else if(b.kind===2){const E=b,j=e.substring(C+(((x=E.prefix)==null?void 0:x.length)??0),e.length-(((v=E.suffix)==null?void 0:v.length)??0)),L=decodeURIComponent(j);s["*"]=L,s._splat=L;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:o,node:a,path:l,segment:c}]}function Lj(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Mj(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ij(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!ba(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,c=null;for(;a.length;){const u=a.pop(),{node:d,index:h,skipped:p,depth:m,statics:y,dynamics:w,optionals:g}=u;let{extract:x,rawParams:v,parsedParams:b}=u;if(d.kind===2&&d.route&&!cl(c,u))continue;if(d.skipOnParamError){if(!Ly(e,t,u))continue;v=u.rawParams,x=u.extract,b=u.parsedParams}r&&d.route&&d.kind!==Br&&cl(l,u)&&(l=u);const S=h===o;if(S&&(d.route&&(!s||d.kind===Br||d.kind===2)&&cl(c,u)&&(c=u),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const C=S?void 0:t[h];let E;if(S&&d.index){const j={node:d.index,index:h,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b};let L=!0;if(d.index.skipOnParamError&&(Ly(e,t,j)||(L=!1)),L){if(!w&&!g&&!p&&Aj(y,o))return j;cl(c,j)&&(c=j)}}if(d.wildcard)for(let j=d.wildcard.length-1;j>=0;j--){const L=d.wildcard[j],{prefix:P,suffix:R}=L;if(!(P&&(S||!(L.caseSensitive?C:E??(E=C.toLowerCase())).startsWith(P)))){if(R){if(S)continue;const I=t.slice(h).join("/").slice(-R.length);if((L.caseSensitive?I:I.toLowerCase())!==R)continue}a.push({node:L,index:o,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}}if(d.optional){const j=p|1<<m,L=m+1;for(let P=d.optional.length-1;P>=0;P--){const R=d.optional[P];a.push({node:R,index:h,skipped:j,depth:L,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!S)for(let P=d.optional.length-1;P>=0;P--){const R=d.optional[P],{prefix:I,suffix:F}=R;if(I||F){const B=R.caseSensitive?C:E??(E=C.toLowerCase());if(I&&!B.startsWith(I)||F&&!B.endsWith(F))continue}a.push({node:R,index:h+1,skipped:p,depth:L,statics:y,dynamics:w,optionals:g+ll(o,h),extract:x,rawParams:v,parsedParams:b})}}if(!S&&d.dynamic&&C)for(let j=d.dynamic.length-1;j>=0;j--){const L=d.dynamic[j],{prefix:P,suffix:R}=L;if(P||R){const I=L.caseSensitive?C:E??(E=C.toLowerCase());if(P&&!I.startsWith(P)||R&&!I.endsWith(R))continue}a.push({node:L,index:h+1,skipped:p,depth:m+1,statics:y,dynamics:w+ll(o,h),optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!S&&d.staticInsensitive){const j=d.staticInsensitive.get(E??(E=C.toLowerCase()));j&&a.push({node:j,index:h+1,skipped:p,depth:m+1,statics:y+ll(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!S&&d.static){const j=d.static.get(C);j&&a.push({node:j,index:h+1,skipped:p,depth:m+1,statics:y+ll(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(d.pathless){const j=m+1;for(let L=d.pathless.length-1;L>=0;L--){const P=d.pathless[L];a.push({node:P,index:h,skipped:p,depth:j,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}}}if(c)return c;if(r&&l){let u=l.index;for(let h=0;h<l.index;h++)u+=t[h].length;const d=u===e.length?"/":e.slice(u);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(d),l}return null}function ll(e,t){return 2**(e-t-1)}function Aj(e,t){return e===2**(t-1)-1}function Ly(e,t,n){try{const[r,i]=lb(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 cl(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===Br)>(e.node.kind===Br)||t.node.kind===Br==(e.node.kind===Br)&&t.depth>e.depth))):!0}function Gl(e){return rm(e.filter(t=>t!==void 0).join("/"))}function rm(e){return e.replace(/\/{2,}/g,"/")}function cb(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Zr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function ub(e){return Zr(cb(e))}function Nc(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Dj(e,t,n){return Nc(e,n)===Nc(t,n)}function Nj({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&&ba(a)==="";)a.pop();const d=t.split("/");for(let h=0,p=d.length;h<p;h++){const m=d[h];m===""?h?h===p-1&&a.push(m):a=[m]:m===".."?a.pop():m==="."||a.push(m)}}a.length>1&&(ba(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,c="";for(let d=0;d<a.length;d++){d>0&&(c+="/");const h=a[d];if(!h)continue;l=tm(h,0,l);const p=l[0];if(p===0){c+=h;continue}const m=l[5],y=h.substring(0,l[1]),w=h.substring(l[4],m),g=h.substring(l[2],l[3]);p===1?c+=y||w?`${y}{$${g}}${w}`:`$${g}`:p===2?c+=y||w?`${y}{$}${w}`:"$":c+=`${y}{-$${g}}${w}`}c=rm(c);const u=c||"/";return o&&r&&r.set(o,u),u}function zj(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 vd(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=>Iy(i,n)).join("/"):Iy(r,n)}function My({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,c="";for(;a<o;){const u=a;l=tm(e,u,l);const d=l[5];if(a=d+1,u===d)continue;const h=l[0];if(h===0){c+="/"+e.substring(u,d);continue}if(h===2){const p=t._splat;s._splat=p,s["*"]=p;const m=e.substring(u,l[1]),y=e.substring(l[4],d);if(!p){i=!0,(m||y)&&(c+="/"+m+y);continue}const w=vd("_splat",t,n);c+="/"+m+w+y;continue}if(h===1){const p=e.substring(l[2],l[3]);!i&&!(p in t)&&(i=!0),s[p]=t[p];const m=e.substring(u,l[1]),y=e.substring(l[4],d),w=vd(p,t,n)??"undefined";c+="/"+m+w+y;continue}if(h===3){const p=e.substring(l[2],l[3]),m=t[p];if(m==null)continue;s[p]=m;const y=e.substring(u,l[1]),w=e.substring(l[4],d),g=vd(p,t,n)??"";c+="/"+y+g+w;continue}}return e.endsWith("/")&&(c+="/"),{usedParams:s,interpolatedPath:c||"/",isMissingParams:i}}function Iy(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function pt(e){return(e==null?void 0:e.isNotFound)===!0}function Fj(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const Bj="tsr-scroll-restoration-v1_3";function Oj(){const e=Fj();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Us(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=zr(r,t)||t},persist:()=>{try{e.setItem(Bj,JSON.stringify(t))}catch{}}}}const Ay=Oj(),$j=e=>e.state.__TSR_key||e.href;function Vj(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 ul=!1;const _o="window",Dy="data-scroll-restoration-id";function Wj(e,t){if(!Ay)return;const n=Ay;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,ul=!1;const r=e.options.getScrollRestorationKey||$j,i=new Map;window.history.scrollRestoration="manual";const s=a=>{if(!(ul||!e.isScrollRestoring))if(a.target===document||a.target===window)i.set(_o,{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 c;if(!e.isScrollRestoring||!a||i.size===0||!n)return;const l=(c=n.state)[a]||(c[a]={});for(const[u,d]of i){let h;if(u===_o)h=_o;else if(u.isConnected){const p=u.getAttribute(Dy);h=p?`[${Dy}="${p}"]`:Vj(u)}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),c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){ul=!0;try{const h=e.isScrollRestoring?n.state[l]:void 0;let p=!1;if(h)for(const m in h){const y=h[m];if(!Us(y))continue;const{scrollX:w,scrollY:g}=y;if(!(!Number.isFinite(w)||!Number.isFinite(g))){if(m===_o)window.scrollTo({top:g,left:w,behavior:c}),p=!0;else if(m){let x;try{x=document.querySelector(m)}catch{continue}x&&(x.scrollLeft=w,x.scrollTop=g,p=!0)}}}if(!p){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 w=document.getElementById(m);w&&w.scrollIntoView(y)}}else{const y={top:0,left:0,behavior:c};if(window.scrollTo(y),u)for(const w of u){if(w===_o)continue;const g=typeof w=="function"?w():document.querySelector(w);g&&g.scrollTo(y)}}}}finally{ul=!1}e.isScrollRestoring&&n.set(h=>(h[l]||(h[l]={}),h))}})}function Uj(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 wd(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Hj(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]=wd(i):Array.isArray(s)?s.push(wd(i)):n[r]=[s,wd(i)]}return n}const Gj=Qj(JSON.parse),Kj=Yj(JSON.stringify,JSON.parse);function Qj(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Hj(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function Yj(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=Uj(i,r);return s?`?${s}`:""}}const Di="__root__";function qj(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 Et(e){return e instanceof Response&&!!e.options}function Xj(e){return{input:({url:t})=>{for(const n of e)t=uh(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=db(e[n],t);return t}}}function Zj(e){const t=ub(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=Gl(["/",t,o.pathname]),o)}}function uh(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 db(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 Jj(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:s}=t,o=new Map,a=new Map,l=new Map,c=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),h=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),y=n(e.statusCode),w=n(e.redirect),g=n([]),x=n([]),v=n([]),b=r(()=>bd(o,g.get())),S=r(()=>bd(a,x.get())),C=r(()=>bd(l,v.get())),E=r(()=>g.get()[0]),j=r(()=>g.get().some(A=>{var D;return((D=o.get(A))==null?void 0:D.get().status)==="pending"})),L=r(()=>{var A;return{locationHref:p.get().href,resolvedLocationHref:(A=m.get())==null?void 0:A.href,status:c.get()}}),P=r(()=>({status:c.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:h.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:w.get()})),R=_a(64);function I(A){let D=R.get(A);return D||(D=r(()=>{const O=g.get();for(const k of O){const V=o.get(k);if(V&&V.routeId===A)return V.get()}}),R.set(A,D)),D}const F={status:c,loadedAt:u,isLoading:d,isTransitioning:h,location:p,resolvedLocation:m,statusCode:y,redirect:w,matchesId:g,pendingIds:x,cachedIds:v,matches:b,pendingMatches:S,cachedMatches:C,firstId:E,hasPending:j,matchRouteDeps:L,matchStores:o,pendingMatchStores:a,cachedMatchStores:l,__store:P,getRouteMatchStore:I,setMatches:B,setPending:z,setCached:G};B(e.matches),s==null||s(F);function B(A){kd(A,o,g,n,i)}function z(A){kd(A,a,x,n,i)}function G(A){kd(A,l,v,n,i)}return F}function bd(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function kd(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 c=r(a);c.routeId=a.routeId,t.set(a.id,c);continue}l.routeId=a.routeId,l.get()!==a&&l.set(a)}_j(n.get(),s)||n.set(s)})}const dh=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},eE=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),_u=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ni=(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},Ny=(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},Or=(e,t,n)=>{var r,i,s;if(!(!Et(n)&&!pt(n)))throw Et(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:Et(n)?"redirected":pt(n)?"notFound":o.status==="pending"?"success":o.status,context:Ni(e,t.index),isFetching:!1,error:n})),pt(n)&&!n.routeId&&(n.routeId=t.routeId),(s=t._nonReactive.loadPromise)==null||s.resolve()),Et(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},fb=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},zy=(e,t,n)=>{const r=Ni(e,n);e.updateMatch(t,i=>({...i,context:r}))},So=(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),Or(e,e.router.getMatch(i),n);try{(l=(a=o.options).onError)==null||l.call(a,n)}catch(c){n=c,Or(e,e.router.getMatch(i),n)}e.updateMatch(i,c=>{var u,d;return(u=c._nonReactive.beforeLoadPromise)==null||u.resolve(),c._nonReactive.beforeLoadPromise=void 0,(d=c._nonReactive.loadPromise)==null||d.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!Et(n)&&!pt(n)&&(e.serialError??(e.serialError=n))},hb=(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&&!_u(e,t)&&(n.options.loader||n.options.beforeLoad||mb(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((s=e.router.options)==null?void 0:s.defaultPendingComponent))){const o=setTimeout(()=>{dh(e)},i);r._nonReactive.pendingTimeout=o}},tE=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;hb(e,t,n,r);const i=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Or(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},nE=(e,t,n,r)=>{const i=e.router.getMatch(t);let s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Hs(()=>{s==null||s.resolve(),s=void 0});const{paramsError:o,searchError:a}=i;o&&So(e,n,o,"PARSE_PARAMS"),a&&So(e,n,a,"VALIDATE_SEARCH"),hb(e,t,r,i);const l=new AbortController;let c=!1;const u=()=>{c||(c=!0,e.updateMatch(t,b=>({...b,isFetching:"beforeLoad",fetchCount:b.fetchCount+1,abortController:l})))},d=()=>{var b;(b=i._nonReactive.beforeLoadPromise)==null||b.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,S=>({...S,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=Hs();const h={...Ni(e,n,!1),...i.__routeContext},{search:p,params:m,cause:y}=i,w=_u(e,t),g={search:p,abortController:l,params:m,preload:w,context:h,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:w?"preload":y,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},x=b=>{if(b===void 0){e.router.batch(()=>{u(),d()});return}(Et(b)||pt(b))&&(u(),So(e,n,b,"BEFORE_LOAD")),e.router.batch(()=>{u(),e.updateMatch(t,S=>({...S,__beforeLoadContext:b})),d()})};let v;try{if(v=r.options.beforeLoad(g),ka(v))return u(),v.catch(b=>{So(e,n,b,"BEFORE_LOAD")}).then(x)}catch(b){u(),So(e,n,b,"BEFORE_LOAD")}x(v)},rE=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>a(),o=()=>nE(e,n,t,i),a=()=>{if(fb(e,n))return;const l=tE(e,n,i);return ka(l)?l.then(o):o()};return s()},iE=(e,t,n)=>{var s,o,a,l,c,u;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),(u=(c=n.options).headers)==null?void 0:u.call(c,i)]).then(([d,h,p])=>({meta:d==null?void 0:d.meta,links:d==null?void 0:d.links,headScripts:d==null?void 0:d.scripts,headers:p,scripts:h,styles:d==null?void 0:d.styles}))},pb=(e,t,n,r,i)=>{const s=t[r-1],{params:o,loaderDeps:a,abortController:l,cause:c}=e.router.getMatch(n),u=Ni(e,r),d=_u(e,n);return{params:o,deps:a,preload:!!d,parentMatchPromise:s,abortController:l,context:u,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:d?"preload":c,route:i,...e.router.options.additionalContext}},Fy=async(e,t,n,r,i)=>{var s,o,a,l,c;try{const u=e.router.getMatch(n);try{(!(ob??e.router.isServer)||u.ssr===!0)&&Sa(i);const d=i.options.loader,h=typeof d=="function"?d:d==null?void 0:d.handler,p=h==null?void 0:h(pb(e,t,n,r,i)),m=!!h&&ka(p);if((m||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||u._nonReactive.minPendingPromise)&&e.updateMatch(n,w=>({...w,isFetching:"loader"})),h){const w=m?await p:p;Or(e,e.router.getMatch(n),w),w!==void 0&&e.updateMatch(n,g=>({...g,loaderData:w}))}i._lazyPromise&&await i._lazyPromise;const y=u._nonReactive.minPendingPromise;y&&await y,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,w=>({...w,error:void 0,context:Ni(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let h=d;if((h==null?void 0:h.name)==="AbortError"){if(u.abortController.signal.aborted){(s=u._nonReactive.loaderPromise)==null||s.resolve(),u._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:Ni(e,r)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,pt(d)&&await((a=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:a.call(o)),Or(e,e.router.getMatch(n),d);try{(c=(l=i.options).onError)==null||c.call(l,d)}catch(m){h=m,Or(e,e.router.getMatch(n),m)}!Et(h)&&!pt(h)&&await Sa(i,["errorComponent"]),e.updateMatch(n,m=>({...m,error:h,context:Ni(e,r),status:"error",isFetching:!1}))}}catch(u){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),Or(e,d,u)}},sE=async(e,t,n)=>{var p,m,y,w;async function r(g,x,v,b,S){const C=Date.now()-x.updatedAt,E=g?S.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:S.options.staleTime??e.router.options.defaultStaleTime??0,j=S.options.shouldReload,L=typeof j=="function"?j(pb(e,t,i,n,S)):j,{status:P,invalid:R}=b,I=C>=E&&(!!e.forceStaleReload||b.cause==="enter"||v!==void 0&&v!==b.id);o=P==="success"&&(R||(L??I)),g&&S.options.preload===!1||(o&&!e.sync&&u?(a=!0,(async()=>{var F,B;try{await Fy(e,t,i,n,S);const z=e.router.getMatch(i);(F=z._nonReactive.loaderPromise)==null||F.resolve(),(B=z._nonReactive.loadPromise)==null||B.resolve(),z._nonReactive.loaderPromise=void 0,z._nonReactive.loadPromise=void 0}catch(z){Et(z)&&await e.router.navigate(z.options)}})()):P!=="success"||o?await Fy(e,t,i,n,S):zy(e,i,n))}const{id:i,routeId:s}=e.matches[n];let o=!1,a=!1;const l=e.router.looseRoutesById[s],c=l.options.loader,u=((typeof c=="function"||c==null?void 0:c.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(fb(e,i)){if(!e.router.getMatch(i))return e.matches[n];zy(e,i,n)}else{const g=e.router.getMatch(i),x=e.router.stores.matchesId.get()[n],v=((p=x&&e.router.stores.matchStores.get(x)||null)==null?void 0:p.routeId)===s?x:(m=e.router.stores.matches.get().find(S=>S.routeId===s))==null?void 0:m.id,b=_u(e,i);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload&&u)return g;await g._nonReactive.loaderPromise;const S=e.router.getMatch(i),C=S._nonReactive.error||S.error;C&&Or(e,S,C),S.status==="pending"&&await r(b,g,v,S,l)}else{const S=b&&!e.router.stores.matchStores.has(i),C=e.router.getMatch(i);C._nonReactive.loaderPromise=Hs(),S!==C.preload&&e.updateMatch(i,E=>({...E,preload:S})),await r(b,g,v,C,l)}}const d=e.router.getMatch(i);a||((y=d._nonReactive.loaderPromise)==null||y.resolve(),(w=d._nonReactive.loadPromise)==null||w.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 By(e){var h,p;const t=e,n=[];eE(t.router)&&dh(t);let r;for(let m=0;m<t.matches.length;m++){try{const y=rE(t,m);ka(y)&&await y}catch(y){if(Et(y))throw y;if(pt(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?Ny(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(sE(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 w=y.reason;if(Et(w))throw w;pt(w)?a??(a=w):l??(l=w)}if(l!==void 0)throw l}const c=a??(r&&!t.preload?r:void 0);let u=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!c&&r&&t.preload)return t.matches;if(c){const m=Ny(t,c);m===void 0&&ar();const y=t.matches[m],w=t.router.looseRoutesById[y.routeId],g=(h=t.router.options)==null?void 0:h.defaultNotFoundComponent;!w.options.notFoundComponent&&g&&(w.options.notFoundComponent=g),c.routeId=y.routeId;const x=y.routeId===t.router.routeTree.id;t.updateMatch(y.id,v=>({...v,...x?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:c},isFetching:!1})),u=m,await Sa(w,["notFoundComponent"])}else if(!t.preload){const m=t.matches[0];m.globalNotFound||(p=t.router.getMatch(m.id))!=null&&p.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 Sa(m,["errorComponent"])}for(let m=0;m<=u;m++){const{id:y,routeId:w}=t.matches[m],g=t.router.looseRoutesById[w];try{const x=iE(t,y,g);if(x){const v=await x;t.updateMatch(y,b=>({...b,...v}))}}catch(x){console.error(`Error executing head for route ${w}:`,x)}}const d=dh(t);if(ka(d)&&await d,c)throw c;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Oy(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 Sa(e,t=Kl){!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===Kl?(()=>{if(e._componentsPromise===void 0){const r=Oy(e,Kl);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Oy(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function mb(e){var t;for(const n of Kl)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Kl=["component","errorComponent","pendingComponent","notFoundComponent"];var Jr="__TSR_index",$y="popstate",Vy="beforeunload";function oE(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 c=((d=e.getBlockers)==null?void 0:d.call(e))??[],u=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&c.length&&u)for(const p of c){const m=zc(l.path,l.state);if(await p.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 c=t.state[Jr];a=Wy(c+1,a),s({task:()=>{e.pushState(o,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const c=t.state[Jr];a=Wy(c,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[Jr]!==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 u,d;const c=((u=e.getBlockers)==null?void 0:u.call(e))??[];(d=e.setBlockers)==null||d.call(e,c.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 Wy(e,t){t||(t={});const n=im();return{...t,key:n,__TSR_key:n,[Jr]:e}}function aE(e){var j,L;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,o=P=>i=P,a=P=>P,l=()=>zc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((j=t.history.state)!=null&&j.__TSR_key)&&!((L=t.history.state)!=null&&L.key)){const P=im();t.history.replaceState({[Jr]:0,key:P,__TSR_key:P},"")}let c=l(),u,d=!1,h=!1,p=!1,m=!1;const y=()=>c;let w,g;const x=()=>{w&&(E._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),E._ignoreSubscribers=!1,w=void 0,g=void 0,u=void 0)},v=(P,R,I)=>{const F=a(R);g||(u=c),c=zc(R,I),w={href:F,state:I,isPush:(w==null?void 0:w.isPush)||P==="push"},g||(g=Promise.resolve().then(()=>x()))},b=P=>{c=l(),E.notify({type:P})},S=async()=>{if(h){h=!1;return}const P=l(),R=P.state[Jr]-c.state[Jr],I=R===1,F=R===-1,B=!I&&!F||d;d=!1;const z=B?"GO":F?"BACK":"FORWARD",G=B?{type:"GO",index:R}:{type:F?"BACK":"FORWARD"};if(p)p=!1;else{const A=s();if(typeof document<"u"&&A.length){for(const D of A)if(await D.blockerFn({currentLocation:c,nextLocation:P,action:z})){h=!0,t.history.go(1),E.notify(G);return}}}c=l(),E.notify(G)},C=P=>{if(m){m=!1;return}let R=!1;const I=s();if(typeof document<"u"&&I.length)for(const F of I){const B=F.enableBeforeUnload??!0;if(B===!0){R=!0;break}if(typeof B=="function"&&B()===!0){R=!0;break}}if(R)return P.preventDefault(),P.returnValue=""},E=oE({getLocation:y,getLength:()=>t.history.length,pushState:(P,R)=>v("push",P,R),replaceState:(P,R)=>v("replace",P,R),back:P=>(P&&(p=!0),m=!0,t.history.back()),forward:P=>{P&&(p=!0),m=!0,t.history.forward()},go:P=>{d=!0,t.history.go(P)},createHref:P=>a(P),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Vy,C,{capture:!0}),t.removeEventListener($y,S)},onBlocked:()=>{u&&c!==u&&(c=u)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Vy,C,{capture:!0}),t.addEventListener($y,S),t.history.pushState=function(...P){const R=n.apply(t.history,P);return E._ignoreSubscribers||b("PUSH"),R},t.history.replaceState=function(...P){const R=r.apply(t.history,P);return E._ignoreSubscribers||b("REPLACE"),R},E}function lE(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function zc(e,t){const n=lE(e),r=n.indexOf("#"),i=n.indexOf("?"),s=im();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||{[Jr]:0,key:s,__TSR_key:s}}}function im(){return(Math.random()+1).toString(36).substring(7)}function Ls(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 cE=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 u;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=zj(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=aE()),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=_a(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=Jj(dE(this.latestLocation),d),Wj(this)}let a=!1;const l=this.options.basepath??"/",c=this.options.rewrite;if(s||i!==l||o!==c){this.basepath=l;const d=[],h=ub(l);h&&h!=="/"&&d.push(Zj({basepath:l})),c&&d.push(c),this.rewrite=d.length===0?void 0:d.length===1?d[0]:Xj(d),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((u=window.CSS)==null?void 0:u.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=Rj(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&Cj(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:c,hash:u,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const g=this.options.parseSearch(c),x=this.options.stringifySearch(g);return{href:l+x+u,publicHref:l+x+u,pathname:ko(l).path,external:!1,searchStr:x,search:pi(r==null?void 0:r.search,g),hash:ko(u.slice(1)).path,state:Fr(r==null?void 0:r.state,h)}}const p=new URL(d,this.origin),m=uh(this.rewrite,p),y=this.options.parseSearch(m.search),w=this.options.stringifySearch(y);return m.search=w,{href:m.href.replace(m.origin,""),publicHref:d,pathname:ko(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:w,search:pi(r==null?void 0:r.search,y),hash:ko(m.hash.slice(1)).path,state:Fr(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)=>Nj({base:n,to:rm(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=>fE({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 P,R;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,c=this.resolvePathWithBase(l,"."),u=a.search,d=Object.assign(Object.create(null),a.params),h=s.to?this.resolvePathWithBase(c,`${s.to}`):this.resolvePathWithBase(c,"."),p=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?d:Object.assign(d,zr(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(p).length>0)for(const I of y){const F=((P=I.options.params)==null?void 0:P.stringify)??I.options.stringifyParams;if(F)try{Object.assign(p,F(p))}catch{}}const w=n.leaveParams?h:ko(My({path:h,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let g=u;if(n._includeValidateSearch&&((R=this.options.search)!=null&&R.strict)){const I={};y.forEach(F=>{if(F.options.validateSearch)try{Object.assign(I,Ql(F.options.validateSearch,{...I,...g}))}catch{}}),g=I}g=hE({search:g,dest:s,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),g=pi(u,g);const x=this.options.stringifySearch(g),v=s.hash===!0?o.hash:s.hash?zr(s.hash,o.hash):void 0,b=v?`#${v}`:"";let S=s.state===!0?o.state:s.state?zr(s.state,o.state):{};S=Fr(o.state,S);const C=`${w}${x}${b}`;let E,j,L=!1;if(this.rewrite){const I=new URL(C,this.origin),F=db(this.rewrite,I);E=I.href.replace(I.origin,""),F.origin!==this.origin?(j=F.href,L=!0):j=F.pathname+F.search+F.hash}else E=kj(C),j=E;return{publicHref:j,href:E,pathname:w,search:g,searchStr:x,state:S,hash:v??"",external:L,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{const a=r(s);let l=o?r(o):void 0;if(!l){const c=Object.create(null);if(this.options.routeMasks){const u=Pj(a.pathname,this.processedTree);if(u){Object.assign(c,u.rawParams);const{from:d,params:h,...p}=u.route,m=h===!1||h===null?Object.create(null):(h??!0)===!0?c:Object.assign(c,zr(h,c));o={from:n.from,...p,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(u=>{i.state[u]=this.latestLocation.state[u]});const c=Ai(i.state,this.latestLocation.state);return l.forEach(u=>{delete i.state[u]}),c},o=Zr(this.latestLocation.href)===Zr(i.href);let a=this.commitLocationPromise;if(this.commitLocationPromise=Hs(()=>{a==null||a.resolve(),a=void 0}),o&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:c,...u}=i;l&&(u={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),u.state.__hashScrollIntoViewOptions=c??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](u.publicHref,u.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=zc(a,{__TSR_index:n?d:d+1}),p=new URL(h.pathname,this.origin);l.to=uh(this.rewrite,p).pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const c=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=c;const u=this.commitLocation({...c,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===c&&(this.pendingBuiltLocation=void 0)}),u},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:s,...o})=>{var l,c;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 u=!a&&s?s:i;if(Dc(u,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const d=((c=(l=this.history).getBlockers)==null?void 0:c.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(u):window.location.href=u,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 c;try{this.beforeLoad();const u=this.latestLocation,d=Ls(u,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...d}),this.emit({type:"onBeforeLoad",...d}),await By({router:this,sync:n==null?void 0:n.sync,forceStaleReload:o.href===u.href,matches:this.stores.pendingMatches.get(),location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var w,g;let h=null,p=null,m=null,y=null;this.batch(()=>{const x=this.stores.pendingMatches.get(),v=x.length,b=this.stores.matches.get();h=v?b.filter(E=>!this.stores.pendingMatchStores.has(E.id)):null;const S=new Set;for(const E of this.stores.pendingMatchStores.values())E.routeId&&S.add(E.routeId);const C=new Set;for(const E of this.stores.matchStores.values())E.routeId&&C.add(E.routeId);p=v?b.filter(E=>!S.has(E.routeId)):null,m=v?x.filter(E=>!C.has(E.routeId)):null,y=v?x.filter(E=>C.has(E.routeId)):b,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(x),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[x,v]of[[p,"onLeave"],[m,"onEnter"],[y,"onStay"]])if(x)for(const b of x)(g=(w=this.looseRoutesById[b.routeId].options)[v])==null||g.call(w,b)})})}})}catch(u){Et(u)?(r=u,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):pt(u)&&(i=u);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&&((c=this.commitLocationPromise)==null||c.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(Ls(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(c=>c!==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&&Dc(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=Sa,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 By({router:this,matches:i,location:r,preload:!0,updateMatch:(l,c)=>{s.has(l)?i=i.map(u=>u.id===l?c(u):u):this.updateMatch(l,c)}}),i}catch(l){if(Et(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:r});pt(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=jj(s.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!a||n.params&&!Ai(a.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Ai(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??Kj,parseSearch:e.parseSearch??Gj,protocolAllowlist:e.protocolAllowlist??bj}),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["**"]:Zr(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const l=a?mE(this.options.notFoundMode,o):void 0,c=new Array(o.length),u=new Map;for(const p of this.stores.matchStores.values())p.routeId&&u.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const m=o[p],y=c[p-1];let w,g,x;{const z=(y==null?void 0:y.search)??e.search,G=(y==null?void 0:y._strictSearch)??void 0;try{const A=Ql(m.options.validateSearch,{...z})??void 0;w={...z,...A},g={...G,...A},x=void 0}catch(A){let D=A;if(A instanceof Fc||(D=new Fc(A.message,{cause:A})),t!=null&&t.throwOnError)throw D;w=z,g={},x=D}}const v=((h=(d=m.options).loaderDeps)==null?void 0:h.call(d,{search:w}))??"",b=v?JSON.stringify(v):"",{interpolatedPath:S,usedParams:C}=My({path:m.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),E=m.id+S+b,j=this.getMatch(E),L=u.get(m.id),P=(j==null?void 0:j._strictParams)??C;let R;if(!j)try{Uy(m,C,s,P)}catch(z){if(pt(z)||Et(z)?R=z:R=new uE(z.message,{cause:z}),t!=null&&t.throwOnError)throw R}Object.assign(i,P);const I=L?"stay":"enter";let F;if(j)F={...j,cause:I,params:(L==null?void 0:L.params)??i,_strictParams:P,search:pi(L?L.search:j.search,w),_strictSearch:g};else{const z=m.options.loader||m.options.beforeLoad||m.lazyFn||mb(m)?"pending":"success";F={id:E,ssr:m.options.ssr,index:p,routeId:m.id,params:(L==null?void 0:L.params)??i,_strictParams:P,pathname:S,updatedAt:Date.now(),search:L?pi(L.search,w):w,_strictSearch:g,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:R,__routeContext:void 0,_nonReactive:{loadPromise:Hs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:I,loaderDeps:L?Fr(L.loaderDeps,v):v,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||(F.globalNotFound=l===m.id),F.searchError=x;const B=this.getParentContext(y);F.context={...B,...F.__routeContext,...F.__beforeLoadContext},c[p]=F}for(let p=0;p<c.length;p++){const m=c[p],y=this.looseRoutesById[m.routeId],w=this.getMatch(m.id),g=u.get(m.routeId);if(m.params=g?pi(g.params,i):i,!w){const x=c[p-1],v=this.getParentContext(x);if(y.options.context){const b={deps:m.loaderDeps,params:m.params,context:v??{},location:e,navigate:S=>this.navigate({...S,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:c,routeId:y.id};m.__routeContext=y.options.context(b)??void 0}m.context={...v,...m.__routeContext,...m.__beforeLoadContext}}}return c}matchRoutesLightweight(e){var u;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=ba(t),s={...e.search};for(const d of t)try{Object.assign(s,Ql(d.options.validateSearch,s))}catch{}const o=ba(this.stores.matchesId.get()),a=o&&((u=this.stores.matchStores.get(o))==null?void 0:u.get()),l=a&&a.routeId===i.id&&a.pathname===e.pathname;let c;if(l)c=a.params;else{const d=Object.assign(Object.create(null),n);for(const h of t)try{Uy(h,n,r??{},d)}catch{}c=d}return{matchedRoutes:t,fullPath:i.fullPath,search:s,params:c}}},Fc=class extends Error{},uE=class extends Error{};function dE(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ql(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Fc("Async validation not supported");if(n.issues)throw new Fc(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 fE({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=Zr(e);let s,o;const a=Ej(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 hE({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return pE(n)(e,t,r??!1)}function pE(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 c=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(c=s.options.preSearchFilters.reduce((d,h)=>h(d),a));const u=l(c);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((d,h)=>h(d),u):u};t.middlewares.push(o)}if(s.options.validateSearch){const o=({search:a,next:l})=>{const c=l(a);if(!t._includeValidateSearch)return c;try{return{...c,...Ql(s.options.validateSearch,c)??void 0}}catch{return c}};t.middlewares.push(o)}}const n=({search:s})=>{const o=t.dest;return o.search?o.search===!0?s:zr(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:u=>r(s+1,u,a)})};return function(o,a,l){return t.dest=a,t._includeValidateSearch=l,r(0,o,t.middlewares)}}function mE(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 Di}function Uy(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 gE="Error preloading route! ☝️";var gb=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,c;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(c=(l=this.options).getParentRoute)==null?void 0:c.call(l),r?this._path=Di:this.parentRoute||ar();let i=r?Di:n==null?void 0:n.path;i&&i!=="/"&&(i=cb(i));const s=(n==null?void 0:n.id)||i;let o=r?Di:Gl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=Gl(["/",o]));const a=o==="__root__"?"/":Gl([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=a,this._to=Zr(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=>qj({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.")}},yE=class extends gb{constructor(e){super(e)}};function xE(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 sm(e){const t=e.errorComponent??om;return f.jsx(vE,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?_.createElement(t,{error:n,reset:r}):e.children})}var vE=class extends _.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 om({error:e}){const[t,n]=_.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.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"})]}),f.jsx("div",{style:{height:".25rem"}}),t?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function wE({children:e,fallback:t=null}){return yb()?f.jsx(Ns.Fragment,{children:e}):f.jsx(Ns.Fragment,{children:t})}function yb(){return Ns.useSyncExternalStore(bE,()=>!0,()=>!1)}function bE(){return()=>{}}var xb=_.createContext(null);function Zt(e){return _.useContext(xb)}var Su=_.createContext(void 0),kE=_.createContext(void 0),Re=(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))(Re||{});function _E({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:s,checkDirty:o,shallowPropagate:a};function r(c,u,d){const h=u.depsTail;if(h!==void 0&&h.dep===c)return;const p=h!==void 0?h.nextDep:u.deps;if(p!==void 0&&p.dep===c){p.version=d,u.depsTail=p;return}const m=c.subsTail;if(m!==void 0&&m.version===d&&m.sub===u)return;const y=u.depsTail=c.subsTail={version:d,dep:c,sub:u,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=y),h!==void 0?h.nextDep=y:u.deps=y,m!==void 0?m.nextSub=y:c.subs=y}function i(c,u=c.sub){const d=c.dep,h=c.prevDep,p=c.nextDep,m=c.nextSub,y=c.prevSub;return p!==void 0?p.prevDep=h:u.depsTail=h,h!==void 0?h.nextDep=p:u.deps=p,m!==void 0?m.prevSub=y:d.subsTail=y,y!==void 0?y.nextSub=m:(d.subs=m)===void 0&&n(d),p}function s(c){let u=c.nextSub,d;e:do{const h=c.sub;let p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(c,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&t(h),p&1){const m=h.subs;if(m!==void 0){const y=(c=m).nextSub;y!==void 0&&(d={value:u,prev:d},u=y);continue}}if((c=u)!==void 0){u=c.nextSub;continue}for(;d!==void 0;)if(c=d.value,d=d.prev,c!==void 0){u=c.nextSub;continue e}break}while(!0)}function o(c,u){let d,h=0,p=!1;e:do{const m=c.dep,y=m.flags;if(u.flags&16)p=!0;else if((y&17)===17){if(e(m)){const w=m.subs;w.nextSub!==void 0&&a(w),p=!0}}else if((y&33)===33){(c.nextSub!==void 0||c.prevSub!==void 0)&&(d={value:c,prev:d}),c=m.deps,u=m,++h;continue}if(!p){const w=c.nextDep;if(w!==void 0){c=w;continue}}for(;h--;){const w=u.subs,g=w.nextSub!==void 0;if(g?(c=d.value,d=d.prev):c=w,p){if(e(u)){g&&a(w),u=c.sub;continue}p=!1}else u.flags&=-33;u=c.sub;const x=c.nextDep;if(x!==void 0){c=x;continue e}}return p}while(!0)}function a(c){do{const u=c.sub,d=u.flags;(d&48)===32&&(u.flags=d|16,(d&6)===2&&t(u))}while((c=c.nextSub)!==void 0)}function l(c,u){let d=u.depsTail;for(;d!==void 0;){if(d===c)return!0;d=d.prevDep}return!1}}function SE(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 fh=[];let Yl=0;const{link:Hy,unlink:CE,propagate:PE,checkDirty:vb,shallowPropagate:Gy}=_E({update(e){return e._update()},notify(e){fh[hh++]=e,e.flags&=~Re.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Re.Mutable|Re.Dirty,Bc(e))}});let dl=0,hh=0,On,ph=0;function wb(e){try{++ph,e()}finally{--ph||bb()}}function Bc(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=CE(n,e)}function bb(){if(!(ph>0)){for(;dl<hh;){const e=fh[dl];fh[dl++]=void 0,e.notify()}dl=0,hh=0}}function Ky(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?Re.None:Re.Mutable,get(){return On!==void 0&&Hy(i,On,Yl),i._snapshot},subscribe(s){const o=SE(s),a={current:!1},l=jE(()=>{var c;i.get(),a.current?(c=o.next)==null||c.call(o,i._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const o=On,a=(t==null?void 0:t.compare)??Object.is;if(n)On=i,++Yl,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=Re.Mutable|Re.RecursedCheck);try{const l=i._snapshot,c=typeof s=="function"?s(l):s===void 0&&n?r(l):s;return l===void 0||!a(l,c)?(i._snapshot=c,!0):!1}finally{On=o,n&&(i.flags&=~Re.RecursedCheck),Bc(i)}}};return n?(i.flags=Re.Mutable|Re.Dirty,i.get=function(){const s=i.flags;if(s&Re.Dirty||s&Re.Pending&&vb(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&Gy(o)}}else s&Re.Pending&&(i.flags=s&~Re.Pending);return On!==void 0&&Hy(i,On,Yl),i._snapshot}):i.set=function(s){if(i._update(s)){const o=i.subs;o!==void 0&&(PE(o),Gy(o),bb())}},i}function jE(e){const t=()=>{const r=On;On=n,++Yl,n.depsTail=void 0,n.flags=Re.Watching|Re.RecursedCheck;try{return e()}finally{On=r,n.flags&=~Re.RecursedCheck,Bc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Re.Watching|Re.RecursedCheck,notify(){const r=this.flags;r&Re.Dirty||r&Re.Pending&&vb(this.deps,this)?t():this.flags=Re.Watching},stop(){this.flags=Re.None,this.depsTail=void 0,Bc(this)}};return t(),n}var kb={exports:{}},_b={},Sb={exports:{}},Cb={};/**
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 Gs=_;function EE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var TE=typeof Object.is=="function"?Object.is:EE,RE=Gs.useState,LE=Gs.useEffect,ME=Gs.useLayoutEffect,IE=Gs.useDebugValue;function AE(e,t){var n=t(),r=RE({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return ME(function(){i.value=n,i.getSnapshot=t,_d(i)&&s({inst:i})},[e,n,t]),LE(function(){return _d(i)&&s({inst:i}),e(function(){_d(i)&&s({inst:i})})},[e]),IE(n),n}function _d(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!TE(e,n)}catch{return!0}}function DE(e,t){return t()}var NE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?DE:AE;Cb.useSyncExternalStore=Gs.useSyncExternalStore!==void 0?Gs.useSyncExternalStore:NE;Sb.exports=Cb;var zE=Sb.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 Cu=_,FE=zE;function BE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var OE=typeof Object.is=="function"?Object.is:BE,$E=FE.useSyncExternalStore,VE=Cu.useRef,WE=Cu.useEffect,UE=Cu.useMemo,HE=Cu.useDebugValue;_b.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=VE(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=UE(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),i!==void 0&&o.hasValue){var m=o.value;if(i(m,p))return d=m}return d=p}if(m=d,OE(u,p))return m;var y=r(p);return i!==void 0&&i(m,y)?(u=p,m):(u=p,d=y)}var c=!1,u,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=$E(e,s[0],s[1]);return WE(function(){o.hasValue=!0,o.value=a},[a]),HE(a),a};kb.exports=_b;var Pb=kb.exports;const GE=su(Pb);function KE(e,t){return e===t}function It(e,t,n=KE){const r=_.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(o);return a},[e]),i=_.useCallback(()=>e==null?void 0:e.get(),[e]);return Pb.useSyncExternalStoreWithSelector(r,i,i,t,n)}var QE={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ki(e){const t=Zt(),n=_.useContext(e.from?kE:Su),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=_.useRef(void 0);return It(i??QE,o=>{if((e.shouldThrow??!0)&&!o&&ar(),o===void 0)return;const a=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const l=Fr(s.current,a);return s.current=l,l}return a})}function jb(e){return Ki({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Eb(e){const{select:t,...n}=e;return Ki({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Na(e){return Ki({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 Tb(e){return Ki({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function gn(e){const t=Zt();return _.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function Rb(e){return Ki({...e,select:t=>e.select?e.select(t.context):t.context})}function YE(e,t){const n=Zt(),r=gj(t),{activeProps:i,inactiveProps:s,activeOptions:o,to:a,preload:l,preloadDelay:c,preloadIntentProximity:u,hashScrollIntoView:d,replace:h,startTransition:p,resetScroll:m,viewTransition:y,children:w,target:g,disabled:x,style:v,className:b,onClick:S,onBlur:C,onFocus:E,onMouseEnter:j,onMouseLeave:L,onTouchStart:P,ignoreBlocker:R,params:I,search:F,hash:B,state:z,mask:G,reloadDocument:A,unsafeRelative:D,from:O,_fromLocation:k,...V}=e,q=yb(),T=_.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ue=It(n.stores.location,fe=>fe,(fe,N)=>fe.href===N.href),he=_.useMemo(()=>{const fe={_fromLocation:ue,...T};return n.buildLocation(fe)},[n,ue,T]),pe=he.maskedLocation?he.maskedLocation.publicHref:he.publicHref,ot=he.maskedLocation?he.maskedLocation.external:he.external,Be=_.useMemo(()=>tT(pe,ot,n.history,x),[x,ot,pe,n.history]),at=_.useMemo(()=>{if(Be!=null&&Be.external)return Dc(Be.href,n.protocolAllowlist)?void 0:Be.href;if(!nT(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),Dc(a,n.protocolAllowlist)?void 0:a}catch{}},[a,Be,n.protocolAllowlist]),Dt=_.useMemo(()=>{if(at)return!1;if(o!=null&&o.exact){if(!Dj(ue.pathname,he.pathname,n.basepath))return!1}else{const fe=Nc(ue.pathname,n.basepath),N=Nc(he.pathname,n.basepath);if(!(fe.startsWith(N)&&(fe.length===N.length||fe[N.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Ai(ue.search,he.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?q&&ue.hash===he.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,ue,at,q,he.hash,he.pathname,he.search,n.basepath]),Jt=Dt?zr(i,{})??qE:Sd,Yn=Dt?Sd:zr(s,{})??Sd,hr=[b,Jt.className,Yn.className].filter(Boolean).join(" "),qn=(v||Jt.style||Yn.style)&&{...v,...Jt.style,...Yn.style},[pr,Xe]=_.useState(!1),Pe=_.useRef(!1),_t=e.reloadDocument||at?!1:l??n.options.defaultPreload,en=c??n.options.defaultPreloadDelay??0,lt=_.useCallback(()=>{n.preloadRoute({...T,_builtLocation:he}).catch(fe=>{console.warn(fe),console.warn(gE)})},[n,T,he]);mj(r,_.useCallback(fe=>{fe!=null&&fe.isIntersecting&&lt()},[lt]),eT,{disabled:!!x||_t!=="viewport"}),_.useEffect(()=>{Pe.current||!x&&_t==="render"&&(lt(),Pe.current=!0)},[x,lt,_t]);const ho=fe=>{const N=fe.currentTarget.getAttribute("target"),W=g!==void 0?g:N;if(!x&&!rT(fe)&&!fe.defaultPrevented&&(!W||W==="_self")&&fe.button===0){fe.preventDefault(),Js.flushSync(()=>{Xe(!0)});const Z=n.subscribe("onResolved",()=>{Z(),Xe(!1)});n.navigate({...T,replace:h,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:y,ignoreBlocker:R})}};if(at)return{...V,ref:r,href:at,...w&&{children:w},...g&&{target:g},...x&&{disabled:x},...v&&{style:v},...b&&{className:b},...S&&{onClick:S},...C&&{onBlur:C},...E&&{onFocus:E},...j&&{onMouseEnter:j},...L&&{onMouseLeave:L},...P&&{onTouchStart:P}};const mr=fe=>{if(x||_t!=="intent")return;if(!en){lt();return}const N=fe.currentTarget;if(Co.has(N))return;const W=setTimeout(()=>{Co.delete(N),lt()},en);Co.set(N,W)},di=fe=>{x||_t!=="intent"||lt()},gr=fe=>{if(x||!_t||!en)return;const N=fe.currentTarget,W=Co.get(N);W&&(clearTimeout(W),Co.delete(N))};return{...V,...Jt,...Yn,href:Be==null?void 0:Be.href,ref:r,onClick:Zi([S,ho]),onBlur:Zi([C,gr]),onFocus:Zi([E,mr]),onMouseEnter:Zi([j,mr]),onMouseLeave:Zi([L,gr]),onTouchStart:Zi([P,di]),disabled:!!x,target:g,...qn&&{style:qn},...hr&&{className:hr},...x&&XE,...Dt&&ZE,...q&&pr&&JE}}var Sd={},qE={className:"active"},XE={role:"link","aria-disabled":!0},ZE={"data-status":"active","aria-current":"page"},JE={"data-transitioning":"transitioning"},Co=new WeakMap,eT={rootMargin:"100px"},Zi=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function tT(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function nT(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Lb=_.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...s}=YE(r,t),o=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...l}=s;return _.createElement("a",l,o)}return _.createElement(n,s,o)});function rT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var iT=class extends gb{constructor(e){super(e),this.useMatch=t=>Ki({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Rb({...t,from:this.id}),this.useSearch=t=>Tb({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Na({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Eb({...t,from:this.id}),this.useLoaderData=t=>jb({...t,from:this.id}),this.useNavigate=()=>gn({from:this.fullPath}),this.Link=Ns.forwardRef((t,n)=>f.jsx(Lb,{ref:n,from:this.fullPath,...t}))}};function eo(e){return new iT(e)}var sT=class extends yE{constructor(e){super(e),this.useMatch=t=>Ki({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Rb({...t,from:this.id}),this.useSearch=t=>Tb({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Na({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Eb({...t,from:this.id}),this.useLoaderData=t=>jb({...t,from:this.id}),this.useNavigate=()=>gn({from:this.fullPath}),this.Link=Ns.forwardRef((t,n)=>f.jsx(Lb,{ref:n,from:this.fullPath,...t}))}};function oT(e){return new sT(e)}function aT(e){const t=Zt(),n=`not-found-${It(t.stores.location,r=>r.pathname)}-${It(t.stores.status,r=>r)}`;return f.jsx(sm,{getResetKey:()=>n,onCatch:(r,i)=>{var s;if(pt(r))(s=e.onCatch)==null||s.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(pt(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function lT(){return f.jsx("p",{children:"Not Found"})}function as(e){return f.jsx(f.Fragment,{children:e.children})}function Mb(e,t,n){return t.options.notFoundComponent?f.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...n}):f.jsx(lT,{})}function cT(e){return null}function uT(){return cT(Zt()),null}var Ib=_.memo(function({matchId:t}){const n=Zt(),r=n.stores.matchStores.get(t);r||ar();const i=It(n.stores.loadedAt,o=>o),s=It(r,o=>o);return f.jsx(dT,{router:n,matchId:t,resetKey:i,matchState:_.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 dT({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?f.jsx(s,{}):null,a=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,c=i.isRoot?i.options.notFoundComponent??((m=e.options.notFoundRoute)==null?void 0:m.options.component):i.options.notFoundComponent,u=r.ssr===!1||r.ssr==="data-only",d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??s??(((y=i.options.errorComponent)==null?void 0:y.preload)||u))?_.Suspense:as,h=a?sm:as,p=c?aT:as;return f.jsxs(i.isRoot?i.options.shellComponent??as:as,{children:[f.jsx(Su.Provider,{value:t,children:f.jsx(d,{fallback:o,children:f.jsx(h,{getResetKey:()=>n,errorComponent:a||om,onCatch:(w,g)=>{if(pt(w))throw w.routeId??(w.routeId=r.routeId),w;l==null||l(w,g)},children:f.jsx(p,{fallback:w=>{if(w.routeId??(w.routeId=r.routeId),!c||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!i.isRoot)throw w;return _.createElement(c,w)},children:u||r._displayPending?f.jsx(wE,{fallback:o,children:f.jsx(Qy,{matchId:t})}):f.jsx(Qy,{matchId:t})})})})}),r.parentRouteId===Di?f.jsxs(f.Fragment,{children:[f.jsx(fT,{resetKey:n}),e.options.scrollRestoration&&ob?f.jsx(uT,{}):null]}):null]})}function fT({resetKey:e}){const t=Zt(),n=_.useRef(void 0);return Bo(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Ls(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var Qy=_.memo(function({matchId:t}){const n=Zt(),r=(u,d)=>{var h;return((h=n.getMatch(u.id))==null?void 0:h._nonReactive[d])??u._nonReactive[d]},i=n.stores.matchStores.get(t);i||ar();const s=It(i,u=>u),o=s.routeId,a=n.routesById[o],l=_.useMemo(()=>{var d;const u=(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 u?JSON.stringify(u):void 0},[o,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),c=_.useMemo(()=>{const u=a.options.component??n.options.defaultComponent;return u?f.jsx(u,{},l):f.jsx(Ab,{})},[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 u=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(u){const d=n.getMatch(s.id);if(d&&!d._nonReactive.minPendingPromise){const h=Hs();d._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),d._nonReactive.minPendingPromise=void 0},u)}}throw r(s,"loadPromise")}if(s.status==="notFound")return pt(s.error)||ar(),Mb(n,a,s.error);if(s.status==="redirected")throw Et(s.error)||ar(),r(s,"loadPromise");if(s.status==="error")throw s.error;return c}),Ab=_.memo(function(){const t=Zt(),n=_.useContext(Su);let r,i=!1,s;{const c=n?t.stores.matchStores.get(n):void 0;[r,i]=It(c,u=>[u==null?void 0:u.routeId,(u==null?void 0:u.globalNotFound)??!1]),s=It(t.stores.matchesId,u=>u[u.findIndex(d=>d===n)+1])}const o=r?t.routesById[r]:void 0,a=t.options.defaultPendingComponent?f.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||ar(),Mb(t,o,void 0);if(!s)return null;const l=f.jsx(Ib,{matchId:s});return r===Di?f.jsx(_.Suspense,{fallback:a,children:l}):l});function hT(){const e=Zt(),t=_.useRef({router:e,mounted:!1}),[n,r]=_.useState(!1),i=It(e.stores.isLoading,d=>d),s=It(e.stores.hasPending,d=>d),o=gd(i),a=i||n||s,l=gd(a),c=i||s,u=gd(c);return e.startTransition=d=>{r(!0),_.startTransition(()=>{d(),r(!1)})},_.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 Zr(e.latestLocation.publicHref)!==Zr(h.publicHref)&&e.commitLocation({...h,replace:!0}),()=>{d()}},[e,e.history]),Bo(()=>{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]),Bo(()=>{o&&!i&&e.emit({type:"onLoad",...Ls(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Bo(()=>{u&&!c&&e.emit({type:"onBeforeRouteMount",...Ls(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,u,e]),Bo(()=>{if(l&&!a){const d=Ls(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),wb(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&xE(e)}},[a,l,e]),null}function pT(){const e=Zt(),t=e.routesById[Di].options.pendingComponent??e.options.defaultPendingComponent,n=t?f.jsx(t,{}):null,r=f.jsxs(typeof document<"u"&&e.ssr?as:_.Suspense,{fallback:n,children:[f.jsx(hT,{}),f.jsx(mT,{})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:r}):r}function mT(){const e=Zt(),t=It(e.stores.firstId,i=>i),n=It(e.stores.loadedAt,i=>i),r=t?f.jsx(Ib,{matchId:t}):null;return f.jsx(Su.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:f.jsx(sm,{getResetKey:()=>n,errorComponent:om,onCatch:void 0,children:r})})}var gT=e=>({createMutableStore:Ky,createReadonlyStore:Ky,batch:wb}),yT=e=>new xT(e),xT=class extends cE{constructor(e){super(e,gT)}};function vT({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=f.jsx(xb.Provider,{value:e,children:t});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function wT({router:e,...t}){return f.jsx(vT,{router:e,...t,children:f.jsx(pT,{})})}function bT(e){const t=Zt({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=_.useRef(void 0);return It(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=Fr(r.current,e.select(i));return r.current=s,s}return e.select(i)}return i})}function Db(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=Db(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function kT(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Db(e))&&(r&&(r+=" "),r+=t);return r}const am="-",_T=e=>{const t=CT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(am);return a[0]===""&&a.length!==1&&a.shift(),Nb(a,t)||ST(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Nb=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Nb(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(am);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Yy=/^\[(.+)\]$/,ST=e=>{if(Yy.test(e)){const t=Yy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},CT=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return jT(Object.entries(e.classGroups),n).forEach(([s,o])=>{mh(o,r,s,t)}),r},mh=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:qy(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(PT(i)){mh(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{mh(o,qy(t,s),n,r)})})},qy=(e,t)=>{let n=e;return t.split(am).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PT=e=>e.isThemeGetter,jT=(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,ET=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)}}},zb="!",TT=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let w=0;w<a.length;w++){let g=a[w];if(c===0){if(g===i&&(r||a.slice(w,w+s)===t)){l.push(a.slice(u,w)),u=w+s;continue}if(g==="/"){d=w;continue}}g==="["?c++:g==="]"&&c--}const h=l.length===0?a:a.substring(u),p=h.startsWith(zb),m=p?h.substring(1):h,y=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},RT=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},LT=e=>({cache:ET(e.cacheSize),parseClassName:TT(e),..._T(e)}),MT=/\s+/,IT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(MT);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(c);let m=!!p,y=r(m?h.substring(0,p):h);if(!y){if(!m){a=c+(a.length>0?" "+a:a);continue}if(y=r(h),!y){a=c+(a.length>0?" "+a:a);continue}m=!1}const w=RT(u).join(":"),g=d?w+zb:w,x=g+y;if(s.includes(x))continue;s.push(x);const v=i(y,m);for(let b=0;b<v.length;++b){const S=v[b];s.push(g+S)}a=c+(a.length>0?" "+a:a)}return a};function AT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Fb(t))&&(r&&(r+=" "),r+=n);return r}const Fb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Fb(e[r]))&&(n&&(n+=" "),n+=t);return n};function DT(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=LT(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=IT(l,n);return i(l,u),u}return function(){return s(AT.apply(null,arguments))}}const je=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Bb=/^\[(?:([a-z-]+):)?(.+)\]$/i,NT=/^\d+\/\d+$/,zT=new Set(["px","full","screen"]),FT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BT=/\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$/,OT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$T=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zn=e=>Ms(e)||zT.has(e)||NT.test(e),vr=e=>to(e,"length",qT),Ms=e=>!!e&&!Number.isNaN(Number(e)),Cd=e=>to(e,"number",Ms),Po=e=>!!e&&Number.isInteger(Number(e)),WT=e=>e.endsWith("%")&&Ms(e.slice(0,-1)),re=e=>Bb.test(e),wr=e=>FT.test(e),UT=new Set(["length","size","percentage"]),HT=e=>to(e,UT,Ob),GT=e=>to(e,"position",Ob),KT=new Set(["image","url"]),QT=e=>to(e,KT,ZT),YT=e=>to(e,"",XT),jo=()=>!0,to=(e,t,n)=>{const r=Bb.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},qT=e=>BT.test(e)&&!OT.test(e),Ob=()=>!1,XT=e=>$T.test(e),ZT=e=>VT.test(e),JT=()=>{const e=je("colors"),t=je("spacing"),n=je("blur"),r=je("brightness"),i=je("borderColor"),s=je("borderRadius"),o=je("borderSpacing"),a=je("borderWidth"),l=je("contrast"),c=je("grayscale"),u=je("hueRotate"),d=je("invert"),h=je("gap"),p=je("gradientColorStops"),m=je("gradientColorStopPositions"),y=je("inset"),w=je("margin"),g=je("opacity"),x=je("padding"),v=je("saturate"),b=je("scale"),S=je("sepia"),C=je("skew"),E=je("space"),j=je("translate"),L=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",re,t],I=()=>[re,t],F=()=>["",Zn,vr],B=()=>["auto",Ms,re],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",re],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Ms,re];return{cacheSize:500,separator:":",theme:{colors:[jo],spacing:[Zn,vr],blur:["none","",wr,re],brightness:V(),borderColor:[e],borderRadius:["none","","full",wr,re],borderSpacing:I(),borderWidth:F(),contrast:V(),grayscale:O(),hueRotate:V(),invert:O(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[WT,vr],inset:R(),margin:R(),opacity:V(),padding:I(),saturate:V(),scale:V(),sepia:O(),skew:V(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[wr]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),re]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],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",Po,re]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Po,re]}],"grid-cols":[{"grid-cols":[jo]}],"col-start-end":[{col:["auto",{span:["full",Po,re]},re]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[jo]}],"row-start-end":[{row:["auto",{span:[Po,re]},re]}],"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",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"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",re,t]}],"min-w":[{"min-w":[re,t,"min","max","fit"]}],"max-w":[{"max-w":[re,t,"none","full","min","max","fit","prose",{screen:[wr]},wr]}],h:[{h:[re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",wr,vr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Cd]}],"font-family":[{font:[jo]}],"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",re]}],"line-clamp":[{"line-clamp":["none",Ms,Cd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Zn,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"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:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Zn,vr]}],"underline-offset":[{"underline-offset":["auto",Zn,re]}],"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",re]}],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",re]}],"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:[...z(),GT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",HT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},QT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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:[...G(),"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:G()}],"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:["",...G()]}],"outline-offset":[{"outline-offset":[Zn,re]}],"outline-w":[{outline:[Zn,vr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Zn,vr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wr,YT]}],"shadow-color":[{shadow:[jo]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",wr,re]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",re]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Po,re]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],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",re]}],"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",re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Zn,vr,Cd]}],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"]}}},e2=DT(JT);function Pd(e,t,n){if(e&&e.length){const[r,i]=t,s=Math.PI/180*n,o=Math.cos(s),a=Math.sin(s);for(const l of e){const[c,u]=l;l[0]=(c-r)*o-(u-i)*a+r,l[1]=(c-r)*a+(u-i)*o+i}}}function t2(e,t){return e[0]===t[0]&&e[1]===t[1]}function n2(e,t,n,r=1){const i=n,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,a=[0,0];if(i)for(const c of o)Pd(c,a,i);const l=function(c,u,d){const h=[];for(const x of c){const v=[...x];t2(v[0],v[v.length-1])||v.push([v[0][0],v[0][1]]),v.length>2&&h.push(v)}const p=[];u=Math.max(u,.1);const m=[];for(const x of h)for(let v=0;v<x.length-1;v++){const b=x[v],S=x[v+1];if(b[1]!==S[1]){const C=Math.min(b[1],S[1]);m.push({ymin:C,ymax:Math.max(b[1],S[1]),x:C===b[1]?b[0]:S[0],islope:(S[0]-b[0])/(S[1]-b[1])})}}if(m.sort((x,v)=>x.ymin<v.ymin?-1:x.ymin>v.ymin?1:x.x<v.x?-1:x.x>v.x?1:x.ymax===v.ymax?0:(x.ymax-v.ymax)/Math.abs(x.ymax-v.ymax)),!m.length)return p;let y=[],w=m[0].ymin,g=0;for(;y.length||m.length;){if(m.length){let x=-1;for(let v=0;v<m.length&&!(m[v].ymin>w);v++)x=v;m.splice(0,x+1).forEach(v=>{y.push({s:w,edge:v})})}if(y=y.filter(x=>!(x.edge.ymax<=w)),y.sort((x,v)=>x.edge.x===v.edge.x?0:(x.edge.x-v.edge.x)/Math.abs(x.edge.x-v.edge.x)),(d!==1||g%u==0)&&y.length>1)for(let x=0;x<y.length;x+=2){const v=x+1;if(v>=y.length)break;const b=y[x].edge,S=y[v].edge;p.push([[Math.round(b.x),w],[Math.round(S.x),w]])}w+=d,y.forEach(x=>{x.edge.x=x.edge.x+d*x.edge.islope}),g++}return p}(o,s,r);if(i){for(const c of o)Pd(c,a,-i);(function(c,u,d){const h=[];c.forEach(p=>h.push(...p)),Pd(h,u,d)})(l,a,-i)}return l}function za(e,t){var n;const r=t.hachureAngle+90;let i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let s=1;return t.roughness>=1&&(((n=t.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(s=i),n2(e,i,r,s||1)}class lm{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){const r=za(t,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(t,n){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}}function Pu(e){const t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}class r2 extends lm{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=za(t,Object.assign({},n,{hachureGap:r})),s=Math.PI/180*n.hachureAngle,o=[],a=.5*r*Math.cos(s),l=.5*r*Math.sin(s);for(const[c,u]of i)Pu([c,u])&&o.push([[c[0]-a,c[1]+l],[...u]],[[c[0]+a,c[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(o,n)}}}class i2 extends lm{fillPolygons(t,n){const r=this._fillPolygons(t,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),s=this._fillPolygons(t,i);return r.ops=r.ops.concat(s.ops),r}}class s2{constructor(t){this.helper=t}fillPolygons(t,n){const r=za(t,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(t,n){const r=[];let i=n.hachureGap;i<0&&(i=4*n.strokeWidth),i=Math.max(i,.1);let s=n.fillWeight;s<0&&(s=n.strokeWidth/2);const o=i/4;for(const a of t){const l=Pu(a),c=l/i,u=Math.ceil(c)-1,d=l-u*i,h=(a[0][0]+a[1][0])/2-i/4,p=Math.min(a[0][1],a[1][1]);for(let m=0;m<u;m++){const y=p+d+m*i,w=h-o+2*Math.random()*o,g=y-o+2*Math.random()*o,x=this.helper.ellipse(w,g,s,s,n);r.push(...x.ops)}}return{type:"fillSketch",ops:r}}}class o2{constructor(t){this.helper=t}fillPolygons(t,n){const r=za(t,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(t,n){const r=n.dashOffset<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashGap,s=[];return t.forEach(o=>{const a=Pu(o),l=Math.floor(a/(r+i)),c=(a+i-l*(r+i))/2;let u=o[0],d=o[1];u[0]>d[0]&&(u=o[1],d=o[0]);const h=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let p=0;p<l;p++){const m=p*(r+i),y=m+r,w=[u[0]+m*Math.cos(h)+c*Math.cos(h),u[1]+m*Math.sin(h)+c*Math.sin(h)],g=[u[0]+y*Math.cos(h)+c*Math.cos(h),u[1]+y*Math.sin(h)+c*Math.sin(h)];s.push(...this.helper.doubleLineOps(w[0],w[1],g[0],g[1],n))}}),s}}class a2{constructor(t){this.helper=t}fillPolygons(t,n){const r=n.hachureGap<0?4*n.strokeWidth:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset,s=za(t,n=Object.assign({},n,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(s,i,n)}}zigzagLines(t,n,r){const i=[];return t.forEach(s=>{const o=Pu(s),a=Math.round(o/(2*n));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<a;d++){const h=2*d*n,p=2*(d+1)*n,m=Math.sqrt(2*Math.pow(n,2)),y=[l[0]+h*Math.cos(u),l[1]+h*Math.sin(u)],w=[l[0]+p*Math.cos(u),l[1]+p*Math.sin(u)],g=[y[0]+m*Math.cos(u+Math.PI/4),y[1]+m*Math.sin(u+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],g[0],g[1],r),...this.helper.doubleLineOps(g[0],g[1],w[0],w[1],r))}}),i}}const St={};class l2{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const c2=0,jd=1,Xy=2,fl={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Ed(e,t){return e.type===t}function cm(e){const t=[],n=function(o){const a=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:c2,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:jd,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return a[a.length]={type:Xy,text:""},a}(e);let r="BOD",i=0,s=n[i];for(;!Ed(s,Xy);){let o=0;const a=[];if(r==="BOD"){if(s.text!=="M"&&s.text!=="m")return cm("M0,0"+e);i++,o=fl[s.text],r=s.text}else Ed(s,jd)?o=fl[r]:(i++,o=fl[s.text],r=s.text);if(!(i+o<n.length))throw new Error("Path data ended short");for(let l=i;l<i+o;l++){const c=n[l];if(!Ed(c,jd))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof fl[r]!="number")throw new Error("Bad segment: "+r);{const l={key:r,data:a};t.push(l),i+=o,s=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}}return t}function $b(e){let t=0,n=0,r=0,i=0;const s=[];for(const{key:o,data:a}of e)switch(o){case"M":s.push({key:"M",data:[...a]}),[t,n]=a,[r,i]=a;break;case"m":t+=a[0],n+=a[1],s.push({key:"M",data:[t,n]}),r=t,i=n;break;case"L":s.push({key:"L",data:[...a]}),[t,n]=a;break;case"l":t+=a[0],n+=a[1],s.push({key:"L",data:[t,n]});break;case"C":s.push({key:"C",data:[...a]}),t=a[4],n=a[5];break;case"c":{const l=a.map((c,u)=>u%2?c+n:c+t);s.push({key:"C",data:l}),t=l[4],n=l[5];break}case"Q":s.push({key:"Q",data:[...a]}),t=a[2],n=a[3];break;case"q":{const l=a.map((c,u)=>u%2?c+n:c+t);s.push({key:"Q",data:l}),t=l[2],n=l[3];break}case"A":s.push({key:"A",data:[...a]}),t=a[5],n=a[6];break;case"a":t+=a[5],n+=a[6],s.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],t,n]});break;case"H":s.push({key:"H",data:[...a]}),t=a[0];break;case"h":t+=a[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...a]}),n=a[0];break;case"v":n+=a[0],s.push({key:"V",data:[n]});break;case"S":s.push({key:"S",data:[...a]}),t=a[2],n=a[3];break;case"s":{const l=a.map((c,u)=>u%2?c+n:c+t);s.push({key:"S",data:l}),t=l[2],n=l[3];break}case"T":s.push({key:"T",data:[...a]}),t=a[0],n=a[1];break;case"t":t+=a[0],n+=a[1],s.push({key:"T",data:[t,n]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=r,n=i}return s}function Vb(e){const t=[];let n="",r=0,i=0,s=0,o=0,a=0,l=0;for(const{key:c,data:u}of e){switch(c){case"M":t.push({key:"M",data:[...u]}),[r,i]=u,[s,o]=u;break;case"C":t.push({key:"C",data:[...u]}),r=u[4],i=u[5],a=u[2],l=u[3];break;case"L":t.push({key:"L",data:[...u]}),[r,i]=u;break;case"H":r=u[0],t.push({key:"L",data:[r,i]});break;case"V":i=u[0],t.push({key:"L",data:[r,i]});break;case"S":{let d=0,h=0;n==="C"||n==="S"?(d=r+(r-a),h=i+(i-l)):(d=r,h=i),t.push({key:"C",data:[d,h,...u]}),a=u[0],l=u[1],r=u[2],i=u[3];break}case"T":{const[d,h]=u;let p=0,m=0;n==="Q"||n==="T"?(p=r+(r-a),m=i+(i-l)):(p=r,m=i);const y=r+2*(p-r)/3,w=i+2*(m-i)/3,g=d+2*(p-d)/3,x=h+2*(m-h)/3;t.push({key:"C",data:[y,w,g,x,d,h]}),a=p,l=m,r=d,i=h;break}case"Q":{const[d,h,p,m]=u,y=r+2*(d-r)/3,w=i+2*(h-i)/3,g=p+2*(d-p)/3,x=m+2*(h-m)/3;t.push({key:"C",data:[y,w,g,x,p,m]}),a=d,l=h,r=p,i=m;break}case"A":{const d=Math.abs(u[0]),h=Math.abs(u[1]),p=u[2],m=u[3],y=u[4],w=u[5],g=u[6];d===0||h===0?(t.push({key:"C",data:[r,i,w,g,w,g]}),r=w,i=g):(r!==w||i!==g)&&(Wb(r,i,w,g,d,h,p,m,y).forEach(function(x){t.push({key:"C",data:x})}),r=w,i=g);break}case"Z":t.push({key:"Z",data:[]}),r=s,i=o}n=c}return t}function Eo(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Wb(e,t,n,r,i,s,o,a,l,c){const u=(d=o,Math.PI*d/180);var d;let h=[],p=0,m=0,y=0,w=0;if(c)[p,m,y,w]=c;else{[e,t]=Eo(e,t,-u),[n,r]=Eo(n,r,-u);const F=(e-n)/2,B=(t-r)/2;let z=F*F/(i*i)+B*B/(s*s);z>1&&(z=Math.sqrt(z),i*=z,s*=z);const G=i*i,A=s*s,D=G*A-G*B*B-A*F*F,O=G*B*B+A*F*F,k=(a===l?-1:1)*Math.sqrt(Math.abs(D/O));y=k*i*B/s+(e+n)/2,w=k*-s*F/i+(t+r)/2,p=Math.asin(parseFloat(((t-w)/s).toFixed(9))),m=Math.asin(parseFloat(((r-w)/s).toFixed(9))),e<y&&(p=Math.PI-p),n<y&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),l&&p>m&&(p-=2*Math.PI),!l&&m>p&&(m-=2*Math.PI)}let g=m-p;if(Math.abs(g)>120*Math.PI/180){const F=m,B=n,z=r;m=l&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,h=Wb(n=y+i*Math.cos(m),r=w+s*Math.sin(m),B,z,i,s,o,0,l,[m,F,y,w])}g=m-p;const x=Math.cos(p),v=Math.sin(p),b=Math.cos(m),S=Math.sin(m),C=Math.tan(g/4),E=4/3*i*C,j=4/3*s*C,L=[e,t],P=[e+E*v,t-j*x],R=[n+E*S,r-j*b],I=[n,r];if(P[0]=2*L[0]-P[0],P[1]=2*L[1]-P[1],c)return[P,R,I].concat(h);{h=[P,R,I].concat(h);const F=[];for(let B=0;B<h.length;B+=3){const z=Eo(h[B][0],h[B][1],u),G=Eo(h[B+1][0],h[B+1][1],u),A=Eo(h[B+2][0],h[B+2][1],u);F.push([z[0],z[1],G[0],G[1],A[0],A[1]])}return F}}const u2={randOffset:function(e,t){return J(e,t)},randOffsetWithRange:function(e,t,n){return Oc(e,t,n)},ellipse:function(e,t,n,r,i){const s=Hb(n,r,i);return gh(e,t,i,s).opset},doubleLineOps:function(e,t,n,r,i){return ni(e,t,n,r,i,!0)}};function Ub(e,t,n,r,i){return{type:"path",ops:ni(e,t,n,r,i)}}function ql(e,t,n){const r=(e||[]).length;if(r>2){const i=[];for(let s=0;s<r-1;s++)i.push(...ni(e[s][0],e[s][1],e[s+1][0],e[s+1][1],n));return t&&i.push(...ni(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:i}}return r===2?Ub(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function d2(e,t,n,r,i){return function(s,o){return ql(s,!0,o)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function Zy(e,t){if(e.length){const n=typeof e[0][0]=="number"?[e]:e,r=hl(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:hl(n[0],1.5*(1+.22*t.roughness),tx(t));for(let s=1;s<n.length;s++){const o=n[s];if(o.length){const a=hl(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:hl(o,1.5*(1+.22*t.roughness),tx(t));for(const c of a)c.op!=="move"&&r.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function Hb(e,t,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),s=2*Math.PI/i;let o=Math.abs(e/2),a=Math.abs(t/2);const l=1-n.curveFitting;return o+=J(o*l,n),a+=J(a*l,n),{increment:s,rx:o,ry:a}}function gh(e,t,n,r){const[i,s]=nx(r.increment,e,t,r.rx,r.ry,1,r.increment*Oc(.1,Oc(.4,1,n),n),n);let o=$c(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=nx(r.increment,e,t,r.rx,r.ry,1.5,0,n),l=$c(a,null,n);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function Jy(e,t,n,r,i,s,o,a,l){const c=e,u=t;let d=Math.abs(n/2),h=Math.abs(r/2);d+=J(.01*d,l),h+=J(.01*h,l);let p=i,m=s;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,w=Math.min(y/2,(m-p)/2),g=rx(w,c,u,d,h,p,m,1,l);if(!l.disableMultiStroke){const x=rx(w,c,u,d,h,p,m,1.5,l);g.push(...x)}return o&&(a?g.push(...ni(c,u,c+d*Math.cos(p),u+h*Math.sin(p),l),...ni(c,u,c+d*Math.cos(m),u+h*Math.sin(m),l)):g.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+d*Math.cos(p),u+h*Math.sin(p)]})),{type:"path",ops:g}}function ex(e,t){const n=Vb($b(cm(e))),r=[];let i=[0,0],s=[0,0];for(const{key:o,data:a}of n)switch(o){case"M":s=[a[0],a[1]],i=[a[0],a[1]];break;case"L":r.push(...ni(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]];break;case"C":{const[l,c,u,d,h,p]=a;r.push(...f2(l,c,u,d,h,p,s,t)),s=[h,p];break}case"Z":r.push(...ni(s[0],s[1],i[0],i[1],t)),s=[i[0],i[1]]}return{type:"path",ops:r}}function Td(e,t){const n=[];for(const r of e)if(r.length){const i=t.maxRandomnessOffset||0,s=r.length;if(s>2){n.push({op:"move",data:[r[0][0]+J(i,t),r[0][1]+J(i,t)]});for(let o=1;o<s;o++)n.push({op:"lineTo",data:[r[o][0]+J(i,t),r[o][1]+J(i,t)]})}}return{type:"fillPath",ops:n}}function Ji(e,t){return function(n,r){let i=n.fillStyle||"hachure";if(!St[i])switch(i){case"zigzag":St[i]||(St[i]=new r2(r));break;case"cross-hatch":St[i]||(St[i]=new i2(r));break;case"dots":St[i]||(St[i]=new s2(r));break;case"dashed":St[i]||(St[i]=new o2(r));break;case"zigzag-line":St[i]||(St[i]=new a2(r));break;default:i="hachure",St[i]||(St[i]=new lm(r))}return St[i]}(t,u2).fillPolygons(e,t)}function tx(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Gb(e){return e.randomizer||(e.randomizer=new l2(e.seed||0)),e.randomizer.next()}function Oc(e,t,n,r=1){return n.roughness*r*(Gb(n)*(t-e)+e)}function J(e,t,n=1){return Oc(-e,e,t,n)}function ni(e,t,n,r,i,s=!1){const o=s?i.disableMultiStrokeFill:i.disableMultiStroke,a=yh(e,t,n,r,i,!0,!1);if(o)return a;const l=yh(e,t,n,r,i,!0,!0);return a.concat(l)}function yh(e,t,n,r,i,s,o){const a=Math.pow(e-n,2)+Math.pow(t-r,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>a&&(u=l/10);const d=u/2,h=.2+.2*Gb(i);let p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=J(p,i,c),m=J(m,i,c);const y=[],w=()=>J(d,i,c),g=()=>J(u,i,c),x=i.preserveVertices;return o?y.push({op:"move",data:[e+(x?0:w()),t+(x?0:w())]}):y.push({op:"move",data:[e+(x?0:J(u,i,c)),t+(x?0:J(u,i,c))]}),o?y.push({op:"bcurveTo",data:[p+e+(n-e)*h+w(),m+t+(r-t)*h+w(),p+e+2*(n-e)*h+w(),m+t+2*(r-t)*h+w(),n+(x?0:w()),r+(x?0:w())]}):y.push({op:"bcurveTo",data:[p+e+(n-e)*h+g(),m+t+(r-t)*h+g(),p+e+2*(n-e)*h+g(),m+t+2*(r-t)*h+g(),n+(x?0:g()),r+(x?0:g())]}),y}function hl(e,t,n){if(!e.length)return[];const r=[];r.push([e[0][0]+J(t,n),e[0][1]+J(t,n)]),r.push([e[0][0]+J(t,n),e[0][1]+J(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+J(t,n),e[i][1]+J(t,n)]),i===e.length-1&&r.push([e[i][0]+J(t,n),e[i][1]+J(t,n)]);return $c(r,null,n)}function $c(e,t,n){const r=e.length,i=[];if(r>3){const s=[],o=1-n.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let a=1;a+2<r;a++){const l=e[a];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[a+1][0]-o*e[a-1][0])/6,l[1]+(o*e[a+1][1]-o*e[a-1][1])/6],s[2]=[e[a+1][0]+(o*e[a][0]-o*e[a+2][0])/6,e[a+1][1]+(o*e[a][1]-o*e[a+2][1])/6],s[3]=[e[a+1][0],e[a+1][1]],i.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else r===3?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...yh(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function nx(e,t,n,r,i,s,o,a){const l=[],c=[];if(a.roughness===0){e/=4,c.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let u=0;u<=2*Math.PI;u+=e){const d=[t+r*Math.cos(u),n+i*Math.sin(u)];l.push(d),c.push(d)}c.push([t+r*Math.cos(0),n+i*Math.sin(0)]),c.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{const u=J(.5,a)-Math.PI/2;c.push([J(s,a)+t+.9*r*Math.cos(u-e),J(s,a)+n+.9*i*Math.sin(u-e)]);const d=2*Math.PI+u-.01;for(let h=u;h<d;h+=e){const p=[J(s,a)+t+r*Math.cos(h),J(s,a)+n+i*Math.sin(h)];l.push(p),c.push(p)}c.push([J(s,a)+t+r*Math.cos(u+2*Math.PI+.5*o),J(s,a)+n+i*Math.sin(u+2*Math.PI+.5*o)]),c.push([J(s,a)+t+.98*r*Math.cos(u+o),J(s,a)+n+.98*i*Math.sin(u+o)]),c.push([J(s,a)+t+.9*r*Math.cos(u+.5*o),J(s,a)+n+.9*i*Math.sin(u+.5*o)])}return[c,l]}function rx(e,t,n,r,i,s,o,a,l){const c=s+J(.1,l),u=[];u.push([J(a,l)+t+.9*r*Math.cos(c-e),J(a,l)+n+.9*i*Math.sin(c-e)]);for(let d=c;d<=o;d+=e)u.push([J(a,l)+t+r*Math.cos(d),J(a,l)+n+i*Math.sin(d)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),$c(u,null,l)}function f2(e,t,n,r,i,s,o,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let u=[0,0];const d=a.disableMultiStroke?1:2,h=a.preserveVertices;for(let p=0;p<d;p++)p===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(h?0:J(c[0],a)),o[1]+(h?0:J(c[0],a))]}),u=h?[i,s]:[i+J(c[p],a),s+J(c[p],a)],l.push({op:"bcurveTo",data:[e+J(c[p],a),t+J(c[p],a),n+J(c[p],a),r+J(c[p],a),u[0],u[1]]});return l}function To(e){return[...e]}function ix(e,t=0){const n=e.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(n===3)r.push(To(e[0]),To(e[1]),To(e[2]),To(e[2]));else{const i=[];i.push(e[0],e[0]);for(let a=1;a<e.length;a++)i.push(e[a]),a===e.length-1&&i.push(e[a]);const s=[],o=1-t;r.push(To(i[0]));for(let a=1;a+2<i.length;a++){const l=i[a];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*i[a+1][0]-o*i[a-1][0])/6,l[1]+(o*i[a+1][1]-o*i[a-1][1])/6],s[2]=[i[a+1][0]+(o*i[a][0]-o*i[a+2][0])/6,i[a+1][1]+(o*i[a][1]-o*i[a+2][1])/6],s[3]=[i[a+1][0],i[a+1][1]],r.push(s[1],s[2],s[3])}}return r}function Xl(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function h2(e,t,n){const r=Xl(t,n);if(r===0)return Xl(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),Xl(e,bi(t,n,i))}function bi(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function xh(e,t,n,r){const i=r||[];if(function(a,l){const c=a[l+0],u=a[l+1],d=a[l+2],h=a[l+3];let p=3*u[0]-2*c[0]-h[0];p*=p;let m=3*u[1]-2*c[1]-h[1];m*=m;let y=3*d[0]-2*h[0]-c[0];y*=y;let w=3*d[1]-2*h[1]-c[1];return w*=w,p<y&&(p=y),m<w&&(m=w),p+m}(e,t)<n){const a=e[t+0];i.length?(s=i[i.length-1],o=a,Math.sqrt(Xl(s,o))>1&&i.push(a)):i.push(a),i.push(e[t+3])}else{const l=e[t+0],c=e[t+1],u=e[t+2],d=e[t+3],h=bi(l,c,.5),p=bi(c,u,.5),m=bi(u,d,.5),y=bi(h,p,.5),w=bi(p,m,.5),g=bi(y,w,.5);xh([l,h,y,g],0,n,i),xh([g,w,m,d],0,n,i)}var s,o;return i}function p2(e,t){return Vc(e,0,e.length,t)}function Vc(e,t,n,r,i){const s=i||[],o=e[t],a=e[n-1];let l=0,c=1;for(let u=t+1;u<n-1;++u){const d=h2(e[u],o,a);d>l&&(l=d,c=u)}return Math.sqrt(l)>r?(Vc(e,t,c+1,r,s),Vc(e,c,n,r,s)):(s.length||s.push(o),s.push(a)),s}function Rd(e,t=.15,n){const r=[],i=(e.length-1)/3;for(let s=0;s<i;s++)xh(e,3*s,t,r);return n&&n>0?Vc(r,0,r.length,n):r}const zt="none";let Wc=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,n,r){return{shape:t,sets:n||[],options:r||this.defaultOptions}}line(t,n,r,i,s){const o=this._o(s);return this._d("line",[Ub(t,n,r,i,o)],o)}rectangle(t,n,r,i,s){const o=this._o(s),a=[],l=d2(t,n,r,i,o);if(o.fill){const c=[[t,n],[t+r,n],[t+r,n+i],[t,n+i]];o.fillStyle==="solid"?a.push(Td([c],o)):a.push(Ji([c],o))}return o.stroke!==zt&&a.push(l),this._d("rectangle",a,o)}ellipse(t,n,r,i,s){const o=this._o(s),a=[],l=Hb(r,i,o),c=gh(t,n,o,l);if(o.fill)if(o.fillStyle==="solid"){const u=gh(t,n,o,l).opset;u.type="fillPath",a.push(u)}else a.push(Ji([c.estimatedPoints],o));return o.stroke!==zt&&a.push(c.opset),this._d("ellipse",a,o)}circle(t,n,r,i){const s=this.ellipse(t,n,r,r,i);return s.shape="circle",s}linearPath(t,n){const r=this._o(n);return this._d("linearPath",[ql(t,!1,r)],r)}arc(t,n,r,i,s,o,a=!1,l){const c=this._o(l),u=[],d=Jy(t,n,r,i,s,o,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const h=Object.assign({},c);h.disableMultiStroke=!0;const p=Jy(t,n,r,i,s,o,!0,!1,h);p.type="fillPath",u.push(p)}else u.push(function(h,p,m,y,w,g,x){const v=h,b=p;let S=Math.abs(m/2),C=Math.abs(y/2);S+=J(.01*S,x),C+=J(.01*C,x);let E=w,j=g;for(;E<0;)E+=2*Math.PI,j+=2*Math.PI;j-E>2*Math.PI&&(E=0,j=2*Math.PI);const L=(j-E)/x.curveStepCount,P=[];for(let R=E;R<=j;R+=L)P.push([v+S*Math.cos(R),b+C*Math.sin(R)]);return P.push([v+S*Math.cos(j),b+C*Math.sin(j)]),P.push([v,b]),Ji([P],x)}(t,n,r,i,s,o,c));return c.stroke!==zt&&u.push(d),this._d("arc",u,c)}curve(t,n){const r=this._o(n),i=[],s=Zy(t,r);if(r.fill&&r.fill!==zt)if(r.fillStyle==="solid"){const o=Zy(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],a=t;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Rd(ix([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):o.push(...Rd(ix(c),10,(1+r.roughness)/2))}o.length&&i.push(Ji([o],r))}return r.stroke!==zt&&i.push(s),this._d("curve",i,r)}polygon(t,n){const r=this._o(n),i=[],s=ql(t,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Td([t],r)):i.push(Ji([t],r))),r.stroke!==zt&&i.push(s),this._d("polygon",i,r)}path(t,n){const r=this._o(n),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=r.fill&&r.fill!=="transparent"&&r.fill!==zt,o=r.stroke!==zt,a=!!(r.simplification&&r.simplification<1),l=function(u,d,h){const p=Vb($b(cm(u))),m=[];let y=[],w=[0,0],g=[];const x=()=>{g.length>=4&&y.push(...Rd(g,d)),g=[]},v=()=>{x(),y.length&&(m.push(y),y=[])};for(const{key:S,data:C}of p)switch(S){case"M":v(),w=[C[0],C[1]],y.push(w);break;case"L":x(),y.push([C[0],C[1]]);break;case"C":if(!g.length){const E=y.length?y[y.length-1]:w;g.push([E[0],E[1]])}g.push([C[0],C[1]]),g.push([C[2],C[3]]),g.push([C[4],C[5]]);break;case"Z":x(),y.push([w[0],w[1]])}if(v(),!h)return m;const b=[];for(const S of m){const C=p2(S,h);C.length&&b.push(C)}return b}(t,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),c=ex(t,r);if(s)if(r.fillStyle==="solid")if(l.length===1){const u=ex(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else i.push(Td(l,r));else i.push(Ji(l,r));return o&&(a?l.forEach(u=>{i.push(ql(u,!1,r))}):i.push(c)),this._d("path",i,r)}opsToPath(t,n){let r="";for(const i of t.ops){const s=typeof n=="number"&&n>=0?i.data.map(o=>+o.toFixed(n)):i.data;switch(i.op){case"move":r+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":r+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":r+=`L${s[0]} ${s[1]} `}}return r.trim()}toPaths(t){const n=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const s of n){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:zt};break;case"fillPath":o={d:this.opsToPath(s),stroke:zt,strokeWidth:0,fill:r.fill||zt};break;case"fillSketch":o=this.fillSketch(s,r)}o&&i.push(o)}return i}fillSketch(t,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(t),stroke:n.fill||zt,strokeWidth:r,fill:zt}}_mergedShape(t){return t.filter((n,r)=>r===0||n.op!=="move")}};class m2{constructor(t,n){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Wc(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of n)switch(o.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,o,s),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const a=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,o,s,a),i.restore();break}case"fillSketch":this.fillSketch(i,o,r)}}fillSketch(t,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,n,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,n,r,i="nonzero"){t.beginPath();for(const s of n.ops){const o=typeof r=="number"&&r>=0?s.data.map(a=>+a.toFixed(r)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}n.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,n,r,i,s){const o=this.gen.line(t,n,r,i,s);return this.draw(o),o}rectangle(t,n,r,i,s){const o=this.gen.rectangle(t,n,r,i,s);return this.draw(o),o}ellipse(t,n,r,i,s){const o=this.gen.ellipse(t,n,r,i,s);return this.draw(o),o}circle(t,n,r,i){const s=this.gen.circle(t,n,r,i);return this.draw(s),s}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r),r}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r),r}arc(t,n,r,i,s,o,a=!1,l){const c=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(c),c}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r),r}path(t,n){const r=this.gen.path(t,n);return this.draw(r),r}}const pl="http://www.w3.org/2000/svg";class g2{constructor(t,n){this.svg=t,this.gen=new Wc(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,s=i.createElementNS(pl,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(pl,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(pl,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,a,r)}l&&s.appendChild(l)}return s}fillSketch(t,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const s=t.createElementNS(pl,"path");return s.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),s.setAttribute("stroke",r.fill||""),s.setAttribute("stroke-width",i+""),s.setAttribute("fill","none"),r.fillLineDash&&s.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,n){return this.gen.opsToPath(t,n)}line(t,n,r,i,s){const o=this.gen.line(t,n,r,i,s);return this.draw(o)}rectangle(t,n,r,i,s){const o=this.gen.rectangle(t,n,r,i,s);return this.draw(o)}ellipse(t,n,r,i,s){const o=this.gen.ellipse(t,n,r,i,s);return this.draw(o)}circle(t,n,r,i){const s=this.gen.circle(t,n,r,i);return this.draw(s)}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r)}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r)}arc(t,n,r,i,s,o,a=!1,l){const c=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(c)}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r)}path(t,n){const r=this.gen.path(t,n);return this.draw(r)}}var y2={canvas:(e,t)=>new m2(e,t),svg:(e,t)=>new g2(e,t),generator:e=>new Wc(e),newSeed:()=>Wc.newSeed()};const um=_.createContext({});function dm(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const x2=typeof window<"u",Kb=x2?_.useLayoutEffect:_.useEffect,ju=_.createContext(null);function fm(e,t){e.indexOf(t)===-1&&e.push(t)}function Uc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Kn=(e,t,n)=>n>t?t:n<e?e:n;let hm=()=>{};const ri={},Qb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Yb=e=>typeof e=="object"&&e!==null,qb=e=>/^0[^.\s]+$/u.test(e);function Xb(e){let t;return()=>(t===void 0&&(t=e()),t)}const fn=e=>e,Fa=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Ca=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class pm{constructor(){this.subscriptions=[]}add(t){return fm(this.subscriptions,t),()=>Uc(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 Ht=e=>e*1e3,un=e=>e/1e3,Zb=(e,t)=>t?e*(1e3/t):0,Jb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,v2=1e-7,w2=12;function b2(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Jb(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>v2&&++a<w2);return o}function Ba(e,t,n,r){if(e===t&&n===r)return fn;const i=s=>b2(s,0,1,e,n);return s=>s===0||s===1?s:Jb(i(s),t,r)}const ek=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tk=e=>t=>1-e(1-t),nk=Ba(.33,1.53,.69,.99),mm=tk(nk),rk=ek(mm),ik=e=>e>=1?1:(e*=2)<1?.5*mm(e):.5*(2-Math.pow(2,-10*(e-1))),gm=e=>1-Math.sin(Math.acos(e)),sk=tk(gm),ok=ek(gm),k2=Ba(.42,0,1,1),_2=Ba(0,0,.58,1),ak=Ba(.42,0,.58,1),S2=e=>Array.isArray(e)&&typeof e[0]!="number",lk=e=>Array.isArray(e)&&typeof e[0]=="number",C2={linear:fn,easeIn:k2,easeInOut:ak,easeOut:_2,circIn:gm,circInOut:ok,circOut:sk,backIn:mm,backInOut:rk,backOut:nk,anticipate:ik},P2=e=>typeof e=="string",sx=e=>{if(lk(e)){hm(e.length===4);const[t,n,r,i]=e;return Ba(t,n,r,i)}else if(P2(e))return C2[e];return e},ml=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function j2(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(u){o.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,h=!1)=>{const m=h&&i?n:r;return d&&o.add(u),m.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),i=!1,s&&(s=!1,c.process(u))}};return c}const E2=40;function ck(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=ml.reduce((v,b)=>(v[b]=j2(s),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:p,postRender:m}=o,y=()=>{const v=ri.useManualTiming,b=v?i.timestamp:performance.now();n=!1,v||(i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,E2),1)),i.timestamp=b,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},w=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:ml.reduce((v,b)=>{const S=o[b];return v[b]=(C,E=!1,j=!1)=>(n||w(),S.schedule(C,E,j)),v},{}),cancel:v=>{for(let b=0;b<ml.length;b++)o[ml[b]].cancel(v)},state:i,steps:o}}const{schedule:ke,cancel:ii,state:nt,steps:Ld}=ck(typeof requestAnimationFrame<"u"?requestAnimationFrame:fn,!0);let Zl;function T2(){Zl=void 0}const xt={now:()=>(Zl===void 0&&xt.set(nt.isProcessing||ri.useManualTiming?nt.timestamp:performance.now()),Zl),set:e=>{Zl=e,queueMicrotask(T2)}},uk=e=>t=>typeof t=="string"&&t.startsWith(e),dk=uk("--"),R2=uk("var(--"),ym=e=>R2(e)?L2.test(e.split("/*")[0].trim()):!1,L2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ox(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const no={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pa={...no,transform:e=>Kn(0,1,e)},gl={...no,default:1},Xo=e=>Math.round(e*1e5)/1e5,xm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function M2(e){return e==null}const I2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vm=(e,t)=>n=>!!(typeof n=="string"&&I2.test(n)&&n.startsWith(e)||t&&!M2(n)&&Object.prototype.hasOwnProperty.call(n,t)),fk=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(xm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},A2=e=>Kn(0,255,e),Md={...no,transform:e=>Math.round(A2(e))},Ti={test:vm("rgb","red"),parse:fk("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Md.transform(e)+", "+Md.transform(t)+", "+Md.transform(n)+", "+Xo(Pa.transform(r))+")"};function D2(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 vh={test:vm("#"),parse:D2,transform:Ti.transform},Oa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),tr=Oa("deg"),Gn=Oa("%"),Y=Oa("px"),N2=Oa("vh"),z2=Oa("vw"),ax={...Gn,parse:e=>Gn.parse(e)/100,transform:e=>Gn.transform(e*100)},bs={test:vm("hsl","hue"),parse:fk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Gn.transform(Xo(t))+", "+Gn.transform(Xo(n))+", "+Xo(Pa.transform(r))+")"},Ue={test:e=>Ti.test(e)||vh.test(e)||bs.test(e),parse:e=>Ti.test(e)?Ti.parse(e):bs.test(e)?bs.parse(e):vh.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ti.transform(e):bs.transform(e),getAnimatableNone:e=>{const t=Ue.parse(e);return t.alpha=0,Ue.transform(t)}},F2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function B2(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xm))==null?void 0:t.length)||0)+(((n=e.match(F2))==null?void 0:n.length)||0)>0}const hk="number",pk="color",O2="var",$2="var(",lx="${}",V2=/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 Ks(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(V2,l=>(Ue.test(l)?(r.color.push(s),i.push(pk),n.push(Ue.parse(l))):l.startsWith($2)?(r.var.push(s),i.push(O2),n.push(l)):(r.number.push(s),i.push(hk),n.push(parseFloat(l))),++s,lx)).split(lx);return{values:n,split:a,indexes:r,types:i}}function W2(e){return Ks(e).values}function mk({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===hk?i+=Xo(r[s]):o===pk?i+=Ue.transform(r[s]):i+=r[s]}return i}}function U2(e){return mk(Ks(e))}const H2=e=>typeof e=="number"?0:Ue.test(e)?Ue.getAnimatableNone(e):e,G2=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:H2(e);function K2(e){const t=Ks(e);return mk(t)(t.values.map((r,i)=>G2(r,t.split[i])))}const En={test:B2,parse:W2,createTransformer:U2,getAnimatableNone:K2};function Id(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 Q2({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=Id(l,a,e+1/3),s=Id(l,a,e),o=Id(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 be=(e,t,n)=>e+(t-e)*n,Ad=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Y2=[vh,Ti,bs],q2=e=>Y2.find(t=>t.test(e));function cx(e){const t=q2(e);if(!t)return!1;let n=t.parse(e);return t===bs&&(n=Q2(n)),n}const ux=(e,t)=>{const n=cx(e),r=cx(t);if(!n||!r)return Hc(e,t);const i={...n};return s=>(i.red=Ad(n.red,r.red,s),i.green=Ad(n.green,r.green,s),i.blue=Ad(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),Ti.transform(i))},wh=new Set(["none","hidden"]);function X2(e,t){return wh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Z2(e,t){return n=>be(e,t,n)}function wm(e){return typeof e=="number"?Z2:typeof e=="string"?ym(e)?Hc:Ue.test(e)?ux:tR:Array.isArray(e)?gk:typeof e=="object"?Ue.test(e)?ux:J2:Hc}function gk(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>wm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function J2(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=wm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function eR(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 tR=(e,t)=>{const n=En.createTransformer(t),r=Ks(e),i=Ks(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?wh.has(e)&&!i.values.length||wh.has(t)&&!r.values.length?X2(e,t):Fa(gk(eR(r,i),i.values),n):Hc(e,t)};function yk(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):wm(e)(e,t)}const nR=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>ii(t),now:()=>nt.isProcessing?nt.timestamp:xt.now()}},xk=(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)})`},Gc=2e4;function bm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Gc;)t+=n,r=e.next(t);return t>=Gc?1/0:t}function rR(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(bm(r),Gc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:un(i)}}const ze={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 bh(e,t){return e*Math.sqrt(1-t*t)}const iR=12;function sR(e,t,n){let r=n;for(let i=1;i<iR;i++)r=r-e(r)/t(r);return r}const Dd=.001;function oR({duration:e=ze.duration,bounce:t=ze.bounce,velocity:n=ze.velocity,mass:r=ze.mass}){let i,s,o=1-t;o=Kn(ze.minDamping,ze.maxDamping,o),e=Kn(ze.minDuration,ze.maxDuration,un(e)),o<1?(i=c=>{const u=c*o,d=u*e,h=u-n,p=bh(c,o),m=Math.exp(-d);return Dd-h/p*m},s=c=>{const d=c*o*e,h=d*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-d),y=bh(Math.pow(c,2),o);return(-i(c)+Dd>0?-1:1)*((h-p)*m)/y}):(i=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Dd+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=sR(i,s,a);if(e=Ht(e),isNaN(l))return{stiffness:ze.stiffness,damping:ze.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const aR=["duration","bounce"],lR=["stiffness","damping","mass"];function dx(e,t){return t.some(n=>e[n]!==void 0)}function cR(e){let t={velocity:ze.velocity,stiffness:ze.stiffness,damping:ze.damping,mass:ze.mass,isResolvedFromDuration:!1,...e};if(!dx(e,lR)&&dx(e,aR))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ze.mass,stiffness:i,damping:s}}else{const n=oR({...e,velocity:0});t={...t,...n,mass:ze.mass},t.isResolvedFromDuration=!0}return t}function Kc(e=ze.visualDuration,t=ze.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:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:p}=cR({...n,velocity:-un(n.velocity||0)}),m=h||0,y=c/(2*Math.sqrt(l*u)),w=o-s,g=un(Math.sqrt(l/u)),x=Math.abs(w)<5;r||(r=x?ze.restSpeed.granular:ze.restSpeed.default),i||(i=x?ze.restDelta.granular:ze.restDelta.default);let v,b,S,C,E,j;if(y<1)S=bh(g,y),C=(m+y*g*w)/S,v=P=>{const R=Math.exp(-y*g*P);return o-R*(C*Math.sin(S*P)+w*Math.cos(S*P))},E=y*g*C+w*S,j=y*g*w-C*S,b=P=>Math.exp(-y*g*P)*(E*Math.sin(S*P)+j*Math.cos(S*P));else if(y===1){v=R=>o-Math.exp(-g*R)*(w+(m+g*w)*R);const P=m+g*w;b=R=>Math.exp(-g*R)*(g*P*R-m)}else{const P=g*Math.sqrt(y*y-1);v=B=>{const z=Math.exp(-y*g*B),G=Math.min(P*B,300);return o-z*((m+y*g*w)*Math.sinh(G)+P*w*Math.cosh(G))/P};const R=(m+y*g*w)/P,I=y*g*R-w*P,F=y*g*w-R*P;b=B=>{const z=Math.exp(-y*g*B),G=Math.min(P*B,300);return z*(I*Math.sinh(G)+F*Math.cosh(G))}}const L={calculatedDuration:p&&d||null,velocity:P=>Ht(b(P)),next:P=>{if(!p&&y<1){const I=Math.exp(-y*g*P),F=Math.sin(S*P),B=Math.cos(S*P),z=o-I*(C*F+w*B),G=Ht(I*(E*F+j*B));return a.done=Math.abs(G)<=r&&Math.abs(o-z)<=i,a.value=a.done?o:z,a}const R=v(P);if(p)a.done=P>=d;else{const I=Ht(b(P));a.done=Math.abs(I)<=r&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const P=Math.min(bm(L),Gc),R=xk(I=>L.next(P*I).value,P,30);return P+"ms "+R},toTransition:()=>{}};return L}Kc.applyToOptions=e=>{const t=rR(e,100,Kc);return e.ease=t.ease,e.duration=Ht(t.duration),e.type="keyframes",e};const uR=5;function vk(e,t,n){const r=Math.max(t-uR,0);return Zb(n-e(r),t-r)}function kh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=j=>a!==void 0&&j<a||l!==void 0&&j>l,m=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let y=n*t;const w=d+y,g=o===void 0?w:o(w);g!==w&&(y=g-d);const x=j=>-y*Math.exp(-j/r),v=j=>g+x(j),b=j=>{const L=x(j),P=v(j);h.done=Math.abs(L)<=c,h.value=h.done?g:P};let S,C;const E=j=>{p(h.value)&&(S=j,C=Kc({keyframes:[h.value,m(h.value)],velocity:vk(v,j,h.value),damping:i,stiffness:s,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:j=>{let L=!1;return!C&&S===void 0&&(L=!0,b(j),E(j)),S!==void 0&&j>=S?C.next(j-S):(!L&&b(j),h)}}}function dR(e,t,n){const r=[],i=n||ri.mix||yk,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=Fa(l,a)}r.push(a)}return r}function fR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(hm(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=dR(t,r,i),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=Ca(e[d],e[d+1],u);return a[d](h)};return n?u=>c(Kn(e[0],e[s-1],u)):c}function hR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ca(0,t,r);e.push(be(n,1,i))}}function pR(e){const t=[0];return hR(t,e.length-1),t}function mR(e,t){return e.map(n=>n*t)}function gR(e,t){return e.map(()=>t||ak).splice(0,e.length-1)}function Zo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=S2(r)?r.map(sx):sx(r),s={done:!1,value:t[0]},o=mR(n&&n.length===t.length?n:pR(t),e),a=fR(o,t,{ease:Array.isArray(i)?i:gR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const yR=e=>e!==null;function Eu(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(yR),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const xR={decay:kh,inertia:kh,tween:Zo,keyframes:Zo,spring:Kc};function wk(e){typeof e.type=="string"&&(e.type=xR[e.type])}class km{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 vR=e=>e/100;class Qc extends km{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!==xt.now()&&this.tick(xt.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;wk(t);const{type:n=Zo,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Zo;l!==Zo&&typeof a[0]!="number"&&(this.mixKeyframes=Fa(vR,yk(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=bm(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=c}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:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:p,type:m,onUpdate:y,finalKeyframe:w}=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-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,b=r;if(d){const j=Math.min(this.currentTime,i)/a;let L=Math.floor(j),P=j%1;!P&&j>=1&&(P=1),P===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(h==="reverse"?(P=1-P,p&&(P-=p/a)):h==="mirror"&&(b=o)),v=Kn(0,1,P)*a}let S;x?(this.delayState.value=u[0],S=this.delayState):S=b.next(v),s&&!x&&(S.value=s(S.value));let{done:C}=S;!x&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&m!==kh&&(S.value=Eu(u,this.options,w,this.speed)),y&&y(S.value),E&&this.finish(),S}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=Ht(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 vk(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 i,s;if(this.isStopped)return;const{driver:t=nR,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(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 wR(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ri=e=>e*180/Math.PI,_h=e=>{const t=Ri(Math.atan2(e[1],e[0]));return Sh(t)},bR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_h,rotateZ:_h,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},Sh=e=>(e=e%360,e<0&&(e+=360),e),fx=_h,hx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),px=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),kR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hx,scaleY:px,scale:e=>(hx(e)+px(e))/2,rotateX:e=>Sh(Ri(Math.atan2(e[6],e[5]))),rotateY:e=>Sh(Ri(Math.atan2(-e[2],e[0]))),rotateZ:fx,rotate:fx,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 Ch(e){return e.includes("scale")?1:0}function Ph(e,t){if(!e||e==="none")return Ch(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=kR,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=bR,i=a}if(!i)return Ch(t);const s=r[t],o=i[1].split(",").map(SR);return typeof s=="function"?s(o):o[s]}const _R=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ph(n,t)};function SR(e){return parseFloat(e.trim())}const ro=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],io=new Set([...ro,"pathRotation"]),mx=e=>e===no||e===Y,CR=new Set(["x","y","z"]),PR=ro.filter(e=>!CR.has(e));function jR(e){const t=[];return PR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $r={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})=>Ph(t,"x"),y:(e,{transform:t})=>Ph(t,"y")};$r.translateX=$r.x;$r.translateY=$r.y;const zi=new Set;let jh=!1,Eh=!1,Th=!1;function bk(){if(Eh){const e=Array.from(zi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=jR(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)})}Eh=!1,jh=!1,zi.forEach(e=>e.complete(Th)),zi.clear()}function kk(){zi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Eh=!0)})}function ER(){Th=!0,kk(),bk(),Th=!1}class _m{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?(zi.add(this),jh||(jh=!0,ke.read(kk),ke.resolveKeyframes(bk))):(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])}wR(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),zi.delete(this)}cancel(){this.state==="scheduled"&&(zi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const TR=e=>e.startsWith("--");function _k(e,t,n){TR(t)?e.style.setProperty(t,n):e.style[t]=n}const RR={};function Sk(e,t){const n=Xb(e);return()=>RR[t]??n()}const LR=Sk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ck=Sk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Oo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Oo([0,.65,.55,1]),circOut:Oo([.55,0,1,.45]),backIn:Oo([.31,.01,.66,-.59]),backOut:Oo([.33,1.53,.69,.99])};function Pk(e,t){if(e)return typeof e=="function"?Ck()?xk(e,t):"ease-out":lk(e)?Oo(e):Array.isArray(e)?e.map(n=>Pk(n,t)||gx.easeOut):gx[e]}function MR(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Pk(a,i);Array.isArray(d)&&(u.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 c&&(h.pseudoElement=c),e.animate(u,h)}function jk(e){return typeof e=="function"&&"applyToOptions"in e}function IR({type:e,...t}){return jk(e)&&Ck()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ek extends km{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,hm(typeof t.type!="string");const c=IR(t);this.animation=MR(n,r,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=Eu(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),_k(n,r,u),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 un(Number(t))}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=Ht(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&&LR()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),fn):i(this)}}const Tk={anticipate:ik,backInOut:rk,circInOut:ok};function AR(e){return e in Tk}function DR(e){typeof e.ease=="string"&&AR(e.ease)&&(e.ease=Tk[e.ease])}const Nd=10;class NR extends Ek{constructor(t){DR(t),wk(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 Qc({...o,autoplay:!1}),l=Math.max(Nd,xt.now()-this.startTime),c=Kn(0,Nd,l-Nd),u=a.sample(l).value,{name:d}=this.options;s&&d&&_k(s,d,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const yx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(En.test(e)||e==="0")&&!e.startsWith("url("));function zR(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 FR(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=yx(i,t),a=yx(s,t);return!o||!a?!1:zR(e)||(n==="spring"||jk(n))&&r}function Rh(e){e.duration=0,e.type="keyframes"}const Rk=new Set(["opacity","clipPath","filter","transform"]),BR=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function OR(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&BR.test(e[t]))return!0;return!1}const $R=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),VR=Xb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function WR(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:c,transformTemplate:u}=t.owner.getProps();return VR()&&n&&(Rk.has(n)||$R.has(n)&&OR(a))&&(n!=="transform"||!u)&&!c&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const UR=40;class HR extends km{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var m;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=xt.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:u,...d},p=(u==null?void 0:u.KeyframeResolver)||_m;this.keyframeResolver=new p(a,(y,w,g)=>this.onKeyframesResolved(y,w,h,!g),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,i){var g,x;this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=xt.now();let d=!0;FR(t,s,o,a)||(d=!1,(ri.instantAnimations||!l)&&(u==null||u(Eu(t,r,n))),t[0]=t[t.length-1],Rh(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>UR?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=d&&!c&&WR(p),y=(x=(g=p.motionValue)==null?void 0:g.owner)==null?void 0:x.current;let w;if(m)try{w=new NR({...p,element:y})}catch{w=new Qc(p)}else w=new Qc(p);w.finished.then(()=>{this.notifyFinished()}).catch(fn),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}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(),ER()),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 Lk(e,t,n,r=0,i=1){const s=Array.from(e).sort((c,u)=>c.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 xx=30,GR=e=>!isNaN(parseFloat(e));class KR{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=xt.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=xt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=GR(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 pm);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=xt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>xx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xx);return Zb(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 Qs(e,t){return new KR(e,t)}function Mk(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Sm(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Mk(n,e):n}const QR={type:"spring",stiffness:500,damping:25,restSpeed:10},YR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qR={type:"keyframes",duration:.8},XR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ZR=(e,{keyframes:t})=>t.length>2?qR:io.has(e)?e.startsWith("scale")?YR(t[1]):QR:XR,JR=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function eL(e){for(const t in e)if(!JR.has(t))return!0;return!1}const Cm=(e,t,n,r={},i,s)=>o=>{const a=Sm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ht(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,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};eL(a)||Object.assign(u,ZR(e,u)),u.duration&&(u.duration=Ht(u.duration)),u.repeatDelay&&(u.repeatDelay=Ht(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Rh(u),u.delay===0&&(d=!0)),(ri.instantAnimations||ri.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,Rh(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=Eu(u.keyframes,a);if(h!==void 0){ke.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Qc(u):new HR(u)},tL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function nL(e){const t=tL.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Ik(e,t,n=1){const[r,i]=nL(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Qb(o)?parseFloat(o):o}return ym(i)?Ik(i,t,n+1):i}function vx(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Pm(e,t,n,r){if(typeof t=="function"){const[i,s]=vx(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]=vx(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Fi(e,t,n){const r=e.getProps();return Pm(r,t,n!==void 0?n:r.custom,e)}const Ak=new Set(["width","height","top","left","right","bottom",...ro]),Lh=e=>Array.isArray(e);function rL(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qs(n))}function iL(e){return Lh(e)?e[e.length-1]||0:e}function sL(e,t){const n=Fi(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=iL(s[o]);rL(e,o,a)}}const rt=e=>!!(e&&e.getVelocity);function oL(e){return!!(rt(e)&&e.add)}function Mh(e,t){const n=e.getValue("willChange");if(oL(n))return n.add(t);if(!n&&ri.WillChange){const r=new ri.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function jm(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const aL="framerAppearId",Dk="data-"+jm(aL);function Nk(e){return e.props[Dk]}function lL({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function zk(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?Mk(s,l):l;const c=s==null?void 0:s.reduceMotion,u=s==null?void 0:s.skipAnimations;r&&(s=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i],p=s==null?void 0:s.path;p&&p.animateVisualElement(e,a,s,n,d);for(const m in a){const y=e.getValue(m,e.latestValues[m]??null),w=a[m];if(w===void 0||h&&lL(h,m))continue;const g={delay:n,...Sm(s||{},m)};u&&(g.skipAnimations=!0);const x=y.get();if(x!==void 0&&!y.isAnimating()&&!Array.isArray(w)&&w===x&&!g.velocity){ke.update(()=>y.set(w));continue}let v=!1;if(window.MotionHandoffAnimation){const C=Nk(e);if(C){const E=window.MotionHandoffAnimation(C,m,ke);E!==null&&(g.startTime=E,v=!0)}}Mh(e,m);const b=c??e.shouldReduceMotion;y.start(Cm(m,y,w,b&&Ak.has(m)?{type:!1}:g,e,v));const S=y.animation;S&&d.push(S)}if(o){const m=()=>ke.update(()=>{o&&sL(e,o)});d.length?Promise.all(d).then(m):m()}return d}function Ih(e,t,n={}){var l;const r=Fi(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(zk(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return cL(e,t,c,u,d,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>u())}else return Promise.all([s(),o(n.delay)])}function cL(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(Ih(l,t,{...o,delay:n+(typeof r=="function"?0:r)+Lk(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function uL(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Ih(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Ih(e,t,n);else{const i=typeof t=="function"?Fi(e,t,n.custom):t;r=Promise.all(zk(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const dL={test:e=>e==="auto",parse:e=>e},Fk=e=>t=>t.test(e),Bk=[no,Y,Gn,tr,z2,N2,dL],wx=e=>Bk.find(Fk(e));function fL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||qb(e):!0}const hL=new Set(["brightness","contrast","saturate","opacity"]);function pL(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xm)||[];if(!r)return e;const i=n.replace(r,"");let s=hL.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const mL=/\b([a-z-]*)\(.*?\)/gu,Ah={...En,getAnimatableNone:e=>{const t=e.match(mL);return t?t.map(pL).join(" "):e}},Dh={...En,getAnimatableNone:e=>{const t=En.parse(e);return En.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},bx={...no,transform:Math.round},gL={rotate:tr,pathRotation:tr,rotateX:tr,rotateY:tr,rotateZ:tr,scale:gl,scaleX:gl,scaleY:gl,scaleZ:gl,skew:tr,skewX:tr,skewY:tr,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:Pa,originX:ax,originY:ax,originZ:Y},Yc={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,inset:Y,insetBlock:Y,insetBlockStart:Y,insetBlockEnd:Y,insetInline:Y,insetInlineStart:Y,insetInlineEnd:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,paddingBlock:Y,paddingBlockStart:Y,paddingBlockEnd:Y,paddingInline:Y,paddingInlineStart:Y,paddingInlineEnd:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,marginBlock:Y,marginBlockStart:Y,marginBlockEnd:Y,marginInline:Y,marginInlineStart:Y,marginInlineEnd:Y,fontSize:Y,backgroundPositionX:Y,backgroundPositionY:Y,...gL,zIndex:bx,fillOpacity:Pa,strokeOpacity:Pa,numOctaves:bx},yL={...Yc,color:Ue,backgroundColor:Ue,outlineColor:Ue,fill:Ue,stroke:Ue,borderColor:Ue,borderTopColor:Ue,borderRightColor:Ue,borderBottomColor:Ue,borderLeftColor:Ue,filter:Ah,WebkitFilter:Ah,mask:Dh,WebkitMask:Dh},Ok=e=>yL[e],xL=new Set([Ah,Dh]);function $k(e,t){let n=Ok(e);return xL.has(n)||(n=En),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vL=new Set(["auto","none","0"]);function wL(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!vL.has(s)&&Ks(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=$k(n,i)}class bL extends _m{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 u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),ym(d))){const h=Ik(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ak.has(r)||t.length!==2)return;const[i,s]=t,o=wx(i),a=wx(s),l=ox(i),c=ox(s);if(l!==c&&$r[r]){this.needsMeasurement=!0;return}if(o!==a)if(mx(o)&&mx(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else $r[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||fL(t[i]))&&r.push(i);r.length&&wL(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=$r[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]=$r[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,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Vk(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 Nh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Jl(e){return Yb(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Em}=ck(queueMicrotask,!1),bn={x:!1,y:!1};function Wk(){return bn.x||bn.y}function kL(e){return e==="x"||e==="y"?bn[e]?null:(bn[e]=!0,()=>{bn[e]=!1}):bn.x||bn.y?null:(bn.x=bn.y=!0,()=>{bn.x=bn.y=!1})}function Uk(e,t){const n=Vk(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function _L(e){return!(e.pointerType==="touch"||Wk())}function SL(e,t,n={}){const[r,i,s]=Uk(e,n);return r.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",m)},d=w=>{c&&(c(w),c=void 0),u()},h=w=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(w))},p=()=>{a=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},m=w=>{if(w.pointerType!=="touch"){if(a){l=!0;return}d(w)}},y=w=>{if(!_L(w))return;l=!1;const g=t(o,w);typeof g=="function"&&(c=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",p,i)}),s}const Hk=(e,t)=>t?e===t?!0:Hk(e,t.parentElement):!1,Tm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,CL=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function PL(e){return CL.has(e.tagName)||e.isContentEditable===!0}const jL=new Set(["INPUT","SELECT","TEXTAREA"]);function EL(e){return jL.has(e.tagName)||e.isContentEditable===!0}const ec=new WeakSet;function kx(e){return t=>{t.key==="Enter"&&e(t)}}function zd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const TL=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=kx(()=>{if(ec.has(n))return;zd(n,"down");const i=kx(()=>{zd(n,"up")}),s=()=>zd(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 _x(e){return Tm(e)&&!Wk()}const Sx=new WeakSet;function RL(e,t,n={}){const[r,i,s]=Uk(e,n),o=a=>{const l=a.currentTarget;if(!_x(a)||Sx.has(a))return;ec.add(l),n.stopPropagation&&Sx.add(a);const c=t(l,a),u=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),ec.has(l)&&ec.delete(l),_x(p)&&typeof c=="function"&&c(p,{success:m})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||Hk(l,p.target))},h=p=>{u(p,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Jl(a)&&(a.addEventListener("focus",c=>TL(c,i)),!PL(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Rm(e){return Yb(e)&&"ownerSVGElement"in e}const tc=new WeakMap;let Tr;const Gk=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:Rm(r)&&"getBBox"in r?r.getBBox()[t]:r[n],LL=Gk("inline","width","offsetWidth"),ML=Gk("block","height","offsetHeight");function IL({target:e,borderBoxSize:t}){var n;(n=tc.get(e))==null||n.forEach(r=>{r(e,{get width(){return LL(e,t)},get height(){return ML(e,t)}})})}function AL(e){e.forEach(IL)}function DL(){typeof ResizeObserver>"u"||(Tr=new ResizeObserver(AL))}function NL(e,t){Tr||DL();const n=Vk(e);return n.forEach(r=>{let i=tc.get(r);i||(i=new Set,tc.set(r,i)),i.add(t),Tr==null||Tr.observe(r)}),()=>{n.forEach(r=>{const i=tc.get(r);i==null||i.delete(t),i!=null&&i.size||Tr==null||Tr.unobserve(r)})}}const nc=new Set;let ks;function zL(){ks=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};nc.forEach(t=>t(e))},window.addEventListener("resize",ks)}function FL(e){return nc.add(e),ks||zL(),()=>{nc.delete(e),!nc.size&&typeof ks=="function"&&(window.removeEventListener("resize",ks),ks=void 0)}}function Cx(e,t){return typeof e=="function"?FL(e):NL(e,t)}function BL(e){return Rm(e)&&e.tagName==="svg"}const OL=[...Bk,Ue,En],$L=e=>OL.find(Fk(e)),Px=()=>({translate:0,scale:1,origin:0,originPoint:0}),_s=()=>({x:Px(),y:Px()}),jx=()=>({min:0,max:0}),Qe=()=>({x:jx(),y:jx()}),VL=new WeakMap;function Tu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ja(e){return typeof e=="string"||Array.isArray(e)}const Lm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mm=["initial",...Lm];function Ru(e){return Tu(e.animate)||Mm.some(t=>ja(e[t]))}function Kk(e){return!!(Ru(e)||e.variants)}function WL(e,t,n){for(const r in t){const i=t[r],s=n[r];if(rt(i))e.addValue(r,i);else if(rt(s))e.addValue(r,Qs(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,Qs(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const qc={current:null},Im={current:!1},UL=typeof window<"u";function Qk(){if(Im.current=!0,!!UL)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qc.current=e.matches;e.addEventListener("change",t),t()}else qc.current=!1}const Ex=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Xc={};function Yk(e){Xc=e}function HL(){return Xc}class GL{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=_m,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 p=xt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ke.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,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=Ru(n),this.isVariantNode=Kk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const m=h[p];c[p]!==void 0&&rt(m)&&m.set(c[p])}}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,VL.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:(Im.current||Qk(),this.shouldReduceMotion=qc.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(),ii(this.notifyUpdate),ii(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&&Rk.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new Ek({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:Ht(u)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=io.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Xc){const n=Xc[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Qe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ex.length;r++){const i=Ex[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=WL(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=Qs(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"&&(Qb(r)||qb(r))?r=parseFloat(r):!$L(r)&&En.test(n)&&(r=$k(t,n)),this.setBaseTarget(t,rt(r)?r.get():r)),rt(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=Pm(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&&!rt(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 pm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Em.render(this.render)}}class qk extends GL{constructor(){super(...arguments),this.KeyframeResolver=bL}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;rt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class li{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Xk({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function KL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function QL(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 Fd(e){return e===void 0||e===1}function zh({scale:e,scaleX:t,scaleY:n}){return!Fd(e)||!Fd(t)||!Fd(n)}function ki(e){return zh(e)||Zk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Zk(e){return Tx(e.x)||Tx(e.y)}function Tx(e){return e&&e!=="0%"}function Zc(e,t,n){const r=e-n,i=t*r;return n+i}function Rx(e,t,n,r,i){return i!==void 0&&(e=Zc(e,i,r)),Zc(e,n,r)+t}function Fh(e,t=0,n=1,r,i){e.min=Rx(e.min,t,n,r,i),e.max=Rx(e.max,t,n,r,i)}function Jk(e,{x:t,y:n}){Fh(e.x,t.translate,t.scale,t.originPoint),Fh(e.y,n.translate,n.scale,n.originPoint)}const Lx=.999999999999,Mx=1.0000000000001;function YL(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:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&($n(e.x,-s.scroll.offset.x),$n(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Jk(e,o)),r&&ki(s.latestValues)&&rc(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<Mx&&t.x>Lx&&(t.x=1),t.y<Mx&&t.y>Lx&&(t.y=1)}function $n(e,t){e.min+=t,e.max+=t}function Ix(e,t,n,r,i=.5){const s=be(e.min,e.max,i);Fh(e,t,n,s,r)}function Ax(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function rc(e,t,n){const r=n??e;Ix(e.x,Ax(t.x,r.x),t.scaleX,t.scale,t.originX),Ix(e.y,Ax(t.y,r.y),t.scaleY,t.scale,t.originY)}function e_(e,t){return Xk(QL(e.getBoundingClientRect(),t))}function qL(e,t,n){const r=e_(e,n),{scroll:i}=t;return i&&($n(r.x,i.offset.x),$n(r.y,i.offset.y)),r}const XL={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ZL=ro.length;function JL(e,t,n){let r="",i=!0;for(let o=0;o<ZL;o++){const a=ro[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(a.startsWith("scale")?1:0);else{const u=parseFloat(l);c=a.startsWith("scale")?u===1:u===0}if(!c||n){const u=Nh(l,Yc[a]);if(!c){i=!1;const d=XL[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${Nh(s,Yc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Am(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(io.has(l)){o=!0;continue}else if(dk(l)){i[l]=c;continue}else{const u=Nh(c,Yc[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=JL(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}function t_(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 Dx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ro={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=Dx(e,t.target.x),r=Dx(e,t.target.y);return`${n}% ${r}%`}},eM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=En.parse(e);if(i.length>5)return r;const s=En.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}},Bh={borderRadius:{...Ro,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ro,borderTopRightRadius:Ro,borderBottomLeftRadius:Ro,borderBottomRightRadius:Ro,boxShadow:eM};function n_(e,{layout:t,layoutId:n}){return io.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Bh[e]||e==="opacity")}function Dm(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)(rt(r[a])||i&&rt(i[a])||n_(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function tM(e){return window.getComputedStyle(e)}class nM extends qk{constructor(){super(...arguments),this.type="html",this.renderInstance=t_}readValueFromInstance(t,n){var r;if(io.has(n))return(r=this.projection)!=null&&r.isProjecting?Ch(n):_R(t,n);{const i=tM(t),s=(dk(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return e_(t,n)}build(t,n,r){Am(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Dm(t,n,r)}}const rM={offset:"stroke-dashoffset",array:"stroke-dasharray"},iM={offset:"strokeDashoffset",array:"strokeDasharray"};function sM(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?rM:iM;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const oM=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function r_(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,c,u){if(Am(e,a,c),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=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const p of oM)d[p]!==void 0&&(h[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&sM(d,i,s,o,!1)}const i_=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"]),s_=e=>typeof e=="string"&&e.toLowerCase()==="svg";function aM(e,t,n,r){t_(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(i_.has(i)?i:jm(i),t.attrs[i])}function o_(e,t,n){const r=Dm(e,t,n);for(const i in e)if(rt(e[i])||rt(t[i])){const s=ro.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class lM extends qk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(io.has(n)){const r=Ok(n);return r&&r.default||0}return n=i_.has(n)?n:jm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return o_(t,n,r)}build(t,n,r){r_(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){aM(t,n,r,i)}mount(t){this.isSVGTag=s_(t.tagName),super.mount(t)}}const cM=Mm.length;function a_(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?a_(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<cM;n++){const r=Mm[n],i=e.props[r];(ja(i)||i===!1)&&(t[r]=i)}return t}function l_(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 uM=[...Lm].reverse(),dM=Lm.length;function fM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>uL(e,n,r)))}function hM(e){let t=fM(e),n=Nx(),r=!0,i=!1;const s=c=>(u,d)=>{var p;const h=Fi(e,d,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:m,transitionEnd:y,...w}=h;u={...u,...w,...y}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=a_(e.parent)||{},h=[],p=new Set;let m={},y=1/0;for(let g=0;g<dM;g++){const x=uM[g],v=n[x],b=u[x]!==void 0?u[x]:d[x],S=ja(b),C=x===c?v.isActive:null;C===!1&&(y=g);let E=b===d[x]&&b!==u[x]&&S;if(E&&(r||i)&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...m},!v.isActive&&C===null||!b&&!v.prevProp||Tu(b)||typeof b=="boolean")continue;if(x==="exit"&&v.isActive&&C!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const j=pM(v.prevProp,b);let L=j||x===c&&v.isActive&&!E&&S||g>y&&S,P=!1;const R=Array.isArray(b)?b:[b];let I=R.reduce(s(x),{});C===!1&&(I={});const{prevResolvedValues:F={}}=v,B={...F,...I},z=D=>{L=!0,p.has(D)&&(P=!0,p.delete(D)),v.needsAnimating[D]=!0;const O=e.getValue(D);O&&(O.liveStyle=!1)};for(const D in B){const O=I[D],k=F[D];if(m.hasOwnProperty(D))continue;let V=!1;Lh(O)&&Lh(k)?V=!l_(O,k)||j:V=O!==k,V?O!=null?z(D):p.add(D):O!==void 0&&p.has(D)?z(D):v.protectedKeys[D]=!0}v.prevProp=b,v.prevResolvedValues=I,v.isActive&&(m={...m,...I}),(r||i)&&e.blockInitialAnimation&&(L=!1);const G=E&&j;L&&(!G||P)&&h.push(...R.map(D=>{const O={type:x};if(typeof D=="string"&&(r||i)&&!G&&e.manuallyAnimateOnMount&&e.parent){const{parent:k}=e,V=Fi(k,D);if(k.enteringChildren&&V){const{delayChildren:q}=V.transition||{};O.delay=Lk(k.enteringChildren,e,q)}}return{animation:D,options:O}}))}if(p.size){const g={};if(typeof u.initial!="boolean"){const x=Fi(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(g.transition=x.transition)}p.forEach(x=>{const v=e.getBaseTarget(x),b=e.getValue(x);b&&(b.liveStyle=!0),g[x]=v??null}),h.push({animation:g})}let w=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,i=!1,w?t(h):Promise.resolve()}function l(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Nx(),i=!0}}}function pM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!l_(t,e):!1}function mi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nx(){return{animate:mi(!0),whileInView:mi(),whileHover:mi(),whileTap:mi(),whileDrag:mi(),whileFocus:mi(),exit:mi()}}function Oh(e,t){e.min=t.min,e.max=t.max}function vn(e,t){Oh(e.x,t.x),Oh(e.y,t.y)}function zx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const c_=1e-4,mM=1-c_,gM=1+c_,u_=.01,yM=0-u_,xM=0+u_;function vt(e){return e.max-e.min}function vM(e,t,n){return Math.abs(e-t)<=n}function Fx(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=vt(n)/vt(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=mM&&e.scale<=gM||isNaN(e.scale))&&(e.scale=1),(e.translate>=yM&&e.translate<=xM||isNaN(e.translate))&&(e.translate=0)}function Jo(e,t,n,r){Fx(e.x,t.x,n.x,r?r.originX:void 0),Fx(e.y,t.y,n.y,r?r.originY:void 0)}function Bx(e,t,n,r=0){const i=r?be(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+vt(t)}function wM(e,t,n,r){Bx(e.x,t.x,n.x,r==null?void 0:r.x),Bx(e.y,t.y,n.y,r==null?void 0:r.y)}function Ox(e,t,n,r=0){const i=r?be(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+vt(t)}function Jc(e,t,n,r){Ox(e.x,t.x,n.x,r==null?void 0:r.x),Ox(e.y,t.y,n.y,r==null?void 0:r.y)}function $x(e,t,n,r,i){return e-=t,e=Zc(e,1/n,r),i!==void 0&&(e=Zc(e,1/i,r)),e}function bM(e,t=0,n=1,r=.5,i,s=e,o=e){if(Gn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=$x(e.min,t,n,a,i),e.max=$x(e.max,t,n,a,i)}function Vx(e,t,[n,r,i],s,o){bM(e,t[n],t[r],t[i],t.scale,s,o)}const kM=["x","scaleX","originX"],_M=["y","scaleY","originY"];function Wx(e,t,n,r){Vx(e.x,t,kM,n?n.x:void 0,r?r.x:void 0),Vx(e.y,t,_M,n?n.y:void 0,r?r.y:void 0)}function Ux(e){return e.translate===0&&e.scale===1}function d_(e){return Ux(e.x)&&Ux(e.y)}function Hx(e,t){return e.min===t.min&&e.max===t.max}function SM(e,t){return Hx(e.x,t.x)&&Hx(e.y,t.y)}function Gx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function f_(e,t){return Gx(e.x,t.x)&&Gx(e.y,t.y)}function Kx(e){return vt(e.x)/vt(e.y)}function Qx(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Fn(e){return[e("x"),e("y")]}function CM(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:c,rotate:u,pathRotation:d,rotateX:h,rotateY:p,skewX:m,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}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 h_=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],PM=h_.length,Yx=e=>typeof e=="string"?parseFloat(e):e,qx=e=>typeof e=="number"||Y.test(e);function jM(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,EM(r)),e.opacityExit=be(t.opacity??1,0,TM(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<PM;o++){const a=h_[o];let l=Xx(t,a),c=Xx(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||qx(l)===qx(c)?(e[a]=Math.max(be(Yx(l),Yx(c),r),0),(Gn.test(c)||Gn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function Xx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const EM=p_(0,.5,sk),TM=p_(.5,.95,fn);function p_(e,t,n){return r=>r<e?0:r>t?1:n(Ca(e,t,r))}function RM(e,t,n){const r=rt(e)?e:Qs(e);return r.start(Cm("",r,t,n)),r.animation}function Ea(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const LM=(e,t)=>e.depth-t.depth;class MM{constructor(){this.children=[],this.isDirty=!1}add(t){fm(this.children,t),this.isDirty=!0}remove(t){Uc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LM),this.isDirty=!1,this.children.forEach(t)}}function IM(e,t){const n=xt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ii(r),e(s-t))};return ke.setup(r,!0),()=>ii(r)}function ic(e){return rt(e)?e.get():e}class AM{constructor(){this.members=[]}add(t){fm(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&&(Uc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Uc(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 sc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Bd=["","X","Y","Z"],DM=1e3;let NM=0;function Od(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function m_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Nk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&m_(r)}function g_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=NM++,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(BM),this.nodes.forEach(HM),this.nodes.forEach(GM),this.nodes.forEach(OM)},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 MM)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new pm),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=Rm(o)&&!BL(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const h=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{d=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=IM(h,250),sc.hasAnimatedSinceResize&&(sc.hasAnimatedSinceResize=!1,this.nodes.forEach(e0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||XM,{onLayoutAnimationStart:y,onLayoutAnimationComplete:w}=c.getProps(),g=!this.targetLayout||!f_(this.targetLayout,p),x=!d&&h;if(this.options.layoutRoot||this.resumeFrom||x||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Sm(m,"layout"),onPlay:y,onComplete:w};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,x,v.path)}else d||e0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(),ii(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(KM),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&&m_(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];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 c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(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(VM),this.nodes.forEach(Zx);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Jx);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(WM),this.nodes.forEach(UM),this.nodes.forEach(zM),this.nodes.forEach(FM)):this.nodes.forEach(Jx),this.clearAllSnapshots();const a=xt.now();nt.delta=Kn(0,1e3/60,a-nt.timestamp),nt.timestamp=a,nt.isProcessing=!0,Ld.update.process(nt),Ld.preRender.process(nt),Ld.render.process(nt),nt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Em.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($M),this.sharedNodes.forEach(QM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!vt(this.snapshot.measuredBox.x)&&!vt(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=Qe()),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&&!d_(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||ki(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),ZM(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Qe();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(JM))){const{scroll:u}=this.root;u&&($n(a.x,u.offset.x),$n(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Qe();if(vn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&vn(a,o),$n(a.x,d.offset.x),$n(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var u,d;const c=l||Qe();vn(c,o);for(let h=0;h<this.path.length;h++){const p=this.path[h];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&($n(c.x,-p.scroll.offset.x),$n(c.y,-p.scroll.offset.y)),ki(p.latestValues)&&rc(c,p.latestValues,(u=p.layout)==null?void 0:u.layoutBox)}return ki(this.latestValues)&&rc(c,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),c}removeTransform(o){var l;const a=Qe();vn(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!ki(u.latestValues))continue;let d;u.instance&&(zh(u.latestValues)&&u.updateSnapshot(),d=Qe(),vn(d,u.measurePageBox())),Wx(a,u.latestValues,(l=u.snapshot)==null?void 0:l.layoutBox,d)}return ki(this.latestValues)&&Wx(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!==nt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;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||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=nt.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=Qe(),this.targetWithTransforms=Qe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wM(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):vn(this.target,this.layout.layoutBox),Jk(this.target,this.targetDelta)):vn(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||zh(this.parent.latestValues)||Zk(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=Qe(),this.relativeTargetOrigin=Qe(),Jc(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),vn(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===nt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;vn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;YL(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Qe());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zx(this.prevProjectionDelta.x,this.projectionDelta.x),zx(this.prevProjectionDelta.y,this.projectionDelta.y)),Jo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Qx(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qx(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}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=_s(),this.projectionDelta=_s(),this.projectionDeltaWithTransform=_s()}setAnimationOrigin(o,a=!1,l){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=_s();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Qe(),m=c?c.source:void 0,y=this.layout?this.layout.source:void 0,w=m!==y,g=this.getStack(),x=!g||g.members.length<=1,v=!!(w&&!x&&this.options.crossfade===!0&&!this.path.some(qM));this.animationProgress=0;let b;const S=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=C=>{const E=C/1e3,j=S==null?void 0:S(E);j?(h.x.translate=j.x,h.x.scale=be(o.x.scale,1,E),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=j.y,h.y.scale=be(o.y.scale,1,E),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(t0(h.x,o.x,E),t0(h.y,o.y,E)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),YM(this.relativeTarget,this.relativeTargetOrigin,p,E),b&&SM(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Qe()),vn(b,this.relativeTarget)),w&&(this.animationValues=d,jM(d,u,this.latestValues,E,v,x)),j&&j.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=j.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(ii(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{sc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qs(0)),this.motionValue.jump(0,!1),this.currentAnimation=RM(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},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(DM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&y_(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Qe();const d=vt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=vt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}vn(a,l),rc(a,u),Jo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new AM),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&Od("z",o,c,this.animationValues);for(let u=0;u<Bd.length;u++)Od(`rotate${Bd[u]}`,o,c,this.animationValues),Od(`skew${Bd[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);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=ic(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ic(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ki(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=CM(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Bh){if(u[m]===void 0)continue;const{correct:y,applyTo:w,isCSSVariable:g}=Bh[m],x=d==="none"?u[m]:y(u[m],c);if(w){const v=w.length;for(let b=0;b<v;b++)o[w[b]]=x}else g?this.options.visualElement.renderState.vars[m]=x:o[m]=x}this.options.layoutId&&(o.pointerEvents=c===this?ic(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(Zx),this.root.sharedNodes.clear()}}}function zM(e){e.updateLayout()}function FM(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")Fn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=vt(h);h.min=r[d].min,h.max=h.min+p});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";Oh(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else y_(s,t.layoutBox,r)&&Fn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=vt(r[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=_s();Jo(a,r,t.layoutBox);const l=_s();o?Jo(l,e.applyTransform(i,!0),t.measuredBox):Jo(l,r,t.layoutBox);const c=!d_(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const m=e.options.layoutAnchor||void 0,y=Qe();Jc(y,t.layoutBox,h.layoutBox,m);const w=Qe();Jc(w,r,p.layoutBox,m),f_(y,w)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function BM(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 OM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $M(e){e.clearSnapshot()}function Zx(e){e.clearMeasurements()}function VM(e){e.isLayoutDirty=!0,e.updateLayout()}function Jx(e){e.isLayoutDirty=!1}function WM(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function UM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function e0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function HM(e){e.resolveTargetDelta()}function GM(e){e.calcProjection()}function KM(e){e.resetSkewAndRotation()}function QM(e){e.removeLeadSnapshot()}function t0(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function n0(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function YM(e,t,n,r){n0(e.x,t.x,n.x,r),n0(e.y,t.y,n.y,r)}function qM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const XM={duration:.45,ease:[.4,0,.1,1]},r0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),i0=r0("applewebkit/")&&!r0("chrome/")?Math.round:fn;function s0(e){e.min=i0(e.min),e.max=i0(e.max)}function ZM(e){s0(e.x),s0(e.y)}function y_(e,t,n){return e==="position"||e==="preserve-aspect"&&!vM(Kx(t),Kx(n),.2)}function JM(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const eI=g_({attachResizeListener:(e,t)=>Ea(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}),$d={current:void 0},x_=g_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$d.current){const e=new eI({});e.mount(window),e.setOptions({layoutScroll:!0}),$d.current=e}return $d.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Nm=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function o0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tI(...e){return t=>{let n=!1;const r=e.map(i=>{const s=o0(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():o0(e[i],null)}}}}function nI(...e){return _.useCallback(tI(...e),e)}class rI extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Jl(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Jl(r)&&r.offsetWidth||0,s=Jl(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 iI({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){var h;const o=_.useId(),a=_.useRef(null),l=_.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=_.useContext(Nm),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=nI(a,u);return _.useInsertionEffect(()=>{const{width:p,height:m,top:y,left:w,right:g,bottom:x,direction:v}=l.current;if(t||s===!1||!a.current||!p||!m)return;const b=v==="rtl",S=n==="left"?b?`right: ${g}`:`left: ${w}`:b?`left: ${w}`:`right: ${g}`,C=r==="bottom"?`bottom: ${x}`:`top: ${y}`;a.current.dataset.motionPopId=o;const E=document.createElement("style");c&&(E.nonce=c);const j=i??document.head;return j.appendChild(E),E.sheet&&E.sheet.insertRule(`
57
- [data-motion-pop-id="${o}"] {
58
- position: absolute !important;
59
- width: ${p}px !important;
60
- height: ${m}px !important;
61
- ${S}px !important;
62
- ${C}px !important;
63
- }
64
- `),()=>{var L;(L=a.current)==null||L.removeAttribute("data-motion-pop-id"),j.contains(E)&&j.removeChild(E)}},[t]),f.jsx(rI,{isPresent:t,childRef:a,sizeRef:l,pop:s,children:s===!1?e:_.cloneElement(e,{ref:d})})}const sI=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:c})=>{const u=dm(oI),d=_.useId();let h=!0,p=_.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:m=>{u.set(m,!0);for(const y of u.values())if(!y)return;r&&r()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,r]);return s&&h&&(p={...p}),_.useMemo(()=>{u.forEach((m,y)=>u.set(y,!1))},[n]),_.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=f.jsx(iI,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),f.jsx(ju.Provider,{value:p,children:e})};function oI(){return new Map}function v_(e=!0){const t=_.useContext(ju);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=_.useId();_.useEffect(()=>{if(e)return i(s)},[e]);const o=_.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const yl=e=>e.key||"";function a0(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const Lu=({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:c})=>{const[u,d]=v_(o),h=_.useMemo(()=>a0(e),[e]),p=o&&!u?[]:h.map(yl),m=_.useRef(!0),y=_.useRef(h),w=dm(()=>new Map),g=_.useRef(new Set),[x,v]=_.useState(h),[b,S]=_.useState(h);Kb(()=>{m.current=!1,y.current=h;for(let j=0;j<b.length;j++){const L=yl(b[j]);p.includes(L)?(w.delete(L),g.current.delete(L)):w.get(L)!==!0&&w.set(L,!1)}},[b,p.length,p.join("-")]);const C=[];if(h!==x){let j=[...h];for(let L=0;L<b.length;L++){const P=b[L],R=yl(P);p.includes(R)||(j.splice(L,0,P),C.push(P))}return s==="wait"&&C.length&&(j=C),S(a0(j)),v(h),null}const{forceRender:E}=_.useContext(um);return f.jsx(f.Fragment,{children:b.map(j=>{const L=yl(j),P=o&&!u?!1:h===b||p.includes(L),R=()=>{if(g.current.has(L))return;if(w.has(L))g.current.add(L),w.set(L,!0);else return;let I=!0;w.forEach(F=>{F||(I=!1)}),I&&(E==null||E(),S(y.current),o&&(d==null||d()),r&&r())};return f.jsx(sI,{isPresent:P,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:c,onExitComplete:P?void 0:R,anchorX:a,anchorY:l,children:j},L)})})},w_=_.createContext({strict:!1}),l0={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 c0=!1;function aI(){if(c0)return;const e={};for(const t in l0)e[t]={isEnabled:n=>l0[t].some(r=>!!n[r])};Yk(e),c0=!0}function b_(){return aI(),HL()}function lI(e){const t=b_();for(const n in e)t[n]={...t[n],...e[n]};Yk(t)}const cI=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 eu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cI.has(e)}let k_=e=>!eu(e);function uI(e){typeof e=="function"&&(k_=t=>t.startsWith("on")?!eu(t):e(t))}try{uI(require("@emotion/is-prop-valid").default)}catch{}function dI(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||rt(e[i])||(k_(i)||n===!0&&eu(i)||!t&&!eu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Mu=_.createContext({});function fI(e,t){if(Ru(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ja(n)?n:void 0,animate:ja(r)?r:void 0}}return e.inherit!==!1?t:{}}function hI(e){const{initial:t,animate:n}=fI(e,_.useContext(Mu));return _.useMemo(()=>({initial:t,animate:n}),[u0(t),u0(n)])}function u0(e){return Array.isArray(e)?e.join(" "):e}const zm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function __(e,t,n){for(const r in t)!rt(t[r])&&!n_(r,n)&&(e[r]=t[r])}function pI({transformTemplate:e},t){return _.useMemo(()=>{const n=zm();return Am(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mI(e,t){const n=e.style||{},r={};return __(r,n,e),Object.assign(r,pI(e,t)),r}function gI(e,t){const n={},r=mI(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 S_=()=>({...zm(),attrs:{}});function yI(e,t,n,r){const i=_.useMemo(()=>{const s=S_();return r_(s,t,s_(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};__(s,e.style,e),i.style={...s,...i.style}}return i}const xI=["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 Fm(e){return typeof e!="string"||e.includes("-")?!1:!!(xI.indexOf(e)>-1||/[A-Z]/u.test(e))}function vI(e,t,n,{latestValues:r},i,s=!1,o){const l=(o??Fm(e)?yI:gI)(t,r,i,e),c=dI(t,typeof e=="string",s),u=e!==_.Fragment?{...c,...l,ref:n}:{},{children:d}=t,h=_.useMemo(()=>rt(d)?d.get():d,[d]);return _.createElement(e,{...u,children:h})}function wI({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:bI(n,r,i,e),renderState:t()}}function bI(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=ic(s[h]);let{initial:o,animate:a}=e;const l=Ru(e),c=Kk(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Tu(d)){const h=Array.isArray(d)?d:[d];for(let p=0;p<h.length;p++){const m=Pm(e,h[p]);if(m){const{transitionEnd:y,transition:w,...g}=m;for(const x in g){let v=g[x];if(Array.isArray(v)){const b=u?v.length-1:0;v=v[b]}v!==null&&(i[x]=v)}for(const x in y)i[x]=y[x]}}}return i}const C_=e=>(t,n)=>{const r=_.useContext(Mu),i=_.useContext(ju),s=()=>wI(e,t,r,i);return n?s():dm(s)},kI=C_({scrapeMotionValuesFromProps:Dm,createRenderState:zm}),_I=C_({scrapeMotionValuesFromProps:o_,createRenderState:S_}),SI=Symbol.for("motionComponentSymbol");function CI(e,t,n){const r=_.useRef(n);_.useInsertionEffect(()=>{r.current=n});const i=_.useRef(null);return _.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 P_=_.createContext({});function ls(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function PI(e,t,n,r,i,s){var v,b;const{visualElement:o}=_.useContext(Mu),a=_.useContext(w_),l=_.useContext(ju),c=_.useContext(Nm),u=c.reducedMotion,d=c.skipAnimations,h=_.useRef(null),p=_.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:u,skipAnimations:d,isSVG:s}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,y=_.useContext(P_);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&jI(h.current,n,i,y);const w=_.useRef(!1);_.useInsertionEffect(()=>{m&&w.current&&m.update(n,l)});const g=n[Dk],x=_.useRef(!!g&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,g)));return Kb(()=>{p.current=!0,m&&(w.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),_.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,g)}),x.current=!1),m.enteringChildren=void 0)}),m}function jI(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:j_(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&ls(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function j_(e){if(e)return e.options.allowProjection!==!1?e.projection:j_(e.parent)}function Vd(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&lI(r);const s=n?n==="svg":Fm(e),o=s?_I:kI;function a(c,u){let d;const h={..._.useContext(Nm),...c,layoutId:EI(c)},{isStatic:p}=h,m=hI(c),y=o(c,p);if(!p&&typeof window<"u"){TI();const w=RI(h);d=w.MeasureLayout,m.visualElement=PI(e,y,h,i,w.ProjectionNode,s)}return f.jsxs(Mu.Provider,{value:m,children:[d&&m.visualElement?f.jsx(d,{visualElement:m.visualElement,...h}):null,vI(e,c,CI(y,m.visualElement,u),y,p,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=_.forwardRef(a);return l[SI]=e,l}function EI({layoutId:e}){const t=_.useContext(um).id;return t&&e!==void 0?t+"-"+e:e}function TI(e,t){_.useContext(w_).strict}function RI(e){const t=b_(),{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 LI(e,t){if(typeof Proxy>"u")return Vd;const n=new Map,r=(s,o)=>Vd(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,Vd(o,void 0,e,t)),n.get(o))})}const MI=(e,t)=>t.isSVG??Fm(e)?new lM(t):new nM(t,{allowProjection:e!==_.Fragment});class II extends li{constructor(t){super(t),t.animationState||(t.animationState=hM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Tu(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 AI=0;class DI extends li{constructor(){super(...arguments),this.id=AI++,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=Fi(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...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 NI={animation:{Feature:II},exit:{Feature:DI}};function $a(e){return{point:{x:e.pageX,y:e.pageY}}}const zI=e=>t=>Tm(t)&&e(t,$a(t));function ea(e,t,n,r){return Ea(e,t,zI(n),r)}const E_=({current:e})=>e?e.ownerDocument.defaultView:null,d0=(e,t)=>Math.abs(e-t);function FI(e,t){const n=d0(e.x,t.x),r=d0(e.y,t.y);return Math.sqrt(n**2+r**2)}const f0=new Set(["auto","scroll"]);class T_{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=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=xl(this.lastRawMoveEventInfo,this.transformPagePoint));const p=Wd(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=FI(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:w}=p,{timestamp:g}=nt;this.history.push({...w,timestamp:g});const{onStart:x,onMove:v}=this.handlers;m||(x&&x(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=xl(m,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:y,onSessionEnd:w,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Wd(p.type==="pointercancel"?this.lastMoveEventInfo:xl(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,x),w&&w(p,x)},!Tm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=$a(t),c=xl(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=nt;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,Wd(c,this.history)),this.removeListeners=Fa(ea(this.contextWindow,"pointermove",this.handlePointerMove),ea(this.contextWindow,"pointerup",this.handlePointerUp),ea(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(f0.has(r.overflowX)||f0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-n.x,y:i.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),ke.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ii(this.updatePoint)}}function xl(e,t){return t?{point:t(e.point)}:e}function h0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wd({point:e},t){return{point:e,delta:h0(e,R_(t)),offset:h0(e,BI(t)),velocity:OI(t,.1)}}function BI(e){return e[0]}function R_(e){return e[e.length-1]}function OI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=R_(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ht(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ht(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 $I(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function p0(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 VI(e,{top:t,left:n,bottom:r,right:i}){return{x:p0(e.x,n,i),y:p0(e.y,t,r)}}function m0(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 WI(e,t){return{x:m0(e.x,t.x),y:m0(e.y,t.y)}}function UI(e,t){let n=.5;const r=vt(e),i=vt(t);return i>r?n=Ca(t.min,t.max-r,e.min):r>i&&(n=Ca(e.min,e.max-i,t.min)),Kn(0,1,n)}function HI(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 $h=.35;function GI(e=$h){return e===!1?e=0:e===!0&&(e=$h),{x:g0(e,"left","right"),y:g0(e,"top","bottom")}}function g0(e,t,n){return{min:y0(e,t),max:y0(e,n)}}function y0(e,t){return typeof e=="number"?e:e[t]||0}const KI=new WeakMap;class QI{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Qe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{n&&this.snapToCursor($a(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:p,dragPropagation:m,onDragStart:y}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=kL(p),!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 x=this.getAxisMotionValue(g).get()||0;if(Gn.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[g];b&&(x=vt(b)*(parseFloat(x)/100))}}this.originPoint[g]=x}),y&&ke.update(()=>y(d,h),!1,!0),Mh(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:y,onDrag:w}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:g}=h;if(m&&this.currentDirection===null){this.currentDirection=qI(g),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,g),this.updateAxis("y",h.point,g),this.visualElement.render(),w&&ke.update(()=>w(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new T_(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:E_(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ke.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!vl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=$I(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&&ls(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=VI(r.layoutBox,t):this.constraints=!1,this.elastic=GI(n),i!==this.constraints&&!ls(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Fn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=HI(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ls(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=qL(r,i.root,this.visualElement.getTransformPagePoint());let o=WI(i.layout.layoutBox,s);if(n){const a=n(KL(o));this.hasMutatedConstraints=!!a,a&&(o=Xk(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Fn(u=>{if(!vl(u,n,this.currentDirection))return;let d=l&&l[u]||{};(o===!0||o===u)&&(d={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Mh(this.visualElement,t),r.start(Cm(t,r,0,n,this.visualElement,!1))}stopAnimation(){Fn(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){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]-be(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ls(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]=UI({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:c}=this.constraints[o];a.set(be(l,c,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;KI.set(this.visualElement,this);const t=this.visualElement.current,n=ea(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),h=c.target,p=h!==t&&EL(h);u&&d&&!p&&this.start(c)});let r;const i=()=>{const{dragConstraints:c}=this.getProps();ls(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=YI(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ke.read(i);const a=Ea(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Fn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[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=$h,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function x0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function YI(e,t,n){const r=Cx(e,x0(n)),i=Cx(t,x0(n));return()=>{r(),i()}}function vl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qI(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class XI extends li{constructor(t){super(t),this.removeGroupControls=fn,this.removeListeners=fn,this.controls=new QI(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 Ud=e=>(t,n)=>{e&&ke.update(()=>e(t,n),!1,!0)};class ZI extends li{constructor(){super(...arguments),this.removePointerDownListener=fn}onPointerDown(t){this.session=new T_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:E_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ud(t),onStart:Ud(n),onMove:Ud(r),onEnd:(s,o)=>{delete this.session,i&&ke.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ea(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 Hd=!1;class JI extends _.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),Hd&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sc.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}),Hd=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ke.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Em.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Hd=!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 L_(e){const[t,n]=v_(),r=_.useContext(um);return f.jsx(JI,{...e,layoutGroup:r,switchLayoutGroup:_.useContext(P_),isPresent:t,safeToRemove:n})}const eA={pan:{Feature:ZI},drag:{Feature:XI,ProjectionNode:x_,MeasureLayout:L_}};function v0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ke.postRender(()=>s(t,$a(t)))}class tA extends li{mount(){const{current:t}=this.node;t&&(this.unmount=SL(t,(n,r)=>(v0(this.node,r,"Start"),i=>v0(this.node,i,"End"))))}unmount(){}}class nA extends li{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=Fa(Ea(this.node.current,"focus",()=>this.onFocus()),Ea(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function w0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ke.postRender(()=>s(t,$a(t)))}class rA extends li{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=RL(t,(i,s)=>(w0(this.node,s,"Start"),(o,{success:a})=>w0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Vh=new WeakMap,Gd=new WeakMap,iA=e=>{const t=Vh.get(e.target);t&&t(e)},sA=e=>{e.forEach(iA)};function oA({root:e,...t}){const n=e||document;Gd.has(n)||Gd.set(n,{});const r=Gd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(sA,{root:e,...t})),r[i]}function aA(e,t,n){const r=oA(t);return Vh.set(e,n),r.observe(e),()=>{Vh.delete(e),r.unobserve(e)}}const lA={some:0,all:1};class cA extends li{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:lA[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=u?d:h;p&&p(c)};this.stopObserver=aA(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(uA(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function uA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const dA={inView:{Feature:cA},tap:{Feature:rA},focus:{Feature:nA},hover:{Feature:tA}},fA={layout:{ProjectionNode:x_,MeasureLayout:L_}},hA={...NI,...dA,...eA,...fA},Ys=LI(hA,MI);function Iu(){!Im.current&&Qk();const[e]=_.useState(qc.current);return e}function Bm(e,t){const n=_.useRef(t);n.current=t,_.useEffect(()=>{if(!e)return;const r=i=>{i.key==="Escape"&&n.current()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e])}const oc={stackPanelWidth:480,navIslandBottom:"1.5rem",navIslandHeight:"4.5rem",contentGap:"1.5rem"},ge={bgBase:"#FDFCF8",bgSurface:"#FAF8F0",bgElevated:"#F5F1E6",textPrimary:"#1A1917",textSecondary:"#68635C",accentBlue:"#7C9CC0",accentBlueDark:"#51719B",accentGreen:"#8FB996",accentGreenDark:"#5E8A66",accentAmber:"#D4A373",accentAmberDark:"#A67B4F",accentRose:"#C98B8B",accentRoseDark:"#9E5E5E",accentSlate:"#8A9BA8",accentSlateDark:"#5E7080",canvasBase:"#F0EAD8",canvas300:"#E5DBC4",chalkboardBg:"#142e22",chalkboardChalk:"#d4e8cb",chalkboardBorderBase:"#C8D2C3"};function ft(e,t){const n=e.replace("#",""),r=Number.parseInt(n.slice(0,2),16),i=Number.parseInt(n.slice(2,4),16),s=Number.parseInt(n.slice(4,6),16);return`rgba(${r}, ${i}, ${s}, ${t})`}const pA={4:"1rem"};function ee(...e){return e2(kT(e))}const mA={height:32,lineHeight:"32px",padding:"0 16px"},gA={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")`,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")`,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='0.4' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23speckle)' opacity='0.14'/%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")`,canvas:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='cv'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.62 0 0 0 0 0.60 0 0 0 0 0.52 0 0 0 0.42 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23cv)' 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")`,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")`},yA={white:ge.bgBase,paper:ge.bgSurface,speckle:ge.bgSurface,parchment:ge.bgElevated,canvas:ge.canvasBase,kraft:ge.canvas300,chalkboard:ge.chalkboardBg},xA={blue:"rgba(168, 200, 216, 0.35)",brown:"rgba(164, 144, 120, 0.35)",black:"rgba(61, 53, 43, 0.15)"};function Om(e){const t=typeof e=="string"?{texture:e}:e,n=t.texture??"paper",r=t.ruledType??"none",i=t.ruledColor??"blue",s=gA[n],o=yA[n],a=xA[i];return r==="none"?{backgroundColor:o,backgroundImage:s,backgroundRepeat:"repeat",backgroundSize:"200px 200px"}:r==="lines"?{backgroundColor:o,backgroundImage:`${s}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${a} 31px, ${a} 32px)`,backgroundRepeat:"repeat, repeat",backgroundSize:"200px 200px, 100% 32px"}:{backgroundColor:o,backgroundImage:`${s}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${a} 31px, ${a} 32px), repeating-linear-gradient(90deg, transparent, transparent 31px, ${a} 31px, ${a} 32px)`,backgroundRepeat:"repeat, repeat, repeat",backgroundSize:"200px 200px, 100% 32px, 32px 32px"}}function Qi(e,t="paper"){if(e!==!1)return Om(e===!0?t:e)}function vA(e){const t=Du((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 c=0;c<r;c++){const u=c/r*Math.PI*2+(t()-.5)*.15*n,d=o+(t()-.5)*a*2;l.push({x:i+Math.cos(u)*d,y:s+Math.sin(u)*d})}return Au(l)}function wA(e,t){const n=Du(`${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,c=[];for(let u=0;u<i;u++){const d=u/i*Math.PI*2+(n()-.5)*.15*r,h=a+(n()-.5)*l*2;c.push({x:s+Math.cos(d)*h,y:o+Math.sin(d)*h})}return Au(c)}function bA(e){const t=Du((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 c=0;c<r;c++){const u=(c+.5)/r,d=l.ax+(l.bx-l.ax)*u,h=l.ay+(l.by-l.ay)*u,p=l.bx-l.ax,m=l.by-l.ay,y=Math.sqrt(p*p+m*m)||1,w=-m/y,g=p/y,x=(t()-.5)*s*2;o.push({x:d+w*x,y:h+g*x})}return Au(o)}function kA(e,t){const n=Du(`${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 c of l)for(let u=0;u<i;u++){const d=(u+.5)/i,h=c.ax+(c.bx-c.ax)*d,p=c.ay+(c.by-c.ay)*d,m=c.bx-c.ax,y=c.by-c.ay,w=Math.sqrt(m*m+y*y)||1,g=-y/w,x=m/w,v=(n()-.5)*o*2;a.push({x:h+g*v,y:p+x*v})}return Au(a)}function Au(e){const t=e.length;if(t<3)return"";let n=`M ${br(e[0].x)} ${br(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,c=s.y+(o.y-i.y)/6,u=o.x-(a.x-s.x)/6,d=o.y-(a.y-s.y)/6;n+=` C ${br(l)} ${br(c)}, ${br(u)} ${br(d)}, ${br(o.x)} ${br(o.y)}`}return n+=" Z",n}function br(e){return e.toFixed(2)}function Du(e){let t=typeof e=="string"?_A(e):e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function _A(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 Nu(){const e=_.useId();return _.useMemo(()=>{let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return(t+1)/4294967296},[e])}function so(e){const t=Nu();return _.useMemo(()=>({blob:vA({seed:t,wobble:e}),ring:wA(t,e)}),[t,e])}const SA="button-module__button___Z331g",CA="button-module__blobBg___QQFzf",PA="button-module__blobFill___XwLjV",jA="button-module__blobRing___567UW",EA="button-module__isActive___FXNSJ",TA="button-module__primary___ppbyq",RA="button-module__secondary___esy5L",LA="button-module__ghost___NisA0",MA="button-module__danger___Wnvuq",IA="button-module__chalkboard___d3Nqb",AA="button-module__small___u7y8a",DA="button-module__medium___HBIAj",NA="button-module__large___RPzNy",zA="button-module__fullWidth___H0P0F",FA="button-module__iconLeft___s60SZ",BA="button-module__iconRight___75eFu",OA="button-module__label___pXAyM",tn={button:SA,blobBg:CA,blobFill:PA,blobRing:jA,isActive:EA,primary:TA,secondary:RA,ghost:LA,danger:MA,chalkboard:IA,small:AA,medium:DA,large:NA,fullWidth:zA,iconLeft:FA,iconRight:BA,label:OA},oe=_.forwardRef(function({variant:e="primary",surface:t="paper",size:n="medium",icon:r,iconRight:i,fullWidth:s=!1,wobble:o=.5,isActive:a=!1,children:l,className:c,...u},d){const h=so(o);return f.jsxs("button",{ref:d,type:"button",className:ee(tn.button,tn[e],tn[n],t==="chalkboard"&&tn.chalkboard,a&&tn.isActive,s&&tn.fullWidth,c),...u,children:[f.jsxs("svg",{className:tn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:h.blob,className:tn.blobFill}),f.jsx("path",{d:h.ring,className:tn.blobRing})]}),r&&f.jsx("span",{className:tn.iconLeft,children:r}),f.jsx("span",{className:tn.label,children:l}),i&&f.jsx("span",{className:tn.iconRight,children:i})]})});function $m(e){return{blue:e.accentBlue,green:e.accentGreen,amber:e.accentAmber,rose:e.accentRose,slate:e.accentSlate}}const Ze=y2.generator(),$A="sketch-border-module__svg___whV4x",VA="sketch-border-module__behind___lgdYV",WA="sketch-border-module__stroke___vAm-v",UA="sketch-border-module__fill___zlpd6",wl={svg:$A,behind:VA,stroke:WA,fill:UA};function Qt({shape:e="rect",radius:t=9,roughness:n=1.2,bowing:r=1,strokeWidth:i=1,inset:s=2,fill:o=!1,clip:a=!1,smooth:l=!1,strokeInset:c=!0,className:u}){const[d]=_.useState(Math.random),h=_.useRef(null),[p,m]=_.useState(null);_.useEffect(()=>{var g;const x=(g=h.current)==null?void 0:g.parentElement;if(!x)return;const v=new ResizeObserver(()=>{const b=x.getBoundingClientRect(),S=Math.round(b.width),C=Math.round(b.height);m(E=>E&&E.width===S&&E.height===C?E:{width:S,height:C})});return v.observe(x),()=>v.disconnect()},[]);const{parts:y,clipPath:w}=_.useMemo(()=>{if(!p||p.width<8||p.height<8)return{parts:null,clipPath:null};const g=Math.max(1,Math.round(d*1e6)),x=g,v=g*2654435761%2147483647,b=j=>Ze.toPaths(Ze.path(j,{seed:x,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:i})).filter(L=>!L.fill||L.fill==="none").map(L=>({d:L.d,filled:!1}));if(l){const j={seed:x,roughness:n,bowing:r,strokeWidth:i,disableMultiStroke:!0},L=R=>Ze.toPaths(R).filter(I=>!I.fill||I.fill==="none").map(I=>({d:I.d,filled:!1}));if(a){const R=bl(e,p,s,t,es(v),n*1.1),I=c?b0(i,n):0,F=I?bl(e,p,s+I,t,es(v),n*1.1):R;return{parts:L(Ze.path(F,{...j,preserveVertices:!0})),clipPath:R}}const P=e==="circle"?Ze.ellipse(p.width/2,p.height/2,p.width-s*2,p.height-s*2,j):Ze.path(_0(p,s,t,es(x)),{...j,preserveVertices:!0});return{parts:L(P),clipPath:null}}if(a){const j=bl(e,p,s,t,es(v),n*1.1),L=c?b0(i,n):0,P=L?bl(e,p,s+L,t,es(v),n*1.1):j;return{parts:b(P),clipPath:j}}const S=(j,L)=>{const P=L?{fill:"#000",fillStyle:"solid"}:{},R=e==="circle"?Ze.ellipse(p.width/2,p.height/2,p.width-s*2,p.height-s*2,{seed:j,roughness:n,bowing:r,strokeWidth:i,...P}):Ze.path(_0(p,s,t,es(j)),{seed:j,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:i,...P});return Ze.toPaths(R)},C=o?S(v,!0).filter(j=>!!j.fill&&j.fill!=="none").map(j=>({d:j.d,filled:!0})):[],E=S(x,!1).filter(j=>!j.fill||j.fill==="none").map(j=>({d:j.d,filled:!1}));return{parts:[...C,...E],clipPath:null}},[p,d,a,l,e,t,n,r,i,s,o,c]);return _.useEffect(()=>{var g;const x=(g=h.current)==null?void 0:g.parentElement;if(x)return w?x.style.setProperty("--sketch-clip",`path("${w}")`):x.style.removeProperty("--sketch-clip"),()=>{x.style.removeProperty("--sketch-clip")}},[w]),f.jsx("svg",{ref:h,className:ee(wl.svg,o&&wl.behind,u),viewBox:p?`0 0 ${p.width} ${p.height}`:void 0,"aria-hidden":"true",children:y==null?void 0:y.map((g,x)=>g.filled?f.jsx("path",{className:wl.fill,d:g.d},`f-${x}`):f.jsx("path",{className:wl.stroke,d:g.d,strokeWidth:i},`s-${x}`))})}function b0(e,t){return e/2+t*1.5}function es(e){let t=e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function bl(e,t,n,r,i,s){const o=t.width-n*2,a=t.height-n*2,l=t.width/2,c=t.height/2,u=()=>(i()-.5)*s*2,d=[];if(e==="circle")for(let h=0;h<16;h++){const p=h/16*Math.PI*2;d.push({x:l+Math.cos(p)*o/2+u(),y:c+Math.sin(p)*a/2+u()})}else{const h=Math.max(2,Math.min(r,o/2,a/2)),p=n,m=n,y=(x,v,b)=>{for(const S of[0,45,90]){const C=(b+S)*Math.PI/180;d.push({x:x+Math.cos(C)*h+u(),y:v+Math.sin(C)*h+u()})}},w=(x,v,b,S)=>{const C=Math.hypot(b-x,S-v),E=Math.min(12,Math.max(1,Math.round(C/160)));for(let j=1;j<=E;j++){const L=j/(E+1);d.push({x:x+(b-x)*L+u(),y:v+(S-v)*L+u()})}};y(p+h,m+h,180),w(p+h,m,p+o-h,m),y(p+o-h,m+h,270),w(p+o,m+h,p+o,m+a-h),y(p+o-h,m+a-h,0),w(p+o-h,m+a,p+h,m+a),y(p+h,m+a-h,90),w(p,m+a-h,p,m+h);const g=3;return k0([...d.slice(g),...d.slice(0,g)])}return k0(d)}function k0(e){const t=e.length;if(t<3)return"";const n=(i,s)=>Math.max(.001,Math.hypot(s.x-i.x,s.y-i.y)**.5);let r=`M ${e[0].x.toFixed(2)} ${e[0].y.toFixed(2)}`;for(let i=0;i<t;i++){const s=e[(i-1+t)%t],o=e[i],a=e[(i+1)%t],l=e[(i+2)%t],c=n(s,o),u=n(o,a),d=n(a,l),h=a.x-o.x+u*((o.x-s.x)/c-(a.x-s.x)/(c+u)),p=a.y-o.y+u*((o.y-s.y)/c-(a.y-s.y)/(c+u)),m=a.x-o.x+u*((l.x-a.x)/d-(l.x-o.x)/(u+d)),y=a.y-o.y+u*((l.y-a.y)/d-(l.y-o.y)/(u+d)),w=o.x+h/3,g=o.y+p/3,x=a.x-m/3,v=a.y-y/3;r+=` C ${w.toFixed(2)} ${g.toFixed(2)}, ${x.toFixed(2)} ${v.toFixed(2)}, ${a.x.toFixed(2)} ${a.y.toFixed(2)}`}return`${r} Z`}function _0(e,t,n,r){const i=[0,0,0,0].map(()=>Math.max(2,n+(r()-.5)*3));return HA(t,t,e.width-t*2,e.height-t*2,i)}function HA(e,t,n,r,i){const s=u=>Math.min(u,n/2,r/2),[o,a,l,c]=i.map(s);return[`M ${_e(e+o)} ${_e(t)}`,`L ${_e(e+n-a)} ${_e(t)}`,`Q ${_e(e+n)} ${_e(t)} ${_e(e+n)} ${_e(t+a)}`,`L ${_e(e+n)} ${_e(t+r-l)}`,`Q ${_e(e+n)} ${_e(t+r)} ${_e(e+n-l)} ${_e(t+r)}`,`L ${_e(e+c)} ${_e(t+r)}`,`Q ${_e(e)} ${_e(t+r)} ${_e(e)} ${_e(t+r-c)}`,`L ${_e(e)} ${_e(t+o)}`,`Q ${_e(e)} ${_e(t)} ${_e(e+o)} ${_e(t)}`,"Z"].join(" ")}function _e(e){return e.toFixed(2)}const Yt={surface:{radius:12,inset:2.5,roughness:.2,bowing:0,strokeWidth:1.3},field:{radius:8,inset:2,roughness:1.1,strokeWidth:1.3},control:{radius:6,inset:2,roughness:.5,bowing:.6,strokeWidth:1.4},pill:{radius:999,inset:2,roughness:.7,strokeWidth:1}},GA="page-module__page___-uHnG",KA="page-module__outlined___Wwtyg",QA="page-module__surface___sWfI6",YA="page-module__withAccent___lsv-m",qA="page-module__accentBlue___XxbMV",XA="page-module__accentGreen___Ne6Q8",ZA="page-module__accentAmber___kLAwa",JA="page-module__accentRose___O9ZbZ",eD="page-module__accentSlate___xCB66",$o={page:GA,outlined:KA,surface:QA,withAccent:YA,accentBlue:qA,accentGreen:XA,accentAmber:ZA,accentRose:JA,accentSlate:eD},tD=$m($o),nD={all:14,top:14,none:2};function M_({children:e,className:t,style:n,texture:r=!0,withAccent:i=!1,accentColor:s="blue",rounded:o="all",outline:a=!1}){const l=Qi(r,{texture:"white",ruledType:"lines",ruledColor:"blue"})??{backgroundColor:"var(--pui-bg-base)"};return f.jsxs("div",{className:ee($o.page,a&&$o.outlined,i&&$o.withAccent,i&&tD[s],t),style:n,children:[f.jsx(Qt,{clip:!0,...Yt.surface,radius:nD[o]}),f.jsx("div",{className:$o.surface,style:l,children:e})]})}const rD="layout-module__layout___O1aWi",iD="layout-module__header___I-kxe",sD="layout-module__headerLeft___JChJQ",oD="layout-module__headerTitles___aqSUG",aD="layout-module__headerTitle___wvr39",lD="layout-module__headerSubtitle___6f5BD",cD="layout-module__headerActions___adC12",uD="layout-module__mobileToggle___4WpVG",dD="layout-module__body___tywNf",fD="layout-module__mobileOverlay___tzbBC",hD="layout-module__sidebar___8VKGq",pD="layout-module__sidebarOpen___47rtr",mD="layout-module__sidebarInner___tq2X6",gD="layout-module__logoArea___RLnC0",yD="layout-module__logoText___pAmfV",xD="layout-module__nav___FxcrZ",vD="layout-module__main___9z7bu",wD="layout-module__navIslandFixed___H4TwP",bD="layout-module__content___jL-VB",kD="layout-module__contentWithPage___vVdfN",_D="layout-module__footer___LyakU",SD="layout-module__footerText___8BYxc",Ne={layout:rD,header:iD,headerLeft:sD,headerTitles:oD,headerTitle:aD,headerSubtitle:lD,headerActions:cD,mobileToggle:uD,body:dD,mobileOverlay:fD,sidebar:hD,sidebarOpen:pD,sidebarInner:mD,logoArea:gD,logoText:yD,nav:xD,main:vD,navIslandFixed:wD,content:bD,contentWithPage:kD,footer:_D,footerText:SD};function CD(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"}:Om(e)}function PD({children:e,showHeader:t=!0,showFooter:n=!1,showSidebar:r=!0,showPage:i=!0,background:s="paper",title:o,subtitle:a,headerActions:l,headerHeight:c,headerTexture:u,navigationItems:d=[],activeItemId:h,onNavigate:p,logo:m,footerContent:y,navigationIsland:w,style:g,bleedBottom:x=!0,routeKey:v,stackOpen:b}){const[S,C]=_.useState(!1),E=Iu();Bm(S,()=>C(!1));const j=CD(s),L=r&&d.length>0,P=c!==void 0||u!==void 0?{...u!==void 0?Om(u):{},...c!==void 0?{height:typeof c=="number"?`${c}px`:c}:{}}:void 0;return f.jsxs("div",{className:Ne.layout,style:{...j,...g},children:[t&&f.jsxs("header",{className:Ne.header,style:P,children:[f.jsxs("div",{className:Ne.headerLeft,children:[L&&f.jsx("button",{type:"button",className:Ne.mobileToggle,onClick:()=>C(!0),"aria-label":"Open navigation",children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:f.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),f.jsxs("div",{className:Ne.headerTitles,children:[o&&f.jsx("h1",{className:Ne.headerTitle,children:o}),a&&f.jsx("span",{className:Ne.headerSubtitle,children:a})]})]}),l&&f.jsx("div",{className:Ne.headerActions,children:l})]}),f.jsxs("div",{className:Ne.body,children:[S&&f.jsx("button",{type:"button",className:Ne.mobileOverlay,onClick:()=>C(!1),"aria-label":"Close navigation",tabIndex:-1}),L&&f.jsx("aside",{className:ee(Ne.sidebar,S&&Ne.sidebarOpen),children:f.jsxs("div",{className:Ne.sidebarInner,children:[f.jsx("div",{className:Ne.logoArea,children:m||f.jsx("span",{className:Ne.logoText,children:"Paper UI"})}),f.jsx("nav",{className:Ne.nav,"aria-label":"Main navigation",children:d.map(R=>{const I=R.id===h;return f.jsx(oe,{variant:"ghost",size:"small",isActive:I,onClick:()=>{p==null||p(R),C(!1)},"aria-current":I?"page":void 0,icon:R.icon,style:mA,children:R.label},R.id)})})]})}),f.jsx("div",{className:Ne.main,children:f.jsx("main",{className:i?Ne.contentWithPage:Ne.content,style:x?{paddingBottom:0}:void 0,children:(()=>{const R=v!==void 0?f.jsx(Lu,{mode:"wait",children:f.jsx(Ys.div,{initial:E?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:E?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},style:{height:"100%"},children:e},v)}):e;return i?f.jsx(M_,{rounded:x?"top":"all",style:x&&w?{paddingBottom:`calc(${oc.navIslandBottom} + ${oc.navIslandHeight} + ${pA[4]})`}:void 0,children:R}):R})()})})]}),w&&f.jsx("div",{className:Ne.navIslandFixed,children:b!==void 0?f.jsx(Ys.div,{animate:{x:b?`-${oc.stackPanelWidth/2}px`:0},transition:{duration:E?0:.3,ease:[.4,0,.2,1]},children:w}):w}),n&&f.jsx("footer",{className:Ne.footer,children:y||f.jsx("p",{className:Ne.footerText,children:"Paper UI — Natural Materials Component Library"})})]})}const jD="checkbox-module__wrapper___uLYMI",ED="checkbox-module__blobFill___mPJSR",TD="checkbox-module__input___Ptgt7",RD="checkbox-module__blobBg___bw3sn",LD="checkbox-module__labelLeft___-vAmH",MD="checkbox-module__box___yAh-r",ID="checkbox-module__checkmark___tTyBz",AD="checkbox-module__indeterminateLine___IosI-",DD="checkbox-module__boxWrapper___byjoS",ND="checkbox-module__icon___RO-yn",zD="checkbox-module__labelText___bAnLr",FD="checkbox-module__chalkboard___sv6SL",Ft={wrapper:jD,blobFill:ED,input:TD,blobBg:RD,labelLeft:LD,box:MD,checkmark:ID,indeterminateLine:AD,boxWrapper:DD,icon:ND,labelText:zD,chalkboard:FD},BD=_.forwardRef(function({label:e,labelPosition:t="right",indeterminate:n=!1,wobble:r=.4,surface:i="paper",className:s,checked:o,onChange:a,id:l,...c},u){const d=_.useId(),h=l??d,p=so(r),m=_.useRef(null);return _.useEffect(()=>{m.current&&(m.current.indeterminate=n)},[n]),f.jsxs("label",{className:ee(Ft.wrapper,t==="left"&&Ft.labelLeft,i==="chalkboard"&&Ft.chalkboard,s),htmlFor:h,children:[f.jsxs("span",{className:Ft.boxWrapper,children:[f.jsx("input",{ref:y=>{m.current=y,typeof u=="function"?u(y):u&&(u.current=y)},id:h,type:"checkbox",className:Ft.input,checked:o,onChange:a,...c}),f.jsx("svg",{className:Ft.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("path",{d:p.blob,className:Ft.blobFill})}),f.jsxs("span",{className:Ft.box,"aria-hidden":"true",children:[f.jsx(Qt,{smooth:!0,...Yt.control}),n?f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Ft.icon,children:f.jsx("line",{x1:"4",y1:"10",x2:"16",y2:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:Ft.indeterminateLine})}):f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Ft.icon,children:f.jsx("path",{d:"M4 10 L8 14 L16 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:Ft.checkmark})})]})]}),e&&f.jsx("span",{className:Ft.labelText,children:e})]})}),OD="icon-button-module__iconButton___avg6i",$D="icon-button-module__blobBg___466Vy",VD="icon-button-module__blobFill___FTN1g",WD="icon-button-module__blobRing___hRdQb",UD="icon-button-module__isActive___XlvtM",HD="icon-button-module__icon___h204x",GD="icon-button-module__ghost___Wbxog",KD="icon-button-module__danger___p0Xz5",QD="icon-button-module__small___bPnCU",YD="icon-button-module__medium___nOxPf",qD="icon-button-module__large___UBU5z",XD="icon-button-module__chalkboard___mi0sQ",Jn={iconButton:OD,blobBg:$D,blobFill:VD,blobRing:WD,isActive:UD,icon:HD,default:"icon-button-module__default___9frNR",ghost:GD,danger:KD,small:QD,medium:YD,large:qD,chalkboard:XD},Vt=_.forwardRef(function({icon:e,variant:t="default",surface:n="paper",size:r="medium",label:i,wobble:s=.5,isActive:o=!1,className:a,...l},c){const u=so(s);return f.jsxs("button",{ref:c,type:"button",className:ee(Jn.iconButton,Jn[t],n==="chalkboard"&&Jn.chalkboard,Jn[r],o&&Jn.isActive,a),"aria-label":i,title:i,...l,children:[f.jsxs("svg",{className:Jn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:u.blob,className:Jn.blobFill}),f.jsx("path",{d:u.ring,className:Jn.blobRing})]}),f.jsx("span",{className:Jn.icon,children:e})]})}),ZD="stamp-module__stamp___5qaNY",JD="stamp-module__small___BBlBg",eN="stamp-module__medium___HG2YD",tN="stamp-module__large___aUT0I",nN="stamp-module__blobBg___Mdrdd",rN="stamp-module__blobFill___QyCeB",iN="stamp-module__blobRing___EUDx7",sN="stamp-module__dot___qZyCR",oN="stamp-module__label___T89iH",aN="stamp-module__chalkboard___syI4T",kr={stamp:ZD,small:JD,medium:eN,large:tN,blobBg:nN,blobFill:rN,blobRing:iN,dot:sN,label:oN,chalkboard:aN},Kd={neutral:{fill:ft(ge.accentSlate,.14),text:ge.accentSlateDark,ring:ft(ge.accentSlateDark,.35)},info:{fill:ft(ge.accentBlue,.14),text:ge.accentBlueDark,ring:ft(ge.accentBlueDark,.35)},success:{fill:ft(ge.accentGreen,.16),text:ge.accentGreenDark,ring:ft(ge.accentGreenDark,.35)},warning:{fill:ft(ge.accentAmber,.16),text:ge.accentAmberDark,ring:ft(ge.accentAmberDark,.4)},error:{fill:ft(ge.accentRose,.16),text:ge.accentRoseDark,ring:ft(ge.accentRoseDark,.35)}},S0={fill:ft(ge.chalkboardBorderBase,.1),ring:ft(ge.chalkboardBorderBase,.35)};function Ge({children:e,size:t="medium",variant:n,dot:r=!1,fillColor:i,textColor:s,wobble:o=.3,surface:a="paper",className:l}){const c=so(o),u=a==="chalkboard",d=n?u?S0.ring:Kd[n].ring:void 0,h=i??(n?u?S0.fill:Kd[n].fill:"transparent"),p=s??(n&&!u?Kd[n].text:void 0);return f.jsxs("span",{className:ee(kr.stamp,kr[t],u&&kr.chalkboard,l),style:p?{color:p}:void 0,children:[f.jsxs("svg",{className:kr.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:c.blob,className:kr.blobFill,style:{fill:h}}),d&&f.jsx("path",{d:c.ring,className:kr.blobRing,style:{stroke:d}})]}),r&&f.jsx("span",{className:kr.dot,"aria-hidden":"true"}),f.jsx("span",{className:kr.label,children:e})]})}const lN="copy-button-module__copyButton___-hTo4",cN="copy-button-module__dark___O45N-",uN="copy-button-module__chalkboard___hW4aw",dN="copy-button-module__copied___XlHFr",kl={copyButton:lN,dark:cN,chalkboard:uN,copied:dN};function Wh({text:e,variant:t="light",surface:n="paper",className:r,...i}){const[s,o]=_.useState(!1),a=_.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),1500)}catch(l){console.error("Failed to copy:",l)}},[e]);return f.jsx("button",{type:"button",onClick:a,className:ee(kl.copyButton,t==="dark"&&kl.dark,n==="chalkboard"&&kl.chalkboard,s&&kl.copied,r),...i,children:s?"Copied!":"Copy"})}const fN="code-block-module__codeBlock___dq28o",hN="code-block-module__header___42Fek",pN="code-block-module__relative___oO-zy",mN="code-block-module__copyOverlay___PjAuq",gN="code-block-module__pre___zXzLZ",yN="code-block-module__chalkboard___bdo9J",xN="code-block-module__chalkboardHeader___3RiVd",vN="code-block-module__chalkboardPre___iRBFR",_r={codeBlock:fN,header:hN,relative:pN,copyOverlay:mN,pre:gN,chalkboard:yN,chalkboardHeader:xN,chalkboardPre:vN};function wN({code:e,filename:t,surface:n="paper"}){return f.jsxs("div",{className:ee(_r.codeBlock,n==="chalkboard"&&_r.chalkboard),children:[t&&f.jsxs("div",{className:ee(_r.header,n==="chalkboard"&&_r.chalkboardHeader),children:[f.jsx("span",{children:t}),f.jsx(Wh,{text:e,variant:"light",surface:n})]}),!t&&f.jsx("div",{className:_r.relative,children:f.jsx("div",{className:_r.copyOverlay,children:f.jsx(Wh,{text:e,variant:"dark",surface:n})})}),f.jsx("pre",{className:ee(_r.pre,n==="chalkboard"&&_r.chalkboardPre),children:f.jsx("code",{children:e})})]})}function oo({size:e=16}){return f.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:[f.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),f.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function bN({size:e=16}){return f.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:f.jsx("polyline",{points:"20 6 9 17 4 12"})})}function kN({size:e=16}){return f.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:[f.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),f.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function _N({size:e=16}){return f.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:f.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"})})}function SN({size:e=16}){return f.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:[f.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function I_({size:e=16}){return f.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:f.jsx("polyline",{points:"9 18 15 12 9 6"})})}const CN="table-module__tableFrame___KP-90",PN="table-module__tableWrapper___gc3Y3",jN="table-module__toolbar___zhCel",EN="table-module__search___zIBk2",TN="table-module__searchIcon___ayhK8",RN="table-module__searchInput___PqsEG",LN="table-module__toolbarActions___EX6qS",MN="table-module__tableScroll___1gvc4",IN="table-module__table___tdU5g",AN="table-module__th___GQbKk",DN="table-module__td___WktB5",NN="table-module__tr___xeZno",zN="table-module__expandTh___uxkR4",FN="table-module__expandTd___VoBRC",BN="table-module__expandIcon___8V45X",ON="table-module__expandable___R7o2l",$N="table-module__expandedRow___1TbTQ",VN="table-module__expandedCell___sKAaD",WN="table-module__boardScroll___Y1yqm",UN="table-module__board___kFAI-",HN="table-module__boardColumn___-W9bP",GN="table-module__boardColumnHeader___kY3Fj",KN="table-module__accentBlue___PEJ1V",QN="table-module__accentGreen___wJ53r",YN="table-module__accentAmber___Iezjv",qN="table-module__accentRose___W8zxc",XN="table-module__accentSlate___oUZCX",ZN="table-module__boardColumnLabel___JBEed",JN="table-module__boardColumnCount___Pkpiq",e3="table-module__boardColumnBody___uAgRF",t3="table-module__boardRow___C1P60",n3="table-module__boardEmpty___IKv2W",r3="table-module__chalkboardFrame___xB3N5",i3="table-module__chalkboardWrapper___KjY5r",s3="table-module__chalkboard___v0m3A",ce={tableFrame:CN,tableWrapper:PN,toolbar:jN,search:EN,searchIcon:TN,searchInput:RN,toolbarActions:LN,tableScroll:MN,table:IN,th:AN,td:DN,tr:NN,expandTh:zN,expandTd:FN,expandIcon:BN,expandable:ON,expandedRow:$N,expandedCell:VN,boardScroll:WN,board:UN,boardColumn:HN,boardColumnHeader:GN,accentBlue:KN,accentGreen:QN,accentAmber:YN,accentRose:qN,accentSlate:XN,boardColumnLabel:ZN,boardColumnCount:JN,boardColumnBody:e3,boardRow:t3,boardEmpty:n3,chalkboardFrame:r3,chalkboardWrapper:i3,chalkboard:s3},o3=$m(ce);function Vm({data:e=[],columns:t=[],board:n,surface:r="paper",texture:i=!0,toolbar:s,expandable:o,showExpandColumn:a=!0,rowKey:l,rowClassName:c,className:u}){const d=Qi(i,r==="chalkboard"?"chalkboard":"paper"),h=!!s,[p,m]=_.useState(new Set),y=x=>{m(v=>{const b=new Set(v);return b.has(x)?b.delete(x):b.add(x),b})},w=!!(o&&a),g=w?t.length+1:t.length;return f.jsxs("div",{className:ee(ce.tableFrame,r==="chalkboard"&&ce.chalkboardFrame,u),children:[f.jsx(Qt,{clip:!0,...Yt.surface}),f.jsxs("div",{className:ee(ce.tableWrapper,r==="chalkboard"&&ce.chalkboardWrapper),style:d,children:[h&&f.jsxs("div",{className:ce.toolbar,children:[s.search&&f.jsxs("div",{className:ce.search,children:[f.jsx(a3,{className:ce.searchIcon}),f.jsx("input",{type:"text",className:ce.searchInput,placeholder:s.search.placeholder??"Search...","aria-label":s.search.placeholder??"Search",value:s.search.value,onChange:x=>{var v,b;return(b=(v=s.search)==null?void 0:v.onChange)==null?void 0:b.call(v,x.target.value)}}),f.jsx(Qt,{fill:!0,...Yt.field})]}),s.actions&&f.jsx("div",{className:ce.toolbarActions,children:typeof s.actions=="function"?s.actions(r):s.actions})]}),n?f.jsx("div",{className:ce.boardScroll,children:f.jsx("div",{className:ce.board,children:n.map(x=>f.jsxs("div",{className:ce.boardColumn,children:[f.jsxs("div",{className:ee(ce.boardColumnHeader,r==="chalkboard"&&ce.chalkboard,x.accent&&o3[x.accent]),children:[f.jsx("span",{className:ce.boardColumnLabel,children:x.label}),f.jsx("span",{className:ce.boardColumnCount,children:x.items.length})]}),f.jsx("div",{className:ce.boardColumnBody,children:x.items.length===0?f.jsx("div",{className:ce.boardEmpty,children:x.emptyLabel??"empty"}):x.items.map((v,b)=>f.jsx("div",{className:ee(ce.boardRow,r==="chalkboard"&&ce.chalkboard),children:x.renderItem(v,b,r)},x.getKey?x.getKey(v,b):b))})]},x.key))})}):f.jsx("div",{className:ce.tableScroll,children:f.jsxs("table",{className:ee(ce.table,r==="chalkboard"&&ce.chalkboard),children:[f.jsxs("colgroup",{children:[w&&f.jsx("col",{style:{width:"48px"}}),t.map(x=>f.jsx("col",{style:x.width?{width:`${x.width*32}px`}:void 0},x.key))]}),f.jsx("thead",{children:f.jsxs("tr",{children:[w&&f.jsx("th",{className:ee(ce.th,ce.expandTh),"aria-label":"Expand"}),t.map(x=>f.jsx("th",{className:ce.th,children:x.header},x.key))]})}),f.jsx("tbody",{children:e.map((x,v)=>{const b=l?l(x,v):v,S=o==null?void 0:o.render(x,v,r),C=!!S,E=C&&p.has(b);return f.jsxs(_.Fragment,{children:[f.jsxs("tr",{className:ee(ce.tr,C&&ce.expandable,c==null?void 0:c(x,v)),onClick:()=>C&&y(b),children:[w&&f.jsx("td",{className:ee(ce.td,ce.expandTd),children:C&&f.jsx("button",{type:"button",className:ce.expandIcon,"aria-expanded":E,"aria-label":E?"Collapse row":"Expand row",onClick:j=>{j.stopPropagation(),y(b)},children:f.jsx(I_,{size:14})})}),t.map(j=>f.jsx("td",{className:ce.td,children:j.cell(x,v,r)},j.key))]}),E&&f.jsx("tr",{className:ce.expandedRow,children:f.jsx("td",{colSpan:g,className:ce.expandedCell,children:S})})]},b)})})]})})]})]})}function a3({className:e}){return f.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:[f.jsx("circle",{cx:"11",cy:"11",r:"8"}),f.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}const l3="card-module__borderLayer___WSpJq",c3="card-module__elevated___uhWj9",u3="card-module__textureLayer___Kcofz",d3="card-module__small___HXUTr",f3="card-module__withAccent___2t7bV",h3="card-module__accentBlue___a1KIq",p3="card-module__accentGreen___RNWoA",m3="card-module__accentAmber___uMhom",g3="card-module__accentRose___VPI3t",y3="card-module__accentSlate___-l4jE",x3="card-module__chalkboard___bQ48O",_i={borderLayer:l3,default:"card-module__default___glPy-",elevated:c3,textureLayer:u3,small:d3,withAccent:f3,accentBlue:h3,accentGreen:p3,accentAmber:m3,accentRose:g3,accentSlate:y3,chalkboard:x3},v3=$m(_i);function Ve({children:e,variant:t="default",surface:n="paper",size:r="medium",texture:i="parchment",accent:s=!1,accentColor:o="blue",className:a}){return f.jsxs("div",{className:ee(_i.borderLayer,_i[t],n==="chalkboard"&&_i.chalkboard,_i[r],s&&_i.withAccent,s&&v3[o],a),children:[f.jsx(Qt,{clip:!0,...Yt.surface}),f.jsx("div",{className:_i.textureLayer,style:n==="chalkboard"?void 0:Qi(i),children:e})]})}const w3="input-module__wrapper___xaEw6",b3="input-module__label___lu7R1",k3="input-module__field___khFpX",_3="input-module__input___h7K-F",S3="input-module__small___SkByh",C3="input-module__medium___0QPuV",P3="input-module__large___zGwRu",j3="input-module__error___QDqga",E3="input-module__disabled___K-5hi",T3="input-module__helperText___njeLH",R3="input-module__helperError___qDBpD",L3="input-module__chalkboard___Xh-5s",In={wrapper:w3,label:b3,field:k3,input:_3,small:S3,medium:C3,large:P3,error:j3,disabled:E3,helperText:T3,helperError:R3,chalkboard:L3},Rn=_.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a},l){const c=_.useId(),u=o??c;return f.jsxs("div",{className:ee(In.wrapper,i==="chalkboard"&&In.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:u,className:In.label,children:e}),f.jsxs("span",{className:ee(In.field,In[r],n&&In.error,a.disabled&&In.disabled),children:[f.jsx("input",{ref:l,id:u,className:In.input,...a}),f.jsx(Qt,{fill:!0,...Yt.field})]}),t&&f.jsx("span",{className:ee(In.helperText,n&&In.helperError),children:t})]})}),M3="select-module__wrapper___Hc5F3",I3="select-module__label___ay-3s",A3="select-module__nativeSelect___UA2d-",D3="select-module__trigger___xMYHi",N3="select-module__open___w3mbZ",z3="select-module__triggerLabel___ihpER",F3="select-module__placeholder___0VOFP",B3="select-module__small___iU9W9",O3="select-module__chevron___0dCTg",$3="select-module__medium___B-XBN",V3="select-module__large___iII2c",W3="select-module__chevronOpen___cFOYe",U3="select-module__error___P5RBk",H3="select-module__dropdown___Q-uK3",G3="select-module__slideDown___sT374",K3="select-module__options___HmrQ0",Q3="select-module__option___vNnue",Y3="select-module__optionDisabled___ex2zq",q3="select-module__optionSelected___tAFjn",X3="select-module__optionHighlighted___zYQLq",Z3="select-module__helperText___r5gyn",J3="select-module__helperError___ydSPT",ez="select-module__chalkboard___sXBw8",Oe={wrapper:M3,label:I3,nativeSelect:A3,trigger:D3,open:N3,triggerLabel:z3,placeholder:F3,small:B3,chevron:O3,medium:$3,large:V3,chevronOpen:W3,error:U3,dropdown:H3,slideDown:G3,options:K3,option:Q3,optionDisabled:Y3,optionSelected:q3,optionHighlighted:X3,helperText:Z3,helperError:J3,chalkboard:ez};function Is({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",options:s,placeholder:o,value:a,defaultValue:l,onChange:c,name:u,disabled:d=!1,width:h,texture:p=!1,className:m}){const y=_.useId(),[w,g]=_.useState(!1),[x,v]=_.useState(-1),[b,S]=_.useState(l??""),[C,E]=_.useState(null),j=_.useRef(null),L=_.useRef(null),P=a!==void 0,R=P?a:b,I=s.find(k=>k.value===R),F=(I==null?void 0:I.label)??o??"Select...",B=_.useCallback(()=>{if(d)return;g(!0);const k=s.findIndex(V=>V.value===R);v(k>=0?k:0)},[d,s,R]),z=_.useCallback(()=>{g(!1),v(-1)},[]),G=_.useCallback(k=>{var V;k.disabled||(P||S(k.value),c==null||c(k.value),z(),(V=j.current)==null||V.focus())},[P,c,z]),A=_.useCallback(k=>{if(!d)switch(k.key){case"Enter":case" ":k.preventDefault(),w&&x>=0?G(s[x]):B();break;case"Escape":k.preventDefault(),w&&z();break;case"ArrowDown":k.preventDefault(),w?v(V=>{let q=V+1;for(;q<s.length&&s[q].disabled;)q++;return q<s.length?q:V}):B();break;case"ArrowUp":k.preventDefault(),w?v(V=>{let q=V-1;for(;q>=0&&s[q].disabled;)q--;return q>=0?q:V}):B();break;case"Home":if(k.preventDefault(),w){let V=0;for(;V<s.length&&s[V].disabled;)V++;V<s.length&&v(V)}break;case"End":if(k.preventDefault(),w){let V=s.length-1;for(;V>=0&&s[V].disabled;)V--;V>=0&&v(V)}break;case"Tab":w&&z();break}},[d,w,x,s,B,z,G]);_.useEffect(()=>{if(!w)return;const k=V=>{var q,T;const ue=V.target;(q=j.current)!=null&&q.contains(ue)||(T=L.current)!=null&&T.contains(ue)||z()};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[w,z]),_.useEffect(()=>{if(!w||x<0||!L.current)return;const k=L.current.querySelector(`[data-option-index="${x}"]`);k==null||k.scrollIntoView({block:"nearest"})},[w,x]),_.useEffect(()=>{if(!w){E(null);return}const k=()=>{if(!j.current)return;const V=j.current.getBoundingClientRect();if(V.bottom<0||V.top>window.innerHeight){z();return}E(V)};return k(),document.addEventListener("scroll",k,{capture:!0,passive:!0}),window.addEventListener("resize",k,{passive:!0}),()=>{document.removeEventListener("scroll",k,{capture:!0}),window.removeEventListener("resize",k)}},[w,z]);const D=Qi(p),O=D?{"--sketch-fill":D.backgroundColor}:void 0;return f.jsxs("div",{className:ee(Oe.wrapper,i==="chalkboard"&&Oe.chalkboard,m),style:h?{width:typeof h=="number"?`${h}px`:h}:void 0,children:[e&&f.jsx("label",{htmlFor:y,className:Oe.label,children:e}),f.jsxs("select",{id:y,name:u,className:Oe.nativeSelect,value:R,onChange:k=>c==null?void 0:c(k.target.value),disabled:d,"aria-hidden":"true",tabIndex:-1,children:[o&&f.jsx("option",{value:"",children:o}),s.map(k=>f.jsx("option",{value:k.value,disabled:k.disabled,children:k.label},k.value))]}),f.jsxs("button",{ref:j,type:"button",role:"combobox","aria-expanded":w,"aria-haspopup":"listbox","aria-controls":w?`${y}-listbox`:void 0,"aria-activedescendant":w&&x>=0?`${y}-option-${x}`:void 0,className:ee(Oe.trigger,Oe[r],n&&Oe.error,w&&Oe.open,d&&Oe.disabled),onClick:()=>w?z():B(),onKeyDown:A,disabled:d,children:[f.jsx("span",{className:ee(Oe.triggerLabel,!I&&Oe.placeholder),children:F}),f.jsx(tz,{className:ee(Oe.chevron,w&&Oe.chevronOpen)}),f.jsx(Qt,{fill:!0,...Yt.field})]}),w&&C&&Js.createPortal(f.jsxs("div",{ref:L,id:`${y}-listbox`,role:"listbox",tabIndex:-1,className:Oe.dropdown,style:{...O,position:"fixed",top:C.bottom+6,left:C.left,width:C.width},onKeyDown:k=>{var V;k.key==="Escape"&&(k.preventDefault(),z(),(V=j.current)==null||V.focus())},children:[f.jsx(Qt,{fill:!0,...Yt.surface}),f.jsx("div",{className:Oe.options,children:s.map((k,V)=>f.jsx("div",{id:`${y}-option-${V}`,role:"option","aria-selected":k.value===R,tabIndex:-1,"data-option-index":V,className:ee(Oe.option,k.value===R&&Oe.optionSelected,V===x&&Oe.optionHighlighted,k.disabled&&Oe.optionDisabled),onClick:q=>{q.stopPropagation(),G(k)},onMouseEnter:()=>v(V),children:k.label},k.value))})]}),document.body),t&&f.jsx("span",{className:ee(Oe.helperText,n&&Oe.helperError),children:t})]})}function tz({className:e}){return f.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:f.jsx("polyline",{points:"6 9 12 15 18 9"})})}function A_({variant:e}){switch(e){case"info":return f.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:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),f.jsx("circle",{cx:"12",cy:"8",r:"0.5",fill:"currentColor"})]});case"success":return f.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:[f.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),f.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]});case"warning":return f.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:[f.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"}),f.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),f.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]});case"error":return f.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:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),f.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}}const nz="alert-module__alert___j7ZRS",rz="alert-module__surface___IaVgU",iz="alert-module__iconWrapper___kLoxT",sz="alert-module__message___klR2U",oz="alert-module__dismiss___f2uoG",az="alert-module__info___PBo1l",lz="alert-module__success___AVBKS",cz="alert-module__warning___zkMaJ",uz="alert-module__error___cxg96",dz="alert-module__chalkboard___7pgWk",gi={alert:nz,surface:rz,iconWrapper:iz,message:sz,dismiss:oz,info:az,success:lz,warning:cz,error:uz,chalkboard:dz};function Vr({children:e,variant:t="info",surface:n="paper",texture:r="kraft",dismissible:i=!1,onDismiss:s,className:o}){const a=n==="chalkboard";return f.jsxs("div",{className:ee(gi.alert,gi[t],a&&gi.chalkboard,o),role:t==="warning"||t==="error"?"alert":"status",children:[f.jsx(Qt,{clip:!0,...Yt.surface}),f.jsx("div",{className:gi.surface,style:a?void 0:Qi(r)}),f.jsx("span",{className:gi.iconWrapper,children:f.jsx(A_,{variant:t})}),f.jsx("div",{className:gi.message,children:e}),i&&f.jsx("button",{type:"button",className:gi.dismiss,onClick:s,"aria-label":"Dismiss alert",children:f.jsx(oo,{size:16})})]})}const fz="modal-module__overlay___a52Ni",hz="modal-module__fadeIn___5OWd5",pz="modal-module__backdrop___RS4yj",mz="modal-module__modal___ZioOV",gz="modal-module__slideUp___vfFrm",yz="modal-module__small___hcxwF",xz="modal-module__medium___mjbM5",vz="modal-module__large___1dzyf",wz="modal-module__header___iP09B",bz="modal-module__title___nj06m",kz="modal-module__close___gQou9",_z="modal-module__body___Y-EdA",Sz="modal-module__chalkboard___qY8qo",er={overlay:fz,fadeIn:hz,backdrop:pz,modal:mz,slideUp:gz,small:yz,medium:xz,large:vz,header:wz,title:bz,close:kz,body:_z,chalkboard:Sz},Cz='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function ao({open:e,onClose:t,title:n,children:r,size:i="medium",surface:s="paper",texture:o=!1,className:a}){const l=_.useId(),c=_.useRef(null),u=_.useRef(null);if(Bm(e,t),_.useEffect(()=>{var h;if(!e)return;u.current=document.activeElement,(h=c.current)==null||h.focus();const p=y=>{var w;if(y.key!=="Tab")return;const g=(w=c.current)==null?void 0:w.querySelectorAll(Cz);if(!g||g.length===0){y.preventDefault();return}const x=g[0],v=g[g.length-1];y.shiftKey&&document.activeElement===x?(y.preventDefault(),v.focus()):!y.shiftKey&&document.activeElement===v&&(y.preventDefault(),x.focus())};document.addEventListener("keydown",p);const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{var y,w;document.removeEventListener("keydown",p),document.body.style.overflow=m,(w=(y=u.current)==null?void 0:y.focus)==null||w.call(y)}},[e]),!e||typeof document>"u")return null;const d=Qi(o);return Js.createPortal(f.jsxs("div",{className:er.overlay,children:[f.jsx("button",{type:"button",className:er.backdrop,"aria-label":"Close modal",onClick:t}),f.jsxs("div",{ref:c,className:ee(er.modal,er[i],s==="chalkboard"&&er.chalkboard,a),style:d,role:"dialog","aria-modal":"true","aria-labelledby":n?l:void 0,tabIndex:-1,children:[f.jsxs("div",{className:er.header,children:[n&&f.jsx("h2",{id:l,className:er.title,children:n}),f.jsx("button",{type:"button",className:er.close,onClick:t,"aria-label":"Close modal",children:f.jsx(oo,{size:18})})]}),f.jsx("div",{className:er.body,children:r})]})]}),document.body)}const Pz="textarea-module__wrapper___NbiNO",jz="textarea-module__label___ejhyZ",Ez="textarea-module__field___KluQf",Tz="textarea-module__textarea___0y-7v",Rz="textarea-module__resizeGrip___lONlE",Lz="textarea-module__small___yPyr8",Mz="textarea-module__medium___ezQxA",Iz="textarea-module__large___xfeKi",Az="textarea-module__error___EkXKJ",Dz="textarea-module__disabled___9CKbb",Nz="textarea-module__helperText___l1sPh",zz="textarea-module__helperError___VfTLy",Fz="textarea-module__chalkboard___zZ0X0",wn={wrapper:Pz,label:jz,field:Ez,textarea:Tz,resizeGrip:Rz,small:Lz,medium:Mz,large:Iz,error:Az,disabled:Dz,helperText:Nz,helperError:zz,chalkboard:Fz},Bz=48,lo=_.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a},l){const c=_.useId(),u=o??c,d=_.useRef(null),h=_.useCallback(m=>{d.current=m,typeof l=="function"?l(m):l&&(l.current=m)},[l]),p=_.useCallback(m=>{const y=d.current;if(!y)return;m.preventDefault();const w=m.clientY,g=y.offsetHeight,x=b=>{y.style.height=`${Math.max(Bz,g+b.clientY-w)}px`},v=()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",v)};window.addEventListener("pointermove",x),window.addEventListener("pointerup",v)},[]);return f.jsxs("div",{className:ee(wn.wrapper,i==="chalkboard"&&wn.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:u,className:wn.label,children:e}),f.jsxs("span",{className:ee(wn.field,wn[r],n&&wn.error,a.disabled&&wn.disabled),children:[f.jsx("textarea",{ref:h,id:u,className:wn.textarea,...a}),f.jsx(Qt,{fill:!0,...Yt.field}),!a.disabled&&f.jsx("span",{className:wn.resizeGrip,onPointerDown:p,"aria-hidden":"true",title:"Drag to resize",children:f.jsxs("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:[f.jsx("path",{d:"M11 4.5 L4.5 11"}),f.jsx("path",{d:"M11 8.5 L8.5 11"})]})})]}),t&&f.jsx("span",{className:ee(wn.helperText,n&&wn.helperError),children:t})]})}),Oz="progress-module__track___a5BMO",$z="progress-module__svg___3U0-E",C0={track:Oz,svg:$z},Qd=300,Sr=1;function Vz({value:e,max:t=100,color:n,height:r=6,surface:i="paper",className:s}){const o=t>0?Math.max(0,Math.min(100,Math.round(e/t*100))):0,a=i==="chalkboard",l=Math.max(1,Math.round(Nu()*1e6)),c=a?ft(ge.chalkboardBorderBase,.16):ft(ge.textPrimary,.12),u=n??(a?ge.chalkboardChalk:ge.textSecondary),d=_.useMemo(()=>Ze.toPaths(Ze.rectangle(Sr,Sr,Qd-Sr*2,r-Sr*2,{seed:l,roughness:2.2,fill:c,fillStyle:"solid",stroke:c,strokeWidth:1.5})),[l,c,r]),h=Math.max(o/100*(Qd-Sr*2),0),p=_.useMemo(()=>h>0?Ze.toPaths(Ze.rectangle(Sr,Sr,h,r-Sr*2,{seed:l+1,roughness:2,fill:u,fillStyle:"solid",stroke:u,strokeWidth:1})):[],[l,u,h,r]);return f.jsx("div",{className:ee(C0.track,s),style:{height:r,borderRadius:r/2},children:f.jsxs("svg",{className:C0.svg,viewBox:`0 0 ${Qd} ${r}`,preserveAspectRatio:"none","aria-hidden":"true",children:[d.map((m,y)=>f.jsx("path",{d:m.d,stroke:m.stroke,strokeWidth:m.strokeWidth,fill:m.fill},y)),p.map((m,y)=>f.jsx("path",{d:m.d,stroke:m.stroke,strokeWidth:m.strokeWidth,fill:m.fill},y))]})})}function Wz(e){const t=Nu();return _.useMemo(()=>({blob:bA({seed:t,wobble:e}),ring:kA(t,e)}),[t,e])}const Uz="list-item-module__listItem___-tw9O",Hz="list-item-module__clickable___GLJmd",Gz="list-item-module__blobBg___O3Mzh",Kz="list-item-module__blobFill___dXHk1",Qz="list-item-module__blobRing___S9mas",Yz="list-item-module__active___UsL8O",qz="list-item-module__small___9dphK",Xz="list-item-module__medium___yGZCr",Zz="list-item-module__icon___2b4wU",Jz="list-item-module__label___SIzJ4",eF="list-item-module__action___qGh0-",tF="list-item-module__chalkboard___qpWuM",nn={listItem:Uz,static:"list-item-module__static___qtEX6",clickable:Hz,blobBg:Gz,blobFill:Kz,blobRing:Qz,active:Yz,small:qz,medium:Xz,icon:Zz,label:Jz,action:eF,chalkboard:tF};function Cn({active:e=!1,icon:t,action:n,size:r="medium",wobble:i=.5,surface:s="paper",children:o,className:a,...l}){const c=Wz(i),u=!!l.onClick;return f.jsxs("button",{type:"button",className:ee(nn.listItem,nn[r],u&&nn.clickable,!u&&!e&&nn.static,e&&nn.active,s==="chalkboard"&&nn.chalkboard,a),"aria-current":e?"page":void 0,...l,children:[f.jsxs("svg",{className:nn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:c.blob,className:nn.blobFill}),f.jsx("path",{d:c.ring,className:nn.blobRing})]}),t&&f.jsx("span",{className:nn.icon,children:t}),f.jsx("span",{className:nn.label,children:o}),n&&f.jsx("span",{className:nn.action,children:n})]})}const nF="accordion-module__accordion___mqGl-",rF="accordion-module__header___mLfbd",iF="accordion-module__icon___Z90NR",sF="accordion-module__title___HusgG",oF="accordion-module__content___1K0td",aF="accordion-module__chalkboard___am8r4",lF="accordion-module__expanded___836xG",yi={accordion:nF,header:rF,icon:iF,title:sF,content:oF,chalkboard:aF,expanded:lF};function P0({title:e,children:t,expanded:n=!1,onToggle:r,surface:i="paper",className:s}){return f.jsxs("div",{className:ee(yi.accordion,n&&yi.expanded,i==="chalkboard"&&yi.chalkboard,s),children:[f.jsxs("button",{type:"button",className:yi.header,onClick:r,"aria-expanded":n,children:[f.jsx("span",{className:yi.icon,"aria-hidden":"true",children:f.jsx(I_,{size:14})}),f.jsx("span",{className:yi.title,children:e})]}),n&&f.jsx("div",{className:yi.content,children:t})]})}const cF="icon-module__icon___2vrJz",uF="icon-module__blobBg___ENPYJ",dF="icon-module__blobFill___IPbwQ",fF="icon-module__blobRing___1awqV",hF="icon-module__content___TaZR6",pF="icon-module__small___Xp--F",mF="icon-module__medium___tCjMB",gF="icon-module__large___vBtP7",ts={icon:cF,blobBg:uF,blobFill:dF,blobRing:fF,content:hF,small:pF,medium:mF,large:gF},yF={small:20,medium:24,large:28};function xF({icon:e,size:t="medium",wobble:n=.5,fillColor:r,className:i}){const s=so(n),o=yF[t];return f.jsxs("span",{className:ee(ts.icon,ts[t],i),children:[f.jsxs("svg",{className:ts.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:s.blob,className:ts.blobFill,style:r?{fill:r}:void 0}),f.jsx("path",{d:s.ring,className:ts.blobRing})]}),f.jsx("span",{className:ts.content,style:{width:o,height:o},children:e})]})}const vF="radio-module__wrapper___BB05E",wF="radio-module__blobFill___p5BX4",bF="radio-module__labelLeft___ijB93",kF="radio-module__input___M2nFJ",_F="radio-module__box___H7ofS",SF="radio-module__dot___jVJ-d",CF="radio-module__boxWrapper___Y3qis",PF="radio-module__blobBg___IR-M5",jF="radio-module__labelText___I-nu3",EF="radio-module__chalkboard___IIBqI",An={wrapper:vF,blobFill:wF,labelLeft:bF,input:kF,box:_F,dot:SF,boxWrapper:CF,blobBg:PF,labelText:jF,chalkboard:EF};_.forwardRef(function({label:e,labelPosition:t="right",wobble:n=.4,surface:r="paper",className:i,checked:s,onChange:o,id:a,...l},c){const u=_.useId(),d=a??u,h=so(n);return f.jsxs("label",{className:ee(An.wrapper,t==="left"&&An.labelLeft,r==="chalkboard"&&An.chalkboard,i),htmlFor:d,children:[f.jsxs("span",{className:An.boxWrapper,children:[f.jsx("input",{ref:c,id:d,type:"radio",className:An.input,checked:s,onChange:o,...l}),f.jsx("svg",{className:An.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("path",{d:h.blob,className:An.blobFill})}),f.jsxs("span",{className:An.box,"aria-hidden":"true",children:[f.jsx(Qt,{smooth:!0,shape:"circle",...Yt.control}),f.jsx("span",{className:An.dot})]})]}),e&&f.jsx("span",{className:An.labelText,children:e})]})});const TF="switch-module__wrapper___5-2P1",RF="switch-module__labelLeft___WlT-N",LF="switch-module__input___YKZRj",MF="switch-module__track___QNvnO",IF="switch-module__thumb___cunvF",AF="switch-module__small___WPIxc",DF="switch-module__medium___yPulW",NF="switch-module__large___VlKV1",zF="switch-module__labelText___9Qg39",FF="switch-module__chalkboard___qKTMz",Cr={wrapper:TF,labelLeft:RF,input:LF,track:MF,thumb:IF,small:AF,medium:DF,large:NF,labelText:zF,chalkboard:FF},BF=_.forwardRef(function({label:e,labelPosition:t="right",size:n="medium",surface:r="paper",className:i,checked:s,onChange:o,id:a,...l},c){const u=_.useId(),d=a??u;return f.jsxs("label",{className:ee(Cr.wrapper,Cr[n],t==="left"&&Cr.labelLeft,r==="chalkboard"&&Cr.chalkboard,i),htmlFor:d,children:[f.jsx("input",{ref:c,id:d,type:"checkbox",className:Cr.input,checked:s,onChange:o,...l}),f.jsxs("span",{className:Cr.track,"aria-hidden":"true",children:[f.jsx(Qt,{...Yt.pill}),f.jsx("span",{className:Cr.thumb})]}),e&&f.jsx("span",{className:Cr.labelText,children:e})]})}),OF="spinner-module__spinner___FDTk2",$F="spinner-module__chalkboard___DLE1z",VF="spinner-module__svg___JnCWN",WF="spinner-module__track___xbnbo",UF="spinner-module__head___j5dWe",Lo={spinner:OF,chalkboard:$F,svg:VF,track:WF,head:UF},HF={small:18,medium:28,large:40},j0=25,GF=18,E0=Ze.toPaths(Ze.circle(j0,j0,GF*2,{seed:7,roughness:1.15,disableMultiStroke:!0})).map(e=>e.d).join(" ");function Uh({size:e="medium",color:t,label:n="Loading",surface:r="paper",className:i}){const s=HF[e];return f.jsx("span",{className:ee(Lo.spinner,r==="chalkboard"&&Lo.chalkboard,i),role:"status","aria-label":n,children:f.jsxs("svg",{width:s,height:s,viewBox:"0 0 50 50",className:Lo.svg,style:t?{color:t}:void 0,"aria-hidden":"true",children:[f.jsx("path",{className:Lo.track,d:E0,fill:"none",pathLength:100,strokeLinecap:"round"}),f.jsx("path",{className:Lo.head,d:E0,fill:"none",pathLength:100,strokeLinecap:"round"})]})})}const KF="skeleton-module__skeleton___HCSvg",QF="skeleton-module__pulse___6eCq1",YF="skeleton-module__svg___OzxGp",qF="skeleton-module__text___v17Nv",XF="skeleton-module__rect___wqIJy",ZF="skeleton-module__circle___RCmyR",Yd={skeleton:KF,pulse:QF,svg:YF,text:qF,rect:XF,circle:ZF},T0={text:[0,0,200,24],rect:[0,0,200,100],circle:[0,0,40,40]},ns=2;function Dn({variant:e="text",width:t,height:n,surface:r="paper",className:i,style:s}){const o=r==="chalkboard",a=Math.max(1,Math.round(Nu()*1e6)),l=o?ft(ge.chalkboardBorderBase,.16):ft(ge.textPrimary,.09),c=_.useMemo(()=>{const[,,u,d]=T0[e],h=e==="circle"?Ze.ellipse(u/2,d/2,u-ns*2,d-ns*2,{seed:a,roughness:1.5,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1}):Ze.rectangle(ns,ns,u-ns*2,d-ns*2,{seed:a,roughness:1.4,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1});return Ze.toPaths(h)},[e,a,l]);return f.jsx("span",{className:ee(Yd.skeleton,Yd[e],i),style:{width:t,height:n,...s},"aria-hidden":"true",children:f.jsx("svg",{className:Yd.svg,viewBox:T0[e].join(" "),preserveAspectRatio:"none","aria-hidden":"true",children:c.map((u,d)=>f.jsx("path",{d:u.d,stroke:u.stroke,strokeWidth:u.strokeWidth,fill:u.fill},d))})})}const JF="divider-module__horizontal___tP3rG",eB="divider-module__line___KnBes",tB="divider-module__label___WiUwZ",nB="divider-module__vertical___wBSrT",rB="divider-module__chalkboard___gXTde",rs={horizontal:JF,line:eB,label:tB,vertical:nB,chalkboard:rB};function As({orientation:e="horizontal",label:t,surface:n="paper",className:r}){const i=n==="chalkboard"&&rs.chalkboard;return e==="vertical"?f.jsx("span",{className:ee(rs.vertical,i,r),role:"separator","aria-orientation":"vertical"}):f.jsxs("div",{className:ee(rs.horizontal,i,r),role:"separator",children:[f.jsx("span",{className:rs.line}),t!=null&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:rs.label,children:t}),f.jsx("span",{className:rs.line})]})]})}const iB="tooltip-module__wrapper___XeVNe",sB="tooltip-module__tooltip___e-rkz",oB="tooltip-module__tooltipIn___CZbRw",aB="tooltip-module__top___78WWU",lB="tooltip-module__bottom___Irl3O",cB="tooltip-module__left___C1Ec4",uB="tooltip-module__right___oUA-Z",dB="tooltip-module__chalkboard___Um6dx",_l={wrapper:iB,tooltip:sB,tooltipIn:oB,top:aB,bottom:lB,left:cB,right:uB,chalkboard:dB},Sl=8,Cl=8,fB=typeof window>"u"?_.useEffect:_.useLayoutEffect;function hB(e,t,n){let r,i;switch(t){case"bottom":r=e.bottom+Sl,i=e.left+e.width/2-n.width/2;break;case"left":r=e.top+e.height/2-n.height/2,i=e.left-Sl-n.width;break;case"right":r=e.top+e.height/2-n.height/2,i=e.right+Sl;break;default:r=e.top-Sl-n.height,i=e.left+e.width/2-n.width/2}return i=Math.min(Math.max(i,Cl),window.innerWidth-n.width-Cl),r=Math.min(Math.max(r,Cl),window.innerHeight-n.height-Cl),{top:r,left:i}}function hn({content:e,children:t,placement:n="top",delay:r=300,disabled:i=!1,surface:s="paper"}){const o=_.useId(),[a,l]=_.useState(!1),[c,u]=_.useState(!1),[d,h]=_.useState(!1),[p,m]=_.useState(null),[y,w]=_.useState(null),g=_.useRef(null),x=_.useRef(null),v=_.useRef(),b=!i&&!!e&&!d&&(a||c),S=()=>{clearTimeout(v.current),v.current=setTimeout(()=>l(!0),r)},C=()=>{clearTimeout(v.current),l(!1),h(!1)},E=()=>{h(!1),u(!0)},j=()=>{u(!1),h(!1)};Bm(b,()=>h(!0)),_.useEffect(()=>{if(!b){m(null);return}const P=()=>{g.current&&m(g.current.getBoundingClientRect())};return P(),window.addEventListener("scroll",P,{capture:!0,passive:!0}),window.addEventListener("resize",P,{passive:!0}),()=>{window.removeEventListener("scroll",P,{capture:!0}),window.removeEventListener("resize",P)}},[b]),fB(()=>{if(!b){w(null);return}const P=x.current;P&&w({width:P.offsetWidth,height:P.offsetHeight})},[b,e,n]),_.useEffect(()=>()=>clearTimeout(v.current),[]);const L=t.props;return f.jsxs("span",{ref:g,className:_l.wrapper,onMouseEnter:S,onMouseLeave:C,onFocus:E,onBlur:j,children:[_.cloneElement(t,{"aria-describedby":b?o:L["aria-describedby"]}),b&&p&&typeof document<"u"&&Js.createPortal(f.jsx("span",{ref:x,id:o,role:"tooltip",className:ee(_l.tooltip,_l[n],s==="chalkboard"&&_l.chalkboard),style:y?{position:"fixed",...hB(p,n,y)}:{position:"fixed",top:0,left:0,visibility:"hidden"},children:e}),document.body)]})}const pB="toast-module__stack___hDi0s",mB="toast-module__topLeft___Luw-F",gB="toast-module__topCenter___N1DwF",yB="toast-module__topRight___Dtgau",xB="toast-module__bottomLeft___Eb2lo",vB="toast-module__bottomCenter___gs-Yb",wB="toast-module__bottomRight___-0e2j",bB="toast-module__item___RFjtm",kB="toast-module__toastIn___9m9iN",_B="toast-module__card___ZCvJS",SB="toast-module__surface___mfMl0",CB="toast-module__iconWrapper___lnjcC",PB="toast-module__content___AlliM",jB="toast-module__title___1Oqh8",EB="toast-module__description___eiUSB",TB="toast-module__dismiss___tUGx4",RB="toast-module__info___Nh8S9",LB="toast-module__success___hlKLc",MB="toast-module__warning___XUMJt",IB="toast-module__error___pSFFC",AB="toast-module__chalkboard___c49gt",sn={stack:pB,topLeft:mB,topCenter:gB,topRight:yB,bottomLeft:xB,bottomCenter:vB,bottomRight:wB,item:bB,toastIn:kB,card:_B,surface:SB,iconWrapper:CB,content:PB,title:jB,description:EB,dismiss:TB,info:RB,success:LB,warning:MB,error:IB,chalkboard:AB};function DB({record:e,surface:t="paper",onDismiss:n}){const r=_.useRef(e.duration),i=_.useRef(0),s=_.useRef(),o=_.useCallback(d=>{clearTimeout(s.current),!(d<=0)&&(i.current=Date.now(),s.current=setTimeout(()=>n(e.id),d))},[n,e.id]);_.useEffect(()=>(o(e.duration),()=>clearTimeout(s.current)),[o,e.duration]);const a=()=>{s.current&&(clearTimeout(s.current),r.current-=Date.now()-i.current)},l=()=>o(r.current),c=t==="chalkboard",u=e.variant==="warning"||e.variant==="error"?"alert":"status";return f.jsx("div",{className:sn.item,onMouseEnter:a,onMouseLeave:l,children:f.jsxs("div",{className:ee(sn.card,sn[e.variant],c&&sn.chalkboard),role:u,children:[f.jsx(Qt,{clip:!0,...Yt.surface}),f.jsx("div",{className:sn.surface,style:c?void 0:Qi("kraft")}),f.jsx("span",{className:sn.iconWrapper,children:f.jsx(A_,{variant:e.variant})}),f.jsxs("div",{className:sn.content,children:[e.title&&f.jsx("div",{className:sn.title,children:e.title}),f.jsx("div",{className:sn.description,children:e.description})]}),f.jsx("button",{type:"button",className:sn.dismiss,onClick:()=>n(e.id),"aria-label":"Dismiss notification",children:f.jsx(oo,{size:16})})]})})}const D_=_.createContext(null);function NB(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function zB({children:e,position:t="bottom-right",surface:n="paper",defaultDuration:r=5e3}){const[i,s]=_.useState([]),o=_.useRef(0),a=_.useCallback(u=>{s(d=>d.filter(h=>h.id!==u))},[]),l=_.useCallback(u=>{o.current+=1;const d=`toast-${o.current}`;return s(h=>[...h,{id:d,title:u.title,description:u.description,variant:u.variant??"info",duration:u.duration??r}]),d},[r]),c=t.startsWith("top")?[...i].reverse():i;return f.jsxs(D_.Provider,{value:{toast:l,dismiss:a},children:[e,typeof document<"u"&&Js.createPortal(f.jsx("div",{className:ee(sn.stack,sn[NB(t)]),role:"region","aria-label":"Notifications",children:c.map(u=>f.jsx(DB,{record:u,surface:n,onDismiss:a},u.id))}),document.body)]})}function ci(){const e=_.useContext(D_);if(!e)throw new Error("useToast must be used within a <ToastProvider>");return e}const FB="breadcrumb-module__breadcrumb___r-ILp",BB="breadcrumb-module__list___V3YFy",OB="breadcrumb-module__item___dDwYf",$B="breadcrumb-module__link___CHC9k",VB="breadcrumb-module__linkButton___XoMW-",WB="breadcrumb-module__current___dprI9",UB="breadcrumb-module__separator___uLhtn",HB="breadcrumb-module__chalkboard___COJpw",Nn={breadcrumb:FB,list:BB,item:OB,link:$B,linkButton:VB,current:WB,static:"breadcrumb-module__static___affaf",separator:UB,chalkboard:HB};function Hh({items:e,surface:t="paper",className:n}){return f.jsx("nav",{"aria-label":"Breadcrumb",className:ee(Nn.breadcrumb,t==="chalkboard"&&Nn.chalkboard,n),children:f.jsx("ol",{className:Nn.list,children:e.map((r,i)=>{const s=i===e.length-1;return f.jsxs("li",{className:Nn.item,children:[s?f.jsx("span",{className:Nn.current,"aria-current":"page",children:r.label}):r.href?f.jsx("a",{href:r.href,className:Nn.link,onClick:r.onClick,children:r.label}):r.onClick?f.jsx("button",{type:"button",className:ee(Nn.link,Nn.linkButton),onClick:r.onClick,children:r.label}):f.jsx("span",{className:Nn.static,children:r.label}),!s&&f.jsx(GB,{className:Nn.separator})]},r.id)})})})}function GB({className:e}){return f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:f.jsx("polyline",{points:"9 18 15 12 9 6"})})}function N_(){const[e,t]=_.useState("idle"),[n,r]=_.useState(null),i=_.useRef(null),s=_.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=_.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 KB=["idea","planned","in-progress","review","done","dropped"],QB=["feat","fix","chore","docs","refactor"],z_=["claude-code","opencode"],Wm={"claude-code":"Claude Code",opencode:"OpenCode"},qd={"claude-code":{model:["opus","sonnet","fable","haiku"],effort:["low","medium","high","xhigh","max"]},opencode:{model:null}},Mo={phase:{agent:"opencode"},planDraft:{agent:"claude-code"},ideaExtend:{agent:"claude-code"},commitSuggest:{agent:"claude-code"}},tu=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`},F_=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)}},R0=e=>e.phases.length===0?null:Math.round(e.phases.filter(t=>t.done).length/e.phases.length*100),YB=(e,t)=>{if(e)return e.find(n=>n.status==="in-progress"||n.status==="review")},qB=["in-progress","review","planned","idea"],XB=["open"],Um={statuses:qB,tags:[],search:"",sortKey:"status",sortDirection:"asc",noteStatuses:XB},L0={"in-progress":0,review:1,planned:2,idea:3,done:4,dropped:5},Pl=e=>{const t=new Date(e.updated??e.created).getTime();return Number.isNaN(t)?0:t},M0=e=>{var n;const t=(n=e.id)==null?void 0:n.match(/(\d+)\s*$/);return t?Number(t[1]):Number.POSITIVE_INFINITY},Xd=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},I0=(e,t)=>t.size===0?!0:e.tags.some(n=>t.has(n)),Hm=(e,t,n)=>{switch(n){case"status":{const r=L0[e.status]-L0[t.status];return r!==0?r:Pl(t)-Pl(e)}case"updated":return Pl(t)-Pl(e);case"created":return new Date(t.created).getTime()-new Date(e.created).getTime();case"title":return e.title.localeCompare(t.title);case"id":return M0(e)-M0(t);case"progress":return(R0(t)??-1)-(R0(e)??-1);default:return 0}},Gh=(e,t)=>{const n={};for(const r of e)for(const i of t(r))n[String(i)]=(n[String(i)]??0)+1;return n},ac=(e,t=Um)=>{const n=new Set(t.tags),r=new Set(t.statuses),i=Gh(e.filter(a=>I0(a,n)&&Xd(a,t.search)),a=>[a.status]);for(const a of KB)i[a]??(i[a]=0);const s=Gh(e.filter(a=>r.has(a.status)&&Xd(a,t.search)),a=>a.tags);return{rows:e.filter(a=>r.has(a.status)&&I0(a,n)&&Xd(a,t.search)).sort((a,l)=>{const c=Hm(a,l,t.sortKey);return t.sortDirection==="desc"?-c:c}),statusCounts:i,tagCounts:s}},ZB=["open","done","dropped"],JB={open:"idea",done:"done",dropped:"dropped"},Zd=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},A0=e=>e.type==="plan"?e.plan:e.type==="note"?{title:e.idea.title,id:e.idea.id??void 0,status:JB[e.idea.status??"open"],created:"",tags:[],body:e.idea.body,phases:[]}:{...(e.children.length>0?[...e.children].sort((n,r)=>Hm(n,r,"status"))[0]:void 0)??{status:"idea",created:"",tags:[],body:e.idea.body,phases:[]},title:e.idea.title,id:e.idea.id??void 0},eO=(e,t,n=Um)=>{const{statusCounts:r,tagCounts:i}=ac(e,n),s=t.filter(p=>p.kind==="note"),o=t.filter(p=>p.kind!=="note"),a=new Set(o.map(p=>p.id).filter(p=>!!p)),l=new Map,c=[];for(const p of e)if(p.idea&&a.has(p.idea)){const m=l.get(p.idea)??[];m.push(p),l.set(p.idea,m)}else c.push(p);const u=new Set(n.noteStatuses),d=Gh(s.filter(p=>Zd(p,n.search)),p=>[p.status??"open"]);for(const p of ZB)d[p]??(d[p]=0);const h=ac(c,n).rows.map(p=>({type:"plan",plan:p}));for(const p of o){const m=p.id?l.get(p.id)??[]:[],y=ac(m,n).rows;y.length===0&&(m.length>0||!Zd(p,n.search))||h.push({type:"idea-group",idea:p,children:y})}for(const p of s)u.has(p.status??"open")&&Zd(p,n.search)&&h.push({type:"note",idea:p});return h.sort((p,m)=>{const y=Hm(A0(p),A0(m),n.sortKey);return n.sortDirection==="desc"?-y:y}),{rows:h,statusCounts:r,tagCounts:i,noteStatusCounts:d}},tO={},D0=e=>{let t;const n=new Set,r=(u,d)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const p=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(m=>m(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(tO?"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()}},c=t=e(r,i,l);return l},nO=e=>e?D0(e):D0,B_={},{useDebugValue:rO}=Ns,{useSyncExternalStoreWithSelector:iO}=GE;let N0=!1;const sO=e=>e;function oO(e,t=sO,n){(B_?"production":void 0)!=="production"&&n&&!N0&&(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"),N0=!0);const r=iO(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return rO(r),r}const z0=e=>{(B_?"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"?nO(e):e,n=(r,i)=>oO(t,r,i);return Object.assign(n,t),n},aO=e=>e?z0(e):z0,lO=async()=>(await fetch("/api/agent/status")).json(),cO=async()=>(await fetch("/api/agent/reconcile-queue")).json(),uO=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)}},dO=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)}},fO=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)}},hO=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)}},pO=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)}},mO=async()=>{const e=await fetch("/api/agent/launch-reconcile-all",{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({error:"Launch failed"}));throw new Error(t.error)}},gO=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)}},yO=async e=>{const t=await fetch("/api/agent/launch-fix-review",{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)}},xO=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)}},vO="modulepreload",wO=function(e){return"/"+e},F0={},bO=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=wO(l),l in F0)return;F0[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":vO,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((h,p)=>{d.addEventListener("load",h),d.addEventListener("error",()=>p(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)})},kO=async()=>(await fetch("/api/decisions")).json(),_O=async()=>(await fetch("/api/open-questions")).json(),SO=async()=>(await fetch("/api/progress")).json(),CO=async()=>(await fetch("/api/docs")).json(),PO=async()=>(await fetch("/api/consistency")).json(),jO=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 bO(async()=>{const{loadDecisions:o,loadOpenQuestions:a}=await Promise.resolve().then(()=>VO);return{loadDecisions:o,loadOpenQuestions:a}},void 0).then(o=>o.useAppStore.getState());return await Promise.all([i(),s()]),r.json()};async function Va(e,t){if(e.ok)return;const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}const EO=async()=>{const e=await fetch("/api/git/status");return await Va(e,"Failed to load git status"),e.json()},TO=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 Va(r,"Commit failed")},RO=async()=>{const e=await fetch("/api/git/push",{method:"POST"});await Va(e,"Push failed")},LO=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 Va(t,"Failed to suggest a commit message"),t.json()},MO=async e=>{const t=await fetch("/api/git/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e})});await Va(t,"Sync failed")},IO=async e=>{const t=await fetch("/api/git/branch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})}),n=await t.json();if(!t.ok)throw new Error(n.error??"Failed to create branch");return n.branch},AO=async()=>(await fetch("/api/ideas")).json(),DO=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},O_=async(e,t)=>{const n=await fetch("/api/ideas/check-overlap",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e,candidates:t})}),r=await n.json();if(!n.ok)throw new Error(r.error??"Failed to check overlap");return r},NO=async()=>(await fetch("/api/plans")).json(),zO=async e=>{await fetch("/api/plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},FO=async e=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"DELETE"})},Wr=async(e,t)=>{const n=await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json().catch(()=>null);throw new Error((r==null?void 0:r.error)??`Failed to update plan (${n.status})`)}},BO=async()=>(await fetch("/api/status")).json(),OO=async e=>{await fetch(`/api/status/check?name=${e}`,{method:"POST"})},$O=async()=>{await fetch("/api/status/fix",{method:"POST"})},K=aO((e,t)=>({plans:null,plansLoading:!1,plansError:null,loadPlans:async()=>{e({plansLoading:!0});try{const n=await NO();e({plans:n,plansError:null,plansLoading:!1})}catch(n){e({plansError:String(n),plansLoading:!1})}},ideaEntries:[],loadIdeas:async()=>{try{const n=await AO();e({ideaEntries:n.entries})}catch{e({ideaEntries:[]})}},planFilters:Um,togglePlanStatus:n=>e(r=>({planFilters:{...r.planFilters,statuses:r.planFilters.statuses.includes(n)?r.planFilters.statuses.filter(i=>i!==n):[...r.planFilters.statuses,n]}})),togglePlanTag:n=>e(r=>({planFilters:{...r.planFilters,tags:r.planFilters.tags.includes(n)?r.planFilters.tags.filter(i=>i!==n):[...r.planFilters.tags,n]}})),toggleNoteStatus:n=>e(r=>({planFilters:{...r.planFilters,noteStatuses:r.planFilters.noteStatuses.includes(n)?r.planFilters.noteStatuses.filter(i=>i!==n):[...r.planFilters.noteStatuses,n]}})),setPlanSearch:n=>e(r=>({planFilters:{...r.planFilters,search:n}})),setPlanSortKey:n=>e(r=>({planFilters:{...r.planFilters,sortKey:n}})),togglePlanSortDirection:()=>e(n=>({planFilters:{...n.planFilters,sortDirection:n.planFilters.sortDirection==="asc"?"desc":"asc"}})),decisions:[],decisionsLoading:!0,loadDecisions:async()=>{e({decisionsLoading:!0});try{const n=await kO();e({decisions:n.entries,decisionsLoading:!1})}catch{e({decisions:[],decisionsLoading:!1})}},openQuestions:[],openQuestionsLoading:!0,loadOpenQuestions:async()=>{e({openQuestionsLoading:!0});try{const n=await _O();e({openQuestions:n.entries,openQuestionsLoading:!1})}catch{e({openQuestions:[],openQuestionsLoading:!1})}},progress:[],progressLoading:!0,loadProgress:async()=>{e({progressLoading:!0});try{const n=await SO();e({progress:n.entries,progressLoading:!1})}catch{e({progress:[],progressLoading:!1})}},repoDocs:[],repoDocsLoading:!0,loadRepoDocs:async()=>{e({repoDocsLoading:!0});try{const n=await CO();e({repoDocs:n.files,repoDocsLoading:!1});const{activeDocTitle:r}=t();if(!r){const i=["MAIN.md","README.md"].find(s=>n.files.some(o=>o.name===s));i&&e({activeDocTitle:i})}}catch{e({repoDocs:[],repoDocsLoading:!1})}},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 BO();e({status:n})}catch{}},runCheck:async n=>{try{await OO(n)}catch{}},fixQuality:async()=>{try{await $O()}catch{}},consistency:[],loadConsistency:async()=>{try{const n=await PO();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 EO();e({gitStatus:r,gitBranch:n,gitAhead:i,gitBranchHygiene:s})}catch{}},agentStatus:null,loadAgentStatus:async()=>{try{const n=await lO();e({agentStatus:n});const r=t().pendingReconcile;if(r&&(n==null?void 0:n.taskKind)==="reconcile"&&n.planId===r.planId&&(n.status==="done"?(await t().loadPlans(),e(i=>({reconcileQueue:[...i.reconcileQueue,r],pendingReconcile:null}))):n.status==="error"&&e({pendingReconcile:null})),(n==null?void 0:n.taskKind)==="batch-reconcile"&&n.status==="done"&&!t().batchReconcileConsumed){const i=await cO();i&&i.length>0&&(await t().loadPlans(),e(s=>({reconcileQueue:[...s.reconcileQueue,...i.map(o=>({planId:o.planId,before:o.before}))]}))),e({batchReconcileConsumed:!0})}}catch{}},launchAgent:async(n,r)=>{await uO(n,r),await t().loadAgentStatus()},launchPlanAudit:async(n,r)=>{await dO(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 fO(n,r)}catch(o){throw e({pendingReconcile:null}),o}await t().loadAgentStatus()},launchPlanDraft:async(n,r)=>{await hO(n,r),await t().loadAgentStatus()},launchIdeaExtend:async(n,r)=>{await pO(n,r),await t().loadAgentStatus()},launchBatchReconcile:async()=>{e({batchReconcileConsumed:!1}),await mO(),await t().loadAgentStatus()},launchRunAll:async n=>{await gO(n),await t().loadAgentStatus()},launchFixReview:async n=>{await yO(n),await t().loadAgentStatus()},stopAgent:async()=>{await xO(),await t().loadAgentStatus()},pendingReconcile:null,reconcileQueue:[],removeFromReconcileQueue:n=>e(r=>({reconcileQueue:r.reconcileQueue.filter(i=>i.planId!==n)})),batchReconcileConsumed:!1})),VO=Object.freeze(Object.defineProperty({__proto__:null,useAppStore:K},Symbol.toStringTag,{value:"Module"})),ie={serif:"'Luminari', 'Cormorant Garamond', Georgia, serif",body:"'Cormorant Garamond', Georgia, serif",handwritten:"'Caveat', cursive",mono:"'JetBrains Mono', monospace"},M={1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem"},X={"2xs":"0.75rem",xs:"0.875rem",sm:"1rem",base:"1.125rem",md:"1.25rem",lg:"1.5rem"},Gt={tight:1.2,normal:1.5,relaxed:1.7},ae={textPrimary:"#1A1917",textSecondary:"#68635C",textTertiary:"#A8A399",accentAmberDark:"#A67B4F",accentGreenDark:"#5E8A66",accentRoseDark:"#9E5E5E",deskBg:"#1e3a2d",deskLight:"#264a3a",deskText:"#e8e4d9",deskTextMuted:"#a8b5a0",deskBorder:"rgba(200, 210, 195, 0.15)",deskChalk:"#d4e8cb"},$_={sidebarWidth:224,stackPanelWidth:480};function WO(e){const t=e.phases.map((i,s)=>`${s+1}. [${i.done?"x":" "}] ${i.text}`).join(`
65
- `),n=e.log&&e.log.length>0?e.log.map(i=>`- ${i.date}: ${i.text}`).join(`
66
- `):"(none)",r=e.clarifications&&e.clarifications.length>0?e.clarifications.map(i=>`- ${i.date}: ${i.text}`).join(`
67
- `):"(none)";return`You are auditing the plan "${e.title}" (${e.id??"no id"}) for missing phases. The plan is a single file at papercamp/ideas/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/ideas/archive/${e.id??"<ID>"}.md. Edit only that file.
68
-
69
- Plan body: ${e.body}
70
-
71
- Current phases:
72
- ${t}
73
-
74
- Log entries (issues, bugs, and review notes recorded so far):
75
- ${n}
76
-
77
- Clarifications (answered scope/design questions):
78
- ${r}
79
-
80
- Task:
81
- 1. Read the plan above, then inspect the relevant code in this repo.
82
- 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.
83
- 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.
84
- 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.
85
-
86
- Rules:
87
- - Never modify, reorder, check, uncheck, or delete any existing line, even if it looks stale, wrong, or redundant.
88
- - Never touch the YAML frontmatter.
89
- - Append only: new unchecked phases at the end of the list, plus the single Log line.`}function UO(e){const t=e.phases.length>0,n=t?"plan":"idea",r=t?e.phases.map((i,s)=>`${s+1}. [${i.done?"x":" "}] ${i.text}`).join(`
90
- `):"(none — this is a backlog idea with no phases yet)";return`You are reconciling the ${n} "${e.title}" (${e.id??"no id"}), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/ideas/archive/${e.id??"<ID>"}.md. Edit only that file.
91
-
92
- ${t?"Plan":"Idea"} body: ${e.body}
93
-
94
- Current phases:
95
- ${r}
96
-
97
- Task: this ${n} has drifted from the codebase — some ${t?"phase descriptions and body prose":"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.
98
-
99
- 1. Read the ${n} above, then inspect the relevant code in this repo to find what has actually changed since the prose was written.
100
- 2. Reword only the sentences or phrases that are now stale: fix references and superseded approaches. Leave everything else byte-identical.
101
- 3. Do not summarize, restructure, or "improve" prose that is still accurate — an unnecessary rewrite is a failure of this task, not a bonus.
102
-
103
- Hard guardrails, never violate these:
104
- - Never touch the YAML frontmatter (id, title, kind, status, created, idea, tags, or any other field).
105
- - Never un-check, check, delete, or reorder any phase line, checked or unchecked.
106
- - Never add or remove phases.
107
- - Never touch the Log or Clarifications sections.
108
- - If nothing is stale, make no edits at all.`}function HO(e){const t=e.log&&e.log.length>0?e.log.map(n=>`- ${n.date}: ${n.text}`).join(`
109
- `):"(none)";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, and within it only the \`### Log\` section.
110
-
111
- Current idea body, in full (do not modify this):
112
- ${e.body}
113
-
114
- Prior Log entries:
115
- ${t}
116
-
117
- Task:
118
- 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.
119
- 2. Write up what you found as a single dated entry — 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.
120
- 3. Append exactly one line to the \`### Log\` section, formatted \`- YYYY-MM-DD: <what you found>\`, creating that section at the end of the file if it does not exist. Use today's date, and keep the entry to that single physical line (no literal line breaks).
121
-
122
- Keep unchanged:
123
- - the YAML frontmatter (id, title)
124
- - the \`## ${e.id??"IDEA-N"}: ${e.title}\` heading line and the original body prose beneath it
125
-
126
- Append only — never rewrite or delete the idea's existing body or prior Log lines.`}function GO(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(`
127
- `);return`### ${i.id??"no id"}: ${i.title} (status: ${i.status}${i.idea?`, idea: ${i.idea}`:""})
128
- ${i.body}
129
- ${s||" (no phases yet)"}`}).join(`
130
-
131
- `):"(no other open plans exist yet)";return`You are drafting a plan for the idea ${e.id??"no id"} ("${e.title}"), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md. The idea and its plan are ONE file: you draft the plan by editing that existing file in place — never create a new file.
132
-
133
- Idea body, in full:
134
- ${e.body}
135
-
136
- ## What drafting adds to the file (see papercamp/about.md)
137
-
138
- The file already has YAML frontmatter (id, title, status, created, …) and the prose body above. Drafting means:
139
-
140
- 1. Add a \`type\` field to the frontmatter: the Conventional Commits type that best fits (\`feat | fix | chore | docs | refactor\` — most are \`feat\`).
141
- 2. Add 1-4 short subsystem \`tags\` to the frontmatter if it has none.
142
- 3. Append a \`### Phases\` checklist at the end of the file (after any \`### Log\` section move it below the phases — Phases, then Log):
143
-
144
- \`\`\`
145
- ### Phases
146
- - [ ] Short phase title
147
- Optional description of the phase, indented with 6 spaces.
148
- \`\`\`
149
-
150
- Hard rules:
151
- - Never change the \`id\`, \`title\`, \`status\`, or \`created\` fields — \`status\` stays exactly \`idea\`; a human promotes it after reviewing your draft (per papercamp/decisions.md, "Plan-drafting agent writes directly, same as phase execution").
152
- - Never rewrite or delete the existing prose body or \`### Log\` entries — the idea's history stays intact.
153
- - Phases: actionable steps a future agent or human could pick up one at a time — match the granularity of the phases in the entities shown below, not one giant phase.
154
-
155
- ## Every other open (non-done) entity, for scope context
156
-
157
- ${r}
158
-
159
- Use the open entities above only to avoid duplicating in-flight scope and to match phase granularity. Edit only papercamp/ideas/${e.id??"<ID>"}.md — never create, edit, move, or rename any other file.`}const zu=({idea:e,otherPlans:t})=>{const n=K(h=>h.launchPlanDraft),r=K(h=>h.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,errorMessage:o,run:a}=N_(),{toast:l}=ci(),c=()=>{const h=e.id;h&&a(async()=>{try{await n(h,GO(e,t))}catch(p){throw l({title:"Draft failed",description:p.message,variant:"error"}),p}})},u=s==="loading"?"Drafting…":s==="success"?"Draft sent!":s==="error"?"Draft failed":"Draft plan",d=s==="error"?o??"Draft failed":e.id?void 0:"Idea needs an ID before an agent can run";return f.jsx(hn,{content:d,children:f.jsx(oe,{variant:"ghost",size:"small",onClick:c,disabled:i||s==="loading"||!e.id,style:{color:s==="error"?ae.accentRoseDark:ae.textSecondary},children:u})})},KO=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}},QO=async e=>{try{return(await fetch("/api/icon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUri:e})})).ok}catch{return!1}},YO=async()=>{try{return(await fetch("/api/package-name")).json()}catch{return null}},qO=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase()),V_=()=>{const[e,t]=_.useState(null),[n,r]=_.useState(null),[i,s]=_.useState(!0);return _.useEffect(()=>{let o=!1;return s(!0),Promise.all([YO().then(a=>{!o&&a&&t(qO(a))}),KO().then(a=>{o||r(a)})]).finally(()=>{o||s(!1)}),()=>{o=!0}},[]),{projectName:e,iconDataUri:n,loading:i}},XO=["decisions","questions","progress","repo-docs"];function Gm(){const{planId:e}=Na({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function ZO(){const{ideaId:e}=Na({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function JO(){const{section:e}=Na({strict:!1});return XO.includes(e)?e:null}function W_(){const e=JO(),t=K(r=>r.activeDocTitle),n=K(r=>r.repoDocs);return e??(t&&n.some(r=>r.name===t)?"repo-docs":null)}const e4=.2,t4=5,U_=3,H_=2,G_=1,n4=U_+H_+G_,r4=new Set(["a","an","the","and","or","of","to","in","on","for","is","at","with","this","that","it","as","be","by","are","was","were","from","into","so","but","not","its"]),jl=e=>{const t=e.toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>=2&&!r4.has(n));return new Set(t)},Jd=(e,t)=>{let n=0;for(const r of e)t.has(r)&&(n+=1);return n};function i4(e,t,n={}){const{threshold:r=e4,limit:i=t4}=n,s=jl(e);if(s.size===0)return[];const o=[];for(const a of t){const l=jl(a.title),c=jl(a.body),u=jl((a.tags??[]).join(" ")),h=(Jd(s,l)*U_+Jd(s,u)*H_+Jd(s,c)*G_)/(s.size*n4);h>=r&&o.push({candidate:a,score:h})}return o.sort((a,l)=>l.score-a.score),o.slice(0,i)}const s4=250;function K_(e,t,n={}){const{debounceMs:r=s4,...i}=n,[s,o]=_.useState(e);_.useEffect(()=>{const c=setTimeout(()=>o(e),r);return()=>clearTimeout(c)},[e,r]);const{threshold:a,limit:l}=i;return _.useMemo(()=>i4(s,t,{threshold:a,limit:l}),[s,t,a,l])}const o4=QB.map(e=>({value:e,label:e})),a4=({open:e,onClose:t,onAdd:n})=>{const[r,i]=_.useState(""),[s,o]=_.useState(""),[a,l]=_.useState("feat"),[c,u]=_.useState(!1),[d,h]=_.useState(null),[p,m]=_.useState(null),[y,w]=_.useState(!1),[g,x]=_.useState(null),[v,b]=_.useState(null),S=K(A=>{var D;return((D=A.plans)==null?void 0:D.entries)??[]}),C=K(A=>A.loadPlans),E=K(A=>A.agentStatus),j=E!==null&&E.status!=="done"&&E.status!=="error",L=gn(),{toast:P}=ci(),R=K_(r,S.map(A=>({id:A.id,title:A.title,body:A.body,tags:A.tags,log:A.log})));_.useEffect(()=>{e&&(i(""),o(""),l("feat"),u(!1),h(null),w(!1),x(null),b(null))},[e]),_.useEffect(()=>{x(null),b(null)},[r,s]);const I=A=>{t(),L({to:"/plans/$planId",params:{planId:encodeURIComponent(A)}})},F=async()=>{const A=`${r.trim()}${s.trim()?`
160
-
161
- ${s.trim()}`:""}`;if(A){w(!0),b(null),x(null);try{const D=S.map(O=>({id:O.id,title:O.title,body:O.body,tags:O.tags}));x(await O_(A,D))}catch(D){b(D.message)}finally{w(!1)}}},B=A=>{const D=S.find(O=>O.id===A);D?I(D.title):P({title:"Plan not found",description:`No plan with id ${A}`,variant:"error"})},z=async(A,D)=>{m(A);try{const k={date:new Date().toISOString().slice(0,10),text:r.trim()};await Wr(A,{log:[...D??[],k]}),await C(),t()}catch(O){P({title:"Extend failed",description:O.message,variant:"error"})}finally{m(null)}},G=async A=>{if(A.preventDefault(),!(!r.trim()||c)){h(null),u(!0);try{await n({title:r.trim(),content:s.trim()||void 0,kind:a}),t()}catch(D){h(D.message)}finally{u(!1)}}};return f.jsx(ao,{open:e,onClose:t,title:"Quick plan",size:"small",children:f.jsxs("form",{onSubmit:G,style:{display:"flex",flexDirection:"column",gap:M[4]},children:[f.jsx(Rn,{label:"Title",value:r,onChange:A=>i(A.target.value),placeholder:"Backlog item title…",disabled:c,autoFocus:!0,required:!0}),R.length>0&&f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[2]},children:[f.jsx("span",{style:{fontSize:X.sm,opacity:.6,fontWeight:600},children:"Similar ideas"}),R.map(({candidate:A})=>{const D={id:A.id??null,title:A.title,body:A.body,log:A.log},O=S.filter(k=>k.id!==A.id);return f.jsx(Ve,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[2]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[2],minWidth:0},children:[A.id&&f.jsx(Ge,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:A.id}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:A.title})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:M[2]},children:[f.jsx(oe,{type:"button",variant:"ghost",size:"small",onClick:()=>I(A.title),children:"Open it"}),f.jsx(oe,{type:"button",variant:"ghost",size:"small",disabled:!A.id||!r.trim()||p!==null,onClick:()=>A.id&&z(A.id,A.log),children:p===A.id?"Extending…":"Extend it instead"}),f.jsx(zu,{idea:D,otherPlans:O})]})]})},A.id??A.title)})]}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[2]},children:[f.jsx("div",{children:f.jsx(oe,{type:"button",variant:"ghost",size:"small",disabled:!r.trim()||y||j,onClick:F,children:y?"Checking overlap…":"Check overlap"})}),v&&f.jsx("p",{style:{margin:0,color:ae.accentRoseDark,fontSize:X.sm},children:v}),g&&f.jsx(Ve,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[2]},children:[f.jsx("span",{style:{fontWeight:600},children:g.verdict==="new"?"Looks genuinely new":g.verdict==="extend"?`Extends ${g.targetId??"an existing idea"}`:`Belongs inside ${g.targetId??"an existing idea"}`}),f.jsx("span",{style:{fontSize:X.sm,opacity:.8},children:g.reasoning}),g.targetId&&f.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:f.jsx(oe,{type:"button",variant:"ghost",size:"small",onClick:()=>B(g.targetId),children:"Open it"})})]})})]}),f.jsx(Is,{label:"Kind",value:a,onChange:A=>l(A),options:o4,disabled:c}),f.jsx(lo,{label:"Description",value:s,onChange:A=>o(A.target.value),placeholder:"Optional details…",disabled:c,rows:4}),d&&f.jsx("p",{style:{margin:0,color:ae.accentRoseDark,fontSize:X.sm},children:d}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:M[2]},children:[f.jsx(oe,{type:"button",variant:"ghost",onClick:t,disabled:c,children:"Cancel"}),f.jsx(oe,{type:"submit",variant:"primary",disabled:!r.trim()||c,children:"Add"})]})]})})},B0={go:"intent-button-go",stop:"intent-button-stop",log:"intent-button-log"},Kh=({intent:e,className:t,...n})=>f.jsx(oe,{variant:"primary",className:t?`${B0[e]} ${t}`:B0[e],...n}),Qh=({children:e,onClick:t})=>f.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 l4(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const c4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d4={};function O0(e,t){return(d4.jsx?u4:c4).test(e)}const f4=/[ \t\n\f\r]/g;function h4(e){return typeof e=="object"?e.type==="text"?$0(e.value):!1:$0(e)}function $0(e){return e.replace(f4,"")===""}class Wa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Wa.prototype.normal={};Wa.prototype.property={};Wa.prototype.space=void 0;function Q_(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Wa(n,r,t)}function Yh(e){return e.toLowerCase()}class At{constructor(t,n){this.attribute=n,this.property=t}}At.prototype.attribute="";At.prototype.booleanish=!1;At.prototype.boolean=!1;At.prototype.commaOrSpaceSeparated=!1;At.prototype.commaSeparated=!1;At.prototype.defined=!1;At.prototype.mustUseProperty=!1;At.prototype.number=!1;At.prototype.overloadedBoolean=!1;At.prototype.property="";At.prototype.spaceSeparated=!1;At.prototype.space=void 0;let p4=0;const ne=Yi(),We=Yi(),qh=Yi(),H=Yi(),we=Yi(),Bi=Yi(),Bt=Yi();function Yi(){return 2**++p4}const Xh=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:We,commaOrSpaceSeparated:Bt,commaSeparated:Bi,number:H,overloadedBoolean:qh,spaceSeparated:we},Symbol.toStringTag,{value:"Module"})),ef=Object.keys(Xh);class Km extends At{constructor(t,n,r,i){let s=-1;if(super(t,n),V0(this,"space",i),typeof r=="number")for(;++s<ef.length;){const o=ef[s];V0(this,ef[s],(r&Xh[o])===Xh[o])}}}Km.prototype.defined=!0;function V0(e,t,n){n&&(e[t]=n)}function co(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Km(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Yh(r)]=r,n[Yh(s.attribute)]=r}return new Wa(t,n,e.space)}const Y_=co({properties:{ariaActiveDescendant:null,ariaAtomic:We,ariaAutoComplete:null,ariaBusy:We,ariaChecked:We,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:we,ariaCurrent:null,ariaDescribedBy:we,ariaDetails:null,ariaDisabled:We,ariaDropEffect:we,ariaErrorMessage:null,ariaExpanded:We,ariaFlowTo:we,ariaGrabbed:We,ariaHasPopup:null,ariaHidden:We,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:we,ariaLevel:H,ariaLive:null,ariaModal:We,ariaMultiLine:We,ariaMultiSelectable:We,ariaOrientation:null,ariaOwns:we,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:We,ariaReadOnly:We,ariaRelevant:null,ariaRequired:We,ariaRoleDescription:we,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:We,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function q_(e,t){return t in e?e[t]:t}function X_(e,t){return q_(e,t.toLowerCase())}const m4=co({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Bi,acceptCharset:we,accessKey:we,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alpha:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:we,autoFocus:ne,autoPlay:ne,blocking:we,capture:null,charSet:null,checked:ne,cite:null,className:we,closedBy:null,colorSpace:null,cols:H,colSpan:H,command:null,commandFor:null,content:null,contentEditable:We,controls:ne,controlsList:we,coords:H|Bi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:qh,draggable:We,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:we,height:H,hidden:qh,high:H,href:null,hrefLang:null,htmlFor:we,httpEquiv:we,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:we,itemRef:we,itemScope:ne,itemType:we,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,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:ne,optimum:H,pattern:null,ping:we,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:we,required:ne,reversed:ne,rows:H,rowSpan:H,sandbox:we,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootCustomElementRegistry:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shadowRootSerializable:ne,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:We,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:We,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:we,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:We,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ne,disablePictureInPicture:ne,disableRemotePlayback:ne,exportParts:Bi,part:we,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:X_}),g4=co({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:Bt,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:we,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Bi,g2:Bi,glyphName:Bi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Bt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:we,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bt,rev:Bt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bt,requiredFeatures:Bt,requiredFonts:Bt,requiredFormats:Bt,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Bt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bt,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:q_}),Z_=co({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()}}),J_=co({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:X_}),eS=co({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),y4={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"},x4=/[A-Z]/g,W0=/-[a-z]/g,v4=/^data[-\w.:]+$/i;function w4(e,t){const n=Yh(t);let r=t,i=At;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&v4.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(W0,k4);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!W0.test(s)){let o=s.replace(x4,b4);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Km}return new i(r,t)}function b4(e){return"-"+e.toLowerCase()}function k4(e){return e.charAt(1).toUpperCase()}const _4=Q_([Y_,m4,Z_,J_,eS],"html"),Qm=Q_([Y_,g4,Z_,J_,eS],"svg");function S4(e){return e.join(" ").trim()}var Ym={},U0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,C4=/\n/g,P4=/^\s*/,j4=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,E4=/^:\s*/,T4=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,R4=/^[;\s]*/,L4=/^\s+|\s+$/g,M4=`
162
- `,H0="/",G0="*",Si="",I4="comment",A4="declaration";function D4(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(C4);y&&(n+=y.length);var w=m.lastIndexOf(M4);r=~w?m.length-w:r+m.length}function s(){var m={line:n,column:r};return function(y){return y.position=new o(m),c(),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 w=y[0];return i(w),e=e.slice(w.length),y}}function c(){l(P4)}function u(m){var y;for(m=m||[];y=d();)y!==!1&&m.push(y);return m}function d(){var m=s();if(!(H0!=e.charAt(0)||G0!=e.charAt(1))){for(var y=2;Si!=e.charAt(y)&&(G0!=e.charAt(y)||H0!=e.charAt(y+1));)++y;if(y+=2,Si===e.charAt(y-1))return a("End of comment missing");var w=e.slice(2,y-2);return r+=2,i(w),e=e.slice(y),r+=2,m({type:I4,comment:w})}}function h(){var m=s(),y=l(j4);if(y){if(d(),!l(E4))return a("property missing ':'");var w=l(T4),g=m({type:A4,property:K0(y[0].replace(U0,Si)),value:w?K0(w[0].replace(U0,Si)):Si});return l(R4),g}}function p(){var m=[];u(m);for(var y;y=h();)y!==!1&&(m.push(y),u(m));return m}return c(),p()}function K0(e){return e?e.replace(L4,Si):Si}var N4=D4,z4=uc&&uc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ym,"__esModule",{value:!0});Ym.default=B4;const F4=z4(N4);function B4(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,F4.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 Fu={};Object.defineProperty(Fu,"__esModule",{value:!0});Fu.camelCase=void 0;var O4=/^--[a-zA-Z0-9_-]+$/,$4=/-([a-z])/g,V4=/^[^-]+$/,W4=/^-(webkit|moz|ms|o|khtml)-/,U4=/^-(ms)-/,H4=function(e){return!e||V4.test(e)||O4.test(e)},G4=function(e,t){return t.toUpperCase()},Q0=function(e,t){return"".concat(t,"-")},K4=function(e,t){return t===void 0&&(t={}),H4(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(U4,Q0):e=e.replace(W4,Q0),e.replace($4,G4))};Fu.camelCase=K4;var Q4=uc&&uc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Y4=Q4(Ym),q4=Fu;function Zh(e,t){var n={};return!e||typeof e!="string"||(0,Y4.default)(e,function(r,i){r&&i&&(n[(0,q4.camelCase)(r,t)]=i)}),n}Zh.default=Zh;var X4=Zh;const Z4=su(X4),tS=nS("end"),qm=nS("start");function nS(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 J4(e){const t=qm(e),n=tS(e);if(t&&n)return{start:t,end:n}}function ta(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Y0(e.position):"start"in e||"end"in e?Y0(e):"line"in e||"column"in e?Jh(e):""}function Jh(e){return q0(e&&e.line)+":"+q0(e&&e.column)}function Y0(e){return Jh(e&&e.start)+"-"+Jh(e&&e.end)}function q0(e){return e&&typeof e=="number"?e:1}class gt 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=ta(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}}gt.prototype.file="";gt.prototype.name="";gt.prototype.reason="";gt.prototype.message="";gt.prototype.stack="";gt.prototype.column=void 0;gt.prototype.line=void 0;gt.prototype.ancestors=void 0;gt.prototype.cause=void 0;gt.prototype.fatal=void 0;gt.prototype.place=void 0;gt.prototype.ruleId=void 0;gt.prototype.source=void 0;const Xm={}.hasOwnProperty,e5=new Map,t5=/[A-Z]/g,n5=new Set(["table","tbody","thead","tfoot","tr"]),r5=new Set(["td","th"]),rS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function i5(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=f5(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=d5(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"?Qm:_4,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=iS(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function iS(e,t,n){if(t.type==="element")return s5(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return o5(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return l5(e,t,n);if(t.type==="mdxjsEsm")return a5(e,t);if(t.type==="root")return c5(e,t,n);if(t.type==="text")return u5(e,t)}function s5(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Qm,e.schema=i),e.ancestors.push(t);const s=oS(e,t.tagName,!1),o=h5(e,t);let a=Jm(e,t);return n5.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!h4(l):!0})),sS(e,o,s,t),Zm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function o5(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)}Ta(e,t.position)}function a5(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ta(e,t.position)}function l5(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Qm,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:oS(e,t.name,!0),o=p5(e,t),a=Jm(e,t);return sS(e,o,s,t),Zm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function c5(e,t,n){const r={};return Zm(r,Jm(e,t)),e.create(t,e.Fragment,r,n)}function u5(e,t){return t.value}function sS(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Zm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function d5(e,t,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:t;return a?c(s,o,a):c(s,o)}}function f5(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=qm(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 h5(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Xm.call(t.properties,i)){const s=m5(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&r5.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 p5(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 Ta(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 Ta(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Jm(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:e5;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 c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=iS(e,s,o);a!==void 0&&n.push(a)}return n}function m5(e,t,n){const r=w4(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?l4(n):S4(n)),r.property==="style"){let i=typeof n=="object"?n:g5(e,String(n));return e.stylePropertyNameCase==="css"&&(i=y5(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?y4[r.property]||r.property:r.attribute,n]}}function g5(e,t){try{return Z4(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new gt("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=rS+"#cannot-parse-style-attribute",i}}function oS(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=O0(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=O0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Xm.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ta(e)}function Ta(e,t){const n=new gt("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=rS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function y5(e){const t={};let n;for(n in e)Xm.call(e,n)&&(t[x5(n)]=e[n]);return t}function x5(e){let t=e.replace(t5,v5);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function v5(e){return"-"+e.toLowerCase()}const tf={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"]},w5={};function b5(e,t){const n=w5,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return aS(e,r,i)}function aS(e,t,n){if(k5(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 X0(e.children,t,n)}return Array.isArray(e)?X0(e,t,n):""}function X0(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=aS(e[i],t,n);return r.join("")}function k5(e){return!!(e&&typeof e=="object")}const Z0=document.createElement("i");function eg(e){const t="&"+e+";";Z0.innerHTML=t;const n=Z0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qn(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 ln(e,t){return e.length>0?(Qn(e,e.length,0,t),e):t}const J0={}.hasOwnProperty;function _5(e){const t={};let n=-1;for(;++n<e.length;)S5(t,e[n]);return t}function S5(e,t){let n;for(n in t){const i=(J0.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){J0.call(i,o)||(i[o]=[]);const a=s[o];C5(i[o],Array.isArray(a)?a:a?[a]:[])}}}function C5(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qn(e,0,0,r)}function lS(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 Ds(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wn=ui(/[A-Za-z]/),Wt=ui(/[\dA-Za-z]/),P5=ui(/[#-'*+\--9=?A-Z^-~]/);function ep(e){return e!==null&&(e<32||e===127)}const tp=ui(/\d/),j5=ui(/[\dA-Fa-f]/),E5=ui(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function Mt(e){return e!==null&&(e<0||e===32)}function me(e){return e===-2||e===-1||e===32}const T5=ui(new RegExp("\\p{P}|\\p{S}","u")),R5=ui(/\s/);function ui(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function uo(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Wt(e.charCodeAt(n+1))&&Wt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ce(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return me(l)?(e.enter(n),a(l)):t(l)}function a(l){return me(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const L5={tokenize:M5};function M5(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ce(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return te(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const I5={tokenize:A5},ev={tokenize:D5};function A5(e){const t=this,n=[];let r=0,i,s,o;return a;function a(v){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const b=t.events.length;let S=b,C;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){C=t.events[S][1].end;break}g(r);let E=b;for(;E<t.events.length;)t.events[E][1].end={...C},E++;return Qn(t.events,S+1,0,t.events.slice(b)),t.events.length=E,c(v)}return a(v)}function c(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return m(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ev,u,d)(v)}function u(v){return i&&x(),g(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(v)}function h(v){return t.containerState={},e.attempt(ev,p,m)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function m(v){if(v===null){i&&x(),g(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),y(v)}function y(v){if(v===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return te(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),y)}function w(v,b){const S=t.sliceStream(v);if(b&&S.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(S),t.parser.lazy[v.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<o&&(!i.events[C][1].end||i.events[C][1].end.offset>o))return;const E=t.events.length;let j=E,L,P;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(L){P=t.events[j][1].end;break}L=!0}for(g(r),C=E;C<t.events.length;)t.events[C][1].end={...P},C++;Qn(t.events,j+1,0,t.events.slice(E)),t.events.length=C}}function g(v){let b=n.length;for(;b-- >v;){const S=n[b];t.containerState=S[1],S[0].exit.call(t,e)}n.length=v}function x(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function D5(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tv(e){if(e===null||Mt(e)||R5(e))return 1;if(T5(e))return 2}function tg(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 np={name:"attention",resolveAll:N5,tokenize:z5};function N5(e,t){let n=-1,r,i,s,o,a,l,c,u;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};nv(d,-l),nv(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},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ln(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ln(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=ln(c,tg(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ln(c,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=ln(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Qn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function z5(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=tv(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 c=e.exit("attentionSequence"),u=tv(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?d:d&&(i||!h)),c._close=!!(s===42?h:h&&(u||!d)),t(l)}}function nv(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const F5={name:"autolink",tokenize:B5};function B5(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return Wn(p)?(e.consume(p),o):p===64?n(p):c(p)}function o(p){return p===43||p===45||p===46||Wt(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Wt(p))&&r++<32?(e.consume(p),a):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ep(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):P5(p)?(e.consume(p),c):n(p)}function u(p){return Wt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Wt(p))&&r++<63){const m=p===45?h:d;return e.consume(p),m}return n(p)}}const Bu={partial:!0,tokenize:O5};function O5(e,t,n){return r;function r(s){return me(s)?Ce(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||te(s)?t(s):n(s)}}const cS={continuation:{tokenize:V5},exit:W5,name:"blockQuote",tokenize:$5};function $5(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 me(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function V5(e,t,n){const r=this;return i;function i(o){return me(o)?Ce(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(cS,t,n)(o)}}function W5(e){e.exit("blockQuote")}const uS={name:"characterEscape",tokenize:U5};function U5(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 E5(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const dS={name:"characterReference",tokenize:H5};function H5(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"),c):(e.enter("characterReferenceValue"),s=31,o=Wt,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=j5,u):(e.enter("characterReferenceValue"),s=7,o=tp,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Wt&&!eg(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),u):n(d)}}const rv={partial:!0,tokenize:K5},iv={concrete:!0,name:"codeFenced",tokenize:G5};function G5(e,t,n){const r=this,i={partial:!0,tokenize:S};let s=0,o=0,a;return l;function l(C){return c(C)}function c(C){const E=r.events[r.events.length-1];return s=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(C)}function u(C){return C===a?(o++,e.consume(C),u):o<3?n(C):(e.exit("codeFencedFenceSequence"),me(C)?Ce(e,d,"whitespace")(C):d(C))}function d(C){return C===null||te(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(rv,y,b)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ce(e,p,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),h)}function p(C){return C===null||te(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===a?n(C):(e.consume(C),m)}function y(C){return e.attempt(i,b,w)(C)}function w(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),g}function g(C){return s>0&&me(C)?Ce(e,x,"linePrefix",s+1)(C):x(C)}function x(C){return C===null||te(C)?e.check(rv,y,b)(C):(e.enter("codeFlowValue"),v(C))}function v(C){return C===null||te(C)?(e.exit("codeFlowValue"),x(C)):(e.consume(C),v)}function b(C){return e.exit("codeFenced"),t(C)}function S(C,E,j){let L=0;return P;function P(z){return C.enter("lineEnding"),C.consume(z),C.exit("lineEnding"),R}function R(z){return C.enter("codeFencedFence"),me(z)?Ce(C,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):I(z)}function I(z){return z===a?(C.enter("codeFencedFenceSequence"),F(z)):j(z)}function F(z){return z===a?(L++,C.consume(z),F):L>=o?(C.exit("codeFencedFenceSequence"),me(z)?Ce(C,B,"whitespace")(z):B(z)):j(z)}function B(z){return z===null||te(z)?(C.exit("codeFencedFence"),E(z)):j(z)}}}function K5(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 nf={name:"codeIndented",tokenize:Y5},Q5={partial:!0,tokenize:q5};function Y5(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ce(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):te(c)?e.attempt(Q5,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||te(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function q5(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):te(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Ce(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):te(o)?i(o):n(o)}}const X5={name:"codeText",previous:J5,resolve:Z5,tokenize:e$};function Z5(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 J5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function e$(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,u(d)):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||te(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class t${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&&Io(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),Io(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Io(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);Io(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Io(this.left,n.reverse())}}}function Io(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 fS(e){const t={};let n=-1,r,i,s,o,a,l,c;const u=new t$(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.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,n$(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.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={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return Qn(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function n$(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=[],c={};let u,d,h=-1,p=n,m=0,y=0;const w=[y];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=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,w.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const g=a.slice(w[h],w[h+1]),x=s.pop();l.push([x,x+g.length-1]),e.splice(x,2,g)}for(l.reverse(),h=-1;++h<l.length;)c[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return c}const r$={resolve:s$,tokenize:o$},i$={partial:!0,tokenize:a$};function s$(e){return fS(e),e}function o$(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):te(a)?e.check(i$,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 a$(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ce(e,s,"linePrefix")}function s(o){if(o===null||te(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 hS(e,t,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=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||ep(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"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(a),h(g)):g===null||g===60||te(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function y(g){return!u&&(g===null||g===41||Mt(g))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(g)):u<c&&g===40?(e.consume(g),u++,y):g===41?(e.consume(g),u--,y):g===null||g===32||g===40||ep(g)?n(g):(e.consume(g),g===92?w:y)}function w(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function pS(e,t,n,r,i,s){const o=this;let a=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),u}function u(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):te(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||te(p)||a++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!me(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function mS(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),c(h))}function c(h){return h===o?(e.exit(s),l(o)):h===null?n(h):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ce(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||te(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:u)}function d(h){return h===o||h===92?(e.consume(h),u):u(h)}}function na(e,t){let n;return r;function r(i){return te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):me(i)?Ce(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const l$={name:"definition",tokenize:u$},c$={partial:!0,tokenize:d$};function u$(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),o(p)}function o(p){return pS.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Ds(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return Mt(p)?na(e,c)(p):c(p)}function c(p){return hS(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(c$,d,d)(p)}function d(p){return me(p)?Ce(e,h,"whitespace")(p):h(p)}function h(p){return p===null||te(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function d$(e,t,n){return r;function r(a){return Mt(a)?na(e,i)(a):n(a)}function i(a){return mS(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return me(a)?Ce(e,o,"whitespace")(a):o(a)}function o(a){return a===null||te(a)?t(a):n(a)}}const f$={name:"hardBreakEscape",tokenize:h$};function h$(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return te(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const p$={name:"headingAtx",resolve:m$,tokenize:g$};function m$(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"},Qn(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function g$(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||Mt(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||te(u)?(e.exit("atxHeading"),t(u)):me(u)?Ce(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Mt(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const y$=["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"],sv=["pre","script","style","textarea"],x$={concrete:!0,name:"htmlFlow",resolveTo:b$,tokenize:k$},v$={partial:!0,tokenize:S$},w$={partial:!0,tokenize:_$};function b$(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 k$(e,t,n){const r=this;let i,s,o,a,l;return c;function c(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),s=!0,y):T===63?(e.consume(T),i=3,r.interrupt?t:k):Wn(T)?(e.consume(T),o=String.fromCharCode(T),w):n(T)}function h(T){return T===45?(e.consume(T),i=2,p):T===91?(e.consume(T),i=5,a=0,m):Wn(T)?(e.consume(T),i=4,r.interrupt?t:k):n(T)}function p(T){return T===45?(e.consume(T),r.interrupt?t:k):n(T)}function m(T){const ue="CDATA[";return T===ue.charCodeAt(a++)?(e.consume(T),a===ue.length?r.interrupt?t:I:m):n(T)}function y(T){return Wn(T)?(e.consume(T),o=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||Mt(T)){const ue=T===47,he=o.toLowerCase();return!ue&&!s&&sv.includes(he)?(i=1,r.interrupt?t(T):I(T)):y$.includes(o.toLowerCase())?(i=6,ue?(e.consume(T),g):r.interrupt?t(T):I(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):s?x(T):v(T))}return T===45||Wt(T)?(e.consume(T),o+=String.fromCharCode(T),w):n(T)}function g(T){return T===62?(e.consume(T),r.interrupt?t:I):n(T)}function x(T){return me(T)?(e.consume(T),x):P(T)}function v(T){return T===47?(e.consume(T),P):T===58||T===95||Wn(T)?(e.consume(T),b):me(T)?(e.consume(T),v):P(T)}function b(T){return T===45||T===46||T===58||T===95||Wt(T)?(e.consume(T),b):S(T)}function S(T){return T===61?(e.consume(T),C):me(T)?(e.consume(T),S):v(T)}function C(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,E):me(T)?(e.consume(T),C):j(T)}function E(T){return T===l?(e.consume(T),l=null,L):T===null||te(T)?n(T):(e.consume(T),E)}function j(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Mt(T)?S(T):(e.consume(T),j)}function L(T){return T===47||T===62||me(T)?v(T):n(T)}function P(T){return T===62?(e.consume(T),R):n(T)}function R(T){return T===null||te(T)?I(T):me(T)?(e.consume(T),R):n(T)}function I(T){return T===45&&i===2?(e.consume(T),G):T===60&&i===1?(e.consume(T),A):T===62&&i===4?(e.consume(T),V):T===63&&i===3?(e.consume(T),k):T===93&&i===5?(e.consume(T),O):te(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(v$,q,F)(T)):T===null||te(T)?(e.exit("htmlFlowData"),F(T)):(e.consume(T),I)}function F(T){return e.check(w$,B,q)(T)}function B(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),z}function z(T){return T===null||te(T)?F(T):(e.enter("htmlFlowData"),I(T))}function G(T){return T===45?(e.consume(T),k):I(T)}function A(T){return T===47?(e.consume(T),o="",D):I(T)}function D(T){if(T===62){const ue=o.toLowerCase();return sv.includes(ue)?(e.consume(T),V):I(T)}return Wn(T)&&o.length<8?(e.consume(T),o+=String.fromCharCode(T),D):I(T)}function O(T){return T===93?(e.consume(T),k):I(T)}function k(T){return T===62?(e.consume(T),V):T===45&&i===2?(e.consume(T),k):I(T)}function V(T){return T===null||te(T)?(e.exit("htmlFlowData"),q(T)):(e.consume(T),V)}function q(T){return e.exit("htmlFlow"),t(T)}}function _$(e,t,n){const r=this;return i;function i(o){return te(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 S$(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Bu,t,n)}}const C$={name:"htmlText",tokenize:P$};function P$(e,t,n){const r=this;let i,s,o;return a;function a(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),c):k===47?(e.consume(k),S):k===63?(e.consume(k),v):Wn(k)?(e.consume(k),j):n(k)}function c(k){return k===45?(e.consume(k),u):k===91?(e.consume(k),s=0,m):Wn(k)?(e.consume(k),x):n(k)}function u(k){return k===45?(e.consume(k),p):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),h):te(k)?(o=d,A(k)):(e.consume(k),d)}function h(k){return k===45?(e.consume(k),p):d(k)}function p(k){return k===62?G(k):k===45?h(k):d(k)}function m(k){const V="CDATA[";return k===V.charCodeAt(s++)?(e.consume(k),s===V.length?y:m):n(k)}function y(k){return k===null?n(k):k===93?(e.consume(k),w):te(k)?(o=y,A(k)):(e.consume(k),y)}function w(k){return k===93?(e.consume(k),g):y(k)}function g(k){return k===62?G(k):k===93?(e.consume(k),g):y(k)}function x(k){return k===null||k===62?G(k):te(k)?(o=x,A(k)):(e.consume(k),x)}function v(k){return k===null?n(k):k===63?(e.consume(k),b):te(k)?(o=v,A(k)):(e.consume(k),v)}function b(k){return k===62?G(k):v(k)}function S(k){return Wn(k)?(e.consume(k),C):n(k)}function C(k){return k===45||Wt(k)?(e.consume(k),C):E(k)}function E(k){return te(k)?(o=E,A(k)):me(k)?(e.consume(k),E):G(k)}function j(k){return k===45||Wt(k)?(e.consume(k),j):k===47||k===62||Mt(k)?L(k):n(k)}function L(k){return k===47?(e.consume(k),G):k===58||k===95||Wn(k)?(e.consume(k),P):te(k)?(o=L,A(k)):me(k)?(e.consume(k),L):G(k)}function P(k){return k===45||k===46||k===58||k===95||Wt(k)?(e.consume(k),P):R(k)}function R(k){return k===61?(e.consume(k),I):te(k)?(o=R,A(k)):me(k)?(e.consume(k),R):L(k)}function I(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,F):te(k)?(o=I,A(k)):me(k)?(e.consume(k),I):(e.consume(k),B)}function F(k){return k===i?(e.consume(k),i=void 0,z):k===null?n(k):te(k)?(o=F,A(k)):(e.consume(k),F)}function B(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||Mt(k)?L(k):(e.consume(k),B)}function z(k){return k===47||k===62||Mt(k)?L(k):n(k)}function G(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function A(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),D}function D(k){return me(k)?Ce(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):O(k)}function O(k){return e.enter("htmlTextData"),o(k)}}const ng={name:"labelEnd",resolveAll:R$,resolveTo:L$,tokenize:M$},j$={tokenize:I$},E$={tokenize:A$},T$={tokenize:D$};function R$(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&&Qn(e,0,e.length,n),e}function L$(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}},c={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=ln(a,e.slice(s+1,s+r+3)),a=ln(a,[["enter",u,t]]),a=ln(a,tg(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=ln(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=ln(a,e.slice(o+1)),a=ln(a,[["exit",l,t]]),Qn(e,s,e.length,a),e}function M$(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(Ds(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(j$,u,o?u:d)(h):h===91?e.attempt(E$,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(T$,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function I$(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 Mt(d)?na(e,s)(d):s(d)}function s(d){return d===41?u(d):hS(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Mt(d)?na(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?mS(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Mt(d)?na(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function A$(e,t,n){const r=this;return i;function i(a){return pS.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(Ds(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function D$(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 N$={name:"labelStartImage",resolveAll:ng.resolveAll,tokenize:z$};function z$(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 F$={name:"labelStartLink",resolveAll:ng.resolveAll,tokenize:B$};function B$(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 rf={name:"lineEnding",tokenize:O$};function O$(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ce(e,t,"linePrefix")}}const lc={name:"thematicBreak",tokenize:$$};function $$(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),me(c)?Ce(e,a,"whitespace")(c):a(c))}}const Ct={continuation:{tokenize:H$},exit:K$,name:"list",tokenize:U$},V$={partial:!0,tokenize:Q$},W$={partial:!0,tokenize:G$};function U$(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(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:tp(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(lc,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return tp(p)&&++o<10?(e.consume(p),l):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Bu,r.interrupt?n:u,e.attempt(V$,h,d))}function u(p){return r.containerState.initialBlankLine=!0,s++,h(p)}function d(p){return me(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function H$(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Bu,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!me(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(W$,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(e,e.attempt(Ct,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function G$(e,t,n){const r=this;return Ce(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function K$(e){e.exit(this.containerState.type)}function Q$(e,t,n){const r=this;return Ce(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!me(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const ov={name:"setextUnderline",resolveTo:Y$,tokenize:q$};function Y$(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 q$(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),me(c)?Ce(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const X$={tokenize:Z$};function Z$(e){const t=this,n=e.attempt(Bu,r,e.attempt(this.parser.constructs.flowInitial,i,Ce(e,e.attempt(this.parser.constructs.flow,i,e.attempt(r$,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 J$={resolveAll:yS()},e6=gS("string"),t6=gS("text");function gS(e){return{resolveAll:yS(e==="text"?n6: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(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function yS(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 n6(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 c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={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={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const r6={42:Ct,43:Ct,45:Ct,48:Ct,49:Ct,50:Ct,51:Ct,52:Ct,53:Ct,54:Ct,55:Ct,56:Ct,57:Ct,62:cS},i6={91:l$},s6={[-2]:nf,[-1]:nf,32:nf},o6={35:p$,42:lc,45:[ov,lc],60:x$,61:ov,95:lc,96:iv,126:iv},a6={38:dS,92:uS},l6={[-5]:rf,[-4]:rf,[-3]:rf,33:N$,38:dS,42:np,60:[F5,C$],91:F$,92:[f$,uS],93:ng,95:np,96:X5},c6={null:[np,J$]},u6={null:[42,95]},d6={null:[]},f6=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:u6,contentInitial:i6,disable:d6,document:r6,flow:o6,flowInitial:s6,insideSpan:c6,string:a6,text:l6},Symbol.toStringTag,{value:"Module"}));function h6(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(S),check:E(C),consume:x,enter:v,exit:b,interrupt:E(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function d(R){return o=ln(o,R),w(),o[o.length-1]!==null?[]:(j(t,0),c.events=tg(s,c.events,c),c.events)}function h(R,I){return m6(p(R),I)}function p(R){return p6(o,R)}function m(){const{_bufferIndex:R,_index:I,line:F,column:B,offset:z}=r;return{_bufferIndex:R,_index:I,line:F,column:B,offset:z}}function y(R){i[R.line]=R.column,P()}function w(){let R;for(;r._index<o.length;){const I=o[r._index];if(typeof I=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<I.length;)g(I.charCodeAt(r._bufferIndex));else g(I)}}function g(R){u=u(R)}function x(R){te(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,P()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function v(R,I){const F=I||{};return F.type=R,F.start=m(),c.events.push(["enter",F,c]),a.push(F),F}function b(R){const I=a.pop();return I.end=m(),c.events.push(["exit",I,c]),I}function S(R,I){j(R,I.from)}function C(R,I){I.restore()}function E(R,I){return F;function F(B,z,G){let A,D,O,k;return Array.isArray(B)?q(B):"tokenize"in B?q([B]):V(B);function V(pe){return ot;function ot(Be){const at=Be!==null&&pe[Be],Dt=Be!==null&&pe.null,Jt=[...Array.isArray(at)?at:at?[at]:[],...Array.isArray(Dt)?Dt:Dt?[Dt]:[]];return q(Jt)(Be)}}function q(pe){return A=pe,D=0,pe.length===0?G:T(pe[D])}function T(pe){return ot;function ot(Be){return k=L(),O=pe,pe.partial||(c.currentConstruct=pe),pe.name&&c.parser.constructs.disable.null.includes(pe.name)?he():pe.tokenize.call(I?Object.assign(Object.create(c),I):c,l,ue,he)(Be)}}function ue(pe){return R(O,k),z}function he(pe){return k.restore(),++D<A.length?T(A[D]):G}}}function j(R,I){R.resolveAll&&!s.includes(R)&&s.push(R),R.resolve&&Qn(c.events,I,c.events.length-I,R.resolve(c.events.slice(I),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function L(){const R=m(),I=c.previous,F=c.currentConstruct,B=c.events.length,z=Array.from(a);return{from:B,restore:G};function G(){r=R,c.previous=I,c.currentConstruct=F,c.events.length=B,a=z,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function p6(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 m6(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=`
163
- `;break}case-3:{o=`\r
164
- `;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 g6(e){const r={constructs:_5([f6,...(e||{}).extensions||[]]),content:i(L5),defined:[],document:i(I5),flow:i(X$),lazy:{},string:i(e6),text:i(t6)};return r;function i(s){return o;function o(a){return h6(r,s,a)}}}function y6(e){for(;!fS(e););return e}const av=/[\0\t\n\r]/g;function x6(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,d,h,p;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(av.lastIndex=d,c=av.exec(s),h=c&&c.index!==void 0?c.index:s.length,p=s.charCodeAt(h),!c){t=s.slice(d);break}if(p===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),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)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 v6=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function w6(e){return e.replace(v6,b6)}function b6(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return lS(n.slice(s?2:1),s?16:10)}return eg(n)||e}const xS={}.hasOwnProperty;function k6(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),_6(n)(y6(g6(n).document().write(x6()(e,t,!0))))}function _6(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(en),autolinkProtocol:L,autolinkEmail:L,atxHeading:s(pr),blockQuote:s(Dt),characterEscape:L,characterReference:L,codeFenced:s(Jt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Jt,o),codeText:s(Yn,o),codeTextData:L,data:L,codeFlowValue:L,definition:s(hr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(qn),hardBreakEscape:s(Xe),hardBreakTrailing:s(Xe),htmlFlow:s(Pe,o),htmlFlowData:L,htmlText:s(Pe,o),htmlTextData:L,image:s(_t),label:o,link:s(en),listItem:s(ho),listItemValue:h,listOrdered:s(lt,d),listUnordered:s(lt),paragraph:s(mr),reference:T,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(pr),strong:s(di),thematicBreak:s(fe)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:at,autolinkProtocol:Be,blockQuote:l(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:pe,characterReference:ot,codeFenced:l(w),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:P,codeIndented:l(g),codeText:l(z),codeTextData:P,data:P,definition:l(),definitionDestinationString:b,definitionLabelString:x,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(I),hardBreakTrailing:l(I),htmlFlow:l(F),htmlFlowData:P,htmlText:l(B),htmlTextData:P,image:l(A),label:O,labelText:D,lineEnding:R,link:l(G),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ue,resourceDestinationString:k,resourceTitleString:V,resource:q,setextHeading:l(j),setextHeadingLineSequence:E,setextHeadingText:C,strong:l(),thematicBreak:l()}};vS(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let W={type:"root",children:[]};const Z={stack:[W],tokenStack:[],config:t,enter:a,exit:c,buffer:o,resume:u,data:n},se=[];let ye=-1;for(;++ye<N.length;)if(N[ye][1].type==="listOrdered"||N[ye][1].type==="listUnordered")if(N[ye][0]==="enter")se.push(ye);else{const Nt=se.pop();ye=i(N,Nt,ye)}for(ye=-1;++ye<N.length;){const Nt=t[N[ye][0]];xS.call(Nt,N[ye][1].type)&&Nt[N[ye][1].type].call(Object.assign({sliceSerialize:N[ye][2].sliceSerialize},Z),N[ye][1])}if(Z.tokenStack.length>0){const Nt=Z.tokenStack[Z.tokenStack.length-1];(Nt[1]||lv).call(Z,void 0,Nt[0])}for(W.position={start:Pr(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:Pr(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},ye=-1;++ye<t.transforms.length;)W=t.transforms[ye](W)||W;return W}function i(N,W,Z){let se=W-1,ye=-1,Nt=!1,Xn,yn,fi,yr;for(;++se<=Z;){const ct=N[se];switch(ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ct[0]==="enter"?ye++:ye--,yr=void 0;break}case"lineEndingBlank":{ct[0]==="enter"&&(Xn&&!yr&&!ye&&!fi&&(fi=se),yr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:yr=void 0}if(!ye&&ct[0]==="enter"&&ct[1].type==="listItemPrefix"||ye===-1&&ct[0]==="exit"&&(ct[1].type==="listUnordered"||ct[1].type==="listOrdered")){if(Xn){let $=se;for(yn=void 0;$--;){const ve=N[$];if(ve[1].type==="lineEnding"||ve[1].type==="lineEndingBlank"){if(ve[0]==="exit")continue;yn&&(N[yn][1].type="lineEndingBlank",Nt=!0),ve[1].type="lineEnding",yn=$}else if(!(ve[1].type==="linePrefix"||ve[1].type==="blockQuotePrefix"||ve[1].type==="blockQuotePrefixWhitespace"||ve[1].type==="blockQuoteMarker"||ve[1].type==="listItemIndent"))break}fi&&(!yn||fi<yn)&&(Xn._spread=!0),Xn.end=Object.assign({},yn?N[yn][1].start:ct[1].end),N.splice(yn||se,0,["exit",Xn,ct[2]]),se++,Z++}if(ct[1].type==="listItemPrefix"){const $={type:"listItem",_spread:!1,start:Object.assign({},ct[1].start),end:void 0};Xn=$,N.splice(se,0,["enter",$,ct[2]]),se++,Z++,fi=void 0,yr=!0}}}return N[W][1]._spread=Nt,Z}function s(N,W){return Z;function Z(se){a.call(this,N(se),se),W&&W.call(this,se)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(N,W,Z){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([W,Z||void 0]),N.position={start:Pr(W.start),end:void 0}}function l(N){return W;function W(Z){N&&N.call(this,Z),c.call(this,Z)}}function c(N,W){const Z=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==N.type&&(W?W.call(this,N,se[0]):(se[1]||lv).call(this,N,se[0]));else throw new Error("Cannot close `"+N.type+"` ("+ta({start:N.start,end:N.end})+"): it’s not open");Z.position.end=Pr(N.end)}function u(){return b5(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(N){if(this.data.expectingFirstListItemValue){const W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function p(){const N=this.resume(),W=this.stack[this.stack.length-1];W.lang=N}function m(){const N=this.resume(),W=this.stack[this.stack.length-1];W.meta=N}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const N=this.resume(),W=this.stack[this.stack.length-1];W.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const N=this.resume(),W=this.stack[this.stack.length-1];W.value=N.replace(/(\r?\n|\r)$/g,"")}function x(N){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.label=W,Z.identifier=Ds(this.sliceSerialize(N)).toLowerCase()}function v(){const N=this.resume(),W=this.stack[this.stack.length-1];W.title=N}function b(){const N=this.resume(),W=this.stack[this.stack.length-1];W.url=N}function S(N){const W=this.stack[this.stack.length-1];if(!W.depth){const Z=this.sliceSerialize(N).length;W.depth=Z}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function E(N){const W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function L(N){const Z=this.stack[this.stack.length-1].children;let se=Z[Z.length-1];(!se||se.type!=="text")&&(se=gr(),se.position={start:Pr(N.start),end:void 0},Z.push(se)),this.stack.push(se)}function P(N){const W=this.stack.pop();W.value+=this.sliceSerialize(N),W.position.end=Pr(N.end)}function R(N){const W=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Z=W.children[W.children.length-1];Z.position.end=Pr(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(W.type)&&(L.call(this,N),P.call(this,N))}function I(){this.data.atHardBreak=!0}function F(){const N=this.resume(),W=this.stack[this.stack.length-1];W.value=N}function B(){const N=this.resume(),W=this.stack[this.stack.length-1];W.value=N}function z(){const N=this.resume(),W=this.stack[this.stack.length-1];W.value=N}function G(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=W,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function A(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=W,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function D(N){const W=this.sliceSerialize(N),Z=this.stack[this.stack.length-2];Z.label=w6(W),Z.identifier=Ds(W).toLowerCase()}function O(){const N=this.stack[this.stack.length-1],W=this.resume(),Z=this.stack[this.stack.length-1];if(this.data.inReference=!0,Z.type==="link"){const se=N.children;Z.children=se}else Z.alt=W}function k(){const N=this.resume(),W=this.stack[this.stack.length-1];W.url=N}function V(){const N=this.resume(),W=this.stack[this.stack.length-1];W.title=N}function q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ue(N){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.label=W,Z.identifier=Ds(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function he(N){this.data.characterReferenceType=N.type}function pe(N){const W=this.sliceSerialize(N),Z=this.data.characterReferenceType;let se;Z?(se=lS(W,Z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=eg(W);const ye=this.stack[this.stack.length-1];ye.value+=se}function ot(N){const W=this.stack.pop();W.position.end=Pr(N.end)}function Be(N){P.call(this,N);const W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(N)}function at(N){P.call(this,N);const W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(N)}function Dt(){return{type:"blockquote",children:[]}}function Jt(){return{type:"code",lang:null,meta:null,value:""}}function Yn(){return{type:"inlineCode",value:""}}function hr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qn(){return{type:"emphasis",children:[]}}function pr(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function Pe(){return{type:"html",value:""}}function _t(){return{type:"image",title:null,url:"",alt:null}}function en(){return{type:"link",title:null,url:"",children:[]}}function lt(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function ho(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function mr(){return{type:"paragraph",children:[]}}function di(){return{type:"strong",children:[]}}function gr(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}function Pr(e){return{line:e.line,column:e.column,offset:e.offset}}function vS(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?vS(e,r):S6(e,r)}}function S6(e,t){let n;for(n in t)if(xS.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 lv(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ta({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is still open")}function C6(e){const t=this;t.parser=n;function n(r){return k6(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function P6(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 j6(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
165
- `}]}function E6(e,t){const n=t.value?t.value+`
166
- `:"",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 T6(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function R6(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L6(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=uo(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 c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function M6(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 I6(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function wS(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 A6(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wS(e,t);const i={src:uo(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 D6(e,t){const n={src:uo(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 N6(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 z6(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wS(e,t);const i={href:uo(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 F6(e,t){const n={href:uo(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 B6(e,t,n){const r=e.all(t),i=n?O6(n):bS(t),s={},o=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(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 u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
167
- `}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
168
- `});const c={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,c),e.applyData(t,c)}function O6(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=bS(n[r])}return t}function bS(e){const t=e.spread;return t??e.children.length>1}function $6(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 V6(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function W6(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function U6(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function H6(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=qm(t.children[1]),l=tS(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 G6(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 c=[];for(;++l<a;){const d=t.children[l],h={},p=o?o[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:s,properties:h,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),c.push(m)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function K6(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const cv=9,uv=32;function Q6(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(dv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(dv(t.slice(i),i>0,!1)),s.join("")}function dv(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===cv||s===uv;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===cv||s===uv;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Y6(e,t){const n={type:"text",value:Q6(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function q6(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const X6={blockquote:P6,break:j6,code:E6,delete:T6,emphasis:R6,footnoteReference:L6,heading:M6,html:I6,imageReference:A6,image:D6,inlineCode:N6,linkReference:z6,link:F6,listItem:B6,list:$6,paragraph:V6,root:W6,strong:U6,table:H6,tableCell:K6,tableRow:G6,text:Y6,thematicBreak:q6,toml:El,yaml:El,definition:El,footnoteDefinition:El};function El(){}const kS=-1,Ou=0,ra=1,nu=2,rg=3,ig=4,sg=5,og=6,_S=7,SS=8,Z6=typeof self=="object"?self:globalThis,fv=(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 Z6[e](t)},J6=(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 Ou:case kS:return n(o,i);case ra:{const a=n([],i);for(const l of o)a.push(r(l));return a}case nu:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case rg:return n(new Date(o),i);case ig:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case sg:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case og:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case _S:{const{name:a,message:l}=o;return n(fv(a,l),i)}case SS: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(fv(s,o),i)};return r},hv=e=>J6(new Map,e)(0),is="",{toString:eV}={},{keys:tV}=Object,Ao=e=>{const t=typeof e;if(t!=="object"||!e)return[Ou,t];const n=eV.call(e).slice(8,-1);switch(n){case"Array":return[ra,is];case"Object":return[nu,is];case"Date":return[rg,is];case"RegExp":return[ig,is];case"Map":return[sg,is];case"Set":return[og,is];case"DataView":return[ra,n]}return n.includes("Array")?[ra,n]:n.includes("Error")?[_S,n]:[nu,n]},Tl=([e,t])=>e===Ou&&(t==="function"||t==="symbol"),nV=(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]=Ao(o);switch(a){case Ou:{let u=o;switch(l){case"bigint":a=SS,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([kS],o)}return i([a,u],o)}case ra:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const u=[],d=i([a,u],o);for(const h of o)u.push(s(h));return d}case nu:{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 u=[],d=i([a,u],o);for(const h of tV(o))(e||!Tl(Ao(o[h])))&&u.push([s(h),s(o[h])]);return d}case rg:return i([a,o.toISOString()],o);case ig:{const{source:u,flags:d}=o;return i([a,{source:u,flags:d}],o)}case sg:{const u=[],d=i([a,u],o);for(const[h,p]of o)(e||!(Tl(Ao(h))||Tl(Ao(p))))&&u.push([s(h),s(p)]);return d}case og:{const u=[],d=i([a,u],o);for(const h of o)(e||!Tl(Ao(h)))&&u.push(s(h));return d}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},pv=(e,{json:t,lossy:n}={})=>{const r=[];return nV(!(t||n),!!t,new Map,r)(e),r},ru=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?hv(pv(e,t)):structuredClone(e):(e,t)=>hv(pv(e,t));function rV(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 iV(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sV(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||rV,r=e.options.footnoteBackLabel||iV,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 c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),h=uo(d.toLowerCase());let p=0;const m=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++p<=y;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(l,p);typeof x=="string"&&(x={type:"text",value:x}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const w=u[u.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const x=w.children[w.children.length-1];x&&x.type==="text"?x.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else u.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ru(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
169
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
170
- `}]}}const CS=function(e){if(e==null)return cV;if(typeof e=="function")return $u(e);if(typeof e=="object")return Array.isArray(e)?oV(e):aV(e);if(typeof e=="string")return lV(e);throw new Error("Expected function, string, or object as test")};function oV(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=CS(e[n]);return $u(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function aV(e){const t=e;return $u(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function lV(e){return $u(t);function t(n){return n&&n.type===e}}function $u(e){return t;function t(n,r,i){return!!(uV(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function cV(){return!0}function uV(e){return e!==null&&typeof e=="object"&&"type"in e}const PS=[],dV=!0,mv=!1,fV="skip";function hV(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=CS(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=PS,m,y,w;if((!t||s(l,c,u[u.length-1]||void 0))&&(p=pV(n(l,u)),p[0]===mv))return p;if("children"in l&&l.children){const g=l;if(g.children&&p[0]!==fV)for(y=(r?g.children.length:-1)+o,w=u.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=a(x,y,w)(),m[0]===mv)return m;y=typeof m[1]=="number"?m[1]:y+o}}return p}}}function pV(e){return Array.isArray(e)?e:typeof e=="number"?[dV,e]:e==null?PS:[e]}function jS(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),hV(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const rp={}.hasOwnProperty,mV={};function gV(e,t){const n=t||mV,r=new Map,i=new Map,s=new Map,o={...X6,...n.handlers},a={all:c,applyData:xV,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:yV,wrap:wV};return jS(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),a;function l(u,d){const h=u.type,p=a.handlers[h];if(rp.call(a.handlers,h)&&p)return p(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:y,...w}=u,g=ru(w);return g.children=a.all(u),g}return ru(u)}return(a.options.unknownHandler||vV)(a,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let p=-1;for(;++p<h.length;){const m=a.one(h[p],u);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=gv(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=gv(y.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function yV(e,t){e.position&&(t.position=J4(e))}function xV(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,ru(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function vV(e,t){const n=t.data||{},r="value"in t&&!(rp.call(n,"hProperties")||rp.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 wV(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
171
- `});++r<e.length;)r&&n.push({type:"text",value:`
172
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
173
- `}),n}function gv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function yv(e,t){const n=gV(e,t),r=n.one(e,void 0),i=sV(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
174
- `},i),s}function bV(e,t){return e&&"run"in e?async function(n,r){const i=yv(n,{file:r,...t});await e.run(i,r)}:function(n,r){return yv(n,{file:r,...e||t})}}function xv(e){if(e)throw e}var cc=Object.prototype.hasOwnProperty,ES=Object.prototype.toString,vv=Object.defineProperty,wv=Object.getOwnPropertyDescriptor,bv=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ES.call(t)==="[object Array]"},kv=function(t){if(!t||ES.call(t)!=="[object Object]")return!1;var n=cc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&cc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||cc.call(t,i)},_v=function(t,n){vv&&n.name==="__proto__"?vv(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Sv=function(t,n){if(n==="__proto__")if(cc.call(t,n)){if(wv)return wv(t,n).value}else return;return t[n]},kV=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=Sv(a,n),i=Sv(t,n),a!==i&&(u&&i&&(kv(i)||(s=bv(i)))?(s?(s=!1,o=r&&bv(r)?r:[]):o=r&&kv(r)?r:{},_v(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&_v(a,{name:n,newValue:i}));return a};const sf=su(kV);function ip(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 _V(){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,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?SV(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function SV(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(c){const u=c;if(a&&n)throw u;return i(u)}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 Bn={basename:CV,dirname:PV,extname:jV,join:EV,sep:"/"};function CV(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ua(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 PV(e){if(Ua(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 jV(e){Ua(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 EV(...e){let t=-1,n;for(;++t<e.length;)Ua(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":TV(n)}function TV(e){Ua(e);const t=e.codePointAt(0)===47;let n=RV(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function RV(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 Ua(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const LV={cwd:MV};function MV(){return"/"}function sp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function IV(e){if(typeof e=="string")e=new URL(e);else if(!sp(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 AV(e)}function AV(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 of=["history","path","basename","stem","extname","dirname"];class TS{constructor(t){let n;t?sp(t)?n={path:t}:typeof t=="string"||DV(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":LV.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<of.length;){const s=of[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)of.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Bn.basename(this.path):void 0}set basename(t){lf(t,"basename"),af(t,"basename"),this.path=Bn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Bn.dirname(this.path):void 0}set dirname(t){Cv(this.basename,"dirname"),this.path=Bn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Bn.extname(this.path):void 0}set extname(t){if(af(t,"extname"),Cv(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=Bn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sp(t)&&(t=IV(t)),lf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Bn.basename(this.path,this.extname):void 0}set stem(t){lf(t,"stem"),af(t,"stem"),this.path=Bn.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 gt(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 af(e,t){if(e&&e.includes(Bn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Bn.sep+"`")}function lf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Cv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function DV(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NV=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},zV={}.hasOwnProperty;class ag extends NV{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=_V()}copy(){const t=new ag;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(sf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(df("data",this.frozen),this.namespace[t]=n,this):zV.call(this.namespace,t)&&this.namespace[t]||void 0:t?(df("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=Rl(t),r=this.parser||this.Parser;return cf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),cf("process",this.parser||this.Parser),uf("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=Rl(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const p=d,m=r.stringify(p,h);OV(m)?h.value=m:h.result=m,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),cf("processSync",this.parser||this.Parser),uf("processSync",this.compiler||this.Compiler),this.process(t,i),jv("processSync","process",n),r;function i(s,o){n=!0,xv(s),r=o}}run(t,n,r){Pv(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=Rl(n);i.run(t,l,c);function c(u,d,h){const p=d||t;u?a(u):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),jv("runSync","run",r),i;function s(o,a){xv(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=Rl(n),i=this.compiler||this.Compiler;return uf("stringify",i),Pv(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(df("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(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))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(c.plugins),c.settings&&(i.settings=sf(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[p,...m]=u;const y=r[h][1];ip(y)&&ip(p)&&(p=sf(!0,y,p)),r[h]=[c,p,...m]}}}}const FV=new ag().freeze();function cf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function df(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 Pv(e){if(!ip(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rl(e){return BV(e)?e:new TS(e)}function BV(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function OV(e){return typeof e=="string"||$V(e)}function $V(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const VV="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ev=[],Tv={allowDangerousHtml:!0},WV=/^(https?|ircs?|mailto|xmpp)$/i,UV=[{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 HV(e){const t=GV(e),n=KV(e);return QV(t.runSync(t.parse(n),n),e)}function GV(e){const t=e.rehypePlugins||Ev,n=e.remarkPlugins||Ev,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Tv}:Tv;return FV().use(C6).use(n).use(bV,r).use(t)}function KV(e){const t=e.children||"",n=new TS;return typeof t=="string"&&(n.value=t),n}function QV(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||YV;for(const u of UV)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+VV+u.id,void 0);return jS(e,c),i5(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let p;for(p in tf)if(Object.hasOwn(tf,p)&&Object.hasOwn(u.properties,p)){const m=u.properties[p],y=tf[p];(y===null||y.includes(u.tagName))&&(u.properties[p]=l(String(m||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(u,d,h)),p&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function YV(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||WV.test(e.slice(0,t))?e:""}const ff=e=>({fontFamily:ie.serif,fontWeight:600,fontSize:e,margin:`${M[6]} 0 ${M[3]}`,lineHeight:1.25}),qV={p:({children:e})=>f.jsx("p",{style:{margin:`0 0 ${M[4]}`},children:e}),strong:({children:e})=>f.jsx("strong",{style:{fontWeight:700},children:e}),h1:({children:e})=>f.jsx("h1",{style:ff(X.lg),children:e}),h2:({children:e})=>f.jsx("h2",{style:ff("1.3rem"),children:e}),h3:({children:e})=>f.jsx("h3",{style:ff("1.1rem"),children:e}),a:({children:e,href:t})=>f.jsx("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:ae.accentAmberDark},children:e}),code:({children:e})=>f.jsx("code",{style:{fontFamily:ie.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:3,padding:"0.1em 0.35em"},children:e}),pre:({children:e})=>f.jsx("pre",{style:{fontFamily:ie.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:6,padding:`${M[3]} ${M[4]}`,overflowX:"auto",margin:`0 0 ${M[4]}`},children:e}),ul:({children:e})=>f.jsx("ul",{style:{listStyle:"disc",margin:`0 0 ${M[4]}`,paddingLeft:"1.4rem"},children:e}),ol:({children:e})=>f.jsx("ol",{style:{listStyle:"decimal",margin:`0 0 ${M[4]}`,paddingLeft:"1.4rem"},children:e}),li:({children:e})=>f.jsx("li",{style:{marginBottom:"0.4rem"},children:e}),blockquote:({children:e})=>f.jsx("blockquote",{style:{margin:`0 0 ${M[4]}`,paddingLeft:M[4],borderLeft:"3px solid rgba(0,0,0,0.15)",opacity:.85},children:e})},fo=({children:e})=>f.jsx(HV,{components:qV,children:e}),XV=({size:e="md"})=>{const{projectName:t,iconDataUri:n,loading:r}=V_(),i=e==="sm"?20:18,s=e==="sm"?X.sm:X.md;return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],minWidth:0},children:[n?f.jsx("img",{src:n,alt:"",style:{width:i,height:i,objectFit:"contain",flexShrink:0}}):f.jsx(xF,{icon:f.jsx(_N,{}),size:"small"}),f.jsx("span",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:s,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0},children:r?"Loading…":t??"Paper Camp"})]})},Ss=({children:e})=>f.jsx("h1",{className:"text-4xl",style:{fontFamily:ie.serif,fontWeight:600,color:ae.textPrimary,margin:`0 0 ${M[6]}`,lineHeight:1.1},children:e}),ZV=({routeKey:e,children:t,mobileOpen:n,onMobileClose:r})=>{const i=Iu(),s=_.useRef(null);return _.useEffect(()=>{if(!n)return;const o=a=>{a.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[n,r]),_.useEffect(()=>{var a;if(!n)return;const o=document.activeElement;return(a=s.current)==null||a.focus(),()=>{var l;return(l=o==null?void 0:o.focus)==null?void 0:l.call(o)}},[n]),f.jsxs(f.Fragment,{children:[n&&f.jsx("button",{type:"button",className:"lg:hidden fixed inset-0 z-[290] cursor-default border-none p-0",style:{background:"rgba(26, 25, 23, 0.4)",backdropFilter:"blur(4px)"},onClick:r,"aria-label":"Close sidebar",tabIndex:-1}),f.jsx("aside",{ref:s,role:n?"dialog":void 0,"aria-modal":n||void 0,"aria-label":"Sidebar navigation",tabIndex:-1,className:`fixed inset-y-0 left-0 z-[300] transition-transform duration-300 ease-out lg:sticky lg:inset-auto lg:top-0 lg:z-auto lg:translate-x-0 ${n?"translate-x-0":"-translate-x-full"}`,style:{width:$_.sidebarWidth,flexShrink:0,height:"100%",display:"flex",flexDirection:"column",background:n?"var(--pui-bg-base)":"transparent",boxShadow:n?"2px 0 12px rgba(0,0,0,0.15)":void 0,overflow:"hidden"},children:f.jsx("div",{style:{flex:1,overflowY:"auto",paddingTop:M[5],position:"relative"},children:f.jsx(Lu,{mode:"wait",children:f.jsx(Ys.div,{initial:i?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:i?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},children:t},e)})})})]})};function Rv(e){const t=e.match(/Found (\d+) errors?\./);return t?Number(t[1]):0}function JV(e,t){const n=Rv(e)+Rv(t);return n>0?`${n} lint/format issue${n===1?"":"s"} found.`:"Lint or format check failed."}function e8(e){const t=e.match(/Tests\s+(\d+) failed/);return t?`${t[1]} test${t[1]==="1"?"":"s"} failed.`:"Tests failed."}const Lv="papercamp.commitTitle",Mv="papercamp.commitMessage",t8=["core","cli","app","server","agent","plans","ideas","docs","settings","stack","ui","ci","config","deps","repo"];function Iv(e){try{return localStorage.getItem(e)??""}catch{return""}}function Av(e,t){try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}const n8=({size:e=16})=>f.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:[f.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"}),f.jsx("path",{d:"M19 3v3"}),f.jsx("path",{d:"M20.5 4.5h-3"})]}),r8=({size:e=16})=>f.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:[f.jsx("path",{d:"M12 19V5"}),f.jsx("path",{d:"m5 12 7-7 7 7"})]}),i8=({size:e=16})=>f.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:[f.jsx("circle",{cx:"18",cy:"18",r:"3"}),f.jsx("circle",{cx:"6",cy:"6",r:"3"}),f.jsx("path",{d:"M6 9v5c0 .667 3 1 6 1s6-.333 6-1V9"}),f.jsx("path",{d:"M12 17v2"})]}),Dv=`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")`,Ll=ae.deskBg,Nv=ae.deskLight,s8=ae.deskText,rn=ae.deskTextMuted,o8=ae.deskBorder,jr=ae.deskChalk,hf={fontFamily:ie.serif,fontSize:X.base,fontWeight:600,color:rn,marginBottom:M[3]},a8=({open:e,onToggle:t,pinned:n=!1})=>{var yr,ct;const r=e||n,i=K($=>$.plans),s=K($=>$.loadProgress),o=K($=>$.loadPlans),a=K($=>$.status),l=K($=>$.loadStatus),c=K($=>$.runCheck),u=K($=>$.fixQuality),d=K($=>$.consistency),h=K($=>$.loadConsistency),p=K($=>$.setActiveDocTitle),m=K($=>$.loadGitStatus),y=K($=>$.gitStatus),w=K($=>$.gitBranch),g=K($=>$.gitAhead),x=K($=>$.gitBranchHygiene),v=K($=>$.agentStatus),b=K($=>$.loadAgentStatus),S=K($=>$.stopAgent),[C,E]=_.useState(!1),[j,L]=_.useState(!1),[P,R]=_.useState(!1),[I,F]=_.useState(new Set),[B,z]=_.useState(()=>Iv(Lv)),[G,A]=_.useState(()=>Iv(Mv)),[D,O]=_.useState(!1),[k,V]=_.useState(!1),[q,T]=_.useState(null),[ue,he]=_.useState(null),[pe,ot]=_.useState(!1),[Be,at]=_.useState(null),[Dt,Jt]=_.useState(!1),[Yn,hr]=_.useState(null),qn=Iu(),pr=gn(),Xe=_.useRef({loadProgress:s,loadPlans:o,loadStatus:l,loadConsistency:h,loadGitStatus:m,loadAgentStatus:b});Xe.current={loadProgress:s,loadPlans:o,loadStatus:l,loadConsistency:h,loadGitStatus:m,loadAgentStatus:b},_.useEffect(()=>{Xe.current.loadProgress(),Xe.current.loadStatus(),Xe.current.loadConsistency(),Xe.current.loadGitStatus(),Xe.current.loadAgentStatus()},[]),_.useEffect(()=>{const $=new EventSource("/api/activity/stream");return $.onmessage=()=>{Xe.current.loadProgress(),Xe.current.loadPlans(),Xe.current.loadStatus(),Xe.current.loadConsistency(),Xe.current.loadGitStatus(),Xe.current.loadAgentStatus()},()=>$.close()},[]);const Pe=_.useMemo(()=>YB(i==null?void 0:i.entries),[i==null?void 0:i.entries]),_t=_.useMemo(()=>{var Ke,Ln;const $=((Ke=a==null?void 0:a.lint)==null?void 0:Ke.status)??"stale",ve=((Ln=a==null?void 0:a.format)==null?void 0:Ln.status)??"stale";return $==="running"||ve==="running"?"running":$==="fail"||ve==="fail"?"fail":$==="stale"&&ve==="stale"?"stale":"pass"},[a]),en=((yr=a==null?void 0:a.test)==null?void 0:yr.status)??"stale",lt=((ct=a==null?void 0:a.consistency)==null?void 0:ct.status)??"stale",ho=_t==="running"||en==="running"||lt==="running",mr=d.length>0,di=_t==="fail"||en==="fail"||lt==="fail"||mr,gr=(v==null?void 0:v.status)==="running"||(v==null?void 0:v.status)==="starting"||(v==null?void 0:v.status)==="stopping",fe=_.useMemo(()=>{var ve;return((ve=Pe==null?void 0:Pe.tags)==null?void 0:ve.find(Ke=>t8.includes(Ke)))??"repo"},[Pe]),N=_.useMemo(()=>!!(Pe!=null&&Pe.phases.length)&&Pe.phases.every($=>$.done),[Pe]),W=_.useMemo(()=>{if(!Pe)return"";const $=Pe.kind??"feat";return N?`${$}(${fe}): updates`:`${$}(${fe}): ${Pe.title}`},[Pe,fe,N]),Z=_.useMemo(()=>{if(!Pe)return"";const $=Pe.id?`Refs: ${Pe.id}`:"";return[!N&&Pe.phases.length?Pe.phases.map(Ke=>`- ${Ke.text}`).join(`
175
- `):"",$].filter(Boolean).join(`
176
-
177
- `)},[Pe,N]);_.useEffect(()=>{W&&!B&&z(W)},[W,B]),_.useEffect(()=>{Z&&!G&&A(Z)},[Z,G]),_.useEffect(()=>{Av(Lv,B)},[B]),_.useEffect(()=>{Av(Mv,G)},[G]),_.useEffect(()=>{y&&F(new Set(y.map($=>$.path)))},[y]);const se=_.useCallback($=>{F(ve=>{const Ke=new Set(ve);return Ke.has($)?Ke.delete($):Ke.add($),Ke})},[]),ye=_.useCallback(async()=>{if(B.trim()){O(!0),he(null);try{await TO([...I],B.trim(),G.trim()||void 0),z(W),A(""),L(!1),await m()}catch($){he($.message)}finally{O(!1)}}},[B,G,I,W,m]),Nt=_.useCallback(async()=>{V(!0),T(null);try{await RO(),await m()}catch($){T($.message)}finally{V(!1)}},[m]),Xn=_.useCallback(async()=>{Jt(!0),hr(null);try{const $=y&&y.length===0;await MO($?"clean":"dirty"),await m()}catch($){hr($.message)}finally{Jt(!1)}},[y,m]),yn=_.useCallback(async()=>{if(I.size!==0){ot(!0),at(null);try{const $=await LO([...I]);z($.title),A($.message)}catch($){at($.message)}finally{ot(!1)}}},[I]),fi=_.useCallback($=>{if($.kind==="blocked-plan-active"&&$.planId){const ve=i==null?void 0:i.entries.find(Ke=>Ke.id===$.planId);if(ve){pr({to:"/plans/$planId",params:{planId:encodeURIComponent(ve.title)}});return}}p($.title),pr({to:"/docs/$section",params:{section:$.section==="open-questions"?"questions":"decisions"}})},[i==null?void 0:i.entries,pr,p]);return f.jsxs(f.Fragment,{children:[f.jsx(Lu,{children:!r&&f.jsx(Ys.div,{initial:qn?void 0:{opacity:0,x:20},animate:{opacity:1,x:0},exit:qn?void 0:{opacity:0,x:20},transition:{duration:qn?0:.2,ease:"easeOut"},style:{position:"fixed",right:0,top:"50%",transform:"translateY(-50%)",zIndex:300,borderRadius:"6px 0 0 6px",background:Ll,backgroundImage:`${Dv}, linear-gradient(135deg, ${Nv} 0%, ${Ll} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)"},children:f.jsx(Vt,{icon:gr?f.jsx(Uh,{size:"small",surface:"chalkboard",label:"Agent running"}):di?f.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:"#d6a0a0",boxShadow:"0 0 6px rgba(214, 160, 160, 0.9)"}}):f.jsx("span",{style:{fontSize:X["2xs"]},children:"S"}),surface:"chalkboard",size:"small",label:gr?"Open stack panel — agent running":di?"Open stack panel — checks failing":"Open stack panel",onClick:t,style:{width:28,height:64,borderRadius:"6px 0 0 6px",boxShadow:gr?"inset 0 0 0 1px rgba(214, 196, 160, 0.6)":di?"inset 0 0 0 1px rgba(214, 160, 160, 0.6)":void 0}})})}),f.jsxs(Ys.div,{animate:{x:r?0:"100%"},transition:{duration:qn?0:.3,ease:[.4,0,.2,1]},style:{position:"fixed",top:0,right:0,bottom:0,width:$_.stackPanelWidth,borderLeft:"4px solid rgba(61, 53, 43, 0.12)",backgroundColor:Ll,backgroundImage:`${Dv}, linear-gradient(135deg, ${Nv} 0%, ${Ll} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",color:s8,display:"flex",flexDirection:"column",overflow:"hidden",zIndex:300},children:[f.jsxs("div",{style:{height:80,padding:`0 ${M[6]}`,display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[f.jsx("span",{style:{fontFamily:ie.serif,fontSize:X.base,fontWeight:700,color:jr},children:"Stack"}),!n&&f.jsx(Vt,{icon:f.jsx("span",{style:{fontSize:X.sm,lineHeight:1},children:"×"}),surface:"chalkboard",size:"small",label:"Close stack panel",onClick:t,style:{width:28,height:28,border:`1px solid ${o8}`}})]}),f.jsx(As,{surface:"chalkboard"}),f.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontFamily:ie.body},children:[f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:M[6]},children:[f.jsx("div",{style:hf,children:"Agent"}),f.jsx(Ve,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:v?f.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:M[2],marginBottom:M[1],flexShrink:0},children:[f.jsxs("span",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:X.sm,color:jr,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[v.planTitle,v.taskKind==="phase"&&v.phaseIndex!==void 0?` — phase ${v.phaseIndex+1}`:v.taskKind==="audit"?" — audit":v.taskKind==="batch-reconcile"?" — batch reconcile":v.taskKind==="reconcile"?" — reconcile":v.taskKind==="fix-review"?" — fixing review comments":v.taskKind==="draft"?" — drafting":v.taskKind==="extend"?" — extending":v.taskKind==="commit-suggest"?" — suggesting commit message":v.taskKind==="overlap-check"?" — checking overlap":v.taskKind==="sync"?" — syncing to main":v.taskKind==="run-all"?" — run all phases":""," ","· ",Wm[v.agentId]]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[2]},children:[(()=>{const $={starting:"#5a4a2d",running:"#5a4a2d",stopping:"#5a4a2d",done:"#2d5a3b",error:"#5a2d2d"},ve={starting:"#d6c4a0",running:"#d6c4a0",stopping:"#d6c4a0",done:"#b5d6b5",error:"#d6a0a0"};return f.jsx(Ge,{surface:"chalkboard",size:"small",fillColor:$[v.status],textColor:ve[v.status],children:v.status})})(),(v.status==="running"||v.status==="starting"||v.status==="stopping")&&f.jsx(Vt,{icon:f.jsx(oo,{}),variant:"ghost",size:"small",label:"Stop agent",onClick:S,disabled:v.status==="stopping"})]})]}),v.lines.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("span",{style:{fontFamily:ie.mono,fontSize:X["2xs"],color:rn,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:M[2],flexShrink:0},children:v.lines[v.lines.length-1]}),f.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto"},children:f.jsx(P0,{title:`${v.lines.length} line${v.lines.length===1?"":"s"}`,expanded:P,onToggle:()=>R(!P),children:f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:M[1],fontFamily:ie.mono,fontSize:X["2xs"],color:rn,paddingTop:M[2],maxHeight:160,overflowY:"auto"},children:v.lines.map(($,ve)=>f.jsx("span",{style:{whiteSpace:"pre-wrap"},children:$},`${ve}-${$}`))})})})]})]}):f.jsx("div",{style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx("p",{style:{opacity:.5,fontSize:X.xs,margin:0},children:"No agent running."})})})]}),f.jsx(As,{surface:"chalkboard"}),f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:M[6]},children:[f.jsx("div",{style:hf,children:"Status"}),f.jsx(Ve,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:(()=>{var dg,fg,hg;const $={pass:"#2d5a3b",fail:"#5a2d2d",running:"#5a4a2d",stale:"transparent"},ve={pass:"#b5d6b5",fail:"#d6a0a0",running:"#d6c4a0",stale:void 0},Ke=ho,Ln=mr;`${((dg=a==null?void 0:a.lint)==null?void 0:dg.output)||"(none)"}${((fg=a==null?void 0:a.format)==null?void 0:fg.output)||"(none)"}`;const WS=`Fix the failing tests in this repo. Output from the last test run:
178
-
179
- ${((hg=a==null?void 0:a.test)==null?void 0:hg.output)||"(no output captured)"}`,Wu=Me=>f.jsx(hn,{content:Me.title,surface:"chalkboard",children:f.jsx("button",{type:"button",className:"stack-check-btn",onClick:()=>{Ke||Me.onClick()},disabled:Ke,style:{cursor:Ke?"not-allowed":"pointer",opacity:Ke&&Me.status!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsxs(Ge,{surface:"chalkboard",size:"small",fillColor:$[Me.status],textColor:ve[Me.status],children:[Me.label,f.jsx("span",{style:{visibility:Me.status==="running"?"visible":"hidden"},children:"…"})]})})});return f.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:M[3]},children:[f.jsxs("div",{style:{display:"flex",gap:M[2],flexWrap:"wrap",justifyContent:"center"},children:[Wu({label:"Quality",status:_t,title:"Run lint and format checks",onClick:()=>{c("lint"),c("format")}}),Wu({label:"Tests",status:en,title:"Run tests",onClick:()=>c("test")}),Wu({label:"Consistency",status:lt,title:"Run codebase consistency (knip + dependency-cruiser)",onClick:()=>c("consistency")}),f.jsxs("div",{children:[f.jsx(hn,{content:Ln?"Show plan/decision doc findings":"No plan/decision doc findings",surface:"chalkboard",children:f.jsx("button",{type:"button",className:Ln?"stack-check-btn":void 0,onClick:()=>{Ln&&E(Me=>!Me)},style:{cursor:Ln?"pointer":"default",display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsx(Ge,{surface:"chalkboard",size:"small",fillColor:Ln?"#5a2d2d":"#2d5a3b",textColor:Ln?"#d6a0a0":"#b5d6b5",children:"Docs"})})}),C&&Ln&&f.jsx("div",{style:{marginTop:M[2],display:"flex",flexDirection:"column",gap:M[2]},children:d.map((Me,hi)=>f.jsx("div",{style:{fontFamily:ie.mono,fontSize:X["2xs"],color:rn},children:f.jsx("button",{type:"button",onClick:()=>fi(Me),style:{background:"none",border:"none",padding:0,color:jr,textDecoration:"underline",cursor:"pointer",font:"inherit",textAlign:"left"},children:Me.message})},`${Me.kind}-${Me.title}-${hi}`))})]})]}),(()=>{var pg,mg,gg;let Me,hi=null;return Ke?Me=f.jsx("span",{style:{color:rn},children:"Running checks…"}):_t==="fail"?(Me=f.jsx("span",{style:{color:rn},children:JV(((pg=a==null?void 0:a.lint)==null?void 0:pg.output)??"",((mg=a==null?void 0:a.format)==null?void 0:mg.output)??"")}),hi=f.jsx("button",{type:"button",onClick:u,style:{background:"none",border:"none",padding:0,color:jr,textDecoration:"underline",cursor:"pointer",font:"inherit"},children:"Suggested fix: run biome --write"})):en==="fail"?(Me=f.jsx("span",{style:{color:rn},children:e8(((gg=a==null?void 0:a.test)==null?void 0:gg.output)??"")}),hi=f.jsxs("span",{style:{color:jr},children:["Suggested fix: ",f.jsx(Wh,{text:WS,surface:"chalkboard"})]})):lt==="fail"?(Me=f.jsx("span",{style:{color:rn},children:"Codebase consistency failed (knip / dependency-cruiser)."}),hi=f.jsx("span",{style:{color:rn,opacity:.8},children:"Run pnpm run consistency for details."})):mr?Me=f.jsx("span",{style:{color:rn},children:"Plan/decision doc issues — see the Docs stamp."}):_t==="pass"&&en==="pass"&&lt==="pass"?Me=f.jsx("span",{style:{color:"#b5d6b5"},children:"All checks passing."}):Me=f.jsx("span",{style:{color:rn,opacity:.6},children:"Checks haven't run yet."}),f.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",gap:M[1],fontFamily:ie.handwritten,fontSize:X.sm},children:[Me,f.jsx("span",{style:{visibility:hi?"visible":"hidden"},children:hi??" "})]})})()]})})()})]}),f.jsxs("div",{style:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column",padding:M[6]},children:[f.jsxs("div",{style:{...hf,display:"flex",alignItems:"center",gap:M[2]},children:["Commit",w&&f.jsx(Ge,{surface:"chalkboard",size:"small",children:w})]}),f.jsx(Ve,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:y&&y.length>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto"},children:f.jsx(P0,{title:`${y.length} file${y.length===1?"":"s"} changed`,expanded:j,onToggle:()=>L(!j),children:f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:M[2],paddingTop:M[2]},children:y.map($=>f.jsxs("label",{style:{display:"flex",alignItems:"center",gap:M[2],fontFamily:ie.mono,fontSize:X["2xs"],color:jr,cursor:"pointer"},children:[f.jsx("input",{type:"checkbox",checked:I.has($.path),onChange:()=>se($.path),style:{accentColor:jr}}),f.jsx("span",{style:{color:$.staged?jr:rn,minWidth:24},children:$.status}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:$.path})]},$.path))})})}),f.jsxs("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",gap:M[3],marginTop:M[3]},children:[Be&&f.jsx(Vr,{surface:"chalkboard",dismissible:!0,onDismiss:()=>at(null),children:Be}),f.jsxs("div",{style:{display:"flex",gap:M[2],alignItems:"center"},children:[f.jsx("div",{style:{flex:1},children:f.jsx(Rn,{surface:"chalkboard",size:"small",placeholder:"Commit title",value:B,onChange:$=>z($.currentTarget.value)})}),f.jsx(Vt,{icon:f.jsx(n8,{size:16}),surface:"chalkboard",size:"small",label:"Suggest title and message from the diff",disabled:I.size===0||pe,onClick:yn,wobble:pe?1:0})]}),f.jsx(lo,{surface:"chalkboard",size:"small",placeholder:"Commit message (optional)",value:G,onChange:$=>A($.currentTarget.value),rows:2}),ue&&f.jsx(Vr,{surface:"chalkboard",dismissible:!0,onDismiss:()=>he(null),children:ue}),f.jsx(oe,{surface:"chalkboard",size:"small",fullWidth:!0,disabled:I.size===0||!B.trim()||D,onClick:ye,children:D?"Committing…":"Commit"})]})]}):f.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:M[3]},children:g>0?f.jsxs(f.Fragment,{children:[f.jsxs("p",{style:{opacity:.5,fontSize:X.xs,margin:0},children:["All changes committed — ",g," commit",g===1?"":"s"," ready to push."]}),q&&f.jsx(Vr,{surface:"chalkboard",dismissible:!0,onDismiss:()=>T(null),children:q}),f.jsx(oe,{surface:"chalkboard",size:"small",icon:f.jsx(r8,{size:14}),disabled:k,onClick:Nt,children:k?"Pushing…":`Push ${g} commit${g===1?"":"s"}`})]}):f.jsxs(f.Fragment,{children:[f.jsx("p",{style:{opacity:.5,fontSize:X.xs,margin:0},children:"No changed files."}),Yn&&f.jsx(Vr,{surface:"chalkboard",dismissible:!0,onDismiss:()=>hr(null),children:Yn}),f.jsx(hn,{content:x==="clean-on-main"?"Already on clean main":void 0,surface:"chalkboard",children:f.jsx(oe,{surface:"chalkboard",size:"small",icon:f.jsx(i8,{size:14}),disabled:Dt||x==="clean-on-main",onClick:Xn,children:Dt?"Syncing…":"Sync to main"})})]})})})]})]})]})]})},l8=()=>{const e=K(a=>a.decisions),t=K(a=>a.openQuestions),n=K(a=>a.activeDocTitle),r=K(a=>a.setActiveDocTitle),i=gn(),s=e.find(a=>a.title===n);if(!s)return null;const o=t.filter(a=>a.resolvedBy===s.title);return f.jsxs("div",{children:[f.jsx("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${M[3]}`,lineHeight:Gt.tight},children:s.title}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[2],marginBottom:M[5]},children:[f.jsx("span",{className:"text-sm",style:{opacity:.5},children:s.date}),f.jsx(Ge,{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&&f.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Superseded by"," ",f.jsx(Qh,{onClick:()=>r(s.supersededBy),children:s.supersededBy})]}),o.length>0&&f.jsxs("span",{className:"text-sm",style:{opacity:.5},children:[o.length===1?"Resolves":"Resolves all of"," ",o.map((a,l)=>f.jsxs("span",{children:[l>0&&", ",f.jsx(Qh,{onClick:()=>{i({to:"/docs/$section",params:{section:"questions"}}),r(a.title)},children:a.title})]},a.title))]})]}),f.jsx("div",{style:{fontFamily:ie.body,fontSize:X.base,lineHeight:Gt.relaxed,color:"#1C1B18"},children:f.jsx(fo,{children:s.body})})]})},xi=(e,t)=>e.toLowerCase().includes(t.toLowerCase()),Ml=(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},c8=({query:e})=>{const{decisions:t,openQuestions:n,progress:r,repoDocs:i,setActiveDocTitle:s,setDocSearchQuery:o}=K(),a=gn(),l=[];for(const d of t)(xi(d.title,e)||xi(d.body,e))&&l.push({section:"decisions",sectionLabel:"Decisions",title:d.title,snippet:Ml(d.body||d.title,e)});for(const d of n)(xi(d.title,e)||xi(d.body,e))&&l.push({section:"questions",sectionLabel:"Open Questions",title:d.title,snippet:Ml(d.body||d.title,e)});for(const d of r)for(const h of d.items)if(xi(h,e)){l.push({section:"progress",sectionLabel:"Progress",title:d.date,snippet:Ml(h,e)});break}for(const d of i)(xi(d.name,e)||xi(d.content,e))&&l.push({section:"repo-docs",sectionLabel:"Repo Docs",title:d.name,snippet:Ml(d.content,e)});const c={};for(const d of l)c[d.section]||(c[d.section]=[]),c[d.section].push(d);const u=(d,h)=>{a({to:"/docs/$section",params:{section:d}}),s(h),o("")};return l.length===0?f.jsxs("p",{style:{opacity:.5},children:['No results found for "',e,'".']}):f.jsxs("div",{children:[f.jsxs("p",{className:"text-sm",style:{opacity:.5,marginBottom:M[3]},children:[l.length," result",l.length===1?"":"s",' for "',e,'"']}),Object.entries(c).map(([d,h])=>f.jsxs("div",{style:{marginBottom:M[6]},children:[f.jsx("h3",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4,margin:`0 0 ${M[2]}`},children:h[0].sectionLabel}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:M[1]},children:h.map(p=>f.jsx(oe,{variant:"ghost",size:"small",fullWidth:!0,onClick:()=>u(p.section,p.title),style:{justifyContent:"flex-start",padding:`${M[2]} ${M[3]}`},children:f.jsxs("span",{style:{textAlign:"left"},children:[f.jsx("span",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"0.95rem",display:"block",marginBottom:"0.2rem"},children:p.title}),f.jsx("span",{className:"text-sm",style:{opacity:.6},children:p.snippet})]})},`${p.section}-${p.title}`))})]},d))]})},u8=()=>{const e=K(g=>g.openQuestions),t=K(g=>g.activeDocTitle),n=K(g=>g.setActiveDocTitle),r=gn(),[i,s]=_.useState(!1),[o,a]=_.useState(""),[l,c]=_.useState(""),[u,d]=_.useState(!1),h=e.find(g=>g.title===t);if(!h)return null;const p=()=>{h.resolvedBy&&(r({to:"/docs/$section",params:{section:"decisions"}}),n(h.resolvedBy))},m=()=>{a(""),c(""),d(!1),s(!0)},y=()=>{s(!1)},w=async g=>{if(g.preventDefault(),!(!o.trim()||u)){d(!0);try{await jO(h.title,o.trim(),l.trim()||void 0),s(!1)}catch{d(!1)}}};return f.jsxs("div",{children:[f.jsx("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${M[3]}`,lineHeight:Gt.tight},children:h.title}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[2],marginBottom:M[5]},children:[f.jsx("span",{className:"text-sm",style:{opacity:.5},children:h.raised}),f.jsx(Ge,{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&&f.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Resolved by"," ",f.jsx(Qh,{onClick:p,children:h.resolvedBy})]}),h.status==="open"&&f.jsx(oe,{surface:"chalkboard",onClick:m,children:"Resolve"})]}),f.jsx("div",{style:{fontFamily:ie.body,fontSize:X.base,lineHeight:Gt.relaxed,color:"#1C1B18"},children:f.jsx(fo,{children:h.body})}),f.jsx(ao,{open:i,onClose:y,title:"Resolve question",size:"small",children:f.jsxs("form",{onSubmit:w,style:{display:"flex",flexDirection:"column",gap:M[4]},children:[f.jsx(Rn,{label:"Decision",value:o,onChange:g=>a(g.target.value),placeholder:"What was decided?",disabled:u,autoFocus:!0,required:!0}),f.jsx(lo,{label:"Rationale",value:l,onChange:g=>c(g.target.value),placeholder:"Optional reasoning…",disabled:u,rows:4}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:M[2]},children:[f.jsx(oe,{type:"button",variant:"ghost",onClick:y,disabled:u,children:"Cancel"}),f.jsx(oe,{type:"submit",variant:"primary",disabled:!o.trim()||u,children:"Resolve"})]})]})})]})},d8=()=>{const e=K(i=>i.progress),t=K(i=>i.activeDocTitle),r=[...t?e.filter(i=>i.date===t):e].sort((i,s)=>s.date.localeCompare(i.date));return r.length===0?f.jsx("p",{style:{opacity:.5},children:"No progress entries found."}):f.jsx("div",{children:r.map(i=>f.jsxs("div",{style:{marginBottom:M[8]},children:[f.jsx("h3",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:X.md,margin:`0 0 ${M[3]}`,lineHeight:Gt.tight,opacity:.8},children:i.date}),f.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:M[2]},children:i.items.map((s,o)=>f.jsx("li",{style:{fontFamily:ie.body,fontSize:X.sm,lineHeight:1.55,color:"#1C1B18",paddingLeft:M[4],borderLeft:"2px solid rgba(0,0,0,0.08)"},children:f.jsx(fo,{children:s})},`${i.date}-${o}`))})]},i.date))})},f8=()=>{const e=K(i=>i.repoDocs),t=K(i=>i.activeDocTitle),n=e.find(i=>i.name===t);if(!n)return null;const r=n.name.endsWith(".md");return f.jsxs("div",{children:[f.jsx("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${M[4]}`,lineHeight:Gt.tight},children:n.name}),r?f.jsx("div",{style:{fontFamily:ie.body,fontSize:X.base,lineHeight:Gt.relaxed,color:"#1C1B18"},children:f.jsx(fo,{children:n.content})}):f.jsx("pre",{style:{fontFamily:ie.mono,fontSize:X.xs,background:"rgba(0,0,0,0.04)",borderRadius:6,padding:M[4],overflowX:"auto",lineHeight:Gt.normal,whiteSpace:"pre-wrap"},children:n.content})]})},Il=({itemId:e,label:t,onBack:n})=>f.jsx("div",{style:{marginBottom:M[4]},children:f.jsx(Hh,{items:[{id:"docs",label:"Docs",onClick:n},{id:e,label:t}]})}),RS=()=>{const e=K(s=>s.docSearchQuery),t=K(s=>s.activeDocTitle),n=gn(),r=W_(),i=()=>n({to:"/docs"});return e.trim()?f.jsx("div",{children:f.jsx(c8,{query:e})}):r==="decisions"&&t?f.jsxs("div",{children:[f.jsx(Il,{itemId:"decision",label:t,onBack:i}),f.jsx(Ss,{children:"Decisions"}),f.jsx(l8,{})]}):r==="questions"&&t?f.jsxs("div",{children:[f.jsx(Il,{itemId:"question",label:t,onBack:i}),f.jsx(Ss,{children:"Open Questions"}),f.jsx(u8,{})]}):r==="progress"?f.jsxs("div",{children:[f.jsx(Il,{itemId:"progress",label:t??"Progress",onBack:i}),f.jsx(Ss,{children:"Progress"}),f.jsx(d8,{})]}):r==="repo-docs"&&t?f.jsxs("div",{children:[f.jsx(Il,{itemId:"repo-doc",label:t,onBack:i}),f.jsx(f8,{})]}):f.jsxs("div",{children:[f.jsx(Ss,{children:"Docs"}),f.jsx("p",{style:{opacity:.5},children:"Select a section from the sidebar."})]})},Li=({label:e,children:t,action:n})=>f.jsxs("div",{style:{marginBottom:M[5]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.35rem",padding:`0 ${M[3]}`},children:[f.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),n]}),t]}),h8=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Er=({children:e})=>f.jsx("span",{className:"text-sm",style:{display:"block",padding:`${M[1]} ${M[3]}`,opacity:.35,fontStyle:"italic"},children:e}),p8=()=>{const{decisions:e,openQuestions:t,progress:n,repoDocs:r,decisionsLoading:i,openQuestionsLoading:s,progressLoading:o,repoDocsLoading:a,loadDecisions:l,loadOpenQuestions:c,loadProgress:u,loadRepoDocs:d,activeDocTitle:h,setActiveDocTitle:p,docSearchQuery:m,setDocSearchQuery:y}=K(),w=W_(),g=gn();_.useEffect(()=>{l(),c(),u(),d()},[l,c,u,d]);const x=v=>{g({to:"/docs/$section",params:{section:"decisions"}}),p(v)};return f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{marginBottom:M[4]},children:f.jsx(Rn,{size:"small","aria-label":"Search docs",placeholder:"Search docs…",value:m,onChange:v=>y(v.target.value)})}),f.jsx(Li,{label:"Repo Docs",children:a&&r.length===0?f.jsx(Er,{children:"Loading…"}):r.length>0?r.map(v=>f.jsx(Cn,{size:"small",active:w==="repo-docs"&&h===v.name,onClick:()=>{g({to:"/docs/$section",params:{section:"repo-docs"}}),p(v.name)},children:h8(v.name)},v.name)):f.jsx(Er,{children:"No repo docs found"})}),f.jsx(Li,{label:"Decisions",children:i&&e.length===0?f.jsx(Er,{children:"Loading…"}):e.length>0?e.map(v=>f.jsx(Cn,{size:"small",active:w==="decisions"&&h===v.title,onClick:()=>x(v.title),children:v.title},v.title)):f.jsx(Er,{children:"No decisions yet"})}),f.jsx(Li,{label:"Open Questions",children:s&&t.length===0?f.jsx(Er,{children:"Loading…"}):t.length>0?t.map(v=>f.jsx(Cn,{size:"small",active:w==="questions"&&h===v.title,onClick:()=>{g({to:"/docs/$section",params:{section:"questions"}}),p(v.title)},children:v.title},v.title)):f.jsx(Er,{children:"No open questions"})}),f.jsx(Li,{label:"Progress",children:o&&n.length===0?f.jsx(Er,{children:"Loading…"}):n.length>0?n.map(v=>f.jsx(Cn,{size:"small",active:w==="progress"&&h===v.date,onClick:()=>{g({to:"/docs/$section",params:{section:"progress"}}),p(v.date)},children:v.date},v.date)):f.jsx(Er,{children:"No progress entries"})})]})},m8=({title:e,onClose:t,onConfirm:n})=>{const r=async()=>{e&&(await n(e),t())};return f.jsx(ao,{open:e!==null,onClose:t,title:"Delete idea",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[4]},children:[f.jsxs("p",{style:{margin:0},children:['Delete idea "',e,'"?']}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:M[2]},children:[f.jsx(oe,{type:"button",variant:"ghost",onClick:t,children:"Cancel"}),f.jsx(oe,{type:"button",variant:"danger",onClick:r,children:"Delete"})]})]})})},LS={"in-progress":"#C89A5A",planned:"#6A9B72",idea:"#8A9BAA",review:"#9B7AB5",done:"#8A7A8A",dropped:"#A06060"},lg={idea:"Idea",planned:"Planned","in-progress":"In progress",review:"Review",done:"Done",dropped:"Dropped"},Ra={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"}},MS={open:"Open",done:"Done",dropped:"Dropped"},iu={open:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},done:{fill:"rgba(168, 155, 168, 0.25)",text:"#6E5E6E"},dropped:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"}},g8={draft:"Draft",open:"Open",closed:"Closed",merged:"Merged"},zv={draft:{fill:"rgba(138, 155, 168, 0.25)",text:"#5E7080"},open:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},closed:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"},merged:{fill:"rgba(155, 122, 181, 0.25)",text:"#7B5E9E"}},y8={approved:"Approved","changes-requested":"Changes requested","review-required":"Review required"},Fv={approved:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},"changes-requested":{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"},"review-required":{fill:"rgba(212, 163, 115, 0.25)",text:"#A67B4F"}},x8=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}`},v8=(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=[x8(e),e.failure_scenario??e.reasoning].filter(Boolean).join(" — ");return{done:!1,text:n.trim(),description:r||void 0,source:"review"}},w8=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)=>v8(r,i))},b8=({onAdd:e,disabled:t})=>{const[n,r]=_.useState(!1),[i,s]=_.useState(""),[o,a]=_.useState(null),[l,c]=_.useState(!1),u=()=>{r(!1),s(""),a(null)},d=async()=>{let h;try{h=w8(i)}catch(p){a(p instanceof Error?p.message:"Could not parse findings");return}c(!0),a(null);try{await e(h),u()}finally{c(!1)}};return f.jsxs(f.Fragment,{children:[f.jsx(hn,{content:"Add /code-review findings as phases",children:f.jsx(Vt,{className:"accent-button-green",size:"small",onClick:()=>r(!0),disabled:t,"aria-label":"Add code-review findings as phases",icon:f.jsx(SN,{size:16})})}),f.jsx(ao,{open:n,onClose:u,title:"Add /code-review findings",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[4]},children:[f.jsxs("p",{className:"text-sm",style:{margin:0,opacity:.7},children:["Paste the JSON findings from a ",f.jsx("code",{children:"/code-review"})," run. Each finding becomes a new, unchecked phase on this plan."]}),f.jsx(lo,{value:i,onChange:h=>s(h.target.value),placeholder:'[{ "description": "...", "file": "src/foo.ts", "line_start": 12, "failure_scenario": "..." }]',rows:10,disabled:l}),o&&f.jsxs(Vr,{variant:"warning",children:["Could not add phases — ",o]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:M[2]},children:[f.jsx(oe,{type:"button",variant:"ghost",onClick:u,disabled:l,children:"Cancel"}),f.jsx(oe,{type:"button",variant:"primary",onClick:d,disabled:l||!i.trim(),children:"Add phases"})]})]})})]})},k8=({planId:e,phaseIndex:t,disabled:n})=>{const r=K(a=>a.launchAgent),[i,s]=_.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 f.jsx(Vt,{icon:f.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}})},_8=({plan:e,disabled:t})=>{const n=K(o=>o.launchPlanAudit),[r,i]=_.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,WO(e))}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(hn,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(oe,{variant:"primary",className:"accent-button-green",size:"small",onClick:s,disabled:t||r||!e.id,children:"Audit"})})},S8=({children:e,collapsedLines:t=3,resetKey:n})=>{const r=_.useRef(null),[i,s]=_.useState(!1),[o,a]=_.useState(!1);return _.useLayoutEffect(()=>s(!1),[n]),_.useLayoutEffect(()=>{if(i)return;const l=r.current;if(!l)return;const c=()=>a(l.scrollHeight-l.clientHeight>1);c();const u=new ResizeObserver(c);return u.observe(l),()=>u.disconnect()},[i,n]),f.jsxs("div",{children:[f.jsx("div",{ref:r,style:i?void 0:{display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e}),o&&f.jsx("button",{type:"button",onClick:()=>s(l=>!l),"aria-expanded":i,style:{alignSelf:"flex-start",background:"none",border:"none",padding:`${M[1]} 0`,font:"inherit",fontSize:X.xs,opacity:.6,cursor:"pointer",textDecoration:"underline"},children:i?"Show less":"Show more"})]})},cg=({idea:e,compact:t})=>{const n=K(p=>p.launchIdeaExtend),r=K(p=>p.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,errorMessage:o,run:a}=N_(),{toast:l}=ci(),c=e.id,u=()=>{c&&a(async()=>{const p=K.getState().ideaEntries.find(m=>m.id===c);if(!p)throw new Error(`Idea ${c} not found`);try{await n(c,HO(p))}catch(m){throw l({title:"Extension failed",description:m.message,variant:"error"}),m}})},d=s==="loading"?"Extending…":s==="success"?t?"Sent!":"Extension sent!":s==="error"?"Extension failed":t?"Extend":"Extend with AI",h=s==="error"?o??"Extension failed":c?void 0:"Idea needs an ID before an agent can run";return f.jsx(hn,{content:h,children:f.jsx(oe,{variant:"ghost",size:"small",onClick:u,disabled:i||s==="loading"||!c,style:{color:s==="error"?ae.accentRoseDark:void 0},children:d})})};async function C8(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 P8=({planTitle:e,planId:t,phaseIndex:n})=>{const[r,i]=_.useState("idle"),s=async o=>{o.stopPropagation();const a=`Start phase ${n+1} of plan "${e}" in papercamp/ideas/${t??"<ID>"}.md`,l=await C8(a);i(l?"copied":"failed"),setTimeout(()=>i("idle"),1500)};return f.jsx(Vt,{icon:r==="copied"?f.jsx(bN,{size:16}):r==="failed"?f.jsx(oo,{size:16}):f.jsx(kN,{size:16}),variant:"ghost",size:"small",label:r==="copied"?"Copied":r==="failed"?"Copy failed — select and copy manually":"Copy phase prompt",onClick:s,className:"transition-opacity",style:{color:r==="copied"?"#6A9B72":r==="failed"?"#A06060":ae.textSecondary}})},Vu=({id:e})=>e?f.jsx(Ge,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}):null,j8=()=>f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"})}),E8=({pr:e})=>f.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",onClick:t=>t.stopPropagation(),style:{textDecoration:"none",display:"inline-flex"},children:f.jsx(Ge,{size:"small",fillColor:zv[e.state].fill,textColor:zv[e.state].text,children:f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:M[1]},children:[f.jsx(j8,{}),"#",e.number," ",g8[e.state]]})})}),IS=({pct:e,color:t,height:n=6})=>f.jsx(Vz,{value:e,color:t,height:n}),T8=({plan:e,disabled:t})=>{const n=K(o=>o.launchPlanReconcile),[r,i]=_.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,UO(e),{body:e.body,phases:e.phases})}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(hn,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(oe,{variant:"primary",className:"accent-button-green",size:"small",onClick:s,disabled:t||r||!e.id,children:"Refresh"})})},R8=({pr:e})=>{const{reviewDecision:t,unresolvedThreadCount:n,hasNewCommentsSincePush:r}=e;return!t&&!n?null:f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:M[2]},children:[t&&f.jsx(Ge,{size:"small",fillColor:Fv[t].fill,textColor:Fv[t].text,children:y8[t]}),!!n&&f.jsxs(Ge,{size:"small",fillColor:"rgba(212, 163, 115, 0.25)",textColor:"#A67B4F",children:[n," unaddressed comment",n===1?"":"s",r?" · new":""]})]})};function L8(e){const t=e==null?void 0:e.match(/^[a-z]+\/([a-z]+-\d+)-/);return t?t[1].toUpperCase():null}const M8=({plan:e})=>{const t=K(P=>P.loadPlans),n=K(P=>P.plans),r=K(P=>P.gitBranch),i=K(P=>P.loadGitStatus),{toast:s}=ci(),[o,a]=_.useState(!1),l=K(P=>P.agentStatus),c=l!==null&&l.status!=="done"&&l.status!=="error",u=c&&l!==null&&l.planId===e.id?l.phaseIndex:null,d=c&&l!==null&&l.planId===e.id&&l.phaseIndex===void 0,[h,p]=_.useState(!1),[m,y]=_.useState(""),w=F_(e),g=e.phases.length>0,x={id:e.id??null,title:e.title,body:e.body,log:e.log},v=((n==null?void 0:n.entries)??[]).filter(P=>P.id!==e.id),b=e.id!==void 0&&L8(r)===e.id,S=e.status==="planned"||e.status==="in-progress"||e.status==="review",C=async()=>{if(e.id){a(!0);try{const P=await IO(e.id);s({title:"Branch ready",description:`Now on ${P}`,variant:"success"}),await i()}catch(P){s({title:"Branch failed",description:P.message,variant:"error"})}finally{a(!1)}}};w!==null&&w.done===w.total&&w.total>0;const E=async P=>{const R=e.phases.map((F,B)=>B===P?{...F,done:!F.done}:F);p(!0);const I=R.every(F=>F.done);try{I&&e.status==="in-progress"?await Wr(e.title,{phases:R,status:"review"}):await Wr(e.title,{phases:R}),await t()}catch(F){s({title:"Update failed",description:F.message,variant:"error"})}finally{p(!1)}},j=async P=>{p(!0);try{await Wr(e.title,{phases:[...e.phases,...P]}),await t()}catch(R){s({title:"Update failed",description:R.message,variant:"error"})}finally{p(!1)}},L=async()=>{if(!m.trim())return;const R={date:new Date().toISOString().slice(0,10),text:m.trim().replace(/\n/g," ")},I=[...e.log??[],R];p(!0);try{await Wr(e.title,{log:I}),await t(),y("")}catch(F){s({title:"Update failed",description:F.message,variant:"error"})}finally{p(!1)}};return f.jsxs("div",{children:[f.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:M[3],margin:`0 0 ${M[3]}`},children:[f.jsxs("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:0,lineHeight:Gt.tight,display:"flex",alignItems:"center",gap:M[3],minWidth:0},children:[f.jsx(Vu,{id:e.id}),e.title]}),f.jsx("span",{className:"text-sm",style:{opacity:.45,flexShrink:0,whiteSpace:"nowrap"},children:e.updated?`updated ${tu(e.updated)}`:`created ${tu(e.created)}`})]}),e.tags.length>0&&f.jsx("div",{style:{display:"flex",gap:M[2],flexWrap:"wrap",marginBottom:M[4]},children:e.tags.map(P=>f.jsx(Ge,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:P},P))}),(S||e.pr)&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],flexWrap:"wrap",marginBottom:M[4]},children:[S&&!b&&f.jsx(Ve,{size:"small",accent:!0,accentColor:"amber",children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],flexWrap:"wrap"},children:[f.jsxs("span",{className:"text-sm",children:["Working branch: ",f.jsx("code",{children:r??"unknown"})," — not this plan's branch."]}),e.id&&f.jsx(hn,{content:`Creates ${(e.kind??"feat").toLowerCase()}/${e.id.toLowerCase()}-… from main, or switches to it if it already exists`,children:f.jsx(oe,{variant:"secondary",size:"small",onClick:C,disabled:o,children:o?"Switching…":"Create branch"})})]})}),S&&b&&f.jsxs("span",{className:"text-sm",style:{opacity:.45},children:["Working branch: ",f.jsx("code",{children:r})]}),e.pr&&f.jsx(E8,{pr:e.pr}),e.pr&&f.jsx(R8,{pr:e.pr})]}),w!==null&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],marginBottom:M[4]},children:[f.jsx("div",{style:{flex:1},children:f.jsx(IS,{pct:w.pct,color:LS[e.status]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[w.done,"/",w.total]})]}),e.body&&f.jsx("div",{style:{marginBottom:M[4],opacity:.85},children:f.jsx(S8,{resetKey:e.id??e.title,children:f.jsx(fo,{children:e.body})})}),e.clarifications&&e.clarifications.length>0&&f.jsxs("div",{style:{marginBottom:M[5]},children:[f.jsx("h3",{style:{fontFamily:ie.serif,fontSize:X.sm,fontWeight:600,margin:`0 0 ${M[3]}`,opacity:.65},children:"Clarifications"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:M[2],marginBottom:M[3]},children:e.clarifications.map((P,R)=>f.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[f.jsx("span",{style:{fontWeight:600,marginRight:M[2]},children:P.date}),P.text]},`clar-${P.date}-${R}`))})]}),!g&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],marginBottom:M[8]},children:[f.jsx(zu,{idea:x,otherPlans:v}),f.jsx(cg,{idea:x})]}),g&&f.jsxs("div",{style:{marginBottom:M[8]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:M[3],marginBottom:M[3]},children:[f.jsx("h3",{style:{fontFamily:ie.serif,fontSize:X.sm,fontWeight:600,margin:0,opacity:.65},children:"Phases"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[2]},children:[d&&f.jsx(Uh,{size:"small",label:"Audit running…"}),(e.status==="review"||e.status==="done")&&f.jsx(_8,{plan:e,disabled:c}),e.status!=="done"&&f.jsx(T8,{plan:e,disabled:c}),f.jsx(b8,{onAdd:j,disabled:h})]})]}),f.jsx(Vm,{data:e.phases,columns:[{key:"checkbox",header:"Status",cell:(P,R)=>f.jsx(BD,{checked:P.done,onChange:()=>E(R),disabled:h}),width:2},{key:"title",header:"Title",cell:P=>f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:M[2],textDecoration:P.done?"line-through":"none",opacity:P.done?.45:1},children:[P.text,P.source==="review"&&f.jsx(Ge,{size:"small",fillColor:"rgba(155, 122, 181, 0.25)",textColor:"#7B5E9E",children:"review"})]})},{key:"actions",header:"Actions",cell:(P,R)=>f.jsxs("div",{style:{display:"flex",gap:M[2],alignItems:"center"},children:[f.jsx(P8,{planTitle:e.title,planId:e.id,phaseIndex:R}),!P.done&&u===R?f.jsx(Uh,{size:"small",label:`Agent ${l==null?void 0:l.status}…`}):!P.done&&f.jsx(k8,{planId:e.id,phaseIndex:R,disabled:c})]}),width:5}],expandable:{render:P=>P.description??null},showExpandColumn:!1,rowClassName:P=>P.source==="review"?"phase-row-review":void 0})]}),f.jsxs("div",{style:{marginBottom:M[8]},children:[f.jsx("h3",{style:{fontFamily:ie.serif,fontSize:X.sm,fontWeight:600,margin:`0 0 ${M[3]}`,opacity:.65},children:"Log"}),e.log&&e.log.length>0&&f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:M[2],marginBottom:M[3]},children:e.log.map((P,R)=>f.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[f.jsx("span",{style:{fontWeight:600,marginRight:M[2]},children:P.date}),P.text]},`${P.date}-${R}`))}),f.jsxs("div",{style:{display:"flex",gap:M[2],alignItems:"flex-end"},children:[f.jsx(lo,{value:m,onChange:P=>y(P.target.value),placeholder:"Add a log entry…",rows:2}),f.jsx(Kh,{intent:"log",size:"small",onClick:L,disabled:h||!m.trim(),children:"Add entry"})]})]})]})},ss={fontSize:X.sm,fontWeight:600,opacity:.6,whiteSpace:"nowrap",overflow:"hidden"},AS=({plans:e,activePlanTitle:t,onOpen:n,onDeleteIdea:r,showHeader:i=!0})=>{const s=r?"plan-rows-grid plan-rows-grid--deletable":"plan-rows-grid";return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[1]},children:[i&&f.jsx(Ve,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:s,children:[f.jsx("span",{style:ss,children:"Id"}),f.jsx("span",{style:ss,children:"Title"}),f.jsx("span",{className:"plan-rows-cell-updated",style:ss,children:"Updated"}),f.jsx("span",{style:ss,children:"Progress"}),f.jsx("span",{style:ss,children:"Status"}),r&&f.jsx("span",{style:ss})]})}),e.map(o=>{const a=F_(o);return f.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onClick:n?()=>n(o.title):void 0,onKeyDown:n?l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n(o.title))}:void 0,className:o.title===t?"plan-row-highlighted":void 0,style:{cursor:n?"pointer":void 0,borderRadius:10},children:f.jsx(Ve,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{className:s,children:[f.jsx(Vu,{id:o.id}),f.jsx("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.title}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45,whiteSpace:"nowrap"},children:o.updated?tu(o.updated):tu(o.created)}),a?f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[1]},children:[f.jsx("div",{style:{flex:1,minWidth:0},children:f.jsx(IS,{pct:a.pct,color:LS[o.status]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[a.done,"/",a.total]})]}):f.jsx("span",{className:"text-sm",style:{opacity:.3},children:"—"}),f.jsx("div",{style:{display:"flex",alignItems:"center",gap:M[1]},children:f.jsx(Ge,{size:"small",fillColor:Ra[o.status].fill,textColor:Ra[o.status].text,children:lg[o.status]})}),r&&(o.status==="idea"?f.jsx(Vt,{icon:f.jsx("span",{children:"×"}),variant:"ghost",size:"small",label:"Delete",style:{width:28,height:28},onClick:l=>{l.stopPropagation(),r(o.title)},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&l.stopPropagation()}}):f.jsx("span",{}))]})})},o.title)})]})},I8=5,os={fontSize:X.sm,fontWeight:600,opacity:.6,whiteSpace:"nowrap",overflow:"hidden"},DS={display:"flex",alignItems:"center",gap:M[2],minWidth:0,background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left",font:"inherit",color:"inherit",fontWeight:600},NS={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},A8=()=>f.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.55,flexShrink:0},children:[f.jsx("title",{children:"Idea"}),f.jsx("path",{d:"M9 18h6M10 22h4M12 2a6 6 0 0 0-3.5 10.9c.53.4.9 1.03.9 1.72V15h5.2v-.38c0-.69.37-1.32.9-1.72A6 6 0 0 0 12 2Z"})]}),D8=()=>f.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.55,flexShrink:0},children:[f.jsx("title",{children:"Note"}),f.jsx("path",{d:"M15 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z"}),f.jsx("path",{d:"M15 3v6h6"})]}),N8=({rows:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s})=>{const[o,a]=_.useState(new Set),l=s?"plan-rows-grid plan-rows-grid--deletable":"plan-rows-grid",c=u=>{a(d=>{const h=new Set(d);return h.has(u)?h.delete(u):h.add(u),h})};return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[1]},children:[f.jsx(Ve,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:l,children:[f.jsx("span",{style:os,children:"Id"}),f.jsx("span",{style:os,children:"Title"}),f.jsx("span",{className:"plan-rows-cell-updated",style:os,children:"Updated"}),f.jsx("span",{style:os,children:"Progress"}),f.jsx("span",{style:os,children:"Status"}),s&&f.jsx("span",{style:os})]})}),e.map(u=>u.type==="plan"?f.jsx(AS,{plans:[u.plan],activePlanTitle:n,onOpen:r,onDeleteIdea:s,showHeader:!1},u.plan.title):u.type==="note"?f.jsx(z8,{row:u,onOpen:i,hasTrailingColumn:!!s},u.idea.title):f.jsx(F8,{row:u,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s,expanded:o.has(u.idea.title),onToggleExpanded:()=>c(u.idea.title)},u.idea.title))]})},z8=({row:e,onOpen:t,hasTrailingColumn:n})=>{const r=e.idea,i=r.status??"open";return f.jsx("div",{role:t?"button":void 0,tabIndex:t?0:void 0,onClick:t?()=>t(r.title):void 0,onKeyDown:t?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t(r.title))}:void 0,style:{cursor:t?"pointer":void 0,borderRadius:10},children:f.jsx(Ve,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{className:n?"plan-rows-grid plan-rows-grid--deletable":"plan-rows-grid",children:[r.id?f.jsx(Vu,{id:r.id}):f.jsx("span",{}),f.jsxs("span",{style:{...DS,cursor:"inherit"},children:[f.jsx(D8,{}),f.jsx("span",{style:NS,children:r.title})]}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45},children:"—"}),f.jsx("span",{className:"text-sm",style:{opacity:.3},children:"—"}),f.jsx(Ge,{size:"small",fillColor:iu[i].fill,textColor:iu[i].text,children:MS[i]}),n&&f.jsx("span",{})]})})})},F8=({row:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s,expanded:o,onToggleExpanded:a})=>{const l=e.idea,c=e.children,u=c.filter(m=>m.status==="done"),d=c.filter(m=>m.status!=="done"),h=c.length>I8,p=h&&!o?d:c;return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[1]},children:[f.jsx(Ve,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{style:{display:"grid",gridTemplateColumns:"76px minmax(0, 1fr) 84px 1fr",gap:M[2],alignItems:"center"},children:[l.id?f.jsx(Vu,{id:l.id}):f.jsx("span",{}),f.jsxs("button",{type:"button",onClick:()=>i==null?void 0:i(l.title),style:DS,children:[f.jsx(A8,{}),f.jsx("span",{style:NS,children:l.title})]}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45},children:"—"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:M[2]},children:[f.jsx("span",{className:"text-sm",style:{opacity:c.length>0?.6:.3},children:c.length>0?`${u.length}/${c.length} plans done`:"—"}),f.jsx(cg,{idea:l,compact:!0}),f.jsx(zu,{idea:l,otherPlans:t})]})]})}),c.length>0&&f.jsxs("div",{style:{marginLeft:M[5],paddingLeft:M[3],borderLeft:"2px solid rgba(0,0,0,0.08)",display:"flex",flexDirection:"column",gap:M[1]},children:[f.jsx(AS,{plans:p,activePlanTitle:n,onOpen:r,onDeleteIdea:s,showHeader:!1}),h&&f.jsx("button",{type:"button",onClick:a,style:{alignSelf:"flex-start",background:"none",border:"none",padding:`${M[1]} 0`,opacity:.6,cursor:"pointer",textDecoration:"underline",fontSize:X.xs,font:"inherit"},children:o?"Show less":`+${u.length} done`})]})]})},B8=({plans:e,rows:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s})=>{const o=_.useRef(null);return _.useEffect(()=>{var l;if(!n)return;const a=(l=o.current)==null?void 0:l.querySelector(".plan-row-highlighted");a==null||a.scrollIntoView({behavior:"smooth",block:"center"})},[n]),f.jsx("div",{ref:o,children:t.length>0?f.jsx(N8,{rows:t,plans:e,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s}):f.jsx("p",{style:{opacity:.5,padding:`${M[6]} 0`,textAlign:"center"},children:"No plans match your filters."})})},O8=({idea:e})=>f.jsxs("div",{style:{fontFamily:ie.body,fontSize:X.base,lineHeight:Gt.relaxed,color:"#1C1B18"},children:[f.jsxs("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${M[4]}`,lineHeight:Gt.tight,display:"flex",alignItems:"center",gap:M[3]},children:[e.id&&f.jsx(Ge,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e.id}),e.title,e.status&&f.jsx(Ge,{size:"small",fillColor:iu[e.status].fill,textColor:iu[e.status].text,children:MS[e.status]})]}),f.jsx(fo,{children:e.body.replace(/^#{1,3}\s+.+(\n|$)/,"").replace(/^\s*-{3,}\s*(\n|$)/,"").trim()}),f.jsx("div",{style:{marginTop:M[6]},children:f.jsx(cg,{idea:e})})]}),$8=()=>{const e=K(o=>o.launchBatchReconcile),t=K(o=>o.agentStatus),[n,r]=_.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 f.jsx(oe,{variant:"ghost",size:"small",onClick:s,disabled:i||n,style:{color:ae.textSecondary},children:"Actualise all"})},V8=()=>{const e=K(o=>o.loadPlans),t=K(o=>o.gitBranchHygiene),[n,r]=_.useState(!1),i=t==="stale-merged",s=async o=>{await zO(o),await e(),r(!1)};return f.jsxs(f.Fragment,{children:[f.jsx(hn,{content:i?"Switch to main first":void 0,children:f.jsx(Vt,{icon:f.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:i?"Switch to main first":"Quick plan",disabled:i,onClick:()=>r(!0)})}),f.jsx(a4,{open:n,onClose:()=>r(!1),onAdd:s})]})},W8=({open:e,onClose:t,onAdd:n})=>{const[r,i]=_.useState(""),[s,o]=_.useState(""),[a,l]=_.useState(!1),[c,u]=_.useState(!1),[d,h]=_.useState(null),[p,m]=_.useState(null),[y,w]=_.useState(!1),[g,x]=_.useState(null),[v,b]=_.useState(null),S=K(A=>{var D;return((D=A.plans)==null?void 0:D.entries)??[]}),C=K(A=>A.loadPlans),E=K(A=>A.agentStatus),j=E!==null&&E.status!=="done"&&E.status!=="error",L=gn(),{toast:P}=ci(),R=K_(r,S.map(A=>({id:A.id,title:A.title,body:A.body,tags:A.tags,log:A.log})));_.useEffect(()=>{e&&(i(""),o(""),l(!1),u(!1),h(null),w(!1),x(null),b(null))},[e]);const I=A=>{t(),L({to:"/plans/$planId",params:{planId:encodeURIComponent(A)}})},F=async()=>{const A=`${r.trim()}${s.trim()?`
180
-
181
- ${s.trim()}`:""}`;if(A){w(!0),b(null),x(null);try{const D=S.map(O=>({id:O.id,title:O.title,body:O.body,tags:O.tags}));x(await O_(A,D))}catch(D){b(D.message)}finally{w(!1)}}},B=A=>{const D=S.find(O=>O.id===A);D&&I(D.title)},z=async(A,D)=>{m(A);try{const k={date:new Date().toISOString().slice(0,10),text:r.trim()};await Wr(A,{log:[...D??[],k]}),await C(),t()}catch(O){P({title:"Extend failed",description:O.message,variant:"error"})}finally{m(null)}},G=async A=>{if(A.preventDefault(),!(!r.trim()||c)){h(null),u(!0);try{await n({title:r.trim(),content:s.trim()||void 0,kind:a?"note":void 0}),t()}catch(D){h(D.message)}finally{u(!1)}}};return f.jsx(ao,{open:e,onClose:t,title:"New idea",size:"small",children:f.jsxs("form",{onSubmit:G,style:{display:"flex",flexDirection:"column",gap:M[4]},children:[f.jsx(Rn,{label:"Title",value:r,onChange:A=>i(A.target.value),placeholder:"Idea title…",disabled:c,autoFocus:!0,required:!0}),R.length>0&&f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[2]},children:[f.jsx("span",{style:{fontSize:X.sm,opacity:.6,fontWeight:600},children:"Similar ideas"}),R.map(({candidate:A})=>{const D={id:A.id??null,title:A.title,body:A.body,log:A.log},O=S.filter(k=>k.id!==A.id);return f.jsx(Ve,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[2]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[2],minWidth:0},children:[A.id&&f.jsx(Ge,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:A.id}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:A.title})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:M[2]},children:[f.jsx(oe,{type:"button",variant:"ghost",size:"small",onClick:()=>I(A.title),children:"Open it"}),f.jsx(oe,{type:"button",variant:"ghost",size:"small",disabled:!A.id||!r.trim()||p!==null,onClick:()=>A.id&&z(A.id,A.log),children:p===A.id?"Extending…":"Extend it instead"}),f.jsx(zu,{idea:D,otherPlans:O})]})]})},A.id??A.title)})]}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[2]},children:[f.jsx("div",{children:f.jsx(oe,{type:"button",variant:"ghost",size:"small",disabled:!r.trim()||y||j,onClick:F,children:y?"Checking overlap…":"Check overlap"})}),v&&f.jsx("p",{style:{margin:0,color:ae.accentRoseDark,fontSize:X.sm},children:v}),g&&f.jsx(Ve,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[2]},children:[f.jsx("span",{style:{fontWeight:600},children:g.verdict==="new"?"Looks genuinely new":g.verdict==="extend"?`Extends ${g.targetId??"an existing idea"}`:`Belongs inside ${g.targetId??"an existing idea"}`}),f.jsx("span",{style:{fontSize:X.sm,opacity:.8},children:g.reasoning}),g.targetId&&f.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:f.jsx(oe,{type:"button",variant:"ghost",size:"small",onClick:()=>B(g.targetId),children:"Open it"})})]})})]}),f.jsx(lo,{label:"Description",value:s,onChange:A=>o(A.target.value),placeholder:"Optional details…",disabled:c,rows:4}),f.jsx(BF,{label:"Note — never needs a plan",checked:a,onChange:A=>l(A.target.checked),disabled:c}),d&&f.jsx("p",{style:{margin:0,color:ae.accentRoseDark,fontSize:X.sm},children:d}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:M[2]},children:[f.jsx(oe,{type:"button",variant:"ghost",onClick:t,disabled:c,children:"Cancel"}),f.jsx(oe,{type:"submit",variant:"primary",disabled:!r.trim()||c,children:"Add"})]})]})})},U8=()=>{const e=K(i=>i.loadIdeas),[t,n]=_.useState(!1),r=async i=>{await DO(i),await e(),n(!1)};return f.jsxs(f.Fragment,{children:[f.jsx(Vt,{icon:f.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:"New idea",onClick:()=>n(!0)}),f.jsx(W8,{open:t,onClose:()=>n(!1),onAdd:r})]})},H8=[{value:"status",label:"Status"},{value:"updated",label:"Updated"},{value:"created",label:"Created"},{value:"title",label:"Title"},{value:"id",label:"ID"},{value:"progress",label:"Phase progress"}],Bv=()=>{const e=K(r=>r.planFilters),t=K(r=>r.setPlanSortKey),n=K(r=>r.togglePlanSortDirection);return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],marginBottom:M[6]},children:[f.jsx("h1",{className:"text-4xl",style:{flex:1,fontFamily:ie.serif,fontWeight:600,color:ae.textPrimary,margin:0,lineHeight:1.1},children:"Plans"}),f.jsxs("div",{style:{display:"flex",gap:M[2],alignItems:"center"},children:[f.jsx(Is,{size:"small",options:H8,value:e.sortKey,onChange:r=>t(r)}),f.jsx(Vt,{icon:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:e.sortDirection==="desc"?"rotate(180deg)":void 0,transition:"transform 0.15s ease"},children:[f.jsx("title",{children:"Sort direction"}),f.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),f.jsx("polyline",{points:"5 12 12 5 19 12"})]}),label:e.sortDirection==="asc"?"Sort ascending":"Sort descending",size:"small",variant:"ghost",onClick:n})]}),f.jsx(U8,{}),f.jsx(V8,{}),f.jsx($8,{})]})},G8=[{key:"a",title:"72%"},{key:"b",title:"54%"},{key:"c",title:"83%"},{key:"d",title:"46%"},{key:"e",title:"66%"},{key:"f",title:"58%"}],K8=()=>f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[1]},"aria-hidden":"true",children:[f.jsx(Ve,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:"plan-rows-grid",children:[f.jsx(Dn,{variant:"text",width:28}),f.jsx(Dn,{variant:"text",width:44}),f.jsx("span",{className:"plan-rows-cell-updated",children:f.jsx(Dn,{variant:"text",width:56})}),f.jsx(Dn,{variant:"text",width:64}),f.jsx(Dn,{variant:"text",width:48})]})}),G8.map(e=>f.jsx(Ve,{size:"small",className:"plan-row-card",children:f.jsxs("div",{className:"plan-rows-grid",children:[f.jsx(Dn,{variant:"rect",width:44,height:18}),f.jsx(Dn,{variant:"text",width:e.title}),f.jsx("span",{className:"plan-rows-cell-updated",children:f.jsx(Dn,{variant:"text",width:52})}),f.jsx(Dn,{variant:"rect",width:80,height:8}),f.jsx(Dn,{variant:"rect",width:64,height:20})]})},e.key))]});function pf(e,t){const n=e.split(/(\s+)/).filter(u=>u!==""),r=t.split(/(\s+)/).filter(u=>u!==""),i=n.length,s=r.length,o=Array.from({length:i+1},()=>new Array(s+1).fill(0));for(let u=i-1;u>=0;u--)for(let d=s-1;d>=0;d--)o[u][d]=n[u]===r[d]?o[u+1][d+1]+1:Math.max(o[u+1][d],o[u][d+1]);const a=[];let l=0,c=0;for(;l<i&&c<s;)n[l]===r[c]?(a.push({type:"same",text:n[l]}),l++,c++):o[l+1][c]>=o[l][c+1]?(a.push({type:"removed",text:n[l]}),l++):(a.push({type:"added",text:r[c]}),c++);for(;l<i;)a.push({type:"removed",text:n[l]}),l++;for(;c<s;)a.push({type:"added",text:r[c]}),c++;return Q8(a)}function Q8(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 mf=({tokens:e})=>f.jsx(f.Fragment,{children:e.map((t,n)=>{if(t.type==="same")return f.jsx("span",{children:t.text},`${t.type}-${n}`);const r=t.type==="added";return f.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}`)})}),Ov=e=>f.jsx("h4",{style:{fontFamily:ie.serif,fontSize:X.xs,fontWeight:600,margin:`0 0 ${M[2]}`,opacity:.65},children:e}),Y8=({plan:e,before:t,onApprove:n,onDiscard:r,queuePosition:i})=>{const[s,o]=_.useState(!1),a=e.body!==t.body,l=e.phases.map((u,d)=>({phase:u,before:t.phases[d],index:d})).filter(({phase:u,before:d})=>d!==void 0&&(u.text!==d.text||(u.description??"")!==(d.description??""))),c=async()=>{o(!0);try{await r()}finally{o(!1)}};return f.jsx(ao,{open:!0,title:i?`Review reconcile changes (${i.index} of ${i.total})`:"Review reconcile changes",size:"large",onClose:c,children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[5]},children:[f.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.']}),!a&&l.length===0&&f.jsx("p",{className:"text-sm",style:{margin:0,opacity:.6},children:"No wording changed."}),a&&f.jsxs("div",{children:[Ov("Body"),f.jsx("p",{className:"text-base",style:{margin:0,lineHeight:Gt.normal},children:f.jsx(mf,{tokens:pf(t.body,e.body)})})]}),l.length>0&&f.jsxs("div",{children:[Ov("Phases"),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:M[3]},children:l.map(({phase:u,before:d,index:h})=>f.jsxs("div",{className:"text-sm",style:{lineHeight:Gt.normal},children:[f.jsx(mf,{tokens:pf(d.text,u.text)}),(u.description||d.description)&&f.jsx("div",{style:{opacity:.85,marginTop:M[1]},children:f.jsx(mf,{tokens:pf(d.description??"",u.description??"")})})]},h))})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:M[2]},children:[f.jsx(Kh,{intent:"stop",size:"small",onClick:c,disabled:s,children:"Discard"}),f.jsx(Kh,{intent:"go",size:"small",onClick:n,disabled:s,children:"Approve"})]})]})})},q8=()=>{const e=K(c=>c.reconcileQueue),t=K(c=>c.removeFromReconcileQueue),n=K(c=>c.plans),r=K(c=>c.loadPlans),{toast:i}=ci(),s=e[0]??null,o=s?(n==null?void 0:n.entries.find(c=>c.id===s.planId))??null:null;if(_.useEffect(()=>{s&&!o&&t(s.planId)},[s,o,t]),!s||!o)return null;const a=()=>{t(s.planId)},l=async()=>{try{await Wr(o.title,{body:s.before.body,phases:s.before.phases}),await r(),t(s.planId)}catch(c){i({title:"Discard failed",description:c.message,variant:"error"})}};return f.jsx(Y8,{plan:o,before:s.before,onApprove:a,onDiscard:l,queuePosition:{index:1,total:e.length}})},ug=()=>{const{plans:e,plansError:t,ideaEntries:n,loadPlans:r,planFilters:i}=K(),s=Gm(),o=ZO(),a=gn(),l=()=>{a({to:"/"})},c=g=>{a({to:"/plans/$planId",params:{planId:encodeURIComponent(g)}})},u=g=>{a({to:"/ideas/$ideaId",params:{ideaId:encodeURIComponent(g)}})},[d,h]=_.useState(null),p=async g=>{await FO(g),await r(),s===g&&a({to:"/"})},m=s?e==null?void 0:e.entries.find(g=>g.title===s):null,y=o?n.find(g=>g.title===o):null;if(t)return f.jsxs("div",{children:[f.jsx(Ss,{children:"Plans"}),f.jsxs(Ve,{size:"small",accent:!0,accentColor:"rose",children:[f.jsx("p",{style:{margin:0,fontWeight:600},children:"Couldn't load plans.md"}),f.jsx("p",{style:{margin:0,opacity:.75},children:t})]})]});if(!e)return f.jsxs("div",{children:[f.jsx(Bv,{}),f.jsx("output",{"aria-live":"polite",className:"sr-only",children:"Loading plans…"}),f.jsx(K8,{})]});const{rows:w}=eO(e.entries,n,i);return f.jsxs(f.Fragment,{children:[f.jsx(q8,{}),m?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:M[4]},children:f.jsx(Hh,{items:[{id:"plans",label:"Plans",onClick:l},{id:"plan",label:m.title}]})}),f.jsx(M8,{plan:m})]}):y?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:M[4]},children:f.jsx(Hh,{items:[{id:"plans",label:"Plans",onClick:l},{id:"idea",label:y.title}]})}),f.jsx(O8,{idea:y})]}):f.jsxs("div",{children:[f.jsx(Bv,{}),e.warnings.length>0&&f.jsxs(Ve,{size:"small",accent:!0,accentColor:"amber",children:[f.jsx("p",{style:{margin:0,fontWeight:600},children:"Some entries couldn't be parsed"}),f.jsx("ul",{style:{margin:0,paddingLeft:M[5]},children:e.warnings.map(g=>f.jsxs("li",{children:[g.title,": ",g.message]},g.title))})]}),e.entries.length===0?f.jsxs("p",{style:{opacity:.5},children:["No plans yet. Run ",f.jsx("code",{children:'paper-camp add plan "name"'}),", or add one to the backlog above."]}):f.jsx(B8,{plans:e.entries,rows:w,activePlanTitle:s,onOpenPlan:c,onOpenIdea:u,onDeleteIdea:h}),f.jsx(m8,{title:d,onClose:()=>h(null),onConfirm:p})]})]})},$v=8,X8=["in-progress","review","planned","idea","done","dropped"],Z8={...lg,idea:"Backlog"},Vv={fontSize:X["2xs"],fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:ae.textTertiary,margin:`0 0 ${M[2]}`},J8=()=>{const e=K(g=>g.plans),t=Gm(),n=K(g=>g.planFilters),r=K(g=>g.togglePlanStatus),i=K(g=>g.togglePlanTag),s=K(g=>g.setPlanSearch),[o,a]=_.useState(!1);if(!e||t)return null;const{statusCounts:l,tagCounts:c}=ac(e.entries,n),u=new Set(n.statuses),d=new Set(n.tags),p=[...new Set([...Object.keys(c),...n.tags])].sort((g,x)=>{const v=(c[x]??0)-(c[g]??0);return v!==0?v:g.localeCompare(x)}),m=o?p:p.slice(0,$v),y=p.length-m.length,w={background:"none",border:"none",padding:0,cursor:"pointer",opacity:.7,textDecoration:"underline",fontSize:X["2xs"]};return f.jsx("div",{style:{marginTop:`calc(-1 * ${M[5]})`},children:f.jsx(Ve,{surface:"paper",texture:"speckle",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[5]},children:[f.jsx("h2",{style:{margin:0,fontFamily:ie.serif,fontSize:X.base,color:ae.textPrimary},children:"Filters"}),f.jsx(Rn,{type:"search",size:"small",placeholder:"Search plans…","aria-label":"Search plans",value:n.search,onChange:g=>s(g.target.value)}),f.jsxs("div",{children:[f.jsx("div",{style:Vv,children:"Status"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:M[1]},children:X8.map(g=>{const x=u.has(g);return f.jsxs("button",{type:"button",onClick:()=>r(g),"aria-pressed":x,style:{display:"flex",alignItems:"center",gap:M[2],width:"100%",padding:`${M[1]} ${M[2]}`,borderRadius:6,border:"none",cursor:"pointer",textAlign:"left",background:x?"rgba(0,0,0,0.05)":"transparent",opacity:x?1:.5},children:[f.jsx("span",{style:{width:9,height:9,borderRadius:"50%",flexShrink:0,background:Ra[g].text}}),f.jsx("span",{style:{flex:1,fontSize:X.xs,color:ae.textPrimary},children:Z8[g]}),f.jsx("span",{style:{fontSize:X["2xs"],color:ae.textSecondary},children:l[g]})]},g)})})]}),f.jsxs("div",{children:[f.jsx("div",{style:Vv,children:"Tags"}),f.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:M[1],alignItems:"center"},children:[p.length===0&&f.jsx("span",{style:{opacity:.5,fontSize:X["2xs"]},children:"No tags"}),m.map(g=>{const x=d.has(g);return f.jsxs("button",{type:"button",onClick:()=>i(g),"aria-pressed":x,style:{fontSize:X["2xs"],padding:`2px ${M[2]}`,borderRadius:6,border:"0.5px solid rgba(0,0,0,0.12)",cursor:"pointer",background:x?"rgba(0,0,0,0.08)":"transparent",opacity:x?1:.55},children:[g," ",c[g]??0]},g)}),y>0&&f.jsxs("button",{type:"button",onClick:()=>a(!0),style:w,children:["+",y," more"]}),o&&p.length>$v&&f.jsx("button",{type:"button",onClick:()=>a(!1),style:w,children:"Show less"})]})]})]})})})},eW=({plan:e,disabled:t})=>{const n=K(a=>a.launchFixReview),[r,i]=_.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id)}catch(a){alert(a.message)}finally{i(!1)}}},o=t||r||!e.id;return f.jsx(hn,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(Cn,{size:"small",icon:f.jsx("span",{style:{color:ae.accentAmberDark},children:"⚑"}),onClick:s,disabled:o,style:o?{opacity:.5}:void 0,children:r?"Starting…":"Fix review comments"})})},tW=({plan:e,disabled:t})=>{const n=K(a=>a.launchRunAll),[r,i]=_.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id)}catch(a){alert(a.message)}finally{i(!1)}}},o=t||r||!e.id;return f.jsx(hn,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(Cn,{size:"small",icon:f.jsx("span",{style:{color:ae.textSecondary},children:"▶"}),onClick:s,disabled:o,style:o?{opacity:.5}:void 0,children:r?"Starting…":"Run all phases"})})},gf={fontSize:X["2xs"],fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:ae.textTertiary,margin:`0 0 ${M[2]}`},nW=()=>{const e=K(w=>w.plans),t=Gm(),n=K(w=>w.loadPlans),r=K(w=>w.agentStatus),{toast:i}=ci(),[s,o]=_.useState(!1),a=t?e==null?void 0:e.entries.find(w=>w.title===t):null;if(!a)return null;const l=r!==null&&r.status!=="done"&&r.status!=="error",c=a.status==="in-progress",u=a.status==="review",d=a.status==="dropped",h=a.phases.some(w=>!w.done),p=(a.status==="planned"||c)&&h,m=!!(a.pr&&(a.pr.state==="open"||a.pr.state==="draft")&&a.pr.unresolvedThreadCount),y=async w=>{o(!0);try{await Wr(a.title,w),await n()}catch(g){i({title:"Update failed",description:g.message,variant:"error"})}finally{o(!1)}};return f.jsx("div",{style:{marginTop:`calc(-1 * ${M[5]})`},children:f.jsx(Ve,{surface:"paper",texture:"speckle",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[5]},children:[f.jsx("h2",{style:{margin:0,fontFamily:ie.serif,fontSize:X.base,color:ae.textPrimary},children:"Plan"}),f.jsxs("div",{children:[f.jsx("div",{style:gf,children:"Status"}),f.jsx(Ge,{size:"small",fillColor:Ra[a.status].fill,textColor:Ra[a.status].text,children:lg[a.status]})]}),f.jsxs("div",{children:[f.jsx("div",{style:gf,children:"Agent"}),f.jsx(Is,{size:"small",value:a.agent??"",onChange:w=>y({agent:w||null}),disabled:s,options:[{value:"",label:"Project default agent"},...z_.map(w=>({value:w,label:Wm[w]}))]})]}),f.jsxs("div",{children:[f.jsx("div",{style:gf,children:"Actions"}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:M[1]},children:[p&&f.jsx(tW,{plan:a,disabled:l}),m&&f.jsx(eW,{plan:a,disabled:l}),u&&f.jsx(Cn,{size:"small",icon:f.jsx("span",{style:{color:ae.accentGreenDark},children:"✓"}),onClick:()=>y({status:"done"}),disabled:s,style:s?{opacity:.5}:void 0,children:"Approve & close"}),f.jsx(Cn,{size:"small",icon:f.jsx("span",{style:{color:d?ae.accentGreenDark:ae.accentRoseDark},children:d?"↺":"⊘"}),onClick:()=>y({status:d?null:"dropped"}),disabled:s,style:s?{opacity:.5}:void 0,children:d?"Reopen plan":"Mark dropped"})]})]})]})})})},rW=async()=>{try{return(await fetch("/api/config")).json()}catch{return null}},yf=async e=>{try{return(await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok}catch{return!1}},iW=async()=>{try{return(await(await fetch("/api/configs")).json()).files}catch{return[]}},sW=async e=>{try{const t=await fetch(`/api/configs?name=${encodeURIComponent(e)}`);return t.ok?(await t.json()).content:null}catch{return null}},zS=async()=>{try{return await(await fetch("/api/env")).json()}catch{return{exists:!1,exampleExists:!1,entries:[],missingKeys:[]}}},oW=async e=>{try{return(await fetch("/api/env",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entries:e})})).ok}catch{return!1}},Wv=["phase","planDraft","ideaExtend","commitSuggest"],aW={phase:"Phase run",planDraft:"Plan draft",ideaExtend:"Idea extend",commitSuggest:"Commit suggest"},FS=110,BS=140,op=160,OS=110,lW=()=>f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],paddingBottom:M[1]},children:[f.jsx("span",{style:{width:FS,flexShrink:0,fontSize:X.sm,opacity:.45},children:"Task"}),f.jsx("span",{style:{width:BS,flexShrink:0,fontSize:X.sm,opacity:.45},children:"Agent"}),f.jsx("span",{style:{width:op,flexShrink:0,fontSize:X.sm,opacity:.45},children:"Model"}),f.jsx("span",{style:{width:OS,flexShrink:0,fontSize:X.sm,opacity:.45},children:"Effort"})]}),cW=({taskKey:e,agentConfig:t,isLast:n,onSave:r})=>{const i=qd[t.agent]??qd["claude-code"],s=i.model,o=i.effort,[a,l]=_.useState(t.model??"");_.useEffect(()=>{l(t.model??"")},[t.model]);const c=p=>{var g;const m=p,y=qd[m],w={agent:m};t.model&&(y.model===null||(g=y.model)!=null&&g.includes(t.model))&&(w.model=t.model),t.effort&&Array.isArray(y.effort)&&(w.effort=t.effort),r(e,w)},u=p=>{r(e,{...t,model:p||void 0})},d=()=>{r(e,{...t,model:a||void 0})},h=p=>{r(e,{...t,effort:p||void 0})};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],paddingBottom:M[2],paddingTop:M[2]},children:[f.jsx("span",{style:{width:FS,flexShrink:0,fontSize:X.sm,opacity:.65},children:aW[e]}),f.jsx(Is,{size:"small",width:BS,value:t.agent,onChange:c,options:z_.map(p=>({value:p,label:Wm[p]}))}),Array.isArray(s)?f.jsx(Is,{size:"small",width:op,value:t.model??"",onChange:u,options:[{value:"",label:"Default"},...s.map(p=>({value:p,label:p}))]}):s===null?f.jsx(Rn,{size:"small",style:{width:op},value:a,placeholder:"Default model",onChange:p=>l(p.target.value),onBlur:d}):null,f.jsx("div",{style:{visibility:Array.isArray(o)?"visible":"hidden"},children:f.jsx(Is,{size:"small",width:OS,value:t.effort??"",onChange:h,options:[{value:"",label:"Default"},...(Array.isArray(o)?o:[]).map(p=>({value:p,label:p}))]})})]}),!n&&f.jsx(As,{})]})},uW=()=>{const e=_.useRef(null),[t,n]=_.useState(void 0),{iconDataUri:r,loading:i}=V_(),[s,o]=_.useState(null),a=s??r,[l,c]=_.useState(!1),[u,d]=_.useState(""),[h,p]=_.useState(""),{toast:m}=ci();_.useEffect(()=>{rW().then(v=>{n(v),(v==null?void 0:v.port)!==void 0&&d(String(v.port)),(v==null?void 0:v.projectName)!==void 0&&p(v.projectName)})},[]);const y=async(v,b)=>{const S=t==null?void 0:t.defaultAgents,C={phase:(S==null?void 0:S.phase)??Mo.phase,planDraft:(S==null?void 0:S.planDraft)??Mo.planDraft,ideaExtend:(S==null?void 0:S.ideaExtend)??Mo.ideaExtend,commitSuggest:(S==null?void 0:S.commitSuggest)??Mo.commitSuggest,[v]:b};await yf({defaultAgents:C})?(n(j=>j&&{...j,defaultAgents:C}),m({title:"Saved",variant:"success"})):m({title:"Failed to save",variant:"error"})},w=async()=>{const v=Number(u);if(!t||!Number.isInteger(v)||v<=0||v===t.port)return;await yf({port:v})?(n(S=>S&&{...S,port:v}),m({title:"Saved",variant:"success"})):m({title:"Failed to save",variant:"error"})},g=async()=>{const v=h.trim();if(!t||!v||v===t.projectName)return;await yf({projectName:v})?(n(S=>S&&{...S,projectName:v}),p(v),m({title:"Saved",variant:"success"})):m({title:"Failed to save",variant:"error"})},x=async v=>{var C;const b=(C=v.target.files)==null?void 0:C[0];if(!b)return;c(!0);const S=new FileReader;S.onloadend=async()=>{const E=S.result,j=await QO(E);c(!1),j?(o(E),m({title:"Saved",variant:"success"})):m({title:"Failed to save",variant:"error"})},S.readAsDataURL(b)};return f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:M[6]},children:f.jsx("h2",{style:{margin:0},children:"Project Info"})}),t===void 0&&f.jsx("p",{children:"Loading…"}),t===null&&f.jsxs(Vr,{variant:"warning",children:["No papercamp/config.json found — run ",f.jsx("code",{children:"paper-camp init"})," in this directory first."]}),t&&f.jsxs(Ve,{size:"small",children:[f.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:M[3],paddingBottom:M[3]},children:[f.jsx(Rn,{value:h,onChange:v=>p(v.target.value),onBlur:g,label:"Project Name"}),f.jsxs(Ge,{size:"small",fillColor:"rgba(143, 185, 150, 0.25)",textColor:ae.accentGreenDark,children:["v",t.version]})]}),f.jsx(As,{}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],paddingBottom:M[3],paddingTop:M[3]},children:[a&&f.jsx("img",{src:a,alt:"Project icon",style:{width:40,height:40,objectFit:"contain",flexShrink:0,borderRadius:4}}),f.jsxs("div",{children:[f.jsx("input",{ref:e,type:"file",accept:".svg,.png,.jpg,.jpeg,.gif,.webp",onChange:x,style:{display:"none"}}),f.jsx(oe,{variant:"secondary",size:"small",onClick:()=>{var v;return(v=e.current)==null?void 0:v.click()},disabled:l,children:l?"Uploading…":"Choose File"}),i&&f.jsx("p",{className:"text-sm",style:{opacity:.5,margin:`${M[1]} 0 0`},children:"Loading…"}),!i&&!a&&!l&&f.jsx("p",{className:"text-sm",style:{opacity:.45,margin:`${M[1]} 0 0`},children:"No icon set."})]})]}),f.jsx(As,{}),f.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:M[3],paddingBottom:M[3],paddingTop:M[3]},children:f.jsx(Rn,{type:"number",value:u,onChange:v=>d(v.target.value),onBlur:w,label:"Port",helperText:"Default for `paper-camp dev`. Does not affect the running server."})}),f.jsx(As,{}),f.jsx(lW,{}),Wv.map((v,b)=>{var S;return f.jsx(cW,{taskKey:v,agentConfig:((S=t.defaultAgents)==null?void 0:S[v])??Mo[v],isLast:b===Wv.length-1,onSave:y},v)})]}),f.jsxs("p",{style:{opacity:.45,fontSize:X.sm,marginTop:M[4]},children:[f.jsx("strong",{children:"Initialized:"})," ",t?new Date(t.initializedAt).toLocaleString():"—"]})]})},dW=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}},fW=({fileName:e})=>{const[t,n]=_.useState(null),[r,i]=_.useState(!0);if(_.useEffect(()=>{i(!0),sW(e).then(o=>{n(o),i(!1)})},[e]),r)return f.jsx("p",{children:"Loading…"});if(t===null)return f.jsxs(Vr,{variant:"warning",children:["Could not load file — ",e," not found."]});const s=e==="package.json"?dW(t):null;return f.jsxs("div",{children:[f.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:M[4]},children:f.jsx("h2",{style:{margin:0},children:e})}),s?f.jsx(Vm,{data:s,columns:[{key:"name",header:"Script",cell:o=>f.jsx("span",{style:{fontFamily:ie.mono},children:o.name}),width:4},{key:"command",header:"Command",cell:o=>f.jsx("span",{style:{fontFamily:ie.mono},children:o.command})}]}):f.jsx(wN,{code:t,filename:e})]})},Uv=e=>/key|secret|token|password/i.test(e),hW=()=>{const[e,t]=_.useState(!0),[n,r]=_.useState([]),[i,s]=_.useState([]),[o,a]=_.useState(new Set),[l,c]=_.useState(!1),[u,d]=_.useState(!1),[h,p]=_.useState(null);_.useEffect(()=>{zS().then(b=>{r(b.entries),s(b.missingKeys),t(!1)})},[]);const m=(b,S)=>{r(C=>C.map((E,j)=>j===b?{...E,...S}:E))},y=()=>r(b=>[...b,{key:"",value:""}]),w=b=>{r(S=>[...S,{key:b,value:""}]),s(S=>S.filter(C=>C!==b))},g=b=>{r(S=>S.filter((C,E)=>E!==b)),a(S=>{const C=new Set(S);return C.delete(b),C})},x=b=>a(S=>{const C=new Set(S);return C.has(b)?C.delete(b):C.add(b),C}),v=async()=>{const b=n.map(E=>({key:E.key.trim(),value:E.value})).filter(E=>E.key.length>0);if(new Set(b.map(E=>E.key)).size!==b.length){p("Duplicate keys are not allowed");return}p(null),c(!0);const C=await oW(b);c(!1),C?(r(b),d(!0),setTimeout(()=>d(!1),2e3)):p("Failed to save .env")};return e?f.jsx("p",{children:"Loading…"}):f.jsxs("div",{children:[f.jsx("h2",{style:{margin:0,marginBottom:M[4]},children:"Environment Variables"}),h&&f.jsxs(Vr,{variant:"warning",children:["Could not save — ",h]}),i.length>0&&f.jsxs(Ve,{size:"small",accent:!0,accentColor:"amber",children:[f.jsx("p",{style:{margin:0,fontWeight:600},children:"Missing from .env"}),f.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:M[2],alignItems:"center"},children:[f.jsx("span",{children:"Present in .env.example but not set:"}),i.map(b=>f.jsxs(oe,{variant:"secondary",size:"small",onClick:()=>w(b),children:["+ ",b]},b))]})]}),f.jsx(Vm,{data:n,columns:[{key:"key",header:"Key",cell:(b,S)=>f.jsx(Rn,{value:b.key,placeholder:"KEY",style:{fontFamily:ie.mono},onChange:C=>m(S,{key:C.target.value})}),width:6},{key:"value",header:"Value",cell:(b,S)=>{const C=Uv(b.key)&&!o.has(S);return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[2]},children:[f.jsx(Rn,{type:C?"password":"text",value:b.value,placeholder:"value",style:{fontFamily:ie.mono,flex:1},onChange:E=>m(S,{value:E.target.value})}),Uv(b.key)&&f.jsx(oe,{variant:"ghost",size:"small",onClick:()=>x(S),children:C?"Show":"Hide"})]})}},{key:"actions",header:"",width:2,cell:(b,S)=>f.jsx(Vt,{icon:f.jsx(oo,{}),variant:"ghost",size:"small",label:"Remove variable",onClick:()=>g(S)})}]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:M[3],marginTop:M[4]},children:[f.jsx(oe,{variant:"secondary",size:"small",onClick:y,children:"+ Add variable"}),f.jsx(oe,{variant:"primary",size:"small",onClick:v,disabled:l,children:l?"Saving…":"Save"}),u&&f.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]})]})},pW=()=>{const e=K(t=>t.activeSettingsSection);return f.jsxs("div",{children:[f.jsx(Ss,{children:"Settings"}),e==="general"&&f.jsx(uW,{}),e==="env"&&f.jsx(hW,{}),e.startsWith("config:")&&f.jsx(fW,{fileName:e.slice(7)})]})},mW=()=>{const e=K(o=>o.activeSettingsSection),t=K(o=>o.setActiveSettingsSection),n=K(o=>o.settingsConfigFiles),r=K(o=>o.setSettingsConfigFiles),[i,s]=_.useState(!1);return _.useEffect(()=>{iW().then(r),zS().then(o=>s(o.exists||o.exampleExists))},[r]),f.jsxs(f.Fragment,{children:[f.jsx(Li,{label:"General",children:f.jsx(Cn,{size:"small",active:e==="general",onClick:()=>t("general"),children:"Project Info"})}),i&&f.jsx(Li,{label:"Environment",children:f.jsx(Cn,{size:"small",active:e==="env",onClick:()=>t("env"),children:"Env Vars"})}),n.length>0&&f.jsx(Li,{label:"Config Files",children:n.map(o=>f.jsx(Cn,{size:"small",active:e===`config:${o}`,onClick:()=>t(`config:${o}`),children:o},o))})]})},Hv=[{id:"plans",label:"Plans",path:"/"},{id:"docs",label:"Docs",path:"/docs"},{id:"settings",label:"Settings",path:"/settings"}],$S="stack-open";function gW(){try{return localStorage.getItem($S)==="true"}catch{return!1}}function yW(e){try{localStorage.setItem($S,String(e))}catch{}}const xW="(min-width: 1440px)",Gv=32;function vW(e){const[t,n]=_.useState(()=>typeof window<"u"?window.matchMedia(e).matches:!1);return _.useEffect(()=>{const r=window.matchMedia(e),i=s=>n(s.matches);return n(r.matches),r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[e]),t}const wW=()=>{var m;const e=gn(),t=bT({select:y=>y.location.pathname}),n=K(y=>y.loadPlans),r=K(y=>y.loadIdeas),i=t==="/"||t.startsWith("/plans/")||t.startsWith("/ideas/"),s=t==="/docs"||t.startsWith("/docs/"),o=i?"plans":s?"docs":(m=Hv.find(y=>y.path===t))==null?void 0:m.id,a=i||s||t==="/settings",[l,c]=_.useState(gW),[u,d]=_.useState(!1),h=Iu(),p=vW(xW);return _.useEffect(()=>{n(),r()},[n,r]),_.useEffect(()=>{d(!1)},[t]),f.jsxs(zB,{children:[f.jsx("div",{className:"h-screen box-border min-[1440px]:pr-[480px]",children:f.jsx(PD,{background:{texture:"paper",ruledType:"grid",ruledColor:"blue"},showHeader:!0,showSidebar:!1,showPage:!1,bleedBottom:!0,headerActions:f.jsxs(f.Fragment,{children:[a&&f.jsx(Vt,{variant:"ghost",size:"small",className:"lg:hidden",label:"Open sidebar",onClick:()=>d(!0),icon:f.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:f.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),f.jsx(XV,{size:"sm"}),f.jsx("div",{className:"flex-1"}),f.jsx("nav",{"aria-label":"Main navigation",className:"flex items-center gap-1",children:Hv.map(y=>f.jsx(oe,{variant:"ghost",size:"small",isActive:y.id===o,onClick:()=>e({to:y.path}),"aria-current":y.id===o?"page":void 0,children:y.label},y.id))})]}),children:f.jsx("div",{className:"flex h-full min-h-0 justify-center items-stretch box-border overflow-hidden",children:f.jsxs("div",{className:"flex h-full min-h-0 min-w-0",style:{gap:oc.contentGap,...p?{width:"100%",paddingLeft:Gv,paddingRight:Gv}:{}},children:[a&&f.jsxs(ZV,{routeKey:t,mobileOpen:u,onMobileClose:()=>d(!1),children:[i&&f.jsxs(f.Fragment,{children:[f.jsx(J8,{}),f.jsx(nW,{})]}),s&&f.jsx(p8,{}),t==="/settings"&&f.jsx(mW,{})]}),f.jsx("div",{className:"flex flex-col min-h-0 min-w-0",style:{flex:p?"1 1 0%":"0 1 800px"},children:f.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:f.jsx(M_,{texture:{texture:"parchment"},outline:!0,style:{height:"auto",...p?{maxWidth:"none"}:{}},children:f.jsx(Lu,{mode:"wait",children:f.jsx(Ys.div,{initial:h?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:h?void 0:{opacity:0,y:-8},transition:{duration:h?0:.2,ease:"easeOut"},children:f.jsx(Ab,{})},t)})})})})]})})})}),f.jsx(a8,{open:l,pinned:p,onToggle:()=>{const y=!l;yW(y),c(y)}})]})},qi=oT({component:wW}),bW=eo({getParentRoute:()=>qi,path:"/",component:ug}),kW=eo({getParentRoute:()=>qi,path:"/plans/$planId",component:ug}),_W=eo({getParentRoute:()=>qi,path:"/ideas/$ideaId",component:ug}),SW=eo({getParentRoute:()=>qi,path:"/docs",component:RS}),CW=eo({getParentRoute:()=>qi,path:"/docs/$section",component:RS}),PW=eo({getParentRoute:()=>qi,path:"/settings",component:pW}),jW=qi.addChildren([bW,kW,_W,SW,CW,PW]),EW=yT({routeTree:jW}),VS=document.getElementById("root");if(!VS)throw new Error("#root element not found");sb(VS).render(f.jsx(_.StrictMode,{children:f.jsx(wT,{router:EW})}));
182
- //# sourceMappingURL=main-5JSkR2Qf.js.map