@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.
- package/dist/app/assets/index-CF8jC3IN.js +2 -0
- package/dist/app/assets/index-CF8jC3IN.js.map +1 -0
- package/dist/app/assets/index-DGXi8vpJ.js +2 -0
- package/dist/app/assets/index-DGXi8vpJ.js.map +1 -0
- package/dist/app/assets/main-D66GnCKz.css +1 -0
- package/dist/app/assets/main-DJDNx4Xs.js +218 -0
- package/dist/app/assets/main-DJDNx4Xs.js.map +1 -0
- package/dist/app/assets/sidebar-section-C2j12TzE.js +2 -0
- package/dist/app/assets/sidebar-section-C2j12TzE.js.map +1 -0
- package/dist/app/img/paper-logo.png +0 -0
- package/dist/app/img/paper-logo.svg +7 -0
- package/dist/app/index.html +7 -3
- package/dist/app/manifest.json +13 -0
- package/dist/chunks/{serializer.DiYtNSka.js → serializer.BfH7zTwv.js} +1767 -1395
- package/dist/chunks/serializer.BfH7zTwv.js.map +1 -0
- package/dist/cli/index.js +6501 -6167
- package/dist/cli/index.js.map +1 -1
- package/dist/core/git-pr/branch.d.ts.map +1 -0
- package/dist/core/git-pr/index.d.ts +4 -0
- package/dist/core/git-pr/index.d.ts.map +1 -0
- package/dist/core/git-pr/pr-lookup.d.ts +57 -0
- package/dist/core/git-pr/pr-lookup.d.ts.map +1 -0
- package/dist/core/git-pr/pr.d.ts +101 -0
- package/dist/core/git-pr/pr.d.ts.map +1 -0
- package/dist/core/{pr.test.d.ts.map → git-pr/pr.test.d.ts.map} +1 -1
- package/dist/core/git-pr/scopes.d.ts +8 -0
- package/dist/core/git-pr/scopes.d.ts.map +1 -0
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +76 -55
- package/dist/core/parse/entity.test.d.ts.map +1 -0
- package/dist/core/parse/frontmatter-schemas.d.ts.map +1 -0
- package/dist/core/parse/frontmatter.test.d.ts.map +1 -0
- package/dist/core/parse/index.d.ts +3 -0
- package/dist/core/parse/index.d.ts.map +1 -0
- package/dist/core/{parser.d.ts → parse/parser.d.ts} +16 -11
- package/dist/core/parse/parser.d.ts.map +1 -0
- package/dist/core/parse/parser.test.d.ts.map +1 -0
- package/dist/core/parse/schemas.d.ts.map +1 -0
- package/dist/core/readers.d.ts +8 -0
- package/dist/core/readers.d.ts.map +1 -1
- package/dist/core/scaffold/index.d.ts +3 -0
- package/dist/core/scaffold/index.d.ts.map +1 -0
- package/dist/core/scaffold/scaffold.d.ts.map +1 -0
- package/dist/core/scaffold/scaffold.test.d.ts.map +1 -0
- package/dist/core/scaffold/templates.d.ts.map +1 -0
- package/dist/core/{content-hash.d.ts → serialize/content-hash.d.ts} +1 -1
- package/dist/core/serialize/content-hash.d.ts.map +1 -0
- package/dist/core/serialize/content-hash.test.d.ts.map +1 -0
- package/dist/core/serialize/index.d.ts +3 -0
- package/dist/core/serialize/index.d.ts.map +1 -0
- package/dist/core/{serializer.d.ts → serialize/serializer.d.ts} +19 -7
- package/dist/core/serialize/serializer.d.ts.map +1 -0
- package/dist/core/status/index.d.ts +2 -0
- package/dist/core/status/index.d.ts.map +1 -0
- package/dist/core/{status.d.ts → status/status.d.ts} +4 -4
- package/dist/core/status/status.d.ts.map +1 -0
- package/dist/core/status/status.test.d.ts.map +1 -0
- package/dist/img/paper-logo.png +0 -0
- package/dist/img/paper-logo.svg +7 -0
- package/dist/manifest.json +13 -0
- package/dist/types/index.d.ts +45 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +7 -2
- package/dist/app/assets/main-5JSkR2Qf.js +0 -182
- package/dist/app/assets/main-5JSkR2Qf.js.map +0 -1
- package/dist/app/assets/main-B8HU5n_F.css +0 -1
- package/dist/chunks/serializer.DiYtNSka.js.map +0 -1
- package/dist/core/branch.d.ts.map +0 -1
- package/dist/core/content-hash.d.ts.map +0 -1
- package/dist/core/content-hash.test.d.ts.map +0 -1
- package/dist/core/entity.test.d.ts.map +0 -1
- package/dist/core/frontmatter-schemas.d.ts.map +0 -1
- package/dist/core/frontmatter.test.d.ts.map +0 -1
- package/dist/core/parser.d.ts.map +0 -1
- package/dist/core/parser.test.d.ts.map +0 -1
- package/dist/core/pr.d.ts +0 -27
- package/dist/core/pr.d.ts.map +0 -1
- package/dist/core/scaffold.d.ts.map +0 -1
- package/dist/core/scaffold.test.d.ts.map +0 -1
- package/dist/core/schemas.d.ts.map +0 -1
- package/dist/core/serializer.d.ts.map +0 -1
- package/dist/core/status.d.ts.map +0 -1
- package/dist/core/status.test.d.ts.map +0 -1
- package/dist/core/templates.d.ts.map +0 -1
- /package/dist/core/{branch.d.ts → git-pr/branch.d.ts} +0 -0
- /package/dist/core/{pr.test.d.ts → git-pr/pr.test.d.ts} +0 -0
- /package/dist/core/{entity.test.d.ts → parse/entity.test.d.ts} +0 -0
- /package/dist/core/{frontmatter-schemas.d.ts → parse/frontmatter-schemas.d.ts} +0 -0
- /package/dist/core/{frontmatter.test.d.ts → parse/frontmatter.test.d.ts} +0 -0
- /package/dist/core/{parser.test.d.ts → parse/parser.test.d.ts} +0 -0
- /package/dist/core/{schemas.d.ts → parse/schemas.d.ts} +0 -0
- /package/dist/core/{scaffold.d.ts → scaffold/scaffold.d.ts} +0 -0
- /package/dist/core/{scaffold.test.d.ts → scaffold/scaffold.test.d.ts} +0 -0
- /package/dist/core/{templates.d.ts → scaffold/templates.d.ts} +0 -0
- /package/dist/core/{content-hash.test.d.ts → serialize/content-hash.test.d.ts} +0 -0
- /package/dist/core/{status.test.d.ts → status/status.test.d.ts} +0 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CF8jC3IN.js","assets/sidebar-section-C2j12TzE.js","assets/index-DGXi8vpJ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
(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 Xl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cv={exports:{}},Qu={},Pv={exports:{}},se={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var pa=Symbol.for("react.element"),kS=Symbol.for("react.portal"),_S=Symbol.for("react.fragment"),SS=Symbol.for("react.strict_mode"),CS=Symbol.for("react.profiler"),PS=Symbol.for("react.provider"),ES=Symbol.for("react.context"),TS=Symbol.for("react.forward_ref"),jS=Symbol.for("react.suspense"),RS=Symbol.for("react.memo"),IS=Symbol.for("react.lazy"),Xm=Symbol.iterator;function MS(e){return e===null||typeof e!="object"?null:(e=Xm&&e[Xm]||e["@@iterator"],typeof e=="function"?e:null)}var Ev={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tv=Object.assign,jv={};function Ds(e,t,n){this.props=e,this.context=t,this.refs=jv,this.updater=n||Ev}Ds.prototype.isReactComponent={};Ds.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")};Ds.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rv(){}Rv.prototype=Ds.prototype;function Kh(e,t,n){this.props=e,this.context=t,this.refs=jv,this.updater=n||Ev}var Yh=Kh.prototype=new Rv;Yh.constructor=Kh;Tv(Yh,Ds.prototype);Yh.isPureReactComponent=!0;var Zm=Array.isArray,Iv=Object.prototype.hasOwnProperty,qh={current:null},Mv={key:!0,ref:!0,__self:!0,__source:!0};function Lv(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)Iv.call(t,r)&&!Mv.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:pa,type:e,key:s,ref:o,props:i,_owner:qh.current}}function LS(e,t){return{$$typeof:pa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Qh(e){return typeof e=="object"&&e!==null&&e.$$typeof===pa}function AS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Jm=/\/+/g;function Nc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?AS(""+e.key):t.toString(36)}function bl(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 pa:case kS:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Nc(o,0):r,Zm(i)?(n="",e!=null&&(n=e.replace(Jm,"$&/")+"/"),bl(i,t,n,"",function(u){return u})):i!=null&&(Qh(i)&&(i=LS(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Jm,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Zm(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Nc(s,a);o+=bl(s,t,n,l,i)}else if(l=MS(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Nc(s,a++),o+=bl(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 Aa(e,t,n){if(e==null)return e;var r=[],i=0;return bl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function DS(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 yt={current:null},kl={transition:null},NS={ReactCurrentDispatcher:yt,ReactCurrentBatchConfig:kl,ReactCurrentOwner:qh};function Av(){throw Error("act(...) is not supported in production builds of React.")}se.Children={map:Aa,forEach:function(e,t,n){Aa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Aa(e,function(){t++}),t},toArray:function(e){return Aa(e,function(t){return t})||[]},only:function(e){if(!Qh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Component=Ds;se.Fragment=_S;se.Profiler=CS;se.PureComponent=Kh;se.StrictMode=SS;se.Suspense=jS;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NS;se.act=Av;se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Tv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=qh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Iv.call(t,l)&&!Mv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:pa,type:e.type,key:i,ref:s,props:r,_owner:o}};se.createContext=function(e){return e={$$typeof:ES,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:PS,_context:e},e.Consumer=e};se.createElement=Lv;se.createFactory=function(e){var t=Lv.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:TS,render:e}};se.isValidElement=Qh;se.lazy=function(e){return{$$typeof:IS,_payload:{_status:-1,_result:e},_init:DS}};se.memo=function(e,t){return{$$typeof:RS,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=kl.transition;kl.transition={};try{e()}finally{kl.transition=t}};se.unstable_act=Av;se.useCallback=function(e,t){return yt.current.useCallback(e,t)};se.useContext=function(e){return yt.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return yt.current.useDeferredValue(e)};se.useEffect=function(e,t){return yt.current.useEffect(e,t)};se.useId=function(){return yt.current.useId()};se.useImperativeHandle=function(e,t,n){return yt.current.useImperativeHandle(e,t,n)};se.useInsertionEffect=function(e,t){return yt.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return yt.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return yt.current.useMemo(e,t)};se.useReducer=function(e,t,n){return yt.current.useReducer(e,t,n)};se.useRef=function(e){return yt.current.useRef(e)};se.useState=function(e){return yt.current.useState(e)};se.useSyncExternalStore=function(e,t,n){return yt.current.useSyncExternalStore(e,t,n)};se.useTransition=function(){return yt.current.useTransition()};se.version="18.3.1";Pv.exports=se;var _=Pv.exports;const ks=qu(_);/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var zS=_,FS=Symbol.for("react.element"),OS=Symbol.for("react.fragment"),BS=Object.prototype.hasOwnProperty,$S=zS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,VS={key:!0,ref:!0,__self:!0,__source:!0};function Dv(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)BS.call(t,r)&&!VS.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:FS,type:e,key:s,ref:o,props:i,_owner:$S.current}}Qu.Fragment=OS;Qu.jsx=Dv;Qu.jsxs=Dv;Cv.exports=Qu;var f=Cv.exports,Nv={exports:{}},Vt={},zv={exports:{}},Fv={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/(function(e){function t(L,$){var k=L.length;L.push($);e:for(;0<k;){var V=k-1>>>1,Q=L[V];if(0<i(Q,$))L[V]=$,L[k]=Q,k=V;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var $=L[0],k=L.pop();if(k!==$){L[0]=k;e:for(var V=0,Q=L.length,R=Q>>>1;V<R;){var ue=2*(V+1)-1,fe=L[ue],ce=ue+1,Xe=L[ce];if(0>i(fe,k))ce<Q&&0>i(Xe,fe)?(L[V]=Xe,L[ce]=k,V=ce):(L[V]=fe,L[ue]=k,V=ue);else if(ce<Q&&0>i(Xe,k))L[V]=Xe,L[ce]=k,V=ce;else break e}}return $}function i(L,$){var k=L.sortIndex-$.sortIndex;return k!==0?k:L.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,h=3,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(L){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=L)r(u),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(u)}}function b(L){if(y=!1,v(L),!m)if(n(l)!==null)m=!0,z(P);else{var $=n(u);$!==null&&D(b,$.startTime-L)}}function P(L,$){m=!1,y&&(y=!1,g(C),C=-1),p=!0;var k=h;try{for(v($),d=n(l);d!==null&&(!(d.expirationTime>$)||L&&!I());){var V=d.callback;if(typeof V=="function"){d.callback=null,h=d.priorityLevel;var Q=V(d.expirationTime<=$);$=e.unstable_now(),typeof Q=="function"?d.callback=Q:d===n(l)&&r(l),v($)}else r(l);d=n(l)}if(d!==null)var R=!0;else{var ue=n(u);ue!==null&&D(b,ue.startTime-$),R=!1}return R}finally{d=null,h=k,p=!1}}var S=!1,j=null,C=-1,T=5,E=-1;function I(){return!(e.unstable_now()-E<T)}function M(){if(j!==null){var L=e.unstable_now();E=L;var $=!0;try{$=j(!0,L)}finally{$?O():(S=!1,j=null)}}else S=!1}var O;if(typeof x=="function")O=function(){x(M)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,F=B.port2;B.port1.onmessage=M,O=function(){F.postMessage(null)}}else O=function(){w(M,0)};function z(L){j=L,S||(S=!0,O())}function D(L,$){C=w(function(){L(e.unstable_now())},$)}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(L){L.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,z(P))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(L){switch(h){case 1:case 2:case 3:var $=3;break;default:$=h}var k=h;h=$;try{return L()}finally{h=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,$){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var k=h;h=L;try{return $()}finally{h=k}},e.unstable_scheduleCallback=function(L,$,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,L){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,L={id:c++,callback:$,priorityLevel:L,startTime:k,expirationTime:Q,sortIndex:-1},k>V?(L.sortIndex=k,t(u,L),n(l)===null&&L===n(u)&&(y?(g(C),C=-1):y=!0,D(b,k-V))):(L.sortIndex=Q,t(l,L),m||p||(m=!0,z(P))),L},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(L){var $=h;return function(){var k=h;h=$;try{return L.apply(this,arguments)}finally{h=k}}}})(Fv);zv.exports=Fv;var WS=zv.exports;/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var US=_,Ot=WS;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 Ov=new Set,Vo={};function ji(e,t){_s(e,t),_s(e+"Capture",t)}function _s(e,t){for(Vo[e]=t,e=0;e<t.length;e++)Ov.add(t[e])}var er=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uf=Object.prototype.hasOwnProperty,HS=/^[: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]*$/,eg={},tg={};function GS(e){return uf.call(tg,e)?!0:uf.call(eg,e)?!1:HS.test(e)?tg[e]=!0:(eg[e]=!0,!1)}function KS(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 YS(e,t,n,r){if(t===null||typeof t>"u"||KS(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 xt(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 rt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rt[e]=new xt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rt[t]=new xt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rt[e]=new xt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rt[e]=new xt(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){rt[e]=new xt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rt[e]=new xt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rt[e]=new xt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rt[e]=new xt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rt[e]=new xt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xh=/[\-:]([a-z])/g;function Zh(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(Xh,Zh);rt[t]=new xt(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(Xh,Zh);rt[t]=new xt(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(Xh,Zh);rt[t]=new xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rt[e]=new xt(e,1,!1,e.toLowerCase(),null,!1,!1)});rt.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rt[e]=new xt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jh(e,t,n,r){var i=rt.hasOwnProperty(t)?rt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(YS(t,n,i,r)&&(n=null),r||i===null?GS(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 sr=US.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Da=Symbol.for("react.element"),Zi=Symbol.for("react.portal"),Ji=Symbol.for("react.fragment"),ep=Symbol.for("react.strict_mode"),cf=Symbol.for("react.profiler"),Bv=Symbol.for("react.provider"),$v=Symbol.for("react.context"),tp=Symbol.for("react.forward_ref"),df=Symbol.for("react.suspense"),ff=Symbol.for("react.suspense_list"),np=Symbol.for("react.memo"),yr=Symbol.for("react.lazy"),Vv=Symbol.for("react.offscreen"),ng=Symbol.iterator;function Qs(e){return e===null||typeof e!="object"?null:(e=ng&&e[ng]||e["@@iterator"],typeof e=="function"?e:null)}var Me=Object.assign,zc;function vo(e){if(zc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);zc=t&&t[1]||""}return`
|
|
35
|
+
`+zc+e}var Fc=!1;function Oc(e,t){if(!e||Fc)return"";Fc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
36
|
+
`),s=r.stack.split(`
|
|
37
|
+
`),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=`
|
|
38
|
+
`+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{Fc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?vo(e):""}function qS(e){switch(e.tag){case 5:return vo(e.type);case 16:return vo("Lazy");case 13:return vo("Suspense");case 19:return vo("SuspenseList");case 0:case 2:case 15:return e=Oc(e.type,!1),e;case 11:return e=Oc(e.type.render,!1),e;case 1:return e=Oc(e.type,!0),e;default:return""}}function hf(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 Ji:return"Fragment";case Zi:return"Portal";case cf:return"Profiler";case ep:return"StrictMode";case df:return"Suspense";case ff:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $v:return(e.displayName||"Context")+".Consumer";case Bv:return(e._context.displayName||"Context")+".Provider";case tp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case np:return t=e.displayName||null,t!==null?t:hf(e.type)||"Memo";case yr:t=e._payload,e=e._init;try{return hf(e(t))}catch{}}return null}function QS(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 hf(t);case 8:return t===ep?"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 $r(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function XS(e){var t=Wv(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 Na(e){e._valueTracker||(e._valueTracker=XS(e))}function Uv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Wv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zl(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 pf(e,t){var n=t.checked;return Me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function rg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$r(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 Hv(e,t){t=t.checked,t!=null&&Jh(e,"checked",t,!1)}function mf(e,t){Hv(e,t);var n=$r(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")?gf(e,t.type,n):t.hasOwnProperty("defaultValue")&&gf(e,t.type,$r(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ig(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 gf(e,t,n){(t!=="number"||Zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wo=Array.isArray;function hs(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=""+$r(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 yf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return Me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function sg(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(wo(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$r(n)}}function Gv(e,t){var n=$r(t.value),r=$r(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 og(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Kv(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 xf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Kv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var za,Yv=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(za=za||document.createElement("div"),za.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=za.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Po={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},ZS=["Webkit","ms","Moz","O"];Object.keys(Po).forEach(function(e){ZS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Po[t]=Po[e]})});function qv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Po.hasOwnProperty(e)&&Po[e]?(""+t).trim():t+"px"}function Qv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=qv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var JS=Me({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 vf(e,t){if(t){if(JS[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 wf(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 bf=null;function rp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kf=null,ps=null,ms=null;function ag(e){if(e=ya(e)){if(typeof kf!="function")throw Error(U(280));var t=e.stateNode;t&&(t=tc(t),kf(e.stateNode,e.type,t))}}function Xv(e){ps?ms?ms.push(e):ms=[e]:ps=e}function Zv(){if(ps){var e=ps,t=ms;if(ms=ps=null,ag(e),t)for(e=0;e<t.length;e++)ag(t[e])}}function Jv(e,t){return e(t)}function e1(){}var Bc=!1;function t1(e,t,n){if(Bc)return e(t,n);Bc=!0;try{return Jv(e,t,n)}finally{Bc=!1,(ps!==null||ms!==null)&&(e1(),Zv())}}function Uo(e,t){var n=e.stateNode;if(n===null)return null;var r=tc(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 _f=!1;if(er)try{var Xs={};Object.defineProperty(Xs,"passive",{get:function(){_f=!0}}),window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{_f=!1}function eC(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Eo=!1,Jl=null,eu=!1,Sf=null,tC={onError:function(e){Eo=!0,Jl=e}};function nC(e,t,n,r,i,s,o,a,l){Eo=!1,Jl=null,eC.apply(tC,arguments)}function rC(e,t,n,r,i,s,o,a,l){if(nC.apply(this,arguments),Eo){if(Eo){var u=Jl;Eo=!1,Jl=null}else throw Error(U(198));eu||(eu=!0,Sf=u)}}function Ri(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 n1(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 lg(e){if(Ri(e)!==e)throw Error(U(188))}function iC(e){var t=e.alternate;if(!t){if(t=Ri(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 lg(i),e;if(s===r)return lg(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 r1(e){return e=iC(e),e!==null?i1(e):null}function i1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=i1(e);if(t!==null)return t;e=e.sibling}return null}var s1=Ot.unstable_scheduleCallback,ug=Ot.unstable_cancelCallback,sC=Ot.unstable_shouldYield,oC=Ot.unstable_requestPaint,Fe=Ot.unstable_now,aC=Ot.unstable_getCurrentPriorityLevel,ip=Ot.unstable_ImmediatePriority,o1=Ot.unstable_UserBlockingPriority,tu=Ot.unstable_NormalPriority,lC=Ot.unstable_LowPriority,a1=Ot.unstable_IdlePriority,Xu=null,Nn=null;function uC(e){if(Nn&&typeof Nn.onCommitFiberRoot=="function")try{Nn.onCommitFiberRoot(Xu,e,void 0,(e.current.flags&128)===128)}catch{}}var gn=Math.clz32?Math.clz32:fC,cC=Math.log,dC=Math.LN2;function fC(e){return e>>>=0,e===0?32:31-(cC(e)/dC|0)|0}var Fa=64,Oa=4194304;function bo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=bo(a):(s&=o,s!==0&&(r=bo(s)))}else o=n&~i,o!==0?r=bo(o):s!==0&&(r=bo(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-gn(t),i=1<<n,r|=e[n],t&=~i;return r}function hC(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 pC(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-gn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=hC(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Cf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function l1(){var e=Fa;return Fa<<=1,!(Fa&4194240)&&(Fa=64),e}function $c(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-gn(t),e[t]=n}function mC(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-gn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function sp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var me=0;function u1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var c1,op,d1,f1,h1,Pf=!1,Ba=[],Rr=null,Ir=null,Mr=null,Ho=new Map,Go=new Map,wr=[],gC="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 cg(e,t){switch(e){case"focusin":case"focusout":Rr=null;break;case"dragenter":case"dragleave":Ir=null;break;case"mouseover":case"mouseout":Mr=null;break;case"pointerover":case"pointerout":Ho.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Go.delete(t.pointerId)}}function Zs(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=ya(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function yC(e,t,n,r,i){switch(t){case"focusin":return Rr=Zs(Rr,e,t,n,r,i),!0;case"dragenter":return Ir=Zs(Ir,e,t,n,r,i),!0;case"mouseover":return Mr=Zs(Mr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ho.set(s,Zs(Ho.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Go.set(s,Zs(Go.get(s)||null,e,t,n,r,i)),!0}return!1}function p1(e){var t=ui(e.target);if(t!==null){var n=Ri(t);if(n!==null){if(t=n.tag,t===13){if(t=n1(n),t!==null){e.blockedOn=t,h1(e.priority,function(){d1(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 _l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ef(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bf=r,n.target.dispatchEvent(r),bf=null}else return t=ya(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function dg(e,t,n){_l(e)&&n.delete(t)}function xC(){Pf=!1,Rr!==null&&_l(Rr)&&(Rr=null),Ir!==null&&_l(Ir)&&(Ir=null),Mr!==null&&_l(Mr)&&(Mr=null),Ho.forEach(dg),Go.forEach(dg)}function Js(e,t){e.blockedOn===t&&(e.blockedOn=null,Pf||(Pf=!0,Ot.unstable_scheduleCallback(Ot.unstable_NormalPriority,xC)))}function Ko(e){function t(i){return Js(i,e)}if(0<Ba.length){Js(Ba[0],e);for(var n=1;n<Ba.length;n++){var r=Ba[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Rr!==null&&Js(Rr,e),Ir!==null&&Js(Ir,e),Mr!==null&&Js(Mr,e),Ho.forEach(t),Go.forEach(t),n=0;n<wr.length;n++)r=wr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<wr.length&&(n=wr[0],n.blockedOn===null);)p1(n),n.blockedOn===null&&wr.shift()}var gs=sr.ReactCurrentBatchConfig,ru=!0;function vC(e,t,n,r){var i=me,s=gs.transition;gs.transition=null;try{me=1,ap(e,t,n,r)}finally{me=i,gs.transition=s}}function wC(e,t,n,r){var i=me,s=gs.transition;gs.transition=null;try{me=4,ap(e,t,n,r)}finally{me=i,gs.transition=s}}function ap(e,t,n,r){if(ru){var i=Ef(e,t,n,r);if(i===null)Xc(e,t,r,iu,n),cg(e,r);else if(yC(i,e,t,n,r))r.stopPropagation();else if(cg(e,r),t&4&&-1<gC.indexOf(e)){for(;i!==null;){var s=ya(i);if(s!==null&&c1(s),s=Ef(e,t,n,r),s===null&&Xc(e,t,r,iu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Xc(e,t,r,null,n)}}var iu=null;function Ef(e,t,n,r){if(iu=null,e=rp(r),e=ui(e),e!==null)if(t=Ri(e),t===null)e=null;else if(n=t.tag,n===13){if(e=n1(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 iu=e,null}function m1(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(aC()){case ip:return 1;case o1:return 4;case tu:case lC:return 16;case a1:return 536870912;default:return 16}default:return 16}}var _r=null,lp=null,Sl=null;function g1(){if(Sl)return Sl;var e,t=lp,n=t.length,r,i="value"in _r?_r.value:_r.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return Sl=i.slice(e,1<r?1-r:void 0)}function Cl(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 $a(){return!0}function fg(){return!1}function Wt(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)?$a:fg,this.isPropagationStopped=fg,this}return Me(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=$a)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=$a)},persist:function(){},isPersistent:$a}),t}var Ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},up=Wt(Ns),ga=Me({},Ns,{view:0,detail:0}),bC=Wt(ga),Vc,Wc,eo,Zu=Me({},ga,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cp,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!==eo&&(eo&&e.type==="mousemove"?(Vc=e.screenX-eo.screenX,Wc=e.screenY-eo.screenY):Wc=Vc=0,eo=e),Vc)},movementY:function(e){return"movementY"in e?e.movementY:Wc}}),hg=Wt(Zu),kC=Me({},Zu,{dataTransfer:0}),_C=Wt(kC),SC=Me({},ga,{relatedTarget:0}),Uc=Wt(SC),CC=Me({},Ns,{animationName:0,elapsedTime:0,pseudoElement:0}),PC=Wt(CC),EC=Me({},Ns,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),TC=Wt(EC),jC=Me({},Ns,{data:0}),pg=Wt(jC),RC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},IC={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"},MC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=MC[e])?!!t[e]:!1}function cp(){return LC}var AC=Me({},ga,{key:function(e){if(e.key){var t=RC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?IC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cp,charCode:function(e){return e.type==="keypress"?Cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),DC=Wt(AC),NC=Me({},Zu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mg=Wt(NC),zC=Me({},ga,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cp}),FC=Wt(zC),OC=Me({},Ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),BC=Wt(OC),$C=Me({},Zu,{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}),VC=Wt($C),WC=[9,13,27,32],dp=er&&"CompositionEvent"in window,To=null;er&&"documentMode"in document&&(To=document.documentMode);var UC=er&&"TextEvent"in window&&!To,y1=er&&(!dp||To&&8<To&&11>=To),gg=" ",yg=!1;function x1(e,t){switch(e){case"keyup":return WC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var es=!1;function HC(e,t){switch(e){case"compositionend":return v1(t);case"keypress":return t.which!==32?null:(yg=!0,gg);case"textInput":return e=t.data,e===gg&&yg?null:e;default:return null}}function GC(e,t){if(es)return e==="compositionend"||!dp&&x1(e,t)?(e=g1(),Sl=lp=_r=null,es=!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 y1&&t.locale!=="ko"?null:t.data;default:return null}}var KC={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 xg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!KC[e.type]:t==="textarea"}function w1(e,t,n,r){Xv(r),t=su(t,"onChange"),0<t.length&&(n=new up("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var jo=null,Yo=null;function YC(e){I1(e,0)}function Ju(e){var t=rs(e);if(Uv(t))return e}function qC(e,t){if(e==="change")return t}var b1=!1;if(er){var Hc;if(er){var Gc="oninput"in document;if(!Gc){var vg=document.createElement("div");vg.setAttribute("oninput","return;"),Gc=typeof vg.oninput=="function"}Hc=Gc}else Hc=!1;b1=Hc&&(!document.documentMode||9<document.documentMode)}function wg(){jo&&(jo.detachEvent("onpropertychange",k1),Yo=jo=null)}function k1(e){if(e.propertyName==="value"&&Ju(Yo)){var t=[];w1(t,Yo,e,rp(e)),t1(YC,t)}}function QC(e,t,n){e==="focusin"?(wg(),jo=t,Yo=n,jo.attachEvent("onpropertychange",k1)):e==="focusout"&&wg()}function XC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ju(Yo)}function ZC(e,t){if(e==="click")return Ju(t)}function JC(e,t){if(e==="input"||e==="change")return Ju(t)}function eP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vn=typeof Object.is=="function"?Object.is:eP;function qo(e,t){if(vn(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(!uf.call(t,i)||!vn(e[i],t[i]))return!1}return!0}function bg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kg(e,t){var n=bg(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=bg(n)}}function _1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S1(){for(var e=window,t=Zl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zl(e.document)}return t}function fp(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 tP(e){var t=S1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_1(n.ownerDocument.documentElement,n)){if(r!==null&&fp(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=kg(n,s);var o=kg(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 nP=er&&"documentMode"in document&&11>=document.documentMode,ts=null,Tf=null,Ro=null,jf=!1;function _g(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jf||ts==null||ts!==Zl(r)||(r=ts,"selectionStart"in r&&fp(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}),Ro&&qo(Ro,r)||(Ro=r,r=su(Tf,"onSelect"),0<r.length&&(t=new up("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ts)))}function Va(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ns={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionend:Va("Transition","TransitionEnd")},Kc={},C1={};er&&(C1=document.createElement("div").style,"AnimationEvent"in window||(delete ns.animationend.animation,delete ns.animationiteration.animation,delete ns.animationstart.animation),"TransitionEvent"in window||delete ns.transitionend.transition);function ec(e){if(Kc[e])return Kc[e];if(!ns[e])return e;var t=ns[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in C1)return Kc[e]=t[n];return e}var P1=ec("animationend"),E1=ec("animationiteration"),T1=ec("animationstart"),j1=ec("transitionend"),R1=new Map,Sg="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 Gr(e,t){R1.set(e,t),ji(t,[e])}for(var Yc=0;Yc<Sg.length;Yc++){var qc=Sg[Yc],rP=qc.toLowerCase(),iP=qc[0].toUpperCase()+qc.slice(1);Gr(rP,"on"+iP)}Gr(P1,"onAnimationEnd");Gr(E1,"onAnimationIteration");Gr(T1,"onAnimationStart");Gr("dblclick","onDoubleClick");Gr("focusin","onFocus");Gr("focusout","onBlur");Gr(j1,"onTransitionEnd");_s("onMouseEnter",["mouseout","mouseover"]);_s("onMouseLeave",["mouseout","mouseover"]);_s("onPointerEnter",["pointerout","pointerover"]);_s("onPointerLeave",["pointerout","pointerover"]);ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ji("onBeforeInput",["compositionend","keypress","textInput","paste"]);ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ko="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),sP=new Set("cancel close invalid load scroll toggle".split(" ").concat(ko));function Cg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,rC(r,t,void 0,e),e.currentTarget=null}function I1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;Cg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;Cg(i,a,u),s=l}}}if(eu)throw e=Sf,eu=!1,Sf=null,e}function Ce(e,t){var n=t[Af];n===void 0&&(n=t[Af]=new Set);var r=e+"__bubble";n.has(r)||(M1(t,e,2,!1),n.add(r))}function Qc(e,t,n){var r=0;t&&(r|=4),M1(n,e,r,t)}var Wa="_reactListening"+Math.random().toString(36).slice(2);function Qo(e){if(!e[Wa]){e[Wa]=!0,Ov.forEach(function(n){n!=="selectionchange"&&(sP.has(n)||Qc(n,!1,e),Qc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wa]||(t[Wa]=!0,Qc("selectionchange",!1,t))}}function M1(e,t,n,r){switch(m1(t)){case 1:var i=vC;break;case 4:i=wC;break;default:i=ap}n=i.bind(null,t,n,e),i=void 0,!_f||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 Xc(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=ui(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}t1(function(){var u=s,c=rp(n),d=[];e:{var h=R1.get(e);if(h!==void 0){var p=up,m=e;switch(e){case"keypress":if(Cl(n)===0)break e;case"keydown":case"keyup":p=DC;break;case"focusin":m="focus",p=Uc;break;case"focusout":m="blur",p=Uc;break;case"beforeblur":case"afterblur":p=Uc;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=hg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=_C;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=FC;break;case P1:case E1:case T1:p=PC;break;case j1:p=BC;break;case"scroll":p=bC;break;case"wheel":p=VC;break;case"copy":case"cut":case"paste":p=TC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=mg}var y=(t&4)!==0,w=!y&&e==="scroll",g=y?h!==null?h+"Capture":null:h;y=[];for(var x=u,v;x!==null;){v=x;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,g!==null&&(b=Uo(x,g),b!=null&&y.push(Xo(x,b,v)))),w)break;x=x.return}0<y.length&&(h=new p(h,m,null,n,c),d.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==bf&&(m=n.relatedTarget||n.fromElement)&&(ui(m)||m[tr]))break e;if((p||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?ui(m):null,m!==null&&(w=Ri(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(y=hg,b="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=mg,b="onPointerLeave",g="onPointerEnter",x="pointer"),w=p==null?h:rs(p),v=m==null?h:rs(m),h=new y(b,x+"leave",p,n,c),h.target=w,h.relatedTarget=v,b=null,ui(c)===u&&(y=new y(g,x+"enter",m,n,c),y.target=v,y.relatedTarget=w,b=y),w=b,p&&m)t:{for(y=p,g=m,x=0,v=y;v;v=$i(v))x++;for(v=0,b=g;b;b=$i(b))v++;for(;0<x-v;)y=$i(y),x--;for(;0<v-x;)g=$i(g),v--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=$i(y),g=$i(g)}y=null}else y=null;p!==null&&Pg(d,h,p,y,!1),m!==null&&w!==null&&Pg(d,w,m,y,!0)}}e:{if(h=u?rs(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var P=qC;else if(xg(h))if(b1)P=JC;else{P=XC;var S=QC}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(P=ZC);if(P&&(P=P(e,u))){w1(d,P,n,c);break e}S&&S(e,h,u),e==="focusout"&&(S=h._wrapperState)&&S.controlled&&h.type==="number"&&gf(h,"number",h.value)}switch(S=u?rs(u):window,e){case"focusin":(xg(S)||S.contentEditable==="true")&&(ts=S,Tf=u,Ro=null);break;case"focusout":Ro=Tf=ts=null;break;case"mousedown":jf=!0;break;case"contextmenu":case"mouseup":case"dragend":jf=!1,_g(d,n,c);break;case"selectionchange":if(nP)break;case"keydown":case"keyup":_g(d,n,c)}var j;if(dp)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else es?x1(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(y1&&n.locale!=="ko"&&(es||C!=="onCompositionStart"?C==="onCompositionEnd"&&es&&(j=g1()):(_r=c,lp="value"in _r?_r.value:_r.textContent,es=!0)),S=su(u,C),0<S.length&&(C=new pg(C,e,null,n,c),d.push({event:C,listeners:S}),j?C.data=j:(j=v1(n),j!==null&&(C.data=j)))),(j=UC?HC(e,n):GC(e,n))&&(u=su(u,"onBeforeInput"),0<u.length&&(c=new pg("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=j))}I1(d,t)})}function Xo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function su(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Uo(e,n),s!=null&&r.unshift(Xo(e,s,i)),s=Uo(e,t),s!=null&&r.push(Xo(e,s,i))),e=e.return}return r}function $i(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Pg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Uo(n,s),l!=null&&o.unshift(Xo(n,l,a))):i||(l=Uo(n,s),l!=null&&o.push(Xo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var oP=/\r\n?/g,aP=/\u0000|\uFFFD/g;function Eg(e){return(typeof e=="string"?e:""+e).replace(oP,`
|
|
39
|
+
`).replace(aP,"")}function Ua(e,t,n){if(t=Eg(t),Eg(e)!==t&&n)throw Error(U(425))}function ou(){}var Rf=null,If=null;function Mf(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 Lf=typeof setTimeout=="function"?setTimeout:void 0,lP=typeof clearTimeout=="function"?clearTimeout:void 0,Tg=typeof Promise=="function"?Promise:void 0,uP=typeof queueMicrotask=="function"?queueMicrotask:typeof Tg<"u"?function(e){return Tg.resolve(null).then(e).catch(cP)}:Lf;function cP(e){setTimeout(function(){throw e})}function Zc(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),Ko(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ko(t)}function Lr(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 jg(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),Ln="__reactFiber$"+zs,Zo="__reactProps$"+zs,tr="__reactContainer$"+zs,Af="__reactEvents$"+zs,dP="__reactListeners$"+zs,fP="__reactHandles$"+zs;function ui(e){var t=e[Ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tr]||n[Ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=jg(e);e!==null;){if(n=e[Ln])return n;e=jg(e)}return t}e=n,n=e.parentNode}return null}function ya(e){return e=e[Ln]||e[tr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function tc(e){return e[Zo]||null}var Df=[],is=-1;function Kr(e){return{current:e}}function Pe(e){0>is||(e.current=Df[is],Df[is]=null,is--)}function ke(e,t){is++,Df[is]=e.current,e.current=t}var Vr={},ct=Kr(Vr),St=Kr(!1),_i=Vr;function Ss(e,t){var n=e.type.contextTypes;if(!n)return Vr;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 Ct(e){return e=e.childContextTypes,e!=null}function au(){Pe(St),Pe(ct)}function Rg(e,t,n){if(ct.current!==Vr)throw Error(U(168));ke(ct,t),ke(St,n)}function L1(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,QS(e)||"Unknown",i));return Me({},n,r)}function lu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vr,_i=ct.current,ke(ct,e),ke(St,St.current),!0}function Ig(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=L1(e,t,_i),r.__reactInternalMemoizedMergedChildContext=e,Pe(St),Pe(ct),ke(ct,e)):Pe(St),ke(St,n)}var qn=null,nc=!1,Jc=!1;function A1(e){qn===null?qn=[e]:qn.push(e)}function hP(e){nc=!0,A1(e)}function Yr(){if(!Jc&&qn!==null){Jc=!0;var e=0,t=me;try{var n=qn;for(me=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}qn=null,nc=!1}catch(i){throw qn!==null&&(qn=qn.slice(e+1)),s1(ip,Yr),i}finally{me=t,Jc=!1}}return null}var ss=[],os=0,uu=null,cu=0,Qt=[],Xt=0,Si=null,Qn=1,Xn="";function ri(e,t){ss[os++]=cu,ss[os++]=uu,uu=e,cu=t}function D1(e,t,n){Qt[Xt++]=Qn,Qt[Xt++]=Xn,Qt[Xt++]=Si,Si=e;var r=Qn;e=Xn;var i=32-gn(r)-1;r&=~(1<<i),n+=1;var s=32-gn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Qn=1<<32-gn(t)+i|n<<i|r,Xn=s+e}else Qn=1<<s|n<<i|r,Xn=e}function hp(e){e.return!==null&&(ri(e,1),D1(e,1,0))}function pp(e){for(;e===uu;)uu=ss[--os],ss[os]=null,cu=ss[--os],ss[os]=null;for(;e===Si;)Si=Qt[--Xt],Qt[Xt]=null,Xn=Qt[--Xt],Qt[Xt]=null,Qn=Qt[--Xt],Qt[Xt]=null}var zt=null,Dt=null,Te=!1,mn=null;function N1(e,t){var n=Jt(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 Mg(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,zt=e,Dt=Lr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,zt=e,Dt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Si!==null?{id:Qn,overflow:Xn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Jt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,zt=e,Dt=null,!0):!1;default:return!1}}function Nf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zf(e){if(Te){var t=Dt;if(t){var n=t;if(!Mg(e,t)){if(Nf(e))throw Error(U(418));t=Lr(n.nextSibling);var r=zt;t&&Mg(e,t)?N1(r,n):(e.flags=e.flags&-4097|2,Te=!1,zt=e)}}else{if(Nf(e))throw Error(U(418));e.flags=e.flags&-4097|2,Te=!1,zt=e}}}function Lg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;zt=e}function Ha(e){if(e!==zt)return!1;if(!Te)return Lg(e),Te=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Mf(e.type,e.memoizedProps)),t&&(t=Dt)){if(Nf(e))throw z1(),Error(U(418));for(;t;)N1(e,t),t=Lr(t.nextSibling)}if(Lg(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){Dt=Lr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Dt=null}}else Dt=zt?Lr(e.stateNode.nextSibling):null;return!0}function z1(){for(var e=Dt;e;)e=Lr(e.nextSibling)}function Cs(){Dt=zt=null,Te=!1}function mp(e){mn===null?mn=[e]:mn.push(e)}var pP=sr.ReactCurrentBatchConfig;function to(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 Ga(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ag(e){var t=e._init;return t(e._payload)}function F1(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=zr(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=od(v,g.mode,b),x.return=g,x):(x=i(x,v),x.return=g,x)}function l(g,x,v,b){var P=v.type;return P===Ji?c(g,x,v.props.children,b,v.key):x!==null&&(x.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===yr&&Ag(P)===x.type)?(b=i(x,v.props),b.ref=to(g,x,v),b.return=g,b):(b=Ml(v.type,v.key,v.props,null,g.mode,b),b.ref=to(g,x,v),b.return=g,b)}function u(g,x,v,b){return x===null||x.tag!==4||x.stateNode.containerInfo!==v.containerInfo||x.stateNode.implementation!==v.implementation?(x=ad(v,g.mode,b),x.return=g,x):(x=i(x,v.children||[]),x.return=g,x)}function c(g,x,v,b,P){return x===null||x.tag!==7?(x=gi(v,g.mode,b,P),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=od(""+x,g.mode,v),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Da:return v=Ml(x.type,x.key,x.props,null,g.mode,v),v.ref=to(g,null,x),v.return=g,v;case Zi:return x=ad(x,g.mode,v),x.return=g,x;case yr:var b=x._init;return d(g,b(x._payload),v)}if(wo(x)||Qs(x))return x=gi(x,g.mode,v,null),x.return=g,x;Ga(g,x)}return null}function h(g,x,v,b){var P=x!==null?x.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return P!==null?null:a(g,x,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Da:return v.key===P?l(g,x,v,b):null;case Zi:return v.key===P?u(g,x,v,b):null;case yr:return P=v._init,h(g,x,P(v._payload),b)}if(wo(v)||Qs(v))return P!==null?null:c(g,x,v,b,null);Ga(g,v)}return null}function p(g,x,v,b,P){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(v)||null,a(x,g,""+b,P);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Da:return g=g.get(b.key===null?v:b.key)||null,l(x,g,b,P);case Zi:return g=g.get(b.key===null?v:b.key)||null,u(x,g,b,P);case yr:var S=b._init;return p(g,x,v,S(b._payload),P)}if(wo(b)||Qs(b))return g=g.get(v)||null,c(x,g,b,P,null);Ga(x,b)}return null}function m(g,x,v,b){for(var P=null,S=null,j=x,C=x=0,T=null;j!==null&&C<v.length;C++){j.index>C?(T=j,j=null):T=j.sibling;var E=h(g,j,v[C],b);if(E===null){j===null&&(j=T);break}e&&j&&E.alternate===null&&t(g,j),x=s(E,x,C),S===null?P=E:S.sibling=E,S=E,j=T}if(C===v.length)return n(g,j),Te&&ri(g,C),P;if(j===null){for(;C<v.length;C++)j=d(g,v[C],b),j!==null&&(x=s(j,x,C),S===null?P=j:S.sibling=j,S=j);return Te&&ri(g,C),P}for(j=r(g,j);C<v.length;C++)T=p(j,g,C,v[C],b),T!==null&&(e&&T.alternate!==null&&j.delete(T.key===null?C:T.key),x=s(T,x,C),S===null?P=T:S.sibling=T,S=T);return e&&j.forEach(function(I){return t(g,I)}),Te&&ri(g,C),P}function y(g,x,v,b){var P=Qs(v);if(typeof P!="function")throw Error(U(150));if(v=P.call(v),v==null)throw Error(U(151));for(var S=P=null,j=x,C=x=0,T=null,E=v.next();j!==null&&!E.done;C++,E=v.next()){j.index>C?(T=j,j=null):T=j.sibling;var I=h(g,j,E.value,b);if(I===null){j===null&&(j=T);break}e&&j&&I.alternate===null&&t(g,j),x=s(I,x,C),S===null?P=I:S.sibling=I,S=I,j=T}if(E.done)return n(g,j),Te&&ri(g,C),P;if(j===null){for(;!E.done;C++,E=v.next())E=d(g,E.value,b),E!==null&&(x=s(E,x,C),S===null?P=E:S.sibling=E,S=E);return Te&&ri(g,C),P}for(j=r(g,j);!E.done;C++,E=v.next())E=p(j,g,C,E.value,b),E!==null&&(e&&E.alternate!==null&&j.delete(E.key===null?C:E.key),x=s(E,x,C),S===null?P=E:S.sibling=E,S=E);return e&&j.forEach(function(M){return t(g,M)}),Te&&ri(g,C),P}function w(g,x,v,b){if(typeof v=="object"&&v!==null&&v.type===Ji&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Da:e:{for(var P=v.key,S=x;S!==null;){if(S.key===P){if(P=v.type,P===Ji){if(S.tag===7){n(g,S.sibling),x=i(S,v.props.children),x.return=g,g=x;break e}}else if(S.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===yr&&Ag(P)===S.type){n(g,S.sibling),x=i(S,v.props),x.ref=to(g,S,v),x.return=g,g=x;break e}n(g,S);break}else t(g,S);S=S.sibling}v.type===Ji?(x=gi(v.props.children,g.mode,b,v.key),x.return=g,g=x):(b=Ml(v.type,v.key,v.props,null,g.mode,b),b.ref=to(g,x,v),b.return=g,g=b)}return o(g);case Zi:e:{for(S=v.key;x!==null;){if(x.key===S)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=ad(v,g.mode,b),x.return=g,g=x}return o(g);case yr:return S=v._init,w(g,x,S(v._payload),b)}if(wo(v))return m(g,x,v,b);if(Qs(v))return y(g,x,v,b);Ga(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=od(v,g.mode,b),x.return=g,g=x),o(g)):n(g,x)}return w}var Ps=F1(!0),O1=F1(!1),du=Kr(null),fu=null,as=null,gp=null;function yp(){gp=as=fu=null}function xp(e){var t=du.current;Pe(du),e._currentValue=t}function Ff(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 ys(e,t){fu=e,gp=as=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(kt=!0),e.firstContext=null)}function rn(e){var t=e._currentValue;if(gp!==e)if(e={context:e,memoizedValue:t,next:null},as===null){if(fu===null)throw Error(U(308));as=e,fu.dependencies={lanes:0,firstContext:e}}else as=as.next=e;return t}var ci=null;function vp(e){ci===null?ci=[e]:ci.push(e)}function B1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,vp(t)):(n.next=i.next,i.next=n),t.interleaved=n,nr(e,r)}function nr(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 xr=!1;function wp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $1(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 Zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ar(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,nr(e,n)}return i=r.interleaved,i===null?(t.next=t,vp(r)):(t.next=i.next,i.next=t),r.interleaved=t,nr(e,n)}function Pl(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,sp(e,n)}}function Dg(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 hu(e,t,n,r){var i=e.updateQueue;xr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,c=u=l=null,a=s;do{var h=a.lane,p=a.eventTime;if((r&h)===h){c!==null&&(c=c.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=Me({},d,h);break e;case 2:xr=!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},c===null?(u=c=p,l=d):c=c.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(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Pi|=o,e.lanes=o,e.memoizedState=d}}function Ng(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 xa={},zn=Kr(xa),Jo=Kr(xa),ea=Kr(xa);function di(e){if(e===xa)throw Error(U(174));return e}function bp(e,t){switch(ke(ea,t),ke(Jo,e),ke(zn,xa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xf(t,e)}Pe(zn),ke(zn,t)}function Es(){Pe(zn),Pe(Jo),Pe(ea)}function V1(e){di(ea.current);var t=di(zn.current),n=xf(t,e.type);t!==n&&(ke(Jo,e),ke(zn,n))}function kp(e){Jo.current===e&&(Pe(zn),Pe(Jo))}var je=Kr(0);function pu(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 ed=[];function _p(){for(var e=0;e<ed.length;e++)ed[e]._workInProgressVersionPrimary=null;ed.length=0}var El=sr.ReactCurrentDispatcher,td=sr.ReactCurrentBatchConfig,Ci=0,Re=null,He=null,qe=null,mu=!1,Io=!1,ta=0,mP=0;function it(){throw Error(U(321))}function Sp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vn(e[n],t[n]))return!1;return!0}function Cp(e,t,n,r,i,s){if(Ci=s,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,El.current=e===null||e.memoizedState===null?vP:wP,e=n(r,i),Io){s=0;do{if(Io=!1,ta=0,25<=s)throw Error(U(301));s+=1,qe=He=null,t.updateQueue=null,El.current=bP,e=n(r,i)}while(Io)}if(El.current=gu,t=He!==null&&He.next!==null,Ci=0,qe=He=Re=null,mu=!1,t)throw Error(U(300));return e}function Pp(){var e=ta!==0;return ta=0,e}function Tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Re.memoizedState=qe=e:qe=qe.next=e,qe}function sn(){if(He===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=qe===null?Re.memoizedState:qe.next;if(t!==null)qe=t,He=e;else{if(e===null)throw Error(U(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},qe===null?Re.memoizedState=qe=e:qe=qe.next=e}return qe}function na(e,t){return typeof t=="function"?t(e):t}function nd(e){var t=sn(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=He,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((Ci&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Re.lanes|=c,Pi|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,vn(r,t.memoizedState)||(kt=!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,Re.lanes|=s,Pi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function rd(e){var t=sn(),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);vn(s,t.memoizedState)||(kt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function W1(){}function U1(e,t){var n=Re,r=sn(),i=t(),s=!vn(r.memoizedState,i);if(s&&(r.memoizedState=i,kt=!0),r=r.queue,Ep(K1.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||qe!==null&&qe.memoizedState.tag&1){if(n.flags|=2048,ra(9,G1.bind(null,n,r,i,t),void 0,null),Qe===null)throw Error(U(349));Ci&30||H1(n,t,i)}return i}function H1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function G1(e,t,n,r){t.value=n,t.getSnapshot=r,Y1(t)&&q1(e)}function K1(e,t,n){return n(function(){Y1(t)&&q1(e)})}function Y1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vn(e,n)}catch{return!0}}function q1(e){var t=nr(e,1);t!==null&&yn(t,e,1,-1)}function zg(e){var t=Tn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:e},t.queue=e,e=e.dispatch=xP.bind(null,Re,e),[t.memoizedState,e]}function ra(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.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 Q1(){return sn().memoizedState}function Tl(e,t,n,r){var i=Tn();Re.flags|=e,i.memoizedState=ra(1|t,n,void 0,r===void 0?null:r)}function rc(e,t,n,r){var i=sn();r=r===void 0?null:r;var s=void 0;if(He!==null){var o=He.memoizedState;if(s=o.destroy,r!==null&&Sp(r,o.deps)){i.memoizedState=ra(t,n,s,r);return}}Re.flags|=e,i.memoizedState=ra(1|t,n,s,r)}function Fg(e,t){return Tl(8390656,8,e,t)}function Ep(e,t){return rc(2048,8,e,t)}function X1(e,t){return rc(4,2,e,t)}function Z1(e,t){return rc(4,4,e,t)}function J1(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 ew(e,t,n){return n=n!=null?n.concat([e]):null,rc(4,4,J1.bind(null,t,e),n)}function Tp(){}function tw(e,t){var n=sn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function nw(e,t){var n=sn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rw(e,t,n){return Ci&21?(vn(n,t)||(n=l1(),Re.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,kt=!0),e.memoizedState=n)}function gP(e,t){var n=me;me=n!==0&&4>n?n:4,e(!0);var r=td.transition;td.transition={};try{e(!1),t()}finally{me=n,td.transition=r}}function iw(){return sn().memoizedState}function yP(e,t,n){var r=Nr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sw(e))ow(t,n);else if(n=B1(e,t,n,r),n!==null){var i=gt();yn(n,e,r,i),aw(n,t,r)}}function xP(e,t,n){var r=Nr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sw(e))ow(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,vn(a,o)){var l=t.interleaved;l===null?(i.next=i,vp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=B1(e,t,i,r),n!==null&&(i=gt(),yn(n,e,r,i),aw(n,t,r))}}function sw(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function ow(e,t){Io=mu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function aw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sp(e,n)}}var gu={readContext:rn,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},vP={readContext:rn,useCallback:function(e,t){return Tn().memoizedState=[e,t===void 0?null:t],e},useContext:rn,useEffect:Fg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Tl(4194308,4,J1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Tl(4,2,e,t)},useMemo:function(e,t){var n=Tn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Tn();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=yP.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Tn();return e={current:e},t.memoizedState=e},useState:zg,useDebugValue:Tp,useDeferredValue:function(e){return Tn().memoizedState=e},useTransition:function(){var e=zg(!1),t=e[0];return e=gP.bind(null,e[1]),Tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,i=Tn();if(Te){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Qe===null)throw Error(U(349));Ci&30||H1(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Fg(K1.bind(null,r,s,e),[e]),r.flags|=2048,ra(9,G1.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Tn(),t=Qe.identifierPrefix;if(Te){var n=Xn,r=Qn;n=(r&~(1<<32-gn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ta++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=mP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},wP={readContext:rn,useCallback:tw,useContext:rn,useEffect:Ep,useImperativeHandle:ew,useInsertionEffect:X1,useLayoutEffect:Z1,useMemo:nw,useReducer:nd,useRef:Q1,useState:function(){return nd(na)},useDebugValue:Tp,useDeferredValue:function(e){var t=sn();return rw(t,He.memoizedState,e)},useTransition:function(){var e=nd(na)[0],t=sn().memoizedState;return[e,t]},useMutableSource:W1,useSyncExternalStore:U1,useId:iw,unstable_isNewReconciler:!1},bP={readContext:rn,useCallback:tw,useContext:rn,useEffect:Ep,useImperativeHandle:ew,useInsertionEffect:X1,useLayoutEffect:Z1,useMemo:nw,useReducer:rd,useRef:Q1,useState:function(){return rd(na)},useDebugValue:Tp,useDeferredValue:function(e){var t=sn();return He===null?t.memoizedState=e:rw(t,He.memoizedState,e)},useTransition:function(){var e=rd(na)[0],t=sn().memoizedState;return[e,t]},useMutableSource:W1,useSyncExternalStore:U1,useId:iw,unstable_isNewReconciler:!1};function hn(e,t){if(e&&e.defaultProps){t=Me({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Of(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Me({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ic={isMounted:function(e){return(e=e._reactInternals)?Ri(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gt(),i=Nr(e),s=Zn(r,i);s.payload=t,n!=null&&(s.callback=n),t=Ar(e,s,i),t!==null&&(yn(t,e,i,r),Pl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gt(),i=Nr(e),s=Zn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ar(e,s,i),t!==null&&(yn(t,e,i,r),Pl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gt(),r=Nr(e),i=Zn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Ar(e,i,r),t!==null&&(yn(t,e,r,n),Pl(t,e,r))}};function Og(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?!qo(n,r)||!qo(i,s):!0}function lw(e,t,n){var r=!1,i=Vr,s=t.contextType;return typeof s=="object"&&s!==null?s=rn(s):(i=Ct(t)?_i:ct.current,r=t.contextTypes,s=(r=r!=null)?Ss(e,i):Vr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ic,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Bg(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&&ic.enqueueReplaceState(t,t.state,null)}function Bf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},wp(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=rn(s):(s=Ct(t)?_i:ct.current,i.context=Ss(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Of(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&&ic.enqueueReplaceState(i,i.state,null),hu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ts(e,t){try{var n="",r=t;do n+=qS(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
40
|
+
Error generating stack: `+s.message+`
|
|
41
|
+
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function id(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $f(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var kP=typeof WeakMap=="function"?WeakMap:Map;function uw(e,t,n){n=Zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xu||(xu=!0,Xf=r),$f(e,t)},n}function cw(e,t,n){n=Zn(-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(){$f(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){$f(e,t),typeof r!="function"&&(Dr===null?Dr=new Set([this]):Dr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function $g(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new kP;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=NP.bind(null,e,t,n),t.then(e,e))}function Vg(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 Wg(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=Zn(-1,1),t.tag=2,Ar(n,t,1))),n.lanes|=1),e)}var _P=sr.ReactCurrentOwner,kt=!1;function ht(e,t,n,r){t.child=e===null?O1(t,null,n,r):Ps(t,e.child,n,r)}function Ug(e,t,n,r,i){n=n.render;var s=t.ref;return ys(t,i),r=Cp(e,t,n,r,s,i),n=Pp(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rr(e,t,i)):(Te&&n&&hp(t),t.flags|=1,ht(e,t,r,i),t.child)}function Hg(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Np(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,dw(e,t,s,r,i)):(e=Ml(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:qo,n(o,r)&&e.ref===t.ref)return rr(e,t,i)}return t.flags|=1,e=zr(s,r),e.ref=t.ref,e.return=t,t.child=e}function dw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(qo(s,r)&&e.ref===t.ref)if(kt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(kt=!0);else return t.lanes=e.lanes,rr(e,t,i)}return Vf(e,t,n,r,i)}function fw(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},ke(us,At),At|=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,ke(us,At),At|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ke(us,At),At|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ke(us,At),At|=r;return ht(e,t,i,n),t.child}function hw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vf(e,t,n,r,i){var s=Ct(n)?_i:ct.current;return s=Ss(t,s),ys(t,i),n=Cp(e,t,n,r,s,i),r=Pp(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rr(e,t,i)):(Te&&r&&hp(t),t.flags|=1,ht(e,t,n,i),t.child)}function Gg(e,t,n,r,i){if(Ct(n)){var s=!0;lu(t)}else s=!1;if(ys(t,i),t.stateNode===null)jl(e,t),lw(t,n,r),Bf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=rn(u):(u=Ct(n)?_i:ct.current,u=Ss(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Bg(t,o,r,u),xr=!1;var h=t.memoizedState;o.state=h,hu(t,r,o,i),l=t.memoizedState,a!==r||h!==l||St.current||xr?(typeof c=="function"&&(Of(t,n,c,r),l=t.memoizedState),(a=xr||Og(t,n,a,r,h,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,$1(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:hn(t.type,a),o.props=u,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=rn(l):(l=Ct(n)?_i:ct.current,l=Ss(t,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Bg(t,o,r,l),xr=!1,h=t.memoizedState,o.state=h,hu(t,r,o,i);var m=t.memoizedState;a!==d||h!==m||St.current||xr?(typeof p=="function"&&(Of(t,n,p,r),m=t.memoizedState),(u=xr||Og(t,n,u,r,h,m,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Wf(e,t,n,r,s,i)}function Wf(e,t,n,r,i,s){hw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Ig(t,n,!1),rr(e,t,s);r=t.stateNode,_P.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ps(t,e.child,null,s),t.child=Ps(t,null,a,s)):ht(e,t,a,s),t.memoizedState=r.state,i&&Ig(t,n,!0),t.child}function pw(e){var t=e.stateNode;t.pendingContext?Rg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rg(e,t.context,!1),bp(e,t.containerInfo)}function Kg(e,t,n,r,i){return Cs(),mp(i),t.flags|=256,ht(e,t,n,r),t.child}var Uf={dehydrated:null,treeContext:null,retryLane:0};function Hf(e){return{baseLanes:e,cachePool:null,transitions:null}}function mw(e,t,n){var r=t.pendingProps,i=je.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),ke(je,i&1),e===null)return zf(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=ac(o,r,0,null),e=gi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Hf(n),t.memoizedState=Uf,e):jp(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return SP(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=zr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=zr(a,s):(s=gi(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?Hf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Uf,r}return s=e.child,e=s.sibling,r=zr(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 jp(e,t){return t=ac({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ka(e,t,n,r){return r!==null&&mp(r),Ps(t,e.child,null,n),e=jp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function SP(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=id(Error(U(422))),Ka(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=ac({mode:"visible",children:r.children},i,0,null),s=gi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ps(t,e.child,null,o),t.child.memoizedState=Hf(o),t.memoizedState=Uf,s);if(!(t.mode&1))return Ka(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=id(s,r,void 0),Ka(e,t,o,r)}if(a=(o&e.childLanes)!==0,kt||a){if(r=Qe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,nr(e,i),yn(r,e,i,-1))}return Dp(),r=id(Error(U(421))),Ka(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=zP.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Dt=Lr(i.nextSibling),zt=t,Te=!0,mn=null,e!==null&&(Qt[Xt++]=Qn,Qt[Xt++]=Xn,Qt[Xt++]=Si,Qn=e.id,Xn=e.overflow,Si=t),t=jp(t,r.children),t.flags|=4096,t)}function Yg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ff(e.return,t,n)}function sd(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 gw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ht(e,t,r.children,n),r=je.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&&Yg(e,n,t);else if(e.tag===19)Yg(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(ke(je,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&&pu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),sd(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&&pu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}sd(t,!0,n,null,s);break;case"together":sd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function jl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=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=zr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function CP(e,t,n){switch(t.tag){case 3:pw(t),Cs();break;case 5:V1(t);break;case 1:Ct(t.type)&&lu(t);break;case 4:bp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ke(du,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ke(je,je.current&1),t.flags|=128,null):n&t.child.childLanes?mw(e,t,n):(ke(je,je.current&1),e=rr(e,t,n),e!==null?e.sibling:null);ke(je,je.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return gw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ke(je,je.current),r)break;return null;case 22:case 23:return t.lanes=0,fw(e,t,n)}return rr(e,t,n)}var yw,Gf,xw,vw;yw=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}};Gf=function(){};xw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,di(zn.current);var s=null;switch(n){case"input":i=pf(e,i),r=pf(e,r),s=[];break;case"select":i=Me({},i,{value:void 0}),r=Me({},r,{value:void 0}),s=[];break;case"textarea":i=yf(e,i),r=yf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ou)}vf(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Vo.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Vo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ce("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};vw=function(e,t,n,r){n!==r&&(t.flags|=4)};function no(e,t){if(!Te)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 st(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 PP(e,t,n){var r=t.pendingProps;switch(pp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return Ct(t.type)&&au(),st(t),null;case 3:return r=t.stateNode,Es(),Pe(St),Pe(ct),_p(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ha(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,mn!==null&&(eh(mn),mn=null))),Gf(e,t),st(t),null;case 5:kp(t);var i=di(ea.current);if(n=t.type,e!==null&&t.stateNode!=null)xw(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 st(t),null}if(e=di(zn.current),Ha(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Ln]=t,r[Zo]=s,e=(t.mode&1)!==0,n){case"dialog":Ce("cancel",r),Ce("close",r);break;case"iframe":case"object":case"embed":Ce("load",r);break;case"video":case"audio":for(i=0;i<ko.length;i++)Ce(ko[i],r);break;case"source":Ce("error",r);break;case"img":case"image":case"link":Ce("error",r),Ce("load",r);break;case"details":Ce("toggle",r);break;case"input":rg(r,s),Ce("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ce("invalid",r);break;case"textarea":sg(r,s),Ce("invalid",r)}vf(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&&Ua(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ua(r.textContent,a,e),i=["children",""+a]):Vo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ce("scroll",r)}switch(n){case"input":Na(r),ig(r,s,!0);break;case"textarea":Na(r),og(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ou)}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=Kv(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[Ln]=t,e[Zo]=r,yw(e,t,!1,!1),t.stateNode=e;e:{switch(o=wf(n,r),n){case"dialog":Ce("cancel",e),Ce("close",e),i=r;break;case"iframe":case"object":case"embed":Ce("load",e),i=r;break;case"video":case"audio":for(i=0;i<ko.length;i++)Ce(ko[i],e);i=r;break;case"source":Ce("error",e),i=r;break;case"img":case"image":case"link":Ce("error",e),Ce("load",e),i=r;break;case"details":Ce("toggle",e),i=r;break;case"input":rg(e,r),i=pf(e,r),Ce("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Me({},r,{value:void 0}),Ce("invalid",e);break;case"textarea":sg(e,r),i=yf(e,r),Ce("invalid",e);break;default:i=r}vf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Qv(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Yv(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Wo(e,l):typeof l=="number"&&Wo(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Vo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ce("scroll",e):l!=null&&Jh(e,s,l,o))}switch(n){case"input":Na(e),ig(e,r,!1);break;case"textarea":Na(e),og(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$r(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?hs(e,!!r.multiple,s,!1):r.defaultValue!=null&&hs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ou)}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 st(t),null;case 6:if(e&&t.stateNode!=null)vw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=di(ea.current),di(zn.current),Ha(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ln]=t,(s=r.nodeValue!==n)&&(e=zt,e!==null))switch(e.tag){case 3:Ua(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ua(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ln]=t,t.stateNode=r}return st(t),null;case 13:if(Pe(je),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Te&&Dt!==null&&t.mode&1&&!(t.flags&128))z1(),Cs(),t.flags|=98560,s=!1;else if(s=Ha(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[Ln]=t}else Cs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;st(t),s=!1}else mn!==null&&(eh(mn),mn=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||je.current&1?Ge===0&&(Ge=3):Dp())),t.updateQueue!==null&&(t.flags|=4),st(t),null);case 4:return Es(),Gf(e,t),e===null&&Qo(t.stateNode.containerInfo),st(t),null;case 10:return xp(t.type._context),st(t),null;case 17:return Ct(t.type)&&au(),st(t),null;case 19:if(Pe(je),s=t.memoizedState,s===null)return st(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)no(s,!1);else{if(Ge!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=pu(e),o!==null){for(t.flags|=128,no(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 ke(je,je.current&1|2),t.child}e=e.sibling}s.tail!==null&&Fe()>js&&(t.flags|=128,r=!0,no(s,!1),t.lanes=4194304)}else{if(!r)if(e=pu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),no(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Te)return st(t),null}else 2*Fe()-s.renderingStartTime>js&&n!==1073741824&&(t.flags|=128,r=!0,no(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=Fe(),t.sibling=null,n=je.current,ke(je,r?n&1|2:n&1),t):(st(t),null);case 22:case 23:return Ap(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?At&1073741824&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function EP(e,t){switch(pp(t),t.tag){case 1:return Ct(t.type)&&au(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Es(),Pe(St),Pe(ct),_p(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return kp(t),null;case 13:if(Pe(je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(je),null;case 4:return Es(),null;case 10:return xp(t.type._context),null;case 22:case 23:return Ap(),null;case 24:return null;default:return null}}var Ya=!1,at=!1,TP=typeof WeakSet=="function"?WeakSet:Set,Y=null;function ls(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Kf(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var qg=!1;function jP(e,t){if(Rf=ru,e=S1(),fp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var 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&&++u===i&&(a=o),h===s&&++c===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(If={focusedElem:e,selectionRange:n},ru=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:hn(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){Ne(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return m=qg,qg=!1,m}function Mo(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&&Kf(t,n,s)}i=i.next}while(i!==r)}}function sc(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 Yf(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 ww(e){var t=e.alternate;t!==null&&(e.alternate=null,ww(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ln],delete t[Zo],delete t[Af],delete t[dP],delete t[fP])),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 bw(e){return e.tag===5||e.tag===3||e.tag===4}function Qg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bw(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 qf(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=ou));else if(r!==4&&(e=e.child,e!==null))for(qf(e,t,n),e=e.sibling;e!==null;)qf(e,t,n),e=e.sibling}function Qf(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(Qf(e,t,n),e=e.sibling;e!==null;)Qf(e,t,n),e=e.sibling}var Ze=null,pn=!1;function ar(e,t,n){for(n=n.child;n!==null;)kw(e,t,n),n=n.sibling}function kw(e,t,n){if(Nn&&typeof Nn.onCommitFiberUnmount=="function")try{Nn.onCommitFiberUnmount(Xu,n)}catch{}switch(n.tag){case 5:at||ls(n,t);case 6:var r=Ze,i=pn;Ze=null,ar(e,t,n),Ze=r,pn=i,Ze!==null&&(pn?(e=Ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ze.removeChild(n.stateNode));break;case 18:Ze!==null&&(pn?(e=Ze,n=n.stateNode,e.nodeType===8?Zc(e.parentNode,n):e.nodeType===1&&Zc(e,n),Ko(e)):Zc(Ze,n.stateNode));break;case 4:r=Ze,i=pn,Ze=n.stateNode.containerInfo,pn=!0,ar(e,t,n),Ze=r,pn=i;break;case 0:case 11:case 14:case 15:if(!at&&(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)&&Kf(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!at&&(ls(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(at=(r=at)||n.memoizedState!==null,ar(e,t,n),at=r):ar(e,t,n);break;default:ar(e,t,n)}}function Xg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new TP),t.forEach(function(r){var i=FP.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function un(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:Ze=a.stateNode,pn=!1;break e;case 3:Ze=a.stateNode.containerInfo,pn=!0;break e;case 4:Ze=a.stateNode.containerInfo,pn=!0;break e}a=a.return}if(Ze===null)throw Error(U(160));kw(s,o,i),Ze=null,pn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ne(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_w(t,e),t=t.sibling}function _w(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(un(t,e),_n(e),r&4){try{Mo(3,e,e.return),sc(3,e)}catch(y){Ne(e,e.return,y)}try{Mo(5,e,e.return)}catch(y){Ne(e,e.return,y)}}break;case 1:un(t,e),_n(e),r&512&&n!==null&&ls(n,n.return);break;case 5:if(un(t,e),_n(e),r&512&&n!==null&&ls(n,n.return),e.flags&32){var i=e.stateNode;try{Wo(i,"")}catch(y){Ne(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&&Hv(i,s),wf(a,o);var u=wf(a,s);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Qv(i,d):c==="dangerouslySetInnerHTML"?Yv(i,d):c==="children"?Wo(i,d):Jh(i,c,d,u)}switch(a){case"input":mf(i,s);break;case"textarea":Gv(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?hs(i,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?hs(i,!!s.multiple,s.defaultValue,!0):hs(i,!!s.multiple,s.multiple?[]:"",!1))}i[Zo]=s}catch(y){Ne(e,e.return,y)}}break;case 6:if(un(t,e),_n(e),r&4){if(e.stateNode===null)throw Error(U(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){Ne(e,e.return,y)}}break;case 3:if(un(t,e),_n(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ko(t.containerInfo)}catch(y){Ne(e,e.return,y)}break;case 4:un(t,e),_n(e);break;case 13:un(t,e),_n(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Mp=Fe())),r&4&&Xg(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(at=(u=at)||c,un(t,e),at=u):un(t,e),_n(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Y=e,c=e.child;c!==null;){for(d=Y=c;Y!==null;){switch(h=Y,p=h.child,h.tag){case 0:case 11:case 14:case 15:Mo(4,h,h.return);break;case 1:ls(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){Ne(r,n,y)}}break;case 5:ls(h,h.return);break;case 22:if(h.memoizedState!==null){Jg(d);continue}}p!==null?(p.return=h,Y=p):Jg(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=qv("display",o))}catch(y){Ne(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){Ne(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:un(t,e),_n(e),r&4&&Xg(e);break;case 21:break;default:un(t,e),_n(e)}}function _n(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(bw(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&&(Wo(i,""),r.flags&=-33);var s=Qg(e);Qf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Qg(e);qf(e,a,o);break;default:throw Error(U(161))}}catch(l){Ne(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function RP(e,t,n){Y=e,Sw(e)}function Sw(e,t,n){for(var r=(e.mode&1)!==0;Y!==null;){var i=Y,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Ya;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||at;a=Ya;var u=at;if(Ya=o,(at=l)&&!u)for(Y=i;Y!==null;)o=Y,l=o.child,o.tag===22&&o.memoizedState!==null?ey(i):l!==null?(l.return=o,Y=l):ey(i);for(;s!==null;)Y=s,Sw(s),s=s.sibling;Y=i,Ya=a,at=u}Zg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Y=s):Zg(e)}}function Zg(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:at||sc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!at)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:hn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Ng(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}Ng(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ko(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}at||t.flags&512&&Yf(t)}catch(h){Ne(t,t.return,h)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function Jg(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function ey(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{sc(4,t)}catch(l){Ne(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ne(t,i,l)}}var s=t.return;try{Yf(t)}catch(l){Ne(t,s,l)}break;case 5:var o=t.return;try{Yf(t)}catch(l){Ne(t,o,l)}}}catch(l){Ne(t,t.return,l)}if(t===e){Y=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Y=a;break}Y=t.return}}var IP=Math.ceil,yu=sr.ReactCurrentDispatcher,Rp=sr.ReactCurrentOwner,tn=sr.ReactCurrentBatchConfig,de=0,Qe=null,Ve=null,tt=0,At=0,us=Kr(0),Ge=0,ia=null,Pi=0,oc=0,Ip=0,Lo=null,bt=null,Mp=0,js=1/0,Yn=null,xu=!1,Xf=null,Dr=null,qa=!1,Sr=null,vu=0,Ao=0,Zf=null,Rl=-1,Il=0;function gt(){return de&6?Fe():Rl!==-1?Rl:Rl=Fe()}function Nr(e){return e.mode&1?de&2&&tt!==0?tt&-tt:pP.transition!==null?(Il===0&&(Il=l1()),Il):(e=me,e!==0||(e=window.event,e=e===void 0?16:m1(e.type)),e):1}function yn(e,t,n,r){if(50<Ao)throw Ao=0,Zf=null,Error(U(185));ma(e,n,r),(!(de&2)||e!==Qe)&&(e===Qe&&(!(de&2)&&(oc|=n),Ge===4&&br(e,tt)),Pt(e,r),n===1&&de===0&&!(t.mode&1)&&(js=Fe()+500,nc&&Yr()))}function Pt(e,t){var n=e.callbackNode;pC(e,t);var r=nu(e,e===Qe?tt:0);if(r===0)n!==null&&ug(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ug(n),t===1)e.tag===0?hP(ty.bind(null,e)):A1(ty.bind(null,e)),uP(function(){!(de&6)&&Yr()}),n=null;else{switch(u1(r)){case 1:n=ip;break;case 4:n=o1;break;case 16:n=tu;break;case 536870912:n=a1;break;default:n=tu}n=Mw(n,Cw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cw(e,t){if(Rl=-1,Il=0,de&6)throw Error(U(327));var n=e.callbackNode;if(xs()&&e.callbackNode!==n)return null;var r=nu(e,e===Qe?tt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=wu(e,r);else{t=r;var i=de;de|=2;var s=Ew();(Qe!==e||tt!==t)&&(Yn=null,js=Fe()+500,mi(e,t));do try{AP();break}catch(a){Pw(e,a)}while(!0);yp(),yu.current=s,de=i,Ve!==null?t=0:(Qe=null,tt=0,t=Ge)}if(t!==0){if(t===2&&(i=Cf(e),i!==0&&(r=i,t=Jf(e,i))),t===1)throw n=ia,mi(e,0),br(e,r),Pt(e,Fe()),n;if(t===6)br(e,r);else{if(i=e.current.alternate,!(r&30)&&!MP(i)&&(t=wu(e,r),t===2&&(s=Cf(e),s!==0&&(r=s,t=Jf(e,s))),t===1))throw n=ia,mi(e,0),br(e,r),Pt(e,Fe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:ii(e,bt,Yn);break;case 3:if(br(e,r),(r&130023424)===r&&(t=Mp+500-Fe(),10<t)){if(nu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){gt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Lf(ii.bind(null,e,bt,Yn),t);break}ii(e,bt,Yn);break;case 4:if(br(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-gn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*IP(r/1960))-r,10<r){e.timeoutHandle=Lf(ii.bind(null,e,bt,Yn),r);break}ii(e,bt,Yn);break;case 5:ii(e,bt,Yn);break;default:throw Error(U(329))}}}return Pt(e,Fe()),e.callbackNode===n?Cw.bind(null,e):null}function Jf(e,t){var n=Lo;return e.current.memoizedState.isDehydrated&&(mi(e,t).flags|=256),e=wu(e,t),e!==2&&(t=bt,bt=n,t!==null&&eh(t)),e}function eh(e){bt===null?bt=e:bt.push.apply(bt,e)}function MP(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(!vn(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 br(e,t){for(t&=~Ip,t&=~oc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gn(t),r=1<<n;e[n]=-1,t&=~r}}function ty(e){if(de&6)throw Error(U(327));xs();var t=nu(e,0);if(!(t&1))return Pt(e,Fe()),null;var n=wu(e,t);if(e.tag!==0&&n===2){var r=Cf(e);r!==0&&(t=r,n=Jf(e,r))}if(n===1)throw n=ia,mi(e,0),br(e,t),Pt(e,Fe()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ii(e,bt,Yn),Pt(e,Fe()),null}function Lp(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(js=Fe()+500,nc&&Yr())}}function Ei(e){Sr!==null&&Sr.tag===0&&!(de&6)&&xs();var t=de;de|=1;var n=tn.transition,r=me;try{if(tn.transition=null,me=1,e)return e()}finally{me=r,tn.transition=n,de=t,!(de&6)&&Yr()}}function Ap(){At=us.current,Pe(us)}function mi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,lP(n)),Ve!==null)for(n=Ve.return;n!==null;){var r=n;switch(pp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&au();break;case 3:Es(),Pe(St),Pe(ct),_p();break;case 5:kp(r);break;case 4:Es();break;case 13:Pe(je);break;case 19:Pe(je);break;case 10:xp(r.type._context);break;case 22:case 23:Ap()}n=n.return}if(Qe=e,Ve=e=zr(e.current,null),tt=At=t,Ge=0,ia=null,Ip=oc=Pi=0,bt=Lo=null,ci!==null){for(t=0;t<ci.length;t++)if(n=ci[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}ci=null}return e}function Pw(e,t){do{var n=Ve;try{if(yp(),El.current=gu,mu){for(var r=Re.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}mu=!1}if(Ci=0,qe=He=Re=null,Io=!1,ta=0,Rp.current=null,n===null||n.return===null){Ge=1,ia=t,Ve=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=tt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Vg(o);if(p!==null){p.flags&=-257,Wg(p,o,a,s,t),p.mode&1&&$g(s,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var y=new Set;y.add(l),t.updateQueue=y}else m.add(l);break e}else{if(!(t&1)){$g(s,u,t),Dp();break e}l=Error(U(426))}}else if(Te&&a.mode&1){var w=Vg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Wg(w,o,a,s,t),mp(Ts(l,a));break e}}s=l=Ts(l,a),Ge!==4&&(Ge=2),Lo===null?Lo=[s]:Lo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=uw(s,l,t);Dg(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"&&(Dr===null||!Dr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=cw(s,a,t);Dg(s,b);break e}}s=s.return}while(s!==null)}jw(n)}catch(P){t=P,Ve===n&&n!==null&&(Ve=n=n.return);continue}break}while(!0)}function Ew(){var e=yu.current;return yu.current=gu,e===null?gu:e}function Dp(){(Ge===0||Ge===3||Ge===2)&&(Ge=4),Qe===null||!(Pi&268435455)&&!(oc&268435455)||br(Qe,tt)}function wu(e,t){var n=de;de|=2;var r=Ew();(Qe!==e||tt!==t)&&(Yn=null,mi(e,t));do try{LP();break}catch(i){Pw(e,i)}while(!0);if(yp(),de=n,yu.current=r,Ve!==null)throw Error(U(261));return Qe=null,tt=0,Ge}function LP(){for(;Ve!==null;)Tw(Ve)}function AP(){for(;Ve!==null&&!sC();)Tw(Ve)}function Tw(e){var t=Iw(e.alternate,e,At);e.memoizedProps=e.pendingProps,t===null?jw(e):Ve=t,Rp.current=null}function jw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=EP(n,t),n!==null){n.flags&=32767,Ve=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ge=6,Ve=null;return}}else if(n=PP(n,t,At),n!==null){Ve=n;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);Ge===0&&(Ge=5)}function ii(e,t,n){var r=me,i=tn.transition;try{tn.transition=null,me=1,DP(e,t,n,r)}finally{tn.transition=i,me=r}return null}function DP(e,t,n,r){do xs();while(Sr!==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(mC(e,s),e===Qe&&(Ve=Qe=null,tt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||qa||(qa=!0,Mw(tu,function(){return xs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=tn.transition,tn.transition=null;var o=me;me=1;var a=de;de|=4,Rp.current=null,jP(e,n),_w(n,e),tP(If),ru=!!Rf,If=Rf=null,e.current=n,RP(n),oC(),de=a,me=o,tn.transition=s}else e.current=n;if(qa&&(qa=!1,Sr=e,vu=i),s=e.pendingLanes,s===0&&(Dr=null),uC(n.stateNode),Pt(e,Fe()),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(xu)throw xu=!1,e=Xf,Xf=null,e;return vu&1&&e.tag!==0&&xs(),s=e.pendingLanes,s&1?e===Zf?Ao++:(Ao=0,Zf=e):Ao=0,Yr(),null}function xs(){if(Sr!==null){var e=u1(vu),t=tn.transition,n=me;try{if(tn.transition=null,me=16>e?16:e,Sr===null)var r=!1;else{if(e=Sr,Sr=null,vu=0,de&6)throw Error(U(331));var i=de;for(de|=4,Y=e.current;Y!==null;){var s=Y,o=s.child;if(Y.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(Y=u;Y!==null;){var c=Y;switch(c.tag){case 0:case 11:case 15:Mo(8,c,s)}var d=c.child;if(d!==null)d.return=c,Y=d;else for(;Y!==null;){c=Y;var h=c.sibling,p=c.return;if(ww(c),c===u){Y=null;break}if(h!==null){h.return=p,Y=h;break}Y=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)}}Y=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Y=o;else e:for(;Y!==null;){if(s=Y,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Mo(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,Y=g;break e}Y=s.return}}var x=e.current;for(Y=x;Y!==null;){o=Y;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,Y=v;else e:for(o=x;Y!==null;){if(a=Y,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:sc(9,a)}}catch(P){Ne(a,a.return,P)}if(a===o){Y=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,Y=b;break e}Y=a.return}}if(de=i,Yr(),Nn&&typeof Nn.onPostCommitFiberRoot=="function")try{Nn.onPostCommitFiberRoot(Xu,e)}catch{}r=!0}return r}finally{me=n,tn.transition=t}}return!1}function ny(e,t,n){t=Ts(n,t),t=uw(e,t,1),e=Ar(e,t,1),t=gt(),e!==null&&(ma(e,1,t),Pt(e,t))}function Ne(e,t,n){if(e.tag===3)ny(e,e,n);else for(;t!==null;){if(t.tag===3){ny(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Dr===null||!Dr.has(r))){e=Ts(n,e),e=cw(t,e,1),t=Ar(t,e,1),e=gt(),t!==null&&(ma(t,1,e),Pt(t,e));break}}t=t.return}}function NP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=gt(),e.pingedLanes|=e.suspendedLanes&n,Qe===e&&(tt&n)===n&&(Ge===4||Ge===3&&(tt&130023424)===tt&&500>Fe()-Mp?mi(e,0):Ip|=n),Pt(e,t)}function Rw(e,t){t===0&&(e.mode&1?(t=Oa,Oa<<=1,!(Oa&130023424)&&(Oa=4194304)):t=1);var n=gt();e=nr(e,t),e!==null&&(ma(e,t,n),Pt(e,n))}function zP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rw(e,n)}function FP(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),Rw(e,n)}var Iw;Iw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||St.current)kt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return kt=!1,CP(e,t,n);kt=!!(e.flags&131072)}else kt=!1,Te&&t.flags&1048576&&D1(t,cu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;jl(e,t),e=t.pendingProps;var i=Ss(t,ct.current);ys(t,n),i=Cp(null,t,r,e,i,n);var s=Pp();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,Ct(r)?(s=!0,lu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,wp(t),i.updater=ic,t.stateNode=i,i._reactInternals=t,Bf(t,r,e,n),t=Wf(null,t,r,!0,s,n)):(t.tag=0,Te&&s&&hp(t),ht(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(jl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=BP(r),e=hn(r,e),i){case 0:t=Vf(null,t,r,e,n);break e;case 1:t=Gg(null,t,r,e,n);break e;case 11:t=Ug(null,t,r,e,n);break e;case 14:t=Hg(null,t,r,hn(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:hn(r,i),Vf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hn(r,i),Gg(e,t,r,i,n);case 3:e:{if(pw(t),e===null)throw Error(U(387));r=t.pendingProps,s=t.memoizedState,i=s.element,$1(e,t),hu(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=Ts(Error(U(423)),t),t=Kg(e,t,r,n,i);break e}else if(r!==i){i=Ts(Error(U(424)),t),t=Kg(e,t,r,n,i);break e}else for(Dt=Lr(t.stateNode.containerInfo.firstChild),zt=t,Te=!0,mn=null,n=O1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Cs(),r===i){t=rr(e,t,n);break e}ht(e,t,r,n)}t=t.child}return t;case 5:return V1(t),e===null&&zf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Mf(r,i)?o=null:s!==null&&Mf(r,s)&&(t.flags|=32),hw(e,t),ht(e,t,o,n),t.child;case 6:return e===null&&zf(t),null;case 13:return mw(e,t,n);case 4:return bp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ps(t,null,r,n):ht(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hn(r,i),Ug(e,t,r,i,n);case 7:return ht(e,t,t.pendingProps,n),t.child;case 8:return ht(e,t,t.pendingProps.children,n),t.child;case 12:return ht(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,ke(du,r._currentValue),r._currentValue=o,s!==null)if(vn(s.value,o)){if(s.children===i.children&&!St.current){t=rr(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=Zn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ff(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),Ff(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}ht(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ys(t,n),i=rn(i),r=r(i),t.flags|=1,ht(e,t,r,n),t.child;case 14:return r=t.type,i=hn(r,t.pendingProps),i=hn(r.type,i),Hg(e,t,r,i,n);case 15:return dw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hn(r,i),jl(e,t),t.tag=1,Ct(r)?(e=!0,lu(t)):e=!1,ys(t,n),lw(t,r,i),Bf(t,r,i,n),Wf(null,t,r,!0,e,n);case 19:return gw(e,t,n);case 22:return fw(e,t,n)}throw Error(U(156,t.tag))};function Mw(e,t){return s1(e,t)}function OP(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 Jt(e,t,n,r){return new OP(e,t,n,r)}function Np(e){return e=e.prototype,!(!e||!e.isReactComponent)}function BP(e){if(typeof e=="function")return Np(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tp)return 11;if(e===np)return 14}return 2}function zr(e,t){var n=e.alternate;return n===null?(n=Jt(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 Ml(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Np(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ji:return gi(n.children,i,s,t);case ep:o=8,i|=8;break;case cf:return e=Jt(12,n,t,i|2),e.elementType=cf,e.lanes=s,e;case df:return e=Jt(13,n,t,i),e.elementType=df,e.lanes=s,e;case ff:return e=Jt(19,n,t,i),e.elementType=ff,e.lanes=s,e;case Vv:return ac(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Bv:o=10;break e;case $v:o=9;break e;case tp:o=11;break e;case np:o=14;break e;case yr:o=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=Jt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function gi(e,t,n,r){return e=Jt(7,e,r,t),e.lanes=n,e}function ac(e,t,n,r){return e=Jt(22,e,r,t),e.elementType=Vv,e.lanes=n,e.stateNode={isHidden:!1},e}function od(e,t,n){return e=Jt(6,e,null,t),e.lanes=n,e}function ad(e,t,n){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $P(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=$c(0),this.expirationTimes=$c(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$c(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function zp(e,t,n,r,i,s,o,a,l){return e=new $P(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Jt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wp(s),e}function VP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Zi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Lw(e){if(!e)return Vr;e=e._reactInternals;e:{if(Ri(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(Ct(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(Ct(n))return L1(e,n,t)}return t}function Aw(e,t,n,r,i,s,o,a,l){return e=zp(n,r,!0,e,i,s,o,a,l),e.context=Lw(null),n=e.current,r=gt(),i=Nr(n),s=Zn(r,i),s.callback=t??null,Ar(n,s,i),e.current.lanes=i,ma(e,i,r),Pt(e,r),e}function lc(e,t,n,r){var i=t.current,s=gt(),o=Nr(i);return n=Lw(n),t.context===null?t.context=n:t.pendingContext=n,t=Zn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ar(i,t,o),e!==null&&(yn(e,i,o,s),Pl(e,i,o)),o}function bu(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 ry(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Fp(e,t){ry(e,t),(e=e.alternate)&&ry(e,t)}function WP(){return null}var Dw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Op(e){this._internalRoot=e}uc.prototype.render=Op.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));lc(e,t,null,null)};uc.prototype.unmount=Op.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ei(function(){lc(null,e,null,null)}),t[tr]=null}};function uc(e){this._internalRoot=e}uc.prototype.unstable_scheduleHydration=function(e){if(e){var t=f1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wr.length&&t!==0&&t<wr[n].priority;n++);wr.splice(n,0,e),n===0&&p1(e)}};function Bp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function iy(){}function UP(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=bu(o);s.call(u)}}var o=Aw(t,r,e,0,null,!1,!1,"",iy);return e._reactRootContainer=o,e[tr]=o.current,Qo(e.nodeType===8?e.parentNode:e),Ei(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=bu(l);a.call(u)}}var l=zp(e,0,!1,null,null,!1,!1,"",iy);return e._reactRootContainer=l,e[tr]=l.current,Qo(e.nodeType===8?e.parentNode:e),Ei(function(){lc(t,l,n,r)}),l}function dc(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=bu(o);a.call(l)}}lc(t,o,e,i)}else o=UP(n,t,e,i,r);return bu(o)}c1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=bo(t.pendingLanes);n!==0&&(sp(t,n|1),Pt(t,Fe()),!(de&6)&&(js=Fe()+500,Yr()))}break;case 13:Ei(function(){var r=nr(e,1);if(r!==null){var i=gt();yn(r,e,1,i)}}),Fp(e,1)}};op=function(e){if(e.tag===13){var t=nr(e,134217728);if(t!==null){var n=gt();yn(t,e,134217728,n)}Fp(e,134217728)}};d1=function(e){if(e.tag===13){var t=Nr(e),n=nr(e,t);if(n!==null){var r=gt();yn(n,e,t,r)}Fp(e,t)}};f1=function(){return me};h1=function(e,t){var n=me;try{return me=e,t()}finally{me=n}};kf=function(e,t,n){switch(t){case"input":if(mf(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=tc(r);if(!i)throw Error(U(90));Uv(r),mf(r,i)}}}break;case"textarea":Gv(e,n);break;case"select":t=n.value,t!=null&&hs(e,!!n.multiple,t,!1)}};Jv=Lp;e1=Ei;var HP={usingClientEntryPoint:!1,Events:[ya,rs,tc,Xv,Zv,Lp]},ro={findFiberByHostInstance:ui,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},GP={bundleType:ro.bundleType,version:ro.version,rendererPackageName:ro.rendererPackageName,rendererConfig:ro.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:sr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=r1(e),e===null?null:e.stateNode},findFiberByHostInstance:ro.findFiberByHostInstance||WP,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 Qa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qa.isDisabled&&Qa.supportsFiber)try{Xu=Qa.inject(GP),Nn=Qa}catch{}}Vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=HP;Vt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Bp(t))throw Error(U(200));return VP(e,t,null,n)};Vt.createRoot=function(e,t){if(!Bp(e))throw Error(U(299));var n=!1,r="",i=Dw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=zp(e,1,!1,null,null,n,!1,r,i),e[tr]=t.current,Qo(e.nodeType===8?e.parentNode:e),new Op(t)};Vt.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=r1(t),e=e===null?null:e.stateNode,e};Vt.flushSync=function(e){return Ei(e)};Vt.hydrate=function(e,t,n){if(!cc(t))throw Error(U(200));return dc(null,e,t,!0,n)};Vt.hydrateRoot=function(e,t,n){if(!Bp(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Dw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Aw(t,null,e,1,n??null,i,!1,s,o),e[tr]=t.current,Qo(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 uc(t)};Vt.render=function(e,t,n){if(!cc(t))throw Error(U(200));return dc(null,e,t,!1,n)};Vt.unmountComponentAtNode=function(e){if(!cc(e))throw Error(U(40));return e._reactRootContainer?(Ei(function(){dc(null,null,e,!1,function(){e._reactRootContainer=null,e[tr]=null})}),!0):!1};Vt.unstable_batchedUpdates=Lp;Vt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!cc(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return dc(e,t,n,!1,r)};Vt.version="18.3.1-next-f1338f8080-20240426";function Nw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Nw)}catch(e){console.error(e)}}Nw(),Nv.exports=Vt;var Fs=Nv.exports,zw,sy=Fs;zw=sy.createRoot,sy.hydrateRoot;var _o=typeof window<"u"?_.useLayoutEffect:_.useEffect;function ld(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 KP(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 YP(e){const t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}const Fw=!1;function sa(e){return e[e.length-1]}function qP(e){return typeof e=="function"}function Cr(e,t){return qP(e)?e(t):e}const QP=Object.prototype.hasOwnProperty,oy=Object.prototype.propertyIsEnumerable,XP=()=>Object.create(null),Zr=(e,t)=>Pr(e,t,XP);function Pr(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,s=uy(e)&&uy(i);if(!s&&!(Rs(e)&&Rs(i)))return i;const o=s?e:ay(e);if(!o)return i;const a=s?i:ay(i);if(!a)return i;const l=o.length,u=a.length,c=s?new Array(u):n();let d=0;for(let h=0;h<u;h++){const p=s?h:a[h],m=e[p],y=i[p];if(m===y){c[p]=m,(s?h<l:QP.call(e,p))&&d++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[p]=y;continue}const w=Pr(m,y,n,r+1);c[p]=w,w===m&&d++}return l===u&&d===l?e:c}function ay(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!oy.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(!oy.call(e,i))return!1;r.push(i)}return r}function Rs(e){if(!ly(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!ly(n)||!n.hasOwnProperty("isPrototypeOf"))}function ly(e){return Object.prototype.toString.call(e)==="[object Object]"}function uy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yi(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(!yi(e[r],t[r],n))return!1;return!0}if(Rs(e)&&Rs(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)&&!yi(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||!yi(e[o],t[o],n)))return!1;return i===s}return!1}function Is(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 oa(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function ZP(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function cy(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 ZP(t)}const JP=["http:","https:","mailto:","tel:"];function ku(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function io(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+=cy(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+cy(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function eE(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function tE(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 Jn(){throw new Error("Invariant failed")}function aa(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 Er=4,Ow=5;function nE(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 $p(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=nE(s);if(o){const[a,l]=o,u=s.charCodeAt(a+1);if(u===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const c=a+3,d=l;if(c<d)return n[0]=3,n[1]=t+a,n[2]=t+c,n[3]=t+d,n[4]=t+l+1,n[5]=i,n}}else if(u===36){const c=a+1,d=a+2;return d===l?(n[0]=2,n[1]=t+a,n[2]=t+c,n[3]=t+d,n[4]=t+l+1,n[5]=e.length,n):(n[0]=1,n[1]=t+a,n[2]=t+d,n[3]=t+l,n[4]=t+l+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function fc(e,t,n,r,i,s,o){var l,u,c,d,h,p,m,y,w,g,x,v,b;o==null||o(n);let a=r;{const P=n.fullPath??n.from,S=P.length,j=((l=n.options)==null?void 0:l.caseSensitive)??e,C=!!((c=(u=n.options)==null?void 0:u.params)!=null&&c.parse&&((h=(d=n.options)==null?void 0:d.skipRouteOnParseError)!=null&&h.params));for(;a<S;){const E=$p(P,a,t);let I;const M=a,O=E[5];switch(a=O+1,s++,E[0]){case 0:{const B=P.substring(E[2],E[3]);if(j){const F=(p=i.static)==null?void 0:p.get(B);if(F)I=F;else{i.static??(i.static=new Map);const z=fi(n.fullPath??n.from);z.parent=i,z.depth=s,I=z,i.static.set(B,z)}}else{const F=B.toLowerCase(),z=(m=i.staticInsensitive)==null?void 0:m.get(F);if(z)I=z;else{i.staticInsensitive??(i.staticInsensitive=new Map);const D=fi(n.fullPath??n.from);D.parent=i,D.depth=s,I=D,i.staticInsensitive.set(F,D)}}break}case 1:{const B=P.substring(M,E[1]),F=P.substring(E[4],O),z=j&&!!(B||F),D=B?z?B:B.toLowerCase():void 0,L=F?z?F:F.toLowerCase():void 0,$=!C&&((y=i.dynamic)==null?void 0:y.find(k=>!k.skipOnParamError&&k.caseSensitive===z&&k.prefix===D&&k.suffix===L));if($)I=$;else{const k=cd(1,n.fullPath??n.from,z,D,L);I=k,k.depth=s,k.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(k)}break}case 3:{const B=P.substring(M,E[1]),F=P.substring(E[4],O),z=j&&!!(B||F),D=B?z?B:B.toLowerCase():void 0,L=F?z?F:F.toLowerCase():void 0,$=!C&&((w=i.optional)==null?void 0:w.find(k=>!k.skipOnParamError&&k.caseSensitive===z&&k.prefix===D&&k.suffix===L));if($)I=$;else{const k=cd(3,n.fullPath??n.from,z,D,L);I=k,k.parent=i,k.depth=s,i.optional??(i.optional=[]),i.optional.push(k)}break}case 2:{const B=P.substring(M,E[1]),F=P.substring(E[4],O),z=j&&!!(B||F),D=B?z?B:B.toLowerCase():void 0,L=F?z?F:F.toLowerCase():void 0,$=cd(2,n.fullPath??n.from,z,D,L);I=$,$.parent=i,$.depth=s,i.wildcard??(i.wildcard=[]),i.wildcard.push($)}}i=I}if(C&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const E=fi(n.fullPath??n.from);E.kind=Ow,E.parent=i,s++,E.depth=s,i.pathless??(i.pathless=[]),i.pathless.push(E),i=E}const T=(n.path||!n.children)&&!n.isRoot;if(T&&P.endsWith("/")){const E=fi(n.fullPath??n.from);E.kind=Er,E.parent=i,s++,E.depth=s,i.index=E,i=E}i.parse=((x=(g=n.options)==null?void 0:g.params)==null?void 0:x.parse)??null,i.skipOnParamError=C,i.parsingPriority=((b=(v=n.options)==null?void 0:v.skipRouteOnParseError)==null?void 0:b.priority)??0,T&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const P of n.children)fc(e,t,P,a,i,s,o)}function ud(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 vr(e){var t,n,r;if(e.pathless)for(const i of e.pathless)vr(i);if(e.static)for(const i of e.static.values())vr(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())vr(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(ud);for(const i of e.dynamic)vr(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(ud);for(const i of e.optional)vr(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(ud);for(const i of e.wildcard)vr(i)}}function fi(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 cd(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 rE(e,t){const n=fi("/"),r=new Uint16Array(6);for(const i of e)fc(!1,r,i,1,n,0);vr(n),t.masksTree=n,t.flatCache=aa(1e3)}function iE(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=Vp(e,t.masksTree);return t.flatCache.set(e,r),r}function sE(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=fi("/"),fc(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(s,o)),Vp(r,o,n)}function oE(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=Vp(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)s=null;else throw o}return s&&(s.branch=uE(s.route)),t.matchCache.set(r,s),s}function aE(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function lE(e,t=!1,n){const r=fi(e.fullPath),i=new Uint16Array(6),s={},o={};let a=0;return fc(t,i,e,1,r,0,l=>{if(n==null||n(l,a),l.id in s&&Jn(),s[l.id]=l,a!==0&&l.path){const u=aE(l.fullPath);(!o[u]||l.fullPath.endsWith("/"))&&(o[u]=l)}a++}),vr(r),{processedTree:{segmentTree:r,singleCache:aa(1e3),matchCache:aa(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:o}}function Vp(e,t,n=!1){const r=e.split("/"),i=dE(e,r,t,n);if(!i)return null;const[s]=Bw(e,r,i);return{route:i.node.route,rawParams:s,parsedParams:i.parsedParams}}function Bw(e,t,n){var c,d,h,p,m,y,w,g,x,v;const r=cE(n.node);let i=null;const s=Object.create(null);let o=((c=n.extract)==null?void 0:c.part)??0,a=((d=n.extract)==null?void 0:d.node)??0,l=((h=n.extract)==null?void 0:h.path)??0,u=((p=n.extract)==null?void 0:p.segment)??0;for(;a<r.length;o++,a++,l++,u++){const b=r[a];if(b.kind===Er)break;if(b.kind===Ow){u--,o--,l--;continue}const P=t[o],S=l;if(P&&(l+=P.length),b.kind===1){i??(i=n.node.fullPath.split("/"));const j=i[u],C=((m=b.prefix)==null?void 0:m.length)??0;if(j.charCodeAt(C)===123){const T=((y=b.suffix)==null?void 0:y.length)??0,E=j.substring(C+2,j.length-T-1),I=P.substring(C,P.length-T);s[E]=decodeURIComponent(I)}else{const T=j.substring(1);s[T]=decodeURIComponent(P)}}else if(b.kind===3){if(n.skipped&1<<a){o--,l=S-1;continue}i??(i=n.node.fullPath.split("/"));const j=i[u],C=((w=b.prefix)==null?void 0:w.length)??0,T=((g=b.suffix)==null?void 0:g.length)??0,E=j.substring(C+3,j.length-T-1),I=b.suffix||b.prefix?P.substring(C,P.length-T):P;I&&(s[E]=decodeURIComponent(I))}else if(b.kind===2){const j=b,C=e.substring(S+(((x=j.prefix)==null?void 0:x.length)??0),e.length-(((v=j.suffix)==null?void 0:v.length)??0)),T=decodeURIComponent(C);s["*"]=T,s._splat=T;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:o,node:a,path:l,segment:u}]}function uE(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function cE(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function dE(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!sa(t),s=i&&e!=="/",o=t.length-(i?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let l=null,u=null;for(;a.length;){const c=a.pop(),{node:d,index:h,skipped:p,depth:m,statics:y,dynamics:w,optionals:g}=c;let{extract:x,rawParams:v,parsedParams:b}=c;if(d.kind===2&&d.route&&!Za(u,c))continue;if(d.skipOnParamError){if(!dy(e,t,c))continue;v=c.rawParams,x=c.extract,b=c.parsedParams}r&&d.route&&d.kind!==Er&&Za(l,c)&&(l=c);const P=h===o;if(P&&(d.route&&(!s||d.kind===Er||d.kind===2)&&Za(u,c)&&(u=c),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const S=P?void 0:t[h];let j;if(P&&d.index){const C={node:d.index,index:h,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b};let T=!0;if(d.index.skipOnParamError&&(dy(e,t,C)||(T=!1)),T){if(!w&&!g&&!p&&fE(y,o))return C;Za(u,C)&&(u=C)}}if(d.wildcard)for(let C=d.wildcard.length-1;C>=0;C--){const T=d.wildcard[C],{prefix:E,suffix:I}=T;if(!(E&&(P||!(T.caseSensitive?S:j??(j=S.toLowerCase())).startsWith(E)))){if(I){if(P)continue;const M=t.slice(h).join("/").slice(-I.length);if((T.caseSensitive?M:M.toLowerCase())!==I)continue}a.push({node:T,index:o,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}}if(d.optional){const C=p|1<<m,T=m+1;for(let E=d.optional.length-1;E>=0;E--){const I=d.optional[E];a.push({node:I,index:h,skipped:C,depth:T,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!P)for(let E=d.optional.length-1;E>=0;E--){const I=d.optional[E],{prefix:M,suffix:O}=I;if(M||O){const B=I.caseSensitive?S:j??(j=S.toLowerCase());if(M&&!B.startsWith(M)||O&&!B.endsWith(O))continue}a.push({node:I,index:h+1,skipped:p,depth:T,statics:y,dynamics:w,optionals:g+Xa(o,h),extract:x,rawParams:v,parsedParams:b})}}if(!P&&d.dynamic&&S)for(let C=d.dynamic.length-1;C>=0;C--){const T=d.dynamic[C],{prefix:E,suffix:I}=T;if(E||I){const M=T.caseSensitive?S:j??(j=S.toLowerCase());if(E&&!M.startsWith(E)||I&&!M.endsWith(I))continue}a.push({node:T,index:h+1,skipped:p,depth:m+1,statics:y,dynamics:w+Xa(o,h),optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!P&&d.staticInsensitive){const C=d.staticInsensitive.get(j??(j=S.toLowerCase()));C&&a.push({node:C,index:h+1,skipped:p,depth:m+1,statics:y+Xa(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!P&&d.static){const C=d.static.get(S);C&&a.push({node:C,index:h+1,skipped:p,depth:m+1,statics:y+Xa(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(d.pathless){const C=m+1;for(let T=d.pathless.length-1;T>=0;T--){const E=d.pathless[T];a.push({node:E,index:h,skipped:p,depth:C,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}}}if(u)return u;if(r&&l){let c=l.index;for(let h=0;h<l.index;h++)c+=t[h].length;const d=c===e.length?"/":e.slice(c);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(d),l}return null}function Xa(e,t){return 2**(e-t-1)}function fE(e,t){return e===2**(t-1)-1}function dy(e,t,n){try{const[r,i]=Bw(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 Za(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===Er)>(e.node.kind===Er)||t.node.kind===Er==(e.node.kind===Er)&&t.depth>e.depth))):!0}function Ll(e){return Wp(e.filter(t=>t!==void 0).join("/"))}function Wp(e){return e.replace(/\/{2,}/g,"/")}function $w(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Fr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Vw(e){return Fr($w(e))}function _u(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function hE(e,t,n){return _u(e,n)===_u(t,n)}function pE({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&&sa(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&&(sa(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,u="";for(let d=0;d<a.length;d++){d>0&&(u+="/");const h=a[d];if(!h)continue;l=$p(h,0,l);const p=l[0];if(p===0){u+=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?u+=y||w?`${y}{$${g}}${w}`:`$${g}`:p===2?u+=y||w?`${y}{$}${w}`:"$":u+=`${y}{-$${g}}${w}`}u=Wp(u);const c=u||"/";return o&&r&&r.set(o,c),c}function mE(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 dd(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=>hy(i,n)).join("/"):hy(r,n)}function fy({path:e,params:t,decoder:n,...r}){let i=!1;const s=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:i};const o=e.length;let a=0,l,u="";for(;a<o;){const c=a;l=$p(e,c,l);const d=l[5];if(a=d+1,c===d)continue;const h=l[0];if(h===0){u+="/"+e.substring(c,d);continue}if(h===2){const p=t._splat;s._splat=p,s["*"]=p;const m=e.substring(c,l[1]),y=e.substring(l[4],d);if(!p){i=!0,(m||y)&&(u+="/"+m+y);continue}const w=dd("_splat",t,n);u+="/"+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(c,l[1]),y=e.substring(l[4],d),w=dd(p,t,n)??"undefined";u+="/"+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(c,l[1]),w=e.substring(l[4],d),g=dd(p,t,n)??"";u+="/"+y+g+w;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:s,interpolatedPath:u||"/",isMissingParams:i}}function hy(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function ut(e){return(e==null?void 0:e.isNotFound)===!0}function gE(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const yE="tsr-scroll-restoration-v1_3";function xE(){const e=gE();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Rs(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=Cr(r,t)||t},persist:()=>{try{e.setItem(yE,JSON.stringify(t))}catch{}}}}const py=xE(),vE=e=>e.state.__TSR_key||e.href;function wE(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 Ja=!1;const so="window",my="data-scroll-restoration-id";function bE(e,t){if(!py)return;const n=py;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Ja=!1;const r=e.options.getScrollRestorationKey||vE,i=new Map;window.history.scrollRestoration="manual";const s=a=>{if(!(Ja||!e.isScrollRestoring))if(a.target===document||a.target===window)i.set(so,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const l=a.target;i.set(l,{scrollX:l.scrollLeft||0,scrollY:l.scrollTop||0})}},o=a=>{var u;if(!e.isScrollRestoring||!a||i.size===0||!n)return;const l=(u=n.state)[a]||(u[a]={});for(const[c,d]of i){let h;if(c===so)h=so;else if(c.isConnected){const p=c.getAttribute(my);h=p?`[${my}="${p}"]`:wE(c)}h&&(l[h]=d)}};document.addEventListener("scroll",s,!0),e.subscribe("onBeforeLoad",a=>{o(a.fromLocation?r(a.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",a=>{var d;const l=r(a.toLocation),u=e.options.scrollRestorationBehavior,c=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Ja=!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(!Rs(y))continue;const{scrollX:w,scrollY:g}=y;if(!(!Number.isFinite(w)||!Number.isFinite(g))){if(m===so)window.scrollTo({top:g,left:w,behavior:u}),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:u};if(window.scrollTo(y),c)for(const w of c){if(w===so)continue;const g=typeof w=="function"?w():document.querySelector(w);g&&g.scrollTo(y)}}}}finally{Ja=!1}e.isScrollRestoring&&n.set(h=>(h[l]||(h[l]={}),h))}})}function kE(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 fd(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function _E(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]=fd(i):Array.isArray(s)?s.push(fd(i)):n[r]=[s,fd(i)]}return n}const SE=PE(JSON.parse),CE=EE(JSON.stringify,JSON.parse);function PE(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=_E(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function EE(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=kE(i,r);return s?`?${s}`:""}}const xi="__root__";function TE(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 _t(e){return e instanceof Response&&!!e.options}function jE(e){return{input:({url:t})=>{for(const n of e)t=th(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ww(e[n],t);return t}}}function RE(e){const t=Vw(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=Ll(["/",t,o.pathname]),o)}}function th(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 Ww(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 IE(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:s}=t,o=new Map,a=new Map,l=new Map,u=n(e.status),c=n(e.loadedAt),d=n(e.isLoading),h=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),y=n(e.statusCode),w=n(e.redirect),g=n([]),x=n([]),v=n([]),b=r(()=>hd(o,g.get())),P=r(()=>hd(a,x.get())),S=r(()=>hd(l,v.get())),j=r(()=>g.get()[0]),C=r(()=>g.get().some(D=>{var L;return((L=o.get(D))==null?void 0:L.get().status)==="pending"})),T=r(()=>{var D;return{locationHref:p.get().href,resolvedLocationHref:(D=m.get())==null?void 0:D.href,status:u.get()}}),E=r(()=>({status:u.get(),loadedAt:c.get(),isLoading:d.get(),isTransitioning:h.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:w.get()})),I=aa(64);function M(D){let L=I.get(D);return L||(L=r(()=>{const $=g.get();for(const k of $){const V=o.get(k);if(V&&V.routeId===D)return V.get()}}),I.set(D,L)),L}const O={status:u,loadedAt:c,isLoading:d,isTransitioning:h,location:p,resolvedLocation:m,statusCode:y,redirect:w,matchesId:g,pendingIds:x,cachedIds:v,matches:b,pendingMatches:P,cachedMatches:S,firstId:j,hasPending:C,matchRouteDeps:T,matchStores:o,pendingMatchStores:a,cachedMatchStores:l,__store:E,getRouteMatchStore:M,setMatches:B,setPending:F,setCached:z};B(e.matches),s==null||s(O);function B(D){pd(D,o,g,n,i)}function F(D){pd(D,a,x,n,i)}function z(D){pd(D,l,v,n,i)}return O}function hd(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function pd(e,t,n,r,i){const s=e.map(a=>a.id),o=new Set(s);i(()=>{for(const a of t.keys())o.has(a)||t.delete(a);for(const a of e){const l=t.get(a.id);if(!l){const u=r(a);u.routeId=a.routeId,t.set(a.id,u);continue}l.routeId=a.routeId,l.get()!==a&&l.set(a)}tE(n.get(),s)||n.set(s)})}const nh=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},ME=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),hc=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),vi=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let s=0;s<=i;s++){const o=e.matches[s];if(!o)continue;const a=e.router.getMatch(o.id);a&&Object.assign(r,a.__routeContext,a.__beforeLoadContext)}return r},gy=(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},Tr=(e,t,n)=>{var r,i,s;if(!(!_t(n)&&!ut(n)))throw _t(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:_t(n)?"redirected":ut(n)?"notFound":o.status==="pending"?"success":o.status,context:vi(e,t.index),isFetching:!1,error:n})),ut(n)&&!n.routeId&&(n.routeId=t.routeId),(s=t._nonReactive.loadPromise)==null||s.resolve()),_t(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},Uw=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},yy=(e,t,n)=>{const r=vi(e,n);e.updateMatch(t,i=>({...i,context:r}))},oo=(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),Tr(e,e.router.getMatch(i),n);try{(l=(a=o.options).onError)==null||l.call(a,n)}catch(u){n=u,Tr(e,e.router.getMatch(i),n)}e.updateMatch(i,u=>{var c,d;return(c=u._nonReactive.beforeLoadPromise)==null||c.resolve(),u._nonReactive.beforeLoadPromise=void 0,(d=u._nonReactive.loadPromise)==null||d.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!_t(n)&&!ut(n)&&(e.serialError??(e.serialError=n))},Hw=(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&&!hc(e,t)&&(n.options.loader||n.options.beforeLoad||Kw(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((s=e.router.options)==null?void 0:s.defaultPendingComponent))){const o=setTimeout(()=>{nh(e)},i);r._nonReactive.pendingTimeout=o}},LE=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Hw(e,t,n,r);const i=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Tr(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},AE=(e,t,n,r)=>{const i=e.router.getMatch(t);let s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Is(()=>{s==null||s.resolve(),s=void 0});const{paramsError:o,searchError:a}=i;o&&oo(e,n,o,"PARSE_PARAMS"),a&&oo(e,n,a,"VALIDATE_SEARCH"),Hw(e,t,r,i);const l=new AbortController;let u=!1;const c=()=>{u||(u=!0,e.updateMatch(t,b=>({...b,isFetching:"beforeLoad",fetchCount:b.fetchCount+1,abortController:l})))},d=()=>{var b;(b=i._nonReactive.beforeLoadPromise)==null||b.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,P=>({...P,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{c(),d()});return}i._nonReactive.beforeLoadPromise=Is();const h={...vi(e,n,!1),...i.__routeContext},{search:p,params:m,cause:y}=i,w=hc(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(()=>{c(),d()});return}(_t(b)||ut(b))&&(c(),oo(e,n,b,"BEFORE_LOAD")),e.router.batch(()=>{c(),e.updateMatch(t,P=>({...P,__beforeLoadContext:b})),d()})};let v;try{if(v=r.options.beforeLoad(g),oa(v))return c(),v.catch(b=>{oo(e,n,b,"BEFORE_LOAD")}).then(x)}catch(b){c(),oo(e,n,b,"BEFORE_LOAD")}x(v)},DE=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>a(),o=()=>AE(e,n,t,i),a=()=>{if(Uw(e,n))return;const l=LE(e,n,i);return oa(l)?l.then(o):o()};return s()},NE=(e,t,n)=>{var s,o,a,l,u,c;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(o=(s=n.options).head)==null?void 0:o.call(s,i),(l=(a=n.options).scripts)==null?void 0:l.call(a,i),(c=(u=n.options).headers)==null?void 0:c.call(u,i)]).then(([d,h,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}))},Gw=(e,t,n,r,i)=>{const s=t[r-1],{params:o,loaderDeps:a,abortController:l,cause:u}=e.router.getMatch(n),c=vi(e,r),d=hc(e,n);return{params:o,deps:a,preload:!!d,parentMatchPromise:s,abortController:l,context:c,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:d?"preload":u,route:i,...e.router.options.additionalContext}},xy=async(e,t,n,r,i)=>{var s,o,a,l,u;try{const c=e.router.getMatch(n);try{(!(Fw??e.router.isServer)||c.ssr===!0)&&la(i);const d=i.options.loader,h=typeof d=="function"?d:d==null?void 0:d.handler,p=h==null?void 0:h(Gw(e,t,n,r,i)),m=!!h&&oa(p);if((m||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(n,w=>({...w,isFetching:"loader"})),h){const w=m?await p:p;Tr(e,e.router.getMatch(n),w),w!==void 0&&e.updateMatch(n,g=>({...g,loaderData:w}))}i._lazyPromise&&await i._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,w=>({...w,error:void 0,context:vi(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let h=d;if((h==null?void 0:h.name)==="AbortError"){if(c.abortController.signal.aborted){(s=c._nonReactive.loaderPromise)==null||s.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:vi(e,r)}));return}const p=c._nonReactive.minPendingPromise;p&&await p,ut(d)&&await((a=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:a.call(o)),Tr(e,e.router.getMatch(n),d);try{(u=(l=i.options).onError)==null||u.call(l,d)}catch(m){h=m,Tr(e,e.router.getMatch(n),m)}!_t(h)&&!ut(h)&&await la(i,["errorComponent"]),e.updateMatch(n,m=>({...m,error:h,context:vi(e,r),status:"error",isFetching:!1}))}}catch(c){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),Tr(e,d,c)}},zE=async(e,t,n)=>{var p,m,y,w;async function r(g,x,v,b,P){const S=Date.now()-x.updatedAt,j=g?P.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:P.options.staleTime??e.router.options.defaultStaleTime??0,C=P.options.shouldReload,T=typeof C=="function"?C(Gw(e,t,i,n,P)):C,{status:E,invalid:I}=b,M=S>=j&&(!!e.forceStaleReload||b.cause==="enter"||v!==void 0&&v!==b.id);o=E==="success"&&(I||(T??M)),g&&P.options.preload===!1||(o&&!e.sync&&c?(a=!0,(async()=>{var O,B;try{await xy(e,t,i,n,P);const F=e.router.getMatch(i);(O=F._nonReactive.loaderPromise)==null||O.resolve(),(B=F._nonReactive.loadPromise)==null||B.resolve(),F._nonReactive.loaderPromise=void 0,F._nonReactive.loadPromise=void 0}catch(F){_t(F)&&await e.router.navigate(F.options)}})()):E!=="success"||o?await xy(e,t,i,n,P):yy(e,i,n))}const{id:i,routeId:s}=e.matches[n];let o=!1,a=!1;const l=e.router.looseRoutesById[s],u=l.options.loader,c=((typeof u=="function"||u==null?void 0:u.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(Uw(e,i)){if(!e.router.getMatch(i))return e.matches[n];yy(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(P=>P.routeId===s))==null?void 0:m.id,b=hc(e,i);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload&&c)return g;await g._nonReactive.loaderPromise;const P=e.router.getMatch(i),S=P._nonReactive.error||P.error;S&&Tr(e,P,S),P.status==="pending"&&await r(b,g,v,P,l)}else{const P=b&&!e.router.stores.matchStores.has(i),S=e.router.getMatch(i);S._nonReactive.loaderPromise=Is(),P!==S.preload&&e.updateMatch(i,j=>({...j,preload:P})),await r(b,g,v,S,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 vy(e){var h,p;const t=e,n=[];ME(t.router)&&nh(t);let r;for(let m=0;m<t.matches.length;m++){try{const y=DE(t,m);oa(y)&&await y}catch(y){if(_t(y))throw y;if(ut(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?gy(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(zE(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(_t(w))throw w;ut(w)?a??(a=w):l??(l=w)}if(l!==void 0)throw l}const u=a??(r&&!t.preload?r:void 0);let c=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const m=gy(t,u);m===void 0&&Jn();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),u.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:u},isFetching:!1})),c=m,await la(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 la(m,["errorComponent"])}for(let m=0;m<=c;m++){const{id:y,routeId:w}=t.matches[m],g=t.router.looseRoutesById[w];try{const x=NE(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=nh(t);if(oa(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function wy(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 la(e,t=Al){!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===Al?(()=>{if(e._componentsPromise===void 0){const r=wy(e,Al);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():wy(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Kw(e){var t;for(const n of Al)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Al=["component","errorComponent","pendingComponent","notFoundComponent"];var Or="__TSR_index",by="popstate",ky="beforeunload";function FE(e){let t=e.getLocation();const n=new Set,r=o=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?r(o):t=e.getLocation()},s=async({task:o,navigateOpts:a,...l})=>{var d,h;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const u=((d=e.getBlockers)==null?void 0:d.call(e))??[],c=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&c)for(const p of u){const m=Su(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 u=t.state[Or];a=_y(u+1,a),s({task:()=>{e.pushState(o,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const u=t.state[Or];a=_y(u,a),s({task:()=>{e.replaceState(o,a),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:o,state:a})},go:(o,a)=>{s({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{s({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[Or]!==0,createHref:o=>e.createHref(o),block:o=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,o]),()=>{var c,d;const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];(d=e.setBlockers)==null||d.call(e,u.filter(h=>h!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:r}}function _y(e,t){t||(t={});const n=Up();return{...t,key:n,__TSR_key:n,[Or]:e}}function OE(e){var C,T;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,o=E=>i=E,a=E=>E,l=()=>Su(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((C=t.history.state)!=null&&C.__TSR_key)&&!((T=t.history.state)!=null&&T.key)){const E=Up();t.history.replaceState({[Or]:0,key:E,__TSR_key:E},"")}let u=l(),c,d=!1,h=!1,p=!1,m=!1;const y=()=>u;let w,g;const x=()=>{w&&(j._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),j._ignoreSubscribers=!1,w=void 0,g=void 0,c=void 0)},v=(E,I,M)=>{const O=a(I);g||(c=u),u=Su(I,M),w={href:O,state:M,isPush:(w==null?void 0:w.isPush)||E==="push"},g||(g=Promise.resolve().then(()=>x()))},b=E=>{u=l(),j.notify({type:E})},P=async()=>{if(h){h=!1;return}const E=l(),I=E.state[Or]-u.state[Or],M=I===1,O=I===-1,B=!M&&!O||d;d=!1;const F=B?"GO":O?"BACK":"FORWARD",z=B?{type:"GO",index:I}:{type:O?"BACK":"FORWARD"};if(p)p=!1;else{const D=s();if(typeof document<"u"&&D.length){for(const L of D)if(await L.blockerFn({currentLocation:u,nextLocation:E,action:F})){h=!0,t.history.go(1),j.notify(z);return}}}u=l(),j.notify(z)},S=E=>{if(m){m=!1;return}let I=!1;const M=s();if(typeof document<"u"&&M.length)for(const O of M){const B=O.enableBeforeUnload??!0;if(B===!0){I=!0;break}if(typeof B=="function"&&B()===!0){I=!0;break}}if(I)return E.preventDefault(),E.returnValue=""},j=FE({getLocation:y,getLength:()=>t.history.length,pushState:(E,I)=>v("push",E,I),replaceState:(E,I)=>v("replace",E,I),back:E=>(E&&(p=!0),m=!0,t.history.back()),forward:E=>{E&&(p=!0),m=!0,t.history.forward()},go:E=>{d=!0,t.history.go(E)},createHref:E=>a(E),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(ky,S,{capture:!0}),t.removeEventListener(by,P)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(ky,S,{capture:!0}),t.addEventListener(by,P),t.history.pushState=function(...E){const I=n.apply(t.history,E);return j._ignoreSubscribers||b("PUSH"),I},t.history.replaceState=function(...E){const I=r.apply(t.history,E);return j._ignoreSubscribers||b("REPLACE"),I},j}function BE(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Su(e,t){const n=BE(e),r=n.indexOf("#"),i=n.indexOf("?"),s=Up();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||{[Or]:0,key:s,__TSR_key:s}}}function Up(){return(Math.random()+1).toString(36).substring(7)}function vs(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 $E=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var c;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",s=this.basepath===void 0,o=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=mE(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=OE()),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=aa(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=IE(WE(this.latestLocation),d),bE(this)}let a=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(s||i!==l||o!==u){this.basepath=l;const d=[],h=Vw(l);h&&h!=="/"&&d.push(RE({basepath:l})),u&&d.push(u),this.rewrite=d.length===0?void 0:d.length===1?d[0]:jE(d),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((c=window.CSS)==null?void 0:c.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=lE(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&rE(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:l,search:u,hash:c,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const g=this.options.parseSearch(u),x=this.options.stringifySearch(g);return{href:l+x+c,publicHref:l+x+c,pathname:io(l).path,external:!1,searchStr:x,search:Zr(r==null?void 0:r.search,g),hash:io(c.slice(1)).path,state:Pr(r==null?void 0:r.state,h)}}const p=new URL(d,this.origin),m=th(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:io(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:w,search:Zr(r==null?void 0:r.search,y),hash:io(m.hash.slice(1)).path,state:Pr(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)=>pE({base:n,to:Wp(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=>UE({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(s={})=>{var E,I;const o=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutesLightweight(o);s.from;const l=s.unsafeRelative==="path"?o.pathname:s.from??a.fullPath,u=this.resolvePathWithBase(l,"."),c=a.search,d=Object.assign(Object.create(null),a.params),h=s.to?this.resolvePathWithBase(u,`${s.to}`):this.resolvePathWithBase(u,"."),p=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?d:Object.assign(d,Cr(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 M of y){const O=((E=M.options.params)==null?void 0:E.stringify)??M.options.stringifyParams;if(O)try{Object.assign(p,O(p))}catch{}}const w=n.leaveParams?h:io(fy({path:h,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let g=c;if(n._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const M={};y.forEach(O=>{if(O.options.validateSearch)try{Object.assign(M,Dl(O.options.validateSearch,{...M,...g}))}catch{}}),g=M}g=HE({search:g,dest:s,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),g=Zr(c,g);const x=this.options.stringifySearch(g),v=s.hash===!0?o.hash:s.hash?Cr(s.hash,o.hash):void 0,b=v?`#${v}`:"";let P=s.state===!0?o.state:s.state?Cr(s.state,o.state):{};P=Pr(o.state,P);const S=`${w}${x}${b}`;let j,C,T=!1;if(this.rewrite){const M=new URL(S,this.origin),O=Ww(this.rewrite,M);j=M.href.replace(M.origin,""),O.origin!==this.origin?(C=O.href,T=!0):C=O.pathname+O.search+O.hash}else j=eE(S),C=j;return{publicHref:C,href:j,pathname:w,search:g,searchStr:x,state:P,hash:v??"",external:T,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{const a=r(s);let l=o?r(o):void 0;if(!l){const u=Object.create(null);if(this.options.routeMasks){const c=iE(a.pathname,this.processedTree);if(c){Object.assign(u,c.rawParams);const{from:d,params:h,...p}=c.route,m=h===!1||h===null?Object.create(null):(h??!0)===!0?u:Object.assign(u,Cr(h,u));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(c=>{i.state[c]=this.latestLocation.state[c]});const u=yi(i.state,this.latestLocation.state);return l.forEach(c=>{delete i.state[c]}),u},o=Fr(this.latestLocation.href)===Fr(i.href);let a=this.commitLocationPromise;if(this.commitLocationPromise=Is(()=>{a==null||a.resolve(),a=void 0}),o&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...c}=i;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:o,href:a,...l}={})=>{if(a){const d=this.history.location.state.__TSR_index,h=Su(a,{__TSR_index:n?d:d+1}),p=new URL(h.pathname,this.origin);l.to=th(this.rewrite,p).pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const c=this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:s,...o})=>{var l,u;let a=!1;if(i)try{new URL(`${i}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(n!==void 0||!i){const d=this.buildLocation({to:n,...o});i=i??d.publicHref,s=s??d.publicHref}const c=!a&&s?s:i;if(ku(c,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const d=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const h of d)if(h!=null&&h.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(s=>s.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,i,s;const o=this.stores.resolvedLocation.get()??this.stores.location.get();for(s=new Promise(l=>{this.startTransition(async()=>{var u;try{this.beforeLoad();const c=this.latestLocation,d=vs(c,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...d}),this.emit({type:"onBeforeLoad",...d}),await vy({router:this,sync:n==null?void 0:n.sync,forceStaleReload:o.href===c.href,matches:this.stores.pendingMatches.get(),location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var 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(j=>!this.stores.pendingMatchStores.has(j.id)):null;const P=new Set;for(const j of this.stores.pendingMatchStores.values())j.routeId&&P.add(j.routeId);const S=new Set;for(const j of this.stores.matchStores.values())j.routeId&&S.add(j.routeId);p=v?b.filter(j=>!P.has(j.routeId)):null,m=v?x.filter(j=>!S.has(j.routeId)):null,y=v?x.filter(j=>S.has(j.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(j=>j.status!=="error"&&j.status!=="notFound"&&j.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(c){_t(c)?(r=c,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):ut(c)&&(i=c);const d=r?r.status:i?404:this.stores.matches.get().some(h=>h.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(d),this.stores.redirect.set(r)})}this.latestLoadPromise===s&&((u=this.commitLocationPromise)==null||u.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),l()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.matches.get().some(l=>l.status==="error")&&(a=500),a!==void 0&&this.stores.statusCode.set(a)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,o=this.stores.resolvedLocation.get(),a=typeof r.types=="function"?r.types(vs(s,o)):r.types;if(a===!1){n();return}i={update:n,types:a}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const s=this.stores.matchStores.get(n);if(s){s.set(r);return}const o=this.stores.cachedMatchStores.get(n);if(o){const a=r(o.get());a.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(l=>l.filter(u=>u!==n)):o.set(a)}})},this.getMatch=n=>{var r,i,s;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((s=this.stores.matchStores.get(n))==null?void 0:s.get())},this.invalidate=n=>{const r=i=>{var s;return((s=n==null?void 0:n.filter)==null?void 0:s.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(i);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const s=i.pathname+i.search+i.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&ku(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=la,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 vy({router:this,matches:i,location:r,preload:!0,updateMatch:(l,u)=>{s.has(l)?i=i.map(c=>c.id===l?u(c):c):this.updateMatch(l,u)}}),i}catch(l){if(_t(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:r});ut(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=sE(s.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!a||n.params&&!yi(a.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?yi(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??CE,parseSearch:e.parseSearch??SE,protocolAllowlist:e.protocolAllowlist??JP}),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["**"]:Fr(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const l=a?KE(this.options.notFoundMode,o):void 0,u=new Array(o.length),c=new Map;for(const p of this.stores.matchStores.values())p.routeId&&c.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const m=o[p],y=u[p-1];let w,g,x;{const F=(y==null?void 0:y.search)??e.search,z=(y==null?void 0:y._strictSearch)??void 0;try{const D=Dl(m.options.validateSearch,{...F})??void 0;w={...F,...D},g={...z,...D},x=void 0}catch(D){let L=D;if(D instanceof Cu||(L=new Cu(D.message,{cause:D})),t!=null&&t.throwOnError)throw L;w=F,g={},x=L}}const v=((h=(d=m.options).loaderDeps)==null?void 0:h.call(d,{search:w}))??"",b=v?JSON.stringify(v):"",{interpolatedPath:P,usedParams:S}=fy({path:m.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),j=m.id+P+b,C=this.getMatch(j),T=c.get(m.id),E=(C==null?void 0:C._strictParams)??S;let I;if(!C)try{Sy(m,S,s,E)}catch(F){if(ut(F)||_t(F)?I=F:I=new VE(F.message,{cause:F}),t!=null&&t.throwOnError)throw I}Object.assign(i,E);const M=T?"stay":"enter";let O;if(C)O={...C,cause:M,params:(T==null?void 0:T.params)??i,_strictParams:E,search:Zr(T?T.search:C.search,w),_strictSearch:g};else{const F=m.options.loader||m.options.beforeLoad||m.lazyFn||Kw(m)?"pending":"success";O={id:j,ssr:m.options.ssr,index:p,routeId:m.id,params:(T==null?void 0:T.params)??i,_strictParams:E,pathname:P,updatedAt:Date.now(),search:T?Zr(T.search,w):w,_strictSearch:g,searchError:void 0,status:F,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:Is()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:T?Pr(T.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||(O.globalNotFound=l===m.id),O.searchError=x;const B=this.getParentContext(y);O.context={...B,...O.__routeContext,...O.__beforeLoadContext},u[p]=O}for(let p=0;p<u.length;p++){const m=u[p],y=this.looseRoutesById[m.routeId],w=this.getMatch(m.id),g=c.get(m.routeId);if(m.params=g?Zr(g.params,i):i,!w){const x=u[p-1],v=this.getParentContext(x);if(y.options.context){const b={deps:m.loaderDeps,params:m.params,context:v??{},location:e,navigate:P=>this.navigate({...P,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:y.id};m.__routeContext=y.options.context(b)??void 0}m.context={...v,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(e){var c;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=sa(t),s={...e.search};for(const d of t)try{Object.assign(s,Dl(d.options.validateSearch,s))}catch{}const o=sa(this.stores.matchesId.get()),a=o&&((c=this.stores.matchStores.get(o))==null?void 0:c.get()),l=a&&a.routeId===i.id&&a.pathname===e.pathname;let u;if(l)u=a.params;else{const d=Object.assign(Object.create(null),n);for(const h of t)try{Sy(h,n,r??{},d)}catch{}u=d}return{matchedRoutes:t,fullPath:i.fullPath,search:s,params:u}}},Cu=class extends Error{},VE=class extends Error{};function WE(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Dl(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Cu("Async validation not supported");if(n.issues)throw new Cu(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 UE({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=Fr(e);let s,o;const a=oE(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 GE(n)(e,t,r??!1)}function GE(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)(i=s.options.search)!=null&&i.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const o=({search:a,next:l})=>{let u=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(u=s.options.preSearchFilters.reduce((d,h)=>h(d),a));const c=l(u);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((d,h)=>h(d),c):c};t.middlewares.push(o)}if(s.options.validateSearch){const o=({search:a,next:l})=>{const u=l(a);if(!t._includeValidateSearch)return u;try{return{...u,...Dl(s.options.validateSearch,u)??void 0}}catch{return u}};t.middlewares.push(o)}}const n=({search:s})=>{const o=t.dest;return o.search?o.search===!0?s:Cr(o.search,s):{}};t.middlewares.push(n);const r=(s,o,a)=>{if(s>=a.length)return o;const l=a[s];return l({search:o,next:c=>r(s+1,c,a)})};return function(o,a,l){return t.dest=a,t._includeValidateSearch=l,r(0,o,t.middlewares)}}function KE(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 xi}function Sy(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 YE="Error preloading route! ☝️";var Yw=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var l,u;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),r?this._path=xi:this.parentRoute||Jn();let i=r?xi:n==null?void 0:n.path;i&&i!=="/"&&(i=$w(i));const s=(n==null?void 0:n.id)||i;let o=r?xi:Ll([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=Ll(["/",o]));const a=o==="__root__"?"/":Ll([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=a,this._to=Fr(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=>TE({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.")}},qE=class extends Yw{constructor(e){super(e)}};function QE(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 Hp(e){const t=e.errorComponent??Gp;return f.jsx(XE,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?_.createElement(t,{error:n,reset:r}):e.children})}var XE=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 Gp({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 ZE({children:e,fallback:t=null}){return qw()?f.jsx(ks.Fragment,{children:e}):f.jsx(ks.Fragment,{children:t})}function qw(){return ks.useSyncExternalStore(JE,()=>!0,()=>!1)}function JE(){return()=>{}}var Qw=_.createContext(null);function Ut(e){return _.useContext(Qw)}var pc=_.createContext(void 0),eT=_.createContext(void 0),Ee=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Ee||{});function tT({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:s,checkDirty:o,shallowPropagate:a};function r(u,c,d){const h=c.depsTail;if(h!==void 0&&h.dep===u)return;const p=h!==void 0?h.nextDep:c.deps;if(p!==void 0&&p.dep===u){p.version=d,c.depsTail=p;return}const m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===c)return;const y=c.depsTail=u.subsTail={version:d,dep:u,sub:c,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=y),h!==void 0?h.nextDep=y:c.deps=y,m!==void 0?m.nextSub=y:u.subs=y}function i(u,c=u.sub){const d=u.dep,h=u.prevDep,p=u.nextDep,m=u.nextSub,y=u.prevSub;return p!==void 0?p.prevDep=h:c.depsTail=h,h!==void 0?h.nextDep=p:c.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(u){let c=u.nextSub,d;e:do{const h=u.sub;let p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(u,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=(u=m).nextSub;y!==void 0&&(d={value:c,prev:d},c=y);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function o(u,c){let d,h=0,p=!1;e:do{const m=u.dep,y=m.flags;if(c.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){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,c=m,++h;continue}if(!p){const w=u.nextDep;if(w!==void 0){u=w;continue}}for(;h--;){const w=c.subs,g=w.nextSub!==void 0;if(g?(u=d.value,d=d.prev):u=w,p){if(e(c)){g&&a(w),c=u.sub;continue}p=!1}else c.flags&=-33;c=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return p}while(!0)}function a(u){do{const c=u.sub,d=c.flags;(d&48)===32&&(c.flags=d|16,(d&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let d=c.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function nT(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 rh=[];let Nl=0;const{link:Cy,unlink:rT,propagate:iT,checkDirty:Xw,shallowPropagate:Py}=tT({update(e){return e._update()},notify(e){rh[ih++]=e,e.flags&=~Ee.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ee.Mutable|Ee.Dirty,Pu(e))}});let el=0,ih=0,In,sh=0;function Zw(e){try{++sh,e()}finally{--sh||Jw()}}function Pu(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=rT(n,e)}function Jw(){if(!(sh>0)){for(;el<ih;){const e=rh[el];rh[el++]=void 0,e.notify()}el=0,ih=0}}function Ey(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Ee.None:Ee.Mutable,get(){return In!==void 0&&Cy(i,In,Nl),i._snapshot},subscribe(s){const o=nT(s),a={current:!1},l=sT(()=>{var u;i.get(),a.current?(u=o.next)==null||u.call(o,i._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const o=In,a=(t==null?void 0:t.compare)??Object.is;if(n)In=i,++Nl,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=Ee.Mutable|Ee.RecursedCheck);try{const l=i._snapshot,u=typeof s=="function"?s(l):s===void 0&&n?r(l):s;return l===void 0||!a(l,u)?(i._snapshot=u,!0):!1}finally{In=o,n&&(i.flags&=~Ee.RecursedCheck),Pu(i)}}};return n?(i.flags=Ee.Mutable|Ee.Dirty,i.get=function(){const s=i.flags;if(s&Ee.Dirty||s&Ee.Pending&&Xw(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&Py(o)}}else s&Ee.Pending&&(i.flags=s&~Ee.Pending);return In!==void 0&&Cy(i,In,Nl),i._snapshot}):i.set=function(s){if(i._update(s)){const o=i.subs;o!==void 0&&(iT(o),Py(o),Jw())}},i}function sT(e){const t=()=>{const r=In;In=n,++Nl,n.depsTail=void 0,n.flags=Ee.Watching|Ee.RecursedCheck;try{return e()}finally{In=r,n.flags&=~Ee.RecursedCheck,Pu(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ee.Watching|Ee.RecursedCheck,notify(){const r=this.flags;r&Ee.Dirty||r&Ee.Pending&&Xw(this.deps,this)?t():this.flags=Ee.Watching},stop(){this.flags=Ee.None,this.depsTail=void 0,Pu(this)}};return t(),n}var eb={exports:{}},tb={},nb={exports:{}},rb={};/**
|
|
42
|
+
* @license React
|
|
43
|
+
* use-sync-external-store-shim.production.js
|
|
44
|
+
*
|
|
45
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the MIT license found in the
|
|
48
|
+
* LICENSE file in the root directory of this source tree.
|
|
49
|
+
*/var Ms=_;function oT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var aT=typeof Object.is=="function"?Object.is:oT,lT=Ms.useState,uT=Ms.useEffect,cT=Ms.useLayoutEffect,dT=Ms.useDebugValue;function fT(e,t){var n=t(),r=lT({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return cT(function(){i.value=n,i.getSnapshot=t,md(i)&&s({inst:i})},[e,n,t]),uT(function(){return md(i)&&s({inst:i}),e(function(){md(i)&&s({inst:i})})},[e]),dT(n),n}function md(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!aT(e,n)}catch{return!0}}function hT(e,t){return t()}var pT=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?hT:fT;rb.useSyncExternalStore=Ms.useSyncExternalStore!==void 0?Ms.useSyncExternalStore:pT;nb.exports=rb;var mT=nb.exports;/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var mc=_,gT=mT;function yT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xT=typeof Object.is=="function"?Object.is:yT,vT=gT.useSyncExternalStore,wT=mc.useRef,bT=mc.useEffect,kT=mc.useMemo,_T=mc.useDebugValue;tb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=wT(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=kT(function(){function l(p){if(!u){if(u=!0,c=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,xT(c,p))return m;var y=r(p);return i!==void 0&&i(m,y)?(c=p,m):(c=p,d=y)}var u=!1,c,d,h=n===void 0?null:n;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,n,r,i]);var a=vT(e,s[0],s[1]);return bT(function(){o.hasValue=!0,o.value=a},[a]),_T(a),a};eb.exports=tb;var ib=eb.exports;const ST=qu(ib);function CT(e,t){return e===t}function Tt(e,t,n=CT){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 ib.useSyncExternalStoreWithSelector(r,i,i,t,n)}var PT={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ii(e){const t=Ut(),n=_.useContext(e.from?eT:pc),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=_.useRef(void 0);return Tt(i??PT,o=>{if((e.shouldThrow??!0)&&!o&&Jn(),o===void 0)return;const a=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const l=Pr(s.current,a);return s.current=l,l}return a})}function sb(e){return Ii({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ob(e){const{select:t,...n}=e;return Ii({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function va(e){return Ii({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 ab(e){return Ii({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Mi(e){const t=Ut();return _.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function lb(e){return Ii({...e,select:t=>e.select?e.select(t.context):t.context})}function ET(e,t){const n=Ut(),r=YP(t),{activeProps:i,inactiveProps:s,activeOptions:o,to:a,preload:l,preloadDelay:u,preloadIntentProximity:c,hashScrollIntoView:d,replace:h,startTransition:p,resetScroll:m,viewTransition:y,children:w,target:g,disabled:x,style:v,className:b,onClick:P,onBlur:S,onFocus:j,onMouseEnter:C,onMouseLeave:T,onTouchStart:E,ignoreBlocker:I,params:M,search:O,hash:B,state:F,mask:z,reloadDocument:D,unsafeRelative:L,from:$,_fromLocation:k,...V}=e,Q=qw(),R=_.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ue=Tt(n.stores.location,ge=>ge,(ge,N)=>ge.href===N.href),fe=_.useMemo(()=>{const ge={_fromLocation:ue,...R};return n.buildLocation(ge)},[n,ue,R]),ce=fe.maskedLocation?fe.maskedLocation.publicHref:fe.publicHref,Xe=fe.maskedLocation?fe.maskedLocation.external:fe.external,Le=_.useMemo(()=>LT(ce,Xe,n.history,x),[x,Xe,ce,n.history]),ft=_.useMemo(()=>{if(Le!=null&&Le.external)return ku(Le.href,n.protocolAllowlist)?void 0:Le.href;if(!AT(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),ku(a,n.protocolAllowlist)?void 0:a}catch{}},[a,Le,n.protocolAllowlist]),Ht=_.useMemo(()=>{if(ft)return!1;if(o!=null&&o.exact){if(!hE(ue.pathname,fe.pathname,n.basepath))return!1}else{const ge=_u(ue.pathname,n.basepath),N=_u(fe.pathname,n.basepath);if(!(ge.startsWith(N)&&(ge.length===N.length||ge[N.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!yi(ue.search,fe.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?Q&&ue.hash===fe.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,ue,ft,Q,fe.hash,fe.pathname,fe.search,n.basepath]),an=Ht?Cr(i,{})??TT:gd,or=Ht?gd:Cr(s,{})??gd,zi=[b,an.className,or.className].filter(Boolean).join(" "),Fi=(v||an.style||or.style)&&{...v,...an.style,...or.style},[Oi,K]=_.useState(!1),Ke=_.useRef(!1),Oe=e.reloadDocument||ft?!1:l??n.options.defaultPreload,bn=u??n.options.defaultPreloadDelay??0,kn=_.useCallback(()=>{n.preloadRoute({...R,_builtLocation:fe}).catch(ge=>{console.warn(ge),console.warn(YE)})},[n,R,fe]);KP(r,_.useCallback(ge=>{ge!=null&&ge.isIntersecting&&kn()},[kn]),MT,{disabled:!!x||Oe!=="viewport"}),_.useEffect(()=>{Ke.current||!x&&Oe==="render"&&(kn(),Ke.current=!0)},[x,kn,Oe]);const Ac=ge=>{const N=ge.currentTarget.getAttribute("target"),G=g!==void 0?g:N;if(!x&&!DT(ge)&&!ge.defaultPrevented&&(!G||G==="_self")&&ge.button===0){ge.preventDefault(),Fs.flushSync(()=>{K(!0)});const ee=n.subscribe("onResolved",()=>{ee(),K(!1)});n.navigate({...R,replace:h,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:y,ignoreBlocker:I})}};if(ft)return{...V,ref:r,href:ft,...w&&{children:w},...g&&{target:g},...x&&{disabled:x},...v&&{style:v},...b&&{className:b},...P&&{onClick:P},...S&&{onBlur:S},...j&&{onFocus:j},...C&&{onMouseEnter:C},...T&&{onMouseLeave:T},...E&&{onTouchStart:E}};const Ma=ge=>{if(x||Oe!=="intent")return;if(!bn){kn();return}const N=ge.currentTarget;if(ao.has(N))return;const G=setTimeout(()=>{ao.delete(N),kn()},bn);ao.set(N,G)},Dc=ge=>{x||Oe!=="intent"||kn()},La=ge=>{if(x||!Oe||!bn)return;const N=ge.currentTarget,G=ao.get(N);G&&(clearTimeout(G),ao.delete(N))};return{...V,...an,...or,href:Le==null?void 0:Le.href,ref:r,onClick:Vi([P,Ac]),onBlur:Vi([S,La]),onFocus:Vi([j,Ma]),onMouseEnter:Vi([C,Ma]),onMouseLeave:Vi([T,La]),onTouchStart:Vi([E,Dc]),disabled:!!x,target:g,...Fi&&{style:Fi},...zi&&{className:zi},...x&&jT,...Ht&&RT,...Q&&Oi&&IT}}var gd={},TT={className:"active"},jT={role:"link","aria-disabled":!0},RT={"data-status":"active","aria-current":"page"},IT={"data-transitioning":"transitioning"},ao=new WeakMap,MT={rootMargin:"100px"},Vi=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function LT(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function AT(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var ub=_.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...s}=ET(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 DT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var NT=class extends Yw{constructor(e){super(e),this.useMatch=t=>Ii({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>lb({...t,from:this.id}),this.useSearch=t=>ab({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>va({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>ob({...t,from:this.id}),this.useLoaderData=t=>sb({...t,from:this.id}),this.useNavigate=()=>Mi({from:this.fullPath}),this.Link=ks.forwardRef((t,n)=>f.jsx(ub,{ref:n,from:this.fullPath,...t}))}};function Os(e){return new NT(e)}var zT=class extends qE{constructor(e){super(e),this.useMatch=t=>Ii({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>lb({...t,from:this.id}),this.useSearch=t=>ab({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>va({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>ob({...t,from:this.id}),this.useLoaderData=t=>sb({...t,from:this.id}),this.useNavigate=()=>Mi({from:this.fullPath}),this.Link=ks.forwardRef((t,n)=>f.jsx(ub,{ref:n,from:this.fullPath,...t}))}};function FT(e){return new zT(e)}function OT(e){const t=Ut(),n=`not-found-${Tt(t.stores.location,r=>r.pathname)}-${Tt(t.stores.status,r=>r)}`;return f.jsx(Hp,{getResetKey:()=>n,onCatch:(r,i)=>{var s;if(ut(r))(s=e.onCatch)==null||s.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(ut(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function BT(){return f.jsx("p",{children:"Not Found"})}function qi(e){return f.jsx(f.Fragment,{children:e.children})}function cb(e,t,n){return t.options.notFoundComponent?f.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...n}):f.jsx(BT,{})}function $T(e){return null}function VT(){return $T(Ut()),null}var db=_.memo(function({matchId:t}){const n=Ut(),r=n.stores.matchStores.get(t);r||Jn();const i=Tt(n.stores.loadedAt,o=>o),s=Tt(r,o=>o);return f.jsx(WT,{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 WT({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,u=i.isRoot?i.options.notFoundComponent??((m=e.options.notFoundRoute)==null?void 0:m.options.component):i.options.notFoundComponent,c=r.ssr===!1||r.ssr==="data-only",d=(!i.isRoot||i.options.wrapInSuspense||c)&&(i.options.wrapInSuspense??s??(((y=i.options.errorComponent)==null?void 0:y.preload)||c))?_.Suspense:qi,h=a?Hp:qi,p=u?OT:qi;return f.jsxs(i.isRoot?i.options.shellComponent??qi:qi,{children:[f.jsx(pc.Provider,{value:t,children:f.jsx(d,{fallback:o,children:f.jsx(h,{getResetKey:()=>n,errorComponent:a||Gp,onCatch:(w,g)=>{if(ut(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),!u||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!i.isRoot)throw w;return _.createElement(u,w)},children:c||r._displayPending?f.jsx(ZE,{fallback:o,children:f.jsx(Ty,{matchId:t})}):f.jsx(Ty,{matchId:t})})})})}),r.parentRouteId===xi?f.jsxs(f.Fragment,{children:[f.jsx(UT,{resetKey:n}),e.options.scrollRestoration&&Fw?f.jsx(VT,{}):null]}):null]})}function UT({resetKey:e}){const t=Ut(),n=_.useRef(void 0);return _o(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...vs(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var Ty=_.memo(function({matchId:t}){const n=Ut(),r=(c,d)=>{var h;return((h=n.getMatch(c.id))==null?void 0:h._nonReactive[d])??c._nonReactive[d]},i=n.stores.matchStores.get(t);i||Jn();const s=Tt(i,c=>c),o=s.routeId,a=n.routesById[o],l=_.useMemo(()=>{var d;const c=(d=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:d({routeId:o,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return c?JSON.stringify(c):void 0},[o,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),u=_.useMemo(()=>{const c=a.options.component??n.options.defaultComponent;return c?f.jsx(c,{},l):f.jsx(fb,{})},[l,a.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const c=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const d=n.getMatch(s.id);if(d&&!d._nonReactive.minPendingPromise){const h=Is();d._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),d._nonReactive.minPendingPromise=void 0},c)}}throw r(s,"loadPromise")}if(s.status==="notFound")return ut(s.error)||Jn(),cb(n,a,s.error);if(s.status==="redirected")throw _t(s.error)||Jn(),r(s,"loadPromise");if(s.status==="error")throw s.error;return u}),fb=_.memo(function(){const t=Ut(),n=_.useContext(pc);let r,i=!1,s;{const u=n?t.stores.matchStores.get(n):void 0;[r,i]=Tt(u,c=>[c==null?void 0:c.routeId,(c==null?void 0:c.globalNotFound)??!1]),s=Tt(t.stores.matchesId,c=>c[c.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||Jn(),cb(t,o,void 0);if(!s)return null;const l=f.jsx(db,{matchId:s});return r===xi?f.jsx(_.Suspense,{fallback:a,children:l}):l});function HT(){const e=Ut(),t=_.useRef({router:e,mounted:!1}),[n,r]=_.useState(!1),i=Tt(e.stores.isLoading,d=>d),s=Tt(e.stores.hasPending,d=>d),o=ld(i),a=i||n||s,l=ld(a),u=i||s,c=ld(u);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 Fr(e.latestLocation.publicHref)!==Fr(h.publicHref)&&e.commitLocation({...h,replace:!0}),()=>{d()}},[e,e.history]),_o(()=>{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]),_o(()=>{o&&!i&&e.emit({type:"onLoad",...vs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),_o(()=>{c&&!u&&e.emit({type:"onBeforeRouteMount",...vs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,c,e]),_o(()=>{if(l&&!a){const d=vs(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),Zw(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&QE(e)}},[a,l,e]),null}function GT(){const e=Ut(),t=e.routesById[xi].options.pendingComponent??e.options.defaultPendingComponent,n=t?f.jsx(t,{}):null,r=f.jsxs(typeof document<"u"&&e.ssr?qi:_.Suspense,{fallback:n,children:[f.jsx(HT,{}),f.jsx(KT,{})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:r}):r}function KT(){const e=Ut(),t=Tt(e.stores.firstId,i=>i),n=Tt(e.stores.loadedAt,i=>i),r=t?f.jsx(db,{matchId:t}):null;return f.jsx(pc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:f.jsx(Hp,{getResetKey:()=>n,errorComponent:Gp,onCatch:void 0,children:r})})}var YT=e=>({createMutableStore:Ey,createReadonlyStore:Ey,batch:Zw}),qT=e=>new QT(e),QT=class extends $E{constructor(e){super(e,YT)}};function XT({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(Qw.Provider,{value:e,children:t});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function ZT({router:e,...t}){return f.jsx(XT,{router:e,...t,children:f.jsx(GT,{})})}function JT(e){const t=Ut({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=_.useRef(void 0);return Tt(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=Pr(r.current,e.select(i));return r.current=s,s}return e.select(i)}return i})}const ej="modulepreload",tj=function(e){return"/"+e},jy={},gc=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=tj(l),l in jy)return;jy[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":ej,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)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)})};function hb(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=hb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nj(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hb(e))&&(r&&(r+=" "),r+=t);return r}const Kp="-",rj=e=>{const t=sj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Kp);return a[0]===""&&a.length!==1&&a.shift(),pb(a,t)||ij(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},pb=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?pb(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Kp);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Ry=/^\[(.+)\]$/,ij=e=>{if(Ry.test(e)){const t=Ry.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},sj=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return aj(Object.entries(e.classGroups),n).forEach(([s,o])=>{oh(o,r,s,t)}),r},oh=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:Iy(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(oj(i)){oh(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{oh(o,Iy(t,s),n,r)})})},Iy=(e,t)=>{let n=e;return t.split(Kp).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},oj=e=>e.isThemeGetter,aj=(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,lj=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)}}},mb="!",uj=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===i&&(r||a.slice(w,w+s)===t)){l.push(a.slice(c,w)),c=w+s;continue}if(g==="/"){d=w;continue}}g==="["?u++:g==="]"&&u--}const h=l.length===0?a:a.substring(c),p=h.startsWith(mb),m=p?h.substring(1):h,y=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},cj=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},dj=e=>({cache:lj(e.cacheSize),parseClassName:uj(e),...rj(e)}),fj=/\s+/,hj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(fj);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let m=!!p,y=r(m?h.substring(0,p):h);if(!y){if(!m){a=u+(a.length>0?" "+a:a);continue}if(y=r(h),!y){a=u+(a.length>0?" "+a:a);continue}m=!1}const w=cj(c).join(":"),g=d?w+mb: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 P=v[b];s.push(g+P)}a=u+(a.length>0?" "+a:a)}return a};function pj(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gb(t))&&(r&&(r+=" "),r+=n);return r}const gb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=gb(e[r]))&&(n&&(n+=" "),n+=t);return n};function mj(e,...t){let n,r,i,s=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=dj(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=hj(l,n);return i(l,c),c}return function(){return s(pj.apply(null,arguments))}}const Se=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},yb=/^\[(?:([a-z-]+):)?(.+)\]$/i,gj=/^\d+\/\d+$/,yj=new Set(["px","full","screen"]),xj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vj=/\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$/,wj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Un=e=>ws(e)||yj.has(e)||gj.test(e),lr=e=>Bs(e,"length",Rj),ws=e=>!!e&&!Number.isNaN(Number(e)),yd=e=>Bs(e,"number",ws),lo=e=>!!e&&Number.isInteger(Number(e)),_j=e=>e.endsWith("%")&&ws(e.slice(0,-1)),re=e=>yb.test(e),ur=e=>xj.test(e),Sj=new Set(["length","size","percentage"]),Cj=e=>Bs(e,Sj,xb),Pj=e=>Bs(e,"position",xb),Ej=new Set(["image","url"]),Tj=e=>Bs(e,Ej,Mj),jj=e=>Bs(e,"",Ij),uo=()=>!0,Bs=(e,t,n)=>{const r=yb.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Rj=e=>vj.test(e)&&!wj.test(e),xb=()=>!1,Ij=e=>bj.test(e),Mj=e=>kj.test(e),Lj=()=>{const e=Se("colors"),t=Se("spacing"),n=Se("blur"),r=Se("brightness"),i=Se("borderColor"),s=Se("borderRadius"),o=Se("borderSpacing"),a=Se("borderWidth"),l=Se("contrast"),u=Se("grayscale"),c=Se("hueRotate"),d=Se("invert"),h=Se("gap"),p=Se("gradientColorStops"),m=Se("gradientColorStopPositions"),y=Se("inset"),w=Se("margin"),g=Se("opacity"),x=Se("padding"),v=Se("saturate"),b=Se("scale"),P=Se("sepia"),S=Se("skew"),j=Se("space"),C=Se("translate"),T=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",re,t],M=()=>[re,t],O=()=>["",Un,lr],B=()=>["auto",ws,re],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",re],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[ws,re];return{cacheSize:500,separator:":",theme:{colors:[uo],spacing:[Un,lr],blur:["none","",ur,re],brightness:V(),borderColor:[e],borderRadius:["none","","full",ur,re],borderSpacing:M(),borderWidth:O(),contrast:V(),grayscale:$(),hueRotate:V(),invert:$(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[_j,lr],inset:I(),margin:I(),opacity:V(),padding:M(),saturate:V(),scale:V(),sepia:$(),skew:V(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[ur]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...F(),re]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],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",lo,re]}],basis:[{basis:I()}],"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:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",lo,re]}],"grid-cols":[{"grid-cols":[uo]}],"col-start-end":[{col:["auto",{span:["full",lo,re]},re]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[uo]}],"row-start-end":[{row:["auto",{span:[lo,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",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"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":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"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:[ur]},ur]}],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",ur,lr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yd]}],"font-family":[{font:[uo]}],"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",ws,yd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Un,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:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Un,lr]}],"underline-offset":[{"underline-offset":["auto",Un,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:M()}],"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:[...F(),Pj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Cj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Tj]}],"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:[...z(),"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:z()}],"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:["",...z()]}],"outline-offset":[{"outline-offset":[Un,re]}],"outline-w":[{outline:[Un,lr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Un,lr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ur,jj]}],"shadow-color":[{shadow:[uo]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ur,re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",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:[lo,re]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Un,lr,yd]}],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"]}}},Aj=mj(Lj);function xd(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[u,c]=l;l[0]=(u-r)*o-(c-i)*a+r,l[1]=(u-r)*a+(c-i)*o+i}}}function Dj(e,t){return e[0]===t[0]&&e[1]===t[1]}function Nj(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 u of o)xd(u,a,i);const l=function(u,c,d){const h=[];for(const x of u){const v=[...x];Dj(v[0],v[v.length-1])||v.push([v[0][0],v[0][1]]),v.length>2&&h.push(v)}const p=[];c=Math.max(c,.1);const m=[];for(const x of h)for(let v=0;v<x.length-1;v++){const b=x[v],P=x[v+1];if(b[1]!==P[1]){const S=Math.min(b[1],P[1]);m.push({ymin:S,ymax:Math.max(b[1],P[1]),x:S===b[1]?b[0]:P[0],islope:(P[0]-b[0])/(P[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%c==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,P=y[v].edge;p.push([[Math.round(b.x),w],[Math.round(P.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 u of o)xd(u,a,-i);(function(u,c,d){const h=[];u.forEach(p=>h.push(...p)),xd(h,c,d)})(l,a,-i)}return l}function wa(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),Nj(e,i,r,s||1)}class Yp{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){const r=wa(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 yc(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 zj extends Yp{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=wa(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[u,c]of i)yc([u,c])&&o.push([[u[0]-a,u[1]+l],[...c]],[[u[0]+a,u[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,n)}}}class Fj extends Yp{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 Oj{constructor(t){this.helper=t}fillPolygons(t,n){const r=wa(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=yc(a),u=l/i,c=Math.ceil(u)-1,d=l-c*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<c;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 Bj{constructor(t){this.helper=t}fillPolygons(t,n){const r=wa(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=yc(o),l=Math.floor(a/(r+i)),u=(a+i-l*(r+i))/2;let c=o[0],d=o[1];c[0]>d[0]&&(c=o[1],d=o[0]);const h=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let p=0;p<l;p++){const m=p*(r+i),y=m+r,w=[c[0]+m*Math.cos(h)+u*Math.cos(h),c[1]+m*Math.sin(h)+u*Math.sin(h)],g=[c[0]+y*Math.cos(h)+u*Math.cos(h),c[1]+y*Math.sin(h)+u*Math.sin(h)];s.push(...this.helper.doubleLineOps(w[0],w[1],g[0],g[1],n))}}),s}}class $j{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=wa(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=yc(s),a=Math.round(o/(2*n));let l=s[0],u=s[1];l[0]>u[0]&&(l=s[1],u=s[0]);const c=Math.atan((u[1]-l[1])/(u[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(c),l[1]+h*Math.sin(c)],w=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],g=[y[0]+m*Math.cos(c+Math.PI/4),y[1]+m*Math.sin(c+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 vt={};class Vj{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Wj=0,vd=1,My=2,tl={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 wd(e,t){return e.type===t}function qp(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:Wj,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:vd,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return a[a.length]={type:My,text:""},a}(e);let r="BOD",i=0,s=n[i];for(;!wd(s,My);){let o=0;const a=[];if(r==="BOD"){if(s.text!=="M"&&s.text!=="m")return qp("M0,0"+e);i++,o=tl[s.text],r=s.text}else wd(s,vd)?o=tl[r]:(i++,o=tl[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 u=n[l];if(!wd(u,vd))throw new Error("Param not a number: "+r+","+u.text);a[a.length]=+u.text}if(typeof tl[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 vb(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((u,c)=>c%2?u+n:u+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((u,c)=>c%2?u+n:u+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((u,c)=>c%2?u+n:u+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 wb(e){const t=[];let n="",r=0,i=0,s=0,o=0,a=0,l=0;for(const{key:u,data:c}of e){switch(u){case"M":t.push({key:"M",data:[...c]}),[r,i]=c,[s,o]=c;break;case"C":t.push({key:"C",data:[...c]}),r=c[4],i=c[5],a=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[r,i]=c;break;case"H":r=c[0],t.push({key:"L",data:[r,i]});break;case"V":i=c[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,...c]}),a=c[0],l=c[1],r=c[2],i=c[3];break}case"T":{const[d,h]=c;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]=c,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(c[0]),h=Math.abs(c[1]),p=c[2],m=c[3],y=c[4],w=c[5],g=c[6];d===0||h===0?(t.push({key:"C",data:[r,i,w,g,w,g]}),r=w,i=g):(r!==w||i!==g)&&(bb(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=u}return t}function co(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function bb(e,t,n,r,i,s,o,a,l,u){const c=(d=o,Math.PI*d/180);var d;let h=[],p=0,m=0,y=0,w=0;if(u)[p,m,y,w]=u;else{[e,t]=co(e,t,-c),[n,r]=co(n,r,-c);const O=(e-n)/2,B=(t-r)/2;let F=O*O/(i*i)+B*B/(s*s);F>1&&(F=Math.sqrt(F),i*=F,s*=F);const z=i*i,D=s*s,L=z*D-z*B*B-D*O*O,$=z*B*B+D*O*O,k=(a===l?-1:1)*Math.sqrt(Math.abs(L/$));y=k*i*B/s+(e+n)/2,w=k*-s*O/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 O=m,B=n,F=r;m=l&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,h=bb(n=y+i*Math.cos(m),r=w+s*Math.sin(m),B,F,i,s,o,0,l,[m,O,y,w])}g=m-p;const x=Math.cos(p),v=Math.sin(p),b=Math.cos(m),P=Math.sin(m),S=Math.tan(g/4),j=4/3*i*S,C=4/3*s*S,T=[e,t],E=[e+j*v,t-C*x],I=[n+j*P,r-C*b],M=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],u)return[E,I,M].concat(h);{h=[E,I,M].concat(h);const O=[];for(let B=0;B<h.length;B+=3){const F=co(h[B][0],h[B][1],c),z=co(h[B+1][0],h[B+1][1],c),D=co(h[B+2][0],h[B+2][1],c);O.push([F[0],F[1],z[0],z[1],D[0],D[1]])}return O}}const Uj={randOffset:function(e,t){return X(e,t)},randOffsetWithRange:function(e,t,n){return Eu(e,t,n)},ellipse:function(e,t,n,r,i){const s=_b(n,r,i);return ah(e,t,i,s).opset},doubleLineOps:function(e,t,n,r,i){return Wr(e,t,n,r,i,!0)}};function kb(e,t,n,r,i){return{type:"path",ops:Wr(e,t,n,r,i)}}function zl(e,t,n){const r=(e||[]).length;if(r>2){const i=[];for(let s=0;s<r-1;s++)i.push(...Wr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],n));return t&&i.push(...Wr(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:i}}return r===2?kb(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function Hj(e,t,n,r,i){return function(s,o){return zl(s,!0,o)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function Ly(e,t){if(e.length){const n=typeof e[0][0]=="number"?[e]:e,r=nl(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:nl(n[0],1.5*(1+.22*t.roughness),Ny(t));for(let s=1;s<n.length;s++){const o=n[s];if(o.length){const a=nl(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:nl(o,1.5*(1+.22*t.roughness),Ny(t));for(const u of a)u.op!=="move"&&r.push(u);for(const u of l)u.op!=="move"&&i.push(u)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function _b(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+=X(o*l,n),a+=X(a*l,n),{increment:s,rx:o,ry:a}}function ah(e,t,n,r){const[i,s]=zy(r.increment,e,t,r.rx,r.ry,1,r.increment*Eu(.1,Eu(.4,1,n),n),n);let o=Tu(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=zy(r.increment,e,t,r.rx,r.ry,1.5,0,n),l=Tu(a,null,n);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function Ay(e,t,n,r,i,s,o,a,l){const u=e,c=t;let d=Math.abs(n/2),h=Math.abs(r/2);d+=X(.01*d,l),h+=X(.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=Fy(w,u,c,d,h,p,m,1,l);if(!l.disableMultiStroke){const x=Fy(w,u,c,d,h,p,m,1.5,l);g.push(...x)}return o&&(a?g.push(...Wr(u,c,u+d*Math.cos(p),c+h*Math.sin(p),l),...Wr(u,c,u+d*Math.cos(m),c+h*Math.sin(m),l)):g.push({op:"lineTo",data:[u,c]},{op:"lineTo",data:[u+d*Math.cos(p),c+h*Math.sin(p)]})),{type:"path",ops:g}}function Dy(e,t){const n=wb(vb(qp(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(...Wr(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]];break;case"C":{const[l,u,c,d,h,p]=a;r.push(...Gj(l,u,c,d,h,p,s,t)),s=[h,p];break}case"Z":r.push(...Wr(s[0],s[1],i[0],i[1],t)),s=[i[0],i[1]]}return{type:"path",ops:r}}function bd(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]+X(i,t),r[0][1]+X(i,t)]});for(let o=1;o<s;o++)n.push({op:"lineTo",data:[r[o][0]+X(i,t),r[o][1]+X(i,t)]})}}return{type:"fillPath",ops:n}}function Wi(e,t){return function(n,r){let i=n.fillStyle||"hachure";if(!vt[i])switch(i){case"zigzag":vt[i]||(vt[i]=new zj(r));break;case"cross-hatch":vt[i]||(vt[i]=new Fj(r));break;case"dots":vt[i]||(vt[i]=new Oj(r));break;case"dashed":vt[i]||(vt[i]=new Bj(r));break;case"zigzag-line":vt[i]||(vt[i]=new $j(r));break;default:i="hachure",vt[i]||(vt[i]=new Yp(r))}return vt[i]}(t,Uj).fillPolygons(e,t)}function Ny(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Sb(e){return e.randomizer||(e.randomizer=new Vj(e.seed||0)),e.randomizer.next()}function Eu(e,t,n,r=1){return n.roughness*r*(Sb(n)*(t-e)+e)}function X(e,t,n=1){return Eu(-e,e,t,n)}function Wr(e,t,n,r,i,s=!1){const o=s?i.disableMultiStrokeFill:i.disableMultiStroke,a=lh(e,t,n,r,i,!0,!1);if(o)return a;const l=lh(e,t,n,r,i,!0,!0);return a.concat(l)}function lh(e,t,n,r,i,s,o){const a=Math.pow(e-n,2)+Math.pow(t-r,2),l=Math.sqrt(a);let u=1;u=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=i.maxRandomnessOffset||0;c*c*100>a&&(c=l/10);const d=c/2,h=.2+.2*Sb(i);let p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=X(p,i,u),m=X(m,i,u);const y=[],w=()=>X(d,i,u),g=()=>X(c,i,u),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:X(c,i,u)),t+(x?0:X(c,i,u))]}),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 nl(e,t,n){if(!e.length)return[];const r=[];r.push([e[0][0]+X(t,n),e[0][1]+X(t,n)]),r.push([e[0][0]+X(t,n),e[0][1]+X(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+X(t,n),e[i][1]+X(t,n)]),i===e.length-1&&r.push([e[i][0]+X(t,n),e[i][1]+X(t,n)]);return Tu(r,null,n)}function Tu(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(...lh(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function zy(e,t,n,r,i,s,o,a){const l=[],u=[];if(a.roughness===0){e/=4,u.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const d=[t+r*Math.cos(c),n+i*Math.sin(c)];l.push(d),u.push(d)}u.push([t+r*Math.cos(0),n+i*Math.sin(0)]),u.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{const c=X(.5,a)-Math.PI/2;u.push([X(s,a)+t+.9*r*Math.cos(c-e),X(s,a)+n+.9*i*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let h=c;h<d;h+=e){const p=[X(s,a)+t+r*Math.cos(h),X(s,a)+n+i*Math.sin(h)];l.push(p),u.push(p)}u.push([X(s,a)+t+r*Math.cos(c+2*Math.PI+.5*o),X(s,a)+n+i*Math.sin(c+2*Math.PI+.5*o)]),u.push([X(s,a)+t+.98*r*Math.cos(c+o),X(s,a)+n+.98*i*Math.sin(c+o)]),u.push([X(s,a)+t+.9*r*Math.cos(c+.5*o),X(s,a)+n+.9*i*Math.sin(c+.5*o)])}return[u,l]}function Fy(e,t,n,r,i,s,o,a,l){const u=s+X(.1,l),c=[];c.push([X(a,l)+t+.9*r*Math.cos(u-e),X(a,l)+n+.9*i*Math.sin(u-e)]);for(let d=u;d<=o;d+=e)c.push([X(a,l)+t+r*Math.cos(d),X(a,l)+n+i*Math.sin(d)]);return c.push([t+r*Math.cos(o),n+i*Math.sin(o)]),c.push([t+r*Math.cos(o),n+i*Math.sin(o)]),Tu(c,null,l)}function Gj(e,t,n,r,i,s,o,a){const l=[],u=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let c=[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:X(u[0],a)),o[1]+(h?0:X(u[0],a))]}),c=h?[i,s]:[i+X(u[p],a),s+X(u[p],a)],l.push({op:"bcurveTo",data:[e+X(u[p],a),t+X(u[p],a),n+X(u[p],a),r+X(u[p],a),c[0],c[1]]});return l}function fo(e){return[...e]}function Oy(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(fo(e[0]),fo(e[1]),fo(e[2]),fo(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(fo(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 Fl(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Kj(e,t,n){const r=Fl(t,n);if(r===0)return Fl(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)),Fl(e,si(t,n,i))}function si(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function uh(e,t,n,r){const i=r||[];if(function(a,l){const u=a[l+0],c=a[l+1],d=a[l+2],h=a[l+3];let p=3*c[0]-2*u[0]-h[0];p*=p;let m=3*c[1]-2*u[1]-h[1];m*=m;let y=3*d[0]-2*h[0]-u[0];y*=y;let w=3*d[1]-2*h[1]-u[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(Fl(s,o))>1&&i.push(a)):i.push(a),i.push(e[t+3])}else{const l=e[t+0],u=e[t+1],c=e[t+2],d=e[t+3],h=si(l,u,.5),p=si(u,c,.5),m=si(c,d,.5),y=si(h,p,.5),w=si(p,m,.5),g=si(y,w,.5);uh([l,h,y,g],0,n,i),uh([g,w,m,d],0,n,i)}var s,o;return i}function Yj(e,t){return ju(e,0,e.length,t)}function ju(e,t,n,r,i){const s=i||[],o=e[t],a=e[n-1];let l=0,u=1;for(let c=t+1;c<n-1;++c){const d=Kj(e[c],o,a);d>l&&(l=d,u=c)}return Math.sqrt(l)>r?(ju(e,t,u+1,r,s),ju(e,u,n,r,s)):(s.length||s.push(o),s.push(a)),s}function kd(e,t=.15,n){const r=[],i=(e.length-1)/3;for(let s=0;s<i;s++)uh(e,3*s,t,r);return n&&n>0?ju(r,0,r.length,n):r}const It="none";let Ru=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",[kb(t,n,r,i,o)],o)}rectangle(t,n,r,i,s){const o=this._o(s),a=[],l=Hj(t,n,r,i,o);if(o.fill){const u=[[t,n],[t+r,n],[t+r,n+i],[t,n+i]];o.fillStyle==="solid"?a.push(bd([u],o)):a.push(Wi([u],o))}return o.stroke!==It&&a.push(l),this._d("rectangle",a,o)}ellipse(t,n,r,i,s){const o=this._o(s),a=[],l=_b(r,i,o),u=ah(t,n,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=ah(t,n,o,l).opset;c.type="fillPath",a.push(c)}else a.push(Wi([u.estimatedPoints],o));return o.stroke!==It&&a.push(u.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",[zl(t,!1,r)],r)}arc(t,n,r,i,s,o,a=!1,l){const u=this._o(l),c=[],d=Ay(t,n,r,i,s,o,a,!0,u);if(a&&u.fill)if(u.fillStyle==="solid"){const h=Object.assign({},u);h.disableMultiStroke=!0;const p=Ay(t,n,r,i,s,o,!0,!1,h);p.type="fillPath",c.push(p)}else c.push(function(h,p,m,y,w,g,x){const v=h,b=p;let P=Math.abs(m/2),S=Math.abs(y/2);P+=X(.01*P,x),S+=X(.01*S,x);let j=w,C=g;for(;j<0;)j+=2*Math.PI,C+=2*Math.PI;C-j>2*Math.PI&&(j=0,C=2*Math.PI);const T=(C-j)/x.curveStepCount,E=[];for(let I=j;I<=C;I+=T)E.push([v+P*Math.cos(I),b+S*Math.sin(I)]);return E.push([v+P*Math.cos(C),b+S*Math.sin(C)]),E.push([v,b]),Wi([E],x)}(t,n,r,i,s,o,u));return u.stroke!==It&&c.push(d),this._d("arc",c,u)}curve(t,n){const r=this._o(n),i=[],s=Ly(t,r);if(r.fill&&r.fill!==It)if(r.fillStyle==="solid"){const o=Ly(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 u of l)u.length<3?o.push(...u):u.length===3?o.push(...kd(Oy([u[0],u[0],u[1],u[2]]),10,(1+r.roughness)/2)):o.push(...kd(Oy(u),10,(1+r.roughness)/2))}o.length&&i.push(Wi([o],r))}return r.stroke!==It&&i.push(s),this._d("curve",i,r)}polygon(t,n){const r=this._o(n),i=[],s=zl(t,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(bd([t],r)):i.push(Wi([t],r))),r.stroke!==It&&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!==It,o=r.stroke!==It,a=!!(r.simplification&&r.simplification<1),l=function(c,d,h){const p=wb(vb(qp(c))),m=[];let y=[],w=[0,0],g=[];const x=()=>{g.length>=4&&y.push(...kd(g,d)),g=[]},v=()=>{x(),y.length&&(m.push(y),y=[])};for(const{key:P,data:S}of p)switch(P){case"M":v(),w=[S[0],S[1]],y.push(w);break;case"L":x(),y.push([S[0],S[1]]);break;case"C":if(!g.length){const j=y.length?y[y.length-1]:w;g.push([j[0],j[1]])}g.push([S[0],S[1]]),g.push([S[2],S[3]]),g.push([S[4],S[5]]);break;case"Z":x(),y.push([w[0],w[1]])}if(v(),!h)return m;const b=[];for(const P of m){const S=Yj(P,h);S.length&&b.push(S)}return b}(t,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),u=Dy(t,r);if(s)if(r.fillStyle==="solid")if(l.length===1){const c=Dy(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else i.push(bd(l,r));else i.push(Wi(l,r));return o&&(a?l.forEach(c=>{i.push(zl(c,!1,r))}):i.push(u)),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:It};break;case"fillPath":o={d:this.opsToPath(s),stroke:It,strokeWidth:0,fill:r.fill||It};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||It,strokeWidth:r,fill:It}}_mergedShape(t){return t.filter((n,r)=>r===0||n.op!=="move")}};class qj{constructor(t,n){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ru(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 u=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(u),u}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 rl="http://www.w3.org/2000/svg";class Qj{constructor(t,n){this.svg=t,this.gen=new Ru(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,s=i.createElementNS(rl,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(rl,"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(rl,"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(rl,"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 u=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(u)}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 Xj={canvas:(e,t)=>new qj(e,t),svg:(e,t)=>new Qj(e,t),generator:e=>new Ru(e),newSeed:()=>Ru.newSeed()};const Qp=_.createContext({});function Xp(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const Zj=typeof window<"u",Cb=Zj?_.useLayoutEffect:_.useEffect,xc=_.createContext(null);function Zp(e,t){e.indexOf(t)===-1&&e.push(t)}function Iu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const On=(e,t,n)=>n>t?t:n<e?e:n;let Jp=()=>{};const Ur={},Pb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Eb=e=>typeof e=="object"&&e!==null,Tb=e=>/^0[^.\s]+$/u.test(e);function jb(e){let t;return()=>(t===void 0&&(t=e()),t)}const nn=e=>e,ba=(...e)=>e.reduce((t,n)=>r=>n(t(r))),ua=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class em{constructor(){this.subscriptions=[]}add(t){return Zp(this.subscriptions,t),()=>Iu(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 Ft=e=>e*1e3,en=e=>e/1e3,Rb=(e,t)=>t?e*(1e3/t):0,Ib=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Jj=1e-7,e2=12;function t2(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Ib(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>Jj&&++a<e2);return o}function ka(e,t,n,r){if(e===t&&n===r)return nn;const i=s=>t2(s,0,1,e,n);return s=>s===0||s===1?s:Ib(i(s),t,r)}const Mb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Lb=e=>t=>1-e(1-t),Ab=ka(.33,1.53,.69,.99),tm=Lb(Ab),Db=Mb(tm),Nb=e=>e>=1?1:(e*=2)<1?.5*tm(e):.5*(2-Math.pow(2,-10*(e-1))),nm=e=>1-Math.sin(Math.acos(e)),zb=Lb(nm),Fb=Mb(nm),n2=ka(.42,0,1,1),r2=ka(0,0,.58,1),Ob=ka(.42,0,.58,1),i2=e=>Array.isArray(e)&&typeof e[0]!="number",Bb=e=>Array.isArray(e)&&typeof e[0]=="number",s2={linear:nn,easeIn:n2,easeInOut:Ob,easeOut:r2,circIn:nm,circInOut:Fb,circOut:zb,backIn:tm,backInOut:Db,backOut:Ab,anticipate:Nb},o2=e=>typeof e=="string",By=e=>{if(Bb(e)){Jp(e.length===4);const[t,n,r,i]=e;return ka(t,n,r,i)}else if(o2(e))return s2[e];return e},il=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function a2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,h=!1)=>{const m=h&&i?n:r;return d&&o.add(c),m.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const l2=40;function $b(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=il.reduce((v,b)=>(v[b]=a2(s),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:p,postRender:m}=o,y=()=>{const v=Ur.useManualTiming,b=v?i.timestamp:performance.now();n=!1,v||(i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,l2),1)),i.timestamp=b,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),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:il.reduce((v,b)=>{const P=o[b];return v[b]=(S,j=!1,C=!1)=>(n||w(),P.schedule(S,j,C)),v},{}),cancel:v=>{for(let b=0;b<il.length;b++)o[il[b]].cancel(v)},state:i,steps:o}}const{schedule:we,cancel:Hr,state:Je,steps:_d}=$b(typeof requestAnimationFrame<"u"?requestAnimationFrame:nn,!0);let Ol;function u2(){Ol=void 0}const pt={now:()=>(Ol===void 0&&pt.set(Je.isProcessing||Ur.useManualTiming?Je.timestamp:performance.now()),Ol),set:e=>{Ol=e,queueMicrotask(u2)}},Vb=e=>t=>typeof t=="string"&&t.startsWith(e),Wb=Vb("--"),c2=Vb("var(--"),rm=e=>c2(e)?d2.test(e.split("/*")[0].trim()):!1,d2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $y(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const $s={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ca={...$s,transform:e=>On(0,1,e)},sl={...$s,default:1},Do=e=>Math.round(e*1e5)/1e5,im=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function f2(e){return e==null}const h2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sm=(e,t)=>n=>!!(typeof n=="string"&&h2.test(n)&&n.startsWith(e)||t&&!f2(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ub=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(im);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},p2=e=>On(0,255,e),Sd={...$s,transform:e=>Math.round(p2(e))},hi={test:sm("rgb","red"),parse:Ub("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Sd.transform(e)+", "+Sd.transform(t)+", "+Sd.transform(n)+", "+Do(ca.transform(r))+")"};function m2(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 ch={test:sm("#"),parse:m2,transform:hi.transform},_a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=_a("deg"),Fn=_a("%"),q=_a("px"),g2=_a("vh"),y2=_a("vw"),Vy={...Fn,parse:e=>Fn.parse(e)/100,transform:e=>Fn.transform(e*100)},cs={test:sm("hsl","hue"),parse:Ub("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Fn.transform(Do(t))+", "+Fn.transform(Do(n))+", "+Do(ca.transform(r))+")"},$e={test:e=>hi.test(e)||ch.test(e)||cs.test(e),parse:e=>hi.test(e)?hi.parse(e):cs.test(e)?cs.parse(e):ch.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?hi.transform(e):cs.transform(e),getAnimatableNone:e=>{const t=$e.parse(e);return t.alpha=0,$e.transform(t)}},x2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function v2(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(im))==null?void 0:t.length)||0)+(((n=e.match(x2))==null?void 0:n.length)||0)>0}const Hb="number",Gb="color",w2="var",b2="var(",Wy="${}",k2=/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 Ls(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(k2,l=>($e.test(l)?(r.color.push(s),i.push(Gb),n.push($e.parse(l))):l.startsWith(b2)?(r.var.push(s),i.push(w2),n.push(l)):(r.number.push(s),i.push(Hb),n.push(parseFloat(l))),++s,Wy)).split(Wy);return{values:n,split:a,indexes:r,types:i}}function _2(e){return Ls(e).values}function Kb({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===Hb?i+=Do(r[s]):o===Gb?i+=$e.transform(r[s]):i+=r[s]}return i}}function S2(e){return Kb(Ls(e))}const C2=e=>typeof e=="number"?0:$e.test(e)?$e.getAnimatableNone(e):e,P2=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:C2(e);function E2(e){const t=Ls(e);return Kb(t)(t.values.map((r,i)=>P2(r,t.split[i])))}const xn={test:v2,parse:_2,createTransformer:S2,getAnimatableNone:E2};function Cd(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 T2({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=Cd(l,a,e+1/3),s=Cd(l,a,e),o=Cd(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Mu(e,t){return n=>n>0?t:e}const ve=(e,t,n)=>e+(t-e)*n,Pd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},j2=[ch,hi,cs],R2=e=>j2.find(t=>t.test(e));function Uy(e){const t=R2(e);if(!t)return!1;let n=t.parse(e);return t===cs&&(n=T2(n)),n}const Hy=(e,t)=>{const n=Uy(e),r=Uy(t);if(!n||!r)return Mu(e,t);const i={...n};return s=>(i.red=Pd(n.red,r.red,s),i.green=Pd(n.green,r.green,s),i.blue=Pd(n.blue,r.blue,s),i.alpha=ve(n.alpha,r.alpha,s),hi.transform(i))},dh=new Set(["none","hidden"]);function I2(e,t){return dh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function M2(e,t){return n=>ve(e,t,n)}function om(e){return typeof e=="number"?M2:typeof e=="string"?rm(e)?Mu:$e.test(e)?Hy:D2:Array.isArray(e)?Yb:typeof e=="object"?$e.test(e)?Hy:L2:Mu}function Yb(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>om(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function L2(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=om(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function A2(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 D2=(e,t)=>{const n=xn.createTransformer(t),r=Ls(e),i=Ls(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?dh.has(e)&&!i.values.length||dh.has(t)&&!r.values.length?I2(e,t):ba(Yb(A2(r,i),i.values),n):Mu(e,t)};function qb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ve(e,t,n):om(e)(e,t)}const N2=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>we.update(t,n),stop:()=>Hr(t),now:()=>Je.isProcessing?Je.timestamp:pt.now()}},Qb=(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)})`},Lu=2e4;function am(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Lu;)t+=n,r=e.next(t);return t>=Lu?1/0:t}function z2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(am(r),Lu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:en(i)}}const De={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 fh(e,t){return e*Math.sqrt(1-t*t)}const F2=12;function O2(e,t,n){let r=n;for(let i=1;i<F2;i++)r=r-e(r)/t(r);return r}const Ed=.001;function B2({duration:e=De.duration,bounce:t=De.bounce,velocity:n=De.velocity,mass:r=De.mass}){let i,s,o=1-t;o=On(De.minDamping,De.maxDamping,o),e=On(De.minDuration,De.maxDuration,en(e)),o<1?(i=u=>{const c=u*o,d=c*e,h=c-n,p=fh(u,o),m=Math.exp(-d);return Ed-h/p*m},s=u=>{const d=u*o*e,h=d*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),y=fh(Math.pow(u,2),o);return(-i(u)+Ed>0?-1:1)*((h-p)*m)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Ed+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=O2(i,s,a);if(e=Ft(e),isNaN(l))return{stiffness:De.stiffness,damping:De.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const $2=["duration","bounce"],V2=["stiffness","damping","mass"];function Gy(e,t){return t.some(n=>e[n]!==void 0)}function W2(e){let t={velocity:De.velocity,stiffness:De.stiffness,damping:De.damping,mass:De.mass,isResolvedFromDuration:!1,...e};if(!Gy(e,V2)&&Gy(e,$2))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*On(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:De.mass,stiffness:i,damping:s}}else{const n=B2({...e,velocity:0});t={...t,...n,mass:De.mass},t.isResolvedFromDuration=!0}return t}function Au(e=De.visualDuration,t=De.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:p}=W2({...n,velocity:-en(n.velocity||0)}),m=h||0,y=u/(2*Math.sqrt(l*c)),w=o-s,g=en(Math.sqrt(l/c)),x=Math.abs(w)<5;r||(r=x?De.restSpeed.granular:De.restSpeed.default),i||(i=x?De.restDelta.granular:De.restDelta.default);let v,b,P,S,j,C;if(y<1)P=fh(g,y),S=(m+y*g*w)/P,v=E=>{const I=Math.exp(-y*g*E);return o-I*(S*Math.sin(P*E)+w*Math.cos(P*E))},j=y*g*S+w*P,C=y*g*w-S*P,b=E=>Math.exp(-y*g*E)*(j*Math.sin(P*E)+C*Math.cos(P*E));else if(y===1){v=I=>o-Math.exp(-g*I)*(w+(m+g*w)*I);const E=m+g*w;b=I=>Math.exp(-g*I)*(g*E*I-m)}else{const E=g*Math.sqrt(y*y-1);v=B=>{const F=Math.exp(-y*g*B),z=Math.min(E*B,300);return o-F*((m+y*g*w)*Math.sinh(z)+E*w*Math.cosh(z))/E};const I=(m+y*g*w)/E,M=y*g*I-w*E,O=y*g*w-I*E;b=B=>{const F=Math.exp(-y*g*B),z=Math.min(E*B,300);return F*(M*Math.sinh(z)+O*Math.cosh(z))}}const T={calculatedDuration:p&&d||null,velocity:E=>Ft(b(E)),next:E=>{if(!p&&y<1){const M=Math.exp(-y*g*E),O=Math.sin(P*E),B=Math.cos(P*E),F=o-M*(S*O+w*B),z=Ft(M*(j*O+C*B));return a.done=Math.abs(z)<=r&&Math.abs(o-F)<=i,a.value=a.done?o:F,a}const I=v(E);if(p)a.done=E>=d;else{const M=Ft(b(E));a.done=Math.abs(M)<=r&&Math.abs(o-I)<=i}return a.value=a.done?o:I,a},toString:()=>{const E=Math.min(am(T),Lu),I=Qb(M=>T.next(E*M).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}Au.applyToOptions=e=>{const t=z2(e,100,Au);return e.ease=t.ease,e.duration=Ft(t.duration),e.type="keyframes",e};const U2=5;function Xb(e,t,n){const r=Math.max(t-U2,0);return Rb(n-e(r),t-r)}function hh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},p=C=>a!==void 0&&C<a||l!==void 0&&C>l,m=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let y=n*t;const w=d+y,g=o===void 0?w:o(w);g!==w&&(y=g-d);const x=C=>-y*Math.exp(-C/r),v=C=>g+x(C),b=C=>{const T=x(C),E=v(C);h.done=Math.abs(T)<=u,h.value=h.done?g:E};let P,S;const j=C=>{p(h.value)&&(P=C,S=Au({keyframes:[h.value,m(h.value)],velocity:Xb(v,C,h.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return j(0),{calculatedDuration:null,next:C=>{let T=!1;return!S&&P===void 0&&(T=!0,b(C),j(C)),P!==void 0&&C>=P?S.next(C-P):(!T&&b(C),h)}}}function H2(e,t,n){const r=[],i=n||Ur.mix||qb,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]||nn:t;a=ba(l,a)}r.push(a)}return r}function G2(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Jp(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=H2(t,r,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const h=ua(e[d],e[d+1],c);return a[d](h)};return n?c=>u(On(e[0],e[s-1],c)):u}function K2(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ua(0,t,r);e.push(ve(n,1,i))}}function Y2(e){const t=[0];return K2(t,e.length-1),t}function q2(e,t){return e.map(n=>n*t)}function Q2(e,t){return e.map(()=>t||Ob).splice(0,e.length-1)}function No({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=i2(r)?r.map(By):By(r),s={done:!1,value:t[0]},o=q2(n&&n.length===t.length?n:Y2(t),e),a=G2(o,t,{ease:Array.isArray(i)?i:Q2(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const X2=e=>e!==null;function vc(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(X2),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const Z2={decay:hh,inertia:hh,tween:No,keyframes:No,spring:Au};function Zb(e){typeof e.type=="string"&&(e.type=Z2[e.type])}class lm{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 J2=e=>e/100;class Du extends lm{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!==pt.now()&&this.tick(pt.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;Zb(t);const{type:n=No,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||No;l!==No&&typeof a[0]!="number"&&(this.mixKeyframes=ba(J2,qb(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=am(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay: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-u*(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 C=Math.min(this.currentTime,i)/a;let T=Math.floor(C),E=C%1;!E&&C>=1&&(E=1),E===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(h==="reverse"?(E=1-E,p&&(E-=p/a)):h==="mirror"&&(b=o)),v=On(0,1,E)*a}let P;x?(this.delayState.value=c[0],P=this.delayState):P=b.next(v),s&&!x&&(P.value=s(P.value));let{done:S}=P;!x&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return j&&m!==hh&&(P.value=vc(c,this.options,w,this.speed)),y&&y(P.value),j&&this.finish(),P}then(t,n){return this.finished.then(t,n)}get duration(){return en(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+en(t)}get time(){return en(this.currentTime)}set time(t){t=Ft(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 Xb(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(pt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=en(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=N2,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(pt.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 eR(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const pi=e=>e*180/Math.PI,ph=e=>{const t=pi(Math.atan2(e[1],e[0]));return mh(t)},tR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ph,rotateZ:ph,skewX:e=>pi(Math.atan(e[1])),skewY:e=>pi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mh=e=>(e=e%360,e<0&&(e+=360),e),Ky=ph,Yy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),nR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Yy,scaleY:qy,scale:e=>(Yy(e)+qy(e))/2,rotateX:e=>mh(pi(Math.atan2(e[6],e[5]))),rotateY:e=>mh(pi(Math.atan2(-e[2],e[0]))),rotateZ:Ky,rotate:Ky,skewX:e=>pi(Math.atan(e[4])),skewY:e=>pi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function gh(e){return e.includes("scale")?1:0}function yh(e,t){if(!e||e==="none")return gh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=nR,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=tR,i=a}if(!i)return gh(t);const s=r[t],o=i[1].split(",").map(iR);return typeof s=="function"?s(o):o[s]}const rR=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return yh(n,t)};function iR(e){return parseFloat(e.trim())}const Vs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ws=new Set([...Vs,"pathRotation"]),Qy=e=>e===$s||e===q,sR=new Set(["x","y","z"]),oR=Vs.filter(e=>!sR.has(e));function aR(e){const t=[];return oR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const jr={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})=>yh(t,"x"),y:(e,{transform:t})=>yh(t,"y")};jr.translateX=jr.x;jr.translateY=jr.y;const wi=new Set;let xh=!1,vh=!1,wh=!1;function Jb(){if(vh){const e=Array.from(wi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=aR(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)})}vh=!1,xh=!1,wi.forEach(e=>e.complete(wh)),wi.clear()}function ek(){wi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vh=!0)})}function lR(){wh=!0,ek(),Jb(),wh=!1}class um{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(wi.add(this),xh||(xh=!0,we.read(ek),we.resolveKeyframes(Jb))):(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])}eR(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),wi.delete(this)}cancel(){this.state==="scheduled"&&(wi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const uR=e=>e.startsWith("--");function tk(e,t,n){uR(t)?e.style.setProperty(t,n):e.style[t]=n}const cR={};function nk(e,t){const n=jb(e);return()=>cR[t]??n()}const dR=nk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),rk=nk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),So=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Xy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:So([0,.65,.55,1]),circOut:So([.55,0,1,.45]),backIn:So([.31,.01,.66,-.59]),backOut:So([.33,1.53,.69,.99])};function ik(e,t){if(e)return typeof e=="function"?rk()?Qb(e,t):"ease-out":Bb(e)?So(e):Array.isArray(e)?e.map(n=>ik(n,t)||Xy.easeOut):Xy[e]}function fR(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=ik(a,i);Array.isArray(d)&&(c.easing=d);const h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function sk(e){return typeof e=="function"&&"applyToOptions"in e}function hR({type:e,...t}){return sk(e)&&rk()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ok extends lm{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,Jp(typeof t.type!="string");const u=hR(t);this.animation=fR(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=vc(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),tk(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return en(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+en(t)}get time(){return en(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ft(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&&dR()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),nn):i(this)}}const ak={anticipate:Nb,backInOut:Db,circInOut:Fb};function pR(e){return e in ak}function mR(e){typeof e.ease=="string"&&pR(e.ease)&&(e.ease=ak[e.ease])}const Td=10;class gR extends ok{constructor(t){mR(t),Zb(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 Du({...o,autoplay:!1}),l=Math.max(Td,pt.now()-this.startTime),u=On(0,Td,l-Td),c=a.sample(l).value,{name:d}=this.options;s&&d&&tk(s,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Zy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(xn.test(e)||e==="0")&&!e.startsWith("url("));function yR(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 xR(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=Zy(i,t),a=Zy(s,t);return!o||!a?!1:yR(e)||(n==="spring"||sk(n))&&r}function bh(e){e.duration=0,e.type="keyframes"}const lk=new Set(["opacity","clipPath","filter","transform"]),vR=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function wR(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&vR.test(e[t]))return!0;return!1}const bR=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),kR=jb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _R(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=t.owner.getProps();return kR()&&n&&(lk.has(n)||bR.has(n)&&wR(a))&&(n!=="transform"||!c)&&!u&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const SR=40;class CR extends lm{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var m;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=pt.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},p=(c==null?void 0:c.KeyframeResolver)||um;this.keyframeResolver=new p(a,(y,w,g)=>this.onKeyframesResolved(y,w,h,!g),l,u,c),(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:u,onUpdate:c}=r;this.resolvedAt=pt.now();let d=!0;xR(t,s,o,a)||(d=!1,(Ur.instantAnimations||!l)&&(c==null||c(vc(t,r,n))),t[0]=t[t.length-1],bh(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>SR?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=d&&!u&&_R(p),y=(x=(g=p.motionValue)==null?void 0:g.owner)==null?void 0:x.current;let w;if(m)try{w=new gR({...p,element:y})}catch{w=new Du(p)}else w=new Du(p);w.finished.then(()=>{this.notifyFinished()}).catch(nn),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(),lR()),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 uk(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}const Jy=30,PR=e=>!isNaN(parseFloat(e));class ER{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=pt.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=pt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=PR(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 em);const r=this.events[t].add(n);return t==="change"?()=>{r(),we.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=pt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Jy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Jy);return Rb(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 As(e,t){return new ER(e,t)}function ck(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function cm(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?ck(n,e):n}const TR={type:"spring",stiffness:500,damping:25,restSpeed:10},jR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),RR={type:"keyframes",duration:.8},IR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},MR=(e,{keyframes:t})=>t.length>2?RR:Ws.has(e)?e.startsWith("scale")?jR(t[1]):TR:IR,LR=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function AR(e){for(const t in e)if(!LR.has(t))return!0;return!1}const dm=(e,t,n,r={},i,s)=>o=>{const a=cm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ft(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};AR(a)||Object.assign(c,MR(e,c)),c.duration&&(c.duration=Ft(c.duration)),c.repeatDelay&&(c.repeatDelay=Ft(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(bh(c),c.delay===0&&(d=!0)),(Ur.instantAnimations||Ur.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,bh(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=vc(c.keyframes,a);if(h!==void 0){we.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new Du(c):new CR(c)},DR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function NR(e){const t=DR.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function dk(e,t,n=1){const[r,i]=NR(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Pb(o)?parseFloat(o):o}return rm(i)?dk(i,t,n+1):i}function ex(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function fm(e,t,n,r){if(typeof t=="function"){const[i,s]=ex(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]=ex(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function bi(e,t,n){const r=e.getProps();return fm(r,t,n!==void 0?n:r.custom,e)}const fk=new Set(["width","height","top","left","right","bottom",...Vs]),kh=e=>Array.isArray(e);function zR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,As(n))}function FR(e){return kh(e)?e[e.length-1]||0:e}function OR(e,t){const n=bi(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=FR(s[o]);zR(e,o,a)}}const et=e=>!!(e&&e.getVelocity);function BR(e){return!!(et(e)&&e.add)}function _h(e,t){const n=e.getValue("willChange");if(BR(n))return n.add(t);if(!n&&Ur.WillChange){const r=new Ur.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function hm(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const $R="framerAppearId",hk="data-"+hm($R);function pk(e){return e.props[hk]}function VR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function mk(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?ck(s,l):l;const u=s==null?void 0:s.reduceMotion,c=s==null?void 0:s.skipAnimations;r&&(s=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i],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&&VR(h,m))continue;const g={delay:n,...cm(s||{},m)};c&&(g.skipAnimations=!0);const x=y.get();if(x!==void 0&&!y.isAnimating()&&!Array.isArray(w)&&w===x&&!g.velocity){we.update(()=>y.set(w));continue}let v=!1;if(window.MotionHandoffAnimation){const S=pk(e);if(S){const j=window.MotionHandoffAnimation(S,m,we);j!==null&&(g.startTime=j,v=!0)}}_h(e,m);const b=u??e.shouldReduceMotion;y.start(dm(m,y,w,b&&fk.has(m)?{type:!1}:g,e,v));const P=y.animation;P&&d.push(P)}if(o){const m=()=>we.update(()=>{o&&OR(e,o)});d.length?Promise.all(d).then(m):m()}return d}function Sh(e,t,n={}){var l;const r=bi(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(mk(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=i;return WR(e,t,u,c,d,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function WR(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(Sh(l,t,{...o,delay:n+(typeof r=="function"?0:r)+uk(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function UR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Sh(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Sh(e,t,n);else{const i=typeof t=="function"?bi(e,t,n.custom):t;r=Promise.all(mk(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const HR={test:e=>e==="auto",parse:e=>e},gk=e=>t=>t.test(e),yk=[$s,q,Fn,Kn,y2,g2,HR],tx=e=>yk.find(gk(e));function GR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Tb(e):!0}const KR=new Set(["brightness","contrast","saturate","opacity"]);function YR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(im)||[];if(!r)return e;const i=n.replace(r,"");let s=KR.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const qR=/\b([a-z-]*)\(.*?\)/gu,Ch={...xn,getAnimatableNone:e=>{const t=e.match(qR);return t?t.map(YR).join(" "):e}},Ph={...xn,getAnimatableNone:e=>{const t=xn.parse(e);return xn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},nx={...$s,transform:Math.round},QR={rotate:Kn,pathRotation:Kn,rotateX:Kn,rotateY:Kn,rotateZ:Kn,scale:sl,scaleX:sl,scaleY:sl,scaleZ:sl,skew:Kn,skewX:Kn,skewY:Kn,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:ca,originX:Vy,originY:Vy,originZ:q},Nu={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...QR,zIndex:nx,fillOpacity:ca,strokeOpacity:ca,numOctaves:nx},XR={...Nu,color:$e,backgroundColor:$e,outlineColor:$e,fill:$e,stroke:$e,borderColor:$e,borderTopColor:$e,borderRightColor:$e,borderBottomColor:$e,borderLeftColor:$e,filter:Ch,WebkitFilter:Ch,mask:Ph,WebkitMask:Ph},xk=e=>XR[e],ZR=new Set([Ch,Ph]);function vk(e,t){let n=xk(e);return ZR.has(n)||(n=xn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const JR=new Set(["auto","none","0"]);function eI(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!JR.has(s)&&Ls(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=vk(n,i)}class tI extends um{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),rm(d))){const h=dk(d,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!fk.has(r)||t.length!==2)return;const[i,s]=t,o=tx(i),a=tx(s),l=$y(i),u=$y(s);if(l!==u&&jr[r]){this.needsMeasurement=!0;return}if(o!==a)if(Qy(o)&&Qy(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else jr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||GR(t[i]))&&r.push(i);r.length&&eI(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=jr[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]=jr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function wk(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 Eh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Bl(e){return Eb(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:pm}=$b(queueMicrotask,!1),fn={x:!1,y:!1};function bk(){return fn.x||fn.y}function nI(e){return e==="x"||e==="y"?fn[e]?null:(fn[e]=!0,()=>{fn[e]=!1}):fn.x||fn.y?null:(fn.x=fn.y=!0,()=>{fn.x=fn.y=!1})}function kk(e,t){const n=wk(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function rI(e){return!(e.pointerType==="touch"||bk())}function iI(e,t,n={}){const[r,i,s]=kk(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",m)},d=w=>{u&&(u(w),u=void 0),c()},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(!rI(w))return;l=!1;const g=t(o,w);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",p,i)}),s}const _k=(e,t)=>t?e===t?!0:_k(e,t.parentElement):!1,mm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,sI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function oI(e){return sI.has(e.tagName)||e.isContentEditable===!0}const aI=new Set(["INPUT","SELECT","TEXTAREA"]);function lI(e){return aI.has(e.tagName)||e.isContentEditable===!0}const $l=new WeakSet;function rx(e){return t=>{t.key==="Enter"&&e(t)}}function jd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const uI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=rx(()=>{if($l.has(n))return;jd(n,"down");const i=rx(()=>{jd(n,"up")}),s=()=>jd(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 ix(e){return mm(e)&&!bk()}const sx=new WeakSet;function cI(e,t,n={}){const[r,i,s]=kk(e,n),o=a=>{const l=a.currentTarget;if(!ix(a)||sx.has(a))return;$l.add(l),n.stopPropagation&&sx.add(a);const u=t(l,a),c=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),$l.has(l)&&$l.delete(l),ix(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{c(p,l===window||l===document||n.useGlobalTarget||_k(l,p.target))},h=p=>{c(p,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Bl(a)&&(a.addEventListener("focus",u=>uI(u,i)),!oI(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function gm(e){return Eb(e)&&"ownerSVGElement"in e}const Vl=new WeakMap;let gr;const Sk=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:gm(r)&&"getBBox"in r?r.getBBox()[t]:r[n],dI=Sk("inline","width","offsetWidth"),fI=Sk("block","height","offsetHeight");function hI({target:e,borderBoxSize:t}){var n;(n=Vl.get(e))==null||n.forEach(r=>{r(e,{get width(){return dI(e,t)},get height(){return fI(e,t)}})})}function pI(e){e.forEach(hI)}function mI(){typeof ResizeObserver>"u"||(gr=new ResizeObserver(pI))}function gI(e,t){gr||mI();const n=wk(e);return n.forEach(r=>{let i=Vl.get(r);i||(i=new Set,Vl.set(r,i)),i.add(t),gr==null||gr.observe(r)}),()=>{n.forEach(r=>{const i=Vl.get(r);i==null||i.delete(t),i!=null&&i.size||gr==null||gr.unobserve(r)})}}const Wl=new Set;let ds;function yI(){ds=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Wl.forEach(t=>t(e))},window.addEventListener("resize",ds)}function xI(e){return Wl.add(e),ds||yI(),()=>{Wl.delete(e),!Wl.size&&typeof ds=="function"&&(window.removeEventListener("resize",ds),ds=void 0)}}function ox(e,t){return typeof e=="function"?xI(e):gI(e,t)}function vI(e){return gm(e)&&e.tagName==="svg"}const wI=[...yk,$e,xn],bI=e=>wI.find(gk(e)),ax=()=>({translate:0,scale:1,origin:0,originPoint:0}),fs=()=>({x:ax(),y:ax()}),lx=()=>({min:0,max:0}),Ue=()=>({x:lx(),y:lx()}),kI=new WeakMap;function wc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function da(e){return typeof e=="string"||Array.isArray(e)}const ym=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xm=["initial",...ym];function bc(e){return wc(e.animate)||xm.some(t=>da(e[t]))}function Ck(e){return!!(bc(e)||e.variants)}function _I(e,t,n){for(const r in t){const i=t[r],s=n[r];if(et(i))e.addValue(r,i);else if(et(s))e.addValue(r,As(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,As(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const zu={current:null},vm={current:!1},SI=typeof window<"u";function Pk(){if(vm.current=!0,!!SI)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>zu.current=e.matches;e.addEventListener("change",t),t()}else zu.current=!1}const ux=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Fu={};function Ek(e){Fu=e}function CI(){return Fu}class PI{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=um,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=pt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,we.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=bc(n),this.isVariantNode=Ck(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];u[p]!==void 0&&et(m)&&m.set(u[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,kI.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:(vm.current||Pk(),this.shouldReduceMotion=zu.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(),Hr(this.notifyUpdate),Hr(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&&lk.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new ok({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:Ft(c)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=Ws.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&we.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Fu){const n=Fu[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):Ue()}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<ux.length;r++){const i=ux[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=_I(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=As(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"&&(Pb(r)||Tb(r))?r=parseFloat(r):!bI(r)&&xn.test(n)&&(r=vk(t,n)),this.setBaseTarget(t,et(r)?r.get():r)),et(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=fm(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&&!et(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 em),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){pm.render(this.render)}}class Tk extends PI{constructor(){super(...arguments),this.KeyframeResolver=tI}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;et(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class qr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function jk({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function EI({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function TI(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 Rd(e){return e===void 0||e===1}function Th({scale:e,scaleX:t,scaleY:n}){return!Rd(e)||!Rd(t)||!Rd(n)}function oi(e){return Th(e)||Rk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Rk(e){return cx(e.x)||cx(e.y)}function cx(e){return e&&e!=="0%"}function Ou(e,t,n){const r=e-n,i=t*r;return n+i}function dx(e,t,n,r,i){return i!==void 0&&(e=Ou(e,i,r)),Ou(e,n,r)+t}function jh(e,t=0,n=1,r,i){e.min=dx(e.min,t,n,r,i),e.max=dx(e.max,t,n,r,i)}function Ik(e,{x:t,y:n}){jh(e.x,t.translate,t.scale,t.originPoint),jh(e.y,n.translate,n.scale,n.originPoint)}const fx=.999999999999,hx=1.0000000000001;function jI(e,t,n,r=!1){var a;const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;l<i;l++){s=n[l],o=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(Mn(e.x,-s.scroll.offset.x),Mn(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ik(e,o)),r&&oi(s.latestValues)&&Ul(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<hx&&t.x>fx&&(t.x=1),t.y<hx&&t.y>fx&&(t.y=1)}function Mn(e,t){e.min+=t,e.max+=t}function px(e,t,n,r,i=.5){const s=ve(e.min,e.max,i);jh(e,t,n,s,r)}function mx(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Ul(e,t,n){const r=n??e;px(e.x,mx(t.x,r.x),t.scaleX,t.scale,t.originX),px(e.y,mx(t.y,r.y),t.scaleY,t.scale,t.originY)}function Mk(e,t){return jk(TI(e.getBoundingClientRect(),t))}function RI(e,t,n){const r=Mk(e,n),{scroll:i}=t;return i&&(Mn(r.x,i.offset.x),Mn(r.y,i.offset.y)),r}const II={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MI=Vs.length;function LI(e,t,n){let r="",i=!0;for(let o=0;o<MI;o++){const a=Vs[o],l=e[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=Eh(l,Nu[a]);if(!u){i=!1;const d=II[a]||a;r+=`${d}(${c}) `}n&&(t[a]=c)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${Eh(s,Nu.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function wm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Ws.has(l)){o=!0;continue}else if(Wb(l)){i[l]=u;continue}else{const c=Eh(u,Nu[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=LI(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}function Lk(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 gx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ho={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(q.test(e))e=parseFloat(e);else return e;const n=gx(e,t.target.x),r=gx(e,t.target.y);return`${n}% ${r}%`}},AI={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=xn.parse(e);if(i.length>5)return r;const s=xn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=ve(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},Rh={borderRadius:{...ho,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ho,borderTopRightRadius:ho,borderBottomLeftRadius:ho,borderBottomRightRadius:ho,boxShadow:AI};function Ak(e,{layout:t,layoutId:n}){return Ws.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Rh[e]||e==="opacity")}function bm(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)(et(r[a])||i&&et(i[a])||Ak(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function DI(e){return window.getComputedStyle(e)}class NI extends Tk{constructor(){super(...arguments),this.type="html",this.renderInstance=Lk}readValueFromInstance(t,n){var r;if(Ws.has(n))return(r=this.projection)!=null&&r.isProjecting?gh(n):rR(t,n);{const i=DI(t),s=(Wb(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Mk(t,n)}build(t,n,r){wm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return bm(t,n,r)}}const zI={offset:"stroke-dashoffset",array:"stroke-dasharray"},FI={offset:"strokeDashoffset",array:"strokeDasharray"};function OI(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?zI:FI;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const BI=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Dk(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(wm(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const p of BI)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&&OI(d,i,s,o,!1)}const Nk=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"]),zk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $I(e,t,n,r){Lk(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Nk.has(i)?i:hm(i),t.attrs[i])}function Fk(e,t,n){const r=bm(e,t,n);for(const i in e)if(et(e[i])||et(t[i])){const s=Vs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class VI extends Tk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ue}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ws.has(n)){const r=xk(n);return r&&r.default||0}return n=Nk.has(n)?n:hm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Fk(t,n,r)}build(t,n,r){Dk(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){$I(t,n,r,i)}mount(t){this.isSVGTag=zk(t.tagName),super.mount(t)}}const WI=xm.length;function Ok(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ok(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<WI;n++){const r=xm[n],i=e.props[r];(da(i)||i===!1)&&(t[r]=i)}return t}function Bk(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 UI=[...ym].reverse(),HI=ym.length;function GI(e){return t=>Promise.all(t.map(({animation:n,options:r})=>UR(e,n,r)))}function KI(e){let t=GI(e),n=yx(),r=!0,i=!1;const s=u=>(c,d)=>{var p;const h=bi(e,d,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:m,transitionEnd:y,...w}=h;c={...c,...w,...y}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=Ok(e.parent)||{},h=[],p=new Set;let m={},y=1/0;for(let g=0;g<HI;g++){const x=UI[g],v=n[x],b=c[x]!==void 0?c[x]:d[x],P=da(b),S=x===u?v.isActive:null;S===!1&&(y=g);let j=b===d[x]&&b!==c[x]&&P;if(j&&(r||i)&&e.manuallyAnimateOnMount&&(j=!1),v.protectedKeys={...m},!v.isActive&&S===null||!b&&!v.prevProp||wc(b)||typeof b=="boolean")continue;if(x==="exit"&&v.isActive&&S!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const C=YI(v.prevProp,b);let T=C||x===u&&v.isActive&&!j&&P||g>y&&P,E=!1;const I=Array.isArray(b)?b:[b];let M=I.reduce(s(x),{});S===!1&&(M={});const{prevResolvedValues:O={}}=v,B={...O,...M},F=L=>{T=!0,p.has(L)&&(E=!0,p.delete(L)),v.needsAnimating[L]=!0;const $=e.getValue(L);$&&($.liveStyle=!1)};for(const L in B){const $=M[L],k=O[L];if(m.hasOwnProperty(L))continue;let V=!1;kh($)&&kh(k)?V=!Bk($,k)||C:V=$!==k,V?$!=null?F(L):p.add(L):$!==void 0&&p.has(L)?F(L):v.protectedKeys[L]=!0}v.prevProp=b,v.prevResolvedValues=M,v.isActive&&(m={...m,...M}),(r||i)&&e.blockInitialAnimation&&(T=!1);const z=j&&C;T&&(!z||E)&&h.push(...I.map(L=>{const $={type:x};if(typeof L=="string"&&(r||i)&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:k}=e,V=bi(k,L);if(k.enteringChildren&&V){const{delayChildren:Q}=V.transition||{};$.delay=uk(k.enteringChildren,e,Q)}}return{animation:L,options:$}}))}if(p.size){const g={};if(typeof c.initial!="boolean"){const x=bi(e,Array.isArray(c.initial)?c.initial[0]:c.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&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,i=!1,w?t(h):Promise.resolve()}function l(u,c){var h;if(n[u].isActive===c)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(u,c)}),n[u].isActive=c;const d=a(u);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=yx(),i=!0}}}function YI(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Bk(t,e):!1}function Jr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function yx(){return{animate:Jr(!0),whileInView:Jr(),whileHover:Jr(),whileTap:Jr(),whileDrag:Jr(),whileFocus:Jr(),exit:Jr()}}function Ih(e,t){e.min=t.min,e.max=t.max}function cn(e,t){Ih(e.x,t.x),Ih(e.y,t.y)}function xx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const $k=1e-4,qI=1-$k,QI=1+$k,Vk=.01,XI=0-Vk,ZI=0+Vk;function mt(e){return e.max-e.min}function JI(e,t,n){return Math.abs(e-t)<=n}function vx(e,t,n,r=.5){e.origin=r,e.originPoint=ve(t.min,t.max,e.origin),e.scale=mt(n)/mt(t),e.translate=ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=qI&&e.scale<=QI||isNaN(e.scale))&&(e.scale=1),(e.translate>=XI&&e.translate<=ZI||isNaN(e.translate))&&(e.translate=0)}function zo(e,t,n,r){vx(e.x,t.x,n.x,r?r.originX:void 0),vx(e.y,t.y,n.y,r?r.originY:void 0)}function wx(e,t,n,r=0){const i=r?ve(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+mt(t)}function eM(e,t,n,r){wx(e.x,t.x,n.x,r==null?void 0:r.x),wx(e.y,t.y,n.y,r==null?void 0:r.y)}function bx(e,t,n,r=0){const i=r?ve(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+mt(t)}function Bu(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 kx(e,t,n,r,i){return e-=t,e=Ou(e,1/n,r),i!==void 0&&(e=Ou(e,1/i,r)),e}function tM(e,t=0,n=1,r=.5,i,s=e,o=e){if(Fn.test(t)&&(t=parseFloat(t),t=ve(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ve(s.min,s.max,r);e===s&&(a-=t),e.min=kx(e.min,t,n,a,i),e.max=kx(e.max,t,n,a,i)}function _x(e,t,[n,r,i],s,o){tM(e,t[n],t[r],t[i],t.scale,s,o)}const nM=["x","scaleX","originX"],rM=["y","scaleY","originY"];function Sx(e,t,n,r){_x(e.x,t,nM,n?n.x:void 0,r?r.x:void 0),_x(e.y,t,rM,n?n.y:void 0,r?r.y:void 0)}function Cx(e){return e.translate===0&&e.scale===1}function Wk(e){return Cx(e.x)&&Cx(e.y)}function Px(e,t){return e.min===t.min&&e.max===t.max}function iM(e,t){return Px(e.x,t.x)&&Px(e.y,t.y)}function Ex(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Uk(e,t){return Ex(e.x,t.x)&&Ex(e.y,t.y)}function Tx(e){return mt(e.x)/mt(e.y)}function jx(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function jn(e){return[e("x"),e("y")]}function sM(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,pathRotation:d,rotateX:h,rotateY:p,skewX:m,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),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 Hk=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],oM=Hk.length,Rx=e=>typeof e=="string"?parseFloat(e):e,Ix=e=>typeof e=="number"||q.test(e);function aM(e,t,n,r,i,s){i?(e.opacity=ve(0,n.opacity??1,lM(r)),e.opacityExit=ve(t.opacity??1,0,uM(r))):s&&(e.opacity=ve(t.opacity??1,n.opacity??1,r));for(let o=0;o<oM;o++){const a=Hk[o];let l=Mx(t,a),u=Mx(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ix(l)===Ix(u)?(e[a]=Math.max(ve(Rx(l),Rx(u),r),0),(Fn.test(u)||Fn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=ve(t.rotate||0,n.rotate||0,r))}function Mx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const lM=Gk(0,.5,zb),uM=Gk(.5,.95,nn);function Gk(e,t,n){return r=>r<e?0:r>t?1:n(ua(e,t,r))}function cM(e,t,n){const r=et(e)?e:As(e);return r.start(dm("",r,t,n)),r.animation}function fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const dM=(e,t)=>e.depth-t.depth;class fM{constructor(){this.children=[],this.isDirty=!1}add(t){Zp(this.children,t),this.isDirty=!0}remove(t){Iu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dM),this.isDirty=!1,this.children.forEach(t)}}function hM(e,t){const n=pt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Hr(r),e(s-t))};return we.setup(r,!0),()=>Hr(r)}function Hl(e){return et(e)?e.get():e}class pM{constructor(){this.members=[]}add(t){Zp(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&&(Iu(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Iu(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 Gl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Id=["","X","Y","Z"],mM=1e3;let gM=0;function Md(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Kk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Kk(r)}function Yk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=gM++,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(vM),this.nodes.forEach(CM),this.nodes.forEach(PM),this.nodes.forEach(wM)},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 fM)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new em),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=gm(o)&&!vI(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;we.read(()=>{d=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=hM(h,250),Gl.hasAnimatedSinceResize&&(Gl.hasAnimatedSinceResize=!1,this.nodes.forEach(Dx)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||IM,{onLayoutAnimationStart:y,onLayoutAnimationComplete:w}=u.getProps(),g=!this.targetLayout||!Uk(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={...cm(m,"layout"),onPlay:y,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x,v.path)}else d||Dx(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(),Hr(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(EM),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&&Kk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(kM),this.nodes.forEach(Lx);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ax);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(_M),this.nodes.forEach(SM),this.nodes.forEach(yM),this.nodes.forEach(xM)):this.nodes.forEach(Ax),this.clearAllSnapshots();const a=pt.now();Je.delta=On(0,1e3/60,a-Je.timestamp),Je.timestamp=a,Je.isProcessing=!0,_d.update.process(Je),_d.preRender.process(Je),_d.render.process(Je),Je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bM),this.sharedNodes.forEach(TM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!mt(this.snapshot.measuredBox.x)&&!mt(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=Ue()),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&&!Wk(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||oi(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),MM(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ue();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(LM))){const{scroll:c}=this.root;c&&(Mn(a.x,c.offset.x),Mn(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=Ue();if(cn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:h}=c;c!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&cn(a,o),Mn(a.x,d.offset.x),Mn(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var c,d;const u=l||Ue();cn(u,o);for(let h=0;h<this.path.length;h++){const p=this.path[h];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Mn(u.x,-p.scroll.offset.x),Mn(u.y,-p.scroll.offset.y)),oi(p.latestValues)&&Ul(u,p.latestValues,(c=p.layout)==null?void 0:c.layoutBox)}return oi(this.latestValues)&&Ul(u,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),u}removeTransform(o){var l;const a=Ue();cn(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!oi(c.latestValues))continue;let d;c.instance&&(Th(c.latestValues)&&c.updateSnapshot(),d=Ue(),cn(d,c.measurePageBox())),Sx(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,d)}return oi(this.latestValues)&&Sx(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!==Je.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:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=Je.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=Ue(),this.targetWithTransforms=Ue()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),eM(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):cn(this.target,this.layout.layoutBox),Ik(this.target,this.targetDelta)):cn(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||Th(this.parent.latestValues)||Rk(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=Ue(),this.relativeTargetOrigin=Ue(),Bu(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),cn(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===Je.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;cn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;jI(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=Ue());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xx(this.prevProjectionDelta.x,this.projectionDelta.x),xx(this.prevProjectionDelta.y,this.projectionDelta.y)),zo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!jx(this.projectionDelta.x,this.prevProjectionDelta.x)||!jx(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=fs(),this.projectionDelta=fs(),this.projectionDeltaWithTransform=fs()}setAnimationOrigin(o,a=!1,l){const u=this.snapshot,c=u?u.latestValues:{},d={...this.latestValues},h=fs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Ue(),m=u?u.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(RM));this.animationProgress=0;let b;const P=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=S=>{const j=S/1e3,C=P==null?void 0:P(j);C?(h.x.translate=C.x,h.x.scale=ve(o.x.scale,1,j),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=C.y,h.y.scale=ve(o.y.scale,1,j),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(Nx(h.x,o.x,j),Nx(h.y,o.y,j)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bu(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),jM(this.relativeTarget,this.relativeTargetOrigin,p,j),b&&iM(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Ue()),cn(b,this.relativeTarget)),w&&(this.animationValues=d,aM(d,c,this.latestValues,j,v,x)),C&&C.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=C.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Gl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=As(0)),this.motionValue.jump(0,!1),this.currentAnimation=cM(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(mM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&qk(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ue();const d=mt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=mt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}cn(a,l),Ul(a,c),zo(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new pM),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Md("z",o,u,this.animationValues);for(let c=0;c<Id.length;c++)Md(`rotate${Id[c]}`,o,u,this.animationValues),Md(`skew${Id[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Hl(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Hl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!oi(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=sM(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in Rh){if(c[m]===void 0)continue;const{correct:y,applyTo:w,isCSSVariable:g}=Rh[m],x=d==="none"?c[m]:y(c[m],u);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=u===this?Hl(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(Lx),this.root.sharedNodes.clear()}}}function yM(e){e.updateLayout()}function xM(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")jn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=mt(h);h.min=r[d].min,h.max=h.min+p});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";Ih(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else qk(s,t.layoutBox,r)&&jn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=mt(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=fs();zo(a,r,t.layoutBox);const l=fs();o?zo(l,e.applyTransform(i,!0),t.measuredBox):zo(l,r,t.layoutBox);const u=!Wk(a);let c=!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=Ue();Bu(y,t.layoutBox,h.layoutBox,m);const w=Ue();Bu(w,r,p.layoutBox,m),Uk(y,w)||(c=!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:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vM(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 wM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function bM(e){e.clearSnapshot()}function Lx(e){e.clearMeasurements()}function kM(e){e.isLayoutDirty=!0,e.updateLayout()}function Ax(e){e.isLayoutDirty=!1}function _M(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function SM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function CM(e){e.resolveTargetDelta()}function PM(e){e.calcProjection()}function EM(e){e.resetSkewAndRotation()}function TM(e){e.removeLeadSnapshot()}function Nx(e,t,n){e.translate=ve(t.translate,0,n),e.scale=ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zx(e,t,n,r){e.min=ve(t.min,n.min,r),e.max=ve(t.max,n.max,r)}function jM(e,t,n,r){zx(e.x,t.x,n.x,r),zx(e.y,t.y,n.y,r)}function RM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const IM={duration:.45,ease:[.4,0,.1,1]},Fx=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ox=Fx("applewebkit/")&&!Fx("chrome/")?Math.round:nn;function Bx(e){e.min=Ox(e.min),e.max=Ox(e.max)}function MM(e){Bx(e.x),Bx(e.y)}function qk(e,t,n){return e==="position"||e==="preserve-aspect"&&!JI(Tx(t),Tx(n),.2)}function LM(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const AM=Yk({attachResizeListener:(e,t)=>fa(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Ld={current:void 0},Qk=Yk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ld.current){const e=new AM({});e.mount(window),e.setOptions({layoutScroll:!0}),Ld.current=e}return Ld.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),km=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function $x(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function DM(...e){return t=>{let n=!1;const r=e.map(i=>{const s=$x(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():$x(e[i],null)}}}}function NM(...e){return _.useCallback(DM(...e),e)}class zM extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Bl(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Bl(r)&&r.offsetWidth||0,s=Bl(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 FM({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:u}=_.useContext(km),c=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=NM(a,c);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",P=n==="left"?b?`right: ${g}`:`left: ${w}`:b?`left: ${w}`:`right: ${g}`,S=r==="bottom"?`bottom: ${x}`:`top: ${y}`;a.current.dataset.motionPopId=o;const j=document.createElement("style");u&&(j.nonce=u);const C=i??document.head;return C.appendChild(j),j.sheet&&j.sheet.insertRule(`
|
|
58
|
+
[data-motion-pop-id="${o}"] {
|
|
59
|
+
position: absolute !important;
|
|
60
|
+
width: ${p}px !important;
|
|
61
|
+
height: ${m}px !important;
|
|
62
|
+
${P}px !important;
|
|
63
|
+
${S}px !important;
|
|
64
|
+
}
|
|
65
|
+
`),()=>{var T;(T=a.current)==null||T.removeAttribute("data-motion-pop-id"),C.contains(j)&&C.removeChild(j)}},[t]),f.jsx(zM,{isPresent:t,childRef:a,sizeRef:l,pop:s,children:s===!1?e:_.cloneElement(e,{ref:d})})}const OM=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=Xp(BM),d=_.useId();let h=!0,p=_.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:m=>{c.set(m,!0);for(const y of c.values())if(!y)return;r&&r()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,r]);return s&&h&&(p={...p}),_.useMemo(()=>{c.forEach((m,y)=>c.set(y,!1))},[n]),_.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=f.jsx(FM,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),f.jsx(xc.Provider,{value:p,children:e})};function BM(){return new Map}function Xk(e=!0){const t=_.useContext(xc);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 ol=e=>e.key||"";function Vx(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const kc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,d]=Xk(o),h=_.useMemo(()=>Vx(e),[e]),p=o&&!c?[]:h.map(ol),m=_.useRef(!0),y=_.useRef(h),w=Xp(()=>new Map),g=_.useRef(new Set),[x,v]=_.useState(h),[b,P]=_.useState(h);Cb(()=>{m.current=!1,y.current=h;for(let C=0;C<b.length;C++){const T=ol(b[C]);p.includes(T)?(w.delete(T),g.current.delete(T)):w.get(T)!==!0&&w.set(T,!1)}},[b,p.length,p.join("-")]);const S=[];if(h!==x){let C=[...h];for(let T=0;T<b.length;T++){const E=b[T],I=ol(E);p.includes(I)||(C.splice(T,0,E),S.push(E))}return s==="wait"&&S.length&&(C=S),P(Vx(C)),v(h),null}const{forceRender:j}=_.useContext(Qp);return f.jsx(f.Fragment,{children:b.map(C=>{const T=ol(C),E=o&&!c?!1:h===b||p.includes(T),I=()=>{if(g.current.has(T))return;if(w.has(T))g.current.add(T),w.set(T,!0);else return;let M=!0;w.forEach(O=>{O||(M=!1)}),M&&(j==null||j(),P(y.current),o&&(d==null||d()),r&&r())};return f.jsx(OM,{isPresent:E,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:E?void 0:I,anchorX:a,anchorY:l,children:C},T)})})},Zk=_.createContext({strict:!1}),Wx={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 Ux=!1;function $M(){if(Ux)return;const e={};for(const t in Wx)e[t]={isEnabled:n=>Wx[t].some(r=>!!n[r])};Ek(e),Ux=!0}function Jk(){return $M(),CI()}function VM(e){const t=Jk();for(const n in e)t[n]={...t[n],...e[n]};Ek(t)}const WM=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 $u(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||WM.has(e)}let e_=e=>!$u(e);function UM(e){typeof e=="function"&&(e_=t=>t.startsWith("on")?!$u(t):e(t))}try{UM(require("@emotion/is-prop-valid").default)}catch{}function HM(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||et(e[i])||(e_(i)||n===!0&&$u(i)||!t&&!$u(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const _c=_.createContext({});function GM(e,t){if(bc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||da(n)?n:void 0,animate:da(r)?r:void 0}}return e.inherit!==!1?t:{}}function KM(e){const{initial:t,animate:n}=GM(e,_.useContext(_c));return _.useMemo(()=>({initial:t,animate:n}),[Hx(t),Hx(n)])}function Hx(e){return Array.isArray(e)?e.join(" "):e}const _m=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function t_(e,t,n){for(const r in t)!et(t[r])&&!Ak(r,n)&&(e[r]=t[r])}function YM({transformTemplate:e},t){return _.useMemo(()=>{const n=_m();return wm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function qM(e,t){const n=e.style||{},r={};return t_(r,n,e),Object.assign(r,YM(e,t)),r}function QM(e,t){const n={},r=qM(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 n_=()=>({..._m(),attrs:{}});function XM(e,t,n,r){const i=_.useMemo(()=>{const s=n_();return Dk(s,t,zk(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};t_(s,e.style,e),i.style={...s,...i.style}}return i}const ZM=["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 Sm(e){return typeof e!="string"||e.includes("-")?!1:!!(ZM.indexOf(e)>-1||/[A-Z]/u.test(e))}function JM(e,t,n,{latestValues:r},i,s=!1,o){const l=(o??Sm(e)?XM:QM)(t,r,i,e),u=HM(t,typeof e=="string",s),c=e!==_.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=_.useMemo(()=>et(d)?d.get():d,[d]);return _.createElement(e,{...c,children:h})}function eL({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:tL(n,r,i,e),renderState:t()}}function tL(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=Hl(s[h]);let{initial:o,animate:a}=e;const l=bc(e),u=Ck(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!wc(d)){const h=Array.isArray(d)?d:[d];for(let p=0;p<h.length;p++){const m=fm(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=c?v.length-1:0;v=v[b]}v!==null&&(i[x]=v)}for(const x in y)i[x]=y[x]}}}return i}const r_=e=>(t,n)=>{const r=_.useContext(_c),i=_.useContext(xc),s=()=>eL(e,t,r,i);return n?s():Xp(s)},nL=r_({scrapeMotionValuesFromProps:bm,createRenderState:_m}),rL=r_({scrapeMotionValuesFromProps:Fk,createRenderState:n_}),iL=Symbol.for("motionComponentSymbol");function sL(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 i_=_.createContext({});function Qi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function oL(e,t,n,r,i,s){var v,b;const{visualElement:o}=_.useContext(_c),a=_.useContext(Zk),l=_.useContext(xc),u=_.useContext(km),c=u.reducedMotion,d=u.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:c,skipAnimations:d,isSVG:s}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,y=_.useContext(i_);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&aL(h.current,n,i,y);const w=_.useRef(!1);_.useInsertionEffect(()=>{m&&w.current&&m.update(n,l)});const g=n[hk],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 Cb(()=>{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 P;(P=window.MotionHandoffMarkAsComplete)==null||P.call(window,g)}),x.current=!1),m.enteringChildren=void 0)}),m}function aL(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:s_(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Qi(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function s_(e){if(e)return e.options.allowProjection!==!1?e.projection:s_(e.parent)}function Ad(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&VM(r);const s=n?n==="svg":Sm(e),o=s?rL:nL;function a(u,c){let d;const h={..._.useContext(km),...u,layoutId:lL(u)},{isStatic:p}=h,m=KM(u),y=o(u,p);if(!p&&typeof window<"u"){uL();const w=cL(h);d=w.MeasureLayout,m.visualElement=oL(e,y,h,i,w.ProjectionNode,s)}return f.jsxs(_c.Provider,{value:m,children:[d&&m.visualElement?f.jsx(d,{visualElement:m.visualElement,...h}):null,JM(e,u,sL(y,m.visualElement,c),y,p,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=_.forwardRef(a);return l[iL]=e,l}function lL({layoutId:e}){const t=_.useContext(Qp).id;return t&&e!==void 0?t+"-"+e:e}function uL(e,t){_.useContext(Zk).strict}function cL(e){const t=Jk(),{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 dL(e,t){if(typeof Proxy>"u")return Ad;const n=new Map,r=(s,o)=>Ad(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,Ad(o,void 0,e,t)),n.get(o))})}const fL=(e,t)=>t.isSVG??Sm(e)?new VI(t):new NI(t,{allowProjection:e!==_.Fragment});class hL extends qr{constructor(t){super(t),t.animationState||(t.animationState=KI(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();wc(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 pL=0;class mL extends qr{constructor(){super(...arguments),this.id=pL++,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=bi(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...d}=l;for(const h in d)(s=this.node.getValue(h))==null||s.jump(d[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const gL={animation:{Feature:hL},exit:{Feature:mL}};function Sa(e){return{point:{x:e.pageX,y:e.pageY}}}const yL=e=>t=>mm(t)&&e(t,Sa(t));function Fo(e,t,n,r){return fa(e,t,yL(n),r)}const o_=({current:e})=>e?e.ownerDocument.defaultView:null,Gx=(e,t)=>Math.abs(e-t);function xL(e,t){const n=Gx(e.x,t.x),r=Gx(e.y,t.y);return Math.sqrt(n**2+r**2)}const Kx=new Set(["auto","scroll"]);class a_{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=al(this.lastRawMoveEventInfo,this.transformPagePoint));const p=Dd(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=xL(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:w}=p,{timestamp:g}=Je;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=al(m,this.transformPagePoint),we.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=Dd(p.type==="pointercancel"?this.lastMoveEventInfo:al(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,x),w&&w(p,x)},!mm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=Sa(t),u=al(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=Je;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,Dd(u,this.history)),this.removeListeners=ba(Fo(this.contextWindow,"pointermove",this.handlePointerMove),Fo(this.contextWindow,"pointerup",this.handlePointerUp),Fo(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Kx.has(r.overflowX)||Kx.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-n.x,y:i.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),we.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Hr(this.updatePoint)}}function al(e,t){return t?{point:t(e.point)}:e}function Yx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Dd({point:e},t){return{point:e,delta:Yx(e,l_(t)),offset:Yx(e,vL(t)),velocity:wL(t,.1)}}function vL(e){return e[0]}function l_(e){return e[e.length-1]}function wL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=l_(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ft(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ft(t)*2&&(r=e[1]);const s=en(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 bL(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ve(n,e,r.max):Math.min(e,n)),e}function qx(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 kL(e,{top:t,left:n,bottom:r,right:i}){return{x:qx(e.x,n,i),y:qx(e.y,t,r)}}function Qx(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 _L(e,t){return{x:Qx(e.x,t.x),y:Qx(e.y,t.y)}}function SL(e,t){let n=.5;const r=mt(e),i=mt(t);return i>r?n=ua(t.min,t.max-r,e.min):r>i&&(n=ua(e.min,e.max-i,t.min)),On(0,1,n)}function CL(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 Mh=.35;function PL(e=Mh){return e===!1?e=0:e===!0&&(e=Mh),{x:Xx(e,"left","right"),y:Xx(e,"top","bottom")}}function Xx(e,t,n){return{min:Zx(e,t),max:Zx(e,n)}}function Zx(e,t){return typeof e=="number"?e:e[t]||0}const EL=new WeakMap;class TL{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=Ue(),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(Sa(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=nI(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),jn(g=>{let x=this.getAxisMotionValue(g).get()||0;if(Fn.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[g];b&&(x=mt(b)*(parseFloat(x)/100))}}this.originPoint[g]=x}),y&&we.update(()=>y(d,h),!1,!0),_h(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=RL(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&&we.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},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new a_(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:o_(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&we.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ll(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=bL(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&&Qi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=kL(r.layoutBox,t):this.constraints=!1,this.elastic=PL(n),i!==this.constraints&&!Qi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&jn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=CL(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Qi(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=RI(r,i.root,this.visualElement.getTransformPagePoint());let o=_L(i.layout.layoutBox,s);if(n){const a=n(EI(o));this.hasMutatedConstraints=!!a,a&&(o=jk(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=jn(c=>{if(!ll(c,n,this.currentDirection))return;let d=l&&l[c]||{};(o===!0||o===c)&&(d={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return _h(this.visualElement,t),r.start(dm(t,r,0,n,this.visualElement,!1))}stopAnimation(){jn(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){jn(n=>{const{drag:r}=this.getProps();if(!ll(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-ve(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Qi(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};jn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=SL({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(),jn(o=>{if(!ll(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(ve(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;EL.set(this.visualElement,this);const t=this.visualElement.current,n=Fo(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,p=h!==t&&lI(h);c&&d&&!p&&this.start(u)});let r;const i=()=>{const{dragConstraints:u}=this.getProps();Qi(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=jL(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),we.read(i);const a=fa(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(jn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Mh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Jx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function jL(e,t,n){const r=ox(e,Jx(n)),i=ox(t,Jx(n));return()=>{r(),i()}}function ll(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function RL(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class IL extends qr{constructor(t){super(t),this.removeGroupControls=nn,this.removeListeners=nn,this.controls=new TL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nn}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 Nd=e=>(t,n)=>{e&&we.update(()=>e(t,n),!1,!0)};class ML extends qr{constructor(){super(...arguments),this.removePointerDownListener=nn}onPointerDown(t){this.session=new a_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:o_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Nd(t),onStart:Nd(n),onMove:Nd(r),onEnd:(s,o)=>{delete this.session,i&&we.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Fo(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 zd=!1;class LL 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),zd&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Gl.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}),zd=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||we.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),pm.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;zd=!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 u_(e){const[t,n]=Xk(),r=_.useContext(Qp);return f.jsx(LL,{...e,layoutGroup:r,switchLayoutGroup:_.useContext(i_),isPresent:t,safeToRemove:n})}const AL={pan:{Feature:ML},drag:{Feature:IL,ProjectionNode:Qk,MeasureLayout:u_}};function e0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&we.postRender(()=>s(t,Sa(t)))}class DL extends qr{mount(){const{current:t}=this.node;t&&(this.unmount=iI(t,(n,r)=>(e0(this.node,r,"Start"),i=>e0(this.node,i,"End"))))}unmount(){}}class NL extends qr{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=ba(fa(this.node.current,"focus",()=>this.onFocus()),fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function t0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&we.postRender(()=>s(t,Sa(t)))}class zL extends qr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=cI(t,(i,s)=>(t0(this.node,s,"Start"),(o,{success:a})=>t0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Lh=new WeakMap,Fd=new WeakMap,FL=e=>{const t=Lh.get(e.target);t&&t(e)},OL=e=>{e.forEach(FL)};function BL({root:e,...t}){const n=e||document;Fd.has(n)||Fd.set(n,{});const r=Fd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(OL,{root:e,...t})),r[i]}function $L(e,t,n){const r=BL(t);return Lh.set(e,n),r.observe(e),()=>{Lh.delete(e),r.unobserve(e)}}const VL={some:0,all:1};class WL extends qr{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:VL[i]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=c?d:h;p&&p(u)};this.stopObserver=$L(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(UL(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function UL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const HL={inView:{Feature:WL},tap:{Feature:zL},focus:{Feature:NL},hover:{Feature:DL}},GL={layout:{ProjectionNode:Qk,MeasureLayout:u_}},KL={...gL,...HL,...AL,...GL},Ti=dL(KL,fL);function Ca(){!vm.current&&Pk();const[e]=_.useState(zu.current);return e}function Cm(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 Kl={stackPanelWidth:480,navIslandBottom:"1.5rem",navIslandHeight:"4.5rem",contentGap:"1.5rem"},pe={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 ot(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 YL={4:"1rem"};function Z(...e){return Aj(nj(e))}const qL={height:32,lineHeight:"32px",padding:"0 16px"},QL={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")`},XL={white:pe.bgBase,paper:pe.bgSurface,speckle:pe.bgSurface,parchment:pe.bgElevated,canvas:pe.canvasBase,kraft:pe.canvas300,chalkboard:pe.chalkboardBg},ZL={blue:"rgba(168, 200, 216, 0.35)",brown:"rgba(164, 144, 120, 0.35)",black:"rgba(61, 53, 43, 0.15)"};function Sc(e){const t=typeof e=="string"?{texture:e}:e,n=t.texture??"paper",r=t.ruledType??"none",i=t.ruledColor??"blue",s=QL[n],o=XL[n],a=ZL[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 Li(e,t="paper"){if(e!==!1)return Sc(e===!0?t:e)}function JL(e){const t=Pc((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=8+Math.round(n*6),i=50,s=50,o=46,a=2+n*14,l=[];for(let u=0;u<r;u++){const c=u/r*Math.PI*2+(t()-.5)*.15*n,d=o+(t()-.5)*a*2;l.push({x:i+Math.cos(c)*d,y:s+Math.sin(c)*d})}return Cc(l)}function eA(e,t){const n=Pc(`${e}-ring`),r=Math.max(0,Math.min(1,t??.5)),i=8+Math.round(r*6),s=50,o=50,a=49,l=2+r*14,u=[];for(let c=0;c<i;c++){const d=c/i*Math.PI*2+(n()-.5)*.15*r,h=a+(n()-.5)*l*2;u.push({x:s+Math.cos(d)*h,y:o+Math.sin(d)*h})}return Cc(u)}function tA(e){const t=Pc((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=3+Math.round(n*3),i=2,s=3+n*10,o=[],a=[{ax:i,ay:i,bx:100-i,by:i},{ax:100-i,ay:i,bx:100-i,by:100-i},{ax:100-i,ay:100-i,bx:i,by:100-i},{ax:i,ay:100-i,bx:i,by:i}];for(const l of a)for(let u=0;u<r;u++){const c=(u+.5)/r,d=l.ax+(l.bx-l.ax)*c,h=l.ay+(l.by-l.ay)*c,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 Cc(o)}function nA(e,t){const n=Pc(`${e}-ring`),r=Math.max(0,Math.min(1,t??.5)),i=3+Math.round(r*3),s=0,o=3+r*10,a=[],l=[{ax:s,ay:s,bx:100-s,by:s},{ax:100-s,ay:s,bx:100-s,by:100-s},{ax:100-s,ay:100-s,bx:s,by:100-s},{ax:s,ay:100-s,bx:s,by:s}];for(const u of l)for(let c=0;c<i;c++){const d=(c+.5)/i,h=u.ax+(u.bx-u.ax)*d,p=u.ay+(u.by-u.ay)*d,m=u.bx-u.ax,y=u.by-u.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 Cc(a)}function Cc(e){const t=e.length;if(t<3)return"";let n=`M ${cr(e[0].x)} ${cr(e[0].y)}`;for(let r=0;r<t;r++){const i=e[(r-1+t)%t],s=e[r],o=e[(r+1)%t],a=e[(r+2)%t],l=s.x+(o.x-i.x)/6,u=s.y+(o.y-i.y)/6,c=o.x-(a.x-s.x)/6,d=o.y-(a.y-s.y)/6;n+=` C ${cr(l)} ${cr(u)}, ${cr(c)} ${cr(d)}, ${cr(o.x)} ${cr(o.y)}`}return n+=" Z",n}function cr(e){return e.toFixed(2)}function Pc(e){let t=typeof e=="string"?rA(e):e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function rA(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 Ec(){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 Us(e){const t=Ec();return _.useMemo(()=>({blob:JL({seed:t,wobble:e}),ring:eA(t,e)}),[t,e])}const iA="button-module__button___Z331g",sA="button-module__blobBg___QQFzf",oA="button-module__blobFill___XwLjV",aA="button-module__blobRing___567UW",lA="button-module__isActive___FXNSJ",uA="button-module__primary___ppbyq",cA="button-module__secondary___esy5L",dA="button-module__ghost___NisA0",fA="button-module__danger___Wnvuq",hA="button-module__chalkboard___d3Nqb",pA="button-module__small___u7y8a",mA="button-module__medium___HBIAj",gA="button-module__large___RPzNy",yA="button-module__fullWidth___H0P0F",xA="button-module__iconLeft___s60SZ",vA="button-module__iconRight___75eFu",wA="button-module__label___pXAyM",Gt={button:iA,blobBg:sA,blobFill:oA,blobRing:aA,isActive:lA,primary:uA,secondary:cA,ghost:dA,danger:fA,chalkboard:hA,small:pA,medium:mA,large:gA,fullWidth:yA,iconLeft:xA,iconRight:vA,label:wA},le=_.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:u,...c},d){const h=Us(o);return f.jsxs("button",{ref:d,type:"button",className:Z(Gt.button,Gt[e],Gt[n],t==="chalkboard"&&Gt.chalkboard,a&&Gt.isActive,s&&Gt.fullWidth,u),...c,children:[f.jsxs("svg",{className:Gt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:h.blob,className:Gt.blobFill}),f.jsx("path",{d:h.ring,className:Gt.blobRing})]}),r&&f.jsx("span",{className:Gt.iconLeft,children:r}),f.jsx("span",{className:Gt.label,children:l}),i&&f.jsx("span",{className:Gt.iconRight,children:i})]})});function Pm(e){return{blue:e.accentBlue,green:e.accentGreen,amber:e.accentAmber,rose:e.accentRose,slate:e.accentSlate}}const Ye=Xj.generator(),bA="sketch-border-module__svg___whV4x",kA="sketch-border-module__behind___lgdYV",_A="sketch-border-module__stroke___vAm-v",SA="sketch-border-module__fill___zlpd6",ul={svg:bA,behind:kA,stroke:_A,fill:SA};function Bt({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:u=!0,className:c}){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.offsetWidth,P=x.offsetHeight;m(S=>S&&S.width===b&&S.height===P?S:{width:b,height:P})});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=C=>Ye.toPaths(Ye.path(C,{seed:x,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:i})).filter(T=>!T.fill||T.fill==="none").map(T=>({d:T.d,filled:!1}));if(l){const C={seed:x,roughness:n,bowing:r,strokeWidth:i,disableMultiStroke:!0},T=I=>Ye.toPaths(I).filter(M=>!M.fill||M.fill==="none").map(M=>({d:M.d,filled:!1}));if(a){const I=cl(e,p,s,t,Ui(v),n*1.1),M=u?n0(i,n):0,O=M?cl(e,p,s+M,t,Ui(v),n*1.1):I;return{parts:T(Ye.path(O,{...C,preserveVertices:!0})),clipPath:I}}const E=e==="circle"?Ye.ellipse(p.width/2,p.height/2,p.width-s*2,p.height-s*2,C):Ye.path(i0(p,s,t,Ui(x)),{...C,preserveVertices:!0});return{parts:T(E),clipPath:null}}if(a){const C=cl(e,p,s,t,Ui(v),n*1.1),T=u?n0(i,n):0,E=T?cl(e,p,s+T,t,Ui(v),n*1.1):C;return{parts:b(E),clipPath:C}}const P=(C,T)=>{const E=T?{fill:"#000",fillStyle:"solid"}:{},I=e==="circle"?Ye.ellipse(p.width/2,p.height/2,p.width-s*2,p.height-s*2,{seed:C,roughness:n,bowing:r,strokeWidth:i,...E}):Ye.path(i0(p,s,t,Ui(C)),{seed:C,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:i,...E});return Ye.toPaths(I)},S=o?P(v,!0).filter(C=>!!C.fill&&C.fill!=="none").map(C=>({d:C.d,filled:!0})):[],j=P(x,!1).filter(C=>!C.fill||C.fill==="none").map(C=>({d:C.d,filled:!1}));return{parts:[...S,...j],clipPath:null}},[p,d,a,l,e,t,n,r,i,s,o,u]);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:Z(ul.svg,o&&ul.behind,c),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:ul.fill,d:g.d},`f-${x}`):f.jsx("path",{className:ul.stroke,d:g.d,strokeWidth:i},`s-${x}`))})}function n0(e,t){return e/2+t*1.5}function Ui(e){let t=e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function cl(e,t,n,r,i,s){const o=t.width-n*2,a=t.height-n*2,l=t.width/2,u=t.height/2,c=()=>(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+c(),y:u+Math.sin(p)*a/2+c()})}else{const h=Math.max(2,Math.min(r,o/2,a/2)),p=n,m=n,y=(x,v,b)=>{for(const P of[0,45,90]){const S=(b+P)*Math.PI/180;d.push({x:x+Math.cos(S)*h+c(),y:v+Math.sin(S)*h+c()})}},w=(x,v,b,P)=>{const S=Math.hypot(b-x,P-v),j=Math.min(12,Math.max(1,Math.round(S/160)));for(let C=1;C<=j;C++){const T=C/(j+1);d.push({x:x+(b-x)*T+c(),y:v+(P-v)*T+c()})}};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 r0([...d.slice(g),...d.slice(0,g)])}return r0(d)}function r0(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],u=n(s,o),c=n(o,a),d=n(a,l),h=a.x-o.x+c*((o.x-s.x)/u-(a.x-s.x)/(u+c)),p=a.y-o.y+c*((o.y-s.y)/u-(a.y-s.y)/(u+c)),m=a.x-o.x+c*((l.x-a.x)/d-(l.x-o.x)/(c+d)),y=a.y-o.y+c*((l.y-a.y)/d-(l.y-o.y)/(c+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 i0(e,t,n,r){const i=[0,0,0,0].map(()=>Math.max(2,n+(r()-.5)*3));return CA(t,t,e.width-t*2,e.height-t*2,i)}function CA(e,t,n,r,i){const s=c=>Math.min(c,n/2,r/2),[o,a,l,u]=i.map(s);return[`M ${be(e+o)} ${be(t)}`,`L ${be(e+n-a)} ${be(t)}`,`Q ${be(e+n)} ${be(t)} ${be(e+n)} ${be(t+a)}`,`L ${be(e+n)} ${be(t+r-l)}`,`Q ${be(e+n)} ${be(t+r)} ${be(e+n-l)} ${be(t+r)}`,`L ${be(e+u)} ${be(t+r)}`,`Q ${be(e)} ${be(t+r)} ${be(e)} ${be(t+r-u)}`,`L ${be(e)} ${be(t+o)}`,`Q ${be(e)} ${be(t)} ${be(e+o)} ${be(t)}`,"Z"].join(" ")}function be(e){return e.toFixed(2)}const $t={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}},PA="page-module__page___-uHnG",EA="page-module__outlined___Wwtyg",TA="page-module__surface___sWfI6",jA="page-module__withAccent___lsv-m",RA="page-module__accentBlue___XxbMV",IA="page-module__accentGreen___Ne6Q8",MA="page-module__accentAmber___kLAwa",LA="page-module__accentRose___O9ZbZ",AA="page-module__accentSlate___xCB66",Co={page:PA,outlined:EA,surface:TA,withAccent:jA,accentBlue:RA,accentGreen:IA,accentAmber:MA,accentRose:LA,accentSlate:AA},DA=Pm(Co),NA={all:14,top:14,none:2};function c_({children:e,className:t,style:n,texture:r=!0,withAccent:i=!1,accentColor:s="blue",rounded:o="all",outline:a=!1}){const l=Li(r,{texture:"white",ruledType:"lines",ruledColor:"blue"})??{backgroundColor:"var(--pui-bg-base)"};return f.jsxs("div",{className:Z(Co.page,a&&Co.outlined,i&&Co.withAccent,i&&DA[s],t),style:n,children:[f.jsx(Bt,{clip:!0,...$t.surface,radius:NA[o]}),f.jsx("div",{className:Co.surface,style:l,children:e})]})}const zA="layout-module__layout___O1aWi",FA="layout-module__header___I-kxe",OA="layout-module__headerLeft___JChJQ",BA="layout-module__headerTitles___aqSUG",$A="layout-module__headerTitle___wvr39",VA="layout-module__headerSubtitle___6f5BD",WA="layout-module__headerActions___adC12",UA="layout-module__mobileToggle___4WpVG",HA="layout-module__body___tywNf",GA="layout-module__mobileOverlay___tzbBC",KA="layout-module__sidebar___8VKGq",YA="layout-module__sidebarOpen___47rtr",qA="layout-module__sidebarInner___tq2X6",QA="layout-module__logoArea___RLnC0",XA="layout-module__logoText___pAmfV",ZA="layout-module__nav___FxcrZ",JA="layout-module__main___9z7bu",eD="layout-module__navIslandFixed___H4TwP",tD="layout-module__content___jL-VB",nD="layout-module__contentWithPage___vVdfN",rD="layout-module__footer___LyakU",iD="layout-module__footerText___8BYxc",Ae={layout:zA,header:FA,headerLeft:OA,headerTitles:BA,headerTitle:$A,headerSubtitle:VA,headerActions:WA,mobileToggle:UA,body:HA,mobileOverlay:GA,sidebar:KA,sidebarOpen:YA,sidebarInner:qA,logoArea:QA,logoText:XA,nav:ZA,main:JA,navIslandFixed:eD,content:tD,contentWithPage:nD,footer:rD,footerText:iD};function sD(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"}:Sc(e)}function oD({children:e,showHeader:t=!0,showFooter:n=!1,showSidebar:r=!0,showPage:i=!0,background:s="paper",title:o,subtitle:a,headerActions:l,headerHeight:u,headerTexture:c,navigationItems:d=[],activeItemId:h,onNavigate:p,logo:m,footerContent:y,navigationIsland:w,style:g,bleedBottom:x=!0,routeKey:v,stackOpen:b}){const[P,S]=_.useState(!1),j=Ca();Cm(P,()=>S(!1));const C=sD(s),T=r&&d.length>0,E=u!==void 0||c!==void 0?{...c!==void 0?Sc(c):{},...u!==void 0?{height:typeof u=="number"?`${u}px`:u}:{}}:void 0;return f.jsxs("div",{className:Ae.layout,style:{...C,...g},children:[t&&f.jsxs("header",{className:Ae.header,style:E,children:[f.jsxs("div",{className:Ae.headerLeft,children:[T&&f.jsx("button",{type:"button",className:Ae.mobileToggle,onClick:()=>S(!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:Ae.headerTitles,children:[o&&f.jsx("h1",{className:Ae.headerTitle,children:o}),a&&f.jsx("span",{className:Ae.headerSubtitle,children:a})]})]}),l&&f.jsx("div",{className:Ae.headerActions,children:l})]}),f.jsxs("div",{className:Ae.body,children:[P&&f.jsx("button",{type:"button",className:Ae.mobileOverlay,onClick:()=>S(!1),"aria-label":"Close navigation",tabIndex:-1}),T&&f.jsx("aside",{className:Z(Ae.sidebar,P&&Ae.sidebarOpen),children:f.jsxs("div",{className:Ae.sidebarInner,children:[f.jsx("div",{className:Ae.logoArea,children:m||f.jsx("span",{className:Ae.logoText,children:"Paper UI"})}),f.jsx("nav",{className:Ae.nav,"aria-label":"Main navigation",children:d.map(I=>{const M=I.id===h;return f.jsx(le,{variant:"ghost",size:"small",isActive:M,onClick:()=>{p==null||p(I),S(!1)},"aria-current":M?"page":void 0,icon:I.icon,style:qL,children:I.label},I.id)})})]})}),f.jsx("div",{className:Ae.main,children:f.jsx("main",{className:i?Ae.contentWithPage:Ae.content,style:x?{paddingBottom:0}:void 0,children:(()=>{const I=v!==void 0?f.jsx(kc,{mode:"wait",children:f.jsx(Ti.div,{initial:j?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:j?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},style:{height:"100%"},children:e},v)}):e;return i?f.jsx(c_,{rounded:x?"top":"all",style:x&&w?{paddingBottom:`calc(${Kl.navIslandBottom} + ${Kl.navIslandHeight} + ${YL[4]})`}:void 0,children:I}):I})()})})]}),w&&f.jsx("div",{className:Ae.navIslandFixed,children:b!==void 0?f.jsx(Ti.div,{animate:{x:b?`-${Kl.stackPanelWidth/2}px`:0},transition:{duration:j?0:.3,ease:[.4,0,.2,1]},children:w}):w}),n&&f.jsx("footer",{className:Ae.footer,children:y||f.jsx("p",{className:Ae.footerText,children:"Paper UI — Natural Materials Component Library"})})]})}const aD="checkbox-module__wrapper___uLYMI",lD="checkbox-module__blobFill___mPJSR",uD="checkbox-module__input___Ptgt7",cD="checkbox-module__blobBg___bw3sn",dD="checkbox-module__labelLeft___-vAmH",fD="checkbox-module__box___yAh-r",hD="checkbox-module__checkmark___tTyBz",pD="checkbox-module__indeterminateLine___IosI-",mD="checkbox-module__boxWrapper___byjoS",gD="checkbox-module__icon___RO-yn",yD="checkbox-module__labelText___bAnLr",xD="checkbox-module__chalkboard___sv6SL",Mt={wrapper:aD,blobFill:lD,input:uD,blobBg:cD,labelLeft:dD,box:fD,checkmark:hD,indeterminateLine:pD,boxWrapper:mD,icon:gD,labelText:yD,chalkboard:xD},vD=_.forwardRef(function({label:e,labelPosition:t="right",indeterminate:n=!1,wobble:r=.4,surface:i="paper",className:s,checked:o,onChange:a,id:l,...u},c){const d=_.useId(),h=l??d,p=Us(r),m=_.useRef(null);return _.useEffect(()=>{m.current&&(m.current.indeterminate=n)},[n]),f.jsxs("label",{className:Z(Mt.wrapper,t==="left"&&Mt.labelLeft,i==="chalkboard"&&Mt.chalkboard,s),htmlFor:h,children:[f.jsxs("span",{className:Mt.boxWrapper,children:[f.jsx("input",{ref:y=>{m.current=y,typeof c=="function"?c(y):c&&(c.current=y)},id:h,type:"checkbox",className:Mt.input,checked:o,onChange:a,...u}),f.jsx("svg",{className:Mt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("path",{d:p.blob,className:Mt.blobFill})}),f.jsxs("span",{className:Mt.box,"aria-hidden":"true",children:[f.jsx(Bt,{smooth:!0,...$t.control}),n?f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Mt.icon,children:f.jsx("line",{x1:"4",y1:"10",x2:"16",y2:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:Mt.indeterminateLine})}):f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Mt.icon,children:f.jsx("path",{d:"M4 10 L8 14 L16 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:Mt.checkmark})})]})]}),e&&f.jsx("span",{className:Mt.labelText,children:e})]})}),wD="icon-button-module__iconButton___avg6i",bD="icon-button-module__blobBg___466Vy",kD="icon-button-module__blobFill___FTN1g",_D="icon-button-module__blobRing___hRdQb",SD="icon-button-module__isActive___XlvtM",CD="icon-button-module__icon___h204x",PD="icon-button-module__ghost___Wbxog",ED="icon-button-module__danger___p0Xz5",TD="icon-button-module__small___bPnCU",jD="icon-button-module__medium___nOxPf",RD="icon-button-module__large___UBU5z",ID="icon-button-module__chalkboard___mi0sQ",Hn={iconButton:wD,blobBg:bD,blobFill:kD,blobRing:_D,isActive:SD,icon:CD,default:"icon-button-module__default___9frNR",ghost:PD,danger:ED,small:TD,medium:jD,large:RD,chalkboard:ID},on=_.forwardRef(function({icon:e,variant:t="default",surface:n="paper",size:r="medium",label:i,wobble:s=.5,isActive:o=!1,className:a,...l},u){const c=Us(s);return f.jsxs("button",{ref:u,type:"button",className:Z(Hn.iconButton,Hn[t],n==="chalkboard"&&Hn.chalkboard,Hn[r],o&&Hn.isActive,a),"aria-label":i,title:i,...l,children:[f.jsxs("svg",{className:Hn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:c.blob,className:Hn.blobFill}),f.jsx("path",{d:c.ring,className:Hn.blobRing})]}),f.jsx("span",{className:Hn.icon,children:e})]})}),MD="stamp-module__stamp___5qaNY",LD="stamp-module__small___BBlBg",AD="stamp-module__medium___HG2YD",DD="stamp-module__large___aUT0I",ND="stamp-module__blobBg___Mdrdd",zD="stamp-module__blobFill___QyCeB",FD="stamp-module__blobRing___EUDx7",OD="stamp-module__dot___qZyCR",BD="stamp-module__label___T89iH",$D="stamp-module__chalkboard___syI4T",dr={stamp:MD,small:LD,medium:AD,large:DD,blobBg:ND,blobFill:zD,blobRing:FD,dot:OD,label:BD,chalkboard:$D},Od={neutral:{fill:ot(pe.accentSlate,.14),text:pe.accentSlateDark,ring:ot(pe.accentSlateDark,.35)},info:{fill:ot(pe.accentBlue,.14),text:pe.accentBlueDark,ring:ot(pe.accentBlueDark,.35)},success:{fill:ot(pe.accentGreen,.16),text:pe.accentGreenDark,ring:ot(pe.accentGreenDark,.35)},warning:{fill:ot(pe.accentAmber,.16),text:pe.accentAmberDark,ring:ot(pe.accentAmberDark,.4)},error:{fill:ot(pe.accentRose,.16),text:pe.accentRoseDark,ring:ot(pe.accentRoseDark,.35)}},s0={fill:ot(pe.chalkboardBorderBase,.1),ring:ot(pe.chalkboardBorderBase,.35)};function nt({children:e,size:t="medium",variant:n,dot:r=!1,fillColor:i,textColor:s,wobble:o=.3,surface:a="paper",className:l}){const u=Us(o),c=a==="chalkboard",d=n?c?s0.ring:Od[n].ring:void 0,h=i??(n?c?s0.fill:Od[n].fill:"transparent"),p=s??(n&&!c?Od[n].text:void 0);return f.jsxs("span",{className:Z(dr.stamp,dr[t],c&&dr.chalkboard,l),style:p?{color:p}:void 0,children:[f.jsxs("svg",{className:dr.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:u.blob,className:dr.blobFill,style:{fill:h}}),d&&f.jsx("path",{d:u.ring,className:dr.blobRing,style:{stroke:d}})]}),r&&f.jsx("span",{className:dr.dot,"aria-hidden":"true"}),f.jsx("span",{className:dr.label,children:e})]})}const VD="copy-button-module__copyButton___-hTo4",WD="copy-button-module__dark___O45N-",UD="copy-button-module__chalkboard___hW4aw",HD="copy-button-module__copied___XlHFr",dl={copyButton:VD,dark:WD,chalkboard:UD,copied:HD};function Ah({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:Z(dl.copyButton,t==="dark"&&dl.dark,n==="chalkboard"&&dl.chalkboard,s&&dl.copied,r),...i,children:s?"Copied!":"Copy"})}const GD="code-block-module__codeBlock___dq28o",KD="code-block-module__header___42Fek",YD="code-block-module__relative___oO-zy",qD="code-block-module__copyOverlay___PjAuq",QD="code-block-module__pre___zXzLZ",XD="code-block-module__chalkboard___bdo9J",ZD="code-block-module__chalkboardHeader___3RiVd",JD="code-block-module__chalkboardPre___iRBFR",fr={codeBlock:GD,header:KD,relative:YD,copyOverlay:qD,pre:QD,chalkboard:XD,chalkboardHeader:ZD,chalkboardPre:JD};function lW({code:e,filename:t,surface:n="paper"}){return f.jsxs("div",{className:Z(fr.codeBlock,n==="chalkboard"&&fr.chalkboard),children:[t&&f.jsxs("div",{className:Z(fr.header,n==="chalkboard"&&fr.chalkboardHeader),children:[f.jsx("span",{children:t}),f.jsx(Ah,{text:e,variant:"light",surface:n})]}),!t&&f.jsx("div",{className:fr.relative,children:f.jsx("div",{className:fr.copyOverlay,children:f.jsx(Ah,{text:e,variant:"dark",surface:n})})}),f.jsx("pre",{className:Z(fr.pre,n==="chalkboard"&&fr.chalkboardPre),children:f.jsx("code",{children:e})})]})}function Pa({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 eN({size:e=16}){return 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:"M9 18h6"}),f.jsx("path",{d:"M10 22h4"}),f.jsx("path",{d:"M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"})]})}function tN({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 nN({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 rN({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 iN({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 d_({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 sN="table-module__tableFrame___KP-90",oN="table-module__tableWrapper___gc3Y3",aN="table-module__toolbar___zhCel",lN="table-module__search___zIBk2",uN="table-module__searchIcon___ayhK8",cN="table-module__searchInput___PqsEG",dN="table-module__toolbarActions___EX6qS",fN="table-module__tableScroll___1gvc4",hN="table-module__table___tdU5g",pN="table-module__th___GQbKk",mN="table-module__td___WktB5",gN="table-module__tr___xeZno",yN="table-module__expandTh___uxkR4",xN="table-module__expandTd___VoBRC",vN="table-module__expandIcon___8V45X",wN="table-module__expandable___R7o2l",bN="table-module__expandedRow___1TbTQ",kN="table-module__expandedCell___sKAaD",_N="table-module__boardScroll___Y1yqm",SN="table-module__board___kFAI-",CN="table-module__boardColumn___-W9bP",PN="table-module__boardColumnHeader___kY3Fj",EN="table-module__accentBlue___PEJ1V",TN="table-module__accentGreen___wJ53r",jN="table-module__accentAmber___Iezjv",RN="table-module__accentRose___W8zxc",IN="table-module__accentSlate___oUZCX",MN="table-module__boardColumnLabel___JBEed",LN="table-module__boardColumnCount___Pkpiq",AN="table-module__boardColumnBody___uAgRF",DN="table-module__boardRow___C1P60",NN="table-module__boardEmpty___IKv2W",zN="table-module__chalkboardFrame___xB3N5",FN="table-module__chalkboardWrapper___KjY5r",ON="table-module__chalkboard___v0m3A",ae={tableFrame:sN,tableWrapper:oN,toolbar:aN,search:lN,searchIcon:uN,searchInput:cN,toolbarActions:dN,tableScroll:fN,table:hN,th:pN,td:mN,tr:gN,expandTh:yN,expandTd:xN,expandIcon:vN,expandable:wN,expandedRow:bN,expandedCell:kN,boardScroll:_N,board:SN,boardColumn:CN,boardColumnHeader:PN,accentBlue:EN,accentGreen:TN,accentAmber:jN,accentRose:RN,accentSlate:IN,boardColumnLabel:MN,boardColumnCount:LN,boardColumnBody:AN,boardRow:DN,boardEmpty:NN,chalkboardFrame:zN,chalkboardWrapper:FN,chalkboard:ON},BN=Pm(ae);function $N({data:e=[],columns:t=[],board:n,surface:r="paper",texture:i=!0,toolbar:s,expandable:o,showExpandColumn:a=!0,rowKey:l,rowClassName:u,className:c}){const d=Li(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:Z(ae.tableFrame,r==="chalkboard"&&ae.chalkboardFrame,c),children:[f.jsx(Bt,{clip:!0,...$t.surface}),f.jsxs("div",{className:Z(ae.tableWrapper,r==="chalkboard"&&ae.chalkboardWrapper),style:d,children:[h&&f.jsxs("div",{className:ae.toolbar,children:[s.search&&f.jsxs("div",{className:ae.search,children:[f.jsx(VN,{className:ae.searchIcon}),f.jsx("input",{type:"text",className:ae.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(Bt,{fill:!0,...$t.field})]}),s.actions&&f.jsx("div",{className:ae.toolbarActions,children:typeof s.actions=="function"?s.actions(r):s.actions})]}),n?f.jsx("div",{className:ae.boardScroll,children:f.jsx("div",{className:ae.board,children:n.map(x=>f.jsxs("div",{className:ae.boardColumn,children:[f.jsxs("div",{className:Z(ae.boardColumnHeader,r==="chalkboard"&&ae.chalkboard,x.accent&&BN[x.accent]),children:[f.jsx("span",{className:ae.boardColumnLabel,children:x.label}),f.jsx("span",{className:ae.boardColumnCount,children:x.items.length})]}),f.jsx("div",{className:ae.boardColumnBody,children:x.items.length===0?f.jsx("div",{className:ae.boardEmpty,children:x.emptyLabel??"empty"}):x.items.map((v,b)=>f.jsx("div",{className:Z(ae.boardRow,r==="chalkboard"&&ae.chalkboard),children:x.renderItem(v,b,r)},x.getKey?x.getKey(v,b):b))})]},x.key))})}):f.jsx("div",{className:ae.tableScroll,children:f.jsxs("table",{className:Z(ae.table,r==="chalkboard"&&ae.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:Z(ae.th,ae.expandTh),"aria-label":"Expand"}),t.map(x=>f.jsx("th",{className:ae.th,children:x.header},x.key))]})}),f.jsx("tbody",{children:e.map((x,v)=>{const b=l?l(x,v):v,P=o==null?void 0:o.render(x,v,r),S=!!P,j=S&&p.has(b);return f.jsxs(_.Fragment,{children:[f.jsxs("tr",{className:Z(ae.tr,S&&ae.expandable,u==null?void 0:u(x,v)),onClick:()=>S&&y(b),children:[w&&f.jsx("td",{className:Z(ae.td,ae.expandTd),children:S&&f.jsx("button",{type:"button",className:ae.expandIcon,"aria-expanded":j,"aria-label":j?"Collapse row":"Expand row",onClick:C=>{C.stopPropagation(),y(b)},children:f.jsx(d_,{size:14})})}),t.map(C=>f.jsx("td",{className:ae.td,children:C.cell(x,v,r)},C.key))]}),j&&f.jsx("tr",{className:ae.expandedRow,children:f.jsx("td",{colSpan:g,className:ae.expandedCell,children:P})})]},b)})})]})})]})]})}function VN({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 WN="card-module__borderLayer___WSpJq",UN="card-module__elevated___uhWj9",HN="card-module__textureLayer___Kcofz",GN="card-module__small___HXUTr",KN="card-module__withAccent___2t7bV",YN="card-module__accentBlue___a1KIq",qN="card-module__accentGreen___RNWoA",QN="card-module__accentAmber___uMhom",XN="card-module__accentRose___VPI3t",ZN="card-module__accentSlate___-l4jE",JN="card-module__chalkboard___bQ48O",ai={borderLayer:WN,default:"card-module__default___glPy-",elevated:UN,textureLayer:HN,small:GN,withAccent:KN,accentBlue:YN,accentGreen:qN,accentAmber:QN,accentRose:XN,accentSlate:ZN,chalkboard:JN},e3=Pm(ai);function We({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:Z(ai.borderLayer,ai[t],n==="chalkboard"&&ai.chalkboard,ai[r],s&&ai.withAccent,s&&e3[o],a),children:[f.jsx(Bt,{clip:!0,...$t.surface}),f.jsx("div",{className:ai.textureLayer,style:n==="chalkboard"?void 0:Li(i),children:e})]})}const t3="input-module__wrapper___xaEw6",n3="input-module__label___lu7R1",r3="input-module__field___khFpX",i3="input-module__input___h7K-F",s3="input-module__small___SkByh",o3="input-module__medium___0QPuV",a3="input-module__large___zGwRu",l3="input-module__error___QDqga",u3="input-module__disabled___K-5hi",c3="input-module__helperText___njeLH",d3="input-module__helperError___qDBpD",f3="input-module__chalkboard___Xh-5s",Sn={wrapper:t3,label:n3,field:r3,input:i3,small:s3,medium:o3,large:a3,error:l3,disabled:u3,helperText:c3,helperError:d3,chalkboard:f3},Tc=_.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a},l){const u=_.useId(),c=o??u;return f.jsxs("div",{className:Z(Sn.wrapper,i==="chalkboard"&&Sn.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:c,className:Sn.label,children:e}),f.jsxs("span",{className:Z(Sn.field,Sn[r],n&&Sn.error,a.disabled&&Sn.disabled),children:[f.jsx("input",{ref:l,id:c,className:Sn.input,...a}),f.jsx(Bt,{fill:!0,...$t.field})]}),t&&f.jsx("span",{className:Z(Sn.helperText,n&&Sn.helperError),children:t})]})}),h3="select-module__wrapper___Hc5F3",p3="select-module__label___ay-3s",m3="select-module__nativeSelect___UA2d-",g3="select-module__trigger___xMYHi",y3="select-module__open___w3mbZ",x3="select-module__triggerLabel___ihpER",v3="select-module__placeholder___0VOFP",w3="select-module__small___iU9W9",b3="select-module__chevron___0dCTg",k3="select-module__medium___B-XBN",_3="select-module__large___iII2c",S3="select-module__chevronOpen___cFOYe",C3="select-module__error___P5RBk",P3="select-module__dropdown___Q-uK3",E3="select-module__slideDown___sT374",T3="select-module__options___HmrQ0",j3="select-module__option___vNnue",R3="select-module__optionDisabled___ex2zq",I3="select-module__optionSelected___tAFjn",M3="select-module__optionHighlighted___zYQLq",L3="select-module__helperText___r5gyn",A3="select-module__helperError___ydSPT",D3="select-module__chalkboard___sXBw8",ze={wrapper:h3,label:p3,nativeSelect:m3,trigger:g3,open:y3,triggerLabel:x3,placeholder:v3,small:w3,chevron:b3,medium:k3,large:_3,chevronOpen:S3,error:C3,dropdown:P3,slideDown:E3,options:T3,option:j3,optionDisabled:R3,optionSelected:I3,optionHighlighted:M3,helperText:L3,helperError:A3,chalkboard:D3};function f_({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",options:s,placeholder:o,value:a,defaultValue:l,onChange:u,name:c,disabled:d=!1,width:h,texture:p=!1,className:m}){const y=_.useId(),[w,g]=_.useState(!1),[x,v]=_.useState(-1),[b,P]=_.useState(l??""),[S,j]=_.useState(null),C=_.useRef(null),T=_.useRef(null),E=a!==void 0,I=E?a:b,M=s.find(k=>k.value===I),O=(M==null?void 0:M.label)??o??"Select...",B=_.useCallback(()=>{if(d)return;g(!0);const k=s.findIndex(V=>V.value===I);v(k>=0?k:0)},[d,s,I]),F=_.useCallback(()=>{g(!1),v(-1)},[]),z=_.useCallback(k=>{var V;k.disabled||(E||P(k.value),u==null||u(k.value),F(),(V=C.current)==null||V.focus())},[E,u,F]),D=_.useCallback(k=>{if(!d)switch(k.key){case"Enter":case" ":k.preventDefault(),w&&x>=0?z(s[x]):B();break;case"Escape":k.preventDefault(),w&&F();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&&F();break}},[d,w,x,s,B,F,z]);_.useEffect(()=>{if(!w)return;const k=V=>{var Q,R;const ue=V.target;(Q=C.current)!=null&&Q.contains(ue)||(R=T.current)!=null&&R.contains(ue)||F()};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[w,F]),_.useEffect(()=>{if(!w||x<0||!T.current)return;const k=T.current.querySelector(`[data-option-index="${x}"]`);k==null||k.scrollIntoView({block:"nearest"})},[w,x]),_.useEffect(()=>{if(!w){j(null);return}const k=()=>{if(!C.current)return;const V=C.current.getBoundingClientRect();if(V.bottom<0||V.top>window.innerHeight){F();return}j(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,F]);const L=Li(p),$=L?{"--sketch-fill":L.backgroundColor}:void 0;return f.jsxs("div",{className:Z(ze.wrapper,i==="chalkboard"&&ze.chalkboard,m),style:h?{width:typeof h=="number"?`${h}px`:h}:void 0,children:[e&&f.jsx("label",{htmlFor:y,className:ze.label,children:e}),f.jsxs("select",{id:y,name:c,className:ze.nativeSelect,value:I,onChange:k=>u==null?void 0:u(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:C,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:Z(ze.trigger,ze[r],n&&ze.error,w&&ze.open,d&&ze.disabled),onClick:()=>w?F():B(),onKeyDown:D,disabled:d,children:[f.jsx("span",{className:Z(ze.triggerLabel,!M&&ze.placeholder),children:O}),f.jsx(N3,{className:Z(ze.chevron,w&&ze.chevronOpen)}),f.jsx(Bt,{fill:!0,...$t.field})]}),w&&S&&Fs.createPortal(f.jsxs("div",{ref:T,id:`${y}-listbox`,role:"listbox",tabIndex:-1,className:ze.dropdown,style:{...$,position:"fixed",top:S.bottom+6,left:S.left,width:S.width},onKeyDown:k=>{var V;k.key==="Escape"&&(k.preventDefault(),F(),(V=C.current)==null||V.focus())},children:[f.jsx(Bt,{fill:!0,...$t.surface}),f.jsx("div",{className:ze.options,children:s.map((k,V)=>f.jsx("div",{id:`${y}-option-${V}`,role:"option","aria-selected":k.value===I,tabIndex:-1,"data-option-index":V,className:Z(ze.option,k.value===I&&ze.optionSelected,V===x&&ze.optionHighlighted,k.disabled&&ze.optionDisabled),onClick:Q=>{Q.stopPropagation(),z(k)},onMouseEnter:()=>v(V),children:k.label},k.value))})]}),document.body),t&&f.jsx("span",{className:Z(ze.helperText,n&&ze.helperError),children:t})]})}function N3({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 h_({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 z3="alert-module__alert___j7ZRS",F3="alert-module__surface___IaVgU",O3="alert-module__iconWrapper___kLoxT",B3="alert-module__message___klR2U",$3="alert-module__dismiss___f2uoG",V3="alert-module__info___PBo1l",W3="alert-module__success___AVBKS",U3="alert-module__warning___zkMaJ",H3="alert-module__error___cxg96",G3="alert-module__chalkboard___7pgWk",ei={alert:z3,surface:F3,iconWrapper:O3,message:B3,dismiss:$3,info:V3,success:W3,warning:U3,error:H3,chalkboard:G3};function Xi({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:Z(ei.alert,ei[t],a&&ei.chalkboard,o),role:t==="warning"||t==="error"?"alert":"status",children:[f.jsx(Bt,{clip:!0,...$t.surface}),f.jsx("div",{className:ei.surface,style:a?void 0:Li(r)}),f.jsx("span",{className:ei.iconWrapper,children:f.jsx(h_,{variant:t})}),f.jsx("div",{className:ei.message,children:e}),i&&f.jsx("button",{type:"button",className:ei.dismiss,onClick:s,"aria-label":"Dismiss alert",children:f.jsx(Pa,{size:16})})]})}const K3="modal-module__overlay___a52Ni",Y3="modal-module__fadeIn___5OWd5",q3="modal-module__backdrop___RS4yj",Q3="modal-module__modal___ZioOV",X3="modal-module__slideUp___vfFrm",Z3="modal-module__small___hcxwF",J3="modal-module__medium___mjbM5",ez="modal-module__large___1dzyf",tz="modal-module__header___iP09B",nz="modal-module__title___nj06m",rz="modal-module__close___gQou9",iz="modal-module__body___Y-EdA",sz="modal-module__chalkboard___qY8qo",Gn={overlay:K3,fadeIn:Y3,backdrop:q3,modal:Q3,slideUp:X3,small:Z3,medium:J3,large:ez,header:tz,title:nz,close:rz,body:iz,chalkboard:sz},oz='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function Ea({open:e,onClose:t,title:n,children:r,size:i="medium",surface:s="paper",texture:o=!1,className:a}){const l=_.useId(),u=_.useRef(null),c=_.useRef(null);if(Cm(e,t),_.useEffect(()=>{var h;if(!e)return;c.current=document.activeElement,(h=u.current)==null||h.focus();const p=y=>{var w;if(y.key!=="Tab")return;const g=(w=u.current)==null?void 0:w.querySelectorAll(oz);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=c.current)==null?void 0:y.focus)==null||w.call(y)}},[e]),!e||typeof document>"u")return null;const d=Li(o);return Fs.createPortal(f.jsxs("div",{className:Gn.overlay,children:[f.jsx("button",{type:"button",className:Gn.backdrop,"aria-label":"Close modal",onClick:t}),f.jsxs("div",{ref:u,className:Z(Gn.modal,Gn[i],s==="chalkboard"&&Gn.chalkboard,a),style:d,role:"dialog","aria-modal":"true","aria-labelledby":n?l:void 0,tabIndex:-1,children:[f.jsxs("div",{className:Gn.header,children:[n&&f.jsx("h2",{id:l,className:Gn.title,children:n}),f.jsx("button",{type:"button",className:Gn.close,onClick:t,"aria-label":"Close modal",children:f.jsx(Pa,{size:18})})]}),f.jsx("div",{className:Gn.body,children:r})]})]}),document.body)}const az="textarea-module__wrapper___NbiNO",lz="textarea-module__label___ejhyZ",uz="textarea-module__field___KluQf",cz="textarea-module__textarea___0y-7v",dz="textarea-module__resizeGrip___lONlE",fz="textarea-module__small___yPyr8",hz="textarea-module__medium___ezQxA",pz="textarea-module__large___xfeKi",mz="textarea-module__error___EkXKJ",gz="textarea-module__disabled___9CKbb",yz="textarea-module__helperText___l1sPh",xz="textarea-module__helperError___VfTLy",vz="textarea-module__chalkboard___zZ0X0",dn={wrapper:az,label:lz,field:uz,textarea:cz,resizeGrip:dz,small:fz,medium:hz,large:pz,error:mz,disabled:gz,helperText:yz,helperError:xz,chalkboard:vz},wz=48,Ta=_.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a},l){const u=_.useId(),c=o??u,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(wz,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:Z(dn.wrapper,i==="chalkboard"&&dn.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:c,className:dn.label,children:e}),f.jsxs("span",{className:Z(dn.field,dn[r],n&&dn.error,a.disabled&&dn.disabled),children:[f.jsx("textarea",{ref:h,id:c,className:dn.textarea,...a}),f.jsx(Bt,{fill:!0,...$t.field}),!a.disabled&&f.jsx("span",{className:dn.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:Z(dn.helperText,n&&dn.helperError),children:t})]})}),bz="progress-module__track___a5BMO",kz="progress-module__svg___3U0-E",o0={track:bz,svg:kz},Bd=300,hr=1;function _z({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(Ec()*1e6)),u=a?ot(pe.chalkboardBorderBase,.16):ot(pe.textPrimary,.12),c=n??(a?pe.chalkboardChalk:pe.textSecondary),d=_.useMemo(()=>Ye.toPaths(Ye.rectangle(hr,hr,Bd-hr*2,r-hr*2,{seed:l,roughness:2.2,fill:u,fillStyle:"solid",stroke:u,strokeWidth:1.5})),[l,u,r]),h=Math.max(o/100*(Bd-hr*2),0),p=_.useMemo(()=>h>0?Ye.toPaths(Ye.rectangle(hr,hr,h,r-hr*2,{seed:l+1,roughness:2,fill:c,fillStyle:"solid",stroke:c,strokeWidth:1})):[],[l,c,h,r]);return f.jsx("div",{className:Z(o0.track,s),style:{height:r,borderRadius:r/2},children:f.jsxs("svg",{className:o0.svg,viewBox:`0 0 ${Bd} ${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 Sz(e){const t=Ec();return _.useMemo(()=>({blob:tA({seed:t,wobble:e}),ring:nA(t,e)}),[t,e])}const Cz="list-item-module__listItem___-tw9O",Pz="list-item-module__clickable___GLJmd",Ez="list-item-module__blobBg___O3Mzh",Tz="list-item-module__blobFill___dXHk1",jz="list-item-module__blobRing___S9mas",Rz="list-item-module__active___UsL8O",Iz="list-item-module__small___9dphK",Mz="list-item-module__medium___yGZCr",Lz="list-item-module__icon___2b4wU",Az="list-item-module__label___SIzJ4",Dz="list-item-module__action___qGh0-",Nz="list-item-module__chalkboard___qpWuM",Kt={listItem:Cz,static:"list-item-module__static___qtEX6",clickable:Pz,blobBg:Ez,blobFill:Tz,blobRing:jz,active:Rz,small:Iz,medium:Mz,icon:Lz,label:Az,action:Dz,chalkboard:Nz};function Vu({active:e=!1,icon:t,action:n,size:r="medium",wobble:i=.5,surface:s="paper",children:o,className:a,...l}){const u=Sz(i),c=!!l.onClick;return f.jsxs("button",{type:"button",className:Z(Kt.listItem,Kt[r],c&&Kt.clickable,!c&&!e&&Kt.static,e&&Kt.active,s==="chalkboard"&&Kt.chalkboard,a),"aria-current":e?"page":void 0,...l,children:[f.jsxs("svg",{className:Kt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:u.blob,className:Kt.blobFill}),f.jsx("path",{d:u.ring,className:Kt.blobRing})]}),t&&f.jsx("span",{className:Kt.icon,children:t}),f.jsx("span",{className:Kt.label,children:o}),n&&f.jsx("span",{className:Kt.action,children:n})]})}const zz="accordion-module__accordion___mqGl-",Fz="accordion-module__header___mLfbd",Oz="accordion-module__icon___Z90NR",Bz="accordion-module__title___HusgG",$z="accordion-module__content___1K0td",Vz="accordion-module__chalkboard___am8r4",Wz="accordion-module__expanded___836xG",ti={accordion:zz,header:Fz,icon:Oz,title:Bz,content:$z,chalkboard:Vz,expanded:Wz};function p_({title:e,children:t,expanded:n=!1,onToggle:r,surface:i="paper",className:s}){return f.jsxs("div",{className:Z(ti.accordion,n&&ti.expanded,i==="chalkboard"&&ti.chalkboard,s),children:[f.jsxs("button",{type:"button",className:ti.header,onClick:r,"aria-expanded":n,children:[f.jsx("span",{className:ti.icon,"aria-hidden":"true",children:f.jsx(d_,{size:14})}),f.jsx("span",{className:ti.title,children:e})]}),n&&f.jsx("div",{className:ti.content,children:t})]})}const Uz="icon-module__icon___2vrJz",Hz="icon-module__blobBg___ENPYJ",Gz="icon-module__blobFill___IPbwQ",Kz="icon-module__blobRing___1awqV",Yz="icon-module__content___TaZR6",qz="icon-module__small___Xp--F",Qz="icon-module__medium___tCjMB",Xz="icon-module__large___vBtP7",Hi={icon:Uz,blobBg:Hz,blobFill:Gz,blobRing:Kz,content:Yz,small:qz,medium:Qz,large:Xz},Zz={small:20,medium:24,large:28};function Jz({icon:e,size:t="medium",wobble:n=.5,fillColor:r,className:i}){const s=Us(n),o=Zz[t];return f.jsxs("span",{className:Z(Hi.icon,Hi[t],i),children:[f.jsxs("svg",{className:Hi.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:s.blob,className:Hi.blobFill,style:r?{fill:r}:void 0}),f.jsx("path",{d:s.ring,className:Hi.blobRing})]}),f.jsx("span",{className:Hi.content,style:{width:o,height:o},children:e})]})}const eF="radio-module__wrapper___BB05E",tF="radio-module__blobFill___p5BX4",nF="radio-module__labelLeft___ijB93",rF="radio-module__input___M2nFJ",iF="radio-module__box___H7ofS",sF="radio-module__dot___jVJ-d",oF="radio-module__boxWrapper___Y3qis",aF="radio-module__blobBg___IR-M5",lF="radio-module__labelText___I-nu3",uF="radio-module__chalkboard___IIBqI",Cn={wrapper:eF,blobFill:tF,labelLeft:nF,input:rF,box:iF,dot:sF,boxWrapper:oF,blobBg:aF,labelText:lF,chalkboard:uF};_.forwardRef(function({label:e,labelPosition:t="right",wobble:n=.4,surface:r="paper",className:i,checked:s,onChange:o,id:a,...l},u){const c=_.useId(),d=a??c,h=Us(n);return f.jsxs("label",{className:Z(Cn.wrapper,t==="left"&&Cn.labelLeft,r==="chalkboard"&&Cn.chalkboard,i),htmlFor:d,children:[f.jsxs("span",{className:Cn.boxWrapper,children:[f.jsx("input",{ref:u,id:d,type:"radio",className:Cn.input,checked:s,onChange:o,...l}),f.jsx("svg",{className:Cn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("path",{d:h.blob,className:Cn.blobFill})}),f.jsxs("span",{className:Cn.box,"aria-hidden":"true",children:[f.jsx(Bt,{smooth:!0,shape:"circle",...$t.control}),f.jsx("span",{className:Cn.dot})]})]}),e&&f.jsx("span",{className:Cn.labelText,children:e})]})});const cF="switch-module__wrapper___5-2P1",dF="switch-module__labelLeft___WlT-N",fF="switch-module__input___YKZRj",hF="switch-module__track___QNvnO",pF="switch-module__thumb___cunvF",mF="switch-module__small___WPIxc",gF="switch-module__medium___yPulW",yF="switch-module__large___VlKV1",xF="switch-module__labelText___9Qg39",vF="switch-module__chalkboard___qKTMz",pr={wrapper:cF,labelLeft:dF,input:fF,track:hF,thumb:pF,small:mF,medium:gF,large:yF,labelText:xF,chalkboard:vF},wF=_.forwardRef(function({label:e,labelPosition:t="right",size:n="medium",surface:r="paper",className:i,checked:s,onChange:o,id:a,...l},u){const c=_.useId(),d=a??c;return f.jsxs("label",{className:Z(pr.wrapper,pr[n],t==="left"&&pr.labelLeft,r==="chalkboard"&&pr.chalkboard,i),htmlFor:d,children:[f.jsx("input",{ref:u,id:d,type:"checkbox",className:pr.input,checked:s,onChange:o,...l}),f.jsxs("span",{className:pr.track,"aria-hidden":"true",children:[f.jsx(Bt,{...$t.pill}),f.jsx("span",{className:pr.thumb})]}),e&&f.jsx("span",{className:pr.labelText,children:e})]})}),bF="spinner-module__spinner___FDTk2",kF="spinner-module__chalkboard___DLE1z",_F="spinner-module__svg___JnCWN",SF="spinner-module__track___xbnbo",CF="spinner-module__head___j5dWe",po={spinner:bF,chalkboard:kF,svg:_F,track:SF,head:CF},PF={small:18,medium:28,large:40},a0=25,EF=18,l0=Ye.toPaths(Ye.circle(a0,a0,EF*2,{seed:7,roughness:1.15,disableMultiStroke:!0})).map(e=>e.d).join(" ");function Wu({size:e="medium",color:t,label:n="Loading",surface:r="paper",className:i}){const s=PF[e];return f.jsx("span",{className:Z(po.spinner,r==="chalkboard"&&po.chalkboard,i),role:"status","aria-label":n,children:f.jsxs("svg",{width:s,height:s,viewBox:"0 0 50 50",className:po.svg,style:t?{color:t}:void 0,"aria-hidden":"true",children:[f.jsx("path",{className:po.track,d:l0,fill:"none",pathLength:100,strokeLinecap:"round"}),f.jsx("path",{className:po.head,d:l0,fill:"none",pathLength:100,strokeLinecap:"round"})]})})}const TF="skeleton-module__skeleton___HCSvg",jF="skeleton-module__pulse___6eCq1",RF="skeleton-module__svg___OzxGp",IF="skeleton-module__text___v17Nv",MF="skeleton-module__rect___wqIJy",LF="skeleton-module__circle___RCmyR",$d={skeleton:TF,pulse:jF,svg:RF,text:IF,rect:MF,circle:LF},u0={text:[0,0,200,24],rect:[0,0,200,100],circle:[0,0,40,40]},Gi=2;function Pn({variant:e="text",width:t,height:n,surface:r="paper",className:i,style:s}){const o=r==="chalkboard",a=Math.max(1,Math.round(Ec()*1e6)),l=o?ot(pe.chalkboardBorderBase,.16):ot(pe.textPrimary,.09),u=_.useMemo(()=>{const[,,c,d]=u0[e],h=e==="circle"?Ye.ellipse(c/2,d/2,c-Gi*2,d-Gi*2,{seed:a,roughness:1.5,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1}):Ye.rectangle(Gi,Gi,c-Gi*2,d-Gi*2,{seed:a,roughness:1.4,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1});return Ye.toPaths(h)},[e,a,l]);return f.jsx("span",{className:Z($d.skeleton,$d[e],i),style:{width:t,height:n,...s},"aria-hidden":"true",children:f.jsx("svg",{className:$d.svg,viewBox:u0[e].join(" "),preserveAspectRatio:"none","aria-hidden":"true",children:u.map((c,d)=>f.jsx("path",{d:c.d,stroke:c.stroke,strokeWidth:c.strokeWidth,fill:c.fill},d))})})}const AF="divider-module__horizontal___tP3rG",DF="divider-module__line___KnBes",NF="divider-module__label___WiUwZ",zF="divider-module__vertical___wBSrT",FF="divider-module__chalkboard___gXTde",Ki={horizontal:AF,line:DF,label:NF,vertical:zF,chalkboard:FF};function c0({orientation:e="horizontal",label:t,surface:n="paper",className:r}){const i=n==="chalkboard"&&Ki.chalkboard;return e==="vertical"?f.jsx("span",{className:Z(Ki.vertical,i,r),role:"separator","aria-orientation":"vertical"}):f.jsxs("div",{className:Z(Ki.horizontal,i,r),role:"separator",children:[f.jsx("span",{className:Ki.line}),t!=null&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:Ki.label,children:t}),f.jsx("span",{className:Ki.line})]})]})}const OF="tooltip-module__wrapper___XeVNe",BF="tooltip-module__tooltip___e-rkz",$F="tooltip-module__tooltipIn___CZbRw",VF="tooltip-module__top___78WWU",WF="tooltip-module__bottom___Irl3O",UF="tooltip-module__left___C1Ec4",HF="tooltip-module__right___oUA-Z",GF="tooltip-module__chalkboard___Um6dx",fl={wrapper:OF,tooltip:BF,tooltipIn:$F,top:VF,bottom:WF,left:UF,right:HF,chalkboard:GF},hl=8,pl=8,KF=typeof window>"u"?_.useEffect:_.useLayoutEffect;function YF(e,t,n){let r,i;switch(t){case"bottom":r=e.bottom+hl,i=e.left+e.width/2-n.width/2;break;case"left":r=e.top+e.height/2-n.height/2,i=e.left-hl-n.width;break;case"right":r=e.top+e.height/2-n.height/2,i=e.right+hl;break;default:r=e.top-hl-n.height,i=e.left+e.width/2-n.width/2}return i=Math.min(Math.max(i,pl),window.innerWidth-n.width-pl),r=Math.min(Math.max(r,pl),window.innerHeight-n.height-pl),{top:r,left:i}}function lt({content:e,children:t,placement:n="top",delay:r=300,disabled:i=!1,surface:s="paper"}){const o=_.useId(),[a,l]=_.useState(!1),[u,c]=_.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||u),P=()=>{clearTimeout(v.current),v.current=setTimeout(()=>l(!0),r)},S=()=>{clearTimeout(v.current),l(!1),h(!1)},j=()=>{h(!1),c(!0)},C=()=>{c(!1),h(!1)};Cm(b,()=>h(!0)),_.useEffect(()=>{if(!b){m(null);return}const E=()=>{g.current&&m(g.current.getBoundingClientRect())};return E(),window.addEventListener("scroll",E,{capture:!0,passive:!0}),window.addEventListener("resize",E,{passive:!0}),()=>{window.removeEventListener("scroll",E,{capture:!0}),window.removeEventListener("resize",E)}},[b]),KF(()=>{if(!b){w(null);return}const E=x.current;E&&w({width:E.offsetWidth,height:E.offsetHeight})},[b,e,n]),_.useEffect(()=>()=>clearTimeout(v.current),[]);const T=t.props;return f.jsxs("span",{ref:g,className:fl.wrapper,onMouseEnter:P,onMouseLeave:S,onFocus:j,onBlur:C,children:[_.cloneElement(t,{"aria-describedby":b?o:T["aria-describedby"]}),b&&p&&typeof document<"u"&&Fs.createPortal(f.jsx("span",{ref:x,id:o,role:"tooltip",className:Z(fl.tooltip,fl[n],s==="chalkboard"&&fl.chalkboard),style:y?{position:"fixed",...YF(p,n,y)}:{position:"fixed",top:0,left:0,visibility:"hidden"},children:e}),document.body)]})}const qF="toast-module__stack___hDi0s",QF="toast-module__topLeft___Luw-F",XF="toast-module__topCenter___N1DwF",ZF="toast-module__topRight___Dtgau",JF="toast-module__bottomLeft___Eb2lo",eO="toast-module__bottomCenter___gs-Yb",tO="toast-module__bottomRight___-0e2j",nO="toast-module__item___RFjtm",rO="toast-module__toastIn___9m9iN",iO="toast-module__card___ZCvJS",sO="toast-module__surface___mfMl0",oO="toast-module__iconWrapper___lnjcC",aO="toast-module__content___AlliM",lO="toast-module__title___1Oqh8",uO="toast-module__description___eiUSB",cO="toast-module__dismiss___tUGx4",dO="toast-module__info___Nh8S9",fO="toast-module__success___hlKLc",hO="toast-module__warning___XUMJt",pO="toast-module__error___pSFFC",mO="toast-module__chalkboard___c49gt",Yt={stack:qF,topLeft:QF,topCenter:XF,topRight:ZF,bottomLeft:JF,bottomCenter:eO,bottomRight:tO,item:nO,toastIn:rO,card:iO,surface:sO,iconWrapper:oO,content:aO,title:lO,description:uO,dismiss:cO,info:dO,success:fO,warning:hO,error:pO,chalkboard:mO};function gO({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),u=t==="chalkboard",c=e.variant==="warning"||e.variant==="error"?"alert":"status";return f.jsx("div",{className:Yt.item,onMouseEnter:a,onMouseLeave:l,children:f.jsxs("div",{className:Z(Yt.card,Yt[e.variant],u&&Yt.chalkboard),role:c,children:[f.jsx(Bt,{clip:!0,...$t.surface}),f.jsx("div",{className:Yt.surface,style:u?void 0:Li("kraft")}),f.jsx("span",{className:Yt.iconWrapper,children:f.jsx(h_,{variant:e.variant})}),f.jsxs("div",{className:Yt.content,children:[e.title&&f.jsx("div",{className:Yt.title,children:e.title}),f.jsx("div",{className:Yt.description,children:e.description})]}),f.jsx("button",{type:"button",className:Yt.dismiss,onClick:()=>n(e.id),"aria-label":"Dismiss notification",children:f.jsx(Pa,{size:16})})]})})}const m_=_.createContext(null);function yO(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function xO({children:e,position:t="bottom-right",surface:n="paper",defaultDuration:r=5e3}){const[i,s]=_.useState([]),o=_.useRef(0),a=_.useCallback(c=>{s(d=>d.filter(h=>h.id!==c))},[]),l=_.useCallback(c=>{o.current+=1;const d=`toast-${o.current}`;return s(h=>[...h,{id:d,title:c.title,description:c.description,variant:c.variant??"info",duration:c.duration??r}]),d},[r]),u=t.startsWith("top")?[...i].reverse():i;return f.jsxs(m_.Provider,{value:{toast:l,dismiss:a},children:[e,typeof document<"u"&&Fs.createPortal(f.jsx("div",{className:Z(Yt.stack,Yt[yO(t)]),role:"region","aria-label":"Notifications",children:u.map(c=>f.jsx(gO,{record:c,surface:n,onDismiss:a},c.id))}),document.body)]})}function wn(){const e=_.useContext(m_);if(!e)throw new Error("useToast must be used within a <ToastProvider>");return e}const vO="breadcrumb-module__breadcrumb___r-ILp",wO="breadcrumb-module__list___V3YFy",bO="breadcrumb-module__item___dDwYf",kO="breadcrumb-module__link___CHC9k",_O="breadcrumb-module__linkButton___XoMW-",SO="breadcrumb-module__current___dprI9",CO="breadcrumb-module__separator___uLhtn",PO="breadcrumb-module__chalkboard___COJpw",En={breadcrumb:vO,list:wO,item:bO,link:kO,linkButton:_O,current:SO,static:"breadcrumb-module__static___affaf",separator:CO,chalkboard:PO};function d0({items:e,surface:t="paper",className:n}){return f.jsx("nav",{"aria-label":"Breadcrumb",className:Z(En.breadcrumb,t==="chalkboard"&&En.chalkboard,n),children:f.jsx("ol",{className:En.list,children:e.map((r,i)=>{const s=i===e.length-1;return f.jsxs("li",{className:En.item,children:[s?f.jsx("span",{className:En.current,"aria-current":"page",children:r.label}):r.href?f.jsx("a",{href:r.href,className:En.link,onClick:r.onClick,children:r.label}):r.onClick?f.jsx("button",{type:"button",className:Z(En.link,En.linkButton),onClick:r.onClick,children:r.label}):f.jsx("span",{className:En.static,children:r.label}),!s&&f.jsx(EO,{className:En.separator})]},r.id)})})})}function EO({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"})})}const Ie={serif:"'Luminari', 'Cormorant Garamond', Georgia, serif",body:"'Cormorant Garamond', Georgia, serif",handwritten:"'Caveat', cursive",mono:"'JetBrains Mono', monospace"},A={1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem"},ne={"2xs":"0.75rem",xs:"0.875rem",sm:"1rem",base:"1.125rem",md:"1.25rem",lg:"1.5rem"},Uu={tight:1.2,normal:1.5,relaxed:1.7},ie={textPrimary:"#1A1917",textProse:"#1C1B18",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"},g_={sidebarWidth:224,stackPanelWidth:480};function TO(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const jO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,RO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IO={};function f0(e,t){return(IO.jsx?RO:jO).test(e)}const MO=/[ \t\n\f\r]/g;function LO(e){return typeof e=="object"?e.type==="text"?h0(e.value):!1:h0(e)}function h0(e){return e.replace(MO,"")===""}class ja{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ja.prototype.normal={};ja.prototype.property={};ja.prototype.space=void 0;function y_(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ja(n,r,t)}function Dh(e){return e.toLowerCase()}class jt{constructor(t,n){this.attribute=n,this.property=t}}jt.prototype.attribute="";jt.prototype.booleanish=!1;jt.prototype.boolean=!1;jt.prototype.commaOrSpaceSeparated=!1;jt.prototype.commaSeparated=!1;jt.prototype.defined=!1;jt.prototype.mustUseProperty=!1;jt.prototype.number=!1;jt.prototype.overloadedBoolean=!1;jt.prototype.property="";jt.prototype.spaceSeparated=!1;jt.prototype.space=void 0;let AO=0;const te=Ai(),Be=Ai(),Nh=Ai(),H=Ai(),xe=Ai(),ki=Ai(),Lt=Ai();function Ai(){return 2**++AO}const zh=Object.freeze(Object.defineProperty({__proto__:null,boolean:te,booleanish:Be,commaOrSpaceSeparated:Lt,commaSeparated:ki,number:H,overloadedBoolean:Nh,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),Vd=Object.keys(zh);class Em extends jt{constructor(t,n,r,i){let s=-1;if(super(t,n),p0(this,"space",i),typeof r=="number")for(;++s<Vd.length;){const o=Vd[s];p0(this,Vd[s],(r&zh[o])===zh[o])}}}Em.prototype.defined=!0;function p0(e,t,n){n&&(e[t]=n)}function Hs(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Em(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Dh(r)]=r,n[Dh(s.attribute)]=r}return new ja(t,n,e.space)}const x_=Hs({properties:{ariaActiveDescendant:null,ariaAtomic:Be,ariaAutoComplete:null,ariaBusy:Be,ariaChecked:Be,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:Be,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:Be,ariaFlowTo:xe,ariaGrabbed:Be,ariaHasPopup:null,ariaHidden:Be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:H,ariaLive:null,ariaModal:Be,ariaMultiLine:Be,ariaMultiSelectable:Be,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Be,ariaReadOnly:Be,ariaRelevant:null,ariaRequired:Be,ariaRoleDescription:xe,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Be,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 v_(e,t){return t in e?e[t]:t}function w_(e,t){return v_(e,t.toLowerCase())}const DO=Hs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ki,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:te,allowPaymentRequest:te,allowUserMedia:te,alpha:te,alt:null,as:null,async:te,autoCapitalize:null,autoComplete:xe,autoFocus:te,autoPlay:te,blocking:xe,capture:null,charSet:null,checked:te,cite:null,className:xe,closedBy:null,colorSpace:null,cols:H,colSpan:H,command:null,commandFor:null,content:null,contentEditable:Be,controls:te,controlsList:xe,coords:H|ki,crossOrigin:null,data:null,dateTime:null,decoding:null,default:te,defer:te,dir:null,dirName:null,disabled:te,download:Nh,draggable:Be,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:te,formTarget:null,headers:xe,height:H,hidden:Nh,high:H,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:te,inputMode:null,integrity:null,is:null,isMap:te,itemId:null,itemProp:xe,itemRef:xe,itemScope:te,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:te,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:te,muted:te,name:null,nonce:null,noModule:te,noValidate:te,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:te,optimum:H,pattern:null,ping:xe,placeholder:null,playsInline:te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:te,referrerPolicy:null,rel:xe,required:te,reversed:te,rows:H,rowSpan:H,sandbox:xe,scope:null,scoped:te,seamless:te,selected:te,shadowRootClonable:te,shadowRootCustomElementRegistry:te,shadowRootDelegatesFocus:te,shadowRootMode:null,shadowRootSerializable:te,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Be,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:te,useMap:null,value:Be,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,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:te,declare:te,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:te,noHref:te,noShade:te,noWrap:te,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Be,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:te,disablePictureInPicture:te,disableRemotePlayback:te,exportParts:ki,part:xe,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:w_}),NO=Hs({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:Lt,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:xe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:te,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:ki,g2:ki,glyphName:ki,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:Lt,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:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Lt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Lt,rev:Lt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Lt,requiredFeatures:Lt,requiredFonts:Lt,requiredFormats:Lt,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:Lt,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:Lt,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:Lt,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:v_}),b_=Hs({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()}}),k_=Hs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:w_}),__=Hs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zO={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"},FO=/[A-Z]/g,m0=/-[a-z]/g,OO=/^data[-\w.:]+$/i;function BO(e,t){const n=Dh(t);let r=t,i=jt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&OO.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(m0,VO);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!m0.test(s)){let o=s.replace(FO,$O);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Em}return new i(r,t)}function $O(e){return"-"+e.toLowerCase()}function VO(e){return e.charAt(1).toUpperCase()}const WO=y_([x_,DO,b_,k_,__],"html"),Tm=y_([x_,NO,b_,k_,__],"svg");function UO(e){return e.join(" ").trim()}var jm={},g0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,HO=/\n/g,GO=/^\s*/,KO=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,YO=/^:\s*/,qO=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,QO=/^[;\s]*/,XO=/^\s+|\s+$/g,ZO=`
|
|
66
|
+
`,y0="/",x0="*",li="",JO="comment",eB="declaration";function tB(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(HO);y&&(n+=y.length);var w=m.lastIndexOf(ZO);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),u(),y}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function l(m){var y=m.exec(e);if(y){var w=y[0];return i(w),e=e.slice(w.length),y}}function u(){l(GO)}function c(m){var y;for(m=m||[];y=d();)y!==!1&&m.push(y);return m}function d(){var m=s();if(!(y0!=e.charAt(0)||x0!=e.charAt(1))){for(var y=2;li!=e.charAt(y)&&(x0!=e.charAt(y)||y0!=e.charAt(y+1));)++y;if(y+=2,li===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:JO,comment:w})}}function h(){var m=s(),y=l(KO);if(y){if(d(),!l(YO))return a("property missing ':'");var w=l(qO),g=m({type:eB,property:v0(y[0].replace(g0,li)),value:w?v0(w[0].replace(g0,li)):li});return l(QO),g}}function p(){var m=[];c(m);for(var y;y=h();)y!==!1&&(m.push(y),c(m));return m}return u(),p()}function v0(e){return e?e.replace(XO,li):li}var nB=tB,rB=Xl&&Xl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jm,"__esModule",{value:!0});jm.default=sB;const iB=rB(nB);function sB(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,iB.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 jc={};Object.defineProperty(jc,"__esModule",{value:!0});jc.camelCase=void 0;var oB=/^--[a-zA-Z0-9_-]+$/,aB=/-([a-z])/g,lB=/^[^-]+$/,uB=/^-(webkit|moz|ms|o|khtml)-/,cB=/^-(ms)-/,dB=function(e){return!e||lB.test(e)||oB.test(e)},fB=function(e,t){return t.toUpperCase()},w0=function(e,t){return"".concat(t,"-")},hB=function(e,t){return t===void 0&&(t={}),dB(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(cB,w0):e=e.replace(uB,w0),e.replace(aB,fB))};jc.camelCase=hB;var pB=Xl&&Xl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mB=pB(jm),gB=jc;function Fh(e,t){var n={};return!e||typeof e!="string"||(0,mB.default)(e,function(r,i){r&&i&&(n[(0,gB.camelCase)(r,t)]=i)}),n}Fh.default=Fh;var yB=Fh;const xB=qu(yB),S_=C_("end"),Rm=C_("start");function C_(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 vB(e){const t=Rm(e),n=S_(e);if(t&&n)return{start:t,end:n}}function Oo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?b0(e.position):"start"in e||"end"in e?b0(e):"line"in e||"column"in e?Oh(e):""}function Oh(e){return k0(e&&e.line)+":"+k0(e&&e.column)}function b0(e){return Oh(e&&e.start)+"-"+Oh(e&&e.end)}function k0(e){return e&&typeof e=="number"?e:1}class dt 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=Oo(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}}dt.prototype.file="";dt.prototype.name="";dt.prototype.reason="";dt.prototype.message="";dt.prototype.stack="";dt.prototype.column=void 0;dt.prototype.line=void 0;dt.prototype.ancestors=void 0;dt.prototype.cause=void 0;dt.prototype.fatal=void 0;dt.prototype.place=void 0;dt.prototype.ruleId=void 0;dt.prototype.source=void 0;const Im={}.hasOwnProperty,wB=new Map,bB=/[A-Z]/g,kB=new Set(["table","tbody","thead","tfoot","tr"]),_B=new Set(["td","th"]),P_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function SB(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=MB(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=IB(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"?Tm:WO,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=E_(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function E_(e,t,n){if(t.type==="element")return CB(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return PB(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return TB(e,t,n);if(t.type==="mdxjsEsm")return EB(e,t);if(t.type==="root")return jB(e,t,n);if(t.type==="text")return RB(e,t)}function CB(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Tm,e.schema=i),e.ancestors.push(t);const s=j_(e,t.tagName,!1),o=LB(e,t);let a=Lm(e,t);return kB.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!LO(l):!0})),T_(e,o,s,t),Mm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function PB(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ha(e,t.position)}function EB(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ha(e,t.position)}function TB(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Tm,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:j_(e,t.name,!0),o=AB(e,t),a=Lm(e,t);return T_(e,o,s,t),Mm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function jB(e,t,n){const r={};return Mm(r,Lm(e,t)),e.create(t,e.Fragment,r,n)}function RB(e,t){return t.value}function T_(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Mm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function IB(e,t,n){return r;function r(i,s,o,a){const u=Array.isArray(o.children)?n:t;return a?u(s,o,a):u(s,o)}}function MB(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Rm(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 LB(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Im.call(t.properties,i)){const s=DB(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&_B.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 AB(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ha(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else ha(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Lm(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:wB;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;o=l+"-"+u,i.set(l,u+1)}}const a=E_(e,s,o);a!==void 0&&n.push(a)}return n}function DB(e,t,n){const r=BO(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?TO(n):UO(n)),r.property==="style"){let i=typeof n=="object"?n:NB(e,String(n));return e.stylePropertyNameCase==="css"&&(i=zB(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?zO[r.property]||r.property:r.attribute,n]}}function NB(e,t){try{return xB(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new dt("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=P_+"#cannot-parse-style-attribute",i}}function j_(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=f0(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=f0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Im.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ha(e)}function ha(e,t){const n=new dt("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=P_+"#cannot-handle-mdx-estrees-without-createevaluater",n}function zB(e){const t={};let n;for(n in e)Im.call(e,n)&&(t[FB(n)]=e[n]);return t}function FB(e){let t=e.replace(bB,OB);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function OB(e){return"-"+e.toLowerCase()}const Wd={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"]},BB={};function $B(e,t){const n=BB,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return R_(e,r,i)}function R_(e,t,n){if(VB(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 _0(e.children,t,n)}return Array.isArray(e)?_0(e,t,n):""}function _0(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=R_(e[i],t,n);return r.join("")}function VB(e){return!!(e&&typeof e=="object")}const S0=document.createElement("i");function Am(e){const t="&"+e+";";S0.innerHTML=t;const n=S0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Bn(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 Zt(e,t){return e.length>0?(Bn(e,e.length,0,t),e):t}const C0={}.hasOwnProperty;function WB(e){const t={};let n=-1;for(;++n<e.length;)UB(t,e[n]);return t}function UB(e,t){let n;for(n in t){const i=(C0.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){C0.call(i,o)||(i[o]=[]);const a=s[o];HB(i[o],Array.isArray(a)?a:a?[a]:[])}}}function HB(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Bn(e,0,0,r)}function I_(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 bs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const An=Qr(/[A-Za-z]/),Nt=Qr(/[\dA-Za-z]/),GB=Qr(/[#-'*+\--9=?A-Z^-~]/);function Bh(e){return e!==null&&(e<32||e===127)}const $h=Qr(/\d/),KB=Qr(/[\dA-Fa-f]/),YB=Qr(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Et(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const qB=Qr(new RegExp("\\p{P}|\\p{S}","u")),QB=Qr(/\s/);function Qr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Gs(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Nt(e.charCodeAt(n+1))&&Nt(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 _e(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return he(l)?(e.enter(n),a(l)):t(l)}function a(l){return he(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const XB={tokenize:ZB};function ZB(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"),_e(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return J(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const JB={tokenize:e4},P0={tokenize:t4};function e4(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,u)(v)}return u(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const b=t.events.length;let P=b,S;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){S=t.events[P][1].end;break}g(r);let j=b;for(;j<t.events.length;)t.events[j][1].end={...S},j++;return Bn(t.events,P+1,0,t.events.slice(b)),t.events.length=j,u(v)}return a(v)}function u(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(P0,c,d)(v)}function c(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(P0,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 J(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),y)}function w(v,b){const P=t.sliceStream(v);if(b&&P.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(P),t.parser.lazy[v.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<o&&(!i.events[S][1].end||i.events[S][1].end.offset>o))return;const j=t.events.length;let C=j,T,E;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(T){E=t.events[C][1].end;break}T=!0}for(g(r),S=j;S<t.events.length;)t.events[S][1].end={...E},S++;Bn(t.events,C+1,0,t.events.slice(j)),t.events.length=S}}function g(v){let b=n.length;for(;b-- >v;){const P=n[b];t.containerState=P[1],P[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 t4(e,t,n){return _e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function E0(e){if(e===null||Et(e)||QB(e))return 1;if(qB(e))return 2}function Dm(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 Vh={name:"attention",resolveAll:n4,tokenize:r4};function n4(e,t){let n=-1,r,i,s,o,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};T0(d,-l),T0(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Zt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Zt(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),u=Zt(u,Dm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Zt(u,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Zt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Bn(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function r4(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=E0(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const u=e.exit("attentionSequence"),c=E0(l),d=!c||c===2&&i||n.includes(l),h=!i||i===2&&c||n.includes(r);return u._open=!!(s===42?d:d&&(i||!h)),u._close=!!(s===42?h:h&&(c||!d)),t(l)}}function T0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const i4={name:"autolink",tokenize:s4};function s4(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 An(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||Nt(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Nt(p))&&r++<32?(e.consume(p),a):(r=0,u(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||Bh(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),c):GB(p)?(e.consume(p),u):n(p)}function c(p){return Nt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):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||Nt(p))&&r++<63){const m=p===45?h:d;return e.consume(p),m}return n(p)}}const Rc={partial:!0,tokenize:o4};function o4(e,t,n){return r;function r(s){return he(s)?_e(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||J(s)?t(s):n(s)}}const M_={continuation:{tokenize:l4},exit:u4,name:"blockQuote",tokenize:a4};function a4(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return he(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function l4(e,t,n){const r=this;return i;function i(o){return he(o)?_e(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(M_,t,n)(o)}}function u4(e){e.exit("blockQuote")}const L_={name:"characterEscape",tokenize:c4};function c4(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 YB(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const A_={name:"characterReference",tokenize:d4};function d4(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,o=Nt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=KB,c):(e.enter("characterReferenceValue"),s=7,o=$h,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Nt&&!Am(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),c):n(d)}}const j0={partial:!0,tokenize:h4},R0={concrete:!0,name:"codeFenced",tokenize:f4};function f4(e,t,n){const r=this,i={partial:!0,tokenize:P};let s=0,o=0,a;return l;function l(S){return u(S)}function u(S){const j=r.events[r.events.length-1];return s=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(o++,e.consume(S),c):o<3?n(S):(e.exit("codeFencedFenceSequence"),he(S)?_e(e,d,"whitespace")(S):d(S))}function d(S){return S===null||J(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(j0,y,b)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||J(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):he(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_e(e,p,"whitespace")(S)):S===96&&S===a?n(S):(e.consume(S),h)}function p(S){return S===null||J(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||J(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===a?n(S):(e.consume(S),m)}function y(S){return e.attempt(i,b,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return s>0&&he(S)?_e(e,x,"linePrefix",s+1)(S):x(S)}function x(S){return S===null||J(S)?e.check(j0,y,b)(S):(e.enter("codeFlowValue"),v(S))}function v(S){return S===null||J(S)?(e.exit("codeFlowValue"),x(S)):(e.consume(S),v)}function b(S){return e.exit("codeFenced"),t(S)}function P(S,j,C){let T=0;return E;function E(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),I}function I(F){return S.enter("codeFencedFence"),he(F)?_e(S,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):M(F)}function M(F){return F===a?(S.enter("codeFencedFenceSequence"),O(F)):C(F)}function O(F){return F===a?(T++,S.consume(F),O):T>=o?(S.exit("codeFencedFenceSequence"),he(F)?_e(S,B,"whitespace")(F):B(F)):C(F)}function B(F){return F===null||J(F)?(S.exit("codeFencedFence"),j(F)):C(F)}}}function h4(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 Ud={name:"codeIndented",tokenize:m4},p4={partial:!0,tokenize:g4};function m4(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),_e(e,s,"linePrefix",5)(u)}function s(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):J(u)?e.attempt(p4,o,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||J(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function g4(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):J(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):_e(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):J(o)?i(o):n(o)}}const y4={name:"codeText",previous:v4,resolve:x4,tokenize:w4};function x4(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 v4(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function w4(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,c(d)):J(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||J(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}class b4{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&&mo(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),mo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),mo(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);mo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);mo(this.left,n.reverse())}}}function mo(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 D_(e){const t={};let n=-1,r,i,s,o,a,l,u;const c=new b4(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,k4(c,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=c.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return Bn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function k4(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],u={};let c,d,h=-1,p=n,m=0,y=0;const w=[y];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),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;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const _4={resolve:C4,tokenize:P4},S4={partial:!0,tokenize:E4};function C4(e){return D_(e),e}function P4(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):J(a)?e.check(S4,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 E4(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_e(e,s,"linePrefix")}function s(o){if(o===null||J(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function N_(e,t,n,r,i,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),h):g===null||g===32||g===41||Bh(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||J(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!c&&(g===null||g===41||Et(g))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(g)):c<u&&g===40?(e.consume(g),c++,y):g===41?(e.consume(g),c--,y):g===null||g===32||g===40||Bh(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 z_(e,t,n,r,i,s){const o=this;let a=0,l;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),c}function c(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):J(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||J(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),l||(l=!he(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function F_(e,t,n,r,i,s){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),u(h))}function u(h){return h===o?(e.exit(s),l(o)):h===null?n(h):J(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),_e(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===o||h===null||J(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:c)}function d(h){return h===o||h===92?(e.consume(h),c):c(h)}}function Bo(e,t){let n;return r;function r(i){return J(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):he(i)?_e(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const T4={name:"definition",tokenize:R4},j4={partial:!0,tokenize:I4};function R4(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),o(p)}function o(p){return z_.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=bs(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 Et(p)?Bo(e,u)(p):u(p)}function u(p){return N_(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(j4,d,d)(p)}function d(p){return he(p)?_e(e,h,"whitespace")(p):h(p)}function h(p){return p===null||J(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function I4(e,t,n){return r;function r(a){return Et(a)?Bo(e,i)(a):n(a)}function i(a){return F_(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return he(a)?_e(e,o,"whitespace")(a):o(a)}function o(a){return a===null||J(a)?t(a):n(a)}}const M4={name:"hardBreakEscape",tokenize:L4};function L4(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return J(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const A4={name:"headingAtx",resolve:D4,tokenize:N4};function D4(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"},Bn(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function N4(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||Et(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||J(c)?(e.exit("atxHeading"),t(c)):he(c)?_e(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||Et(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const z4=["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"],I0=["pre","script","style","textarea"],F4={concrete:!0,name:"htmlFlow",resolveTo:$4,tokenize:V4},O4={partial:!0,tokenize:U4},B4={partial:!0,tokenize:W4};function $4(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 V4(e,t,n){const r=this;let i,s,o,a,l;return u;function u(R){return c(R)}function c(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),d}function d(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),s=!0,y):R===63?(e.consume(R),i=3,r.interrupt?t:k):An(R)?(e.consume(R),o=String.fromCharCode(R),w):n(R)}function h(R){return R===45?(e.consume(R),i=2,p):R===91?(e.consume(R),i=5,a=0,m):An(R)?(e.consume(R),i=4,r.interrupt?t:k):n(R)}function p(R){return R===45?(e.consume(R),r.interrupt?t:k):n(R)}function m(R){const ue="CDATA[";return R===ue.charCodeAt(a++)?(e.consume(R),a===ue.length?r.interrupt?t:M:m):n(R)}function y(R){return An(R)?(e.consume(R),o=String.fromCharCode(R),w):n(R)}function w(R){if(R===null||R===47||R===62||Et(R)){const ue=R===47,fe=o.toLowerCase();return!ue&&!s&&I0.includes(fe)?(i=1,r.interrupt?t(R):M(R)):z4.includes(o.toLowerCase())?(i=6,ue?(e.consume(R),g):r.interrupt?t(R):M(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):s?x(R):v(R))}return R===45||Nt(R)?(e.consume(R),o+=String.fromCharCode(R),w):n(R)}function g(R){return R===62?(e.consume(R),r.interrupt?t:M):n(R)}function x(R){return he(R)?(e.consume(R),x):E(R)}function v(R){return R===47?(e.consume(R),E):R===58||R===95||An(R)?(e.consume(R),b):he(R)?(e.consume(R),v):E(R)}function b(R){return R===45||R===46||R===58||R===95||Nt(R)?(e.consume(R),b):P(R)}function P(R){return R===61?(e.consume(R),S):he(R)?(e.consume(R),P):v(R)}function S(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),l=R,j):he(R)?(e.consume(R),S):C(R)}function j(R){return R===l?(e.consume(R),l=null,T):R===null||J(R)?n(R):(e.consume(R),j)}function C(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Et(R)?P(R):(e.consume(R),C)}function T(R){return R===47||R===62||he(R)?v(R):n(R)}function E(R){return R===62?(e.consume(R),I):n(R)}function I(R){return R===null||J(R)?M(R):he(R)?(e.consume(R),I):n(R)}function M(R){return R===45&&i===2?(e.consume(R),z):R===60&&i===1?(e.consume(R),D):R===62&&i===4?(e.consume(R),V):R===63&&i===3?(e.consume(R),k):R===93&&i===5?(e.consume(R),$):J(R)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(O4,Q,O)(R)):R===null||J(R)?(e.exit("htmlFlowData"),O(R)):(e.consume(R),M)}function O(R){return e.check(B4,B,Q)(R)}function B(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),F}function F(R){return R===null||J(R)?O(R):(e.enter("htmlFlowData"),M(R))}function z(R){return R===45?(e.consume(R),k):M(R)}function D(R){return R===47?(e.consume(R),o="",L):M(R)}function L(R){if(R===62){const ue=o.toLowerCase();return I0.includes(ue)?(e.consume(R),V):M(R)}return An(R)&&o.length<8?(e.consume(R),o+=String.fromCharCode(R),L):M(R)}function $(R){return R===93?(e.consume(R),k):M(R)}function k(R){return R===62?(e.consume(R),V):R===45&&i===2?(e.consume(R),k):M(R)}function V(R){return R===null||J(R)?(e.exit("htmlFlowData"),Q(R)):(e.consume(R),V)}function Q(R){return e.exit("htmlFlow"),t(R)}}function W4(e,t,n){const r=this;return i;function i(o){return J(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function U4(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Rc,t,n)}}const H4={name:"htmlText",tokenize:G4};function G4(e,t,n){const r=this;let i,s,o;return a;function a(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),P):k===63?(e.consume(k),v):An(k)?(e.consume(k),C):n(k)}function u(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),s=0,m):An(k)?(e.consume(k),x):n(k)}function c(k){return k===45?(e.consume(k),p):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),h):J(k)?(o=d,D(k)):(e.consume(k),d)}function h(k){return k===45?(e.consume(k),p):d(k)}function p(k){return k===62?z(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):J(k)?(o=y,D(k)):(e.consume(k),y)}function w(k){return k===93?(e.consume(k),g):y(k)}function g(k){return k===62?z(k):k===93?(e.consume(k),g):y(k)}function x(k){return k===null||k===62?z(k):J(k)?(o=x,D(k)):(e.consume(k),x)}function v(k){return k===null?n(k):k===63?(e.consume(k),b):J(k)?(o=v,D(k)):(e.consume(k),v)}function b(k){return k===62?z(k):v(k)}function P(k){return An(k)?(e.consume(k),S):n(k)}function S(k){return k===45||Nt(k)?(e.consume(k),S):j(k)}function j(k){return J(k)?(o=j,D(k)):he(k)?(e.consume(k),j):z(k)}function C(k){return k===45||Nt(k)?(e.consume(k),C):k===47||k===62||Et(k)?T(k):n(k)}function T(k){return k===47?(e.consume(k),z):k===58||k===95||An(k)?(e.consume(k),E):J(k)?(o=T,D(k)):he(k)?(e.consume(k),T):z(k)}function E(k){return k===45||k===46||k===58||k===95||Nt(k)?(e.consume(k),E):I(k)}function I(k){return k===61?(e.consume(k),M):J(k)?(o=I,D(k)):he(k)?(e.consume(k),I):T(k)}function M(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,O):J(k)?(o=M,D(k)):he(k)?(e.consume(k),M):(e.consume(k),B)}function O(k){return k===i?(e.consume(k),i=void 0,F):k===null?n(k):J(k)?(o=O,D(k)):(e.consume(k),O)}function B(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||Et(k)?T(k):(e.consume(k),B)}function F(k){return k===47||k===62||Et(k)?T(k):n(k)}function z(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function D(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),L}function L(k){return he(k)?_e(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):$(k)}function $(k){return e.enter("htmlTextData"),o(k)}}const Nm={name:"labelEnd",resolveAll:Q4,resolveTo:X4,tokenize:Z4},K4={tokenize:J4},Y4={tokenize:e$},q4={tokenize:t$};function Q4(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&&Bn(e,0,e.length,n),e}function X4(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=Zt(a,e.slice(s+1,s+r+3)),a=Zt(a,[["enter",c,t]]),a=Zt(a,Dm(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=Zt(a,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),a=Zt(a,e.slice(o+1)),a=Zt(a,[["exit",l,t]]),Bn(e,s,e.length,a),e}function Z4(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(bs(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(K4,c,o?c:d)(h):h===91?e.attempt(Y4,c,o?u:d)(h):o?c(h):d(h)}function u(h){return e.attempt(q4,c,d)(h)}function c(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function J4(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 Et(d)?Bo(e,s)(d):s(d)}function s(d){return d===41?c(d):N_(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Et(d)?Bo(e,l)(d):c(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?F_(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Et(d)?Bo(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function e$(e,t,n){const r=this;return i;function i(a){return z_.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(bs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function t$(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:Nm.resolveAll,tokenize:r$};function r$(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 i$={name:"labelStartLink",resolveAll:Nm.resolveAll,tokenize:s$};function s$(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 Hd={name:"lineEnding",tokenize:o$};function o$(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_e(e,t,"linePrefix")}}const Yl={name:"thematicBreak",tokenize:a$};function a$(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||J(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),he(u)?_e(e,a,"whitespace")(u):a(u))}}const wt={continuation:{tokenize:d$},exit:h$,name:"list",tokenize:c$},l$={partial:!0,tokenize:p$},u$={partial:!0,tokenize:f$};function c$(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:$h(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(Yl,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return $h(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"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Rc,r.interrupt?n:c,e.attempt(l$,h,d))}function c(p){return r.containerState.initialBlankLine=!0,s++,h(p)}function d(p){return he(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 d$(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Rc,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_e(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!he(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(u$,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,_e(e,e.attempt(wt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function f$(e,t,n){const r=this;return _e(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 h$(e){e.exit(this.containerState.type)}function p$(e,t,n){const r=this;return _e(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!he(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const M0={name:"setextUnderline",resolveTo:m$,tokenize:g$};function m$(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 g$(e,t,n){const r=this;let i;return s;function s(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),he(u)?_e(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||J(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const y$={tokenize:x$};function x$(e){const t=this,n=e.attempt(Rc,r,e.attempt(this.parser.constructs.flowInitial,i,_e(e,e.attempt(this.parser.constructs.flow,i,e.attempt(_4,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 v$={resolveAll:B_()},w$=O_("string"),b$=O_("text");function O_(e){return{resolveAll:B_(e==="text"?k$:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=i[c];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function B_(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 k$(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)l=!0,a++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const _$={42:wt,43:wt,45:wt,48:wt,49:wt,50:wt,51:wt,52:wt,53:wt,54:wt,55:wt,56:wt,57:wt,62:M_},S$={91:T4},C$={[-2]:Ud,[-1]:Ud,32:Ud},P$={35:A4,42:Yl,45:[M0,Yl],60:F4,61:M0,95:Yl,96:R0,126:R0},E$={38:A_,92:L_},T$={[-5]:Hd,[-4]:Hd,[-3]:Hd,33:n$,38:A_,42:Vh,60:[i4,H4],91:i$,92:[M4,L_],93:Nm,95:Vh,96:y4},j$={null:[Vh,v$]},R$={null:[42,95]},I$={null:[]},M$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:R$,contentInitial:S$,disable:I$,document:_$,flow:P$,flowInitial:C$,insideSpan:j$,string:E$,text:T$},Symbol.toStringTag,{value:"Module"}));function L$(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:j(P),check:j(S),consume:x,enter:v,exit:b,interrupt:j(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function d(I){return o=Zt(o,I),w(),o[o.length-1]!==null?[]:(C(t,0),u.events=Dm(s,u.events,u),u.events)}function h(I,M){return D$(p(I),M)}function p(I){return A$(o,I)}function m(){const{_bufferIndex:I,_index:M,line:O,column:B,offset:F}=r;return{_bufferIndex:I,_index:M,line:O,column:B,offset:F}}function y(I){i[I.line]=I.column,E()}function w(){let I;for(;r._index<o.length;){const M=o[r._index];if(typeof M=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<M.length;)g(M.charCodeAt(r._bufferIndex));else g(M)}}function g(I){c=c(I)}function x(I){J(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,E()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=I}function v(I,M){const O=M||{};return O.type=I,O.start=m(),u.events.push(["enter",O,u]),a.push(O),O}function b(I){const M=a.pop();return M.end=m(),u.events.push(["exit",M,u]),M}function P(I,M){C(I,M.from)}function S(I,M){M.restore()}function j(I,M){return O;function O(B,F,z){let D,L,$,k;return Array.isArray(B)?Q(B):"tokenize"in B?Q([B]):V(B);function V(ce){return Xe;function Xe(Le){const ft=Le!==null&&ce[Le],Ht=Le!==null&&ce.null,an=[...Array.isArray(ft)?ft:ft?[ft]:[],...Array.isArray(Ht)?Ht:Ht?[Ht]:[]];return Q(an)(Le)}}function Q(ce){return D=ce,L=0,ce.length===0?z:R(ce[L])}function R(ce){return Xe;function Xe(Le){return k=T(),$=ce,ce.partial||(u.currentConstruct=ce),ce.name&&u.parser.constructs.disable.null.includes(ce.name)?fe():ce.tokenize.call(M?Object.assign(Object.create(u),M):u,l,ue,fe)(Le)}}function ue(ce){return I($,k),F}function fe(ce){return k.restore(),++L<D.length?R(D[L]):z}}}function C(I,M){I.resolveAll&&!s.includes(I)&&s.push(I),I.resolve&&Bn(u.events,M,u.events.length-M,I.resolve(u.events.slice(M),u)),I.resolveTo&&(u.events=I.resolveTo(u.events,u))}function T(){const I=m(),M=u.previous,O=u.currentConstruct,B=u.events.length,F=Array.from(a);return{from:B,restore:z};function z(){r=I,u.previous=M,u.currentConstruct=O,u.events.length=B,a=F,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function A$(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 D$(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=`
|
|
67
|
+
`;break}case-3:{o=`\r
|
|
68
|
+
`;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 N$(e){const r={constructs:WB([M$,...(e||{}).extensions||[]]),content:i(XB),defined:[],document:i(JB),flow:i(y$),lazy:{},string:i(w$),text:i(b$)};return r;function i(s){return o;function o(a){return L$(r,s,a)}}}function z$(e){for(;!D_(e););return e}const L0=/[\0\t\n\r]/g;function F$(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let u,c,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(L0.lastIndex=d,u=L0.exec(s),h=u&&u.index!==void 0?u.index:s.length,p=s.charCodeAt(h),!u){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(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const O$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function B$(e){return e.replace(O$,$$)}function $$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return I_(n.slice(s?2:1),s?16:10)}return Am(n)||e}const $_={}.hasOwnProperty;function V$(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),W$(n)(z$(N$(n).document().write(F$()(e,t,!0))))}function W$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(bn),autolinkProtocol:T,autolinkEmail:T,atxHeading:s(Oi),blockQuote:s(Ht),characterEscape:T,characterReference:T,codeFenced:s(an),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(an,o),codeText:s(or,o),codeTextData:T,data:T,codeFlowValue:T,definition:s(zi),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(Fi),hardBreakEscape:s(K),hardBreakTrailing:s(K),htmlFlow:s(Ke,o),htmlFlowData:T,htmlText:s(Ke,o),htmlTextData:T,image:s(Oe),label:o,link:s(bn),listItem:s(Ac),listItemValue:h,listOrdered:s(kn,d),listUnordered:s(kn),paragraph:s(Ma),reference:R,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Oi),strong:s(Dc),thematicBreak:s(ge)},exit:{atxHeading:l(),atxHeadingSequence:P,autolink:l(),autolinkEmail:ft,autolinkProtocol:Le,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ce,characterReference:Xe,codeFenced:l(w),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:l(g),codeText:l(F),codeTextData:E,data:E,definition:l(),definitionDestinationString:b,definitionLabelString:x,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(O),htmlFlowData:E,htmlText:l(B),htmlTextData:E,image:l(D),label:$,labelText:L,lineEnding:I,link:l(z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ue,resourceDestinationString:k,resourceTitleString:V,resource:Q,setextHeading:l(C),setextHeadingLineSequence:j,setextHeadingText:S,strong:l(),thematicBreak:l()}};V_(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let G={type:"root",children:[]};const ee={stack:[G],tokenStack:[],config:t,enter:a,exit:u,buffer:o,resume:c,data:n},oe=[];let ye=-1;for(;++ye<N.length;)if(N[ye][1].type==="listOrdered"||N[ye][1].type==="listUnordered")if(N[ye][0]==="enter")oe.push(ye);else{const ln=oe.pop();ye=i(N,ln,ye)}for(ye=-1;++ye<N.length;){const ln=t[N[ye][0]];$_.call(ln,N[ye][1].type)&&ln[N[ye][1].type].call(Object.assign({sliceSerialize:N[ye][2].sliceSerialize},ee),N[ye][1])}if(ee.tokenStack.length>0){const ln=ee.tokenStack[ee.tokenStack.length-1];(ln[1]||A0).call(ee,void 0,ln[0])}for(G.position={start:mr(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:mr(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},ye=-1;++ye<t.transforms.length;)G=t.transforms[ye](G)||G;return G}function i(N,G,ee){let oe=G-1,ye=-1,ln=!1,Xr,Vn,Ys,qs;for(;++oe<=ee;){const Rt=N[oe];switch(Rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Rt[0]==="enter"?ye++:ye--,qs=void 0;break}case"lineEndingBlank":{Rt[0]==="enter"&&(Xr&&!qs&&!ye&&!Ys&&(Ys=oe),qs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qs=void 0}if(!ye&&Rt[0]==="enter"&&Rt[1].type==="listItemPrefix"||ye===-1&&Rt[0]==="exit"&&(Rt[1].type==="listUnordered"||Rt[1].type==="listOrdered")){if(Xr){let Bi=oe;for(Vn=void 0;Bi--;){const Wn=N[Bi];if(Wn[1].type==="lineEnding"||Wn[1].type==="lineEndingBlank"){if(Wn[0]==="exit")continue;Vn&&(N[Vn][1].type="lineEndingBlank",ln=!0),Wn[1].type="lineEnding",Vn=Bi}else if(!(Wn[1].type==="linePrefix"||Wn[1].type==="blockQuotePrefix"||Wn[1].type==="blockQuotePrefixWhitespace"||Wn[1].type==="blockQuoteMarker"||Wn[1].type==="listItemIndent"))break}Ys&&(!Vn||Ys<Vn)&&(Xr._spread=!0),Xr.end=Object.assign({},Vn?N[Vn][1].start:Rt[1].end),N.splice(Vn||oe,0,["exit",Xr,Rt[2]]),oe++,ee++}if(Rt[1].type==="listItemPrefix"){const Bi={type:"listItem",_spread:!1,start:Object.assign({},Rt[1].start),end:void 0};Xr=Bi,N.splice(oe,0,["enter",Bi,Rt[2]]),oe++,ee++,Ys=void 0,qs=!0}}}return N[G][1]._spread=ln,ee}function s(N,G){return ee;function ee(oe){a.call(this,N(oe),oe),G&&G.call(this,oe)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(N,G,ee){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([G,ee||void 0]),N.position={start:mr(G.start),end:void 0}}function l(N){return G;function G(ee){N&&N.call(this,ee),u.call(this,ee)}}function u(N,G){const ee=this.stack.pop(),oe=this.tokenStack.pop();if(oe)oe[0].type!==N.type&&(G?G.call(this,N,oe[0]):(oe[1]||A0).call(this,N,oe[0]));else throw new Error("Cannot close `"+N.type+"` ("+Oo({start:N.start,end:N.end})+"): it’s not open");ee.position.end=mr(N.end)}function c(){return $B(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(N){if(this.data.expectingFirstListItemValue){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function p(){const N=this.resume(),G=this.stack[this.stack.length-1];G.lang=N}function m(){const N=this.resume(),G=this.stack[this.stack.length-1];G.meta=N}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N.replace(/(\r?\n|\r)$/g,"")}function x(N){const G=this.resume(),ee=this.stack[this.stack.length-1];ee.label=G,ee.identifier=bs(this.sliceSerialize(N)).toLowerCase()}function v(){const N=this.resume(),G=this.stack[this.stack.length-1];G.title=N}function b(){const N=this.resume(),G=this.stack[this.stack.length-1];G.url=N}function P(N){const G=this.stack[this.stack.length-1];if(!G.depth){const ee=this.sliceSerialize(N).length;G.depth=ee}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function j(N){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function T(N){const ee=this.stack[this.stack.length-1].children;let oe=ee[ee.length-1];(!oe||oe.type!=="text")&&(oe=La(),oe.position={start:mr(N.start),end:void 0},ee.push(oe)),this.stack.push(oe)}function E(N){const G=this.stack.pop();G.value+=this.sliceSerialize(N),G.position.end=mr(N.end)}function I(N){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ee=G.children[G.children.length-1];ee.position.end=mr(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(T.call(this,N),E.call(this,N))}function M(){this.data.atHardBreak=!0}function O(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N}function B(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N}function F(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N}function z(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=G,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function D(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=G,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function L(N){const G=this.sliceSerialize(N),ee=this.stack[this.stack.length-2];ee.label=B$(G),ee.identifier=bs(G).toLowerCase()}function $(){const N=this.stack[this.stack.length-1],G=this.resume(),ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,ee.type==="link"){const oe=N.children;ee.children=oe}else ee.alt=G}function k(){const N=this.resume(),G=this.stack[this.stack.length-1];G.url=N}function V(){const N=this.resume(),G=this.stack[this.stack.length-1];G.title=N}function Q(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function ue(N){const G=this.resume(),ee=this.stack[this.stack.length-1];ee.label=G,ee.identifier=bs(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function fe(N){this.data.characterReferenceType=N.type}function ce(N){const G=this.sliceSerialize(N),ee=this.data.characterReferenceType;let oe;ee?(oe=I_(G,ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):oe=Am(G);const ye=this.stack[this.stack.length-1];ye.value+=oe}function Xe(N){const G=this.stack.pop();G.position.end=mr(N.end)}function Le(N){E.call(this,N);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(N)}function ft(N){E.call(this,N);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(N)}function Ht(){return{type:"blockquote",children:[]}}function an(){return{type:"code",lang:null,meta:null,value:""}}function or(){return{type:"inlineCode",value:""}}function zi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Fi(){return{type:"emphasis",children:[]}}function Oi(){return{type:"heading",depth:0,children:[]}}function K(){return{type:"break"}}function Ke(){return{type:"html",value:""}}function Oe(){return{type:"image",title:null,url:"",alt:null}}function bn(){return{type:"link",title:null,url:"",children:[]}}function kn(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function Ac(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function Ma(){return{type:"paragraph",children:[]}}function Dc(){return{type:"strong",children:[]}}function La(){return{type:"text",value:""}}function ge(){return{type:"thematicBreak"}}}function mr(e){return{line:e.line,column:e.column,offset:e.offset}}function V_(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?V_(e,r):U$(e,r)}}function U$(e,t){let n;for(n in t)if($_.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 A0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Oo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Oo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Oo({start:t.start,end:t.end})+") is still open")}function H$(e){const t=this;t.parser=n;function n(r){return V$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function G$(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 K$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
69
|
+
`}]}function Y$(e,t){const n=t.value?t.value+`
|
|
70
|
+
`:"",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 q$(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Q$(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function X$(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Gs(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function Z$(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 J$(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function W_(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 e5(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W_(e,t);const i={src:Gs(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 t5(e,t){const n={src:Gs(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 n5(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 r5(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W_(e,t);const i={href:Gs(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 i5(e,t){const n={href:Gs(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 s5(e,t,n){const r=e.all(t),i=n?o5(n):U_(t),s={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
71
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
72
|
+
`});const u={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,u),e.applyData(t,u)}function o5(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=U_(n[r])}return t}function U_(e){const t=e.spread;return t??e.children.length>1}function a5(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 l5(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function u5(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function c5(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function d5(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=Rm(t.children[1]),l=S_(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 f5(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const d=t.children[l],h={},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)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function h5(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const D0=9,N0=32;function p5(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(z0(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(z0(t.slice(i),i>0,!1)),s.join("")}function z0(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===D0||s===N0;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===D0||s===N0;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function m5(e,t){const n={type:"text",value:p5(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function g5(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const y5={blockquote:G$,break:K$,code:Y$,delete:q$,emphasis:Q$,footnoteReference:X$,heading:Z$,html:J$,imageReference:e5,image:t5,inlineCode:n5,linkReference:r5,link:i5,listItem:s5,list:a5,paragraph:l5,root:u5,strong:c5,table:d5,tableCell:h5,tableRow:f5,text:m5,thematicBreak:g5,toml:ml,yaml:ml,definition:ml,footnoteDefinition:ml};function ml(){}const H_=-1,Ic=0,$o=1,Hu=2,zm=3,Fm=4,Om=5,Bm=6,G_=7,K_=8,x5=typeof self=="object"?self:globalThis,F0=(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 x5[e](t)},v5=(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 Ic:case H_:return n(o,i);case $o:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Hu:{const a=n({},i);for(const[l,u]of o)a[r(l)]=r(u);return a}case zm:return n(new Date(o),i);case Fm:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Om:{const a=n(new Map,i);for(const[l,u]of o)a.set(r(l),r(u));return a}case Bm:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case G_:{const{name:a,message:l}=o;return n(F0(a,l),i)}case K_: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(F0(s,o),i)};return r},O0=e=>v5(new Map,e)(0),Yi="",{toString:w5}={},{keys:b5}=Object,go=e=>{const t=typeof e;if(t!=="object"||!e)return[Ic,t];const n=w5.call(e).slice(8,-1);switch(n){case"Array":return[$o,Yi];case"Object":return[Hu,Yi];case"Date":return[zm,Yi];case"RegExp":return[Fm,Yi];case"Map":return[Om,Yi];case"Set":return[Bm,Yi];case"DataView":return[$o,n]}return n.includes("Array")?[$o,n]:n.includes("Error")?[G_,n]:[Hu,n]},gl=([e,t])=>e===Ic&&(t==="function"||t==="symbol"),k5=(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]=go(o);switch(a){case Ic:{let c=o;switch(l){case"bigint":a=K_,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([H_],o)}return i([a,c],o)}case $o:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const c=[],d=i([a,c],o);for(const h of o)c.push(s(h));return d}case Hu:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const c=[],d=i([a,c],o);for(const h of b5(o))(e||!gl(go(o[h])))&&c.push([s(h),s(o[h])]);return d}case zm:return i([a,o.toISOString()],o);case Fm:{const{source:c,flags:d}=o;return i([a,{source:c,flags:d}],o)}case Om:{const c=[],d=i([a,c],o);for(const[h,p]of o)(e||!(gl(go(h))||gl(go(p))))&&c.push([s(h),s(p)]);return d}case Bm:{const c=[],d=i([a,c],o);for(const h of o)(e||!gl(go(h)))&&c.push(s(h));return d}}const{message:u}=o;return i([a,{name:l,message:u}],o)};return s},B0=(e,{json:t,lossy:n}={})=>{const r=[];return k5(!(t||n),!!t,new Map,r)(e),r},Gu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?O0(B0(e,t)):structuredClone(e):(e,t)=>O0(B0(e,t));function _5(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 S5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function C5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_5,r=e.options.footnoteBackLabel||S5,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),h=Gs(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=c[c.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 c.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Gu(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
73
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
74
|
+
`}]}}const Y_=function(e){if(e==null)return j5;if(typeof e=="function")return Mc(e);if(typeof e=="object")return Array.isArray(e)?P5(e):E5(e);if(typeof e=="string")return T5(e);throw new Error("Expected function, string, or object as test")};function P5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Y_(e[n]);return Mc(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function E5(e){const t=e;return Mc(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function T5(e){return Mc(t);function t(n){return n&&n.type===e}}function Mc(e){return t;function t(n,r,i){return!!(R5(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function j5(){return!0}function R5(e){return e!==null&&typeof e=="object"&&"type"in e}const q_=[],I5=!0,$0=!1,M5="skip";function L5(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Y_(i),o=r?-1:1;a(e,void 0,[])();function a(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const 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=q_,m,y,w;if((!t||s(l,u,c[c.length-1]||void 0))&&(p=A5(n(l,c)),p[0]===$0))return p;if("children"in l&&l.children){const g=l;if(g.children&&p[0]!==M5)for(y=(r?g.children.length:-1)+o,w=c.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=a(x,y,w)(),m[0]===$0)return m;y=typeof m[1]=="number"?m[1]:y+o}}return p}}}function A5(e){return Array.isArray(e)?e:typeof e=="number"?[I5,e]:e==null?q_:[e]}function Q_(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),L5(e,s,a,i);function a(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return o(l,d,c)}}const Wh={}.hasOwnProperty,D5={};function N5(e,t){const n=t||D5,r=new Map,i=new Map,s=new Map,o={...y5,...n.handlers},a={all:u,applyData:F5,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:z5,wrap:B5};return Q_(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:i,h=String(c.identifier).toUpperCase();d.has(h)||d.set(h,c)}}),a;function l(c,d){const h=c.type,p=a.handlers[h];if(Wh.call(a.handlers,h)&&p)return p(a,c,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in c){const{children:y,...w}=c,g=Gu(w);return g.children=a.all(c),g}return Gu(c)}return(a.options.unknownHandler||O5)(a,c,d)}function u(c){const d=[];if("children"in c){const h=c.children;let p=-1;for(;++p<h.length;){const m=a.one(h[p],c);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=V0(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=V0(y.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function z5(e,t){e.position&&(t.position=vB(e))}function F5(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,Gu(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function O5(e,t){const n=t.data||{},r="value"in t&&!(Wh.call(n,"hProperties")||Wh.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 B5(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
75
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
76
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
77
|
+
`}),n}function V0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function W0(e,t){const n=N5(e,t),r=n.one(e,void 0),i=C5(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
78
|
+
`},i),s}function $5(e,t){return e&&"run"in e?async function(n,r){const i=W0(n,{file:r,...t});await e.run(i,r)}:function(n,r){return W0(n,{file:r,...e||t})}}function U0(e){if(e)throw e}var ql=Object.prototype.hasOwnProperty,X_=Object.prototype.toString,H0=Object.defineProperty,G0=Object.getOwnPropertyDescriptor,K0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):X_.call(t)==="[object Array]"},Y0=function(t){if(!t||X_.call(t)!=="[object Object]")return!1;var n=ql.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ql.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ql.call(t,i)},q0=function(t,n){H0&&n.name==="__proto__"?H0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Q0=function(t,n){if(n==="__proto__")if(ql.call(t,n)){if(G0)return G0(t,n).value}else return;return t[n]},V5=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=Q0(a,n),i=Q0(t,n),a!==i&&(c&&i&&(Y0(i)||(s=K0(i)))?(s?(s=!1,o=r&&K0(r)?r:[]):o=r&&Y0(r)?r:{},q0(a,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&q0(a,{name:n,newValue:i}));return a};const Gd=qu(V5);function Uh(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 W5(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...u){const c=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?U5(c,a)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function U5(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const Rn={basename:H5,dirname:G5,extname:K5,join:Y5,sep:"/"};function H5(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ra(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 G5(e){if(Ra(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 K5(e){Ra(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 Y5(...e){let t=-1,n;for(;++t<e.length;)Ra(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":q5(n)}function q5(e){Ra(e);const t=e.codePointAt(0)===47;let n=Q5(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Q5(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 Ra(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const X5={cwd:Z5};function Z5(){return"/"}function Hh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function J5(e){if(typeof e=="string")e=new URL(e);else if(!Hh(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 eV(e)}function eV(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 Kd=["history","path","basename","stem","extname","dirname"];class Z_{constructor(t){let n;t?Hh(t)?n={path:t}:typeof t=="string"||tV(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":X5.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Kd.length;){const s=Kd[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)Kd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Rn.basename(this.path):void 0}set basename(t){qd(t,"basename"),Yd(t,"basename"),this.path=Rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rn.dirname(this.path):void 0}set dirname(t){X0(this.basename,"dirname"),this.path=Rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rn.extname(this.path):void 0}set extname(t){if(Yd(t,"extname"),X0(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=Rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hh(t)&&(t=J5(t)),qd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rn.basename(this.path,this.extname):void 0}set stem(t){qd(t,"stem"),Yd(t,"stem"),this.path=Rn.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 dt(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 Yd(e,t){if(e&&e.includes(Rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rn.sep+"`")}function qd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function X0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function tV(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},rV={}.hasOwnProperty;class $m 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=W5()}copy(){const t=new $m;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Gd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Zd("data",this.frozen),this.namespace[t]=n,this):rV.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Zd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=yl(t),r=this.parser||this.Parser;return Qd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Qd("process",this.parser||this.Parser),Xd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=yl(t),l=r.parse(a);r.run(l,a,function(c,d,h){if(c||!d||!h)return u(c);const p=d,m=r.stringify(p,h);oV(m)?h.value=m:h.result=m,u(c,h)});function u(c,d){c||!d?o(c):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Qd("processSync",this.parser||this.Parser),Xd("processSync",this.compiler||this.Compiler),this.process(t,i),J0("processSync","process",n),r;function i(s,o){n=!0,U0(s),r=o}}run(t,n,r){Z0(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=yl(n);i.run(t,l,u);function u(c,d,h){const p=d||t;c?a(c):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),J0("runSync","run",r),i;function s(o,a){U0(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=yl(n),i=this.compiler||this.Compiler;return Xd("stringify",i),Z0(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Zd("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;l(c,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Gd(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===u){h=d;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[p,...m]=c;const y=r[h][1];Uh(y)&&Uh(p)&&(p=Gd(!0,y,p)),r[h]=[u,p,...m]}}}}const iV=new $m().freeze();function Qd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zd(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 Z0(e){if(!Uh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function J0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function yl(e){return sV(e)?e:new Z_(e)}function sV(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oV(e){return typeof e=="string"||aV(e)}function aV(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lV="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ev=[],tv={allowDangerousHtml:!0},uV=/^(https?|ircs?|mailto|xmpp)$/i,cV=[{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 dV(e){const t=fV(e),n=hV(e);return pV(t.runSync(t.parse(n),n),e)}function fV(e){const t=e.rehypePlugins||ev,n=e.remarkPlugins||ev,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...tv}:tv;return iV().use(H$).use(n).use($5,r).use(t)}function hV(e){const t=e.children||"",n=new Z_;return typeof t=="string"&&(n.value=t),n}function pV(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||mV;for(const c of cV)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+lV+c.id,void 0);return Q_(e,u),SB(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(c,d,h){if(c.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let p;for(p in Wd)if(Object.hasOwn(Wd,p)&&Object.hasOwn(c.properties,p)){const m=c.properties[p],y=Wd[p];(y===null||y.includes(c.tagName))&&(c.properties[p]=l(String(m||""),p,c))}}if(c.type==="element"){let p=n?!n.includes(c.tagName):s?s.includes(c.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(c,d,h)),p&&h&&typeof d=="number")return a&&c.children?h.children.splice(d,1,...c.children):h.children.splice(d,1),d}}}function mV(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||uV.test(e.slice(0,t))?e:""}const Jd=e=>({fontFamily:Ie.serif,fontWeight:600,fontSize:e,margin:`${A[6]} 0 ${A[3]}`,lineHeight:1.25}),gV={p:({children:e})=>f.jsx("p",{style:{margin:`0 0 ${A[4]}`},children:e}),strong:({children:e})=>f.jsx("strong",{style:{fontWeight:700},children:e}),h1:({children:e})=>f.jsx("h1",{style:Jd(ne.lg),children:e}),h2:({children:e})=>f.jsx("h2",{style:Jd("1.3rem"),children:e}),h3:({children:e})=>f.jsx("h3",{style:Jd("1.1rem"),children:e}),a:({children:e,href:t})=>f.jsx("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:ie.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:`${A[3]} ${A[4]}`,overflowX:"auto",margin:`0 0 ${A[4]}`},children:e}),ul:({children:e})=>f.jsx("ul",{style:{listStyle:"disc",margin:`0 0 ${A[4]}`,paddingLeft:"1.4rem"},children:e}),ol:({children:e})=>f.jsx("ol",{style:{listStyle:"decimal",margin:`0 0 ${A[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 ${A[4]}`,paddingLeft:A[4],borderLeft:"3px solid rgba(0,0,0,0.15)",opacity:.85},children:e})},J_=({children:e})=>f.jsx(dV,{components:gV,children:e}),Ku=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`},Vm=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)}},nv=e=>{var t;return((t=Vm(e))==null?void 0:t.pct)??null},yV=(e,t)=>{if(e)return e.find(n=>n.status==="in-progress"||n.status==="review")};function ef(e,t){const n=e.split(/(\s+)/).filter(c=>c!==""),r=t.split(/(\s+)/).filter(c=>c!==""),i=n.length,s=r.length,o=Array.from({length:i+1},()=>new Array(s+1).fill(0));for(let c=i-1;c>=0;c--)for(let d=s-1;d>=0;d--)o[c][d]=n[c]===r[d]?o[c+1][d+1]+1:Math.max(o[c+1][d],o[c][d+1]);const a=[];let l=0,u=0;for(;l<i&&u<s;)n[l]===r[u]?(a.push({type:"same",text:n[l]}),l++,u++):o[l+1][u]>=o[l][u+1]?(a.push({type:"removed",text:n[l]}),l++):(a.push({type:"added",text:r[u]}),u++);for(;l<i;)a.push({type:"removed",text:n[l]}),l++;for(;u<s;)a.push({type:"added",text:r[u]}),u++;return xV(a)}function xV(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 vV=["idea","planned","in-progress","review","done","dropped"],wV=["feat","fix","chore","docs","refactor"],bV=["claude-code","opencode"],eS={"claude-code":"Claude Code",opencode:"OpenCode"},uW={"claude-code":{model:["opus","sonnet","fable","haiku"],effort:["low","medium","high","xhigh","max"]},opencode:{model:null}},cW={phase:{agent:"opencode"},planDraft:{agent:"claude-code"},ideaExtend:{agent:"claude-code"},commitSuggest:{agent:"claude-code"}},kV=["in-progress","review","planned","idea"],_V=["open"],Wm={statuses:kV,tags:[],search:"",sortKey:"status",sortDirection:"asc",noteStatuses:_V},rv={"in-progress":0,review:1,planned:2,idea:3,done:4,dropped:5},xl=e=>{const t=new Date(e.updated??e.created).getTime();return Number.isNaN(t)?0:t},iv=e=>{var n;const t=(n=e.id)==null?void 0:n.match(/(\d+)\s*$/);return t?Number(t[1]):Number.POSITIVE_INFINITY},tf=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},sv=(e,t)=>t.size===0?!0:e.tags.some(n=>t.has(n)),Um=(e,t,n)=>{switch(n){case"status":{const r=rv[e.status]-rv[t.status];return r!==0?r:xl(t)-xl(e)}case"updated":return xl(t)-xl(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 iv(e)-iv(t);case"progress":return(nv(t)??-1)-(nv(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},Ql=(e,t=Wm)=>{const n=new Set(t.tags),r=new Set(t.statuses),i=Gh(e.filter(a=>sv(a,n)&&tf(a,t.search)),a=>[a.status]);for(const a of vV)i[a]??(i[a]=0);const s=Gh(e.filter(a=>r.has(a.status)&&tf(a,t.search)),a=>a.tags);return{rows:e.filter(a=>r.has(a.status)&&sv(a,n)&&tf(a,t.search)).sort((a,l)=>{const u=Um(a,l,t.sortKey);return t.sortDirection==="desc"?-u:u}),statusCounts:i,tagCounts:s}},SV=["open","done","dropped"],CV={open:"idea",done:"done",dropped:"dropped"},nf=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},ov=e=>e.type==="plan"?e.plan:e.type==="note"?{title:e.idea.title,id:e.idea.id??void 0,status:CV[e.idea.status??"open"],created:"",tags:[],body:e.idea.body,phases:[]}:{...(e.children.length>0?[...e.children].sort((n,r)=>Um(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},PV=(e,t,n=Wm)=>{const{statusCounts:r,tagCounts:i}=Ql(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,u=[];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 u.push(p);const c=new Set(n.noteStatuses),d=Gh(s.filter(p=>nf(p,n.search)),p=>[p.status??"open"]);for(const p of SV)d[p]??(d[p]=0);const h=Ql(u,n).rows.map(p=>({type:"plan",plan:p}));for(const p of o){const m=p.id?l.get(p.id)??[]:[],y=Ql(m,n).rows;y.length===0&&(m.length>0||!nf(p,n.search))||h.push({type:"idea-group",idea:p,children:y})}for(const p of s)c.has(p.status??"open")&&nf(p,n.search)&&h.push({type:"note",idea:p});return h.sort((p,m)=>{const y=Um(ov(p),ov(m),n.sortKey);return n.sortDirection==="desc"?-y:y}),{rows:h,statusCounts:r,tagCounts:i,noteStatusCounts:d}},EV=.2,TV=5,tS=3,nS=2,rS=1,jV=tS+nS+rS,RV=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"]),vl=e=>{const t=e.toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>=2&&!RV.has(n));return new Set(t)},rf=(e,t)=>{let n=0;for(const r of e)t.has(r)&&(n+=1);return n};function IV(e,t,n={}){const{threshold:r=EV,limit:i=TV}=n,s=vl(e);if(s.size===0)return[];const o=[];for(const a of t){const l=vl(a.title),u=vl(a.body),c=vl((a.tags??[]).join(" ")),h=(rf(s,l)*tS+rf(s,c)*nS+rf(s,u)*rS)/(s.size*jV);h>=r&&o.push({candidate:a,score:h})}return o.sort((a,l)=>l.score-a.score),o.slice(0,i)}const MV=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}`},LV=(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=[MV(e),e.failure_scenario??e.reasoning].filter(Boolean).join(" — ");return{done:!1,text:n.trim(),description:r||void 0,source:"review"}},AV=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)=>LV(r,i))},DV={},av=e=>{let t;const n=new Set,r=(c,d)=>{const h=typeof c=="function"?c(t):c;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:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(DV?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},NV=e=>e?av(e):av,iS={},{useDebugValue:zV}=ks,{useSyncExternalStoreWithSelector:FV}=ST;let lv=!1;const OV=e=>e;function BV(e,t=OV,n){(iS?"production":void 0)!=="production"&&n&&!lv&&(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"),lv=!0);const r=FV(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return zV(r),r}const uv=e=>{(iS?"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"?NV(e):e,n=(r,i)=>BV(t,r,i);return Object.assign(n,t),n},$V=e=>e?uv(e):uv,$n=async(e,t="Launch failed")=>{if(!e.ok){const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}},VV=async()=>(await fetch("/api/agent/status")).json(),WV=async()=>(await fetch("/api/agent/reconcile-queue")).json(),UV=async(e,t)=>{const n=await fetch("/api/agent/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,phaseIndex:t})});await $n(n)},HV=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})});await $n(n)},GV=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})});await $n(n)},KV=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})});await $n(n)},YV=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})});await $n(n)},qV=async e=>{const t=await fetch("/api/agent/launch-suggest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})});await $n(t)},QV=async()=>{const e=await fetch("/api/agent/launch-reconcile-all",{method:"POST"});await $n(e)},XV=async e=>{const t=await fetch("/api/agent/launch-run-all",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})});await $n(t)},ZV=async e=>{const t=await fetch("/api/agent/launch-fix-review",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})});await $n(t)},JV=async()=>{const e=await fetch("/api/agent/stop",{method:"POST"});await $n(e,"Stop failed")},e6=async()=>(await fetch("/api/decisions")).json(),t6=async()=>(await fetch("/api/open-questions")).json(),n6=async()=>(await fetch("/api/progress")).json(),r6=async()=>(await fetch("/api/suggestions")).json(),i6=async e=>{const t=await fetch("/api/suggestions/promote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({suggestion:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to promote suggestion"}));throw new Error(n.error)}return t.json()},s6=async e=>{const t=await fetch("/api/suggestions/dismiss",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({suggestion:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to dismiss suggestion"}));throw new Error(n.error)}},o6=async()=>(await fetch("/api/docs")).json(),a6=async()=>(await fetch("/api/consistency")).json(),dW=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 i=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(i.error??"Failed to resolve open question")}return r.json()},l6=async()=>(await fetch("/api/ideas")).json(),u6=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},sS=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},c6=async()=>(await fetch("/api/plans")).json(),d6=async e=>{await fetch("/api/plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},f6=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})`)}};async function Ks(e,t){if(e.ok)return;const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}const h6=async()=>{const e=await fetch("/api/git/status");return await Ks(e,"Failed to load git status"),e.json()},oS=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 Ks(r,"Commit failed")},p6=async()=>{const e=await fetch("/api/git/push",{method:"POST"});await Ks(e,"Push failed")},aS=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 Ks(t,"Failed to suggest a commit message"),t.json()},m6=async e=>{const t=await fetch("/api/git/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e})});await Ks(t,"Sync failed")},g6=async()=>{const e=await fetch("/api/git/pull",{method:"POST"});await Ks(e,"Pull failed")},y6=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},x6=async()=>(await fetch("/api/status")).json(),v6=async e=>{await fetch(`/api/status/check?name=${e}`,{method:"POST"})},w6=async()=>{await fetch("/api/status/fix",{method:"POST"})},b6=async()=>{const e=await fetch("/api/refresh",{method:"POST"});if(!e.ok)throw new Error(`Failed to drop caches: ${e.statusText}`)},W=$V((e,t)=>({plans:null,plansLoading:!1,plansError:null,loadPlans:async()=>{e({plansLoading:!0});try{const n=await c6();e({plans:n,plansError:null,plansLoading:!1})}catch(n){e({plansError:String(n),plansLoading:!1})}},ideaEntries:[],loadIdeas:async()=>{try{const n=await l6();e({ideaEntries:n.entries})}catch{e({ideaEntries:[]})}},planFilters:Wm,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 e6();e({decisions:n.entries,decisionsLoading:!1})}catch{e({decisions:[],decisionsLoading:!1})}},openQuestions:[],openQuestionsLoading:!0,loadOpenQuestions:async()=>{e({openQuestionsLoading:!0});try{const n=await t6();e({openQuestions:n.entries,openQuestionsLoading:!1})}catch{e({openQuestions:[],openQuestionsLoading:!1})}},suggestions:[],suggestionsLoading:!0,loadSuggestions:async()=>{e({suggestionsLoading:!0});try{const n=await r6();e({suggestions:n.entries,suggestionsLoading:!1})}catch{e({suggestions:[],suggestionsLoading:!1})}},promoteSuggestion:async n=>{const{id:r}=await i6(n);return await Promise.all([t().loadSuggestions(),t().loadPlans(),t().loadIdeas()]),r},dismissSuggestion:async n=>{await s6(n),await t().loadSuggestions()},progress:[],progressLoading:!0,loadProgress:async()=>{e({progressLoading:!0});try{const n=await n6();e({progress:n.entries,progressLoading:!1})}catch{e({progress:[],progressLoading:!1})}},repoDocs:[],repoDocsLoading:!0,loadRepoDocs:async()=>{e({repoDocsLoading:!0});try{const n=await o6();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,refreshing:!1,loadStatus:async()=>{try{const n=await x6();e({status:n})}catch{}},refreshAll:async()=>{e({refreshing:!0});try{await b6().catch(()=>{}),await Promise.all([t().loadPlans(),t().loadIdeas(),t().loadSuggestions(),t().loadStatus(),t().loadConsistency(),t().loadGitStatus(),t().loadAgentStatus()]);const n=t().plansError;return n?{ok:!1,error:n}:{ok:!0}}finally{e({refreshing:!1})}},runCheck:async n=>{try{await v6(n)}catch{}},fixQuality:async()=>{try{await w6()}catch{}},commitInFlight:!1,setCommitInFlight:n=>e({commitInFlight:n}),quickCommit:async()=>{const{gitStatus:n,loadGitStatus:r,commitInFlight:i}=t();if(i)return{ok:!1,error:"A commit is already in progress"};if(!n||n.length===0)return{ok:!1,error:"Nothing to commit"};const s=n.map(o=>o.path);e({commitInFlight:!0});try{const{title:o,message:a}=await aS(s);return await oS(s,o,a||void 0),await r()?{ok:!0,title:o}:{ok:!0,title:o,warning:"Committed, but the git status refresh failed — reload to confirm"}}catch(o){return{ok:!1,error:o.message}}finally{e({commitInFlight:!1})}},consistency:[],loadConsistency:async()=>{try{const n=await a6();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 h6();return e({gitStatus:r,gitBranch:n,gitAhead:i,gitBranchHygiene:s}),!0}catch{return!1}},agentStatus:null,loadAgentStatus:async()=>{try{const n=await VV();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 WV();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 UV(n,r),await t().loadAgentStatus()},launchPlanAudit:async(n,r)=>{await HV(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 GV(n,r)}catch(o){throw e({pendingReconcile:null}),o}await t().loadAgentStatus()},launchPlanDraft:async(n,r)=>{await KV(n,r),await t().loadAgentStatus()},launchIdeaExtend:async(n,r)=>{await YV(n,r),await t().loadAgentStatus()},launchBatchReconcile:async()=>{e({batchReconcileConsumed:!1}),await QV(),await t().loadAgentStatus()},launchSuggestIdeas:async n=>{await qV(n),await t().loadAgentStatus()},launchRunAll:async n=>{await XV(n),await t().loadAgentStatus()},launchFixReview:async n=>{await ZV(n),await t().loadAgentStatus()},stopAgent:async()=>{await JV(),await t().loadAgentStatus()},pendingReconcile:null,reconcileQueue:[],removeFromReconcileQueue:n=>e(r=>({reconcileQueue:r.reconcileQueue.filter(i=>i.planId!==n)})),batchReconcileConsumed:!1}));function k6(e){return e.includes("running")?"running":e.includes("fail")?"fail":e.every(t=>t==="stale")?"stale":"pass"}function Hm(e){var t,n,r,i;return{qualityStatus:k6([((t=e==null?void 0:e.lint)==null?void 0:t.status)??"stale",((n=e==null?void 0:e.format)==null?void 0:n.status)??"stale"]),testStatus:((r=e==null?void 0:e.test)==null?void 0:r.status)??"stale",consistencyStatus:((i=e==null?void 0:e.consistency)==null?void 0:i.status)??"stale"}}const wl=ie.deskBg,cv=ie.deskLight,_6=ie.deskText,qt=ie.deskTextMuted,S6=ie.deskBorder,Br=ie.deskChalk,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")`,Gm={fontFamily:Ie.serif,fontSize:ne.base,fontWeight:600,color:qt,marginBottom:A[3]},kr={pass:"#2d5a3b",fail:"#5a2d2d",running:"#5a4a2d"},Dn={pass:"#b5d6b5",fail:"#d6a0a0",running:"#d6c4a0"},C6=()=>{const e=W(i=>i.agentStatus),t=W(i=>i.stopAgent),[n,r]=_.useState(!1);return f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:A[6]},children:[f.jsx("div",{style:Gm,children:"Agent"}),f.jsx(We,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:e?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:A[2],marginBottom:A[1],flexShrink:0},children:[f.jsxs("span",{style:{fontFamily:Ie.serif,fontWeight:600,fontSize:ne.sm,color:Br,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.planTitle,e.taskKind==="phase"&&e.phaseIndex!==void 0?` — phase ${e.phaseIndex+1}`:e.taskKind==="audit"?" — audit":e.taskKind==="batch-reconcile"?" — batch reconcile":e.taskKind==="reconcile"?" — reconcile":e.taskKind==="fix-review"?" — fixing review comments":e.taskKind==="draft"?" — drafting":e.taskKind==="extend"?" — extending":e.taskKind==="commit-suggest"?" — suggesting commit message":e.taskKind==="overlap-check"?" — checking overlap":e.taskKind==="sync"?" — syncing to main":e.taskKind==="run-all"?" — run all phases":""," ","· ",eS[e.agentId]]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2]},children:[(()=>{const i={starting:kr.running,running:kr.running,stopping:kr.running,done:kr.pass,error:kr.fail},s={starting:Dn.running,running:Dn.running,stopping:Dn.running,done:Dn.pass,error:Dn.fail};return f.jsx(nt,{surface:"chalkboard",size:"small",fillColor:i[e.status],textColor:s[e.status],children:e.status})})(),(e.status==="running"||e.status==="starting"||e.status==="stopping")&&f.jsx(on,{icon:f.jsx(Pa,{}),variant:"ghost",size:"small",label:"Stop agent",onClick:t,disabled:e.status==="stopping"})]})]}),e.lines.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("span",{style:{fontFamily:Ie.mono,fontSize:ne["2xs"],color:qt,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:A[2],flexShrink:0},children:e.lines[e.lines.length-1]}),f.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto"},children:f.jsx(p_,{title:`${e.lines.length} line${e.lines.length===1?"":"s"}`,expanded:n,onToggle:()=>r(!n),children:f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[1],fontFamily:Ie.mono,fontSize:ne["2xs"],color:qt,paddingTop:A[2],maxHeight:160,overflowY:"auto"},children:e.lines.map((i,s)=>f.jsx("span",{style:{whiteSpace:"pre-wrap"},children:i},`${s}-${i}`))})})})]})]}):f.jsx("div",{style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx("p",{style:{opacity:.5,fontSize:ne.xs,margin:0},children:"No agent running."})})})]})},lS=({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"})]}),P6=({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"})]}),E6=({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 5v14"}),f.jsx("path",{d:"m5 12 7 7 7-7"})]}),T6=({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"})]}),j6=({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:"M21 12a9 9 0 1 1-2.64-6.36"}),f.jsx("polyline",{points:"21 3 21 9 15 9"})]}),R6=({size:e=12})=>f.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M6 4l11 6-11 6z"})}),I6=({size:e=12})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round","aria-hidden":"true",children:[f.jsx("circle",{cx:"10",cy:"10",r:"3"}),f.jsx("path",{d:"M2.5 10h4.5M13 10h4.5"})]}),M6=({size:e=12})=>f.jsx("svg",{width:e,height:e,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"})}),uS=({size:e=14})=>f.jsxs("svg",{width:e,height:e,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"})]}),L6=({size:e=14})=>f.jsxs("svg",{width:e,height:e,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"})]}),fv="papercamp.commitTitle",hv="papercamp.commitMessage",A6=["core","cli","app","server","agent","plans","ideas","docs","settings","stack","ui","ci","config","deps","repo"];function pv(e){try{return localStorage.getItem(e)??""}catch{return""}}function mv(e,t){try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}const D6=()=>{const e=W(K=>K.plans),t=W(K=>K.agentStatus),n=W(K=>K.loadPlans),r=W(K=>K.loadIdeas),i=W(K=>K.loadGitStatus),s=W(K=>K.gitStatus),o=W(K=>K.gitBranch),a=W(K=>K.gitAhead),l=W(K=>K.gitBranchHygiene),u=W(K=>K.commitInFlight),c=W(K=>K.setCommitInFlight),[d,h]=_.useState(!1),[p,m]=_.useState(new Set),[y,w]=_.useState(()=>pv(fv)),[g,x]=_.useState(()=>pv(hv)),[v,b]=_.useState(!1),[P,S]=_.useState(!1),[j,C]=_.useState(null),[T,E]=_.useState(null),[I,M]=_.useState(!1),[O,B]=_.useState(null),[F,z]=_.useState(!1),[D,L]=_.useState(null),[$,k]=_.useState(!1),[V,Q]=_.useState(null),R=_.useMemo(()=>yV(e==null?void 0:e.entries),[e==null?void 0:e.entries]),ue=_.useMemo(()=>{var Ke;return((Ke=R==null?void 0:R.tags)==null?void 0:Ke.find(Oe=>A6.includes(Oe)))??"repo"},[R]),fe=_.useMemo(()=>!!(R!=null&&R.phases.length)&&R.phases.every(K=>K.done),[R]),ce=_.useMemo(()=>{if(!R)return"";const K=R.kind??"feat";return fe?`${K}(${ue}): updates`:`${K}(${ue}): ${R.title}`},[R,ue,fe]),Xe=_.useMemo(()=>{if(!R)return"";const K=R.id?`Refs: ${R.id}`:"";return[!fe&&R.phases.length?R.phases.map(Oe=>`- ${Oe.text}`).join(`
|
|
79
|
+
`):"",K].filter(Boolean).join(`
|
|
80
|
+
|
|
81
|
+
`)},[R,fe]);_.useEffect(()=>{ce&&!y&&w(ce)},[ce,y]);const Le=_.useRef(null);_.useEffect(()=>{const K=t==null?void 0:t.suggestedCommit;if(!K){Le.current=null;return}const Ke=`${K.title}
|
|
82
|
+
${K.message}`;Le.current!==Ke&&(Le.current=Ke,w(K.title),x(K.message))},[t==null?void 0:t.suggestedCommit]),_.useEffect(()=>{Xe&&!g&&x(Xe)},[Xe,g]),_.useEffect(()=>{mv(fv,y)},[y]),_.useEffect(()=>{mv(hv,g)},[g]);const ft=_.useRef(new Set);_.useEffect(()=>{if(!s)return;const K=ft.current;ft.current=new Set(s.map(Ke=>Ke.path)),m(Ke=>{const Oe=new Set;for(const bn of s)(!K.has(bn.path)||Ke.has(bn.path))&&Oe.add(bn.path);return Oe})},[s]);const Ht=_.useCallback(K=>{m(Ke=>{const Oe=new Set(Ke);return Oe.has(K)?Oe.delete(K):Oe.add(K),Oe})},[]),an=_.useCallback(async()=>{if(!(!y.trim()||u)){b(!0),c(!0),E(null);try{await oS([...p],y.trim(),g.trim()||void 0),w(ce),x(""),h(!1),await i()}catch(K){E(K.message)}finally{b(!1),c(!1)}}},[y,g,p,ce,i,u,c]),or=_.useCallback(async()=>{S(!0),C(null);try{await p6(),await i()}catch(K){C(K.message)}finally{S(!1)}},[i]),zi=_.useCallback(async()=>{z(!0),L(null);try{const K=s&&s.length===0;await m6(K?"clean":"dirty"),await Promise.all([i(),n(),r()])}catch(K){L(K.message)}finally{z(!1)}},[s,i,n,r]),Fi=_.useCallback(async()=>{k(!0),Q(null);try{await g6(),await Promise.all([i(),n(),r()])}catch(K){Q(K.message)}finally{k(!1)}},[i,n,r]),Oi=_.useCallback(async()=>{if(p.size!==0){M(!0),B(null);try{const K=await aS([...p]);w(K.title),x(K.message)}catch(K){B(K.message)}finally{M(!1)}}},[p]);return f.jsxs("div",{style:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column",padding:A[6]},children:[f.jsxs("div",{style:{...Gm,display:"flex",alignItems:"center",gap:A[2]},children:["Commit",o&&f.jsx(nt,{surface:"chalkboard",size:"small",children:o})]}),f.jsx(We,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:s&&s.length>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto"},children:f.jsx(p_,{title:`${s.length} file${s.length===1?"":"s"} changed`,expanded:d,onToggle:()=>h(!d),children:f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[2],paddingTop:A[2]},children:s.map(K=>f.jsxs("label",{style:{display:"flex",alignItems:"center",gap:A[2],fontFamily:Ie.mono,fontSize:ne["2xs"],color:Br,cursor:"pointer"},children:[f.jsx("input",{type:"checkbox",checked:p.has(K.path),onChange:()=>Ht(K.path),style:{accentColor:Br}}),f.jsx("span",{style:{color:K.staged?Br:qt,minWidth:24},children:K.status}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:K.path})]},K.path))})})}),f.jsxs("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",gap:A[3],marginTop:A[3]},children:[O&&f.jsx(Xi,{surface:"chalkboard",dismissible:!0,onDismiss:()=>B(null),children:O}),f.jsxs("div",{style:{display:"flex",gap:A[2],alignItems:"center"},children:[f.jsx("div",{style:{flex:1},children:f.jsx(Tc,{surface:"chalkboard",size:"small",placeholder:"Commit title",value:y,onChange:K=>w(K.currentTarget.value)})}),f.jsx(on,{icon:f.jsx(lS,{size:16}),surface:"chalkboard",size:"small",label:"Suggest title and message from the diff",disabled:p.size===0||I,onClick:Oi,wobble:I?1:0})]}),f.jsx(Ta,{surface:"chalkboard",size:"small",placeholder:"Commit message (optional)",value:g,onChange:K=>x(K.currentTarget.value),rows:2}),T&&f.jsx(Xi,{surface:"chalkboard",dismissible:!0,onDismiss:()=>E(null),children:T}),f.jsx(le,{surface:"chalkboard",size:"small",fullWidth:!0,disabled:p.size===0||!y.trim()||v||u,onClick:an,children:v||u?"Committing…":"Commit"})]})]}):f.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:A[3]},children:a>0?f.jsxs(f.Fragment,{children:[f.jsxs("p",{style:{opacity:.5,fontSize:ne.xs,margin:0},children:["All changes committed — ",a," commit",a===1?"":"s"," ready to push."]}),j&&f.jsx(Xi,{surface:"chalkboard",dismissible:!0,onDismiss:()=>C(null),children:j}),f.jsx(le,{surface:"chalkboard",size:"small",icon:f.jsx(P6,{size:14}),disabled:P,onClick:or,children:P?"Pushing…":`Push ${a} commit${a===1?"":"s"}`})]}):f.jsxs(f.Fragment,{children:[f.jsx("p",{style:{opacity:.5,fontSize:ne.xs,margin:0},children:"No changed files."}),D&&f.jsx(Xi,{surface:"chalkboard",dismissible:!0,onDismiss:()=>L(null),children:D}),V&&f.jsx(Xi,{surface:"chalkboard",dismissible:!0,onDismiss:()=>Q(null),children:V}),f.jsxs("div",{style:{display:"flex",gap:A[2],alignItems:"center"},children:[f.jsx(lt,{content:l==="clean-on-main"?"Already on clean main":void 0,surface:"chalkboard",children:f.jsx(le,{surface:"chalkboard",size:"small",icon:f.jsx(T6,{size:14}),disabled:F||l==="clean-on-main",onClick:zi,children:F?"Syncing…":"Sync to main"})}),f.jsx(le,{surface:"chalkboard",size:"small",icon:f.jsx(E6,{size:14}),disabled:$,onClick:Fi,children:$?"Pulling…":"Pull"})]})]})})})]})};function gv(e){const t=e.match(/Found (\d+) errors?\./);return t?Number(t[1]):0}function N6(e,t){const n=gv(e)+gv(t);return n>0?`${n} lint/format issue${n===1?"":"s"} found.`:"Lint or format check failed."}function z6(e){const t=e.match(/Tests\s+(\d+) failed/);return t?`${t[1]} test${t[1]==="1"?"":"s"} failed.`:"Tests failed."}const F6=()=>{const e=W(y=>y.status),t=W(y=>y.runCheck),n=W(y=>y.fixQuality),r=W(y=>y.consistency),i=W(y=>y.plans),s=W(y=>y.setActiveDocTitle),o=Mi(),[a,l]=_.useState(!1),{qualityStatus:u,testStatus:c,consistencyStatus:d}=_.useMemo(()=>Hm(e),[e]),h=u==="running"||c==="running"||d==="running",p=r.length>0,m=_.useCallback(y=>{if(y.kind==="blocked-plan-active"&&y.planId){const w=i==null?void 0:i.entries.find(g=>g.id===y.planId);if(w){o({to:"/plans/$planId",params:{planId:encodeURIComponent(w.title)}});return}}s(y.title),o({to:"/docs/$section",params:{section:y.section==="open-questions"?"questions":"decisions"}})},[i==null?void 0:i.entries,o,s]);return f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:A[6]},children:[f.jsx("div",{style:Gm,children:"Status"}),f.jsx(We,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:(()=>{var P,S,j;const y={...kr,stale:"transparent"},w={...Dn,stale:void 0},g=h,x=p;`${((P=e==null?void 0:e.lint)==null?void 0:P.output)||"(none)"}${((S=e==null?void 0:e.format)==null?void 0:S.output)||"(none)"}`;const v=`Fix the failing tests in this repo. Output from the last test run:
|
|
83
|
+
|
|
84
|
+
${((j=e==null?void 0:e.test)==null?void 0:j.output)||"(no output captured)"}`,b=C=>f.jsx(lt,{content:C.title,surface:"chalkboard",children:f.jsx("button",{type:"button",className:"stack-check-btn",onClick:()=>{g||C.onClick()},disabled:g,style:{cursor:g?"not-allowed":"pointer",opacity:g&&C.status!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsxs(nt,{surface:"chalkboard",size:"small",fillColor:y[C.status],textColor:w[C.status],children:[C.label,f.jsx("span",{style:{visibility:C.status==="running"?"visible":"hidden"},children:"…"})]})})});return f.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:A[3]},children:[f.jsxs("div",{style:{display:"flex",gap:A[2],flexWrap:"wrap",justifyContent:"center"},children:[b({label:"Quality",status:u,title:"Run lint and format checks",onClick:()=>{t("lint"),t("format")}}),b({label:"Tests",status:c,title:"Run tests",onClick:()=>t("test")}),b({label:"Consistency",status:d,title:"Run codebase consistency (knip + dependency-cruiser)",onClick:()=>t("consistency")}),f.jsxs("div",{children:[f.jsx(lt,{content:x?"Show plan/decision doc findings":"No plan/decision doc findings",surface:"chalkboard",children:f.jsx("button",{type:"button",className:x?"stack-check-btn":void 0,onClick:()=>{x&&l(C=>!C)},style:{cursor:x?"pointer":"default",display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsx(nt,{surface:"chalkboard",size:"small",fillColor:x?kr.fail:kr.pass,textColor:x?Dn.fail:Dn.pass,children:"Docs"})})}),a&&x&&f.jsx("div",{style:{marginTop:A[2],display:"flex",flexDirection:"column",gap:A[2]},children:r.map((C,T)=>f.jsx("div",{style:{fontFamily:Ie.mono,fontSize:ne["2xs"],color:qt},children:f.jsx("button",{type:"button",onClick:()=>m(C),style:{background:"none",border:"none",padding:0,color:Br,textDecoration:"underline",cursor:"pointer",font:"inherit",textAlign:"left"},children:C.message})},`${C.kind}-${C.title}-${T}`))})]})]}),(()=>{var E,I,M;let C,T=null;return g?C=f.jsx("span",{style:{color:qt},children:"Running checks…"}):u==="fail"?(C=f.jsx("span",{style:{color:qt},children:N6(((E=e==null?void 0:e.lint)==null?void 0:E.output)??"",((I=e==null?void 0:e.format)==null?void 0:I.output)??"")}),T=f.jsx("button",{type:"button",onClick:n,style:{background:"none",border:"none",padding:0,color:Br,textDecoration:"underline",cursor:"pointer",font:"inherit"},children:"Suggested fix: run biome --write"})):c==="fail"?(C=f.jsx("span",{style:{color:qt},children:z6(((M=e==null?void 0:e.test)==null?void 0:M.output)??"")}),T=f.jsxs("span",{style:{color:Br},children:["Suggested fix: ",f.jsx(Ah,{text:v,surface:"chalkboard"})]})):d==="fail"?(C=f.jsx("span",{style:{color:qt},children:"Codebase consistency failed (knip / dependency-cruiser)."}),T=f.jsx("span",{style:{color:qt,opacity:.8},children:"Run pnpm run consistency for details."})):p?C=f.jsx("span",{style:{color:qt},children:"Plan/decision doc issues — see the Docs stamp."}):u==="pass"&&c==="pass"&&d==="pass"?C=f.jsx("span",{style:{color:Dn.pass},children:"All checks passing."}):C=f.jsx("span",{style:{color:qt,opacity:.6},children:"Checks haven't run yet."}),f.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",gap:A[1],fontFamily:Ie.handwritten,fontSize:ne.sm},children:[C,f.jsx("span",{style:{visibility:T?"visible":"hidden"},children:T??" "})]})})()]})})()})]})},O6=({open:e,onToggle:t,pinned:n=!1})=>{const r=e||n,i=W(S=>S.loadProgress),s=W(S=>S.loadPlans),o=W(S=>S.status),a=W(S=>S.loadStatus),l=W(S=>S.consistency),u=W(S=>S.loadConsistency),c=W(S=>S.loadGitStatus),d=W(S=>S.agentStatus),h=W(S=>S.loadAgentStatus),p=W(S=>S.loadSuggestions),m=Ca(),y=_.useRef({loadProgress:i,loadPlans:s,loadStatus:a,loadConsistency:u,loadGitStatus:c,loadAgentStatus:h,loadSuggestions:p});_.useEffect(()=>{y.current={loadProgress:i,loadPlans:s,loadStatus:a,loadConsistency:u,loadGitStatus:c,loadAgentStatus:h,loadSuggestions:p}}),_.useEffect(()=>{y.current.loadProgress(),y.current.loadStatus(),y.current.loadConsistency(),y.current.loadGitStatus(),y.current.loadAgentStatus()},[]),_.useEffect(()=>{const S=new EventSource("/api/activity/stream"),j={},C=(T,E,I)=>{j[T]&&clearTimeout(j[T]),j[T]=setTimeout(E,I)};return S.onmessage=T=>{const E=JSON.parse(T.data);if(E.type==="status"){C("status",()=>y.current.loadStatus(),80);return}if(E.type==="agent"){C("agent",()=>y.current.loadAgentStatus(),120);return}E.message==="changed"&&C("activity",()=>{y.current.loadProgress(),y.current.loadPlans(),y.current.loadSuggestions(),y.current.loadStatus(),y.current.loadConsistency(),y.current.loadGitStatus(),y.current.loadAgentStatus()},250)},()=>{for(const T of Object.values(j))T&&clearTimeout(T);S.close()}},[]);const{qualityStatus:w,testStatus:g,consistencyStatus:x}=_.useMemo(()=>Hm(o),[o]),v=l.length>0,b=w==="fail"||g==="fail"||x==="fail"||v,P=(d==null?void 0:d.status)==="running"||(d==null?void 0:d.status)==="starting"||(d==null?void 0:d.status)==="stopping";return f.jsxs(f.Fragment,{children:[f.jsx(kc,{children:!r&&f.jsx(Ti.div,{initial:m?void 0:{opacity:0,x:20},animate:{opacity:1,x:0},exit:m?void 0:{opacity:0,x:20},transition:{duration:m?0:.2,ease:"easeOut"},style:{position:"fixed",right:0,top:"50%",transform:"translateY(-50%)",zIndex:300,borderRadius:"6px 0 0 6px",background:wl,backgroundImage:`${dv}, linear-gradient(135deg, ${cv} 0%, ${wl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)"},children:f.jsx(on,{icon:P?f.jsx(Wu,{size:"small",surface:"chalkboard",label:"Agent running"}):b?f.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:Dn.fail,boxShadow:"0 0 6px rgba(214, 160, 160, 0.9)"}}):f.jsx("span",{style:{fontSize:ne["2xs"]},children:"S"}),surface:"chalkboard",size:"small",label:P?"Open stack panel — agent running":b?"Open stack panel — checks failing":"Open stack panel",onClick:t,style:{width:28,height:64,borderRadius:"6px 0 0 6px",boxShadow:P?"inset 0 0 0 1px rgba(214, 196, 160, 0.6)":b?"inset 0 0 0 1px rgba(214, 160, 160, 0.6)":void 0}})})}),f.jsxs(Ti.div,{animate:{x:r?0:"100%"},transition:{duration:m?0:.3,ease:[.4,0,.2,1]},style:{position:"fixed",top:0,right:0,bottom:0,width:g_.stackPanelWidth,borderLeft:"4px solid rgba(61, 53, 43, 0.12)",backgroundColor:wl,backgroundImage:`${dv}, linear-gradient(135deg, ${cv} 0%, ${wl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",color:_6,display:"flex",flexDirection:"column",overflow:"hidden",zIndex:300},children:[f.jsxs("div",{style:{height:80,padding:`0 ${A[6]}`,display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[f.jsx("span",{style:{fontFamily:Ie.serif,fontSize:ne.base,fontWeight:700,color:Br},children:"Stack"}),!n&&f.jsx(on,{icon:f.jsx("span",{style:{fontSize:ne.sm,lineHeight:1},children:"×"}),surface:"chalkboard",size:"small",label:"Close stack panel",onClick:t,style:{width:28,height:28,border:`1px solid ${S6}`}})]}),f.jsx(c0,{surface:"chalkboard"}),f.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontFamily:Ie.body},children:[f.jsx(C6,{}),f.jsx(c0,{surface:"chalkboard"}),f.jsx(F6,{}),f.jsx(D6,{})]})]})]})},B6=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}},fW=async e=>{try{return(await fetch("/api/icon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUri:e})})).ok}catch{return!1}},$6=async()=>{try{const e=await fetch("/api/package-name");return e.ok?e.json():null}catch{return null}},V6=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase()),W6=()=>{const[e,t]=_.useState(null),[n,r]=_.useState(null),[i,s]=_.useState(!0);return _.useEffect(()=>{let o=!1;return s(!0),Promise.all([$6().then(a=>{!o&&a&&t(V6(a))}),B6().then(a=>{o||r(a)})]).finally(()=>{o||s(!1)}),()=>{o=!0}},[]),{projectName:e,iconDataUri:n,loading:i}},U6=["decisions","questions","progress","repo-docs"];function Km(){const{planId:e}=va({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function H6(){const{ideaId:e}=va({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function G6(){const{section:e}=va({strict:!1});return U6.includes(e)?e:null}function hW(){const e=G6(),t=W(r=>r.activeDocTitle),n=W(r=>r.repoDocs);return e??(t&&n.some(r=>r.name===t)?"repo-docs":null)}const K6=250;function cS(e,t,n={}){const{debounceMs:r=K6,...i}=n,[s,o]=_.useState(e);_.useEffect(()=>{const u=setTimeout(()=>o(e),r);return()=>clearTimeout(u)},[e,r]);const{threshold:a,limit:l}=i;return _.useMemo(()=>IV(s,t,{threshold:a,limit:l}),[s,t,a,l])}const Y6=({size:e="md"})=>{const{projectName:t,iconDataUri:n,loading:r}=W6(),i=e==="sm"?18:20,s=e==="sm"?ne.sm:ne.md;return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],minWidth:0},children:[n?f.jsx("img",{src:n,alt:"",style:{width:i,height:i,objectFit:"contain",flexShrink:0}}):f.jsx(Jz,{icon:f.jsx(rN,{}),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"})]})},q6=({routeKey:e,children:t,mobileOpen:n,onMobileClose:r})=>{const i=Ca(),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:g_.sidebarWidth,flexShrink:0,height:"var(--pc-sidebar-h, 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:A[5],position:"relative"},children:f.jsx(kc,{mode:"wait",children:f.jsx(Ti.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)})})})]})},sf={pass:"success",fail:"error",running:"warning",stale:"neutral"},of={fontSize:ne["2xs"]},Q6=()=>{const e=W(g=>g.status),t=W(g=>g.agentStatus),n=W(g=>g.gitStatus),r=W(g=>g.gitBranch),i=W(g=>g.gitAhead),s=W(g=>g.runCheck),o=W(g=>g.fixQuality),a=W(g=>g.quickCommit),l=W(g=>g.commitInFlight),{toast:u}=wn(),{qualityStatus:c,testStatus:d,consistencyStatus:h}=Hm(e),p=c==="running"||d==="running"||h==="running",m=(t==null?void 0:t.status)==="running"||(t==null?void 0:t.status)==="starting"||(t==null?void 0:t.status)==="stopping",y=(n==null?void 0:n.length)??0,w=async()=>{if(l||y===0)return;const g=await a();g.ok?u({title:"Committed",description:g.warning??g.title,variant:g.warning?"warning":"success"}):u({title:"Commit failed",description:g.error,variant:"error"})};return f.jsxs("div",{style:{...Sc("kraft"),display:"flex",alignItems:"center",gap:A[3],height:"32px",padding:`0 ${A[4]}`,borderBottom:"1px solid rgba(0,0,0,0.08)",fontSize:ne["2xs"],flexShrink:0,boxSizing:"border-box",overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],flexShrink:0},children:[f.jsxs("span",{style:{display:"flex",alignItems:"center",gap:A[1]},children:[f.jsx("span",{style:{opacity:.5},children:"⌥"}),f.jsx("code",{style:{color:ie.textPrimary},children:r??"no branch"})]}),i>0&&f.jsxs("span",{style:{opacity:.6},children:["↑",i]}),f.jsx("span",{style:{opacity:.6},children:y>0?`${y} changed`:"clean"}),m&&f.jsx(Wu,{size:"small",label:`Agent ${t==null?void 0:t.status}…`})]}),f.jsx("div",{style:{flex:1}}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2],flexShrink:0},children:[f.jsx(lt,{content:"Quality (lint + format)",children:f.jsx(nt,{size:"small",variant:sf[c],children:"Quality"})}),f.jsx(lt,{content:"Tests",children:f.jsx(nt,{size:"small",variant:sf[d],children:"Tests"})}),f.jsx(lt,{content:"Codebase consistency (knip + dependency-cruiser)",children:f.jsx(nt,{size:"small",variant:sf[h],children:"Consistency"})}),f.jsx(lt,{content:"Commit all changes with an auto-suggested message",children:f.jsx(le,{variant:"ghost",size:"small",icon:f.jsx(I6,{}),style:of,disabled:l||y===0,onClick:w,children:l?"Committing…":y>0?`Commit (${y})`:"Commit"})}),f.jsx(le,{variant:"ghost",size:"small",icon:f.jsx(R6,{}),style:of,disabled:p,onClick:()=>s("test"),children:"Run tests"}),f.jsx(le,{variant:"ghost",size:"small",icon:f.jsx(lS,{}),style:of,disabled:p||c!=="fail",onClick:o,children:"Fix quality"})]})]})},X6=({children:e})=>f.jsx("h1",{className:"text-4xl",style:{fontFamily:Ie.serif,fontWeight:600,color:ie.textPrimary,margin:`0 0 ${A[6]}`,lineHeight:1.1},children:e}),Ia=()=>{const e=W(s=>s.loadPlans),{toast:t}=wn(),[n,r]=_.useState(!1);return{patch:async(s,o,a)=>{r(!0);try{return await f6(s,o),await e(),!0}catch(l){return t({title:(a==null?void 0:a.errorTitle)??"Update failed",description:l.message,variant:"error"}),!1}finally{r(!1)}},updating:n}};function dS(){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"}}function Z6(e){const t=e.phases.map((i,s)=>`${s+1}. [${i.done?"x":" "}] ${i.text}`).join(`
|
|
85
|
+
`),n=e.log&&e.log.length>0?e.log.map(i=>`- ${i.date}: ${i.text}`).join(`
|
|
86
|
+
`):"(none)",r=e.clarifications&&e.clarifications.length>0?e.clarifications.map(i=>`- ${i.date}: ${i.text}`).join(`
|
|
87
|
+
`):"(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.
|
|
88
|
+
|
|
89
|
+
Plan body: ${e.body}
|
|
90
|
+
|
|
91
|
+
Current phases:
|
|
92
|
+
${t}
|
|
93
|
+
|
|
94
|
+
Log entries (issues, bugs, and review notes recorded so far):
|
|
95
|
+
${n}
|
|
96
|
+
|
|
97
|
+
Clarifications (answered scope/design questions):
|
|
98
|
+
${r}
|
|
99
|
+
|
|
100
|
+
Task:
|
|
101
|
+
1. Read the plan above, then inspect the relevant code in this repo.
|
|
102
|
+
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.
|
|
103
|
+
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.
|
|
104
|
+
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.
|
|
105
|
+
|
|
106
|
+
Rules:
|
|
107
|
+
- Never modify, reorder, check, uncheck, or delete any existing line, even if it looks stale, wrong, or redundant.
|
|
108
|
+
- Never touch the YAML frontmatter.
|
|
109
|
+
- Append only: new unchecked phases at the end of the list, plus the single Log line.`}function J6(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(`
|
|
110
|
+
`):"(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.
|
|
111
|
+
|
|
112
|
+
${t?"Plan":"Idea"} body: ${e.body}
|
|
113
|
+
|
|
114
|
+
Current phases:
|
|
115
|
+
${r}
|
|
116
|
+
|
|
117
|
+
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.
|
|
118
|
+
|
|
119
|
+
1. Read the ${n} above, then inspect the relevant code in this repo to find what has actually changed since the prose was written.
|
|
120
|
+
2. Reword only the sentences or phrases that are now stale: fix references and superseded approaches. Leave everything else byte-identical.
|
|
121
|
+
3. Do not summarize, restructure, or "improve" prose that is still accurate — an unnecessary rewrite is a failure of this task, not a bonus.
|
|
122
|
+
|
|
123
|
+
Hard guardrails, never violate these:
|
|
124
|
+
- Never touch the YAML frontmatter (id, title, kind, status, created, idea, tags, or any other field).
|
|
125
|
+
- Never un-check, check, delete, or reorder any phase line, checked or unchecked.
|
|
126
|
+
- Never add or remove phases.
|
|
127
|
+
- Never touch the Log or Clarifications sections.
|
|
128
|
+
- If nothing is stale, make no edits at all.`}function e8(e){const t=e.log&&e.log.length>0?e.log.map(n=>`- ${n.date}: ${n.text}`).join(`
|
|
129
|
+
`):"(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.
|
|
130
|
+
|
|
131
|
+
Current idea body, in full (do not modify this):
|
|
132
|
+
${e.body}
|
|
133
|
+
|
|
134
|
+
Prior Log entries:
|
|
135
|
+
${t}
|
|
136
|
+
|
|
137
|
+
Task:
|
|
138
|
+
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.
|
|
139
|
+
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.
|
|
140
|
+
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).
|
|
141
|
+
|
|
142
|
+
Keep unchanged:
|
|
143
|
+
- the YAML frontmatter (id, title)
|
|
144
|
+
- the \`## ${e.id??"IDEA-N"}: ${e.title}\` heading line and the original body prose beneath it
|
|
145
|
+
|
|
146
|
+
Append only — never rewrite or delete the idea's existing body or prior Log lines.`}function t8(e){return`You are fleshing out 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.
|
|
147
|
+
|
|
148
|
+
This idea was just promoted from an AI-generated one-liner suggestion — its current body is only that one-liner, with no deeper context yet:
|
|
149
|
+
${e.body}
|
|
150
|
+
|
|
151
|
+
Task:
|
|
152
|
+
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.
|
|
153
|
+
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. Sharpen the idea's original intent, do not redirect it.
|
|
154
|
+
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).
|
|
155
|
+
|
|
156
|
+
Keep unchanged:
|
|
157
|
+
- the YAML frontmatter (id, title, status)
|
|
158
|
+
- the original body prose beneath the frontmatter
|
|
159
|
+
|
|
160
|
+
Append only — never rewrite or delete the idea's existing body or prior Log lines.`}function n8(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(`
|
|
161
|
+
`);return`### ${i.id??"no id"}: ${i.title} (status: ${i.status}${i.idea?`, idea: ${i.idea}`:""})
|
|
162
|
+
${i.body}
|
|
163
|
+
${s||" (no phases yet)"}`}).join(`
|
|
164
|
+
|
|
165
|
+
`):"(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.
|
|
166
|
+
|
|
167
|
+
Idea body, in full:
|
|
168
|
+
${e.body}
|
|
169
|
+
|
|
170
|
+
## What drafting adds to the file (see papercamp/about.md)
|
|
171
|
+
|
|
172
|
+
The file already has YAML frontmatter (id, title, status, created, …) and the prose body above. Drafting means:
|
|
173
|
+
|
|
174
|
+
1. Add a \`type\` field to the frontmatter: the Conventional Commits type that best fits (\`feat | fix | chore | docs | refactor\` — most are \`feat\`).
|
|
175
|
+
2. Add 1-4 short subsystem \`tags\` to the frontmatter if it has none.
|
|
176
|
+
3. Append a \`### Phases\` checklist at the end of the file (after any \`### Log\` section move it below the phases — Phases, then Log):
|
|
177
|
+
|
|
178
|
+
\`\`\`
|
|
179
|
+
### Phases
|
|
180
|
+
- [ ] Short phase title
|
|
181
|
+
Optional description of the phase, indented with 6 spaces.
|
|
182
|
+
\`\`\`
|
|
183
|
+
|
|
184
|
+
Hard rules:
|
|
185
|
+
- 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").
|
|
186
|
+
- Never rewrite or delete the existing prose body or \`### Log\` entries — the idea's history stays intact.
|
|
187
|
+
- 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.
|
|
188
|
+
|
|
189
|
+
## Every other open (non-done) entity, for scope context
|
|
190
|
+
|
|
191
|
+
${r}
|
|
192
|
+
|
|
193
|
+
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.`}function r8(e,t){const n=e.length?e.map(i=>`### ${i.id??"no id"}: ${i.title}
|
|
194
|
+
${i.body}`).join(`
|
|
195
|
+
|
|
196
|
+
`):"(no ideas yet)",r=t.length?t.map(i=>`- ${i.date}: ${i.title} — ${i.description}`).join(`
|
|
197
|
+
`):"(none yet)";return`You are scanning this repository for ideas worth suggesting, to append to papercamp/suggestions.md — a lightweight holding pen, sibling to decisions.md/open-questions.md/progress.md. Edit only that one file.
|
|
198
|
+
|
|
199
|
+
Existing ideas (do not repeat anything already covered here):
|
|
200
|
+
${n}
|
|
201
|
+
|
|
202
|
+
Existing suggestions already in the holding pen (do not repeat these either):
|
|
203
|
+
${r}
|
|
204
|
+
|
|
205
|
+
Task:
|
|
206
|
+
1. Explore this codebase for gaps, rough edges, or "you might want to do X" hunches that aren't already an idea or an existing suggestion above — things like missing error handling, an obvious follow-up to recent work, a TODO left in code, or a UX gap you notice while reading the app.
|
|
207
|
+
2. For each genuinely new one you find (0 to a handful — do not force a quota), append one line to papercamp/suggestions.md formatted exactly \`- YYYY-MM-DD: Title — one-line description\`, using today's date. Keep the title short (a few words, like an idea title) and the description to a single physical line (no literal line breaks).
|
|
208
|
+
3. If you find nothing worth suggesting, make no edits at all — no empty line, no placeholder.
|
|
209
|
+
|
|
210
|
+
Rules:
|
|
211
|
+
- Append only — never modify, reorder, or delete any existing line in suggestions.md.
|
|
212
|
+
- Never create papercamp/ideas/ files or touch ideas/index.md — a suggestion is not an idea until a human promotes it.
|
|
213
|
+
- Never touch any other file in the repo.`}const Lc=({idea:e,otherPlans:t})=>{const n=W(h=>h.launchPlanDraft),r=W(h=>h.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,errorMessage:o,run:a}=dS(),{toast:l}=wn(),u=()=>{const h=e.id;h&&a(async()=>{try{await n(h,n8(e,t))}catch(p){throw l({title:"Draft failed",description:p.message,variant:"error"}),p}})},c=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(lt,{content:d,children:f.jsx(le,{variant:"ghost",size:"small",onClick:u,disabled:i||s==="loading"||!e.id,style:{color:s==="error"?ie.accentRoseDark:ie.textSecondary},children:c})})},i8=({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 u=()=>a(l.scrollHeight-l.clientHeight>1);u();const c=new ResizeObserver(u);return c.observe(l),()=>c.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:`${A[1]} 0`,font:"inherit",fontSize:ne.xs,opacity:.6,cursor:"pointer",textDecoration:"underline"},children:i?"Show less":"Show more"})]})},Di=({id:e})=>e?f.jsx(nt,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}):null,fS={"in-progress":"#C89A5A",planned:"#6A9B72",idea:"#8A9BAA",review:"#9B7AB5",done:"#8A7A8A",dropped:"#A06060"},Ym={idea:"Idea",planned:"Planned","in-progress":"In progress",review:"Review",done:"Done",dropped:"Dropped"},ir={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"}},hS={open:"Open",done:"Done",dropped:"Dropped"},Yu={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"}},s8={draft:"Draft",open:"Open",closed:"Closed",merged:"Merged"},yv={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"}},o8={approved:"Approved","changes-requested":"Changes requested","review-required":"Review required"},xv={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"}},pW={decided:{fill:"rgba(143, 185, 150, 0.25)",text:ie.accentGreenDark},superseded:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"}},mW={open:{fill:"rgba(212, 163, 115, 0.25)",text:ie.accentAmberDark},resolved:{fill:"rgba(143, 185, 150, 0.25)",text:ie.accentGreenDark}},a8=({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(nt,{size:"small",fillColor:yv[e.state].fill,textColor:yv[e.state].text,children:f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:A[1]},children:[f.jsx(M6,{}),"#",e.number," ",s8[e.state]]})})}),pS=({pct:e,color:t,height:n=6})=>f.jsx(_z,{value:e,color:t,height:n}),l8=({pr:e})=>{const{reviewDecision:t,unresolvedThreadCount:n,hasNewCommentsSincePush:r}=e;return!t&&!n?null:f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:A[2]},children:[t&&f.jsx(nt,{size:"small",fillColor:xv[t].fill,textColor:xv[t].text,children:o8[t]}),!!n&&f.jsxs(nt,{size:"small",fillColor:ir["in-progress"].fill,textColor:ir["in-progress"].text,children:[n," unaddressed comment",n===1?"":"s",r?" · new":""]})]})},u8=({open:e,onClose:t,onAdd:n})=>{const[r,i]=_.useState(""),[s,o]=_.useState(""),[a,l]=_.useState(!1),[u,c]=_.useState(!1),[d,h]=_.useState(null),[p,m]=_.useState(null),[y,w]=_.useState(!1),[g,x]=_.useState(null),[v,b]=_.useState(null),P=W(z=>{var D;return((D=z.plans)==null?void 0:D.entries)??[]}),{patch:S}=Ia(),j=W(z=>z.agentStatus),C=j!==null&&j.status!=="done"&&j.status!=="error",T=Mi(),E=cS(r,P.map(z=>({id:z.id,title:z.title,body:z.body,tags:z.tags,log:z.log})));_.useEffect(()=>{e&&(i(""),o(""),l(!1),c(!1),h(null),w(!1),x(null),b(null))},[e]);const I=z=>{t(),T({to:"/plans/$planId",params:{planId:encodeURIComponent(z)}})},M=async()=>{const z=`${r.trim()}${s.trim()?`
|
|
214
|
+
|
|
215
|
+
${s.trim()}`:""}`;if(z){w(!0),b(null),x(null);try{const D=P.map(L=>({id:L.id,title:L.title,body:L.body,tags:L.tags}));x(await sS(z,D))}catch(D){b(D.message)}finally{w(!1)}}},O=z=>{const D=P.find(L=>L.id===z);D&&I(D.title)},B=async(z,D,L)=>{m(z);const k={date:new Date().toISOString().slice(0,10),text:r.trim()},V=await S(D,{log:[...L??[],k]},{errorTitle:"Extend failed"});m(null),V&&t()},F=async z=>{if(z.preventDefault(),!(!r.trim()||u)){h(null),c(!0);try{await n({title:r.trim(),content:s.trim()||void 0,kind:a?"note":void 0}),t()}catch(D){h(D.message)}finally{c(!1)}}};return f.jsx(Ea,{open:e,onClose:t,title:"New idea",size:"small",children:f.jsxs("form",{onSubmit:F,style:{display:"flex",flexDirection:"column",gap:A[4]},children:[f.jsx(Tc,{label:"Title",value:r,onChange:z=>i(z.target.value),placeholder:"Idea title…",disabled:u,autoFocus:!0,required:!0}),E.length>0&&f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("span",{style:{fontSize:ne.sm,opacity:.6,fontWeight:600},children:"Similar ideas"}),E.map(({candidate:z})=>{const D={id:z.id??null,title:z.title,body:z.body,log:z.log},L=P.filter($=>$.id!==z.id);return f.jsx(We,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2],minWidth:0},children:[f.jsx(Di,{id:z.id}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:z.title})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(le,{type:"button",variant:"ghost",size:"small",onClick:()=>I(z.title),children:"Open it"}),f.jsx(le,{type:"button",variant:"ghost",size:"small",disabled:!z.id||!r.trim()||p!==null,onClick:()=>z.id&&B(z.id,z.title,z.log),children:p===z.id?"Extending…":"Extend it instead"}),f.jsx(Lc,{idea:D,otherPlans:L})]})]})},z.id??z.title)})]}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("div",{children:f.jsx(le,{type:"button",variant:"ghost",size:"small",disabled:!r.trim()||y||C,onClick:M,children:y?"Checking overlap…":"Check overlap"})}),v&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:ne.sm},children:v}),g&&f.jsx(We,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[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:ne.sm,opacity:.8},children:g.reasoning}),g.targetId&&f.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:f.jsx(le,{type:"button",variant:"ghost",size:"small",onClick:()=>O(g.targetId),children:"Open it"})})]})})]}),f.jsx(Ta,{label:"Description",value:s,onChange:z=>o(z.target.value),placeholder:"Optional details…",disabled:u,rows:4}),f.jsx(wF,{label:"Note — never needs a plan",checked:a,onChange:z=>l(z.target.checked),disabled:u}),d&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:ne.sm},children:d}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(le,{type:"button",variant:"ghost",onClick:t,disabled:u,children:"Cancel"}),f.jsx(le,{type:"submit",variant:"primary",disabled:!r.trim()||u,children:"Add"})]})]})})},c8=({suggestion:e,onClose:t})=>{const n=W(c=>c.promoteSuggestion),r=W(c=>c.launchIdeaExtend),[i,s]=_.useState(!1),[o,a]=_.useState(null),{toast:l}=wn();_.useEffect(()=>{e&&(s(!1),a(null))},[e]);const u=async()=>{if(e){s(!0),a(null);try{const c=await n(e),d=W.getState().ideaEntries.find(h=>h.id===c);if(d)try{await r(c,t8(d))}catch(h){l({title:"Idea created, but the refine agent failed to launch",description:h.message,variant:"error"})}t()}catch(c){a(c.message)}finally{s(!1)}}};return f.jsx(Ea,{open:e!==null,onClose:t,title:(e==null?void 0:e.title)??"",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[4]},children:[f.jsx("p",{style:{margin:0,opacity:.8},children:e==null?void 0:e.description}),o&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:ne.sm},children:o}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(le,{type:"button",variant:"ghost",onClick:t,disabled:i,children:"Cancel"}),f.jsx(le,{type:"button",variant:"primary",onClick:u,disabled:i,children:i?"Moving…":"Move to ideas"})]})]})})},af=({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?ie.accentGreenDark:ie.accentRoseDark},children:t.text},`${t.type}-${n}`)})}),vv=e=>f.jsx("h4",{style:{fontFamily:Ie.serif,fontSize:ne.xs,fontWeight:600,margin:`0 0 ${A[2]}`,opacity:.65},children:e}),d8=({plan:e,before:t,onApprove:n,onDiscard:r,queuePosition:i})=>{const[s,o]=_.useState(!1),a=e.body!==t.body,l=e.phases.map((c,d)=>({phase:c,before:t.phases[d],index:d})).filter(({phase:c,before:d})=>d!==void 0&&(c.text!==d.text||(c.description??"")!==(d.description??""))),u=async()=>{o(!0);try{await r()}finally{o(!1)}};return f.jsx(Ea,{open:!0,title:i?`Review reconcile changes (${i.index} of ${i.total})`:"Review reconcile changes",size:"large",onClose:u,children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[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:[vv("Body"),f.jsx("p",{className:"text-base",style:{margin:0,lineHeight:Uu.normal},children:f.jsx(af,{tokens:ef(t.body,e.body)})})]}),l.length>0&&f.jsxs("div",{children:[vv("Phases"),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[3]},children:l.map(({phase:c,before:d,index:h})=>f.jsxs("div",{className:"text-sm",style:{lineHeight:Uu.normal},children:[f.jsx(af,{tokens:ef(d.text,c.text)}),(c.description||d.description)&&f.jsx("div",{style:{opacity:.85,marginTop:A[1]},children:f.jsx(af,{tokens:ef(d.description??"",c.description??"")})})]},h))})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(le,{variant:"danger",size:"small",onClick:u,disabled:s,children:"Discard"}),f.jsx(le,{variant:"primary",size:"small",onClick:n,disabled:s,children:"Approve"})]})]})})},mS={fontFamily:Ie.serif,fontWeight:600,fontSize:"1.75rem",lineHeight:Uu.tight},f8=()=>{const e=W(o=>o.launchBatchReconcile),t=W(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(le,{variant:"ghost",size:"small",onClick:s,disabled:i||n,style:{color:ie.textSecondary},children:"Actualise all"})},h8=({onAdd:e,disabled:t})=>{const[n,r]=_.useState(!1),[i,s]=_.useState(""),[o,a]=_.useState(null),[l,u]=_.useState(!1),c=()=>{r(!1),s(""),a(null)},d=async()=>{let h;try{h=AV(i)}catch(p){a(p instanceof Error?p.message:"Could not parse findings");return}u(!0),a(null);try{await e(h),c()}finally{u(!1)}};return f.jsxs(f.Fragment,{children:[f.jsx(lt,{content:"Add /code-review findings as phases",children:f.jsx(on,{variant:"ghost",size:"small",onClick:()=>r(!0),disabled:t,"aria-label":"Add code-review findings as phases",icon:f.jsx(iN,{size:16})})}),f.jsx(Ea,{open:n,onClose:c,title:"Add /code-review findings",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[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(Ta,{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(Xi,{variant:"warning",children:["Could not add phases — ",o]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(le,{type:"button",variant:"ghost",onClick:c,disabled:l,children:"Cancel"}),f.jsx(le,{type:"button",variant:"primary",onClick:d,disabled:l||!i.trim(),children:"Add phases"})]})]})})]})},p8=wV.map(e=>({value:e,label:e})),m8=({open:e,onClose:t,onAdd:n})=>{const[r,i]=_.useState(""),[s,o]=_.useState(""),[a,l]=_.useState("feat"),[u,c]=_.useState(!1),[d,h]=_.useState(null),[p,m]=_.useState(null),[y,w]=_.useState(!1),[g,x]=_.useState(null),[v,b]=_.useState(null),P=W(D=>{var L;return((L=D.plans)==null?void 0:L.entries)??[]}),{patch:S}=Ia(),j=W(D=>D.agentStatus),C=j!==null&&j.status!=="done"&&j.status!=="error",T=Mi(),{toast:E}=wn(),I=cS(r,P.map(D=>({id:D.id,title:D.title,body:D.body,tags:D.tags,log:D.log})));_.useEffect(()=>{e&&(i(""),o(""),l("feat"),c(!1),h(null),w(!1),x(null),b(null))},[e]),_.useEffect(()=>{x(null),b(null)},[r,s]);const M=D=>{t(),T({to:"/plans/$planId",params:{planId:encodeURIComponent(D)}})},O=async()=>{const D=`${r.trim()}${s.trim()?`
|
|
216
|
+
|
|
217
|
+
${s.trim()}`:""}`;if(D){w(!0),b(null),x(null);try{const L=P.map($=>({id:$.id,title:$.title,body:$.body,tags:$.tags}));x(await sS(D,L))}catch(L){b(L.message)}finally{w(!1)}}},B=D=>{const L=P.find($=>$.id===D);L?M(L.title):E({title:"Plan not found",description:`No plan with id ${D}`,variant:"error"})},F=async(D,L,$)=>{m(D);const V={date:new Date().toISOString().slice(0,10),text:r.trim()},Q=await S(L,{log:[...$??[],V]},{errorTitle:"Extend failed"});m(null),Q&&t()},z=async D=>{if(D.preventDefault(),!(!r.trim()||u)){h(null),c(!0);try{await n({title:r.trim(),content:s.trim()||void 0,kind:a}),t()}catch(L){h(L.message)}finally{c(!1)}}};return f.jsx(Ea,{open:e,onClose:t,title:"Quick plan",size:"small",children:f.jsxs("form",{onSubmit:z,style:{display:"flex",flexDirection:"column",gap:A[4]},children:[f.jsx(Tc,{label:"Title",value:r,onChange:D=>i(D.target.value),placeholder:"Backlog item title…",disabled:u,autoFocus:!0,required:!0}),I.length>0&&f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("span",{style:{fontSize:ne.sm,opacity:.6,fontWeight:600},children:"Similar ideas"}),I.map(({candidate:D})=>{const L={id:D.id??null,title:D.title,body:D.body,log:D.log},$=P.filter(k=>k.id!==D.id);return f.jsx(We,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2],minWidth:0},children:[f.jsx(Di,{id:D.id}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:D.title})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(le,{type:"button",variant:"ghost",size:"small",onClick:()=>M(D.title),children:"Open it"}),f.jsx(le,{type:"button",variant:"ghost",size:"small",disabled:!D.id||!r.trim()||p!==null,onClick:()=>D.id&&F(D.id,D.title,D.log),children:p===D.id?"Extending…":"Extend it instead"}),f.jsx(Lc,{idea:L,otherPlans:$})]})]})},D.id??D.title)})]}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("div",{children:f.jsx(le,{type:"button",variant:"ghost",size:"small",disabled:!r.trim()||y||C,onClick:O,children:y?"Checking overlap…":"Check overlap"})}),v&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:ne.sm},children:v}),g&&f.jsx(We,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[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:ne.sm,opacity:.8},children:g.reasoning}),g.targetId&&f.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:f.jsx(le,{type:"button",variant:"ghost",size:"small",onClick:()=>B(g.targetId),children:"Open it"})})]})})]}),f.jsx(f_,{label:"Kind",value:a,onChange:D=>l(D),options:p8,disabled:u}),f.jsx(Ta,{label:"Description",value:s,onChange:D=>o(D.target.value),placeholder:"Optional details…",disabled:u,rows:4}),d&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:ne.sm},children:d}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(le,{type:"button",variant:"ghost",onClick:t,disabled:u,children:"Cancel"}),f.jsx(le,{type:"submit",variant:"primary",disabled:!r.trim()||u,children:"Add"})]})]})})},g8=()=>f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M10 6h10M10 12h10M10 18h10"}),f.jsx("path",{d:"M3 6l1.5 1.5L7 5M3 12l1.5 1.5L7 11M3 18l1.5 1.5L7 17"})]}),y8=()=>{const e=W(o=>o.loadPlans),t=W(o=>o.gitBranchHygiene),[n,r]=_.useState(!1),i=t==="stale-merged",s=async o=>{await d6(o),await e(),r(!1)};return f.jsxs(f.Fragment,{children:[f.jsx(lt,{content:i?"Switch to main first":void 0,children:f.jsx(on,{icon:f.jsx(g8,{}),variant:"ghost",size:"small",label:i?"Switch to main first":"Quick plan",disabled:i,onClick:()=>r(!0)})}),f.jsx(m8,{open:n,onClose:()=>r(!1),onAdd:s})]})},x8=({planId:e,phaseIndex:t,disabled:n})=>{const r=W(l=>l.launchAgent),{toast:i}=wn(),[s,o]=_.useState(!1),a=async l=>{if(l.stopPropagation(),!!e){o(!0);try{await r(e,t)}catch(u){i({title:"Failed to start agent",description:u.message,variant:"error"})}finally{o(!1)}}};return f.jsx(on,{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:a,disabled:n||s||!e,className:"transition-opacity",style:{color:ie.textSecondary}})},v8=({plan:e,disabled:t})=>{const n=W(o=>o.launchPlanAudit),[r,i]=_.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,Z6(e))}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(lt,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(le,{variant:"ghost",size:"small",onClick:s,disabled:t||r||!e.id,children:"Audit"})})},qm=({idea:e,compact:t})=>{const n=W(p=>p.launchIdeaExtend),r=W(p=>p.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,errorMessage:o,run:a}=dS(),{toast:l}=wn(),u=e.id,c=()=>{u&&a(async()=>{const p=W.getState().ideaEntries.find(m=>m.id===u);if(!p)throw new Error(`Idea ${u} not found`);try{await n(u,e8(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":u?void 0:"Idea needs an ID before an agent can run";return f.jsx(lt,{content:h,children:f.jsx(le,{variant:"ghost",size:"small",onClick:c,disabled:i||s==="loading"||!u,style:{color:s==="error"?ie.accentRoseDark:void 0},children:d})})},w8=({plan:e,disabled:t})=>{const n=W(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(lt,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(Vu,{size:"small",icon:f.jsx("span",{style:{color:ie.accentAmberDark},children:"⚑"}),onClick:s,disabled:o,style:o?{opacity:.5}:void 0,children:r?"Starting…":"Fix review comments"})})},b8=()=>{const e=W(i=>i.loadIdeas),[t,n]=_.useState(!1),r=async i=>{await u6(i),await e(),n(!1)};return f.jsxs(f.Fragment,{children:[f.jsx(on,{icon:f.jsx(eN,{size:16}),variant:"ghost",size:"small",label:"New idea",onClick:()=>n(!0)}),f.jsx(u8,{open:t,onClose:()=>n(!1),onAdd:r})]})};async function k8(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 _8=({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 k8(a);i(l?"copied":"failed"),setTimeout(()=>i("idle"),1500)};return f.jsx(on,{icon:r==="copied"?f.jsx(tN,{size:16}):r==="failed"?f.jsx(Pa,{size:16}):f.jsx(nN,{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":ie.textSecondary}})},S8=({plan:e,disabled:t})=>{const n=W(o=>o.launchPlanReconcile),[r,i]=_.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,J6(e),{body:e.body,phases:e.phases})}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(lt,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(le,{variant:"ghost",size:"small",onClick:s,disabled:t||r||!e.id,children:"Refresh"})})},C8=()=>{const e=W(s=>s.refreshAll),t=W(s=>s.refreshing),n=Ca(),{toast:r}=wn(),i=async()=>{if(t)return;const s=await e();s.ok?r({title:"Up to date",description:"Plans, ideas, checks and PR review state re-read.",variant:"success"}):r({title:"Couldn't refresh",description:s.error??"The read failed — is the dev server running?",variant:"error"})};return f.jsx(on,{icon:f.jsx(Ti.span,{style:{display:"inline-flex"},animate:{rotate:t&&!n?360:0},transition:t&&!n?{repeat:Number.POSITIVE_INFINITY,ease:"linear",duration:.8}:{duration:0},children:f.jsx(j6,{size:16})}),label:t?"Refreshing…":"Refresh data",size:"small",variant:"ghost",disabled:t,onClick:i})},P8=({plan:e,disabled:t})=>{const n=W(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(lt,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(Vu,{size:"small",icon:f.jsx("span",{style:{color:ie.textSecondary},children:"▶"}),onClick:s,disabled:o,style:o?{opacity:.5}:void 0,children:r?"Starting…":"Run all phases"})})},E8=()=>{const e=W(u=>u.launchSuggestIdeas),t=W(u=>u.ideaEntries),n=W(u=>u.suggestions),r=W(u=>u.agentStatus),{toast:i}=wn(),[s,o]=_.useState(!1),a=r!==null&&r.status!=="done"&&r.status!=="error",l=async()=>{o(!0);try{await e(r8(t,n))}catch(u){i({title:"Failed to launch",description:u.message,variant:"error"})}finally{o(!1)}};return f.jsx(le,{variant:"ghost",size:"small",onClick:l,disabled:a||s,style:{color:ie.textSecondary},children:"Suggest ideas"})};function T8(e){const t=e==null?void 0:e.match(/^[a-z]+\/([a-z]+-\d+)-/);return t?t[1].toUpperCase():null}const j8=({plan:e})=>{const t=W(T=>T.plans),n=W(T=>T.gitBranch),r=W(T=>T.loadGitStatus),{toast:i}=wn(),{patch:s,updating:o}=Ia(),[a,l]=_.useState(!1),u=W(T=>T.agentStatus),c=u!==null&&u.status!=="done"&&u.status!=="error",d=c&&u!==null&&u.planId===e.id?u.phaseIndex:null,h=c&&u!==null&&u.planId===e.id&&u.phaseIndex===void 0,[p,m]=_.useState(""),y=Vm(e),w=e.phases.length>0,g={id:e.id??null,title:e.title,body:e.body,log:e.log},x=((t==null?void 0:t.entries)??[]).filter(T=>T.id!==e.id),v=e.id!==void 0&&T8(n)===e.id,b=e.status==="planned"||e.status==="in-progress"||e.status==="review",P=async()=>{if(e.id){l(!0);try{const T=await y6(e.id);i({title:"Branch ready",description:`Now on ${T}`,variant:"success"}),await r()}catch(T){i({title:"Branch failed",description:T.message,variant:"error"})}finally{l(!1)}}};y!==null&&y.done===y.total&&y.total>0;const S=async T=>{const E=e.phases.map((M,O)=>O===T?{...M,done:!M.done}:M);E.every(M=>M.done)&&e.status==="in-progress"?await s(e.title,{phases:E,status:"review"}):await s(e.title,{phases:E})},j=async T=>{await s(e.title,{phases:[...e.phases,...T]})},C=async()=>{if(!p.trim())return;const E={date:new Date().toISOString().slice(0,10),text:p.trim().replace(/\n/g," ")},I=[...e.log??[],E];await s(e.title,{log:I})&&m("")};return f.jsxs("div",{children:[f.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:A[3],margin:`0 0 ${A[3]}`},children:[f.jsxs("h2",{style:{...mS,margin:0,display:"flex",alignItems:"center",gap:A[3],minWidth:0},children:[f.jsx(Di,{id:e.id}),e.title]}),f.jsx("span",{className:"text-sm",style:{opacity:.45,flexShrink:0,whiteSpace:"nowrap"},children:e.updated?`updated ${Ku(e.updated)}`:`created ${Ku(e.created)}`})]}),e.tags.length>0&&f.jsx("div",{style:{display:"flex",gap:A[2],flexWrap:"wrap",marginBottom:A[4]},children:e.tags.map(T=>f.jsx(nt,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:T},T))}),(b||e.pr)&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],flexWrap:"wrap",marginBottom:A[4]},children:[b&&!v&&f.jsx(We,{size:"small",accent:!0,accentColor:"amber",children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],flexWrap:"wrap"},children:[f.jsxs("span",{className:"text-sm",children:["Working branch: ",f.jsx("code",{children:n??"unknown"})," — not this plan's branch."]}),e.id&&f.jsx(lt,{content:`Creates ${(e.kind??"feat").toLowerCase()}/${e.id.toLowerCase()}-… from main, or switches to it if it already exists`,children:f.jsx(le,{variant:"secondary",size:"small",onClick:P,disabled:a,children:a?"Switching…":"Create branch"})})]})}),b&&v&&f.jsxs("span",{className:"text-sm",style:{opacity:.45},children:["Working branch: ",f.jsx("code",{children:n})]}),e.pr&&f.jsx(a8,{pr:e.pr}),e.pr&&f.jsx(l8,{pr:e.pr})]}),y!==null&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],marginBottom:A[4]},children:[f.jsx("div",{style:{flex:1},children:f.jsx(pS,{pct:y.pct,color:fS[e.status]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[y.done,"/",y.total]})]}),e.body&&f.jsx("div",{style:{marginBottom:A[4],opacity:.85},children:f.jsx(i8,{resetKey:e.id??e.title,children:f.jsx(J_,{children:e.body})})}),e.clarifications&&e.clarifications.length>0&&f.jsxs("div",{style:{marginBottom:A[5]},children:[f.jsx("h3",{style:{fontFamily:Ie.serif,fontSize:ne.sm,fontWeight:600,margin:`0 0 ${A[3]}`,opacity:.65},children:"Clarifications"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[2],marginBottom:A[3]},children:e.clarifications.map((T,E)=>f.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[f.jsx("span",{style:{fontWeight:600,marginRight:A[2]},children:T.date}),T.text]},`clar-${T.date}-${E}`))})]}),!w&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],marginBottom:A[8]},children:[f.jsx(Lc,{idea:g,otherPlans:x}),f.jsx(qm,{idea:g})]}),w&&f.jsxs("div",{style:{marginBottom:A[8]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:A[3],marginBottom:A[3]},children:[f.jsx("h3",{style:{fontFamily:Ie.serif,fontSize:ne.sm,fontWeight:600,margin:0,opacity:.65},children:"Phases"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2]},children:[h&&f.jsx(Wu,{size:"small",label:"Audit running…"}),(e.status==="review"||e.status==="done")&&f.jsx(v8,{plan:e,disabled:c}),e.status!=="done"&&f.jsx(S8,{plan:e,disabled:c}),f.jsx(h8,{onAdd:j,disabled:o})]})]}),f.jsx($N,{data:e.phases,columns:[{key:"checkbox",header:"Status",cell:(T,E)=>f.jsx(vD,{checked:T.done,onChange:()=>S(E),disabled:o}),width:2},{key:"title",header:"Title",cell:T=>f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:A[2],textDecoration:T.done?"line-through":"none",opacity:T.done?.45:1},children:[T.text,T.source==="review"&&f.jsx(nt,{size:"small",fillColor:ir.review.fill,textColor:ir.review.text,children:"review"})]})},{key:"actions",header:"Actions",cell:(T,E)=>f.jsxs("div",{style:{display:"flex",gap:A[2],alignItems:"center"},children:[f.jsx(_8,{planTitle:e.title,planId:e.id,phaseIndex:E}),!T.done&&d===E?f.jsx(Wu,{size:"small",label:`Agent ${u==null?void 0:u.status}…`}):!T.done&&f.jsx(x8,{planId:e.id,phaseIndex:E,disabled:c})]}),width:5}],expandable:{render:T=>T.description??null},showExpandColumn:!1,rowClassName:T=>T.source==="review"?"phase-row-review":void 0})]}),f.jsxs("div",{style:{marginBottom:A[8]},children:[f.jsx("h3",{style:{fontFamily:Ie.serif,fontSize:ne.sm,fontWeight:600,margin:`0 0 ${A[3]}`,opacity:.65},children:"Log"}),e.log&&e.log.length>0&&f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[2],marginBottom:A[3]},children:e.log.map((T,E)=>f.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[f.jsx("span",{style:{fontWeight:600,marginRight:A[2]},children:T.date}),T.text]},`${T.date}-${E}`))}),f.jsxs("div",{style:{display:"flex",gap:A[2],alignItems:"flex-end"},children:[f.jsx(Ta,{value:p,onChange:T=>m(T.target.value),placeholder:"Add a log entry…",rows:2}),f.jsx(le,{variant:"secondary",size:"small",onClick:C,disabled:o||!p.trim(),children:"Add entry"})]})]})]})},yo={fontSize:ne.sm,fontWeight:600,opacity:.6,whiteSpace:"nowrap",overflow:"hidden"},gS=({plans:e,activePlanTitle:t,onOpen:n,showHeader:r=!0})=>{const i="plan-rows-grid";return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[r&&f.jsx(We,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:i,children:[f.jsx("span",{style:yo,children:"Id"}),f.jsx("span",{style:yo,children:"Title"}),f.jsx("span",{className:"plan-rows-cell-updated",style:yo,children:"Updated"}),f.jsx("span",{style:yo,children:"Progress"}),f.jsx("span",{style:yo,children:"Status"})]})}),e.map(s=>{const o=Vm(s);return f.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onClick:n?()=>n(s.title):void 0,onKeyDown:n?a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(s.title))}:void 0,className:s.title===t?"plan-row-highlighted":void 0,style:{cursor:n?"pointer":void 0,borderRadius:10},children:f.jsx(We,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{className:i,children:[f.jsx(Di,{id:s.id}),f.jsx("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.title}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45,whiteSpace:"nowrap"},children:s.updated?Ku(s.updated):Ku(s.created)}),o?f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[1]},children:[f.jsx("div",{style:{flex:1,minWidth:0},children:f.jsx(pS,{pct:o.pct,color:fS[s.status]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[o.done,"/",o.total]})]}):f.jsx("span",{className:"text-sm",style:{opacity:.3},children:"—"}),f.jsx("div",{style:{display:"flex",alignItems:"center",gap:A[1]},children:f.jsx(nt,{size:"small",fillColor:ir[s.status].fill,textColor:ir[s.status].text,children:Ym[s.status]})})]})})},s.title)})]})},R8=5,xo={fontSize:ne.sm,fontWeight:600,opacity:.6,whiteSpace:"nowrap",overflow:"hidden"},yS={display:"flex",alignItems:"center",gap:A[2],minWidth:0,background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left",font:"inherit",color:"inherit",fontWeight:600},xS={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},I8=({rows:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i})=>{const[s,o]=_.useState(new Set),a="plan-rows-grid",l=u=>{o(c=>{const d=new Set(c);return d.has(u)?d.delete(u):d.add(u),d})};return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[f.jsx(We,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:a,children:[f.jsx("span",{style:xo,children:"Id"}),f.jsx("span",{style:xo,children:"Title"}),f.jsx("span",{className:"plan-rows-cell-updated",style:xo,children:"Updated"}),f.jsx("span",{style:xo,children:"Progress"}),f.jsx("span",{style:xo,children:"Status"})]})}),e.map(u=>u.type==="plan"?f.jsx(gS,{plans:[u.plan],activePlanTitle:n,onOpen:r,showHeader:!1},u.plan.title):u.type==="note"?f.jsx(M8,{row:u,onOpen:i},u.idea.title):f.jsx(L8,{row:u,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,expanded:s.has(u.idea.title),onToggleExpanded:()=>l(u.idea.title)},u.idea.title))]})},M8=({row:e,onOpen:t})=>{const n=e.idea,r=n.status??"open";return f.jsx("div",{role:t?"button":void 0,tabIndex:t?0:void 0,onClick:t?()=>t(n.title):void 0,onKeyDown:t?i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),t(n.title))}:void 0,style:{cursor:t?"pointer":void 0,borderRadius:10},children:f.jsx(We,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{className:"plan-rows-grid",children:[n.id?f.jsx(Di,{id:n.id}):f.jsx("span",{}),f.jsxs("span",{style:{...yS,cursor:"inherit"},children:[f.jsx(L6,{}),f.jsx("span",{style:xS,children:n.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(nt,{size:"small",fillColor:Yu[r].fill,textColor:Yu[r].text,children:hS[r]})]})})})},L8=({row:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,expanded:s,onToggleExpanded:o})=>{const a=e.idea,l=e.children,u=l.filter(p=>p.status==="done"),c=l.filter(p=>p.status!=="done"),d=l.length>R8,h=d&&!s?c:l;return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[f.jsx(We,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{style:{display:"grid",gridTemplateColumns:"76px minmax(0, 1fr) 84px 1fr",gap:A[2],alignItems:"center"},children:[a.id?f.jsx(Di,{id:a.id}):f.jsx("span",{}),f.jsxs("button",{type:"button",onClick:()=>i==null?void 0:i(a.title),style:yS,children:[f.jsx(uS,{}),f.jsx("span",{style:xS,children:a.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:A[2]},children:[f.jsx("span",{className:"text-sm",style:{opacity:l.length>0?.6:.3},children:l.length>0?`${u.length}/${l.length} plans done`:"—"}),f.jsx(qm,{idea:a,compact:!0}),f.jsx(Lc,{idea:a,otherPlans:t})]})]})}),l.length>0&&f.jsxs("div",{style:{marginLeft:A[5],paddingLeft:A[3],borderLeft:"2px solid rgba(0,0,0,0.08)",display:"flex",flexDirection:"column",gap:A[1]},children:[f.jsx(gS,{plans:h,activePlanTitle:n,onOpen:r,showHeader:!1}),d&&f.jsx("button",{type:"button",onClick:o,style:{alignSelf:"flex-start",background:"none",border:"none",padding:`${A[1]} 0`,opacity:.6,cursor:"pointer",textDecoration:"underline",fontSize:ne.xs,font:"inherit"},children:s?"Show less":`+${u.length} done`})]})]})},A8=({plans:e,rows:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i})=>{const s=_.useRef(null);return _.useEffect(()=>{var a;if(!n)return;const o=(a=s.current)==null?void 0:a.querySelector(".plan-row-highlighted");o==null||o.scrollIntoView({behavior:"smooth",block:"center"})},[n]),f.jsx("div",{ref:s,children:t.length>0?f.jsx(I8,{rows:t,plans:e,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i}):f.jsx("p",{style:{opacity:.5,padding:`${A[6]} 0`,textAlign:"center"},children:"No plans match your filters."})})},D8=({idea:e})=>f.jsxs("div",{style:{fontFamily:Ie.body,fontSize:ne.base,lineHeight:Uu.relaxed,color:ie.textProse},children:[f.jsxs("h2",{style:{...mS,margin:`0 0 ${A[4]}`,display:"flex",alignItems:"center",gap:A[3]},children:[f.jsx(Di,{id:e.id??void 0}),e.title,e.status&&f.jsx(nt,{size:"small",fillColor:Yu[e.status].fill,textColor:Yu[e.status].text,children:hS[e.status]})]}),f.jsx(J_,{children:e.body.replace(/^#{1,3}\s+.+(\n|$)/,"").replace(/^\s*-{3,}\s*(\n|$)/,"").trim()}),f.jsx("div",{style:{marginTop:A[6]},children:f.jsx(qm,{idea:e})})]}),lf={fontSize:ne["2xs"],fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:ie.textTertiary,margin:`0 0 ${A[2]}`},N8=()=>{const e=W(m=>m.plans),t=Km(),n=W(m=>m.agentStatus),{patch:r,updating:i}=Ia(),s=t?e==null?void 0:e.entries.find(m=>m.title===t):null;if(!s)return null;const o=n!==null&&n.status!=="done"&&n.status!=="error",a=s.status==="in-progress",l=s.status==="review",u=s.status==="dropped",c=s.phases.some(m=>!m.done),d=(s.status==="planned"||a)&&c,h=!!(s.pr&&(s.pr.state==="open"||s.pr.state==="draft")&&s.pr.unresolvedThreadCount),p=m=>r(s.title,m);return f.jsx("div",{style:{marginTop:`calc(-1 * ${A[5]})`},children:f.jsx(We,{surface:"paper",texture:"speckle",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[5]},children:[f.jsx("h2",{style:{margin:0,fontFamily:Ie.serif,fontSize:ne.base,color:ie.textPrimary},children:"Plan"}),f.jsxs("div",{children:[f.jsx("div",{style:lf,children:"Status"}),f.jsx(nt,{size:"small",fillColor:ir[s.status].fill,textColor:ir[s.status].text,children:Ym[s.status]})]}),f.jsxs("div",{children:[f.jsx("div",{style:lf,children:"Agent"}),f.jsx(f_,{size:"small",value:s.agent??"",onChange:m=>p({agent:m||null}),disabled:i,options:[{value:"",label:"Project default agent"},...bV.map(m=>({value:m,label:eS[m]}))]})]}),f.jsxs("div",{children:[f.jsx("div",{style:lf,children:"Actions"}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[d&&f.jsx(P8,{plan:s,disabled:o||i}),h&&f.jsx(w8,{plan:s,disabled:o||i}),l&&f.jsx(Vu,{size:"small",icon:f.jsx("span",{style:{color:ie.accentGreenDark},children:"✓"}),onClick:()=>p({status:"done"}),disabled:i,style:i?{opacity:.5}:void 0,children:"Approve & close"}),f.jsx(Vu,{size:"small",icon:f.jsx("span",{style:{color:u?ie.accentGreenDark:ie.accentRoseDark},children:u?"↺":"⊘"}),onClick:()=>p({status:u?null:"dropped"}),disabled:i,style:i?{opacity:.5}:void 0,children:u?"Reopen plan":"Mark dropped"})]})]})]})})})},wv=8,z8=["in-progress","review","planned","idea","done","dropped"],F8={...Ym,idea:"Backlog"},bv={fontSize:ne["2xs"],fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:ie.textTertiary,margin:`0 0 ${A[2]}`},O8=()=>{const e=W(g=>g.plans),t=Km(),n=W(g=>g.planFilters),r=W(g=>g.togglePlanStatus),i=W(g=>g.togglePlanTag),s=W(g=>g.setPlanSearch),[o,a]=_.useState(!1);if(!e||t)return null;const{statusCounts:l,tagCounts:u}=Ql(e.entries,n),c=new Set(n.statuses),d=new Set(n.tags),p=[...new Set([...Object.keys(u),...n.tags])].sort((g,x)=>{const v=(u[x]??0)-(u[g]??0);return v!==0?v:g.localeCompare(x)}),m=o?p:p.slice(0,wv),y=p.length-m.length,w={background:"none",border:"none",padding:0,cursor:"pointer",opacity:.7,textDecoration:"underline",fontSize:ne["2xs"]};return f.jsx("div",{style:{marginTop:`calc(-1 * ${A[5]})`},children:f.jsx(We,{surface:"paper",texture:"speckle",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[5]},children:[f.jsx("h2",{style:{margin:0,fontFamily:Ie.serif,fontSize:ne.base,color:ie.textPrimary},children:"Filters"}),f.jsx(Tc,{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:bv,children:"Status"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:z8.map(g=>{const x=c.has(g);return f.jsxs("button",{type:"button",onClick:()=>r(g),"aria-pressed":x,style:{display:"flex",alignItems:"center",gap:A[2],width:"100%",padding:`${A[1]} ${A[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:ir[g].text}}),f.jsx("span",{style:{flex:1,fontSize:ne.xs,color:ie.textPrimary},children:F8[g]}),f.jsx("span",{style:{fontSize:ne["2xs"],color:ie.textSecondary},children:l[g]})]},g)})})]}),f.jsxs("div",{children:[f.jsx("div",{style:bv,children:"Tags"}),f.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:A[1],alignItems:"center"},children:[p.length===0&&f.jsx("span",{style:{opacity:.5,fontSize:ne["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:ne["2xs"],padding:`2px ${A[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," ",u[g]??0]},g)}),y>0&&f.jsxs("button",{type:"button",onClick:()=>a(!0),style:w,children:["+",y," more"]}),o&&p.length>wv&&f.jsx("button",{type:"button",onClick:()=>a(!1),style:w,children:"Show less"})]})]})]})})})},kv=()=>f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],marginBottom:A[6]},children:[f.jsx("h1",{className:"text-4xl",style:{flex:1,fontFamily:Ie.serif,fontWeight:600,color:ie.textPrimary,margin:0,lineHeight:1.1},children:"Plans"}),f.jsx(C8,{}),f.jsx(b8,{}),f.jsx(y8,{}),f.jsx(E8,{}),f.jsx(f8,{})]}),B8=[{key:"a",title:"72%"},{key:"b",title:"54%"},{key:"c",title:"83%"},{key:"d",title:"46%"},{key:"e",title:"66%"},{key:"f",title:"58%"}],$8=()=>f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},"aria-hidden":"true",children:[f.jsx(We,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:"plan-rows-grid",children:[f.jsx(Pn,{variant:"text",width:28}),f.jsx(Pn,{variant:"text",width:44}),f.jsx("span",{className:"plan-rows-cell-updated",children:f.jsx(Pn,{variant:"text",width:56})}),f.jsx(Pn,{variant:"text",width:64}),f.jsx(Pn,{variant:"text",width:48})]})}),B8.map(e=>f.jsx(We,{size:"small",className:"plan-row-card",children:f.jsxs("div",{className:"plan-rows-grid",children:[f.jsx(Pn,{variant:"rect",width:44,height:18}),f.jsx(Pn,{variant:"text",width:e.title}),f.jsx("span",{className:"plan-rows-cell-updated",children:f.jsx(Pn,{variant:"text",width:52})}),f.jsx(Pn,{variant:"rect",width:80,height:8}),f.jsx(Pn,{variant:"rect",width:64,height:20})]})},e.key))]}),V8=()=>{const e=W(l=>l.reconcileQueue),t=W(l=>l.removeFromReconcileQueue),n=W(l=>l.plans),{patch:r}=Ia(),i=e[0]??null,s=i?(n==null?void 0:n.entries.find(l=>l.id===i.planId))??null:null;if(_.useEffect(()=>{i&&!s&&t(i.planId)},[i,s,t]),!i||!s)return null;const o=()=>{t(i.planId)},a=async()=>{await r(s.title,{body:i.before.body,phases:i.before.phases},{errorTitle:"Discard failed"})&&t(i.planId)};return f.jsx(d8,{plan:s,before:i.before,onApprove:o,onDiscard:a,queuePosition:{index:1,total:e.length}})},W8=({suggestions:e,onOpen:t,onDismiss:n})=>e.length===0?null:f.jsxs("div",{style:{marginTop:A[5]},children:[f.jsx("h2",{className:"text-sm",style:{margin:`0 0 ${A[2]}`,opacity:.6},children:"Suggested from AI"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:e.map(r=>f.jsx("div",{style:{borderRadius:10},children:f.jsx(We,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2]},children:[f.jsxs("button",{type:"button",onClick:()=>t(r),style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:A[2],background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left",font:"inherit",color:"inherit"},children:[f.jsx(uS,{}),f.jsx("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.title})]}),f.jsx(on,{icon:f.jsx("span",{children:"×"}),variant:"ghost",size:"small",label:"Dismiss",style:{width:28,height:28},onClick:()=>n(r)})]})})},`${r.date}-${r.title}`))})]}),Qm=()=>{const e=W(v=>v.plans),t=W(v=>v.plansError),n=W(v=>v.ideaEntries),r=W(v=>v.suggestions);W(v=>v.loadPlans);const i=W(v=>v.planFilters),s=Km(),o=H6(),a=W(v=>v.dismissSuggestion),l=Mi(),{toast:u}=wn(),c=()=>{l({to:"/"})},d=v=>{l({to:"/plans/$planId",params:{planId:encodeURIComponent(v)}})},h=v=>{l({to:"/ideas/$ideaId",params:{ideaId:encodeURIComponent(v)}})},[p,m]=_.useState(null),y=async v=>{try{await a(v)}catch(b){u({title:"Failed to dismiss suggestion",description:b.message,variant:"error"})}},w=s?e==null?void 0:e.entries.find(v=>v.title===s):null,g=o?n.find(v=>v.title===o):null;if(t)return f.jsxs("div",{children:[f.jsx(X6,{children:"Plans"}),f.jsxs(We,{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(kv,{}),f.jsx("output",{"aria-live":"polite",className:"sr-only",children:"Loading plans…"}),f.jsx($8,{})]});const{rows:x}=PV(e.entries,n,i);return f.jsxs(f.Fragment,{children:[f.jsx(V8,{}),w?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:A[4]},children:f.jsx(d0,{items:[{id:"plans",label:"Plans",onClick:c},{id:"plan",label:w.title}]})}),f.jsx(j8,{plan:w})]}):g?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:A[4]},children:f.jsx(d0,{items:[{id:"plans",label:"Plans",onClick:c},{id:"idea",label:g.title}]})}),f.jsx(D8,{idea:g})]}):f.jsxs("div",{children:[f.jsx(kv,{}),e.warnings.length>0&&f.jsxs(We,{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:A[5]},children:e.warnings.map(v=>f.jsxs("li",{children:[v.title,": ",v.message]},v.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(A8,{plans:e.entries,rows:x,activePlanTitle:s,onOpenPlan:d,onOpenIdea:h}),f.jsx(W8,{suggestions:r,onOpen:m,onDismiss:y}),f.jsx(c8,{suggestion:p,onClose:()=>m(null)})]})]})},vS=_.lazy(()=>gc(()=>import("./index-CF8jC3IN.js"),__vite__mapDeps([0,1])).then(e=>({default:e.DocsPage}))),U8=_.lazy(()=>gc(()=>import("./index-CF8jC3IN.js"),__vite__mapDeps([0,1])).then(e=>({default:e.DocsSidebar}))),H8=_.lazy(()=>gc(()=>import("./index-DGXi8vpJ.js"),__vite__mapDeps([2,1])).then(e=>({default:e.SettingsPage}))),G8=_.lazy(()=>gc(()=>import("./index-DGXi8vpJ.js"),__vite__mapDeps([2,1])).then(e=>({default:e.SettingsSidebar}))),_v=[{id:"plans",label:"Plans",path:"/"},{id:"docs",label:"Docs",path:"/docs"},{id:"settings",label:"Settings",path:"/settings"}],wS="stack-open";function K8(){try{return localStorage.getItem(wS)==="true"}catch{return!1}}function Y8(e){try{localStorage.setItem(wS,String(e))}catch{}}const q8="(min-width: 1440px)",Sv=32,ni=32;function Q8(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 X8=()=>{var y;const e=Mi(),t=JT({select:w=>w.location.pathname}),n=W(w=>w.loadPlans),r=W(w=>w.loadIdeas),i=W(w=>w.loadSuggestions),s=t==="/"||t.startsWith("/plans/")||t.startsWith("/ideas/"),o=t==="/docs"||t.startsWith("/docs/"),a=s?"plans":o?"docs":(y=_v.find(w=>w.path===t))==null?void 0:y.id,l=s||o||t==="/settings",[u,c]=_.useState(K8),[d,h]=_.useState(!1),p=Ca(),m=Q8(q8);return _.useEffect(()=>{n(),r(),i()},[n,r,i]),_.useEffect(()=>{h(!1)},[t]),f.jsxs(xO,{position:"bottom-left",children:[f.jsxs("div",{className:"h-screen box-border min-[1440px]:pr-[480px] flex flex-col",children:[f.jsx(Q6,{}),f.jsx(oD,{style:{flex:"1 1 0%",minHeight:0,height:"auto"},background:{texture:"speckle",ruledType:"grid",ruledColor:"blue"},showHeader:!0,headerTexture:"parchment",showSidebar:!1,showPage:!1,bleedBottom:!0,headerActions:f.jsxs(f.Fragment,{children:[l&&f.jsx(on,{variant:"ghost",size:"small",className:"lg:hidden",label:"Open sidebar",onClick:()=>h(!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(Y6,{size:"sm"}),f.jsx("div",{className:"flex-1"}),f.jsx("nav",{"aria-label":"Main navigation",className:"flex items-center gap-1",children:_v.map(w=>f.jsx(le,{variant:"ghost",size:"small",isActive:w.id===a,onClick:()=>e({to:w.path}),"aria-current":w.id===a?"page":void 0,children:w.label},w.id))})]}),children:f.jsx("div",{className:"flex flex-col h-full min-h-0",children:f.jsx("div",{className:"flex flex-1 min-h-0 justify-center items-start box-border overflow-y-auto",style:{marginTop:-ni,marginLeft:-ni,marginRight:-ni,paddingTop:ni,paddingBottom:ni,paddingLeft:ni,paddingRight:ni},children:f.jsxs("div",{className:"flex min-w-0 justify-center lg:[--pc-sidebar-h:calc(100vh-128px)]",style:{gap:Kl.contentGap,width:"100%",...m?{paddingLeft:Sv,paddingRight:Sv}:{}},children:[l&&f.jsxs(q6,{routeKey:t,mobileOpen:d,onMobileClose:()=>h(!1),children:[s&&f.jsxs(f.Fragment,{children:[f.jsx(O8,{}),f.jsx(N8,{})]}),o&&f.jsx(_.Suspense,{fallback:null,children:f.jsx(U8,{})}),t==="/settings"&&f.jsx(_.Suspense,{fallback:null,children:f.jsx(G8,{})})]}),f.jsx("div",{className:"flex flex-col min-w-0",style:{flex:m?"1 1 0%":"0 1 800px"},children:f.jsx(c_,{texture:{texture:"parchment"},outline:!0,style:{height:"auto",width:"100%",...m?{maxWidth:"none"}:{}},children:f.jsx(kc,{mode:"wait",children:f.jsx(Ti.div,{initial:p?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:p?void 0:{opacity:0,y:-8},transition:{duration:p?0:.2,ease:"easeOut"},children:f.jsx(_.Suspense,{fallback:null,children:f.jsx(fb,{})})},t)})})})]})})})})]}),f.jsx(O6,{open:u,pinned:m,onToggle:()=>{const w=!u;Y8(w),c(w)}})]})},Ni=FT({component:X8}),Z8=Os({getParentRoute:()=>Ni,path:"/",component:Qm}),J8=Os({getParentRoute:()=>Ni,path:"/plans/$planId",component:Qm}),eW=Os({getParentRoute:()=>Ni,path:"/ideas/$ideaId",component:Qm}),tW=Os({getParentRoute:()=>Ni,path:"/docs",component:vS}),nW=Os({getParentRoute:()=>Ni,path:"/docs/$section",component:vS}),rW=Os({getParentRoute:()=>Ni,path:"/settings",component:H8}),iW=Ni.addChildren([Z8,J8,eW,tW,nW,rW]),sW=qT({routeTree:iW}),bS=document.getElementById("root");if(!bS)throw new Error("#root element not found");zw(bS).render(f.jsx(_.StrictMode,{children:f.jsx(ZT,{router:sW})}));export{$N as $,uW as A,eS as B,pW as D,Ea as J,J_ as M,nt as O,X6 as P,mW as Q,Tc as X,f_ as Y,le as Z,Mi as a,Ie as b,ie as c,mS as d,wn as e,ne as f,Ta as g,dW as h,hW as i,f as j,d0 as k,Uu as l,W6 as m,Xi as n,Vu as o,We as p,c0 as q,_ as r,A as s,cW as t,W as u,on as v,Pa as w,lW as x,fW as y,bV as z};
|
|
218
|
+
//# sourceMappingURL=main-DJDNx4Xs.js.map
|