@dendelion/paper-camp 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,200 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var ac=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fv={exports:{}},ru={},zv={exports:{}},oe={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ta=Symbol.for("react.element"),AS=Symbol.for("react.portal"),DS=Symbol.for("react.fragment"),NS=Symbol.for("react.strict_mode"),FS=Symbol.for("react.profiler"),zS=Symbol.for("react.provider"),BS=Symbol.for("react.context"),OS=Symbol.for("react.forward_ref"),$S=Symbol.for("react.suspense"),VS=Symbol.for("react.memo"),US=Symbol.for("react.lazy"),ug=Symbol.iterator;function WS(e){return e===null||typeof e!="object"?null:(e=ug&&e[ug]||e["@@iterator"],typeof e=="function"?e:null)}var Bv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ov=Object.assign,$v={};function Ys(e,t,n){this.props=e,this.context=t,this.refs=$v,this.updater=n||Bv}Ys.prototype.isReactComponent={};Ys.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")};Ys.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Vv(){}Vv.prototype=Ys.prototype;function Jh(e,t,n){this.props=e,this.context=t,this.refs=$v,this.updater=n||Bv}var ep=Jh.prototype=new Vv;ep.constructor=Jh;Ov(ep,Ys.prototype);ep.isPureReactComponent=!0;var dg=Array.isArray,Uv=Object.prototype.hasOwnProperty,tp={current:null},Wv={key:!0,ref:!0,__self:!0,__source:!0};function Hv(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)Uv.call(t,r)&&!Wv.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Ta,type:e,key:s,ref:o,props:i,_owner:tp.current}}function HS(e,t){return{$$typeof:Ta,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function np(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ta}function KS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var fg=/\/+/g;function Bu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?KS(""+e.key):t.toString(36)}function Ll(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 Ta:case AS:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Bu(o,0):r,dg(i)?(n="",e!=null&&(n=e.replace(fg,"$&/")+"/"),Ll(i,t,n,"",function(c){return c})):i!=null&&(np(i)&&(i=HS(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(fg,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",dg(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Bu(s,a);o+=Ll(s,t,n,l,i)}else if(l=WS(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Bu(s,a++),o+=Ll(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 Ua(e,t,n){if(e==null)return e;var r=[],i=0;return Ll(e,r,"","",function(s){return t.call(n,s,i++)}),r}function GS(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 vt={current:null},Ml={transition:null},QS={ReactCurrentDispatcher:vt,ReactCurrentBatchConfig:Ml,ReactCurrentOwner:tp};function Kv(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:Ua,forEach:function(e,t,n){Ua(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ua(e,function(){t++}),t},toArray:function(e){return Ua(e,function(t){return t})||[]},only:function(e){if(!np(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=Ys;oe.Fragment=DS;oe.Profiler=FS;oe.PureComponent=Jh;oe.StrictMode=NS;oe.Suspense=$S;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QS;oe.act=Kv;oe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ov({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=tp.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Uv.call(t,l)&&!Wv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Ta,type:e.type,key:i,ref:s,props:r,_owner:o}};oe.createContext=function(e){return e={$$typeof:BS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:zS,_context:e},e.Consumer=e};oe.createElement=Hv;oe.createFactory=function(e){var t=Hv.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:OS,render:e}};oe.isValidElement=np;oe.lazy=function(e){return{$$typeof:US,_payload:{_status:-1,_result:e},_init:GS}};oe.memo=function(e,t){return{$$typeof:VS,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Ml.transition;Ml.transition={};try{e()}finally{Ml.transition=t}};oe.unstable_act=Kv;oe.useCallback=function(e,t){return vt.current.useCallback(e,t)};oe.useContext=function(e){return vt.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return vt.current.useDeferredValue(e)};oe.useEffect=function(e,t){return vt.current.useEffect(e,t)};oe.useId=function(){return vt.current.useId()};oe.useImperativeHandle=function(e,t,n){return vt.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return vt.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return vt.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return vt.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return vt.current.useReducer(e,t,n)};oe.useRef=function(e){return vt.current.useRef(e)};oe.useState=function(e){return vt.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return vt.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return vt.current.useTransition()};oe.version="18.3.1";zv.exports=oe;var S=zv.exports;const Ds=nu(S);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var YS=S,qS=Symbol.for("react.element"),XS=Symbol.for("react.fragment"),ZS=Object.prototype.hasOwnProperty,JS=YS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,eC={key:!0,ref:!0,__self:!0,__source:!0};function Gv(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)ZS.call(t,r)&&!eC.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:qS,type:e,key:s,ref:o,props:i,_owner:JS.current}}ru.Fragment=XS;ru.jsx=Gv;ru.jsxs=Gv;Fv.exports=ru;var f=Fv.exports,Qv={exports:{}},Yt={},Yv={exports:{}},qv={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(D,W){var k=D.length;D.push(W);e:for(;0<k;){var O=k-1>>>1,q=D[O];if(0<i(q,W))D[O]=W,D[k]=q,k=O;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var W=D[0],k=D.pop();if(k!==W){D[0]=k;e:for(var O=0,q=D.length,T=q>>>1;O<T;){var le=2*(O+1)-1,he=D[le],pe=le+1,rt=D[pe];if(0>i(he,k))pe<q&&0>i(rt,he)?(D[O]=rt,D[pe]=k,O=pe):(D[O]=he,D[le]=k,O=le);else if(pe<q&&0>i(rt,k))D[O]=rt,D[pe]=k,O=pe;else break e}}return W}function i(D,W){var k=D.sortIndex-W.sortIndex;return k!==0?k:D.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,h=3,p=!1,m=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(D){for(var W=n(c);W!==null;){if(W.callback===null)r(c);else if(W.startTime<=D)r(c),W.sortIndex=W.expirationTime,t(l,W);else break;W=n(c)}}function b(D){if(y=!1,v(D),!m)if(n(l)!==null)m=!0,H(C);else{var W=n(c);W!==null&&K(b,W.startTime-D)}}function C(D,W){m=!1,y&&(y=!1,g(j),j=-1),p=!0;var k=h;try{for(v(W),d=n(l);d!==null&&(!(d.expirationTime>W)||D&&!R());){var O=d.callback;if(typeof O=="function"){d.callback=null,h=d.priorityLevel;var q=O(d.expirationTime<=W);W=e.unstable_now(),typeof q=="function"?d.callback=q:d===n(l)&&r(l),v(W)}else r(l);d=n(l)}if(d!==null)var T=!0;else{var le=n(c);le!==null&&K(b,le.startTime-W),T=!1}return T}finally{d=null,h=k,p=!1}}var _=!1,E=null,j=-1,L=5,P=-1;function R(){return!(e.unstable_now()-P<L)}function M(){if(E!==null){var D=e.unstable_now();P=D;var W=!0;try{W=E(!0,D)}finally{W?F():(_=!1,E=null)}}else _=!1}var F;if(typeof x=="function")F=function(){x(M)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,N=z.port2;z.port1.onmessage=M,F=function(){N.postMessage(null)}}else F=function(){w(M,0)};function H(D){E=D,_||(_=!0,F())}function K(D,W){j=w(function(){D(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,H(C))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(D){switch(h){case 1:case 2:case 3:var W=3;break;default:W=h}var k=h;h=W;try{return D()}finally{h=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,W){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var k=h;h=D;try{return W()}finally{h=k}},e.unstable_scheduleCallback=function(D,W,k){var O=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?O+k:O):k=O,D){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=k+q,D={id:u++,callback:W,priorityLevel:D,startTime:k,expirationTime:q,sortIndex:-1},k>O?(D.sortIndex=k,t(c,D),n(l)===null&&D===n(c)&&(y?(g(j),j=-1):y=!0,K(b,k-O))):(D.sortIndex=q,t(l,D),m||p||(m=!0,H(C))),D},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(D){var W=h;return function(){var k=h;h=W;try{return D.apply(this,arguments)}finally{h=k}}}})(qv);Yv.exports=qv;var tC=Yv.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var nC=S,Kt=tC;function V(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 Xv=new Set,ra={};function Wi(e,t){Ns(e,t),Ns(e+"Capture",t)}function Ns(e,t){for(ra[e]=t,e=0;e<t.length;e++)Xv.add(t[e])}var or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uf=Object.prototype.hasOwnProperty,rC=/^[: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]*$/,hg={},pg={};function iC(e){return uf.call(pg,e)?!0:uf.call(hg,e)?!1:rC.test(e)?pg[e]=!0:(hg[e]=!0,!1)}function sC(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 oC(e,t,n,r){if(t===null||typeof t>"u"||sC(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 wt(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 nt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nt[e]=new wt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nt[t]=new wt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nt[e]=new wt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nt[e]=new wt(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){nt[e]=new wt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nt[e]=new wt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nt[e]=new wt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nt[e]=new wt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nt[e]=new wt(e,5,!1,e.toLowerCase(),null,!1,!1)});var rp=/[\-:]([a-z])/g;function ip(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(rp,ip);nt[t]=new wt(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(rp,ip);nt[t]=new wt(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(rp,ip);nt[t]=new wt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nt[e]=new wt(e,1,!1,e.toLowerCase(),null,!1,!1)});nt.xlinkHref=new wt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nt[e]=new wt(e,1,!1,e.toLowerCase(),null,!0,!0)});function sp(e,t,n,r){var i=nt.hasOwnProperty(t)?nt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(oC(t,n,i,r)&&(n=null),r||i===null?iC(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 ur=nC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wa=Symbol.for("react.element"),ls=Symbol.for("react.portal"),cs=Symbol.for("react.fragment"),op=Symbol.for("react.strict_mode"),df=Symbol.for("react.profiler"),Zv=Symbol.for("react.provider"),Jv=Symbol.for("react.context"),ap=Symbol.for("react.forward_ref"),ff=Symbol.for("react.suspense"),hf=Symbol.for("react.suspense_list"),lp=Symbol.for("react.memo"),jr=Symbol.for("react.lazy"),e1=Symbol.for("react.offscreen"),mg=Symbol.iterator;function ho(e){return e===null||typeof e!="object"?null:(e=mg&&e[mg]||e["@@iterator"],typeof e=="function"?e:null)}var De=Object.assign,Ou;function Ao(e){if(Ou===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ou=t&&t[1]||""}return`
34
+ `+Ou+e}var $u=!1;function Vu(e,t){if(!e||$u)return"";$u=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
+ `),s=r.stack.split(`
36
+ `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37
+ `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{$u=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ao(e):""}function aC(e){switch(e.tag){case 5:return Ao(e.type);case 16:return Ao("Lazy");case 13:return Ao("Suspense");case 19:return Ao("SuspenseList");case 0:case 2:case 15:return e=Vu(e.type,!1),e;case 11:return e=Vu(e.type.render,!1),e;case 1:return e=Vu(e.type,!0),e;default:return""}}function pf(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 cs:return"Fragment";case ls:return"Portal";case df:return"Profiler";case op:return"StrictMode";case ff:return"Suspense";case hf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jv:return(e.displayName||"Context")+".Consumer";case Zv:return(e._context.displayName||"Context")+".Provider";case ap:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lp:return t=e.displayName||null,t!==null?t:pf(e.type)||"Memo";case jr:t=e._payload,e=e._init;try{return pf(e(t))}catch{}}return null}function lC(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 pf(t);case 8:return t===op?"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 Xr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function t1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cC(e){var t=t1(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 Ha(e){e._valueTracker||(e._valueTracker=cC(e))}function n1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=t1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function lc(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 mf(e,t){var n=t.checked;return De({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Xr(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 r1(e,t){t=t.checked,t!=null&&sp(e,"checked",t,!1)}function gf(e,t){r1(e,t);var n=Xr(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")?yf(e,t.type,n):t.hasOwnProperty("defaultValue")&&yf(e,t.type,Xr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yg(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 yf(e,t,n){(t!=="number"||lc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Do=Array.isArray;function Ss(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=""+Xr(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 xf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return De({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function xg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(V(92));if(Do(n)){if(1<n.length)throw Error(V(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Xr(n)}}function i1(e,t){var n=Xr(t.value),r=Xr(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 vg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function s1(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 vf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?s1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ka,o1=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(Ka=Ka||document.createElement("div"),Ka.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ka.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ia(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $o={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},uC=["Webkit","ms","Moz","O"];Object.keys($o).forEach(function(e){uC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$o[t]=$o[e]})});function a1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$o.hasOwnProperty(e)&&$o[e]?(""+t).trim():t+"px"}function l1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=a1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var dC=De({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wf(e,t){if(t){if(dC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function bf(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 kf=null;function cp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _f=null,Cs=null,Ps=null;function wg(e){if(e=Ma(e)){if(typeof _f!="function")throw Error(V(280));var t=e.stateNode;t&&(t=lu(t),_f(e.stateNode,e.type,t))}}function c1(e){Cs?Ps?Ps.push(e):Ps=[e]:Cs=e}function u1(){if(Cs){var e=Cs,t=Ps;if(Ps=Cs=null,wg(e),t)for(e=0;e<t.length;e++)wg(t[e])}}function d1(e,t){return e(t)}function f1(){}var Uu=!1;function h1(e,t,n){if(Uu)return e(t,n);Uu=!0;try{return d1(e,t,n)}finally{Uu=!1,(Cs!==null||Ps!==null)&&(f1(),u1())}}function sa(e,t){var n=e.stateNode;if(n===null)return null;var r=lu(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(V(231,t,typeof n));return n}var Sf=!1;if(or)try{var po={};Object.defineProperty(po,"passive",{get:function(){Sf=!0}}),window.addEventListener("test",po,po),window.removeEventListener("test",po,po)}catch{Sf=!1}function fC(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Vo=!1,cc=null,uc=!1,Cf=null,hC={onError:function(e){Vo=!0,cc=e}};function pC(e,t,n,r,i,s,o,a,l){Vo=!1,cc=null,fC.apply(hC,arguments)}function mC(e,t,n,r,i,s,o,a,l){if(pC.apply(this,arguments),Vo){if(Vo){var c=cc;Vo=!1,cc=null}else throw Error(V(198));uc||(uc=!0,Cf=c)}}function Hi(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 p1(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 bg(e){if(Hi(e)!==e)throw Error(V(188))}function gC(e){var t=e.alternate;if(!t){if(t=Hi(e),t===null)throw Error(V(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 bg(i),e;if(s===r)return bg(i),t;s=s.sibling}throw Error(V(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(V(189))}}if(n.alternate!==r)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function m1(e){return e=gC(e),e!==null?g1(e):null}function g1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=g1(e);if(t!==null)return t;e=e.sibling}return null}var y1=Kt.unstable_scheduleCallback,kg=Kt.unstable_cancelCallback,yC=Kt.unstable_shouldYield,xC=Kt.unstable_requestPaint,$e=Kt.unstable_now,vC=Kt.unstable_getCurrentPriorityLevel,up=Kt.unstable_ImmediatePriority,x1=Kt.unstable_UserBlockingPriority,dc=Kt.unstable_NormalPriority,wC=Kt.unstable_LowPriority,v1=Kt.unstable_IdlePriority,iu=null,$n=null;function bC(e){if($n&&typeof $n.onCommitFiberRoot=="function")try{$n.onCommitFiberRoot(iu,e,void 0,(e.current.flags&128)===128)}catch{}}var _n=Math.clz32?Math.clz32:SC,kC=Math.log,_C=Math.LN2;function SC(e){return e>>>=0,e===0?32:31-(kC(e)/_C|0)|0}var Ga=64,Qa=4194304;function No(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 fc(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=No(a):(s&=o,s!==0&&(r=No(s)))}else o=n&~i,o!==0?r=No(o):s!==0&&(r=No(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-_n(t),i=1<<n,r|=e[n],t&=~i;return r}function CC(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-_n(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=CC(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Pf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function w1(){var e=Ga;return Ga<<=1,!(Ga&4194240)&&(Ga=64),e}function Wu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ra(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_n(t),e[t]=n}function EC(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-_n(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function dp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_n(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ye=0;function b1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var k1,fp,_1,S1,C1,Ef=!1,Ya=[],$r=null,Vr=null,Ur=null,oa=new Map,aa=new Map,Lr=[],jC="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 _g(e,t){switch(e){case"focusin":case"focusout":$r=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":oa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":aa.delete(t.pointerId)}}function mo(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=Ma(t),t!==null&&fp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function TC(e,t,n,r,i){switch(t){case"focusin":return $r=mo($r,e,t,n,r,i),!0;case"dragenter":return Vr=mo(Vr,e,t,n,r,i),!0;case"mouseover":return Ur=mo(Ur,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return oa.set(s,mo(oa.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,aa.set(s,mo(aa.get(s)||null,e,t,n,r,i)),!0}return!1}function P1(e){var t=bi(e.target);if(t!==null){var n=Hi(t);if(n!==null){if(t=n.tag,t===13){if(t=p1(n),t!==null){e.blockedOn=t,C1(e.priority,function(){_1(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 Il(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=jf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);kf=r,n.target.dispatchEvent(r),kf=null}else return t=Ma(n),t!==null&&fp(t),e.blockedOn=n,!1;t.shift()}return!0}function Sg(e,t,n){Il(e)&&n.delete(t)}function RC(){Ef=!1,$r!==null&&Il($r)&&($r=null),Vr!==null&&Il(Vr)&&(Vr=null),Ur!==null&&Il(Ur)&&(Ur=null),oa.forEach(Sg),aa.forEach(Sg)}function go(e,t){e.blockedOn===t&&(e.blockedOn=null,Ef||(Ef=!0,Kt.unstable_scheduleCallback(Kt.unstable_NormalPriority,RC)))}function la(e){function t(i){return go(i,e)}if(0<Ya.length){go(Ya[0],e);for(var n=1;n<Ya.length;n++){var r=Ya[n];r.blockedOn===e&&(r.blockedOn=null)}}for($r!==null&&go($r,e),Vr!==null&&go(Vr,e),Ur!==null&&go(Ur,e),oa.forEach(t),aa.forEach(t),n=0;n<Lr.length;n++)r=Lr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lr.length&&(n=Lr[0],n.blockedOn===null);)P1(n),n.blockedOn===null&&Lr.shift()}var Es=ur.ReactCurrentBatchConfig,hc=!0;function LC(e,t,n,r){var i=ye,s=Es.transition;Es.transition=null;try{ye=1,hp(e,t,n,r)}finally{ye=i,Es.transition=s}}function MC(e,t,n,r){var i=ye,s=Es.transition;Es.transition=null;try{ye=4,hp(e,t,n,r)}finally{ye=i,Es.transition=s}}function hp(e,t,n,r){if(hc){var i=jf(e,t,n,r);if(i===null)ed(e,t,r,pc,n),_g(e,r);else if(TC(i,e,t,n,r))r.stopPropagation();else if(_g(e,r),t&4&&-1<jC.indexOf(e)){for(;i!==null;){var s=Ma(i);if(s!==null&&k1(s),s=jf(e,t,n,r),s===null&&ed(e,t,r,pc,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else ed(e,t,r,null,n)}}var pc=null;function jf(e,t,n,r){if(pc=null,e=cp(r),e=bi(e),e!==null)if(t=Hi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=p1(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 pc=e,null}function E1(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(vC()){case up:return 1;case x1:return 4;case dc:case wC:return 16;case v1:return 536870912;default:return 16}default:return 16}}var Ir=null,pp=null,Al=null;function j1(){if(Al)return Al;var e,t=pp,n=t.length,r,i="value"in Ir?Ir.value:Ir.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 Al=i.slice(e,1<r?1-r:void 0)}function Dl(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 qa(){return!0}function Cg(){return!1}function qt(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)?qa:Cg,this.isPropagationStopped=Cg,this}return De(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qa)},persist:function(){},isPersistent:qa}),t}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mp=qt(qs),La=De({},qs,{view:0,detail:0}),IC=qt(La),Hu,Ku,yo,su=De({},La,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gp,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!==yo&&(yo&&e.type==="mousemove"?(Hu=e.screenX-yo.screenX,Ku=e.screenY-yo.screenY):Ku=Hu=0,yo=e),Hu)},movementY:function(e){return"movementY"in e?e.movementY:Ku}}),Pg=qt(su),AC=De({},su,{dataTransfer:0}),DC=qt(AC),NC=De({},La,{relatedTarget:0}),Gu=qt(NC),FC=De({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),zC=qt(FC),BC=De({},qs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),OC=qt(BC),$C=De({},qs,{data:0}),Eg=qt($C),VC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UC={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"},WC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function HC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=WC[e])?!!t[e]:!1}function gp(){return HC}var KC=De({},La,{key:function(e){if(e.key){var t=VC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?UC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gp,charCode:function(e){return e.type==="keypress"?Dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),GC=qt(KC),QC=De({},su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jg=qt(QC),YC=De({},La,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gp}),qC=qt(YC),XC=De({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZC=qt(XC),JC=De({},su,{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}),eP=qt(JC),tP=[9,13,27,32],yp=or&&"CompositionEvent"in window,Uo=null;or&&"documentMode"in document&&(Uo=document.documentMode);var nP=or&&"TextEvent"in window&&!Uo,T1=or&&(!yp||Uo&&8<Uo&&11>=Uo),Tg=" ",Rg=!1;function R1(e,t){switch(e){case"keyup":return tP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function L1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var us=!1;function rP(e,t){switch(e){case"compositionend":return L1(t);case"keypress":return t.which!==32?null:(Rg=!0,Tg);case"textInput":return e=t.data,e===Tg&&Rg?null:e;default:return null}}function iP(e,t){if(us)return e==="compositionend"||!yp&&R1(e,t)?(e=j1(),Al=pp=Ir=null,us=!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 T1&&t.locale!=="ko"?null:t.data;default:return null}}var sP={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 Lg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sP[e.type]:t==="textarea"}function M1(e,t,n,r){c1(r),t=mc(t,"onChange"),0<t.length&&(n=new mp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wo=null,ca=null;function oP(e){U1(e,0)}function ou(e){var t=hs(e);if(n1(t))return e}function aP(e,t){if(e==="change")return t}var I1=!1;if(or){var Qu;if(or){var Yu="oninput"in document;if(!Yu){var Mg=document.createElement("div");Mg.setAttribute("oninput","return;"),Yu=typeof Mg.oninput=="function"}Qu=Yu}else Qu=!1;I1=Qu&&(!document.documentMode||9<document.documentMode)}function Ig(){Wo&&(Wo.detachEvent("onpropertychange",A1),ca=Wo=null)}function A1(e){if(e.propertyName==="value"&&ou(ca)){var t=[];M1(t,ca,e,cp(e)),h1(oP,t)}}function lP(e,t,n){e==="focusin"?(Ig(),Wo=t,ca=n,Wo.attachEvent("onpropertychange",A1)):e==="focusout"&&Ig()}function cP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ou(ca)}function uP(e,t){if(e==="click")return ou(t)}function dP(e,t){if(e==="input"||e==="change")return ou(t)}function fP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:fP;function ua(e,t){if(En(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)||!En(e[i],t[i]))return!1}return!0}function Ag(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dg(e,t){var n=Ag(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=Ag(n)}}function D1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?D1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function N1(){for(var e=window,t=lc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=lc(e.document)}return t}function xp(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 hP(e){var t=N1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&D1(n.ownerDocument.documentElement,n)){if(r!==null&&xp(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=Dg(n,s);var o=Dg(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 pP=or&&"documentMode"in document&&11>=document.documentMode,ds=null,Tf=null,Ho=null,Rf=!1;function Ng(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rf||ds==null||ds!==lc(r)||(r=ds,"selectionStart"in r&&xp(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}),Ho&&ua(Ho,r)||(Ho=r,r=mc(Tf,"onSelect"),0<r.length&&(t=new mp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ds)))}function Xa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fs={animationend:Xa("Animation","AnimationEnd"),animationiteration:Xa("Animation","AnimationIteration"),animationstart:Xa("Animation","AnimationStart"),transitionend:Xa("Transition","TransitionEnd")},qu={},F1={};or&&(F1=document.createElement("div").style,"AnimationEvent"in window||(delete fs.animationend.animation,delete fs.animationiteration.animation,delete fs.animationstart.animation),"TransitionEvent"in window||delete fs.transitionend.transition);function au(e){if(qu[e])return qu[e];if(!fs[e])return e;var t=fs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in F1)return qu[e]=t[n];return e}var z1=au("animationend"),B1=au("animationiteration"),O1=au("animationstart"),$1=au("transitionend"),V1=new Map,Fg="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 ni(e,t){V1.set(e,t),Wi(t,[e])}for(var Xu=0;Xu<Fg.length;Xu++){var Zu=Fg[Xu],mP=Zu.toLowerCase(),gP=Zu[0].toUpperCase()+Zu.slice(1);ni(mP,"on"+gP)}ni(z1,"onAnimationEnd");ni(B1,"onAnimationIteration");ni(O1,"onAnimationStart");ni("dblclick","onDoubleClick");ni("focusin","onFocus");ni("focusout","onBlur");ni($1,"onTransitionEnd");Ns("onMouseEnter",["mouseout","mouseover"]);Ns("onMouseLeave",["mouseout","mouseover"]);Ns("onPointerEnter",["pointerout","pointerover"]);Ns("onPointerLeave",["pointerout","pointerover"]);Wi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Wi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Wi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Wi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Wi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Wi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),yP=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fo));function zg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,mC(r,t,void 0,e),e.currentTarget=null}function U1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;zg(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;zg(i,a,c),s=l}}}if(uc)throw e=Cf,uc=!1,Cf=null,e}function je(e,t){var n=t[Df];n===void 0&&(n=t[Df]=new Set);var r=e+"__bubble";n.has(r)||(W1(t,e,2,!1),n.add(r))}function Ju(e,t,n){var r=0;t&&(r|=4),W1(n,e,r,t)}var Za="_reactListening"+Math.random().toString(36).slice(2);function da(e){if(!e[Za]){e[Za]=!0,Xv.forEach(function(n){n!=="selectionchange"&&(yP.has(n)||Ju(n,!1,e),Ju(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Za]||(t[Za]=!0,Ju("selectionchange",!1,t))}}function W1(e,t,n,r){switch(E1(t)){case 1:var i=LC;break;case 4:i=MC;break;default:i=hp}n=i.bind(null,t,n,e),i=void 0,!Sf||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 ed(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=bi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}h1(function(){var c=s,u=cp(n),d=[];e:{var h=V1.get(e);if(h!==void 0){var p=mp,m=e;switch(e){case"keypress":if(Dl(n)===0)break e;case"keydown":case"keyup":p=GC;break;case"focusin":m="focus",p=Gu;break;case"focusout":m="blur",p=Gu;break;case"beforeblur":case"afterblur":p=Gu;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=Pg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=DC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=qC;break;case z1:case B1:case O1:p=zC;break;case $1:p=ZC;break;case"scroll":p=IC;break;case"wheel":p=eP;break;case"copy":case"cut":case"paste":p=OC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=jg}var y=(t&4)!==0,w=!y&&e==="scroll",g=y?h!==null?h+"Capture":null:h;y=[];for(var x=c,v;x!==null;){v=x;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,g!==null&&(b=sa(x,g),b!=null&&y.push(fa(x,b,v)))),w)break;x=x.return}0<y.length&&(h=new p(h,m,null,n,u),d.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==kf&&(m=n.relatedTarget||n.fromElement)&&(bi(m)||m[ar]))break e;if((p||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=c,m=m?bi(m):null,m!==null&&(w=Hi(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=c),p!==m)){if(y=Pg,b="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=jg,b="onPointerLeave",g="onPointerEnter",x="pointer"),w=p==null?h:hs(p),v=m==null?h:hs(m),h=new y(b,x+"leave",p,n,u),h.target=w,h.relatedTarget=v,b=null,bi(u)===c&&(y=new y(g,x+"enter",m,n,u),y.target=v,y.relatedTarget=w,b=y),w=b,p&&m)t:{for(y=p,g=m,x=0,v=y;v;v=Xi(v))x++;for(v=0,b=g;b;b=Xi(b))v++;for(;0<x-v;)y=Xi(y),x--;for(;0<v-x;)g=Xi(g),v--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=Xi(y),g=Xi(g)}y=null}else y=null;p!==null&&Bg(d,h,p,y,!1),m!==null&&w!==null&&Bg(d,w,m,y,!0)}}e:{if(h=c?hs(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var C=aP;else if(Lg(h))if(I1)C=dP;else{C=cP;var _=lP}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=uP);if(C&&(C=C(e,c))){M1(d,C,n,u);break e}_&&_(e,h,c),e==="focusout"&&(_=h._wrapperState)&&_.controlled&&h.type==="number"&&yf(h,"number",h.value)}switch(_=c?hs(c):window,e){case"focusin":(Lg(_)||_.contentEditable==="true")&&(ds=_,Tf=c,Ho=null);break;case"focusout":Ho=Tf=ds=null;break;case"mousedown":Rf=!0;break;case"contextmenu":case"mouseup":case"dragend":Rf=!1,Ng(d,n,u);break;case"selectionchange":if(pP)break;case"keydown":case"keyup":Ng(d,n,u)}var E;if(yp)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else us?R1(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(T1&&n.locale!=="ko"&&(us||j!=="onCompositionStart"?j==="onCompositionEnd"&&us&&(E=j1()):(Ir=u,pp="value"in Ir?Ir.value:Ir.textContent,us=!0)),_=mc(c,j),0<_.length&&(j=new Eg(j,e,null,n,u),d.push({event:j,listeners:_}),E?j.data=E:(E=L1(n),E!==null&&(j.data=E)))),(E=nP?rP(e,n):iP(e,n))&&(c=mc(c,"onBeforeInput"),0<c.length&&(u=new Eg("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=E))}U1(d,t)})}function fa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function mc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=sa(e,n),s!=null&&r.unshift(fa(e,s,i)),s=sa(e,t),s!=null&&r.push(fa(e,s,i))),e=e.return}return r}function Xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Bg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=sa(n,s),l!=null&&o.unshift(fa(n,l,a))):i||(l=sa(n,s),l!=null&&o.push(fa(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var xP=/\r\n?/g,vP=/\u0000|\uFFFD/g;function Og(e){return(typeof e=="string"?e:""+e).replace(xP,`
38
+ `).replace(vP,"")}function Ja(e,t,n){if(t=Og(t),Og(e)!==t&&n)throw Error(V(425))}function gc(){}var Lf=null,Mf=null;function If(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 Af=typeof setTimeout=="function"?setTimeout:void 0,wP=typeof clearTimeout=="function"?clearTimeout:void 0,$g=typeof Promise=="function"?Promise:void 0,bP=typeof queueMicrotask=="function"?queueMicrotask:typeof $g<"u"?function(e){return $g.resolve(null).then(e).catch(kP)}:Af;function kP(e){setTimeout(function(){throw e})}function td(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),la(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);la(t)}function Wr(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 Vg(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 Xs=Math.random().toString(36).slice(2),Bn="__reactFiber$"+Xs,ha="__reactProps$"+Xs,ar="__reactContainer$"+Xs,Df="__reactEvents$"+Xs,_P="__reactListeners$"+Xs,SP="__reactHandles$"+Xs;function bi(e){var t=e[Bn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ar]||n[Bn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Vg(e);e!==null;){if(n=e[Bn])return n;e=Vg(e)}return t}e=n,n=e.parentNode}return null}function Ma(e){return e=e[Bn]||e[ar],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function hs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function lu(e){return e[ha]||null}var Nf=[],ps=-1;function ri(e){return{current:e}}function Te(e){0>ps||(e.current=Nf[ps],Nf[ps]=null,ps--)}function Se(e,t){ps++,Nf[ps]=e.current,e.current=t}var Zr={},dt=ri(Zr),Tt=ri(!1),Bi=Zr;function Fs(e,t){var n=e.type.contextTypes;if(!n)return Zr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Rt(e){return e=e.childContextTypes,e!=null}function yc(){Te(Tt),Te(dt)}function Ug(e,t,n){if(dt.current!==Zr)throw Error(V(168));Se(dt,t),Se(Tt,n)}function H1(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(V(108,lC(e)||"Unknown",i));return De({},n,r)}function xc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zr,Bi=dt.current,Se(dt,e),Se(Tt,Tt.current),!0}function Wg(e,t,n){var r=e.stateNode;if(!r)throw Error(V(169));n?(e=H1(e,t,Bi),r.__reactInternalMemoizedMergedChildContext=e,Te(Tt),Te(dt),Se(dt,e)):Te(Tt),Se(Tt,n)}var tr=null,cu=!1,nd=!1;function K1(e){tr===null?tr=[e]:tr.push(e)}function CP(e){cu=!0,K1(e)}function ii(){if(!nd&&tr!==null){nd=!0;var e=0,t=ye;try{var n=tr;for(ye=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}tr=null,cu=!1}catch(i){throw tr!==null&&(tr=tr.slice(e+1)),y1(up,ii),i}finally{ye=t,nd=!1}}return null}var ms=[],gs=0,vc=null,wc=0,sn=[],on=0,Oi=null,nr=1,rr="";function mi(e,t){ms[gs++]=wc,ms[gs++]=vc,vc=e,wc=t}function G1(e,t,n){sn[on++]=nr,sn[on++]=rr,sn[on++]=Oi,Oi=e;var r=nr;e=rr;var i=32-_n(r)-1;r&=~(1<<i),n+=1;var s=32-_n(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,nr=1<<32-_n(t)+i|n<<i|r,rr=s+e}else nr=1<<s|n<<i|r,rr=e}function vp(e){e.return!==null&&(mi(e,1),G1(e,1,0))}function wp(e){for(;e===vc;)vc=ms[--gs],ms[gs]=null,wc=ms[--gs],ms[gs]=null;for(;e===Oi;)Oi=sn[--on],sn[on]=null,rr=sn[--on],sn[on]=null,nr=sn[--on],sn[on]=null}var Ut=null,$t=null,Le=!1,kn=null;function Q1(e,t){var n=ln(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Hg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ut=e,$t=Wr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ut=e,$t=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Oi!==null?{id:nr,overflow:rr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ut=e,$t=null,!0):!1;default:return!1}}function Ff(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zf(e){if(Le){var t=$t;if(t){var n=t;if(!Hg(e,t)){if(Ff(e))throw Error(V(418));t=Wr(n.nextSibling);var r=Ut;t&&Hg(e,t)?Q1(r,n):(e.flags=e.flags&-4097|2,Le=!1,Ut=e)}}else{if(Ff(e))throw Error(V(418));e.flags=e.flags&-4097|2,Le=!1,Ut=e}}}function Kg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ut=e}function el(e){if(e!==Ut)return!1;if(!Le)return Kg(e),Le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!If(e.type,e.memoizedProps)),t&&(t=$t)){if(Ff(e))throw Y1(),Error(V(418));for(;t;)Q1(e,t),t=Wr(t.nextSibling)}if(Kg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){$t=Wr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$t=null}}else $t=Ut?Wr(e.stateNode.nextSibling):null;return!0}function Y1(){for(var e=$t;e;)e=Wr(e.nextSibling)}function zs(){$t=Ut=null,Le=!1}function bp(e){kn===null?kn=[e]:kn.push(e)}var PP=ur.ReactCurrentBatchConfig;function xo(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(V(309));var r=n.stateNode}if(!r)throw Error(V(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(V(284));if(!n._owner)throw Error(V(290,e))}return e}function tl(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Gg(e){var t=e._init;return t(e._payload)}function q1(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=Qr(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=cd(v,g.mode,b),x.return=g,x):(x=i(x,v),x.return=g,x)}function l(g,x,v,b){var C=v.type;return C===cs?u(g,x,v.props.children,b,v.key):x!==null&&(x.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jr&&Gg(C)===x.type)?(b=i(x,v.props),b.ref=xo(g,x,v),b.return=g,b):(b=Vl(v.type,v.key,v.props,null,g.mode,b),b.ref=xo(g,x,v),b.return=g,b)}function c(g,x,v,b){return x===null||x.tag!==4||x.stateNode.containerInfo!==v.containerInfo||x.stateNode.implementation!==v.implementation?(x=ud(v,g.mode,b),x.return=g,x):(x=i(x,v.children||[]),x.return=g,x)}function u(g,x,v,b,C){return x===null||x.tag!==7?(x=Li(v,g.mode,b,C),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=cd(""+x,g.mode,v),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Wa:return v=Vl(x.type,x.key,x.props,null,g.mode,v),v.ref=xo(g,null,x),v.return=g,v;case ls:return x=ud(x,g.mode,v),x.return=g,x;case jr:var b=x._init;return d(g,b(x._payload),v)}if(Do(x)||ho(x))return x=Li(x,g.mode,v,null),x.return=g,x;tl(g,x)}return null}function h(g,x,v,b){var C=x!==null?x.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return C!==null?null:a(g,x,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Wa:return v.key===C?l(g,x,v,b):null;case ls:return v.key===C?c(g,x,v,b):null;case jr:return C=v._init,h(g,x,C(v._payload),b)}if(Do(v)||ho(v))return C!==null?null:u(g,x,v,b,null);tl(g,v)}return null}function p(g,x,v,b,C){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(v)||null,a(x,g,""+b,C);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Wa:return g=g.get(b.key===null?v:b.key)||null,l(x,g,b,C);case ls:return g=g.get(b.key===null?v:b.key)||null,c(x,g,b,C);case jr:var _=b._init;return p(g,x,v,_(b._payload),C)}if(Do(b)||ho(b))return g=g.get(v)||null,u(x,g,b,C,null);tl(x,b)}return null}function m(g,x,v,b){for(var C=null,_=null,E=x,j=x=0,L=null;E!==null&&j<v.length;j++){E.index>j?(L=E,E=null):L=E.sibling;var P=h(g,E,v[j],b);if(P===null){E===null&&(E=L);break}e&&E&&P.alternate===null&&t(g,E),x=s(P,x,j),_===null?C=P:_.sibling=P,_=P,E=L}if(j===v.length)return n(g,E),Le&&mi(g,j),C;if(E===null){for(;j<v.length;j++)E=d(g,v[j],b),E!==null&&(x=s(E,x,j),_===null?C=E:_.sibling=E,_=E);return Le&&mi(g,j),C}for(E=r(g,E);j<v.length;j++)L=p(E,g,j,v[j],b),L!==null&&(e&&L.alternate!==null&&E.delete(L.key===null?j:L.key),x=s(L,x,j),_===null?C=L:_.sibling=L,_=L);return e&&E.forEach(function(R){return t(g,R)}),Le&&mi(g,j),C}function y(g,x,v,b){var C=ho(v);if(typeof C!="function")throw Error(V(150));if(v=C.call(v),v==null)throw Error(V(151));for(var _=C=null,E=x,j=x=0,L=null,P=v.next();E!==null&&!P.done;j++,P=v.next()){E.index>j?(L=E,E=null):L=E.sibling;var R=h(g,E,P.value,b);if(R===null){E===null&&(E=L);break}e&&E&&R.alternate===null&&t(g,E),x=s(R,x,j),_===null?C=R:_.sibling=R,_=R,E=L}if(P.done)return n(g,E),Le&&mi(g,j),C;if(E===null){for(;!P.done;j++,P=v.next())P=d(g,P.value,b),P!==null&&(x=s(P,x,j),_===null?C=P:_.sibling=P,_=P);return Le&&mi(g,j),C}for(E=r(g,E);!P.done;j++,P=v.next())P=p(E,g,j,P.value,b),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?j:P.key),x=s(P,x,j),_===null?C=P:_.sibling=P,_=P);return e&&E.forEach(function(M){return t(g,M)}),Le&&mi(g,j),C}function w(g,x,v,b){if(typeof v=="object"&&v!==null&&v.type===cs&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Wa:e:{for(var C=v.key,_=x;_!==null;){if(_.key===C){if(C=v.type,C===cs){if(_.tag===7){n(g,_.sibling),x=i(_,v.props.children),x.return=g,g=x;break e}}else if(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jr&&Gg(C)===_.type){n(g,_.sibling),x=i(_,v.props),x.ref=xo(g,_,v),x.return=g,g=x;break e}n(g,_);break}else t(g,_);_=_.sibling}v.type===cs?(x=Li(v.props.children,g.mode,b,v.key),x.return=g,g=x):(b=Vl(v.type,v.key,v.props,null,g.mode,b),b.ref=xo(g,x,v),b.return=g,g=b)}return o(g);case ls:e:{for(_=v.key;x!==null;){if(x.key===_)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=ud(v,g.mode,b),x.return=g,g=x}return o(g);case jr:return _=v._init,w(g,x,_(v._payload),b)}if(Do(v))return m(g,x,v,b);if(ho(v))return y(g,x,v,b);tl(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=cd(v,g.mode,b),x.return=g,g=x),o(g)):n(g,x)}return w}var Bs=q1(!0),X1=q1(!1),bc=ri(null),kc=null,ys=null,kp=null;function _p(){kp=ys=kc=null}function Sp(e){var t=bc.current;Te(bc),e._currentValue=t}function Bf(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 js(e,t){kc=e,kp=ys=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pt=!0),e.firstContext=null)}function hn(e){var t=e._currentValue;if(kp!==e)if(e={context:e,memoizedValue:t,next:null},ys===null){if(kc===null)throw Error(V(308));ys=e,kc.dependencies={lanes:0,firstContext:e}}else ys=ys.next=e;return t}var ki=null;function Cp(e){ki===null?ki=[e]:ki.push(e)}function Z1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Cp(t)):(n.next=i.next,i.next=n),t.interleaved=n,lr(e,r)}function lr(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 Tr=!1;function Pp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function J1(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 ir(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Hr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ce&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,lr(e,n)}return i=r.interleaved,i===null?(t.next=t,Cp(r)):(t.next=i.next,i.next=t),r.interleaved=t,lr(e,n)}function Nl(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,dp(e,n)}}function Qg(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 _c(e,t,n,r){var i=e.updateQueue;Tr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,u=c=l=null,a=s;do{var h=a.lane,p=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(h=t,p=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(p,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,h=typeof m=="function"?m.call(p,d,h):m,h==null)break e;d=De({},d,h);break e;case 2:Tr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Vi|=o,e.lanes=o,e.memoizedState=d}}function Yg(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(V(191,i));i.call(r)}}}var Ia={},Vn=ri(Ia),pa=ri(Ia),ma=ri(Ia);function _i(e){if(e===Ia)throw Error(V(174));return e}function Ep(e,t){switch(Se(ma,t),Se(pa,e),Se(Vn,Ia),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vf(t,e)}Te(Vn),Se(Vn,t)}function Os(){Te(Vn),Te(pa),Te(ma)}function ew(e){_i(ma.current);var t=_i(Vn.current),n=vf(t,e.type);t!==n&&(Se(pa,e),Se(Vn,n))}function jp(e){pa.current===e&&(Te(Vn),Te(pa))}var Ie=ri(0);function Sc(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 rd=[];function Tp(){for(var e=0;e<rd.length;e++)rd[e]._workInProgressVersionPrimary=null;rd.length=0}var Fl=ur.ReactCurrentDispatcher,id=ur.ReactCurrentBatchConfig,$i=0,Ae=null,Ge=null,qe=null,Cc=!1,Ko=!1,ga=0,EP=0;function at(){throw Error(V(321))}function Rp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function Lp(e,t,n,r,i,s){if($i=s,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Fl.current=e===null||e.memoizedState===null?LP:MP,e=n(r,i),Ko){s=0;do{if(Ko=!1,ga=0,25<=s)throw Error(V(301));s+=1,qe=Ge=null,t.updateQueue=null,Fl.current=IP,e=n(r,i)}while(Ko)}if(Fl.current=Pc,t=Ge!==null&&Ge.next!==null,$i=0,qe=Ge=Ae=null,Cc=!1,t)throw Error(V(300));return e}function Mp(){var e=ga!==0;return ga=0,e}function An(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Ae.memoizedState=qe=e:qe=qe.next=e,qe}function pn(){if(Ge===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=qe===null?Ae.memoizedState:qe.next;if(t!==null)qe=t,Ge=e;else{if(e===null)throw Error(V(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},qe===null?Ae.memoizedState=qe=e:qe=qe.next=e}return qe}function ya(e,t){return typeof t=="function"?t(e):t}function sd(e){var t=pn(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=Ge,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var u=c.lane;if(($i&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Ae.lanes|=u,Vi|=u}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,En(r,t.memoizedState)||(Pt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Ae.lanes|=s,Vi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function od(e){var t=pn(),n=t.queue;if(n===null)throw Error(V(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);En(s,t.memoizedState)||(Pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function tw(){}function nw(e,t){var n=Ae,r=pn(),i=t(),s=!En(r.memoizedState,i);if(s&&(r.memoizedState=i,Pt=!0),r=r.queue,Ip(sw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||qe!==null&&qe.memoizedState.tag&1){if(n.flags|=2048,xa(9,iw.bind(null,n,r,i,t),void 0,null),Xe===null)throw Error(V(349));$i&30||rw(n,t,i)}return i}function rw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function iw(e,t,n,r){t.value=n,t.getSnapshot=r,ow(t)&&aw(e)}function sw(e,t,n){return n(function(){ow(t)&&aw(e)})}function ow(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function aw(e){var t=lr(e,1);t!==null&&Sn(t,e,1,-1)}function qg(e){var t=An();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ya,lastRenderedState:e},t.queue=e,e=e.dispatch=RP.bind(null,Ae,e),[t.memoizedState,e]}function xa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function lw(){return pn().memoizedState}function zl(e,t,n,r){var i=An();Ae.flags|=e,i.memoizedState=xa(1|t,n,void 0,r===void 0?null:r)}function uu(e,t,n,r){var i=pn();r=r===void 0?null:r;var s=void 0;if(Ge!==null){var o=Ge.memoizedState;if(s=o.destroy,r!==null&&Rp(r,o.deps)){i.memoizedState=xa(t,n,s,r);return}}Ae.flags|=e,i.memoizedState=xa(1|t,n,s,r)}function Xg(e,t){return zl(8390656,8,e,t)}function Ip(e,t){return uu(2048,8,e,t)}function cw(e,t){return uu(4,2,e,t)}function uw(e,t){return uu(4,4,e,t)}function dw(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 fw(e,t,n){return n=n!=null?n.concat([e]):null,uu(4,4,dw.bind(null,t,e),n)}function Ap(){}function hw(e,t){var n=pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pw(e,t){var n=pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function mw(e,t,n){return $i&21?(En(n,t)||(n=w1(),Ae.lanes|=n,Vi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pt=!0),e.memoizedState=n)}function jP(e,t){var n=ye;ye=n!==0&&4>n?n:4,e(!0);var r=id.transition;id.transition={};try{e(!1),t()}finally{ye=n,id.transition=r}}function gw(){return pn().memoizedState}function TP(e,t,n){var r=Gr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yw(e))xw(t,n);else if(n=Z1(e,t,n,r),n!==null){var i=yt();Sn(n,e,r,i),vw(n,t,r)}}function RP(e,t,n){var r=Gr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yw(e))xw(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,En(a,o)){var l=t.interleaved;l===null?(i.next=i,Cp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Z1(e,t,i,r),n!==null&&(i=yt(),Sn(n,e,r,i),vw(n,t,r))}}function yw(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function xw(e,t){Ko=Cc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dp(e,n)}}var Pc={readContext:hn,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useInsertionEffect:at,useLayoutEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useMutableSource:at,useSyncExternalStore:at,useId:at,unstable_isNewReconciler:!1},LP={readContext:hn,useCallback:function(e,t){return An().memoizedState=[e,t===void 0?null:t],e},useContext:hn,useEffect:Xg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zl(4194308,4,dw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zl(4194308,4,e,t)},useInsertionEffect:function(e,t){return zl(4,2,e,t)},useMemo:function(e,t){var n=An();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=An();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=TP.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=An();return e={current:e},t.memoizedState=e},useState:qg,useDebugValue:Ap,useDeferredValue:function(e){return An().memoizedState=e},useTransition:function(){var e=qg(!1),t=e[0];return e=jP.bind(null,e[1]),An().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ae,i=An();if(Le){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),Xe===null)throw Error(V(349));$i&30||rw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Xg(sw.bind(null,r,s,e),[e]),r.flags|=2048,xa(9,iw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=An(),t=Xe.identifierPrefix;if(Le){var n=rr,r=nr;n=(r&~(1<<32-_n(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ga++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=EP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},MP={readContext:hn,useCallback:hw,useContext:hn,useEffect:Ip,useImperativeHandle:fw,useInsertionEffect:cw,useLayoutEffect:uw,useMemo:pw,useReducer:sd,useRef:lw,useState:function(){return sd(ya)},useDebugValue:Ap,useDeferredValue:function(e){var t=pn();return mw(t,Ge.memoizedState,e)},useTransition:function(){var e=sd(ya)[0],t=pn().memoizedState;return[e,t]},useMutableSource:tw,useSyncExternalStore:nw,useId:gw,unstable_isNewReconciler:!1},IP={readContext:hn,useCallback:hw,useContext:hn,useEffect:Ip,useImperativeHandle:fw,useInsertionEffect:cw,useLayoutEffect:uw,useMemo:pw,useReducer:od,useRef:lw,useState:function(){return od(ya)},useDebugValue:Ap,useDeferredValue:function(e){var t=pn();return Ge===null?t.memoizedState=e:mw(t,Ge.memoizedState,e)},useTransition:function(){var e=od(ya)[0],t=pn().memoizedState;return[e,t]},useMutableSource:tw,useSyncExternalStore:nw,useId:gw,unstable_isNewReconciler:!1};function wn(e,t){if(e&&e.defaultProps){t=De({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Of(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:De({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var du={isMounted:function(e){return(e=e._reactInternals)?Hi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Gr(e),s=ir(r,i);s.payload=t,n!=null&&(s.callback=n),t=Hr(e,s,i),t!==null&&(Sn(t,e,i,r),Nl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Gr(e),s=ir(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Hr(e,s,i),t!==null&&(Sn(t,e,i,r),Nl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),r=Gr(e),i=ir(n,r);i.tag=2,t!=null&&(i.callback=t),t=Hr(e,i,r),t!==null&&(Sn(t,e,r,n),Nl(t,e,r))}};function Zg(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?!ua(n,r)||!ua(i,s):!0}function ww(e,t,n){var r=!1,i=Zr,s=t.contextType;return typeof s=="object"&&s!==null?s=hn(s):(i=Rt(t)?Bi:dt.current,r=t.contextTypes,s=(r=r!=null)?Fs(e,i):Zr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=du,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Jg(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&&du.enqueueReplaceState(t,t.state,null)}function $f(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Pp(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=hn(s):(s=Rt(t)?Bi:dt.current,i.context=Fs(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&&du.enqueueReplaceState(i,i.state,null),_c(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function $s(e,t){try{var n="",r=t;do n+=aC(r),r=r.return;while(r);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function ad(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Vf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var AP=typeof WeakMap=="function"?WeakMap:Map;function bw(e,t,n){n=ir(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){jc||(jc=!0,Zf=r),Vf(e,t)},n}function kw(e,t,n){n=ir(-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(){Vf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Vf(e,t),typeof r!="function"&&(Kr===null?Kr=new Set([this]):Kr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function ey(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new AP;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=QP.bind(null,e,t,n),t.then(e,e))}function ty(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 ny(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=ir(-1,1),t.tag=2,Hr(n,t,1))),n.lanes|=1),e)}var DP=ur.ReactCurrentOwner,Pt=!1;function ht(e,t,n,r){t.child=e===null?X1(t,null,n,r):Bs(t,e.child,n,r)}function ry(e,t,n,r,i){n=n.render;var s=t.ref;return js(t,i),r=Lp(e,t,n,r,s,i),n=Mp(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cr(e,t,i)):(Le&&n&&vp(t),t.flags|=1,ht(e,t,r,i),t.child)}function iy(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Vp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,_w(e,t,s,r,i)):(e=Vl(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:ua,n(o,r)&&e.ref===t.ref)return cr(e,t,i)}return t.flags|=1,e=Qr(s,r),e.ref=t.ref,e.return=t,t.child=e}function _w(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ua(s,r)&&e.ref===t.ref)if(Pt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Pt=!0);else return t.lanes=e.lanes,cr(e,t,i)}return Uf(e,t,n,r,i)}function Sw(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Se(vs,Ot),Ot|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Se(vs,Ot),Ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Se(vs,Ot),Ot|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Se(vs,Ot),Ot|=r;return ht(e,t,i,n),t.child}function Cw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uf(e,t,n,r,i){var s=Rt(n)?Bi:dt.current;return s=Fs(t,s),js(t,i),n=Lp(e,t,n,r,s,i),r=Mp(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cr(e,t,i)):(Le&&r&&vp(t),t.flags|=1,ht(e,t,n,i),t.child)}function sy(e,t,n,r,i){if(Rt(n)){var s=!0;xc(t)}else s=!1;if(js(t,i),t.stateNode===null)Bl(e,t),ww(t,n,r),$f(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=hn(c):(c=Rt(n)?Bi:dt.current,c=Fs(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Jg(t,o,r,c),Tr=!1;var h=t.memoizedState;o.state=h,_c(t,r,o,i),l=t.memoizedState,a!==r||h!==l||Tt.current||Tr?(typeof u=="function"&&(Of(t,n,u,r),l=t.memoizedState),(a=Tr||Zg(t,n,a,r,h,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,J1(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:wn(t.type,a),o.props=c,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=hn(l):(l=Rt(n)?Bi:dt.current,l=Fs(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Jg(t,o,r,l),Tr=!1,h=t.memoizedState,o.state=h,_c(t,r,o,i);var m=t.memoizedState;a!==d||h!==m||Tt.current||Tr?(typeof p=="function"&&(Of(t,n,p,r),m=t.memoizedState),(c=Tr||Zg(t,n,c,r,h,m,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Wf(e,t,n,r,s,i)}function Wf(e,t,n,r,i,s){Cw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Wg(t,n,!1),cr(e,t,s);r=t.stateNode,DP.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Bs(t,e.child,null,s),t.child=Bs(t,null,a,s)):ht(e,t,a,s),t.memoizedState=r.state,i&&Wg(t,n,!0),t.child}function Pw(e){var t=e.stateNode;t.pendingContext?Ug(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ug(e,t.context,!1),Ep(e,t.containerInfo)}function oy(e,t,n,r,i){return zs(),bp(i),t.flags|=256,ht(e,t,n,r),t.child}var Hf={dehydrated:null,treeContext:null,retryLane:0};function Kf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ew(e,t,n){var r=t.pendingProps,i=Ie.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Se(Ie,i&1),e===null)return 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=pu(o,r,0,null),e=Li(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Kf(n),t.memoizedState=Hf,e):Dp(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return NP(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=Qr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Qr(a,s):(s=Li(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?Kf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Hf,r}return s=e.child,e=s.sibling,r=Qr(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 Dp(e,t){return t=pu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function nl(e,t,n,r){return r!==null&&bp(r),Bs(t,e.child,null,n),e=Dp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function NP(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=ad(Error(V(422))),nl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=pu({mode:"visible",children:r.children},i,0,null),s=Li(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Bs(t,e.child,null,o),t.child.memoizedState=Kf(o),t.memoizedState=Hf,s);if(!(t.mode&1))return nl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(V(419)),r=ad(s,r,void 0),nl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Pt||a){if(r=Xe,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,lr(e,i),Sn(r,e,i,-1))}return $p(),r=ad(Error(V(421))),nl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=YP.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,$t=Wr(i.nextSibling),Ut=t,Le=!0,kn=null,e!==null&&(sn[on++]=nr,sn[on++]=rr,sn[on++]=Oi,nr=e.id,rr=e.overflow,Oi=t),t=Dp(t,r.children),t.flags|=4096,t)}function ay(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bf(e.return,t,n)}function ld(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 jw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ht(e,t,r.children,n),r=Ie.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ay(e,n,t);else if(e.tag===19)ay(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Se(Ie,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Sc(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ld(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&&Sc(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ld(t,!0,n,null,s);break;case"together":ld(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Bl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function cr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Vi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=Qr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function FP(e,t,n){switch(t.tag){case 3:Pw(t),zs();break;case 5:ew(t);break;case 1:Rt(t.type)&&xc(t);break;case 4:Ep(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Se(bc,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Se(Ie,Ie.current&1),t.flags|=128,null):n&t.child.childLanes?Ew(e,t,n):(Se(Ie,Ie.current&1),e=cr(e,t,n),e!==null?e.sibling:null);Se(Ie,Ie.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Se(Ie,Ie.current),r)break;return null;case 22:case 23:return t.lanes=0,Sw(e,t,n)}return cr(e,t,n)}var Tw,Gf,Rw,Lw;Tw=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(){};Rw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_i(Vn.current);var s=null;switch(n){case"input":i=mf(e,i),r=mf(e,r),s=[];break;case"select":i=De({},i,{value:void 0}),r=De({},r,{value:void 0}),s=[];break;case"textarea":i=xf(e,i),r=xf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=gc)}wf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ra.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ra.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&je("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Lw=function(e,t,n,r){n!==r&&(t.flags|=4)};function vo(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function lt(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 zP(e,t,n){var r=t.pendingProps;switch(wp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return Rt(t.type)&&yc(),lt(t),null;case 3:return r=t.stateNode,Os(),Te(Tt),Te(dt),Tp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(el(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kn!==null&&(th(kn),kn=null))),Gf(e,t),lt(t),null;case 5:jp(t);var i=_i(ma.current);if(n=t.type,e!==null&&t.stateNode!=null)Rw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(V(166));return lt(t),null}if(e=_i(Vn.current),el(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Bn]=t,r[ha]=s,e=(t.mode&1)!==0,n){case"dialog":je("cancel",r),je("close",r);break;case"iframe":case"object":case"embed":je("load",r);break;case"video":case"audio":for(i=0;i<Fo.length;i++)je(Fo[i],r);break;case"source":je("error",r);break;case"img":case"image":case"link":je("error",r),je("load",r);break;case"details":je("toggle",r);break;case"input":gg(r,s),je("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},je("invalid",r);break;case"textarea":xg(r,s),je("invalid",r)}wf(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&&Ja(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ja(r.textContent,a,e),i=["children",""+a]):ra.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&je("scroll",r)}switch(n){case"input":Ha(r),yg(r,s,!0);break;case"textarea":Ha(r),vg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=gc)}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=s1(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[Bn]=t,e[ha]=r,Tw(e,t,!1,!1),t.stateNode=e;e:{switch(o=bf(n,r),n){case"dialog":je("cancel",e),je("close",e),i=r;break;case"iframe":case"object":case"embed":je("load",e),i=r;break;case"video":case"audio":for(i=0;i<Fo.length;i++)je(Fo[i],e);i=r;break;case"source":je("error",e),i=r;break;case"img":case"image":case"link":je("error",e),je("load",e),i=r;break;case"details":je("toggle",e),i=r;break;case"input":gg(e,r),i=mf(e,r),je("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=De({},r,{value:void 0}),je("invalid",e);break;case"textarea":xg(e,r),i=xf(e,r),je("invalid",e);break;default:i=r}wf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?l1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&o1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ia(e,l):typeof l=="number"&&ia(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ra.hasOwnProperty(s)?l!=null&&s==="onScroll"&&je("scroll",e):l!=null&&sp(e,s,l,o))}switch(n){case"input":Ha(e),yg(e,r,!1);break;case"textarea":Ha(e),vg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Xr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ss(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ss(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=gc)}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 lt(t),null;case 6:if(e&&t.stateNode!=null)Lw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(V(166));if(n=_i(ma.current),_i(Vn.current),el(t)){if(r=t.stateNode,n=t.memoizedProps,r[Bn]=t,(s=r.nodeValue!==n)&&(e=Ut,e!==null))switch(e.tag){case 3:Ja(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ja(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Bn]=t,t.stateNode=r}return lt(t),null;case 13:if(Te(Ie),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Le&&$t!==null&&t.mode&1&&!(t.flags&128))Y1(),zs(),t.flags|=98560,s=!1;else if(s=el(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(V(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(V(317));s[Bn]=t}else zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;lt(t),s=!1}else kn!==null&&(th(kn),kn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ie.current&1?Qe===0&&(Qe=3):$p())),t.updateQueue!==null&&(t.flags|=4),lt(t),null);case 4:return Os(),Gf(e,t),e===null&&da(t.stateNode.containerInfo),lt(t),null;case 10:return Sp(t.type._context),lt(t),null;case 17:return Rt(t.type)&&yc(),lt(t),null;case 19:if(Te(Ie),s=t.memoizedState,s===null)return lt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)vo(s,!1);else{if(Qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Sc(e),o!==null){for(t.flags|=128,vo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Se(Ie,Ie.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>Vs&&(t.flags|=128,r=!0,vo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Sc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Le)return lt(t),null}else 2*$e()-s.renderingStartTime>Vs&&n!==1073741824&&(t.flags|=128,r=!0,vo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=$e(),t.sibling=null,n=Ie.current,Se(Ie,r?n&1|2:n&1),t):(lt(t),null);case 22:case 23:return Op(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ot&1073741824&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function BP(e,t){switch(wp(t),t.tag){case 1:return Rt(t.type)&&yc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Os(),Te(Tt),Te(dt),Tp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return jp(t),null;case 13:if(Te(Ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Ie),null;case 4:return Os(),null;case 10:return Sp(t.type._context),null;case 22:case 23:return Op(),null;case 24:return null;default:return null}}var rl=!1,ct=!1,OP=typeof WeakSet=="function"?WeakSet:Set,Q=null;function xs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ze(e,t,r)}else n.current=null}function Qf(e,t,n){try{n()}catch(r){ze(e,t,r)}}var ly=!1;function $P(e,t){if(Lf=hc,e=N1(),xp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===i&&(a=o),h===s&&++u===r&&(l=o),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mf={focusedElem:e,selectionRange:n},hc=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:wn(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(V(163))}}catch(b){ze(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return m=ly,ly=!1,m}function Go(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&&Qf(t,n,s)}i=i.next}while(i!==r)}}function fu(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 Mw(e){var t=e.alternate;t!==null&&(e.alternate=null,Mw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bn],delete t[ha],delete t[Df],delete t[_P],delete t[SP])),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 Iw(e){return e.tag===5||e.tag===3||e.tag===4}function cy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Iw(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=gc));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 Xf(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(Xf(e,t,n),e=e.sibling;e!==null;)Xf(e,t,n),e=e.sibling}var Ze=null,bn=!1;function gr(e,t,n){for(n=n.child;n!==null;)Aw(e,t,n),n=n.sibling}function Aw(e,t,n){if($n&&typeof $n.onCommitFiberUnmount=="function")try{$n.onCommitFiberUnmount(iu,n)}catch{}switch(n.tag){case 5:ct||xs(n,t);case 6:var r=Ze,i=bn;Ze=null,gr(e,t,n),Ze=r,bn=i,Ze!==null&&(bn?(e=Ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ze.removeChild(n.stateNode));break;case 18:Ze!==null&&(bn?(e=Ze,n=n.stateNode,e.nodeType===8?td(e.parentNode,n):e.nodeType===1&&td(e,n),la(e)):td(Ze,n.stateNode));break;case 4:r=Ze,i=bn,Ze=n.stateNode.containerInfo,bn=!0,gr(e,t,n),Ze=r,bn=i;break;case 0:case 11:case 14:case 15:if(!ct&&(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)&&Qf(n,t,o),i=i.next}while(i!==r)}gr(e,t,n);break;case 1:if(!ct&&(xs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ze(n,t,a)}gr(e,t,n);break;case 21:gr(e,t,n);break;case 22:n.mode&1?(ct=(r=ct)||n.memoizedState!==null,gr(e,t,n),ct=r):gr(e,t,n);break;default:gr(e,t,n)}}function uy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new OP),t.forEach(function(r){var i=qP.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function gn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ze=a.stateNode,bn=!1;break e;case 3:Ze=a.stateNode.containerInfo,bn=!0;break e;case 4:Ze=a.stateNode.containerInfo,bn=!0;break e}a=a.return}if(Ze===null)throw Error(V(160));Aw(s,o,i),Ze=null,bn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ze(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Dw(t,e),t=t.sibling}function Dw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gn(t,e),Rn(e),r&4){try{Go(3,e,e.return),fu(3,e)}catch(y){ze(e,e.return,y)}try{Go(5,e,e.return)}catch(y){ze(e,e.return,y)}}break;case 1:gn(t,e),Rn(e),r&512&&n!==null&&xs(n,n.return);break;case 5:if(gn(t,e),Rn(e),r&512&&n!==null&&xs(n,n.return),e.flags&32){var i=e.stateNode;try{ia(i,"")}catch(y){ze(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&&r1(i,s),bf(a,o);var c=bf(a,s);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?l1(i,d):u==="dangerouslySetInnerHTML"?o1(i,d):u==="children"?ia(i,d):sp(i,u,d,c)}switch(a){case"input":gf(i,s);break;case"textarea":i1(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ss(i,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?Ss(i,!!s.multiple,s.defaultValue,!0):Ss(i,!!s.multiple,s.multiple?[]:"",!1))}i[ha]=s}catch(y){ze(e,e.return,y)}}break;case 6:if(gn(t,e),Rn(e),r&4){if(e.stateNode===null)throw Error(V(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){ze(e,e.return,y)}}break;case 3:if(gn(t,e),Rn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{la(t.containerInfo)}catch(y){ze(e,e.return,y)}break;case 4:gn(t,e),Rn(e);break;case 13:gn(t,e),Rn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(zp=$e())),r&4&&uy(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(ct=(c=ct)||u,gn(t,e),ct=c):gn(t,e),Rn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(Q=e,u=e.child;u!==null;){for(d=Q=u;Q!==null;){switch(h=Q,p=h.child,h.tag){case 0:case 11:case 14:case 15:Go(4,h,h.return);break;case 1:xs(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){ze(r,n,y)}}break;case 5:xs(h,h.return);break;case 22:if(h.memoizedState!==null){fy(d);continue}}p!==null?(p.return=h,Q=p):fy(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=a1("display",o))}catch(y){ze(e,e.return,y)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(y){ze(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gn(t,e),Rn(e),r&4&&uy(e);break;case 21:break;default:gn(t,e),Rn(e)}}function Rn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Iw(n)){var r=n;break e}n=n.return}throw Error(V(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ia(i,""),r.flags&=-33);var s=cy(e);Xf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=cy(e);qf(e,a,o);break;default:throw Error(V(161))}}catch(l){ze(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function VP(e,t,n){Q=e,Nw(e)}function Nw(e,t,n){for(var r=(e.mode&1)!==0;Q!==null;){var i=Q,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||rl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||ct;a=rl;var c=ct;if(rl=o,(ct=l)&&!c)for(Q=i;Q!==null;)o=Q,l=o.child,o.tag===22&&o.memoizedState!==null?hy(i):l!==null?(l.return=o,Q=l):hy(i);for(;s!==null;)Q=s,Nw(s),s=s.sibling;Q=i,rl=a,ct=c}dy(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Q=s):dy(e)}}function dy(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ct||fu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ct)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:wn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Yg(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}Yg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&la(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}ct||t.flags&512&&Yf(t)}catch(h){ze(t,t.return,h)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function fy(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function hy(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fu(4,t)}catch(l){ze(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ze(t,i,l)}}var s=t.return;try{Yf(t)}catch(l){ze(t,s,l)}break;case 5:var o=t.return;try{Yf(t)}catch(l){ze(t,o,l)}}}catch(l){ze(t,t.return,l)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var UP=Math.ceil,Ec=ur.ReactCurrentDispatcher,Np=ur.ReactCurrentOwner,dn=ur.ReactCurrentBatchConfig,ce=0,Xe=null,We=null,tt=0,Ot=0,vs=ri(0),Qe=0,va=null,Vi=0,hu=0,Fp=0,Qo=null,Ct=null,zp=0,Vs=1/0,er=null,jc=!1,Zf=null,Kr=null,il=!1,Ar=null,Tc=0,Yo=0,Jf=null,Ol=-1,$l=0;function yt(){return ce&6?$e():Ol!==-1?Ol:Ol=$e()}function Gr(e){return e.mode&1?ce&2&&tt!==0?tt&-tt:PP.transition!==null?($l===0&&($l=w1()),$l):(e=ye,e!==0||(e=window.event,e=e===void 0?16:E1(e.type)),e):1}function Sn(e,t,n,r){if(50<Yo)throw Yo=0,Jf=null,Error(V(185));Ra(e,n,r),(!(ce&2)||e!==Xe)&&(e===Xe&&(!(ce&2)&&(hu|=n),Qe===4&&Mr(e,tt)),Lt(e,r),n===1&&ce===0&&!(t.mode&1)&&(Vs=$e()+500,cu&&ii()))}function Lt(e,t){var n=e.callbackNode;PC(e,t);var r=fc(e,e===Xe?tt:0);if(r===0)n!==null&&kg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&kg(n),t===1)e.tag===0?CP(py.bind(null,e)):K1(py.bind(null,e)),bP(function(){!(ce&6)&&ii()}),n=null;else{switch(b1(r)){case 1:n=up;break;case 4:n=x1;break;case 16:n=dc;break;case 536870912:n=v1;break;default:n=dc}n=Ww(n,Fw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fw(e,t){if(Ol=-1,$l=0,ce&6)throw Error(V(327));var n=e.callbackNode;if(Ts()&&e.callbackNode!==n)return null;var r=fc(e,e===Xe?tt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Rc(e,r);else{t=r;var i=ce;ce|=2;var s=Bw();(Xe!==e||tt!==t)&&(er=null,Vs=$e()+500,Ri(e,t));do try{KP();break}catch(a){zw(e,a)}while(!0);_p(),Ec.current=s,ce=i,We!==null?t=0:(Xe=null,tt=0,t=Qe)}if(t!==0){if(t===2&&(i=Pf(e),i!==0&&(r=i,t=eh(e,i))),t===1)throw n=va,Ri(e,0),Mr(e,r),Lt(e,$e()),n;if(t===6)Mr(e,r);else{if(i=e.current.alternate,!(r&30)&&!WP(i)&&(t=Rc(e,r),t===2&&(s=Pf(e),s!==0&&(r=s,t=eh(e,s))),t===1))throw n=va,Ri(e,0),Mr(e,r),Lt(e,$e()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(V(345));case 2:gi(e,Ct,er);break;case 3:if(Mr(e,r),(r&130023424)===r&&(t=zp+500-$e(),10<t)){if(fc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){yt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Af(gi.bind(null,e,Ct,er),t);break}gi(e,Ct,er);break;case 4:if(Mr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-_n(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*UP(r/1960))-r,10<r){e.timeoutHandle=Af(gi.bind(null,e,Ct,er),r);break}gi(e,Ct,er);break;case 5:gi(e,Ct,er);break;default:throw Error(V(329))}}}return Lt(e,$e()),e.callbackNode===n?Fw.bind(null,e):null}function eh(e,t){var n=Qo;return e.current.memoizedState.isDehydrated&&(Ri(e,t).flags|=256),e=Rc(e,t),e!==2&&(t=Ct,Ct=n,t!==null&&th(t)),e}function th(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function WP(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(!En(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 Mr(e,t){for(t&=~Fp,t&=~hu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-_n(t),r=1<<n;e[n]=-1,t&=~r}}function py(e){if(ce&6)throw Error(V(327));Ts();var t=fc(e,0);if(!(t&1))return Lt(e,$e()),null;var n=Rc(e,t);if(e.tag!==0&&n===2){var r=Pf(e);r!==0&&(t=r,n=eh(e,r))}if(n===1)throw n=va,Ri(e,0),Mr(e,t),Lt(e,$e()),n;if(n===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gi(e,Ct,er),Lt(e,$e()),null}function Bp(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(Vs=$e()+500,cu&&ii())}}function Ui(e){Ar!==null&&Ar.tag===0&&!(ce&6)&&Ts();var t=ce;ce|=1;var n=dn.transition,r=ye;try{if(dn.transition=null,ye=1,e)return e()}finally{ye=r,dn.transition=n,ce=t,!(ce&6)&&ii()}}function Op(){Ot=vs.current,Te(vs)}function Ri(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,wP(n)),We!==null)for(n=We.return;n!==null;){var r=n;switch(wp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&yc();break;case 3:Os(),Te(Tt),Te(dt),Tp();break;case 5:jp(r);break;case 4:Os();break;case 13:Te(Ie);break;case 19:Te(Ie);break;case 10:Sp(r.type._context);break;case 22:case 23:Op()}n=n.return}if(Xe=e,We=e=Qr(e.current,null),tt=Ot=t,Qe=0,va=null,Fp=hu=Vi=0,Ct=Qo=null,ki!==null){for(t=0;t<ki.length;t++)if(n=ki[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}ki=null}return e}function zw(e,t){do{var n=We;try{if(_p(),Fl.current=Pc,Cc){for(var r=Ae.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Cc=!1}if($i=0,qe=Ge=Ae=null,Ko=!1,ga=0,Np.current=null,n===null||n.return===null){Qe=1,va=t,We=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 c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=ty(o);if(p!==null){p.flags&=-257,ny(p,o,a,s,t),p.mode&1&&ey(s,c,t),t=p,l=c;var m=t.updateQueue;if(m===null){var y=new Set;y.add(l),t.updateQueue=y}else m.add(l);break e}else{if(!(t&1)){ey(s,c,t),$p();break e}l=Error(V(426))}}else if(Le&&a.mode&1){var w=ty(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),ny(w,o,a,s,t),bp($s(l,a));break e}}s=l=$s(l,a),Qe!==4&&(Qe=2),Qo===null?Qo=[s]:Qo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=bw(s,l,t);Qg(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"&&(Kr===null||!Kr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=kw(s,a,t);Qg(s,b);break e}}s=s.return}while(s!==null)}$w(n)}catch(C){t=C,We===n&&n!==null&&(We=n=n.return);continue}break}while(!0)}function Bw(){var e=Ec.current;return Ec.current=Pc,e===null?Pc:e}function $p(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Xe===null||!(Vi&268435455)&&!(hu&268435455)||Mr(Xe,tt)}function Rc(e,t){var n=ce;ce|=2;var r=Bw();(Xe!==e||tt!==t)&&(er=null,Ri(e,t));do try{HP();break}catch(i){zw(e,i)}while(!0);if(_p(),ce=n,Ec.current=r,We!==null)throw Error(V(261));return Xe=null,tt=0,Qe}function HP(){for(;We!==null;)Ow(We)}function KP(){for(;We!==null&&!yC();)Ow(We)}function Ow(e){var t=Uw(e.alternate,e,Ot);e.memoizedProps=e.pendingProps,t===null?$w(e):We=t,Np.current=null}function $w(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=BP(n,t),n!==null){n.flags&=32767,We=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,We=null;return}}else if(n=zP(n,t,Ot),n!==null){We=n;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Qe===0&&(Qe=5)}function gi(e,t,n){var r=ye,i=dn.transition;try{dn.transition=null,ye=1,GP(e,t,n,r)}finally{dn.transition=i,ye=r}return null}function GP(e,t,n,r){do Ts();while(Ar!==null);if(ce&6)throw Error(V(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(V(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(EC(e,s),e===Xe&&(We=Xe=null,tt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||il||(il=!0,Ww(dc,function(){return Ts(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=dn.transition,dn.transition=null;var o=ye;ye=1;var a=ce;ce|=4,Np.current=null,$P(e,n),Dw(n,e),hP(Mf),hc=!!Lf,Mf=Lf=null,e.current=n,VP(n),xC(),ce=a,ye=o,dn.transition=s}else e.current=n;if(il&&(il=!1,Ar=e,Tc=i),s=e.pendingLanes,s===0&&(Kr=null),bC(n.stateNode),Lt(e,$e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(jc)throw jc=!1,e=Zf,Zf=null,e;return Tc&1&&e.tag!==0&&Ts(),s=e.pendingLanes,s&1?e===Jf?Yo++:(Yo=0,Jf=e):Yo=0,ii(),null}function Ts(){if(Ar!==null){var e=b1(Tc),t=dn.transition,n=ye;try{if(dn.transition=null,ye=16>e?16:e,Ar===null)var r=!1;else{if(e=Ar,Ar=null,Tc=0,ce&6)throw Error(V(331));var i=ce;for(ce|=4,Q=e.current;Q!==null;){var s=Q,o=s.child;if(Q.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Q=c;Q!==null;){var u=Q;switch(u.tag){case 0:case 11:case 15:Go(8,u,s)}var d=u.child;if(d!==null)d.return=u,Q=d;else for(;Q!==null;){u=Q;var h=u.sibling,p=u.return;if(Mw(u),u===c){Q=null;break}if(h!==null){h.return=p,Q=h;break}Q=p}}}var m=s.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var w=y.sibling;y.sibling=null,y=w}while(y!==null)}}Q=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Q=o;else e:for(;Q!==null;){if(s=Q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Go(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,Q=g;break e}Q=s.return}}var x=e.current;for(Q=x;Q!==null;){o=Q;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,Q=v;else e:for(o=x;Q!==null;){if(a=Q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:fu(9,a)}}catch(C){ze(a,a.return,C)}if(a===o){Q=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,Q=b;break e}Q=a.return}}if(ce=i,ii(),$n&&typeof $n.onPostCommitFiberRoot=="function")try{$n.onPostCommitFiberRoot(iu,e)}catch{}r=!0}return r}finally{ye=n,dn.transition=t}}return!1}function my(e,t,n){t=$s(n,t),t=bw(e,t,1),e=Hr(e,t,1),t=yt(),e!==null&&(Ra(e,1,t),Lt(e,t))}function ze(e,t,n){if(e.tag===3)my(e,e,n);else for(;t!==null;){if(t.tag===3){my(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Kr===null||!Kr.has(r))){e=$s(n,e),e=kw(t,e,1),t=Hr(t,e,1),e=yt(),t!==null&&(Ra(t,1,e),Lt(t,e));break}}t=t.return}}function QP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=yt(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(tt&n)===n&&(Qe===4||Qe===3&&(tt&130023424)===tt&&500>$e()-zp?Ri(e,0):Fp|=n),Lt(e,t)}function Vw(e,t){t===0&&(e.mode&1?(t=Qa,Qa<<=1,!(Qa&130023424)&&(Qa=4194304)):t=1);var n=yt();e=lr(e,t),e!==null&&(Ra(e,t,n),Lt(e,n))}function YP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Vw(e,n)}function qP(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(V(314))}r!==null&&r.delete(t),Vw(e,n)}var Uw;Uw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)Pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pt=!1,FP(e,t,n);Pt=!!(e.flags&131072)}else Pt=!1,Le&&t.flags&1048576&&G1(t,wc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bl(e,t),e=t.pendingProps;var i=Fs(t,dt.current);js(t,n),i=Lp(null,t,r,e,i,n);var s=Mp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Rt(r)?(s=!0,xc(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Pp(t),i.updater=du,t.stateNode=i,i._reactInternals=t,$f(t,r,e,n),t=Wf(null,t,r,!0,s,n)):(t.tag=0,Le&&s&&vp(t),ht(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ZP(r),e=wn(r,e),i){case 0:t=Uf(null,t,r,e,n);break e;case 1:t=sy(null,t,r,e,n);break e;case 11:t=ry(null,t,r,e,n);break e;case 14:t=iy(null,t,r,wn(r.type,e),n);break e}throw Error(V(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),Uf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),sy(e,t,r,i,n);case 3:e:{if(Pw(t),e===null)throw Error(V(387));r=t.pendingProps,s=t.memoizedState,i=s.element,J1(e,t),_c(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=$s(Error(V(423)),t),t=oy(e,t,r,n,i);break e}else if(r!==i){i=$s(Error(V(424)),t),t=oy(e,t,r,n,i);break e}else for($t=Wr(t.stateNode.containerInfo.firstChild),Ut=t,Le=!0,kn=null,n=X1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zs(),r===i){t=cr(e,t,n);break e}ht(e,t,r,n)}t=t.child}return t;case 5:return ew(t),e===null&&zf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,If(r,i)?o=null:s!==null&&If(r,s)&&(t.flags|=32),Cw(e,t),ht(e,t,o,n),t.child;case 6:return e===null&&zf(t),null;case 13:return Ew(e,t,n);case 4:return Ep(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bs(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:wn(r,i),ry(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,Se(bc,r._currentValue),r._currentValue=o,s!==null)if(En(s.value,o)){if(s.children===i.children&&!Tt.current){t=cr(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=ir(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Bf(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(V(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Bf(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,js(t,n),i=hn(i),r=r(i),t.flags|=1,ht(e,t,r,n),t.child;case 14:return r=t.type,i=wn(r,t.pendingProps),i=wn(r.type,i),iy(e,t,r,i,n);case 15:return _w(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),Bl(e,t),t.tag=1,Rt(r)?(e=!0,xc(t)):e=!1,js(t,n),ww(t,r,i),$f(t,r,i,n),Wf(null,t,r,!0,e,n);case 19:return jw(e,t,n);case 22:return Sw(e,t,n)}throw Error(V(156,t.tag))};function Ww(e,t){return y1(e,t)}function XP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,n,r){return new XP(e,t,n,r)}function Vp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ZP(e){if(typeof e=="function")return Vp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ap)return 11;if(e===lp)return 14}return 2}function Qr(e,t){var n=e.alternate;return n===null?(n=ln(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Vp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case cs:return Li(n.children,i,s,t);case op:o=8,i|=8;break;case df:return e=ln(12,n,t,i|2),e.elementType=df,e.lanes=s,e;case ff:return e=ln(13,n,t,i),e.elementType=ff,e.lanes=s,e;case hf:return e=ln(19,n,t,i),e.elementType=hf,e.lanes=s,e;case e1:return pu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zv:o=10;break e;case Jv:o=9;break e;case ap:o=11;break e;case lp:o=14;break e;case jr:o=16,r=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=ln(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Li(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function pu(e,t,n,r){return e=ln(22,e,r,t),e.elementType=e1,e.lanes=n,e.stateNode={isHidden:!1},e}function cd(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function ud(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JP(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=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Up(e,t,n,r,i,s,o,a,l){return e=new JP(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=ln(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pp(s),e}function eE(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ls,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Hw(e){if(!e)return Zr;e=e._reactInternals;e:{if(Hi(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Rt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var n=e.type;if(Rt(n))return H1(e,n,t)}return t}function Kw(e,t,n,r,i,s,o,a,l){return e=Up(n,r,!0,e,i,s,o,a,l),e.context=Hw(null),n=e.current,r=yt(),i=Gr(n),s=ir(r,i),s.callback=t??null,Hr(n,s,i),e.current.lanes=i,Ra(e,i,r),Lt(e,r),e}function mu(e,t,n,r){var i=t.current,s=yt(),o=Gr(i);return n=Hw(n),t.context===null?t.context=n:t.pendingContext=n,t=ir(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Hr(i,t,o),e!==null&&(Sn(e,i,o,s),Nl(e,i,o)),o}function Lc(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 gy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Wp(e,t){gy(e,t),(e=e.alternate)&&gy(e,t)}function tE(){return null}var Gw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Hp(e){this._internalRoot=e}gu.prototype.render=Hp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));mu(e,t,null,null)};gu.prototype.unmount=Hp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ui(function(){mu(null,e,null,null)}),t[ar]=null}};function gu(e){this._internalRoot=e}gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=S1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lr.length&&t!==0&&t<Lr[n].priority;n++);Lr.splice(n,0,e),n===0&&P1(e)}};function Kp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yy(){}function nE(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Lc(o);s.call(c)}}var o=Kw(t,r,e,0,null,!1,!1,"",yy);return e._reactRootContainer=o,e[ar]=o.current,da(e.nodeType===8?e.parentNode:e),Ui(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Lc(l);a.call(c)}}var l=Up(e,0,!1,null,null,!1,!1,"",yy);return e._reactRootContainer=l,e[ar]=l.current,da(e.nodeType===8?e.parentNode:e),Ui(function(){mu(t,l,n,r)}),l}function xu(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=Lc(o);a.call(l)}}mu(t,o,e,i)}else o=nE(n,t,e,i,r);return Lc(o)}k1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=No(t.pendingLanes);n!==0&&(dp(t,n|1),Lt(t,$e()),!(ce&6)&&(Vs=$e()+500,ii()))}break;case 13:Ui(function(){var r=lr(e,1);if(r!==null){var i=yt();Sn(r,e,1,i)}}),Wp(e,1)}};fp=function(e){if(e.tag===13){var t=lr(e,134217728);if(t!==null){var n=yt();Sn(t,e,134217728,n)}Wp(e,134217728)}};_1=function(e){if(e.tag===13){var t=Gr(e),n=lr(e,t);if(n!==null){var r=yt();Sn(n,e,t,r)}Wp(e,t)}};S1=function(){return ye};C1=function(e,t){var n=ye;try{return ye=e,t()}finally{ye=n}};_f=function(e,t,n){switch(t){case"input":if(gf(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=lu(r);if(!i)throw Error(V(90));n1(r),gf(r,i)}}}break;case"textarea":i1(e,n);break;case"select":t=n.value,t!=null&&Ss(e,!!n.multiple,t,!1)}};d1=Bp;f1=Ui;var rE={usingClientEntryPoint:!1,Events:[Ma,hs,lu,c1,u1,Bp]},wo={findFiberByHostInstance:bi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},iE={bundleType:wo.bundleType,version:wo.version,rendererPackageName:wo.rendererPackageName,rendererConfig:wo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ur.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=m1(e),e===null?null:e.stateNode},findFiberByHostInstance:wo.findFiberByHostInstance||tE,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 sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sl.isDisabled&&sl.supportsFiber)try{iu=sl.inject(iE),$n=sl}catch{}}Yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rE;Yt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Kp(t))throw Error(V(200));return eE(e,t,null,n)};Yt.createRoot=function(e,t){if(!Kp(e))throw Error(V(299));var n=!1,r="",i=Gw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Up(e,1,!1,null,null,n,!1,r,i),e[ar]=t.current,da(e.nodeType===8?e.parentNode:e),new Hp(t)};Yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=m1(t),e=e===null?null:e.stateNode,e};Yt.flushSync=function(e){return Ui(e)};Yt.hydrate=function(e,t,n){if(!yu(t))throw Error(V(200));return xu(null,e,t,!0,n)};Yt.hydrateRoot=function(e,t,n){if(!Kp(e))throw Error(V(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Gw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Kw(t,null,e,1,n??null,i,!1,s,o),e[ar]=t.current,da(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 gu(t)};Yt.render=function(e,t,n){if(!yu(t))throw Error(V(200));return xu(null,e,t,!1,n)};Yt.unmountComponentAtNode=function(e){if(!yu(e))throw Error(V(40));return e._reactRootContainer?(Ui(function(){xu(null,null,e,!1,function(){e._reactRootContainer=null,e[ar]=null})}),!0):!1};Yt.unstable_batchedUpdates=Bp;Yt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yu(n))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return xu(e,t,n,!1,r)};Yt.version="18.3.1-next-f1338f8080-20240426";function Qw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qw)}catch(e){console.error(e)}}Qw(),Qv.exports=Yt;var Zs=Qv.exports,Yw,xy=Zs;Yw=xy.createRoot,xy.hydrateRoot;var zo=typeof window<"u"?S.useLayoutEffect:S.useEffect;function dd(e){const t=S.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function sE(e,t,n={},r={}){S.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 oE(e){const t=S.useRef(null);return S.useImperativeHandle(e,()=>t.current,[]),t}const qw=!1;function wa(e){return e[e.length-1]}function aE(e){return typeof e=="function"}function Dr(e,t){return aE(e)?e(t):e}const lE=Object.prototype.hasOwnProperty,vy=Object.prototype.propertyIsEnumerable,cE=()=>Object.create(null),ui=(e,t)=>Nr(e,t,cE);function Nr(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,s=ky(e)&&ky(i);if(!s&&!(Us(e)&&Us(i)))return i;const o=s?e:wy(e);if(!o)return i;const a=s?i:wy(i);if(!a)return i;const l=o.length,c=a.length,u=s?new Array(c):n();let d=0;for(let h=0;h<c;h++){const p=s?h:a[h],m=e[p],y=i[p];if(m===y){u[p]=m,(s?h<l:lE.call(e,p))&&d++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){u[p]=y;continue}const w=Nr(m,y,n,r+1);u[p]=w,w===m&&d++}return l===c&&d===l?e:u}function wy(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!vy.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(!vy.call(e,i))return!1;r.push(i)}return r}function Us(e){if(!by(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!by(n)||!n.hasOwnProperty("isPrototypeOf"))}function by(e){return Object.prototype.toString.call(e)==="[object Object]"}function ky(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Mi(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(!Mi(e[r],t[r],n))return!1;return!0}if(Us(e)&&Us(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const o in t)if((!r||t[o]!==void 0)&&!Mi(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||!Mi(e[o],t[o],n)))return!1;return i===s}return!1}function Ws(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 ba(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function uE(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function _y(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 uE(t)}const dE=["http:","https:","mailto:","tel:"];function Mc(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function bo(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+=_y(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+_y(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function fE(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function hE(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 sr(){throw new Error("Invariant failed")}function ka(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 Fr=4,Xw=5;function pE(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 Gp(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=pE(s);if(o){const[a,l]=o,c=s.charCodeAt(a+1);if(c===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const u=a+3,d=l;if(u<d)return n[0]=3,n[1]=t+a,n[2]=t+u,n[3]=t+d,n[4]=t+l+1,n[5]=i,n}}else if(c===36){const u=a+1,d=a+2;return d===l?(n[0]=2,n[1]=t+a,n[2]=t+u,n[3]=t+d,n[4]=t+l+1,n[5]=e.length,n):(n[0]=1,n[1]=t+a,n[2]=t+d,n[3]=t+l,n[4]=t+l+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function vu(e,t,n,r,i,s,o){var l,c,u,d,h,p,m,y,w,g,x,v,b;o==null||o(n);let a=r;{const C=n.fullPath??n.from,_=C.length,E=((l=n.options)==null?void 0:l.caseSensitive)??e,j=!!((u=(c=n.options)==null?void 0:c.params)!=null&&u.parse&&((h=(d=n.options)==null?void 0:d.skipRouteOnParseError)!=null&&h.params));for(;a<_;){const P=Gp(C,a,t);let R;const M=a,F=P[5];switch(a=F+1,s++,P[0]){case 0:{const z=C.substring(P[2],P[3]);if(E){const N=(p=i.static)==null?void 0:p.get(z);if(N)R=N;else{i.static??(i.static=new Map);const H=Si(n.fullPath??n.from);H.parent=i,H.depth=s,R=H,i.static.set(z,H)}}else{const N=z.toLowerCase(),H=(m=i.staticInsensitive)==null?void 0:m.get(N);if(H)R=H;else{i.staticInsensitive??(i.staticInsensitive=new Map);const K=Si(n.fullPath??n.from);K.parent=i,K.depth=s,R=K,i.staticInsensitive.set(N,K)}}break}case 1:{const z=C.substring(M,P[1]),N=C.substring(P[4],F),H=E&&!!(z||N),K=z?H?z:z.toLowerCase():void 0,D=N?H?N:N.toLowerCase():void 0,W=!j&&((y=i.dynamic)==null?void 0:y.find(k=>!k.skipOnParamError&&k.caseSensitive===H&&k.prefix===K&&k.suffix===D));if(W)R=W;else{const k=hd(1,n.fullPath??n.from,H,K,D);R=k,k.depth=s,k.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(k)}break}case 3:{const z=C.substring(M,P[1]),N=C.substring(P[4],F),H=E&&!!(z||N),K=z?H?z:z.toLowerCase():void 0,D=N?H?N:N.toLowerCase():void 0,W=!j&&((w=i.optional)==null?void 0:w.find(k=>!k.skipOnParamError&&k.caseSensitive===H&&k.prefix===K&&k.suffix===D));if(W)R=W;else{const k=hd(3,n.fullPath??n.from,H,K,D);R=k,k.parent=i,k.depth=s,i.optional??(i.optional=[]),i.optional.push(k)}break}case 2:{const z=C.substring(M,P[1]),N=C.substring(P[4],F),H=E&&!!(z||N),K=z?H?z:z.toLowerCase():void 0,D=N?H?N:N.toLowerCase():void 0,W=hd(2,n.fullPath??n.from,H,K,D);R=W,W.parent=i,W.depth=s,i.wildcard??(i.wildcard=[]),i.wildcard.push(W)}}i=R}if(j&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const P=Si(n.fullPath??n.from);P.kind=Xw,P.parent=i,s++,P.depth=s,i.pathless??(i.pathless=[]),i.pathless.push(P),i=P}const L=(n.path||!n.children)&&!n.isRoot;if(L&&C.endsWith("/")){const P=Si(n.fullPath??n.from);P.kind=Fr,P.parent=i,s++,P.depth=s,i.index=P,i=P}i.parse=((x=(g=n.options)==null?void 0:g.params)==null?void 0:x.parse)??null,i.skipOnParamError=j,i.parsingPriority=((b=(v=n.options)==null?void 0:v.skipRouteOnParseError)==null?void 0:b.priority)??0,L&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const C of n.children)vu(e,t,C,a,i,s,o)}function fd(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 Rr(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Rr(i);if(e.static)for(const i of e.static.values())Rr(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Rr(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(fd);for(const i of e.dynamic)Rr(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(fd);for(const i of e.optional)Rr(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(fd);for(const i of e.wildcard)Rr(i)}}function Si(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 hd(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 mE(e,t){const n=Si("/"),r=new Uint16Array(6);for(const i of e)vu(!1,r,i,1,n,0);Rr(n),t.masksTree=n,t.flatCache=ka(1e3)}function gE(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=Qp(e,t.masksTree);return t.flatCache.set(e,r),r}function yE(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=Si("/"),vu(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(s,o)),Qp(r,o,n)}function xE(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=Qp(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)s=null;else throw o}return s&&(s.branch=bE(s.route)),t.matchCache.set(r,s),s}function vE(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function wE(e,t=!1,n){const r=Si(e.fullPath),i=new Uint16Array(6),s={},o={};let a=0;return vu(t,i,e,1,r,0,l=>{if(n==null||n(l,a),l.id in s&&sr(),s[l.id]=l,a!==0&&l.path){const c=vE(l.fullPath);(!o[c]||l.fullPath.endsWith("/"))&&(o[c]=l)}a++}),Rr(r),{processedTree:{segmentTree:r,singleCache:ka(1e3),matchCache:ka(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:o}}function Qp(e,t,n=!1){const r=e.split("/"),i=_E(e,r,t,n);if(!i)return null;const[s]=Zw(e,r,i);return{route:i.node.route,rawParams:s,parsedParams:i.parsedParams}}function Zw(e,t,n){var u,d,h,p,m,y,w,g,x,v;const r=kE(n.node);let i=null;const s=Object.create(null);let o=((u=n.extract)==null?void 0:u.part)??0,a=((d=n.extract)==null?void 0:d.node)??0,l=((h=n.extract)==null?void 0:h.path)??0,c=((p=n.extract)==null?void 0:p.segment)??0;for(;a<r.length;o++,a++,l++,c++){const b=r[a];if(b.kind===Fr)break;if(b.kind===Xw){c--,o--,l--;continue}const C=t[o],_=l;if(C&&(l+=C.length),b.kind===1){i??(i=n.node.fullPath.split("/"));const E=i[c],j=((m=b.prefix)==null?void 0:m.length)??0;if(E.charCodeAt(j)===123){const L=((y=b.suffix)==null?void 0:y.length)??0,P=E.substring(j+2,E.length-L-1),R=C.substring(j,C.length-L);s[P]=decodeURIComponent(R)}else{const L=E.substring(1);s[L]=decodeURIComponent(C)}}else if(b.kind===3){if(n.skipped&1<<a){o--,l=_-1;continue}i??(i=n.node.fullPath.split("/"));const E=i[c],j=((w=b.prefix)==null?void 0:w.length)??0,L=((g=b.suffix)==null?void 0:g.length)??0,P=E.substring(j+3,E.length-L-1),R=b.suffix||b.prefix?C.substring(j,C.length-L):C;R&&(s[P]=decodeURIComponent(R))}else if(b.kind===2){const E=b,j=e.substring(_+(((x=E.prefix)==null?void 0:x.length)??0),e.length-(((v=E.suffix)==null?void 0:v.length)??0)),L=decodeURIComponent(j);s["*"]=L,s._splat=L;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:o,node:a,path:l,segment:c}]}function bE(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function kE(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function _E(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!wa(t),s=i&&e!=="/",o=t.length-(i?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let l=null,c=null;for(;a.length;){const u=a.pop(),{node:d,index:h,skipped:p,depth:m,statics:y,dynamics:w,optionals:g}=u;let{extract:x,rawParams:v,parsedParams:b}=u;if(d.kind===2&&d.route&&!al(c,u))continue;if(d.skipOnParamError){if(!Sy(e,t,u))continue;v=u.rawParams,x=u.extract,b=u.parsedParams}r&&d.route&&d.kind!==Fr&&al(l,u)&&(l=u);const C=h===o;if(C&&(d.route&&(!s||d.kind===Fr||d.kind===2)&&al(c,u)&&(c=u),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const _=C?void 0:t[h];let E;if(C&&d.index){const j={node:d.index,index:h,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b};let L=!0;if(d.index.skipOnParamError&&(Sy(e,t,j)||(L=!1)),L){if(!w&&!g&&!p&&SE(y,o))return j;al(c,j)&&(c=j)}}if(d.wildcard)for(let j=d.wildcard.length-1;j>=0;j--){const L=d.wildcard[j],{prefix:P,suffix:R}=L;if(!(P&&(C||!(L.caseSensitive?_:E??(E=_.toLowerCase())).startsWith(P)))){if(R){if(C)continue;const M=t.slice(h).join("/").slice(-R.length);if((L.caseSensitive?M:M.toLowerCase())!==R)continue}a.push({node:L,index:o,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}}if(d.optional){const j=p|1<<m,L=m+1;for(let P=d.optional.length-1;P>=0;P--){const R=d.optional[P];a.push({node:R,index:h,skipped:j,depth:L,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!C)for(let P=d.optional.length-1;P>=0;P--){const R=d.optional[P],{prefix:M,suffix:F}=R;if(M||F){const z=R.caseSensitive?_:E??(E=_.toLowerCase());if(M&&!z.startsWith(M)||F&&!z.endsWith(F))continue}a.push({node:R,index:h+1,skipped:p,depth:L,statics:y,dynamics:w,optionals:g+ol(o,h),extract:x,rawParams:v,parsedParams:b})}}if(!C&&d.dynamic&&_)for(let j=d.dynamic.length-1;j>=0;j--){const L=d.dynamic[j],{prefix:P,suffix:R}=L;if(P||R){const M=L.caseSensitive?_:E??(E=_.toLowerCase());if(P&&!M.startsWith(P)||R&&!M.endsWith(R))continue}a.push({node:L,index:h+1,skipped:p,depth:m+1,statics:y,dynamics:w+ol(o,h),optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!C&&d.staticInsensitive){const j=d.staticInsensitive.get(E??(E=_.toLowerCase()));j&&a.push({node:j,index:h+1,skipped:p,depth:m+1,statics:y+ol(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!C&&d.static){const j=d.static.get(_);j&&a.push({node:j,index:h+1,skipped:p,depth:m+1,statics:y+ol(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(d.pathless){const j=m+1;for(let L=d.pathless.length-1;L>=0;L--){const P=d.pathless[L];a.push({node:P,index:h,skipped:p,depth:j,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}}}if(c)return c;if(r&&l){let u=l.index;for(let h=0;h<l.index;h++)u+=t[h].length;const d=u===e.length?"/":e.slice(u);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(d),l}return null}function ol(e,t){return 2**(e-t-1)}function SE(e,t){return e===2**(t-1)-1}function Sy(e,t,n){try{const[r,i]=Zw(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 al(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===Fr)>(e.node.kind===Fr)||t.node.kind===Fr==(e.node.kind===Fr)&&t.depth>e.depth))):!0}function Ul(e){return Yp(e.filter(t=>t!==void 0).join("/"))}function Yp(e){return e.replace(/\/{2,}/g,"/")}function Jw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Yr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function eb(e){return Yr(Jw(e))}function Ic(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function CE(e,t,n){return Ic(e,n)===Ic(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&&wa(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&&(wa(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,c="";for(let d=0;d<a.length;d++){d>0&&(c+="/");const h=a[d];if(!h)continue;l=Gp(h,0,l);const p=l[0];if(p===0){c+=h;continue}const m=l[5],y=h.substring(0,l[1]),w=h.substring(l[4],m),g=h.substring(l[2],l[3]);p===1?c+=y||w?`${y}{$${g}}${w}`:`$${g}`:p===2?c+=y||w?`${y}{$}${w}`:"$":c+=`${y}{-$${g}}${w}`}c=Yp(c);const u=c||"/";return o&&r&&r.set(o,u),u}function EE(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 pd(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=>Py(i,n)).join("/"):Py(r,n)}function Cy({path:e,params:t,decoder:n,...r}){let i=!1;const s=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:i};const o=e.length;let a=0,l,c="";for(;a<o;){const u=a;l=Gp(e,u,l);const d=l[5];if(a=d+1,u===d)continue;const h=l[0];if(h===0){c+="/"+e.substring(u,d);continue}if(h===2){const p=t._splat;s._splat=p,s["*"]=p;const m=e.substring(u,l[1]),y=e.substring(l[4],d);if(!p){i=!0,(m||y)&&(c+="/"+m+y);continue}const w=pd("_splat",t,n);c+="/"+m+w+y;continue}if(h===1){const p=e.substring(l[2],l[3]);!i&&!(p in t)&&(i=!0),s[p]=t[p];const m=e.substring(u,l[1]),y=e.substring(l[4],d),w=pd(p,t,n)??"undefined";c+="/"+m+w+y;continue}if(h===3){const p=e.substring(l[2],l[3]),m=t[p];if(m==null)continue;s[p]=m;const y=e.substring(u,l[1]),w=e.substring(l[4],d),g=pd(p,t,n)??"";c+="/"+y+g+w;continue}}return e.endsWith("/")&&(c+="/"),{usedParams:s,interpolatedPath:c||"/",isMissingParams:i}}function Py(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 jE(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const TE="tsr-scroll-restoration-v1_3";function RE(){const e=jE();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Us(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=Dr(r,t)||t},persist:()=>{try{e.setItem(TE,JSON.stringify(t))}catch{}}}}const Ey=RE(),LE=e=>e.state.__TSR_key||e.href;function ME(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 ll=!1;const ko="window",jy="data-scroll-restoration-id";function IE(e,t){if(!Ey)return;const n=Ey;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,ll=!1;const r=e.options.getScrollRestorationKey||LE,i=new Map;window.history.scrollRestoration="manual";const s=a=>{if(!(ll||!e.isScrollRestoring))if(a.target===document||a.target===window)i.set(ko,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const l=a.target;i.set(l,{scrollX:l.scrollLeft||0,scrollY:l.scrollTop||0})}},o=a=>{var c;if(!e.isScrollRestoring||!a||i.size===0||!n)return;const l=(c=n.state)[a]||(c[a]={});for(const[u,d]of i){let h;if(u===ko)h=ko;else if(u.isConnected){const p=u.getAttribute(jy);h=p?`[${jy}="${p}"]`:ME(u)}h&&(l[h]=d)}};document.addEventListener("scroll",s,!0),e.subscribe("onBeforeLoad",a=>{o(a.fromLocation?r(a.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",a=>{var d;const l=r(a.toLocation),c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){ll=!0;try{const h=e.isScrollRestoring?n.state[l]:void 0;let p=!1;if(h)for(const m in h){const y=h[m];if(!Us(y))continue;const{scrollX:w,scrollY:g}=y;if(!(!Number.isFinite(w)||!Number.isFinite(g))){if(m===ko)window.scrollTo({top:g,left:w,behavior:c}),p=!0;else if(m){let x;try{x=document.querySelector(m)}catch{continue}x&&(x.scrollLeft=w,x.scrollTop=g,p=!0)}}}if(!p){const m=e.history.location.hash.slice(1);if(m){const y=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(y){const w=document.getElementById(m);w&&w.scrollIntoView(y)}}else{const y={top:0,left:0,behavior:c};if(window.scrollTo(y),u)for(const w of u){if(w===ko)continue;const g=typeof w=="function"?w():document.querySelector(w);g&&g.scrollTo(y)}}}}finally{ll=!1}e.isScrollRestoring&&n.set(h=>(h[l]||(h[l]={}),h))}})}function AE(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 md(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function DE(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]=md(i):Array.isArray(s)?s.push(md(i)):n[r]=[s,md(i)]}return n}const NE=zE(JSON.parse),FE=BE(JSON.stringify,JSON.parse);function zE(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=DE(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function BE(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=AE(i,r);return s?`?${s}`:""}}const Ii="__root__";function OE(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Et(e){return e instanceof Response&&!!e.options}function $E(e){return{input:({url:t})=>{for(const n of e)t=nh(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=tb(e[n],t);return t}}}function VE(e){const t=eb(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=Ul(["/",t,o.pathname]),o)}}function nh(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 tb(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 UE(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:s}=t,o=new Map,a=new Map,l=new Map,c=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),h=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),y=n(e.statusCode),w=n(e.redirect),g=n([]),x=n([]),v=n([]),b=r(()=>gd(o,g.get())),C=r(()=>gd(a,x.get())),_=r(()=>gd(l,v.get())),E=r(()=>g.get()[0]),j=r(()=>g.get().some(K=>{var D;return((D=o.get(K))==null?void 0:D.get().status)==="pending"})),L=r(()=>{var K;return{locationHref:p.get().href,resolvedLocationHref:(K=m.get())==null?void 0:K.href,status:c.get()}}),P=r(()=>({status:c.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:h.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:w.get()})),R=ka(64);function M(K){let D=R.get(K);return D||(D=r(()=>{const W=g.get();for(const k of W){const O=o.get(k);if(O&&O.routeId===K)return O.get()}}),R.set(K,D)),D}const F={status:c,loadedAt:u,isLoading:d,isTransitioning:h,location:p,resolvedLocation:m,statusCode:y,redirect:w,matchesId:g,pendingIds:x,cachedIds:v,matches:b,pendingMatches:C,cachedMatches:_,firstId:E,hasPending:j,matchRouteDeps:L,matchStores:o,pendingMatchStores:a,cachedMatchStores:l,__store:P,getRouteMatchStore:M,setMatches:z,setPending:N,setCached:H};z(e.matches),s==null||s(F);function z(K){yd(K,o,g,n,i)}function N(K){yd(K,a,x,n,i)}function H(K){yd(K,l,v,n,i)}return F}function gd(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function yd(e,t,n,r,i){const s=e.map(a=>a.id),o=new Set(s);i(()=>{for(const a of t.keys())o.has(a)||t.delete(a);for(const a of e){const l=t.get(a.id);if(!l){const c=r(a);c.routeId=a.routeId,t.set(a.id,c);continue}l.routeId=a.routeId,l.get()!==a&&l.set(a)}hE(n.get(),s)||n.set(s)})}const rh=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},WE=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),wu=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ai=(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},Ty=(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},zr=(e,t,n)=>{var r,i,s;if(!(!Et(n)&&!ut(n)))throw Et(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:Et(n)?"redirected":ut(n)?"notFound":o.status==="pending"?"success":o.status,context:Ai(e,t.index),isFetching:!1,error:n})),ut(n)&&!n.routeId&&(n.routeId=t.routeId),(s=t._nonReactive.loadPromise)==null||s.resolve()),Et(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},nb=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Ry=(e,t,n)=>{const r=Ai(e,n);e.updateMatch(t,i=>({...i,context:r}))},_o=(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),zr(e,e.router.getMatch(i),n);try{(l=(a=o.options).onError)==null||l.call(a,n)}catch(c){n=c,zr(e,e.router.getMatch(i),n)}e.updateMatch(i,c=>{var u,d;return(u=c._nonReactive.beforeLoadPromise)==null||u.resolve(),c._nonReactive.beforeLoadPromise=void 0,(d=c._nonReactive.loadPromise)==null||d.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!Et(n)&&!ut(n)&&(e.serialError??(e.serialError=n))},rb=(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&&!wu(e,t)&&(n.options.loader||n.options.beforeLoad||sb(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((s=e.router.options)==null?void 0:s.defaultPendingComponent))){const o=setTimeout(()=>{rh(e)},i);r._nonReactive.pendingTimeout=o}},HE=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;rb(e,t,n,r);const i=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&zr(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},KE=(e,t,n,r)=>{const i=e.router.getMatch(t);let s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Ws(()=>{s==null||s.resolve(),s=void 0});const{paramsError:o,searchError:a}=i;o&&_o(e,n,o,"PARSE_PARAMS"),a&&_o(e,n,a,"VALIDATE_SEARCH"),rb(e,t,r,i);const l=new AbortController;let c=!1;const u=()=>{c||(c=!0,e.updateMatch(t,b=>({...b,isFetching:"beforeLoad",fetchCount:b.fetchCount+1,abortController:l})))},d=()=>{var b;(b=i._nonReactive.beforeLoadPromise)==null||b.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=Ws();const h={...Ai(e,n,!1),...i.__routeContext},{search:p,params:m,cause:y}=i,w=wu(e,t),g={search:p,abortController:l,params:m,preload:w,context:h,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:w?"preload":y,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},x=b=>{if(b===void 0){e.router.batch(()=>{u(),d()});return}(Et(b)||ut(b))&&(u(),_o(e,n,b,"BEFORE_LOAD")),e.router.batch(()=>{u(),e.updateMatch(t,C=>({...C,__beforeLoadContext:b})),d()})};let v;try{if(v=r.options.beforeLoad(g),ba(v))return u(),v.catch(b=>{_o(e,n,b,"BEFORE_LOAD")}).then(x)}catch(b){u(),_o(e,n,b,"BEFORE_LOAD")}x(v)},GE=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>a(),o=()=>KE(e,n,t,i),a=()=>{if(nb(e,n))return;const l=HE(e,n,i);return ba(l)?l.then(o):o()};return s()},QE=(e,t,n)=>{var s,o,a,l,c,u;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(o=(s=n.options).head)==null?void 0:o.call(s,i),(l=(a=n.options).scripts)==null?void 0:l.call(a,i),(u=(c=n.options).headers)==null?void 0:u.call(c,i)]).then(([d,h,p])=>({meta:d==null?void 0:d.meta,links:d==null?void 0:d.links,headScripts:d==null?void 0:d.scripts,headers:p,scripts:h,styles:d==null?void 0:d.styles}))},ib=(e,t,n,r,i)=>{const s=t[r-1],{params:o,loaderDeps:a,abortController:l,cause:c}=e.router.getMatch(n),u=Ai(e,r),d=wu(e,n);return{params:o,deps:a,preload:!!d,parentMatchPromise:s,abortController:l,context:u,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:d?"preload":c,route:i,...e.router.options.additionalContext}},Ly=async(e,t,n,r,i)=>{var s,o,a,l,c;try{const u=e.router.getMatch(n);try{(!(qw??e.router.isServer)||u.ssr===!0)&&_a(i);const d=i.options.loader,h=typeof d=="function"?d:d==null?void 0:d.handler,p=h==null?void 0:h(ib(e,t,n,r,i)),m=!!h&&ba(p);if((m||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||u._nonReactive.minPendingPromise)&&e.updateMatch(n,w=>({...w,isFetching:"loader"})),h){const w=m?await p:p;zr(e,e.router.getMatch(n),w),w!==void 0&&e.updateMatch(n,g=>({...g,loaderData:w}))}i._lazyPromise&&await i._lazyPromise;const y=u._nonReactive.minPendingPromise;y&&await y,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,w=>({...w,error:void 0,context:Ai(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let h=d;if((h==null?void 0:h.name)==="AbortError"){if(u.abortController.signal.aborted){(s=u._nonReactive.loaderPromise)==null||s.resolve(),u._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:Ai(e,r)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,ut(d)&&await((a=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:a.call(o)),zr(e,e.router.getMatch(n),d);try{(c=(l=i.options).onError)==null||c.call(l,d)}catch(m){h=m,zr(e,e.router.getMatch(n),m)}!Et(h)&&!ut(h)&&await _a(i,["errorComponent"]),e.updateMatch(n,m=>({...m,error:h,context:Ai(e,r),status:"error",isFetching:!1}))}}catch(u){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),zr(e,d,u)}},YE=async(e,t,n)=>{var p,m,y,w;async function r(g,x,v,b,C){const _=Date.now()-x.updatedAt,E=g?C.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:C.options.staleTime??e.router.options.defaultStaleTime??0,j=C.options.shouldReload,L=typeof j=="function"?j(ib(e,t,i,n,C)):j,{status:P,invalid:R}=b,M=_>=E&&(!!e.forceStaleReload||b.cause==="enter"||v!==void 0&&v!==b.id);o=P==="success"&&(R||(L??M)),g&&C.options.preload===!1||(o&&!e.sync&&u?(a=!0,(async()=>{var F,z;try{await Ly(e,t,i,n,C);const N=e.router.getMatch(i);(F=N._nonReactive.loaderPromise)==null||F.resolve(),(z=N._nonReactive.loadPromise)==null||z.resolve(),N._nonReactive.loaderPromise=void 0,N._nonReactive.loadPromise=void 0}catch(N){Et(N)&&await e.router.navigate(N.options)}})()):P!=="success"||o?await Ly(e,t,i,n,C):Ry(e,i,n))}const{id:i,routeId:s}=e.matches[n];let o=!1,a=!1;const l=e.router.looseRoutesById[s],c=l.options.loader,u=((typeof c=="function"||c==null?void 0:c.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(nb(e,i)){if(!e.router.getMatch(i))return e.matches[n];Ry(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(C=>C.routeId===s))==null?void 0:m.id,b=wu(e,i);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload&&u)return g;await g._nonReactive.loaderPromise;const C=e.router.getMatch(i),_=C._nonReactive.error||C.error;_&&zr(e,C,_),C.status==="pending"&&await r(b,g,v,C,l)}else{const C=b&&!e.router.stores.matchStores.has(i),_=e.router.getMatch(i);_._nonReactive.loaderPromise=Ws(),C!==_.preload&&e.updateMatch(i,E=>({...E,preload:C})),await r(b,g,v,_,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 My(e){var h,p;const t=e,n=[];WE(t.router)&&rh(t);let r;for(let m=0;m<t.matches.length;m++){try{const y=GE(t,m);ba(y)&&await y}catch(y){if(Et(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?Ty(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(YE(t,n,m));try{await Promise.all(n)}catch{const m=await Promise.allSettled(n);for(const y of m){if(y.status!=="rejected")continue;const w=y.reason;if(Et(w))throw w;ut(w)?a??(a=w):l??(l=w)}if(l!==void 0)throw l}const c=a??(r&&!t.preload?r:void 0);let u=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!c&&r&&t.preload)return t.matches;if(c){const m=Ty(t,c);m===void 0&&sr();const y=t.matches[m],w=t.router.looseRoutesById[y.routeId],g=(h=t.router.options)==null?void 0:h.defaultNotFoundComponent;!w.options.notFoundComponent&&g&&(w.options.notFoundComponent=g),c.routeId=y.routeId;const x=y.routeId===t.router.routeTree.id;t.updateMatch(y.id,v=>({...v,...x?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:c},isFetching:!1})),u=m,await _a(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 _a(m,["errorComponent"])}for(let m=0;m<=u;m++){const{id:y,routeId:w}=t.matches[m],g=t.router.looseRoutesById[w];try{const x=QE(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=rh(t);if(ba(d)&&await d,c)throw c;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Iy(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 _a(e,t=Wl){!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===Wl?(()=>{if(e._componentsPromise===void 0){const r=Iy(e,Wl);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Iy(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function sb(e){var t;for(const n of Wl)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Wl=["component","errorComponent","pendingComponent","notFoundComponent"];var qr="__TSR_index",Ay="popstate",Dy="beforeunload";function qE(e){let t=e.getLocation();const n=new Set,r=o=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?r(o):t=e.getLocation()},s=async({task:o,navigateOpts:a,...l})=>{var d,h;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const c=((d=e.getBlockers)==null?void 0:d.call(e))??[],u=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&c.length&&u)for(const p of c){const m=Ac(l.path,l.state);if(await p.blockerFn({currentLocation:t,nextLocation:m,action:l.type})){(h=e.onBlocked)==null||h.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,a,l)=>{const c=t.state[qr];a=Ny(c+1,a),s({task:()=>{e.pushState(o,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const c=t.state[qr];a=Ny(c,a),s({task:()=>{e.replaceState(o,a),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:o,state:a})},go:(o,a)=>{s({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{s({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[qr]!==0,createHref:o=>e.createHref(o),block:o=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,o]),()=>{var u,d;const c=((u=e.getBlockers)==null?void 0:u.call(e))??[];(d=e.setBlockers)==null||d.call(e,c.filter(h=>h!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:r}}function Ny(e,t){t||(t={});const n=qp();return{...t,key:n,__TSR_key:n,[qr]:e}}function XE(e){var j,L;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,o=P=>i=P,a=P=>P,l=()=>Ac(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((j=t.history.state)!=null&&j.__TSR_key)&&!((L=t.history.state)!=null&&L.key)){const P=qp();t.history.replaceState({[qr]:0,key:P,__TSR_key:P},"")}let c=l(),u,d=!1,h=!1,p=!1,m=!1;const y=()=>c;let w,g;const x=()=>{w&&(E._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),E._ignoreSubscribers=!1,w=void 0,g=void 0,u=void 0)},v=(P,R,M)=>{const F=a(R);g||(u=c),c=Ac(R,M),w={href:F,state:M,isPush:(w==null?void 0:w.isPush)||P==="push"},g||(g=Promise.resolve().then(()=>x()))},b=P=>{c=l(),E.notify({type:P})},C=async()=>{if(h){h=!1;return}const P=l(),R=P.state[qr]-c.state[qr],M=R===1,F=R===-1,z=!M&&!F||d;d=!1;const N=z?"GO":F?"BACK":"FORWARD",H=z?{type:"GO",index:R}:{type:F?"BACK":"FORWARD"};if(p)p=!1;else{const K=s();if(typeof document<"u"&&K.length){for(const D of K)if(await D.blockerFn({currentLocation:c,nextLocation:P,action:N})){h=!0,t.history.go(1),E.notify(H);return}}}c=l(),E.notify(H)},_=P=>{if(m){m=!1;return}let R=!1;const M=s();if(typeof document<"u"&&M.length)for(const F of M){const z=F.enableBeforeUnload??!0;if(z===!0){R=!0;break}if(typeof z=="function"&&z()===!0){R=!0;break}}if(R)return P.preventDefault(),P.returnValue=""},E=qE({getLocation:y,getLength:()=>t.history.length,pushState:(P,R)=>v("push",P,R),replaceState:(P,R)=>v("replace",P,R),back:P=>(P&&(p=!0),m=!0,t.history.back()),forward:P=>{P&&(p=!0),m=!0,t.history.forward()},go:P=>{d=!0,t.history.go(P)},createHref:P=>a(P),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Dy,_,{capture:!0}),t.removeEventListener(Ay,C)},onBlocked:()=>{u&&c!==u&&(c=u)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Dy,_,{capture:!0}),t.addEventListener(Ay,C),t.history.pushState=function(...P){const R=n.apply(t.history,P);return E._ignoreSubscribers||b("PUSH"),R},t.history.replaceState=function(...P){const R=r.apply(t.history,P);return E._ignoreSubscribers||b("REPLACE"),R},E}function ZE(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Ac(e,t){const n=ZE(e),r=n.indexOf("#"),i=n.indexOf("?"),s=qp();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||{[qr]:0,key:s,__TSR_key:s}}}function qp(){return(Math.random()+1).toString(36).substring(7)}function Rs(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 JE=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var u;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",s=this.basepath===void 0,o=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=EE(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=XE()),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=ka(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=UE(tj(this.latestLocation),d),IE(this)}let a=!1;const l=this.options.basepath??"/",c=this.options.rewrite;if(s||i!==l||o!==c){this.basepath=l;const d=[],h=eb(l);h&&h!=="/"&&d.push(VE({basepath:l})),c&&d.push(c),this.rewrite=d.length===0?void 0:d.length===1?d[0]:$E(d),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((u=window.CSS)==null?void 0:u.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=wE(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&mE(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:l,search:c,hash:u,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const g=this.options.parseSearch(c),x=this.options.stringifySearch(g);return{href:l+x+u,publicHref:l+x+u,pathname:bo(l).path,external:!1,searchStr:x,search:ui(r==null?void 0:r.search,g),hash:bo(u.slice(1)).path,state:Nr(r==null?void 0:r.state,h)}}const p=new URL(d,this.origin),m=nh(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:bo(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:w,search:ui(r==null?void 0:r.search,y),hash:bo(m.hash.slice(1)).path,state:Nr(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:Yp(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=>nj({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(s={})=>{var P,R;const o=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutesLightweight(o);s.from;const l=s.unsafeRelative==="path"?o.pathname:s.from??a.fullPath,c=this.resolvePathWithBase(l,"."),u=a.search,d=Object.assign(Object.create(null),a.params),h=s.to?this.resolvePathWithBase(c,`${s.to}`):this.resolvePathWithBase(c,"."),p=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?d:Object.assign(d,Dr(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 F=((P=M.options.params)==null?void 0:P.stringify)??M.options.stringifyParams;if(F)try{Object.assign(p,F(p))}catch{}}const w=n.leaveParams?h:bo(Cy({path:h,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let g=u;if(n._includeValidateSearch&&((R=this.options.search)!=null&&R.strict)){const M={};y.forEach(F=>{if(F.options.validateSearch)try{Object.assign(M,Hl(F.options.validateSearch,{...M,...g}))}catch{}}),g=M}g=rj({search:g,dest:s,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),g=ui(u,g);const x=this.options.stringifySearch(g),v=s.hash===!0?o.hash:s.hash?Dr(s.hash,o.hash):void 0,b=v?`#${v}`:"";let C=s.state===!0?o.state:s.state?Dr(s.state,o.state):{};C=Nr(o.state,C);const _=`${w}${x}${b}`;let E,j,L=!1;if(this.rewrite){const M=new URL(_,this.origin),F=tb(this.rewrite,M);E=M.href.replace(M.origin,""),F.origin!==this.origin?(j=F.href,L=!0):j=F.pathname+F.search+F.hash}else E=fE(_),j=E;return{publicHref:j,href:E,pathname:w,search:g,searchStr:x,state:C,hash:v??"",external:L,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{const a=r(s);let l=o?r(o):void 0;if(!l){const c=Object.create(null);if(this.options.routeMasks){const u=gE(a.pathname,this.processedTree);if(u){Object.assign(c,u.rawParams);const{from:d,params:h,...p}=u.route,m=h===!1||h===null?Object.create(null):(h??!0)===!0?c:Object.assign(c,Dr(h,c));o={from:n.from,...p,params:m},l=r(o)}}}return l&&(a.maskedLocation=l),a};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const s=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(u=>{i.state[u]=this.latestLocation.state[u]});const c=Mi(i.state,this.latestLocation.state);return l.forEach(u=>{delete i.state[u]}),c},o=Yr(this.latestLocation.href)===Yr(i.href);let a=this.commitLocationPromise;if(this.commitLocationPromise=Ws(()=>{a==null||a.resolve(),a=void 0}),o&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:c,...u}=i;l&&(u={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),u.state.__hashScrollIntoViewOptions=c??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](u.publicHref,u.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:o,href:a,...l}={})=>{if(a){const d=this.history.location.state.__TSR_index,h=Ac(a,{__TSR_index:n?d:d+1}),p=new URL(h.pathname,this.origin);l.to=nh(this.rewrite,p).pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const c=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=c;const u=this.commitLocation({...c,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===c&&(this.pendingBuiltLocation=void 0)}),u},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:s,...o})=>{var l,c;let a=!1;if(i)try{new URL(`${i}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(n!==void 0||!i){const d=this.buildLocation({to:n,...o});i=i??d.publicHref,s=s??d.publicHref}const u=!a&&s?s:i;if(Mc(u,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const d=((c=(l=this.history).getBlockers)==null?void 0:c.call(l))??[];for(const h of d)if(h!=null&&h.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(u):window.location.href=u,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(s=>s.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,i,s;const o=this.stores.resolvedLocation.get()??this.stores.location.get();for(s=new Promise(l=>{this.startTransition(async()=>{var c;try{this.beforeLoad();const u=this.latestLocation,d=Rs(u,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...d}),this.emit({type:"onBeforeLoad",...d}),await My({router:this,sync:n==null?void 0:n.sync,forceStaleReload:o.href===u.href,matches:this.stores.pendingMatches.get(),location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var w,g;let h=null,p=null,m=null,y=null;this.batch(()=>{const x=this.stores.pendingMatches.get(),v=x.length,b=this.stores.matches.get();h=v?b.filter(E=>!this.stores.pendingMatchStores.has(E.id)):null;const C=new Set;for(const E of this.stores.pendingMatchStores.values())E.routeId&&C.add(E.routeId);const _=new Set;for(const E of this.stores.matchStores.values())E.routeId&&_.add(E.routeId);p=v?b.filter(E=>!C.has(E.routeId)):null,m=v?x.filter(E=>!_.has(E.routeId)):null,y=v?x.filter(E=>_.has(E.routeId)):b,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(x),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...h.filter(E=>E.status!=="error"&&E.status!=="notFound"&&E.status!=="redirected")]),this.clearExpiredCache())});for(const[x,v]of[[p,"onLeave"],[m,"onEnter"],[y,"onStay"]])if(x)for(const b of x)(g=(w=this.looseRoutesById[b.routeId].options)[v])==null||g.call(w,b)})})}})}catch(u){Et(u)?(r=u,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):ut(u)&&(i=u);const d=r?r.status:i?404:this.stores.matches.get().some(h=>h.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(d),this.stores.redirect.set(r)})}this.latestLoadPromise===s&&((c=this.commitLocationPromise)==null||c.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),l()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.matches.get().some(l=>l.status==="error")&&(a=500),a!==void 0&&this.stores.statusCode.set(a)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,o=this.stores.resolvedLocation.get(),a=typeof r.types=="function"?r.types(Rs(s,o)):r.types;if(a===!1){n();return}i={update:n,types:a}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const s=this.stores.matchStores.get(n);if(s){s.set(r);return}const o=this.stores.cachedMatchStores.get(n);if(o){const a=r(o.get());a.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(l=>l.filter(c=>c!==n)):o.set(a)}})},this.getMatch=n=>{var r,i,s;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((s=this.stores.matchStores.get(n))==null?void 0:s.get())},this.invalidate=n=>{const r=i=>{var s;return((s=n==null?void 0:n.filter)==null?void 0:s.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(i);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const s=i.pathname+i.search+i.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&Mc(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=_a,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 My({router:this,matches:i,location:r,preload:!0,updateMatch:(l,c)=>{s.has(l)?i=i.map(u=>u.id===l?c(u):u):this.updateMatch(l,c)}}),i}catch(l){if(Et(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:r});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=yE(s.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!a||n.params&&!Mi(a.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Mi(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??FE,parseSearch:e.parseSearch??NE,protocolAllowlist:e.protocolAllowlist??dE}),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["**"]:Yr(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const l=a?sj(this.options.notFoundMode,o):void 0,c=new Array(o.length),u=new Map;for(const p of this.stores.matchStores.values())p.routeId&&u.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const m=o[p],y=c[p-1];let w,g,x;{const N=(y==null?void 0:y.search)??e.search,H=(y==null?void 0:y._strictSearch)??void 0;try{const K=Hl(m.options.validateSearch,{...N})??void 0;w={...N,...K},g={...H,...K},x=void 0}catch(K){let D=K;if(K instanceof Dc||(D=new Dc(K.message,{cause:K})),t!=null&&t.throwOnError)throw D;w=N,g={},x=D}}const v=((h=(d=m.options).loaderDeps)==null?void 0:h.call(d,{search:w}))??"",b=v?JSON.stringify(v):"",{interpolatedPath:C,usedParams:_}=Cy({path:m.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),E=m.id+C+b,j=this.getMatch(E),L=u.get(m.id),P=(j==null?void 0:j._strictParams)??_;let R;if(!j)try{Fy(m,_,s,P)}catch(N){if(ut(N)||Et(N)?R=N:R=new ej(N.message,{cause:N}),t!=null&&t.throwOnError)throw R}Object.assign(i,P);const M=L?"stay":"enter";let F;if(j)F={...j,cause:M,params:(L==null?void 0:L.params)??i,_strictParams:P,search:ui(L?L.search:j.search,w),_strictSearch:g};else{const N=m.options.loader||m.options.beforeLoad||m.lazyFn||sb(m)?"pending":"success";F={id:E,ssr:m.options.ssr,index:p,routeId:m.id,params:(L==null?void 0:L.params)??i,_strictParams:P,pathname:C,updatedAt:Date.now(),search:L?ui(L.search,w):w,_strictSearch:g,searchError:void 0,status:N,isFetching:!1,error:void 0,paramsError:R,__routeContext:void 0,_nonReactive:{loadPromise:Ws()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:L?Nr(L.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t!=null&&t.preload||(F.globalNotFound=l===m.id),F.searchError=x;const z=this.getParentContext(y);F.context={...z,...F.__routeContext,...F.__beforeLoadContext},c[p]=F}for(let p=0;p<c.length;p++){const m=c[p],y=this.looseRoutesById[m.routeId],w=this.getMatch(m.id),g=u.get(m.routeId);if(m.params=g?ui(g.params,i):i,!w){const x=c[p-1],v=this.getParentContext(x);if(y.options.context){const b={deps:m.loaderDeps,params:m.params,context:v??{},location:e,navigate:C=>this.navigate({...C,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:c,routeId:y.id};m.__routeContext=y.options.context(b)??void 0}m.context={...v,...m.__routeContext,...m.__beforeLoadContext}}}return c}matchRoutesLightweight(e){var u;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=wa(t),s={...e.search};for(const d of t)try{Object.assign(s,Hl(d.options.validateSearch,s))}catch{}const o=wa(this.stores.matchesId.get()),a=o&&((u=this.stores.matchStores.get(o))==null?void 0:u.get()),l=a&&a.routeId===i.id&&a.pathname===e.pathname;let c;if(l)c=a.params;else{const d=Object.assign(Object.create(null),n);for(const h of t)try{Fy(h,n,r??{},d)}catch{}c=d}return{matchedRoutes:t,fullPath:i.fullPath,search:s,params:c}}},Dc=class extends Error{},ej=class extends Error{};function tj(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Hl(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Dc("Async validation not supported");if(n.issues)throw new Dc(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 nj({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=Yr(e);let s,o;const a=xE(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 rj({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return ij(n)(e,t,r??!1)}function ij(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)(i=s.options.search)!=null&&i.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const o=({search:a,next:l})=>{let c=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(c=s.options.preSearchFilters.reduce((d,h)=>h(d),a));const u=l(c);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((d,h)=>h(d),u):u};t.middlewares.push(o)}if(s.options.validateSearch){const o=({search:a,next:l})=>{const c=l(a);if(!t._includeValidateSearch)return c;try{return{...c,...Hl(s.options.validateSearch,c)??void 0}}catch{return c}};t.middlewares.push(o)}}const n=({search:s})=>{const o=t.dest;return o.search?o.search===!0?s:Dr(o.search,s):{}};t.middlewares.push(n);const r=(s,o,a)=>{if(s>=a.length)return o;const l=a[s];return l({search:o,next:u=>r(s+1,u,a)})};return function(o,a,l){return t.dest=a,t._includeValidateSearch=l,r(0,o,t.middlewares)}}function sj(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 Ii}function Fy(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 oj="Error preloading route! ☝️";var ob=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var l,c;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(c=(l=this.options).getParentRoute)==null?void 0:c.call(l),r?this._path=Ii:this.parentRoute||sr();let i=r?Ii:n==null?void 0:n.path;i&&i!=="/"&&(i=Jw(i));const s=(n==null?void 0:n.id)||i;let o=r?Ii:Ul([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=Ul(["/",o]));const a=o==="__root__"?"/":Ul([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=a,this._to=Yr(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=>OE({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.")}},aj=class extends ob{constructor(e){super(e)}};function lj(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 Xp(e){const t=e.errorComponent??Zp;return f.jsx(cj,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?S.createElement(t,{error:n,reset:r}):e.children})}var cj=class extends S.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 Zp({error:e}){const[t,n]=S.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 uj({children:e,fallback:t=null}){return ab()?f.jsx(Ds.Fragment,{children:e}):f.jsx(Ds.Fragment,{children:t})}function ab(){return Ds.useSyncExternalStore(dj,()=>!0,()=>!1)}function dj(){return()=>{}}var lb=S.createContext(null);function Xt(e){return S.useContext(lb)}var bu=S.createContext(void 0),fj=S.createContext(void 0),Re=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Re||{});function hj({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:s,checkDirty:o,shallowPropagate:a};function r(c,u,d){const h=u.depsTail;if(h!==void 0&&h.dep===c)return;const p=h!==void 0?h.nextDep:u.deps;if(p!==void 0&&p.dep===c){p.version=d,u.depsTail=p;return}const m=c.subsTail;if(m!==void 0&&m.version===d&&m.sub===u)return;const y=u.depsTail=c.subsTail={version:d,dep:c,sub:u,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=y),h!==void 0?h.nextDep=y:u.deps=y,m!==void 0?m.nextSub=y:c.subs=y}function i(c,u=c.sub){const d=c.dep,h=c.prevDep,p=c.nextDep,m=c.nextSub,y=c.prevSub;return p!==void 0?p.prevDep=h:u.depsTail=h,h!==void 0?h.nextDep=p:u.deps=p,m!==void 0?m.prevSub=y:d.subsTail=y,y!==void 0?y.nextSub=m:(d.subs=m)===void 0&&n(d),p}function s(c){let u=c.nextSub,d;e:do{const h=c.sub;let p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(c,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&t(h),p&1){const m=h.subs;if(m!==void 0){const y=(c=m).nextSub;y!==void 0&&(d={value:u,prev:d},u=y);continue}}if((c=u)!==void 0){u=c.nextSub;continue}for(;d!==void 0;)if(c=d.value,d=d.prev,c!==void 0){u=c.nextSub;continue e}break}while(!0)}function o(c,u){let d,h=0,p=!1;e:do{const m=c.dep,y=m.flags;if(u.flags&16)p=!0;else if((y&17)===17){if(e(m)){const w=m.subs;w.nextSub!==void 0&&a(w),p=!0}}else if((y&33)===33){(c.nextSub!==void 0||c.prevSub!==void 0)&&(d={value:c,prev:d}),c=m.deps,u=m,++h;continue}if(!p){const w=c.nextDep;if(w!==void 0){c=w;continue}}for(;h--;){const w=u.subs,g=w.nextSub!==void 0;if(g?(c=d.value,d=d.prev):c=w,p){if(e(u)){g&&a(w),u=c.sub;continue}p=!1}else u.flags&=-33;u=c.sub;const x=c.nextDep;if(x!==void 0){c=x;continue e}}return p}while(!0)}function a(c){do{const u=c.sub,d=u.flags;(d&48)===32&&(u.flags=d|16,(d&6)===2&&t(u))}while((c=c.nextSub)!==void 0)}function l(c,u){let d=u.depsTail;for(;d!==void 0;){if(d===c)return!0;d=d.prevDep}return!1}}function pj(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 ih=[];let Kl=0;const{link:zy,unlink:mj,propagate:gj,checkDirty:cb,shallowPropagate:By}=hj({update(e){return e._update()},notify(e){ih[sh++]=e,e.flags&=~Re.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Re.Mutable|Re.Dirty,Nc(e))}});let cl=0,sh=0,Fn,oh=0;function ub(e){try{++oh,e()}finally{--oh||db()}}function Nc(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=mj(n,e)}function db(){if(!(oh>0)){for(;cl<sh;){const e=ih[cl];ih[cl++]=void 0,e.notify()}cl=0,sh=0}}function Oy(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Re.None:Re.Mutable,get(){return Fn!==void 0&&zy(i,Fn,Kl),i._snapshot},subscribe(s){const o=pj(s),a={current:!1},l=yj(()=>{var c;i.get(),a.current?(c=o.next)==null||c.call(o,i._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const o=Fn,a=(t==null?void 0:t.compare)??Object.is;if(n)Fn=i,++Kl,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=Re.Mutable|Re.RecursedCheck);try{const l=i._snapshot,c=typeof s=="function"?s(l):s===void 0&&n?r(l):s;return l===void 0||!a(l,c)?(i._snapshot=c,!0):!1}finally{Fn=o,n&&(i.flags&=~Re.RecursedCheck),Nc(i)}}};return n?(i.flags=Re.Mutable|Re.Dirty,i.get=function(){const s=i.flags;if(s&Re.Dirty||s&Re.Pending&&cb(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&By(o)}}else s&Re.Pending&&(i.flags=s&~Re.Pending);return Fn!==void 0&&zy(i,Fn,Kl),i._snapshot}):i.set=function(s){if(i._update(s)){const o=i.subs;o!==void 0&&(gj(o),By(o),db())}},i}function yj(e){const t=()=>{const r=Fn;Fn=n,++Kl,n.depsTail=void 0,n.flags=Re.Watching|Re.RecursedCheck;try{return e()}finally{Fn=r,n.flags&=~Re.RecursedCheck,Nc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Re.Watching|Re.RecursedCheck,notify(){const r=this.flags;r&Re.Dirty||r&Re.Pending&&cb(this.deps,this)?t():this.flags=Re.Watching},stop(){this.flags=Re.None,this.depsTail=void 0,Nc(this)}};return t(),n}var fb={exports:{}},hb={},pb={exports:{}},mb={};/**
41
+ * @license React
42
+ * use-sync-external-store-shim.production.js
43
+ *
44
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE file in the root directory of this source tree.
48
+ */var Hs=S;function xj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vj=typeof Object.is=="function"?Object.is:xj,wj=Hs.useState,bj=Hs.useEffect,kj=Hs.useLayoutEffect,_j=Hs.useDebugValue;function Sj(e,t){var n=t(),r=wj({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return kj(function(){i.value=n,i.getSnapshot=t,xd(i)&&s({inst:i})},[e,n,t]),bj(function(){return xd(i)&&s({inst:i}),e(function(){xd(i)&&s({inst:i})})},[e]),_j(n),n}function xd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vj(e,n)}catch{return!0}}function Cj(e,t){return t()}var Pj=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Cj:Sj;mb.useSyncExternalStore=Hs.useSyncExternalStore!==void 0?Hs.useSyncExternalStore:Pj;pb.exports=mb;var Ej=pb.exports;/**
49
+ * @license React
50
+ * use-sync-external-store-shim/with-selector.production.js
51
+ *
52
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE file in the root directory of this source tree.
56
+ */var ku=S,jj=Ej;function Tj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rj=typeof Object.is=="function"?Object.is:Tj,Lj=jj.useSyncExternalStore,Mj=ku.useRef,Ij=ku.useEffect,Aj=ku.useMemo,Dj=ku.useDebugValue;hb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=Mj(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=Aj(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),i!==void 0&&o.hasValue){var m=o.value;if(i(m,p))return d=m}return d=p}if(m=d,Rj(u,p))return m;var y=r(p);return i!==void 0&&i(m,y)?(u=p,m):(u=p,d=y)}var c=!1,u,d,h=n===void 0?null:n;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,n,r,i]);var a=Lj(e,s[0],s[1]);return Ij(function(){o.hasValue=!0,o.value=a},[a]),Dj(a),a};fb.exports=hb;var gb=fb.exports;const Nj=nu(gb);function Fj(e,t){return e===t}function It(e,t,n=Fj){const r=S.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(o);return a},[e]),i=S.useCallback(()=>e==null?void 0:e.get(),[e]);return gb.useSyncExternalStoreWithSelector(r,i,i,t,n)}var zj={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ki(e){const t=Xt(),n=S.useContext(e.from?fj:bu),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=S.useRef(void 0);return It(i??zj,o=>{if((e.shouldThrow??!0)&&!o&&sr(),o===void 0)return;const a=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const l=Nr(s.current,a);return s.current=l,l}return a})}function yb(e){return Ki({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function xb(e){const{select:t,...n}=e;return Ki({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Aa(e){return Ki({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function vb(e){return Ki({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Kn(e){const t=Xt();return S.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function wb(e){return Ki({...e,select:t=>e.select?e.select(t.context):t.context})}function Bj(e,t){const n=Xt(),r=oE(t),{activeProps:i,inactiveProps:s,activeOptions:o,to:a,preload:l,preloadDelay:c,preloadIntentProximity:u,hashScrollIntoView:d,replace:h,startTransition:p,resetScroll:m,viewTransition:y,children:w,target:g,disabled:x,style:v,className:b,onClick:C,onBlur:_,onFocus:E,onMouseEnter:j,onMouseLeave:L,onTouchStart:P,ignoreBlocker:R,params:M,search:F,hash:z,state:N,mask:H,reloadDocument:K,unsafeRelative:D,from:W,_fromLocation:k,...O}=e,q=ab(),T=S.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),le=It(n.stores.location,ue=>ue,(ue,A)=>ue.href===A.href),he=S.useMemo(()=>{const ue={_fromLocation:le,...T};return n.buildLocation(ue)},[n,le,T]),pe=he.maskedLocation?he.maskedLocation.publicHref:he.publicHref,rt=he.maskedLocation?he.maskedLocation.external:he.external,Be=S.useMemo(()=>Hj(pe,rt,n.history,x),[x,rt,pe,n.history]),it=S.useMemo(()=>{if(Be!=null&&Be.external)return Mc(Be.href,n.protocolAllowlist)?void 0:Be.href;if(!Kj(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),Mc(a,n.protocolAllowlist)?void 0:a}catch{}},[a,Be,n.protocolAllowlist]),Dt=S.useMemo(()=>{if(it)return!1;if(o!=null&&o.exact){if(!CE(le.pathname,he.pathname,n.basepath))return!1}else{const ue=Ic(le.pathname,n.basepath),A=Ic(he.pathname,n.basepath);if(!(ue.startsWith(A)&&(ue.length===A.length||ue[A.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Mi(le.search,he.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?q&&le.hash===he.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,le,it,q,he.hash,he.pathname,he.search,n.basepath]),Zt=Dt?Dr(i,{})??Oj:vd,Gn=Dt?vd:Dr(s,{})??vd,dr=[b,Zt.className,Gn.className].filter(Boolean).join(" "),Qn=(v||Zt.style||Gn.style)&&{...v,...Zt.style,...Gn.style},[fr,Ye]=S.useState(!1),Pe=S.useRef(!1),bt=e.reloadDocument||it?!1:l??n.options.defaultPreload,Jt=c??n.options.defaultPreloadDelay??0,st=S.useCallback(()=>{n.preloadRoute({...T,_builtLocation:he}).catch(ue=>{console.warn(ue),console.warn(oj)})},[n,T,he]);sE(r,S.useCallback(ue=>{ue!=null&&ue.isIntersecting&&st()},[st]),Wj,{disabled:!!x||bt!=="viewport"}),S.useEffect(()=>{Pe.current||!x&&bt==="render"&&(st(),Pe.current=!0)},[x,st,bt]);const fo=ue=>{const A=ue.currentTarget.getAttribute("target"),$=g!==void 0?g:A;if(!x&&!Gj(ue)&&!ue.defaultPrevented&&(!$||$==="_self")&&ue.button===0){ue.preventDefault(),Zs.flushSync(()=>{Ye(!0)});const X=n.subscribe("onResolved",()=>{X(),Ye(!1)});n.navigate({...T,replace:h,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:y,ignoreBlocker:R})}};if(it)return{...O,ref:r,href:it,...w&&{children:w},...g&&{target:g},...x&&{disabled:x},...v&&{style:v},...b&&{className:b},...C&&{onClick:C},..._&&{onBlur:_},...E&&{onFocus:E},...j&&{onMouseEnter:j},...L&&{onMouseLeave:L},...P&&{onTouchStart:P}};const hr=ue=>{if(x||bt!=="intent")return;if(!Jt){st();return}const A=ue.currentTarget;if(So.has(A))return;const $=setTimeout(()=>{So.delete(A),st()},Jt);So.set(A,$)},ai=ue=>{x||bt!=="intent"||st()},pr=ue=>{if(x||!bt||!Jt)return;const A=ue.currentTarget,$=So.get(A);$&&(clearTimeout($),So.delete(A))};return{...O,...Zt,...Gn,href:Be==null?void 0:Be.href,ref:r,onClick:Zi([C,fo]),onBlur:Zi([_,pr]),onFocus:Zi([E,hr]),onMouseEnter:Zi([j,hr]),onMouseLeave:Zi([L,pr]),onTouchStart:Zi([P,ai]),disabled:!!x,target:g,...Qn&&{style:Qn},...dr&&{className:dr},...x&&$j,...Dt&&Vj,...q&&fr&&Uj}}var vd={},Oj={className:"active"},$j={role:"link","aria-disabled":!0},Vj={"data-status":"active","aria-current":"page"},Uj={"data-transitioning":"transitioning"},So=new WeakMap,Wj={rootMargin:"100px"},Zi=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Hj(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function Kj(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var bb=S.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...s}=Bj(r,t),o=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...l}=s;return S.createElement("a",l,o)}return S.createElement(n,s,o)});function Gj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Qj=class extends ob{constructor(e){super(e),this.useMatch=t=>Ki({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>wb({...t,from:this.id}),this.useSearch=t=>vb({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Aa({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>xb({...t,from:this.id}),this.useLoaderData=t=>yb({...t,from:this.id}),this.useNavigate=()=>Kn({from:this.fullPath}),this.Link=Ds.forwardRef((t,n)=>f.jsx(bb,{ref:n,from:this.fullPath,...t}))}};function Js(e){return new Qj(e)}var Yj=class extends aj{constructor(e){super(e),this.useMatch=t=>Ki({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>wb({...t,from:this.id}),this.useSearch=t=>vb({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Aa({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>xb({...t,from:this.id}),this.useLoaderData=t=>yb({...t,from:this.id}),this.useNavigate=()=>Kn({from:this.fullPath}),this.Link=Ds.forwardRef((t,n)=>f.jsx(bb,{ref:n,from:this.fullPath,...t}))}};function qj(e){return new Yj(e)}function Xj(e){const t=Xt(),n=`not-found-${It(t.stores.location,r=>r.pathname)}-${It(t.stores.status,r=>r)}`;return f.jsx(Xp,{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 Zj(){return f.jsx("p",{children:"Not Found"})}function os(e){return f.jsx(f.Fragment,{children:e.children})}function kb(e,t,n){return t.options.notFoundComponent?f.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...n}):f.jsx(Zj,{})}function Jj(e){return null}function eT(){return Jj(Xt()),null}var _b=S.memo(function({matchId:t}){const n=Xt(),r=n.stores.matchStores.get(t);r||sr();const i=It(n.stores.loadedAt,o=>o),s=It(r,o=>o);return f.jsx(tT,{router:n,matchId:t,resetKey:i,matchState:S.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 tT({router:e,matchId:t,resetKey:n,matchState:r}){var m,y;const i=e.routesById[r.routeId],s=i.options.pendingComponent??e.options.defaultPendingComponent,o=s?f.jsx(s,{}):null,a=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,c=i.isRoot?i.options.notFoundComponent??((m=e.options.notFoundRoute)==null?void 0:m.options.component):i.options.notFoundComponent,u=r.ssr===!1||r.ssr==="data-only",d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??s??(((y=i.options.errorComponent)==null?void 0:y.preload)||u))?S.Suspense:os,h=a?Xp:os,p=c?Xj:os;return f.jsxs(i.isRoot?i.options.shellComponent??os:os,{children:[f.jsx(bu.Provider,{value:t,children:f.jsx(d,{fallback:o,children:f.jsx(h,{getResetKey:()=>n,errorComponent:a||Zp,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),!c||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!i.isRoot)throw w;return S.createElement(c,w)},children:u||r._displayPending?f.jsx(uj,{fallback:o,children:f.jsx($y,{matchId:t})}):f.jsx($y,{matchId:t})})})})}),r.parentRouteId===Ii?f.jsxs(f.Fragment,{children:[f.jsx(nT,{resetKey:n}),e.options.scrollRestoration&&qw?f.jsx(eT,{}):null]}):null]})}function nT({resetKey:e}){const t=Xt(),n=S.useRef(void 0);return zo(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Rs(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var $y=S.memo(function({matchId:t}){const n=Xt(),r=(u,d)=>{var h;return((h=n.getMatch(u.id))==null?void 0:h._nonReactive[d])??u._nonReactive[d]},i=n.stores.matchStores.get(t);i||sr();const s=It(i,u=>u),o=s.routeId,a=n.routesById[o],l=S.useMemo(()=>{var d;const u=(d=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:d({routeId:o,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return u?JSON.stringify(u):void 0},[o,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),c=S.useMemo(()=>{const u=a.options.component??n.options.defaultComponent;return u?f.jsx(u,{},l):f.jsx(Sb,{})},[l,a.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const u=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(u){const d=n.getMatch(s.id);if(d&&!d._nonReactive.minPendingPromise){const h=Ws();d._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),d._nonReactive.minPendingPromise=void 0},u)}}throw r(s,"loadPromise")}if(s.status==="notFound")return ut(s.error)||sr(),kb(n,a,s.error);if(s.status==="redirected")throw Et(s.error)||sr(),r(s,"loadPromise");if(s.status==="error")throw s.error;return c}),Sb=S.memo(function(){const t=Xt(),n=S.useContext(bu);let r,i=!1,s;{const c=n?t.stores.matchStores.get(n):void 0;[r,i]=It(c,u=>[u==null?void 0:u.routeId,(u==null?void 0:u.globalNotFound)??!1]),s=It(t.stores.matchesId,u=>u[u.findIndex(d=>d===n)+1])}const o=r?t.routesById[r]:void 0,a=t.options.defaultPendingComponent?f.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||sr(),kb(t,o,void 0);if(!s)return null;const l=f.jsx(_b,{matchId:s});return r===Ii?f.jsx(S.Suspense,{fallback:a,children:l}):l});function rT(){const e=Xt(),t=S.useRef({router:e,mounted:!1}),[n,r]=S.useState(!1),i=It(e.stores.isLoading,d=>d),s=It(e.stores.hasPending,d=>d),o=dd(i),a=i||n||s,l=dd(a),c=i||s,u=dd(c);return e.startTransition=d=>{r(!0),S.startTransition(()=>{d(),r(!1)})},S.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 Yr(e.latestLocation.publicHref)!==Yr(h.publicHref)&&e.commitLocation({...h,replace:!0}),()=>{d()}},[e,e.history]),zo(()=>{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]),zo(()=>{o&&!i&&e.emit({type:"onLoad",...Rs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),zo(()=>{u&&!c&&e.emit({type:"onBeforeRouteMount",...Rs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,u,e]),zo(()=>{if(l&&!a){const d=Rs(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),ub(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&lj(e)}},[a,l,e]),null}function iT(){const e=Xt(),t=e.routesById[Ii].options.pendingComponent??e.options.defaultPendingComponent,n=t?f.jsx(t,{}):null,r=f.jsxs(typeof document<"u"&&e.ssr?os:S.Suspense,{fallback:n,children:[f.jsx(rT,{}),f.jsx(sT,{})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:r}):r}function sT(){const e=Xt(),t=It(e.stores.firstId,i=>i),n=It(e.stores.loadedAt,i=>i),r=t?f.jsx(_b,{matchId:t}):null;return f.jsx(bu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:f.jsx(Xp,{getResetKey:()=>n,errorComponent:Zp,onCatch:void 0,children:r})})}var oT=e=>({createMutableStore:Oy,createReadonlyStore:Oy,batch:ub}),aT=e=>new lT(e),lT=class extends JE{constructor(e){super(e,oT)}};function cT({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(lb.Provider,{value:e,children:t});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function uT({router:e,...t}){return f.jsx(cT,{router:e,...t,children:f.jsx(iT,{})})}function dT(e){const t=Xt({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=S.useRef(void 0);return It(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=Nr(r.current,e.select(i));return r.current=s,s}return e.select(i)}return i})}function Cb(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=Cb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fT(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Cb(e))&&(r&&(r+=" "),r+=t);return r}const Jp="-",hT=e=>{const t=mT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Jp);return a[0]===""&&a.length!==1&&a.shift(),Pb(a,t)||pT(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(Jp);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Vy=/^\[(.+)\]$/,pT=e=>{if(Vy.test(e)){const t=Vy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},mT=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return yT(Object.entries(e.classGroups),n).forEach(([s,o])=>{ah(o,r,s,t)}),r},ah=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:Uy(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(gT(i)){ah(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{ah(o,Uy(t,s),n,r)})})},Uy=(e,t)=>{let n=e;return t.split(Jp).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},gT=e=>e.isThemeGetter,yT=(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,xT=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)}}},Eb="!",vT=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let w=0;w<a.length;w++){let g=a[w];if(c===0){if(g===i&&(r||a.slice(w,w+s)===t)){l.push(a.slice(u,w)),u=w+s;continue}if(g==="/"){d=w;continue}}g==="["?c++:g==="]"&&c--}const h=l.length===0?a:a.substring(u),p=h.startsWith(Eb),m=p?h.substring(1):h,y=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},wT=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},bT=e=>({cache:xT(e.cacheSize),parseClassName:vT(e),...hT(e)}),kT=/\s+/,_T=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(kT);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(c);let m=!!p,y=r(m?h.substring(0,p):h);if(!y){if(!m){a=c+(a.length>0?" "+a:a);continue}if(y=r(h),!y){a=c+(a.length>0?" "+a:a);continue}m=!1}const w=wT(u).join(":"),g=d?w+Eb: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 C=v[b];s.push(g+C)}a=c+(a.length>0?" "+a:a)}return a};function ST(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=jb(t))&&(r&&(r+=" "),r+=n);return r}const jb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=jb(e[r]))&&(n&&(n+=" "),n+=t);return n};function CT(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=bT(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=_T(l,n);return i(l,u),u}return function(){return s(ST.apply(null,arguments))}}const Ee=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Tb=/^\[(?:([a-z-]+):)?(.+)\]$/i,PT=/^\d+\/\d+$/,ET=new Set(["px","full","screen"]),jT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TT=/\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$/,RT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,LT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qn=e=>Ls(e)||ET.has(e)||PT.test(e),yr=e=>eo(e,"length",OT),Ls=e=>!!e&&!Number.isNaN(Number(e)),wd=e=>eo(e,"number",Ls),Co=e=>!!e&&Number.isInteger(Number(e)),IT=e=>e.endsWith("%")&&Ls(e.slice(0,-1)),re=e=>Tb.test(e),xr=e=>jT.test(e),AT=new Set(["length","size","percentage"]),DT=e=>eo(e,AT,Rb),NT=e=>eo(e,"position",Rb),FT=new Set(["image","url"]),zT=e=>eo(e,FT,VT),BT=e=>eo(e,"",$T),Po=()=>!0,eo=(e,t,n)=>{const r=Tb.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},OT=e=>TT.test(e)&&!RT.test(e),Rb=()=>!1,$T=e=>LT.test(e),VT=e=>MT.test(e),UT=()=>{const e=Ee("colors"),t=Ee("spacing"),n=Ee("blur"),r=Ee("brightness"),i=Ee("borderColor"),s=Ee("borderRadius"),o=Ee("borderSpacing"),a=Ee("borderWidth"),l=Ee("contrast"),c=Ee("grayscale"),u=Ee("hueRotate"),d=Ee("invert"),h=Ee("gap"),p=Ee("gradientColorStops"),m=Ee("gradientColorStopPositions"),y=Ee("inset"),w=Ee("margin"),g=Ee("opacity"),x=Ee("padding"),v=Ee("saturate"),b=Ee("scale"),C=Ee("sepia"),_=Ee("skew"),E=Ee("space"),j=Ee("translate"),L=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",re,t],M=()=>[re,t],F=()=>["",qn,yr],z=()=>["auto",Ls,re],N=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",re],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>[Ls,re];return{cacheSize:500,separator:":",theme:{colors:[Po],spacing:[qn,yr],blur:["none","",xr,re],brightness:O(),borderColor:[e],borderRadius:["none","","full",xr,re],borderSpacing:M(),borderWidth:F(),contrast:O(),grayscale:W(),hueRotate:O(),invert:W(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[IT,yr],inset:R(),margin:R(),opacity:O(),padding:M(),saturate:O(),scale:O(),sepia:W(),skew:O(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[xr]}],"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:[...N(),re]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Co,re]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",Co,re]}],"grid-cols":[{"grid-cols":[Po]}],"col-start-end":[{col:["auto",{span:["full",Co,re]},re]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[Po]}],"row-start-end":[{row:["auto",{span:[Co,re]},re]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,t]}],"min-w":[{"min-w":[re,t,"min","max","fit"]}],"max-w":[{"max-w":[re,t,"none","full","min","max","fit","prose",{screen:[xr]},xr]}],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",xr,yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wd]}],"font-family":[{font:[Po]}],"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",Ls,wd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qn,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:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qn,yr]}],"underline-offset":[{"underline-offset":["auto",qn,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:[...N(),NT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",DT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zT]}],"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:[...H(),"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:H()}],"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:["",...H()]}],"outline-offset":[{"outline-offset":[qn,re]}],"outline-w":[{outline:[qn,yr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[qn,yr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xr,BT]}],"shadow-color":[{shadow:[Po]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",xr,re]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"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:O()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:O()}],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:[Co,re]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"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:[qn,yr,wd]}],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"]}}},WT=CT(UT);function bd(e,t,n){if(e&&e.length){const[r,i]=t,s=Math.PI/180*n,o=Math.cos(s),a=Math.sin(s);for(const l of e){const[c,u]=l;l[0]=(c-r)*o-(u-i)*a+r,l[1]=(c-r)*a+(u-i)*o+i}}}function HT(e,t){return e[0]===t[0]&&e[1]===t[1]}function KT(e,t,n,r=1){const i=n,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,a=[0,0];if(i)for(const c of o)bd(c,a,i);const l=function(c,u,d){const h=[];for(const x of c){const v=[...x];HT(v[0],v[v.length-1])||v.push([v[0][0],v[0][1]]),v.length>2&&h.push(v)}const p=[];u=Math.max(u,.1);const m=[];for(const x of h)for(let v=0;v<x.length-1;v++){const b=x[v],C=x[v+1];if(b[1]!==C[1]){const _=Math.min(b[1],C[1]);m.push({ymin:_,ymax:Math.max(b[1],C[1]),x:_===b[1]?b[0]:C[0],islope:(C[0]-b[0])/(C[1]-b[1])})}}if(m.sort((x,v)=>x.ymin<v.ymin?-1:x.ymin>v.ymin?1:x.x<v.x?-1:x.x>v.x?1:x.ymax===v.ymax?0:(x.ymax-v.ymax)/Math.abs(x.ymax-v.ymax)),!m.length)return p;let y=[],w=m[0].ymin,g=0;for(;y.length||m.length;){if(m.length){let x=-1;for(let v=0;v<m.length&&!(m[v].ymin>w);v++)x=v;m.splice(0,x+1).forEach(v=>{y.push({s:w,edge:v})})}if(y=y.filter(x=>!(x.edge.ymax<=w)),y.sort((x,v)=>x.edge.x===v.edge.x?0:(x.edge.x-v.edge.x)/Math.abs(x.edge.x-v.edge.x)),(d!==1||g%u==0)&&y.length>1)for(let x=0;x<y.length;x+=2){const v=x+1;if(v>=y.length)break;const b=y[x].edge,C=y[v].edge;p.push([[Math.round(b.x),w],[Math.round(C.x),w]])}w+=d,y.forEach(x=>{x.edge.x=x.edge.x+d*x.edge.islope}),g++}return p}(o,s,r);if(i){for(const c of o)bd(c,a,-i);(function(c,u,d){const h=[];c.forEach(p=>h.push(...p)),bd(h,u,d)})(l,a,-i)}return l}function Da(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),KT(e,i,r,s||1)}class em{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){const r=Da(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 _u(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 GT extends em{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=Da(t,Object.assign({},n,{hachureGap:r})),s=Math.PI/180*n.hachureAngle,o=[],a=.5*r*Math.cos(s),l=.5*r*Math.sin(s);for(const[c,u]of i)_u([c,u])&&o.push([[c[0]-a,c[1]+l],[...u]],[[c[0]+a,c[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(o,n)}}}class QT extends em{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 YT{constructor(t){this.helper=t}fillPolygons(t,n){const r=Da(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=_u(a),c=l/i,u=Math.ceil(c)-1,d=l-u*i,h=(a[0][0]+a[1][0])/2-i/4,p=Math.min(a[0][1],a[1][1]);for(let m=0;m<u;m++){const y=p+d+m*i,w=h-o+2*Math.random()*o,g=y-o+2*Math.random()*o,x=this.helper.ellipse(w,g,s,s,n);r.push(...x.ops)}}return{type:"fillSketch",ops:r}}}class qT{constructor(t){this.helper=t}fillPolygons(t,n){const r=Da(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=_u(o),l=Math.floor(a/(r+i)),c=(a+i-l*(r+i))/2;let u=o[0],d=o[1];u[0]>d[0]&&(u=o[1],d=o[0]);const h=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let p=0;p<l;p++){const m=p*(r+i),y=m+r,w=[u[0]+m*Math.cos(h)+c*Math.cos(h),u[1]+m*Math.sin(h)+c*Math.sin(h)],g=[u[0]+y*Math.cos(h)+c*Math.cos(h),u[1]+y*Math.sin(h)+c*Math.sin(h)];s.push(...this.helper.doubleLineOps(w[0],w[1],g[0],g[1],n))}}),s}}class XT{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=Da(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=_u(s),a=Math.round(o/(2*n));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<a;d++){const h=2*d*n,p=2*(d+1)*n,m=Math.sqrt(2*Math.pow(n,2)),y=[l[0]+h*Math.cos(u),l[1]+h*Math.sin(u)],w=[l[0]+p*Math.cos(u),l[1]+p*Math.sin(u)],g=[y[0]+m*Math.cos(u+Math.PI/4),y[1]+m*Math.sin(u+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],g[0],g[1],r),...this.helper.doubleLineOps(g[0],g[1],w[0],w[1],r))}}),i}}const kt={};class ZT{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const JT=0,kd=1,Wy=2,ul={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 _d(e,t){return e.type===t}function tm(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:JT,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:kd,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return a[a.length]={type:Wy,text:""},a}(e);let r="BOD",i=0,s=n[i];for(;!_d(s,Wy);){let o=0;const a=[];if(r==="BOD"){if(s.text!=="M"&&s.text!=="m")return tm("M0,0"+e);i++,o=ul[s.text],r=s.text}else _d(s,kd)?o=ul[r]:(i++,o=ul[s.text],r=s.text);if(!(i+o<n.length))throw new Error("Path data ended short");for(let l=i;l<i+o;l++){const c=n[l];if(!_d(c,kd))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof ul[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 Lb(e){let t=0,n=0,r=0,i=0;const s=[];for(const{key:o,data:a}of e)switch(o){case"M":s.push({key:"M",data:[...a]}),[t,n]=a,[r,i]=a;break;case"m":t+=a[0],n+=a[1],s.push({key:"M",data:[t,n]}),r=t,i=n;break;case"L":s.push({key:"L",data:[...a]}),[t,n]=a;break;case"l":t+=a[0],n+=a[1],s.push({key:"L",data:[t,n]});break;case"C":s.push({key:"C",data:[...a]}),t=a[4],n=a[5];break;case"c":{const l=a.map((c,u)=>u%2?c+n:c+t);s.push({key:"C",data:l}),t=l[4],n=l[5];break}case"Q":s.push({key:"Q",data:[...a]}),t=a[2],n=a[3];break;case"q":{const l=a.map((c,u)=>u%2?c+n:c+t);s.push({key:"Q",data:l}),t=l[2],n=l[3];break}case"A":s.push({key:"A",data:[...a]}),t=a[5],n=a[6];break;case"a":t+=a[5],n+=a[6],s.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],t,n]});break;case"H":s.push({key:"H",data:[...a]}),t=a[0];break;case"h":t+=a[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...a]}),n=a[0];break;case"v":n+=a[0],s.push({key:"V",data:[n]});break;case"S":s.push({key:"S",data:[...a]}),t=a[2],n=a[3];break;case"s":{const l=a.map((c,u)=>u%2?c+n:c+t);s.push({key:"S",data:l}),t=l[2],n=l[3];break}case"T":s.push({key:"T",data:[...a]}),t=a[0],n=a[1];break;case"t":t+=a[0],n+=a[1],s.push({key:"T",data:[t,n]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=r,n=i}return s}function Mb(e){const t=[];let n="",r=0,i=0,s=0,o=0,a=0,l=0;for(const{key:c,data:u}of e){switch(c){case"M":t.push({key:"M",data:[...u]}),[r,i]=u,[s,o]=u;break;case"C":t.push({key:"C",data:[...u]}),r=u[4],i=u[5],a=u[2],l=u[3];break;case"L":t.push({key:"L",data:[...u]}),[r,i]=u;break;case"H":r=u[0],t.push({key:"L",data:[r,i]});break;case"V":i=u[0],t.push({key:"L",data:[r,i]});break;case"S":{let d=0,h=0;n==="C"||n==="S"?(d=r+(r-a),h=i+(i-l)):(d=r,h=i),t.push({key:"C",data:[d,h,...u]}),a=u[0],l=u[1],r=u[2],i=u[3];break}case"T":{const[d,h]=u;let p=0,m=0;n==="Q"||n==="T"?(p=r+(r-a),m=i+(i-l)):(p=r,m=i);const y=r+2*(p-r)/3,w=i+2*(m-i)/3,g=d+2*(p-d)/3,x=h+2*(m-h)/3;t.push({key:"C",data:[y,w,g,x,d,h]}),a=p,l=m,r=d,i=h;break}case"Q":{const[d,h,p,m]=u,y=r+2*(d-r)/3,w=i+2*(h-i)/3,g=p+2*(d-p)/3,x=m+2*(h-m)/3;t.push({key:"C",data:[y,w,g,x,p,m]}),a=d,l=h,r=p,i=m;break}case"A":{const d=Math.abs(u[0]),h=Math.abs(u[1]),p=u[2],m=u[3],y=u[4],w=u[5],g=u[6];d===0||h===0?(t.push({key:"C",data:[r,i,w,g,w,g]}),r=w,i=g):(r!==w||i!==g)&&(Ib(r,i,w,g,d,h,p,m,y).forEach(function(x){t.push({key:"C",data:x})}),r=w,i=g);break}case"Z":t.push({key:"Z",data:[]}),r=s,i=o}n=c}return t}function Eo(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Ib(e,t,n,r,i,s,o,a,l,c){const u=(d=o,Math.PI*d/180);var d;let h=[],p=0,m=0,y=0,w=0;if(c)[p,m,y,w]=c;else{[e,t]=Eo(e,t,-u),[n,r]=Eo(n,r,-u);const F=(e-n)/2,z=(t-r)/2;let N=F*F/(i*i)+z*z/(s*s);N>1&&(N=Math.sqrt(N),i*=N,s*=N);const H=i*i,K=s*s,D=H*K-H*z*z-K*F*F,W=H*z*z+K*F*F,k=(a===l?-1:1)*Math.sqrt(Math.abs(D/W));y=k*i*z/s+(e+n)/2,w=k*-s*F/i+(t+r)/2,p=Math.asin(parseFloat(((t-w)/s).toFixed(9))),m=Math.asin(parseFloat(((r-w)/s).toFixed(9))),e<y&&(p=Math.PI-p),n<y&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),l&&p>m&&(p-=2*Math.PI),!l&&m>p&&(m-=2*Math.PI)}let g=m-p;if(Math.abs(g)>120*Math.PI/180){const F=m,z=n,N=r;m=l&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,h=Ib(n=y+i*Math.cos(m),r=w+s*Math.sin(m),z,N,i,s,o,0,l,[m,F,y,w])}g=m-p;const x=Math.cos(p),v=Math.sin(p),b=Math.cos(m),C=Math.sin(m),_=Math.tan(g/4),E=4/3*i*_,j=4/3*s*_,L=[e,t],P=[e+E*v,t-j*x],R=[n+E*C,r-j*b],M=[n,r];if(P[0]=2*L[0]-P[0],P[1]=2*L[1]-P[1],c)return[P,R,M].concat(h);{h=[P,R,M].concat(h);const F=[];for(let z=0;z<h.length;z+=3){const N=Eo(h[z][0],h[z][1],u),H=Eo(h[z+1][0],h[z+1][1],u),K=Eo(h[z+2][0],h[z+2][1],u);F.push([N[0],N[1],H[0],H[1],K[0],K[1]])}return F}}const e2={randOffset:function(e,t){return Z(e,t)},randOffsetWithRange:function(e,t,n){return Fc(e,t,n)},ellipse:function(e,t,n,r,i){const s=Db(n,r,i);return lh(e,t,i,s).opset},doubleLineOps:function(e,t,n,r,i){return Jr(e,t,n,r,i,!0)}};function Ab(e,t,n,r,i){return{type:"path",ops:Jr(e,t,n,r,i)}}function Gl(e,t,n){const r=(e||[]).length;if(r>2){const i=[];for(let s=0;s<r-1;s++)i.push(...Jr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],n));return t&&i.push(...Jr(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:i}}return r===2?Ab(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function t2(e,t,n,r,i){return function(s,o){return Gl(s,!0,o)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function Hy(e,t){if(e.length){const n=typeof e[0][0]=="number"?[e]:e,r=dl(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:dl(n[0],1.5*(1+.22*t.roughness),Qy(t));for(let s=1;s<n.length;s++){const o=n[s];if(o.length){const a=dl(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:dl(o,1.5*(1+.22*t.roughness),Qy(t));for(const c of a)c.op!=="move"&&r.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function Db(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+=Z(o*l,n),a+=Z(a*l,n),{increment:s,rx:o,ry:a}}function lh(e,t,n,r){const[i,s]=Yy(r.increment,e,t,r.rx,r.ry,1,r.increment*Fc(.1,Fc(.4,1,n),n),n);let o=zc(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=Yy(r.increment,e,t,r.rx,r.ry,1.5,0,n),l=zc(a,null,n);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function Ky(e,t,n,r,i,s,o,a,l){const c=e,u=t;let d=Math.abs(n/2),h=Math.abs(r/2);d+=Z(.01*d,l),h+=Z(.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=qy(w,c,u,d,h,p,m,1,l);if(!l.disableMultiStroke){const x=qy(w,c,u,d,h,p,m,1.5,l);g.push(...x)}return o&&(a?g.push(...Jr(c,u,c+d*Math.cos(p),u+h*Math.sin(p),l),...Jr(c,u,c+d*Math.cos(m),u+h*Math.sin(m),l)):g.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+d*Math.cos(p),u+h*Math.sin(p)]})),{type:"path",ops:g}}function Gy(e,t){const n=Mb(Lb(tm(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(...Jr(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]];break;case"C":{const[l,c,u,d,h,p]=a;r.push(...n2(l,c,u,d,h,p,s,t)),s=[h,p];break}case"Z":r.push(...Jr(s[0],s[1],i[0],i[1],t)),s=[i[0],i[1]]}return{type:"path",ops:r}}function Sd(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]+Z(i,t),r[0][1]+Z(i,t)]});for(let o=1;o<s;o++)n.push({op:"lineTo",data:[r[o][0]+Z(i,t),r[o][1]+Z(i,t)]})}}return{type:"fillPath",ops:n}}function Ji(e,t){return function(n,r){let i=n.fillStyle||"hachure";if(!kt[i])switch(i){case"zigzag":kt[i]||(kt[i]=new GT(r));break;case"cross-hatch":kt[i]||(kt[i]=new QT(r));break;case"dots":kt[i]||(kt[i]=new YT(r));break;case"dashed":kt[i]||(kt[i]=new qT(r));break;case"zigzag-line":kt[i]||(kt[i]=new XT(r));break;default:i="hachure",kt[i]||(kt[i]=new em(r))}return kt[i]}(t,e2).fillPolygons(e,t)}function Qy(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Nb(e){return e.randomizer||(e.randomizer=new ZT(e.seed||0)),e.randomizer.next()}function Fc(e,t,n,r=1){return n.roughness*r*(Nb(n)*(t-e)+e)}function Z(e,t,n=1){return Fc(-e,e,t,n)}function Jr(e,t,n,r,i,s=!1){const o=s?i.disableMultiStrokeFill:i.disableMultiStroke,a=ch(e,t,n,r,i,!0,!1);if(o)return a;const l=ch(e,t,n,r,i,!0,!0);return a.concat(l)}function ch(e,t,n,r,i,s,o){const a=Math.pow(e-n,2)+Math.pow(t-r,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>a&&(u=l/10);const d=u/2,h=.2+.2*Nb(i);let p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=Z(p,i,c),m=Z(m,i,c);const y=[],w=()=>Z(d,i,c),g=()=>Z(u,i,c),x=i.preserveVertices;return o?y.push({op:"move",data:[e+(x?0:w()),t+(x?0:w())]}):y.push({op:"move",data:[e+(x?0:Z(u,i,c)),t+(x?0:Z(u,i,c))]}),o?y.push({op:"bcurveTo",data:[p+e+(n-e)*h+w(),m+t+(r-t)*h+w(),p+e+2*(n-e)*h+w(),m+t+2*(r-t)*h+w(),n+(x?0:w()),r+(x?0:w())]}):y.push({op:"bcurveTo",data:[p+e+(n-e)*h+g(),m+t+(r-t)*h+g(),p+e+2*(n-e)*h+g(),m+t+2*(r-t)*h+g(),n+(x?0:g()),r+(x?0:g())]}),y}function dl(e,t,n){if(!e.length)return[];const r=[];r.push([e[0][0]+Z(t,n),e[0][1]+Z(t,n)]),r.push([e[0][0]+Z(t,n),e[0][1]+Z(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+Z(t,n),e[i][1]+Z(t,n)]),i===e.length-1&&r.push([e[i][0]+Z(t,n),e[i][1]+Z(t,n)]);return zc(r,null,n)}function zc(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(...ch(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function Yy(e,t,n,r,i,s,o,a){const l=[],c=[];if(a.roughness===0){e/=4,c.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let u=0;u<=2*Math.PI;u+=e){const d=[t+r*Math.cos(u),n+i*Math.sin(u)];l.push(d),c.push(d)}c.push([t+r*Math.cos(0),n+i*Math.sin(0)]),c.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{const u=Z(.5,a)-Math.PI/2;c.push([Z(s,a)+t+.9*r*Math.cos(u-e),Z(s,a)+n+.9*i*Math.sin(u-e)]);const d=2*Math.PI+u-.01;for(let h=u;h<d;h+=e){const p=[Z(s,a)+t+r*Math.cos(h),Z(s,a)+n+i*Math.sin(h)];l.push(p),c.push(p)}c.push([Z(s,a)+t+r*Math.cos(u+2*Math.PI+.5*o),Z(s,a)+n+i*Math.sin(u+2*Math.PI+.5*o)]),c.push([Z(s,a)+t+.98*r*Math.cos(u+o),Z(s,a)+n+.98*i*Math.sin(u+o)]),c.push([Z(s,a)+t+.9*r*Math.cos(u+.5*o),Z(s,a)+n+.9*i*Math.sin(u+.5*o)])}return[c,l]}function qy(e,t,n,r,i,s,o,a,l){const c=s+Z(.1,l),u=[];u.push([Z(a,l)+t+.9*r*Math.cos(c-e),Z(a,l)+n+.9*i*Math.sin(c-e)]);for(let d=c;d<=o;d+=e)u.push([Z(a,l)+t+r*Math.cos(d),Z(a,l)+n+i*Math.sin(d)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),zc(u,null,l)}function n2(e,t,n,r,i,s,o,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let u=[0,0];const d=a.disableMultiStroke?1:2,h=a.preserveVertices;for(let p=0;p<d;p++)p===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(h?0:Z(c[0],a)),o[1]+(h?0:Z(c[0],a))]}),u=h?[i,s]:[i+Z(c[p],a),s+Z(c[p],a)],l.push({op:"bcurveTo",data:[e+Z(c[p],a),t+Z(c[p],a),n+Z(c[p],a),r+Z(c[p],a),u[0],u[1]]});return l}function jo(e){return[...e]}function Xy(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(jo(e[0]),jo(e[1]),jo(e[2]),jo(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(jo(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 Ql(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function r2(e,t,n){const r=Ql(t,n);if(r===0)return Ql(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)),Ql(e,yi(t,n,i))}function yi(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 c=a[l+0],u=a[l+1],d=a[l+2],h=a[l+3];let p=3*u[0]-2*c[0]-h[0];p*=p;let m=3*u[1]-2*c[1]-h[1];m*=m;let y=3*d[0]-2*h[0]-c[0];y*=y;let w=3*d[1]-2*h[1]-c[1];return w*=w,p<y&&(p=y),m<w&&(m=w),p+m}(e,t)<n){const a=e[t+0];i.length?(s=i[i.length-1],o=a,Math.sqrt(Ql(s,o))>1&&i.push(a)):i.push(a),i.push(e[t+3])}else{const l=e[t+0],c=e[t+1],u=e[t+2],d=e[t+3],h=yi(l,c,.5),p=yi(c,u,.5),m=yi(u,d,.5),y=yi(h,p,.5),w=yi(p,m,.5),g=yi(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 i2(e,t){return Bc(e,0,e.length,t)}function Bc(e,t,n,r,i){const s=i||[],o=e[t],a=e[n-1];let l=0,c=1;for(let u=t+1;u<n-1;++u){const d=r2(e[u],o,a);d>l&&(l=d,c=u)}return Math.sqrt(l)>r?(Bc(e,t,c+1,r,s),Bc(e,c,n,r,s)):(s.length||s.push(o),s.push(a)),s}function Cd(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?Bc(r,0,r.length,n):r}const Ft="none";class Oc{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",[Ab(t,n,r,i,o)],o)}rectangle(t,n,r,i,s){const o=this._o(s),a=[],l=t2(t,n,r,i,o);if(o.fill){const c=[[t,n],[t+r,n],[t+r,n+i],[t,n+i]];o.fillStyle==="solid"?a.push(Sd([c],o)):a.push(Ji([c],o))}return o.stroke!==Ft&&a.push(l),this._d("rectangle",a,o)}ellipse(t,n,r,i,s){const o=this._o(s),a=[],l=Db(r,i,o),c=lh(t,n,o,l);if(o.fill)if(o.fillStyle==="solid"){const u=lh(t,n,o,l).opset;u.type="fillPath",a.push(u)}else a.push(Ji([c.estimatedPoints],o));return o.stroke!==Ft&&a.push(c.opset),this._d("ellipse",a,o)}circle(t,n,r,i){const s=this.ellipse(t,n,r,r,i);return s.shape="circle",s}linearPath(t,n){const r=this._o(n);return this._d("linearPath",[Gl(t,!1,r)],r)}arc(t,n,r,i,s,o,a=!1,l){const c=this._o(l),u=[],d=Ky(t,n,r,i,s,o,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const h=Object.assign({},c);h.disableMultiStroke=!0;const p=Ky(t,n,r,i,s,o,!0,!1,h);p.type="fillPath",u.push(p)}else u.push(function(h,p,m,y,w,g,x){const v=h,b=p;let C=Math.abs(m/2),_=Math.abs(y/2);C+=Z(.01*C,x),_+=Z(.01*_,x);let E=w,j=g;for(;E<0;)E+=2*Math.PI,j+=2*Math.PI;j-E>2*Math.PI&&(E=0,j=2*Math.PI);const L=(j-E)/x.curveStepCount,P=[];for(let R=E;R<=j;R+=L)P.push([v+C*Math.cos(R),b+_*Math.sin(R)]);return P.push([v+C*Math.cos(j),b+_*Math.sin(j)]),P.push([v,b]),Ji([P],x)}(t,n,r,i,s,o,c));return c.stroke!==Ft&&u.push(d),this._d("arc",u,c)}curve(t,n){const r=this._o(n),i=[],s=Hy(t,r);if(r.fill&&r.fill!==Ft)if(r.fillStyle==="solid"){const o=Hy(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],a=t;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Cd(Xy([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):o.push(...Cd(Xy(c),10,(1+r.roughness)/2))}o.length&&i.push(Ji([o],r))}return r.stroke!==Ft&&i.push(s),this._d("curve",i,r)}polygon(t,n){const r=this._o(n),i=[],s=Gl(t,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Sd([t],r)):i.push(Ji([t],r))),r.stroke!==Ft&&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!==Ft,o=r.stroke!==Ft,a=!!(r.simplification&&r.simplification<1),l=function(u,d,h){const p=Mb(Lb(tm(u))),m=[];let y=[],w=[0,0],g=[];const x=()=>{g.length>=4&&y.push(...Cd(g,d)),g=[]},v=()=>{x(),y.length&&(m.push(y),y=[])};for(const{key:C,data:_}of p)switch(C){case"M":v(),w=[_[0],_[1]],y.push(w);break;case"L":x(),y.push([_[0],_[1]]);break;case"C":if(!g.length){const E=y.length?y[y.length-1]:w;g.push([E[0],E[1]])}g.push([_[0],_[1]]),g.push([_[2],_[3]]),g.push([_[4],_[5]]);break;case"Z":x(),y.push([w[0],w[1]])}if(v(),!h)return m;const b=[];for(const C of m){const _=i2(C,h);_.length&&b.push(_)}return b}(t,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),c=Gy(t,r);if(s)if(r.fillStyle==="solid")if(l.length===1){const u=Gy(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else i.push(Sd(l,r));else i.push(Ji(l,r));return o&&(a?l.forEach(u=>{i.push(Gl(u,!1,r))}):i.push(c)),this._d("path",i,r)}opsToPath(t,n){let r="";for(const i of t.ops){const s=typeof n=="number"&&n>=0?i.data.map(o=>+o.toFixed(n)):i.data;switch(i.op){case"move":r+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":r+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":r+=`L${s[0]} ${s[1]} `}}return r.trim()}toPaths(t){const n=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const s of n){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Ft};break;case"fillPath":o={d:this.opsToPath(s),stroke:Ft,strokeWidth:0,fill:r.fill||Ft};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||Ft,strokeWidth:r,fill:Ft}}_mergedShape(t){return t.filter((n,r)=>r===0||n.op!=="move")}}let s2=class{constructor(t,n){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Oc(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of n)switch(o.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,o,s),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const a=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,o,s,a),i.restore();break}case"fillSketch":this.fillSketch(i,o,r)}}fillSketch(t,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,n,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,n,r,i="nonzero"){t.beginPath();for(const s of n.ops){const o=typeof r=="number"&&r>=0?s.data.map(a=>+a.toFixed(r)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}n.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,n,r,i,s){const o=this.gen.line(t,n,r,i,s);return this.draw(o),o}rectangle(t,n,r,i,s){const o=this.gen.rectangle(t,n,r,i,s);return this.draw(o),o}ellipse(t,n,r,i,s){const o=this.gen.ellipse(t,n,r,i,s);return this.draw(o),o}circle(t,n,r,i){const s=this.gen.circle(t,n,r,i);return this.draw(s),s}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r),r}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r),r}arc(t,n,r,i,s,o,a=!1,l){const c=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(c),c}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r),r}path(t,n){const r=this.gen.path(t,n);return this.draw(r),r}};const fl="http://www.w3.org/2000/svg";class o2{constructor(t,n){this.svg=t,this.gen=new Oc(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,s=i.createElementNS(fl,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(fl,"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(fl,"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(fl,"path");return s.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),s.setAttribute("stroke",r.fill||""),s.setAttribute("stroke-width",i+""),s.setAttribute("fill","none"),r.fillLineDash&&s.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,n){return this.gen.opsToPath(t,n)}line(t,n,r,i,s){const o=this.gen.line(t,n,r,i,s);return this.draw(o)}rectangle(t,n,r,i,s){const o=this.gen.rectangle(t,n,r,i,s);return this.draw(o)}ellipse(t,n,r,i,s){const o=this.gen.ellipse(t,n,r,i,s);return this.draw(o)}circle(t,n,r,i){const s=this.gen.circle(t,n,r,i);return this.draw(s)}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r)}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r)}arc(t,n,r,i,s,o,a=!1,l){const c=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(c)}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r)}path(t,n){const r=this.gen.path(t,n);return this.draw(r)}}var a2={canvas:(e,t)=>new s2(e,t),svg:(e,t)=>new o2(e,t),generator:e=>new Oc(e),newSeed:()=>Oc.newSeed()};const nm=S.createContext({});function rm(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const l2=typeof window<"u",Fb=l2?S.useLayoutEffect:S.useEffect,Su=S.createContext(null);function im(e,t){e.indexOf(t)===-1&&e.push(t)}function $c(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Wn=(e,t,n)=>n>t?t:n<e?e:n;let sm=()=>{};const ei={},zb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Bb=e=>typeof e=="object"&&e!==null,Ob=e=>/^0[^.\s]+$/u.test(e);function $b(e){let t;return()=>(t===void 0&&(t=e()),t)}const fn=e=>e,Na=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Sa=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class om{constructor(){this.subscriptions=[]}add(t){return im(this.subscriptions,t),()=>$c(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 Wt=e=>e*1e3,cn=e=>e/1e3,Vb=(e,t)=>t?e*(1e3/t):0,Ub=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,c2=1e-7,u2=12;function d2(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Ub(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>c2&&++a<u2);return o}function Fa(e,t,n,r){if(e===t&&n===r)return fn;const i=s=>d2(s,0,1,e,n);return s=>s===0||s===1?s:Ub(i(s),t,r)}const Wb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Hb=e=>t=>1-e(1-t),Kb=Fa(.33,1.53,.69,.99),am=Hb(Kb),Gb=Wb(am),Qb=e=>e>=1?1:(e*=2)<1?.5*am(e):.5*(2-Math.pow(2,-10*(e-1))),lm=e=>1-Math.sin(Math.acos(e)),Yb=Hb(lm),qb=Wb(lm),f2=Fa(.42,0,1,1),h2=Fa(0,0,.58,1),Xb=Fa(.42,0,.58,1),p2=e=>Array.isArray(e)&&typeof e[0]!="number",Zb=e=>Array.isArray(e)&&typeof e[0]=="number",m2={linear:fn,easeIn:f2,easeInOut:Xb,easeOut:h2,circIn:lm,circInOut:qb,circOut:Yb,backIn:am,backInOut:Gb,backOut:Kb,anticipate:Qb},g2=e=>typeof e=="string",Zy=e=>{if(Zb(e)){sm(e.length===4);const[t,n,r,i]=e;return Fa(t,n,r,i)}else if(g2(e))return m2[e];return e},hl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function y2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,h=!1)=>{const m=h&&i?n:r;return d&&o.add(u),m.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),i=!1,s&&(s=!1,c.process(u))}};return c}const x2=40;function Jb(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=hl.reduce((v,b)=>(v[b]=y2(s),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:p,postRender:m}=o,y=()=>{const v=ei.useManualTiming,b=v?i.timestamp:performance.now();n=!1,v||(i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,x2),1)),i.timestamp=b,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},w=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:hl.reduce((v,b)=>{const C=o[b];return v[b]=(_,E=!1,j=!1)=>(n||w(),C.schedule(_,E,j)),v},{}),cancel:v=>{for(let b=0;b<hl.length;b++)o[hl[b]].cancel(v)},state:i,steps:o}}const{schedule:ke,cancel:ti,state:Je,steps:Pd}=Jb(typeof requestAnimationFrame<"u"?requestAnimationFrame:fn,!0);let Yl;function v2(){Yl=void 0}const mt={now:()=>(Yl===void 0&&mt.set(Je.isProcessing||ei.useManualTiming?Je.timestamp:performance.now()),Yl),set:e=>{Yl=e,queueMicrotask(v2)}},ek=e=>t=>typeof t=="string"&&t.startsWith(e),tk=ek("--"),w2=ek("var(--"),cm=e=>w2(e)?b2.test(e.split("/*")[0].trim()):!1,b2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Jy(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const to={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ca={...to,transform:e=>Wn(0,1,e)},pl={...to,default:1},qo=e=>Math.round(e*1e5)/1e5,um=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function k2(e){return e==null}const _2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dm=(e,t)=>n=>!!(typeof n=="string"&&_2.test(n)&&n.startsWith(e)||t&&!k2(n)&&Object.prototype.hasOwnProperty.call(n,t)),nk=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(um);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},S2=e=>Wn(0,255,e),Ed={...to,transform:e=>Math.round(S2(e))},Ci={test:dm("rgb","red"),parse:nk("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ed.transform(e)+", "+Ed.transform(t)+", "+Ed.transform(n)+", "+qo(Ca.transform(r))+")"};function C2(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 dh={test:dm("#"),parse:C2,transform:Ci.transform},za=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Jn=za("deg"),Un=za("%"),Y=za("px"),P2=za("vh"),E2=za("vw"),ex={...Un,parse:e=>Un.parse(e)/100,transform:e=>Un.transform(e*100)},ws={test:dm("hsl","hue"),parse:nk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Un.transform(qo(t))+", "+Un.transform(qo(n))+", "+qo(Ca.transform(r))+")"},Ue={test:e=>Ci.test(e)||dh.test(e)||ws.test(e),parse:e=>Ci.test(e)?Ci.parse(e):ws.test(e)?ws.parse(e):dh.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ci.transform(e):ws.transform(e),getAnimatableNone:e=>{const t=Ue.parse(e);return t.alpha=0,Ue.transform(t)}},j2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function T2(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(um))==null?void 0:t.length)||0)+(((n=e.match(j2))==null?void 0:n.length)||0)>0}const rk="number",ik="color",R2="var",L2="var(",tx="${}",M2=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ks(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(M2,l=>(Ue.test(l)?(r.color.push(s),i.push(ik),n.push(Ue.parse(l))):l.startsWith(L2)?(r.var.push(s),i.push(R2),n.push(l)):(r.number.push(s),i.push(rk),n.push(parseFloat(l))),++s,tx)).split(tx);return{values:n,split:a,indexes:r,types:i}}function I2(e){return Ks(e).values}function sk({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===rk?i+=qo(r[s]):o===ik?i+=Ue.transform(r[s]):i+=r[s]}return i}}function A2(e){return sk(Ks(e))}const D2=e=>typeof e=="number"?0:Ue.test(e)?Ue.getAnimatableNone(e):e,N2=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:D2(e);function F2(e){const t=Ks(e);return sk(t)(t.values.map((r,i)=>N2(r,t.split[i])))}const Cn={test:T2,parse:I2,createTransformer:A2,getAnimatableNone:F2};function jd(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 z2({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=jd(l,a,e+1/3),s=jd(l,a,e),o=jd(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Vc(e,t){return n=>n>0?t:e}const be=(e,t,n)=>e+(t-e)*n,Td=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},B2=[dh,Ci,ws],O2=e=>B2.find(t=>t.test(e));function nx(e){const t=O2(e);if(!t)return!1;let n=t.parse(e);return t===ws&&(n=z2(n)),n}const rx=(e,t)=>{const n=nx(e),r=nx(t);if(!n||!r)return Vc(e,t);const i={...n};return s=>(i.red=Td(n.red,r.red,s),i.green=Td(n.green,r.green,s),i.blue=Td(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),Ci.transform(i))},fh=new Set(["none","hidden"]);function $2(e,t){return fh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function V2(e,t){return n=>be(e,t,n)}function fm(e){return typeof e=="number"?V2:typeof e=="string"?cm(e)?Vc:Ue.test(e)?rx:H2:Array.isArray(e)?ok:typeof e=="object"?Ue.test(e)?rx:U2:Vc}function ok(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>fm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function U2(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=fm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function W2(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 H2=(e,t)=>{const n=Cn.createTransformer(t),r=Ks(e),i=Ks(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?fh.has(e)&&!i.values.length||fh.has(t)&&!r.values.length?$2(e,t):Na(ok(W2(r,i),i.values),n):Vc(e,t)};function ak(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):fm(e)(e,t)}const K2=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>ti(t),now:()=>Je.isProcessing?Je.timestamp:mt.now()}},lk=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Uc=2e4;function hm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Uc;)t+=n,r=e.next(t);return t>=Uc?1/0:t}function G2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(hm(r),Uc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:cn(i)}}const Fe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function hh(e,t){return e*Math.sqrt(1-t*t)}const Q2=12;function Y2(e,t,n){let r=n;for(let i=1;i<Q2;i++)r=r-e(r)/t(r);return r}const Rd=.001;function q2({duration:e=Fe.duration,bounce:t=Fe.bounce,velocity:n=Fe.velocity,mass:r=Fe.mass}){let i,s,o=1-t;o=Wn(Fe.minDamping,Fe.maxDamping,o),e=Wn(Fe.minDuration,Fe.maxDuration,cn(e)),o<1?(i=c=>{const u=c*o,d=u*e,h=u-n,p=hh(c,o),m=Math.exp(-d);return Rd-h/p*m},s=c=>{const d=c*o*e,h=d*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-d),y=hh(Math.pow(c,2),o);return(-i(c)+Rd>0?-1:1)*((h-p)*m)/y}):(i=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Rd+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Y2(i,s,a);if(e=Wt(e),isNaN(l))return{stiffness:Fe.stiffness,damping:Fe.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const X2=["duration","bounce"],Z2=["stiffness","damping","mass"];function ix(e,t){return t.some(n=>e[n]!==void 0)}function J2(e){let t={velocity:Fe.velocity,stiffness:Fe.stiffness,damping:Fe.damping,mass:Fe.mass,isResolvedFromDuration:!1,...e};if(!ix(e,Z2)&&ix(e,X2))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Wn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Fe.mass,stiffness:i,damping:s}}else{const n=q2({...e,velocity:0});t={...t,...n,mass:Fe.mass},t.isResolvedFromDuration=!0}return t}function Wc(e=Fe.visualDuration,t=Fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:p}=J2({...n,velocity:-cn(n.velocity||0)}),m=h||0,y=c/(2*Math.sqrt(l*u)),w=o-s,g=cn(Math.sqrt(l/u)),x=Math.abs(w)<5;r||(r=x?Fe.restSpeed.granular:Fe.restSpeed.default),i||(i=x?Fe.restDelta.granular:Fe.restDelta.default);let v,b,C,_,E,j;if(y<1)C=hh(g,y),_=(m+y*g*w)/C,v=P=>{const R=Math.exp(-y*g*P);return o-R*(_*Math.sin(C*P)+w*Math.cos(C*P))},E=y*g*_+w*C,j=y*g*w-_*C,b=P=>Math.exp(-y*g*P)*(E*Math.sin(C*P)+j*Math.cos(C*P));else if(y===1){v=R=>o-Math.exp(-g*R)*(w+(m+g*w)*R);const P=m+g*w;b=R=>Math.exp(-g*R)*(g*P*R-m)}else{const P=g*Math.sqrt(y*y-1);v=z=>{const N=Math.exp(-y*g*z),H=Math.min(P*z,300);return o-N*((m+y*g*w)*Math.sinh(H)+P*w*Math.cosh(H))/P};const R=(m+y*g*w)/P,M=y*g*R-w*P,F=y*g*w-R*P;b=z=>{const N=Math.exp(-y*g*z),H=Math.min(P*z,300);return N*(M*Math.sinh(H)+F*Math.cosh(H))}}const L={calculatedDuration:p&&d||null,velocity:P=>Wt(b(P)),next:P=>{if(!p&&y<1){const M=Math.exp(-y*g*P),F=Math.sin(C*P),z=Math.cos(C*P),N=o-M*(_*F+w*z),H=Wt(M*(E*F+j*z));return a.done=Math.abs(H)<=r&&Math.abs(o-N)<=i,a.value=a.done?o:N,a}const R=v(P);if(p)a.done=P>=d;else{const M=Wt(b(P));a.done=Math.abs(M)<=r&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const P=Math.min(hm(L),Uc),R=lk(M=>L.next(P*M).value,P,30);return P+"ms "+R},toTransition:()=>{}};return L}Wc.applyToOptions=e=>{const t=G2(e,100,Wc);return e.ease=t.ease,e.duration=Wt(t.duration),e.type="keyframes",e};const eR=5;function ck(e,t,n){const r=Math.max(t-eR,0);return Vb(n-e(r),t-r)}function ph({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=j=>a!==void 0&&j<a||l!==void 0&&j>l,m=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let y=n*t;const w=d+y,g=o===void 0?w:o(w);g!==w&&(y=g-d);const x=j=>-y*Math.exp(-j/r),v=j=>g+x(j),b=j=>{const L=x(j),P=v(j);h.done=Math.abs(L)<=c,h.value=h.done?g:P};let C,_;const E=j=>{p(h.value)&&(C=j,_=Wc({keyframes:[h.value,m(h.value)],velocity:ck(v,j,h.value),damping:i,stiffness:s,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:j=>{let L=!1;return!_&&C===void 0&&(L=!0,b(j),E(j)),C!==void 0&&j>=C?_.next(j-C):(!L&&b(j),h)}}}function tR(e,t,n){const r=[],i=n||ei.mix||ak,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||fn:t;a=Na(l,a)}r.push(a)}return r}function nR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(sm(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=tR(t,r,i),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=Sa(e[d],e[d+1],u);return a[d](h)};return n?u=>c(Wn(e[0],e[s-1],u)):c}function rR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Sa(0,t,r);e.push(be(n,1,i))}}function iR(e){const t=[0];return rR(t,e.length-1),t}function sR(e,t){return e.map(n=>n*t)}function oR(e,t){return e.map(()=>t||Xb).splice(0,e.length-1)}function Xo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=p2(r)?r.map(Zy):Zy(r),s={done:!1,value:t[0]},o=sR(n&&n.length===t.length?n:iR(t),e),a=nR(o,t,{ease:Array.isArray(i)?i:oR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const aR=e=>e!==null;function Cu(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(aR),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const lR={decay:ph,inertia:ph,tween:Xo,keyframes:Xo,spring:Wc};function uk(e){typeof e.type=="string"&&(e.type=lR[e.type])}class pm{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 cR=e=>e/100;class Hc extends pm{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!==mt.now()&&this.tick(mt.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;uk(t);const{type:n=Xo,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Xo;l!==Xo&&typeof a[0]!="number"&&(this.mixKeyframes=Na(cR,ak(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=hm(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:p,type:m,onUpdate:y,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,b=r;if(d){const j=Math.min(this.currentTime,i)/a;let L=Math.floor(j),P=j%1;!P&&j>=1&&(P=1),P===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(h==="reverse"?(P=1-P,p&&(P-=p/a)):h==="mirror"&&(b=o)),v=Wn(0,1,P)*a}let C;x?(this.delayState.value=u[0],C=this.delayState):C=b.next(v),s&&!x&&(C.value=s(C.value));let{done:_}=C;!x&&l!==null&&(_=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return E&&m!==ph&&(C.value=Cu(u,this.options,w,this.speed)),y&&y(C.value),E&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return cn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+cn(t)}get time(){return cn(this.currentTime)}set time(t){t=Wt(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 ck(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(mt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=cn(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=K2,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(mt.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 uR(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Pi=e=>e*180/Math.PI,mh=e=>{const t=Pi(Math.atan2(e[1],e[0]));return gh(t)},dR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:mh,rotateZ:mh,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},gh=e=>(e=e%360,e<0&&(e+=360),e),sx=mh,ox=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ax=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ox,scaleY:ax,scale:e=>(ox(e)+ax(e))/2,rotateX:e=>gh(Pi(Math.atan2(e[6],e[5]))),rotateY:e=>gh(Pi(Math.atan2(-e[2],e[0]))),rotateZ:sx,rotate:sx,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 yh(e){return e.includes("scale")?1:0}function xh(e,t){if(!e||e==="none")return yh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=fR,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dR,i=a}if(!i)return yh(t);const s=r[t],o=i[1].split(",").map(pR);return typeof s=="function"?s(o):o[s]}const hR=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return xh(n,t)};function pR(e){return parseFloat(e.trim())}const no=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ro=new Set([...no,"pathRotation"]),lx=e=>e===to||e===Y,mR=new Set(["x","y","z"]),gR=no.filter(e=>!mR.has(e));function yR(e){const t=[];return gR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Br={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})=>xh(t,"x"),y:(e,{transform:t})=>xh(t,"y")};Br.translateX=Br.x;Br.translateY=Br.y;const Di=new Set;let vh=!1,wh=!1,bh=!1;function dk(){if(wh){const e=Array.from(Di).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=yR(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)})}wh=!1,vh=!1,Di.forEach(e=>e.complete(bh)),Di.clear()}function fk(){Di.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wh=!0)})}function xR(){bh=!0,fk(),dk(),bh=!1}class mm{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?(Di.add(this),vh||(vh=!0,ke.read(fk),ke.resolveKeyframes(dk))):(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])}uR(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Di.delete(this)}cancel(){this.state==="scheduled"&&(Di.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vR=e=>e.startsWith("--");function hk(e,t,n){vR(t)?e.style.setProperty(t,n):e.style[t]=n}const wR={};function pk(e,t){const n=$b(e);return()=>wR[t]??n()}const bR=pk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),mk=pk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Bo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,cx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bo([0,.65,.55,1]),circOut:Bo([.55,0,1,.45]),backIn:Bo([.31,.01,.66,-.59]),backOut:Bo([.33,1.53,.69,.99])};function gk(e,t){if(e)return typeof e=="function"?mk()?lk(e,t):"ease-out":Zb(e)?Bo(e):Array.isArray(e)?e.map(n=>gk(n,t)||cx.easeOut):cx[e]}function kR(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=gk(a,i);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function yk(e){return typeof e=="function"&&"applyToOptions"in e}function _R({type:e,...t}){return yk(e)&&mk()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class xk extends pm{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,sm(typeof t.type!="string");const c=_R(t);this.animation=kR(n,r,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=Cu(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),hk(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return cn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+cn(t)}get time(){return cn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wt(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&&bR()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),fn):i(this)}}const vk={anticipate:Qb,backInOut:Gb,circInOut:qb};function SR(e){return e in vk}function CR(e){typeof e.ease=="string"&&SR(e.ease)&&(e.ease=vk[e.ease])}const Ld=10;class PR extends xk{constructor(t){CR(t),uk(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 Hc({...o,autoplay:!1}),l=Math.max(Ld,mt.now()-this.startTime),c=Wn(0,Ld,l-Ld),u=a.sample(l).value,{name:d}=this.options;s&&d&&hk(s,d,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const ux=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Cn.test(e)||e==="0")&&!e.startsWith("url("));function ER(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 jR(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=ux(i,t),a=ux(s,t);return!o||!a?!1:ER(e)||(n==="spring"||yk(n))&&r}function kh(e){e.duration=0,e.type="keyframes"}const wk=new Set(["opacity","clipPath","filter","transform"]),TR=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function RR(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&TR.test(e[t]))return!0;return!1}const LR=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),MR=$b(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function IR(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return MR()&&n&&(wk.has(n)||LR.has(n)&&RR(a))&&(n!=="transform"||!u)&&!c&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const AR=40;class DR extends pm{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var m;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=mt.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:u,...d},p=(u==null?void 0:u.KeyframeResolver)||mm;this.keyframeResolver=new p(a,(y,w,g)=>this.onKeyframesResolved(y,w,h,!g),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,i){var g,x;this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=mt.now();let d=!0;jR(t,s,o,a)||(d=!1,(ei.instantAnimations||!l)&&(u==null||u(Cu(t,r,n))),t[0]=t[t.length-1],kh(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>AR?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=d&&!c&&IR(p),y=(x=(g=p.motionValue)==null?void 0:g.owner)==null?void 0:x.current;let w;if(m)try{w=new PR({...p,element:y})}catch{w=new Hc(p)}else w=new Hc(p);w.finished.then(()=>{this.notifyFinished()}).catch(fn),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),xR()),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 bk(e,t,n,r=0,i=1){const s=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}const dx=30,NR=e=>!isNaN(parseFloat(e));class FR{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=mt.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=mt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=NR(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 om);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=mt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>dx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,dx);return Vb(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 Gs(e,t){return new FR(e,t)}function kk(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function gm(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?kk(n,e):n}const zR={type:"spring",stiffness:500,damping:25,restSpeed:10},BR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),OR={type:"keyframes",duration:.8},$R={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},VR=(e,{keyframes:t})=>t.length>2?OR:ro.has(e)?e.startsWith("scale")?BR(t[1]):zR:$R,UR=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function WR(e){for(const t in e)if(!UR.has(t))return!0;return!1}const ym=(e,t,n,r={},i,s)=>o=>{const a=gm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Wt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};WR(a)||Object.assign(u,VR(e,u)),u.duration&&(u.duration=Wt(u.duration)),u.repeatDelay&&(u.repeatDelay=Wt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(kh(u),u.delay===0&&(d=!0)),(ei.instantAnimations||ei.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,kh(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=Cu(u.keyframes,a);if(h!==void 0){ke.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Hc(u):new DR(u)},HR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function KR(e){const t=HR.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function _k(e,t,n=1){const[r,i]=KR(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return zb(o)?parseFloat(o):o}return cm(i)?_k(i,t,n+1):i}function fx(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function xm(e,t,n,r){if(typeof t=="function"){const[i,s]=fx(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]=fx(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Ni(e,t,n){const r=e.getProps();return xm(r,t,n!==void 0?n:r.custom,e)}const Sk=new Set(["width","height","top","left","right","bottom",...no]),_h=e=>Array.isArray(e);function GR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gs(n))}function QR(e){return _h(e)?e[e.length-1]||0:e}function YR(e,t){const n=Ni(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=QR(s[o]);GR(e,o,a)}}const et=e=>!!(e&&e.getVelocity);function qR(e){return!!(et(e)&&e.add)}function Sh(e,t){const n=e.getValue("willChange");if(qR(n))return n.add(t);if(!n&&ei.WillChange){const r=new ei.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function vm(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const XR="framerAppearId",Ck="data-"+vm(XR);function Pk(e){return e.props[Ck]}function ZR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ek(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?kk(s,l):l;const c=s==null?void 0:s.reduceMotion,u=s==null?void 0:s.skipAnimations;r&&(s=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i],p=s==null?void 0:s.path;p&&p.animateVisualElement(e,a,s,n,d);for(const m in a){const y=e.getValue(m,e.latestValues[m]??null),w=a[m];if(w===void 0||h&&ZR(h,m))continue;const g={delay:n,...gm(s||{},m)};u&&(g.skipAnimations=!0);const x=y.get();if(x!==void 0&&!y.isAnimating()&&!Array.isArray(w)&&w===x&&!g.velocity){ke.update(()=>y.set(w));continue}let v=!1;if(window.MotionHandoffAnimation){const _=Pk(e);if(_){const E=window.MotionHandoffAnimation(_,m,ke);E!==null&&(g.startTime=E,v=!0)}}Sh(e,m);const b=c??e.shouldReduceMotion;y.start(ym(m,y,w,b&&Sk.has(m)?{type:!1}:g,e,v));const C=y.animation;C&&d.push(C)}if(o){const m=()=>ke.update(()=>{o&&YR(e,o)});d.length?Promise.all(d).then(m):m()}return d}function Ch(e,t,n={}){var l;const r=Ni(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(Ek(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return JR(e,t,c,u,d,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>u())}else return Promise.all([s(),o(n.delay)])}function JR(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(Ch(l,t,{...o,delay:n+(typeof r=="function"?0:r)+bk(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function eL(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Ch(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Ch(e,t,n);else{const i=typeof t=="function"?Ni(e,t,n.custom):t;r=Promise.all(Ek(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const tL={test:e=>e==="auto",parse:e=>e},jk=e=>t=>t.test(e),Tk=[to,Y,Un,Jn,E2,P2,tL],hx=e=>Tk.find(jk(e));function nL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ob(e):!0}const rL=new Set(["brightness","contrast","saturate","opacity"]);function iL(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(um)||[];if(!r)return e;const i=n.replace(r,"");let s=rL.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const sL=/\b([a-z-]*)\(.*?\)/gu,Ph={...Cn,getAnimatableNone:e=>{const t=e.match(sL);return t?t.map(iL).join(" "):e}},Eh={...Cn,getAnimatableNone:e=>{const t=Cn.parse(e);return Cn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},px={...to,transform:Math.round},oL={rotate:Jn,pathRotation:Jn,rotateX:Jn,rotateY:Jn,rotateZ:Jn,scale:pl,scaleX:pl,scaleY:pl,scaleZ:pl,skew:Jn,skewX:Jn,skewY:Jn,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:Ca,originX:ex,originY:ex,originZ:Y},Kc={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,inset:Y,insetBlock:Y,insetBlockStart:Y,insetBlockEnd:Y,insetInline:Y,insetInlineStart:Y,insetInlineEnd:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,paddingBlock:Y,paddingBlockStart:Y,paddingBlockEnd:Y,paddingInline:Y,paddingInlineStart:Y,paddingInlineEnd:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,marginBlock:Y,marginBlockStart:Y,marginBlockEnd:Y,marginInline:Y,marginInlineStart:Y,marginInlineEnd:Y,fontSize:Y,backgroundPositionX:Y,backgroundPositionY:Y,...oL,zIndex:px,fillOpacity:Ca,strokeOpacity:Ca,numOctaves:px},aL={...Kc,color:Ue,backgroundColor:Ue,outlineColor:Ue,fill:Ue,stroke:Ue,borderColor:Ue,borderTopColor:Ue,borderRightColor:Ue,borderBottomColor:Ue,borderLeftColor:Ue,filter:Ph,WebkitFilter:Ph,mask:Eh,WebkitMask:Eh},Rk=e=>aL[e],lL=new Set([Ph,Eh]);function Lk(e,t){let n=Rk(e);return lL.has(n)||(n=Cn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const cL=new Set(["auto","none","0"]);function uL(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!cL.has(s)&&Ks(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Lk(n,i)}class dL extends mm{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),cm(d))){const h=_k(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Sk.has(r)||t.length!==2)return;const[i,s]=t,o=hx(i),a=hx(s),l=Jy(i),c=Jy(s);if(l!==c&&Br[r]){this.needsMeasurement=!0;return}if(o!==a)if(lx(o)&&lx(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Br[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||nL(t[i]))&&r.push(i);r.length&&uL(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=Br[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]=Br[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Mk(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 jh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ql(e){return Bb(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:wm}=Jb(queueMicrotask,!1),vn={x:!1,y:!1};function Ik(){return vn.x||vn.y}function fL(e){return e==="x"||e==="y"?vn[e]?null:(vn[e]=!0,()=>{vn[e]=!1}):vn.x||vn.y?null:(vn.x=vn.y=!0,()=>{vn.x=vn.y=!1})}function Ak(e,t){const n=Mk(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function hL(e){return!(e.pointerType==="touch"||Ik())}function pL(e,t,n={}){const[r,i,s]=Ak(e,n);return r.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",m)},d=w=>{c&&(c(w),c=void 0),u()},h=w=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(w))},p=()=>{a=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},m=w=>{if(w.pointerType!=="touch"){if(a){l=!0;return}d(w)}},y=w=>{if(!hL(w))return;l=!1;const g=t(o,w);typeof g=="function"&&(c=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",p,i)}),s}const Dk=(e,t)=>t?e===t?!0:Dk(e,t.parentElement):!1,bm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,mL=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gL(e){return mL.has(e.tagName)||e.isContentEditable===!0}const yL=new Set(["INPUT","SELECT","TEXTAREA"]);function xL(e){return yL.has(e.tagName)||e.isContentEditable===!0}const Xl=new WeakSet;function mx(e){return t=>{t.key==="Enter"&&e(t)}}function Md(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vL=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=mx(()=>{if(Xl.has(n))return;Md(n,"down");const i=mx(()=>{Md(n,"up")}),s=()=>Md(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 gx(e){return bm(e)&&!Ik()}const yx=new WeakSet;function wL(e,t,n={}){const[r,i,s]=Ak(e,n),o=a=>{const l=a.currentTarget;if(!gx(a)||yx.has(a))return;Xl.add(l),n.stopPropagation&&yx.add(a);const c=t(l,a),u=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Xl.has(l)&&Xl.delete(l),gx(p)&&typeof c=="function"&&c(p,{success:m})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||Dk(l,p.target))},h=p=>{u(p,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ql(a)&&(a.addEventListener("focus",c=>vL(c,i)),!gL(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function km(e){return Bb(e)&&"ownerSVGElement"in e}const Zl=new WeakMap;let Er;const Nk=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:km(r)&&"getBBox"in r?r.getBBox()[t]:r[n],bL=Nk("inline","width","offsetWidth"),kL=Nk("block","height","offsetHeight");function _L({target:e,borderBoxSize:t}){var n;(n=Zl.get(e))==null||n.forEach(r=>{r(e,{get width(){return bL(e,t)},get height(){return kL(e,t)}})})}function SL(e){e.forEach(_L)}function CL(){typeof ResizeObserver>"u"||(Er=new ResizeObserver(SL))}function PL(e,t){Er||CL();const n=Mk(e);return n.forEach(r=>{let i=Zl.get(r);i||(i=new Set,Zl.set(r,i)),i.add(t),Er==null||Er.observe(r)}),()=>{n.forEach(r=>{const i=Zl.get(r);i==null||i.delete(t),i!=null&&i.size||Er==null||Er.unobserve(r)})}}const Jl=new Set;let bs;function EL(){bs=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Jl.forEach(t=>t(e))},window.addEventListener("resize",bs)}function jL(e){return Jl.add(e),bs||EL(),()=>{Jl.delete(e),!Jl.size&&typeof bs=="function"&&(window.removeEventListener("resize",bs),bs=void 0)}}function xx(e,t){return typeof e=="function"?jL(e):PL(e,t)}function TL(e){return km(e)&&e.tagName==="svg"}const RL=[...Tk,Ue,Cn],LL=e=>RL.find(jk(e)),vx=()=>({translate:0,scale:1,origin:0,originPoint:0}),ks=()=>({x:vx(),y:vx()}),wx=()=>({min:0,max:0}),Ke=()=>({x:wx(),y:wx()}),ML=new WeakMap;function Pu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Pa(e){return typeof e=="string"||Array.isArray(e)}const _m=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sm=["initial",..._m];function Eu(e){return Pu(e.animate)||Sm.some(t=>Pa(e[t]))}function Fk(e){return!!(Eu(e)||e.variants)}function IL(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,Gs(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,Gs(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Gc={current:null},Cm={current:!1},AL=typeof window<"u";function zk(){if(Cm.current=!0,!!AL)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gc.current=e.matches;e.addEventListener("change",t),t()}else Gc.current=!1}const bx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Qc={};function Bk(e){Qc=e}function DL(){return Qc}class NL{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=mm,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=mt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ke.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Eu(n),this.isVariantNode=Fk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const m=h[p];c[p]!==void 0&&et(m)&&m.set(c[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,ML.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:(Cm.current||zk(),this.shouldReduceMotion=Gc.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(),ti(this.notifyUpdate),ti(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&&wk.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new xk({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:Wt(u)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=ro.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Qc){const n=Qc[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ke()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<bx.length;r++){const i=bx[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=IL(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=Gs(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"&&(zb(r)||Ob(r))?r=parseFloat(r):!LL(r)&&Cn.test(n)&&(r=Lk(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=xm(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 om),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){wm.render(this.render)}}class Ok extends NL{constructor(){super(...arguments),this.KeyframeResolver=dL}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 si{constructor(t){this.isMounted=!1,this.node=t}update(){}}function $k({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function FL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zL(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 Id(e){return e===void 0||e===1}function Th({scale:e,scaleX:t,scaleY:n}){return!Id(e)||!Id(t)||!Id(n)}function xi(e){return Th(e)||Vk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Vk(e){return kx(e.x)||kx(e.y)}function kx(e){return e&&e!=="0%"}function Yc(e,t,n){const r=e-n,i=t*r;return n+i}function _x(e,t,n,r,i){return i!==void 0&&(e=Yc(e,i,r)),Yc(e,n,r)+t}function Rh(e,t=0,n=1,r,i){e.min=_x(e.min,t,n,r,i),e.max=_x(e.max,t,n,r,i)}function Uk(e,{x:t,y:n}){Rh(e.x,t.translate,t.scale,t.originPoint),Rh(e.y,n.translate,n.scale,n.originPoint)}const Sx=.999999999999,Cx=1.0000000000001;function BL(e,t,n,r=!1){var a;const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;l<i;l++){s=n[l],o=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(zn(e.x,-s.scroll.offset.x),zn(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Uk(e,o)),r&&xi(s.latestValues)&&ec(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<Cx&&t.x>Sx&&(t.x=1),t.y<Cx&&t.y>Sx&&(t.y=1)}function zn(e,t){e.min+=t,e.max+=t}function Px(e,t,n,r,i=.5){const s=be(e.min,e.max,i);Rh(e,t,n,s,r)}function Ex(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ec(e,t,n){const r=n??e;Px(e.x,Ex(t.x,r.x),t.scaleX,t.scale,t.originX),Px(e.y,Ex(t.y,r.y),t.scaleY,t.scale,t.originY)}function Wk(e,t){return $k(zL(e.getBoundingClientRect(),t))}function OL(e,t,n){const r=Wk(e,n),{scroll:i}=t;return i&&(zn(r.x,i.offset.x),zn(r.y,i.offset.y)),r}const $L={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},VL=no.length;function UL(e,t,n){let r="",i=!0;for(let o=0;o<VL;o++){const a=no[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(a.startsWith("scale")?1:0);else{const u=parseFloat(l);c=a.startsWith("scale")?u===1:u===0}if(!c||n){const u=jh(l,Kc[a]);if(!c){i=!1;const d=$L[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${jh(s,Kc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Pm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(ro.has(l)){o=!0;continue}else if(tk(l)){i[l]=c;continue}else{const u=jh(c,Kc[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=UL(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}function Hk(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 jx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const To={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=jx(e,t.target.x),r=jx(e,t.target.y);return`${n}% ${r}%`}},WL={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Cn.parse(e);if(i.length>5)return r;const s=Cn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}},Lh={borderRadius:{...To,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:To,borderTopRightRadius:To,borderBottomLeftRadius:To,borderBottomRightRadius:To,boxShadow:WL};function Kk(e,{layout:t,layoutId:n}){return ro.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Lh[e]||e==="opacity")}function Em(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])||Kk(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function HL(e){return window.getComputedStyle(e)}class KL extends Ok{constructor(){super(...arguments),this.type="html",this.renderInstance=Hk}readValueFromInstance(t,n){var r;if(ro.has(n))return(r=this.projection)!=null&&r.isProjecting?yh(n):hR(t,n);{const i=HL(t),s=(tk(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Wk(t,n)}build(t,n,r){Pm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Em(t,n,r)}}const GL={offset:"stroke-dashoffset",array:"stroke-dasharray"},QL={offset:"strokeDashoffset",array:"strokeDasharray"};function YL(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?GL:QL;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const qL=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Gk(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,c,u){if(Pm(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const p of qL)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&&YL(d,i,s,o,!1)}const Qk=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"]),Yk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function XL(e,t,n,r){Hk(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Qk.has(i)?i:vm(i),t.attrs[i])}function qk(e,t,n){const r=Em(e,t,n);for(const i in e)if(et(e[i])||et(t[i])){const s=no.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class ZL extends Ok{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ke}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ro.has(n)){const r=Rk(n);return r&&r.default||0}return n=Qk.has(n)?n:vm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return qk(t,n,r)}build(t,n,r){Gk(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){XL(t,n,r,i)}mount(t){this.isSVGTag=Yk(t.tagName),super.mount(t)}}const JL=Sm.length;function Xk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Xk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<JL;n++){const r=Sm[n],i=e.props[r];(Pa(i)||i===!1)&&(t[r]=i)}return t}function Zk(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 eM=[..._m].reverse(),tM=_m.length;function nM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>eL(e,n,r)))}function rM(e){let t=nM(e),n=Tx(),r=!0,i=!1;const s=c=>(u,d)=>{var p;const h=Ni(e,d,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:m,transitionEnd:y,...w}=h;u={...u,...w,...y}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=Xk(e.parent)||{},h=[],p=new Set;let m={},y=1/0;for(let g=0;g<tM;g++){const x=eM[g],v=n[x],b=u[x]!==void 0?u[x]:d[x],C=Pa(b),_=x===c?v.isActive:null;_===!1&&(y=g);let E=b===d[x]&&b!==u[x]&&C;if(E&&(r||i)&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...m},!v.isActive&&_===null||!b&&!v.prevProp||Pu(b)||typeof b=="boolean")continue;if(x==="exit"&&v.isActive&&_!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const j=iM(v.prevProp,b);let L=j||x===c&&v.isActive&&!E&&C||g>y&&C,P=!1;const R=Array.isArray(b)?b:[b];let M=R.reduce(s(x),{});_===!1&&(M={});const{prevResolvedValues:F={}}=v,z={...F,...M},N=D=>{L=!0,p.has(D)&&(P=!0,p.delete(D)),v.needsAnimating[D]=!0;const W=e.getValue(D);W&&(W.liveStyle=!1)};for(const D in z){const W=M[D],k=F[D];if(m.hasOwnProperty(D))continue;let O=!1;_h(W)&&_h(k)?O=!Zk(W,k)||j:O=W!==k,O?W!=null?N(D):p.add(D):W!==void 0&&p.has(D)?N(D):v.protectedKeys[D]=!0}v.prevProp=b,v.prevResolvedValues=M,v.isActive&&(m={...m,...M}),(r||i)&&e.blockInitialAnimation&&(L=!1);const H=E&&j;L&&(!H||P)&&h.push(...R.map(D=>{const W={type:x};if(typeof D=="string"&&(r||i)&&!H&&e.manuallyAnimateOnMount&&e.parent){const{parent:k}=e,O=Ni(k,D);if(k.enteringChildren&&O){const{delayChildren:q}=O.transition||{};W.delay=bk(k.enteringChildren,e,q)}}return{animation:D,options:W}}))}if(p.size){const g={};if(typeof u.initial!="boolean"){const x=Ni(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(g.transition=x.transition)}p.forEach(x=>{const v=e.getBaseTarget(x),b=e.getValue(x);b&&(b.liveStyle=!0),g[x]=v??null}),h.push({animation:g})}let w=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,i=!1,w?t(h):Promise.resolve()}function l(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Tx(),i=!0}}}function iM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Zk(t,e):!1}function di(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tx(){return{animate:di(!0),whileInView:di(),whileHover:di(),whileTap:di(),whileDrag:di(),whileFocus:di(),exit:di()}}function Mh(e,t){e.min=t.min,e.max=t.max}function yn(e,t){Mh(e.x,t.x),Mh(e.y,t.y)}function Rx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Jk=1e-4,sM=1-Jk,oM=1+Jk,e_=.01,aM=0-e_,lM=0+e_;function gt(e){return e.max-e.min}function cM(e,t,n){return Math.abs(e-t)<=n}function Lx(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=gt(n)/gt(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=sM&&e.scale<=oM||isNaN(e.scale))&&(e.scale=1),(e.translate>=aM&&e.translate<=lM||isNaN(e.translate))&&(e.translate=0)}function Zo(e,t,n,r){Lx(e.x,t.x,n.x,r?r.originX:void 0),Lx(e.y,t.y,n.y,r?r.originY:void 0)}function Mx(e,t,n,r=0){const i=r?be(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+gt(t)}function uM(e,t,n,r){Mx(e.x,t.x,n.x,r==null?void 0:r.x),Mx(e.y,t.y,n.y,r==null?void 0:r.y)}function Ix(e,t,n,r=0){const i=r?be(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+gt(t)}function qc(e,t,n,r){Ix(e.x,t.x,n.x,r==null?void 0:r.x),Ix(e.y,t.y,n.y,r==null?void 0:r.y)}function Ax(e,t,n,r,i){return e-=t,e=Yc(e,1/n,r),i!==void 0&&(e=Yc(e,1/i,r)),e}function dM(e,t=0,n=1,r=.5,i,s=e,o=e){if(Un.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=Ax(e.min,t,n,a,i),e.max=Ax(e.max,t,n,a,i)}function Dx(e,t,[n,r,i],s,o){dM(e,t[n],t[r],t[i],t.scale,s,o)}const fM=["x","scaleX","originX"],hM=["y","scaleY","originY"];function Nx(e,t,n,r){Dx(e.x,t,fM,n?n.x:void 0,r?r.x:void 0),Dx(e.y,t,hM,n?n.y:void 0,r?r.y:void 0)}function Fx(e){return e.translate===0&&e.scale===1}function t_(e){return Fx(e.x)&&Fx(e.y)}function zx(e,t){return e.min===t.min&&e.max===t.max}function pM(e,t){return zx(e.x,t.x)&&zx(e.y,t.y)}function Bx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function n_(e,t){return Bx(e.x,t.x)&&Bx(e.y,t.y)}function Ox(e){return gt(e.x)/gt(e.y)}function $x(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Dn(e){return[e("x"),e("y")]}function mM(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,pathRotation:d,rotateX:h,rotateY:p,skewX:m,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const r_=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],gM=r_.length,Vx=e=>typeof e=="string"?parseFloat(e):e,Ux=e=>typeof e=="number"||Y.test(e);function yM(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,xM(r)),e.opacityExit=be(t.opacity??1,0,vM(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<gM;o++){const a=r_[o];let l=Wx(t,a),c=Wx(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ux(l)===Ux(c)?(e[a]=Math.max(be(Vx(l),Vx(c),r),0),(Un.test(c)||Un.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function Wx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xM=i_(0,.5,Yb),vM=i_(.5,.95,fn);function i_(e,t,n){return r=>r<e?0:r>t?1:n(Sa(e,t,r))}function wM(e,t,n){const r=et(e)?e:Gs(e);return r.start(ym("",r,t,n)),r.animation}function Ea(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const bM=(e,t)=>e.depth-t.depth;class kM{constructor(){this.children=[],this.isDirty=!1}add(t){im(this.children,t),this.isDirty=!0}remove(t){$c(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(bM),this.isDirty=!1,this.children.forEach(t)}}function _M(e,t){const n=mt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ti(r),e(s-t))};return ke.setup(r,!0),()=>ti(r)}function tc(e){return et(e)?e.get():e}class SM{constructor(){this.members=[]}add(t){im(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&&($c(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if($c(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 nc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ad=["","X","Y","Z"],CM=1e3;let PM=0;function Dd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function s_(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",ke,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&s_(r)}function o_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=PM++,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(TM),this.nodes.forEach(DM),this.nodes.forEach(NM),this.nodes.forEach(RM)},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 kM)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new om),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=km(o)&&!TL(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const h=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{d=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=_M(h,250),nc.hasAnimatedSinceResize&&(nc.hasAnimatedSinceResize=!1,this.nodes.forEach(Gx)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||$M,{onLayoutAnimationStart:y,onLayoutAnimationComplete:w}=c.getProps(),g=!this.targetLayout||!n_(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={...gm(m,"layout"),onPlay:y,onComplete:w};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,x,v.path)}else d||Gx(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(),ti(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(FM),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&&s_(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(MM),this.nodes.forEach(Hx);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Kx);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(IM),this.nodes.forEach(AM),this.nodes.forEach(EM),this.nodes.forEach(jM)):this.nodes.forEach(Kx),this.clearAllSnapshots();const a=mt.now();Je.delta=Wn(0,1e3/60,a-Je.timestamp),Je.timestamp=a,Je.isProcessing=!0,Pd.update.process(Je),Pd.preRender.process(Je),Pd.render.process(Je),Je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(LM),this.sharedNodes.forEach(zM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!gt(this.snapshot.measuredBox.x)&&!gt(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=Ke()),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&&!t_(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||xi(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),VM(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ke();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(UM))){const{scroll:u}=this.root;u&&(zn(a.x,u.offset.x),zn(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Ke();if(yn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&yn(a,o),zn(a.x,d.offset.x),zn(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var u,d;const c=l||Ke();yn(c,o);for(let h=0;h<this.path.length;h++){const p=this.path[h];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(zn(c.x,-p.scroll.offset.x),zn(c.y,-p.scroll.offset.y)),xi(p.latestValues)&&ec(c,p.latestValues,(u=p.layout)==null?void 0:u.layoutBox)}return xi(this.latestValues)&&ec(c,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),c}removeTransform(o){var l;const a=Ke();yn(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!xi(u.latestValues))continue;let d;u.instance&&(Th(u.latestValues)&&u.updateSnapshot(),d=Ke(),yn(d,u.measurePageBox())),Nx(a,u.latestValues,(l=u.snapshot)==null?void 0:l.layoutBox,d)}return xi(this.latestValues)&&Nx(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:u,layoutId:d}=this.options;if(!this.layout||!(u||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=Ke(),this.targetWithTransforms=Ke()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uM(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):yn(this.target,this.layout.layoutBox),Uk(this.target,this.targetDelta)):yn(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)||Vk(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=Ke(),this.relativeTargetOrigin=Ke(),qc(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),yn(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:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;yn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;BL(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ke());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Rx(this.prevProjectionDelta.x,this.projectionDelta.x),Rx(this.prevProjectionDelta.y,this.projectionDelta.y)),Zo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!$x(this.projectionDelta.x,this.prevProjectionDelta.x)||!$x(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=ks(),this.projectionDelta=ks(),this.projectionDeltaWithTransform=ks()}setAnimationOrigin(o,a=!1,l){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=ks();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Ke(),m=c?c.source:void 0,y=this.layout?this.layout.source:void 0,w=m!==y,g=this.getStack(),x=!g||g.members.length<=1,v=!!(w&&!x&&this.options.crossfade===!0&&!this.path.some(OM));this.animationProgress=0;let b;const C=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=_=>{const E=_/1e3,j=C==null?void 0:C(E);j?(h.x.translate=j.x,h.x.scale=be(o.x.scale,1,E),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=j.y,h.y.scale=be(o.y.scale,1,E),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(Qx(h.x,o.x,E),Qx(h.y,o.y,E)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),BM(this.relativeTarget,this.relativeTargetOrigin,p,E),b&&pM(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Ke()),yn(b,this.relativeTarget)),w&&(this.animationValues=d,yM(d,u,this.latestValues,E,v,x)),j&&j.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=j.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(ti(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{nc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gs(0)),this.motionValue.jump(0,!1),this.currentAnimation=wM(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(CM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&a_(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ke();const d=gt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=gt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}yn(a,l),ec(a,u),Zo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new SM),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Dd("z",o,c,this.animationValues);for(let u=0;u<Ad.length;u++)Dd(`rotate${Ad[u]}`,o,c,this.animationValues),Dd(`skew${Ad[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=tc(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=tc(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!xi(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=mM(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Lh){if(u[m]===void 0)continue;const{correct:y,applyTo:w,isCSSVariable:g}=Lh[m],x=d==="none"?u[m]:y(u[m],c);if(w){const v=w.length;for(let b=0;b<v;b++)o[w[b]]=x}else g?this.options.visualElement.renderState.vars[m]=x:o[m]=x}this.options.layoutId&&(o.pointerEvents=c===this?tc(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(Hx),this.root.sharedNodes.clear()}}}function EM(e){e.updateLayout()}function jM(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")Dn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=gt(h);h.min=r[d].min,h.max=h.min+p});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";Mh(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else a_(s,t.layoutBox,r)&&Dn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=gt(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=ks();Zo(a,r,t.layoutBox);const l=ks();o?Zo(l,e.applyTransform(i,!0),t.measuredBox):Zo(l,r,t.layoutBox);const c=!t_(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const m=e.options.layoutAnchor||void 0,y=Ke();qc(y,t.layoutBox,h.layoutBox,m);const w=Ke();qc(w,r,p.layoutBox,m),n_(y,w)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function TM(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 RM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function LM(e){e.clearSnapshot()}function Hx(e){e.clearMeasurements()}function MM(e){e.isLayoutDirty=!0,e.updateLayout()}function Kx(e){e.isLayoutDirty=!1}function IM(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function AM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function DM(e){e.resolveTargetDelta()}function NM(e){e.calcProjection()}function FM(e){e.resetSkewAndRotation()}function zM(e){e.removeLeadSnapshot()}function Qx(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Yx(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function BM(e,t,n,r){Yx(e.x,t.x,n.x,r),Yx(e.y,t.y,n.y,r)}function OM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $M={duration:.45,ease:[.4,0,.1,1]},qx=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xx=qx("applewebkit/")&&!qx("chrome/")?Math.round:fn;function Zx(e){e.min=Xx(e.min),e.max=Xx(e.max)}function VM(e){Zx(e.x),Zx(e.y)}function a_(e,t,n){return e==="position"||e==="preserve-aspect"&&!cM(Ox(t),Ox(n),.2)}function UM(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const WM=o_({attachResizeListener:(e,t)=>Ea(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Nd={current:void 0},l_=o_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Nd.current){const e=new WM({});e.mount(window),e.setOptions({layoutScroll:!0}),Nd.current=e}return Nd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),jm=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Jx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function HM(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Jx(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():Jx(e[i],null)}}}}function KM(...e){return S.useCallback(HM(...e),e)}class GM extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(ql(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=ql(r)&&r.offsetWidth||0,s=ql(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 QM({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){var h;const o=S.useId(),a=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=S.useContext(jm),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=KM(a,u);return S.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",C=n==="left"?b?`right: ${g}`:`left: ${w}`:b?`left: ${w}`:`right: ${g}`,_=r==="bottom"?`bottom: ${x}`:`top: ${y}`;a.current.dataset.motionPopId=o;const E=document.createElement("style");c&&(E.nonce=c);const j=i??document.head;return j.appendChild(E),E.sheet&&E.sheet.insertRule(`
57
+ [data-motion-pop-id="${o}"] {
58
+ position: absolute !important;
59
+ width: ${p}px !important;
60
+ height: ${m}px !important;
61
+ ${C}px !important;
62
+ ${_}px !important;
63
+ }
64
+ `),()=>{var L;(L=a.current)==null||L.removeAttribute("data-motion-pop-id"),j.contains(E)&&j.removeChild(E)}},[t]),f.jsx(GM,{isPresent:t,childRef:a,sizeRef:l,pop:s,children:s===!1?e:S.cloneElement(e,{ref:d})})}const YM=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:c})=>{const u=rm(qM),d=S.useId();let h=!0,p=S.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:m=>{u.set(m,!0);for(const y of u.values())if(!y)return;r&&r()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,r]);return s&&h&&(p={...p}),S.useMemo(()=>{u.forEach((m,y)=>u.set(y,!1))},[n]),S.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=f.jsx(QM,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),f.jsx(Su.Provider,{value:p,children:e})};function qM(){return new Map}function c_(e=!0){const t=S.useContext(Su);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=S.useId();S.useEffect(()=>{if(e)return i(s)},[e]);const o=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ml=e=>e.key||"";function e0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const ju=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=c_(o),h=S.useMemo(()=>e0(e),[e]),p=o&&!u?[]:h.map(ml),m=S.useRef(!0),y=S.useRef(h),w=rm(()=>new Map),g=S.useRef(new Set),[x,v]=S.useState(h),[b,C]=S.useState(h);Fb(()=>{m.current=!1,y.current=h;for(let j=0;j<b.length;j++){const L=ml(b[j]);p.includes(L)?(w.delete(L),g.current.delete(L)):w.get(L)!==!0&&w.set(L,!1)}},[b,p.length,p.join("-")]);const _=[];if(h!==x){let j=[...h];for(let L=0;L<b.length;L++){const P=b[L],R=ml(P);p.includes(R)||(j.splice(L,0,P),_.push(P))}return s==="wait"&&_.length&&(j=_),C(e0(j)),v(h),null}const{forceRender:E}=S.useContext(nm);return f.jsx(f.Fragment,{children:b.map(j=>{const L=ml(j),P=o&&!u?!1:h===b||p.includes(L),R=()=>{if(g.current.has(L))return;if(w.has(L))g.current.add(L),w.set(L,!0);else return;let M=!0;w.forEach(F=>{F||(M=!1)}),M&&(E==null||E(),C(y.current),o&&(d==null||d()),r&&r())};return f.jsx(YM,{isPresent:P,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:c,onExitComplete:P?void 0:R,anchorX:a,anchorY:l,children:j},L)})})},u_=S.createContext({strict:!1}),t0={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 n0=!1;function XM(){if(n0)return;const e={};for(const t in t0)e[t]={isEnabled:n=>t0[t].some(r=>!!n[r])};Bk(e),n0=!0}function d_(){return XM(),DL()}function ZM(e){const t=d_();for(const n in e)t[n]={...t[n],...e[n]};Bk(t)}const JM=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 Xc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||JM.has(e)}let f_=e=>!Xc(e);function eI(e){typeof e=="function"&&(f_=t=>t.startsWith("on")?!Xc(t):e(t))}try{eI(require("@emotion/is-prop-valid").default)}catch{}function tI(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||et(e[i])||(f_(i)||n===!0&&Xc(i)||!t&&!Xc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Tu=S.createContext({});function nI(e,t){if(Eu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Pa(n)?n:void 0,animate:Pa(r)?r:void 0}}return e.inherit!==!1?t:{}}function rI(e){const{initial:t,animate:n}=nI(e,S.useContext(Tu));return S.useMemo(()=>({initial:t,animate:n}),[r0(t),r0(n)])}function r0(e){return Array.isArray(e)?e.join(" "):e}const Tm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function h_(e,t,n){for(const r in t)!et(t[r])&&!Kk(r,n)&&(e[r]=t[r])}function iI({transformTemplate:e},t){return S.useMemo(()=>{const n=Tm();return Pm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function sI(e,t){const n=e.style||{},r={};return h_(r,n,e),Object.assign(r,iI(e,t)),r}function oI(e,t){const n={},r=sI(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 p_=()=>({...Tm(),attrs:{}});function aI(e,t,n,r){const i=S.useMemo(()=>{const s=p_();return Gk(s,t,Yk(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};h_(s,e.style,e),i.style={...s,...i.style}}return i}const lI=["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 Rm(e){return typeof e!="string"||e.includes("-")?!1:!!(lI.indexOf(e)>-1||/[A-Z]/u.test(e))}function cI(e,t,n,{latestValues:r},i,s=!1,o){const l=(o??Rm(e)?aI:oI)(t,r,i,e),c=tI(t,typeof e=="string",s),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,h=S.useMemo(()=>et(d)?d.get():d,[d]);return S.createElement(e,{...u,children:h})}function uI({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:dI(n,r,i,e),renderState:t()}}function dI(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=tc(s[h]);let{initial:o,animate:a}=e;const l=Eu(e),c=Fk(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Pu(d)){const h=Array.isArray(d)?d:[d];for(let p=0;p<h.length;p++){const m=xm(e,h[p]);if(m){const{transitionEnd:y,transition:w,...g}=m;for(const x in g){let v=g[x];if(Array.isArray(v)){const b=u?v.length-1:0;v=v[b]}v!==null&&(i[x]=v)}for(const x in y)i[x]=y[x]}}}return i}const m_=e=>(t,n)=>{const r=S.useContext(Tu),i=S.useContext(Su),s=()=>uI(e,t,r,i);return n?s():rm(s)},fI=m_({scrapeMotionValuesFromProps:Em,createRenderState:Tm}),hI=m_({scrapeMotionValuesFromProps:qk,createRenderState:p_}),pI=Symbol.for("motionComponentSymbol");function mI(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const i=S.useRef(null);return S.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 g_=S.createContext({});function as(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gI(e,t,n,r,i,s){var v,b;const{visualElement:o}=S.useContext(Tu),a=S.useContext(u_),l=S.useContext(Su),c=S.useContext(jm),u=c.reducedMotion,d=c.skipAnimations,h=S.useRef(null),p=S.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:s}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,y=S.useContext(g_);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&yI(h.current,n,i,y);const w=S.useRef(!1);S.useInsertionEffect(()=>{m&&w.current&&m.update(n,l)});const g=n[Ck],x=S.useRef(!!g&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,g)));return Fb(()=>{p.current=!0,m&&(w.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),S.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,g)}),x.current=!1),m.enteringChildren=void 0)}),m}function yI(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:y_(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&as(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function y_(e){if(e)return e.options.allowProjection!==!1?e.projection:y_(e.parent)}function Fd(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&ZM(r);const s=n?n==="svg":Rm(e),o=s?hI:fI;function a(c,u){let d;const h={...S.useContext(jm),...c,layoutId:xI(c)},{isStatic:p}=h,m=rI(c),y=o(c,p);if(!p&&typeof window<"u"){vI();const w=wI(h);d=w.MeasureLayout,m.visualElement=gI(e,y,h,i,w.ProjectionNode,s)}return f.jsxs(Tu.Provider,{value:m,children:[d&&m.visualElement?f.jsx(d,{visualElement:m.visualElement,...h}):null,cI(e,c,mI(y,m.visualElement,u),y,p,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(a);return l[pI]=e,l}function xI({layoutId:e}){const t=S.useContext(nm).id;return t&&e!==void 0?t+"-"+e:e}function vI(e,t){S.useContext(u_).strict}function wI(e){const t=d_(),{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 bI(e,t){if(typeof Proxy>"u")return Fd;const n=new Map,r=(s,o)=>Fd(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,Fd(o,void 0,e,t)),n.get(o))})}const kI=(e,t)=>t.isSVG??Rm(e)?new ZL(t):new KL(t,{allowProjection:e!==S.Fragment});class _I extends si{constructor(t){super(t),t.animationState||(t.animationState=rM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Pu(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 SI=0;class CI extends si{constructor(){super(...arguments),this.id=SI++,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=Ni(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...d}=l;for(const h in d)(s=this.node.getValue(h))==null||s.jump(d[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const PI={animation:{Feature:_I},exit:{Feature:CI}};function Ba(e){return{point:{x:e.pageX,y:e.pageY}}}const EI=e=>t=>bm(t)&&e(t,Ba(t));function Jo(e,t,n,r){return Ea(e,t,EI(n),r)}const x_=({current:e})=>e?e.ownerDocument.defaultView:null,i0=(e,t)=>Math.abs(e-t);function jI(e,t){const n=i0(e.x,t.x),r=i0(e.y,t.y);return Math.sqrt(n**2+r**2)}const s0=new Set(["auto","scroll"]);class v_{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=gl(this.lastRawMoveEventInfo,this.transformPagePoint));const p=zd(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=jI(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=gl(m,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:y,onSessionEnd:w,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=zd(p.type==="pointercancel"?this.lastMoveEventInfo:gl(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,x),w&&w(p,x)},!bm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=Ba(t),c=gl(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Je;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,zd(c,this.history)),this.removeListeners=Na(Jo(this.contextWindow,"pointermove",this.handlePointerMove),Jo(this.contextWindow,"pointerup",this.handlePointerUp),Jo(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(s0.has(r.overflowX)||s0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-n.x,y:i.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),ke.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ti(this.updatePoint)}}function gl(e,t){return t?{point:t(e.point)}:e}function o0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zd({point:e},t){return{point:e,delta:o0(e,w_(t)),offset:o0(e,TI(t)),velocity:RI(t,.1)}}function TI(e){return e[0]}function w_(e){return e[e.length-1]}function RI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=w_(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Wt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Wt(t)*2&&(r=e[1]);const s=cn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function LI(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function a0(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 MI(e,{top:t,left:n,bottom:r,right:i}){return{x:a0(e.x,n,i),y:a0(e.y,t,r)}}function l0(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 II(e,t){return{x:l0(e.x,t.x),y:l0(e.y,t.y)}}function AI(e,t){let n=.5;const r=gt(e),i=gt(t);return i>r?n=Sa(t.min,t.max-r,e.min):r>i&&(n=Sa(e.min,e.max-i,t.min)),Wn(0,1,n)}function DI(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 Ih=.35;function NI(e=Ih){return e===!1?e=0:e===!0&&(e=Ih),{x:c0(e,"left","right"),y:c0(e,"top","bottom")}}function c0(e,t,n){return{min:u0(e,t),max:u0(e,n)}}function u0(e,t){return typeof e=="number"?e:e[t]||0}const FI=new WeakMap;class zI{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ke(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{n&&this.snapToCursor(Ba(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=fL(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),Dn(g=>{let x=this.getAxisMotionValue(g).get()||0;if(Un.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[g];b&&(x=gt(b)*(parseFloat(x)/100))}}this.originPoint[g]=x}),y&&ke.update(()=>y(d,h),!1,!0),Sh(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=OI(g),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,g),this.updateAxis("y",h.point,g),this.visualElement.render(),w&&ke.update(()=>w(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new v_(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:x_(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ke.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!yl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=LI(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&&as(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=MI(r.layoutBox,t):this.constraints=!1,this.elastic=NI(n),i!==this.constraints&&!as(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Dn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=DI(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!as(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=OL(r,i.root,this.visualElement.getTransformPagePoint());let o=II(i.layout.layoutBox,s);if(n){const a=n(FL(o));this.hasMutatedConstraints=!!a,a&&(o=$k(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Dn(u=>{if(!yl(u,n,this.currentDirection))return;let d=l&&l[u]||{};(o===!0||o===u)&&(d={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Sh(this.visualElement,t),r.start(ym(t,r,0,n,this.visualElement,!1))}stopAnimation(){Dn(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){Dn(n=>{const{drag:r}=this.getProps();if(!yl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-be(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!as(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Dn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=AI({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(),Dn(o=>{if(!yl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(be(l,c,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;FI.set(this.visualElement,this);const t=this.visualElement.current,n=Jo(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),h=c.target,p=h!==t&&xL(h);u&&d&&!p&&this.start(c)});let r;const i=()=>{const{dragConstraints:c}=this.getProps();as(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=BI(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ke.read(i);const a=Ea(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Dn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Ih,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function d0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function BI(e,t,n){const r=xx(e,d0(n)),i=xx(t,d0(n));return()=>{r(),i()}}function yl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function OI(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $I extends si{constructor(t){super(t),this.removeGroupControls=fn,this.removeListeners=fn,this.controls=new zI(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Bd=e=>(t,n)=>{e&&ke.update(()=>e(t,n),!1,!0)};class VI extends si{constructor(){super(...arguments),this.removePointerDownListener=fn}onPointerDown(t){this.session=new v_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:x_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Bd(t),onStart:Bd(n),onMove:Bd(r),onEnd:(s,o)=>{delete this.session,i&&ke.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Jo(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 Od=!1;class UI extends S.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),Od&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),nc.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}),Od=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ke.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),wm.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Od=!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 b_(e){const[t,n]=c_(),r=S.useContext(nm);return f.jsx(UI,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(g_),isPresent:t,safeToRemove:n})}const WI={pan:{Feature:VI},drag:{Feature:$I,ProjectionNode:l_,MeasureLayout:b_}};function f0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ke.postRender(()=>s(t,Ba(t)))}class HI extends si{mount(){const{current:t}=this.node;t&&(this.unmount=pL(t,(n,r)=>(f0(this.node,r,"Start"),i=>f0(this.node,i,"End"))))}unmount(){}}class KI extends si{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=Na(Ea(this.node.current,"focus",()=>this.onFocus()),Ea(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function h0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ke.postRender(()=>s(t,Ba(t)))}class GI extends si{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=wL(t,(i,s)=>(h0(this.node,s,"Start"),(o,{success:a})=>h0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Ah=new WeakMap,$d=new WeakMap,QI=e=>{const t=Ah.get(e.target);t&&t(e)},YI=e=>{e.forEach(QI)};function qI({root:e,...t}){const n=e||document;$d.has(n)||$d.set(n,{});const r=$d.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(YI,{root:e,...t})),r[i]}function XI(e,t,n){const r=qI(t);return Ah.set(e,n),r.observe(e),()=>{Ah.delete(e),r.unobserve(e)}}const ZI={some:0,all:1};class JI extends si{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:ZI[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=u?d:h;p&&p(c)};this.stopObserver=XI(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(eA(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function eA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tA={inView:{Feature:JI},tap:{Feature:GI},focus:{Feature:KI},hover:{Feature:HI}},nA={layout:{ProjectionNode:l_,MeasureLayout:b_}},rA={...PI,...tA,...WI,...nA},Qs=bI(rA,kI);function Ru(){!Cm.current&&zk();const[e]=S.useState(Gc.current);return e}function Lm(e,t){const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=i=>{i.key==="Escape"&&n.current()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e])}const rc={stackPanelWidth:480,navIslandBottom:"1.5rem",navIslandHeight:"4.5rem",contentGap:"1.5rem"},ve={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 St(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 iA={4:"1rem"};function J(...e){return WT(fT(e))}const sA={height:32,lineHeight:"32px",padding:"0 16px"},oA={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")`},aA={white:ve.bgBase,paper:ve.bgSurface,speckle:ve.bgSurface,parchment:ve.bgElevated,canvas:ve.canvasBase,kraft:ve.canvas300,chalkboard:ve.chalkboardBg},lA={blue:"rgba(168, 200, 216, 0.35)",brown:"rgba(164, 144, 120, 0.35)",black:"rgba(61, 53, 43, 0.15)"};function Mm(e){const t=typeof e=="string"?{texture:e}:e,n=t.texture??"paper",r=t.ruledType??"none",i=t.ruledColor??"blue",s=oA[n],o=aA[n],a=lA[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 Gi(e,t="paper"){if(e!==!1)return Mm(e===!0?t:e)}function cA(e){const t=Mu((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=8+Math.round(n*6),i=50,s=50,o=46,a=2+n*14,l=[];for(let c=0;c<r;c++){const u=c/r*Math.PI*2+(t()-.5)*.15*n,d=o+(t()-.5)*a*2;l.push({x:i+Math.cos(u)*d,y:s+Math.sin(u)*d})}return Lu(l)}function uA(e,t){const n=Mu(`${e}-ring`),r=Math.max(0,Math.min(1,t??.5)),i=8+Math.round(r*6),s=50,o=50,a=49,l=2+r*14,c=[];for(let u=0;u<i;u++){const d=u/i*Math.PI*2+(n()-.5)*.15*r,h=a+(n()-.5)*l*2;c.push({x:s+Math.cos(d)*h,y:o+Math.sin(d)*h})}return Lu(c)}function dA(e){const t=Mu((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=3+Math.round(n*3),i=2,s=3+n*10,o=[],a=[{ax:i,ay:i,bx:100-i,by:i},{ax:100-i,ay:i,bx:100-i,by:100-i},{ax:100-i,ay:100-i,bx:i,by:100-i},{ax:i,ay:100-i,bx:i,by:i}];for(const l of a)for(let c=0;c<r;c++){const u=(c+.5)/r,d=l.ax+(l.bx-l.ax)*u,h=l.ay+(l.by-l.ay)*u,p=l.bx-l.ax,m=l.by-l.ay,y=Math.sqrt(p*p+m*m)||1,w=-m/y,g=p/y,x=(t()-.5)*s*2;o.push({x:d+w*x,y:h+g*x})}return Lu(o)}function fA(e,t){const n=Mu(`${e}-ring`),r=Math.max(0,Math.min(1,t??.5)),i=3+Math.round(r*3),s=0,o=3+r*10,a=[],l=[{ax:s,ay:s,bx:100-s,by:s},{ax:100-s,ay:s,bx:100-s,by:100-s},{ax:100-s,ay:100-s,bx:s,by:100-s},{ax:s,ay:100-s,bx:s,by:s}];for(const c of l)for(let u=0;u<i;u++){const d=(u+.5)/i,h=c.ax+(c.bx-c.ax)*d,p=c.ay+(c.by-c.ay)*d,m=c.bx-c.ax,y=c.by-c.ay,w=Math.sqrt(m*m+y*y)||1,g=-y/w,x=m/w,v=(n()-.5)*o*2;a.push({x:h+g*v,y:p+x*v})}return Lu(a)}function Lu(e){const t=e.length;if(t<3)return"";let n=`M ${vr(e[0].x)} ${vr(e[0].y)}`;for(let r=0;r<t;r++){const i=e[(r-1+t)%t],s=e[r],o=e[(r+1)%t],a=e[(r+2)%t],l=s.x+(o.x-i.x)/6,c=s.y+(o.y-i.y)/6,u=o.x-(a.x-s.x)/6,d=o.y-(a.y-s.y)/6;n+=` C ${vr(l)} ${vr(c)}, ${vr(u)} ${vr(d)}, ${vr(o.x)} ${vr(o.y)}`}return n+=" Z",n}function vr(e){return e.toFixed(2)}function Mu(e){let t=typeof e=="string"?hA(e):e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function hA(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 Im(){const e=S.useId();return S.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 io(e){const t=Im();return S.useMemo(()=>({blob:cA({seed:t,wobble:e}),ring:uA(t,e)}),[t,e])}const pA="button-module__button___Z331g",mA="button-module__blobBg___QQFzf",gA="button-module__blobFill___XwLjV",yA="button-module__blobRing___567UW",xA="button-module__isActive___FXNSJ",vA="button-module__primary___ppbyq",wA="button-module__secondary___esy5L",bA="button-module__ghost___NisA0",kA="button-module__danger___Wnvuq",_A="button-module__chalkboard___d3Nqb",SA="button-module__small___u7y8a",CA="button-module__medium___HBIAj",PA="button-module__large___RPzNy",EA="button-module__fullWidth___H0P0F",jA="button-module__iconLeft___s60SZ",TA="button-module__iconRight___75eFu",RA="button-module__label___pXAyM",en={button:pA,blobBg:mA,blobFill:gA,blobRing:yA,isActive:xA,primary:vA,secondary:wA,ghost:bA,danger:kA,chalkboard:_A,small:SA,medium:CA,large:PA,fullWidth:EA,iconLeft:jA,iconRight:TA,label:RA},de=S.forwardRef(function({variant:e="primary",surface:t="paper",size:n="medium",icon:r,iconRight:i,fullWidth:s=!1,wobble:o=.5,isActive:a=!1,children:l,className:c,...u},d){const h=io(o);return f.jsxs("button",{ref:d,type:"button",className:J(en.button,en[e],en[n],t==="chalkboard"&&en.chalkboard,a&&en.isActive,s&&en.fullWidth,c),...u,children:[f.jsxs("svg",{className:en.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:h.blob,className:en.blobFill}),f.jsx("path",{d:h.ring,className:en.blobRing})]}),r&&f.jsx("span",{className:en.iconLeft,children:r}),f.jsx("span",{className:en.label,children:l}),i&&f.jsx("span",{className:en.iconRight,children:i})]})});function Am(e){return{blue:e.accentBlue,green:e.accentGreen,amber:e.accentAmber,rose:e.accentRose,slate:e.accentSlate}}const pt=a2.generator(),LA="sketch-border-module__svg___whV4x",MA="sketch-border-module__behind___lgdYV",IA="sketch-border-module__stroke___vAm-v",AA="sketch-border-module__fill___zlpd6",xl={svg:LA,behind:MA,stroke:IA,fill:AA};function Gt({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,className:c}){const[u]=S.useState(Math.random),d=S.useRef(null),[h,p]=S.useState(null);S.useEffect(()=>{var w;const g=(w=d.current)==null?void 0:w.parentElement;if(!g)return;const x=new ResizeObserver(()=>{const v=g.getBoundingClientRect(),b=Math.round(v.width),C=Math.round(v.height);p(_=>_&&_.width===b&&_.height===C?_:{width:b,height:C})});return x.observe(g),()=>x.disconnect()},[]);const{parts:m,clipPath:y}=S.useMemo(()=>{if(!h||h.width<8||h.height<8)return{parts:null,clipPath:null};const w=Math.max(1,Math.round(u*1e6)),g=w,x=w*2654435761%2147483647,v=E=>pt.toPaths(pt.path(E,{seed:g,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:i})).filter(j=>!j.fill||j.fill==="none").map(j=>({d:j.d,filled:!1}));if(l){const E={seed:g,roughness:n,bowing:r,strokeWidth:i,disableMultiStroke:!0},j=P=>pt.toPaths(P).filter(R=>!R.fill||R.fill==="none").map(R=>({d:R.d,filled:!1}));if(a){const P=vl(e,h,s,t,es(x),n*1.1),R=vl(e,h,s+p0(i,n),t,es(x),n*1.1);return{parts:j(pt.path(R,{...E,preserveVertices:!0})),clipPath:P}}const L=e==="circle"?pt.ellipse(h.width/2,h.height/2,h.width-s*2,h.height-s*2,E):pt.path(g0(h,s,t,es(g)),{...E,preserveVertices:!0});return{parts:j(L),clipPath:null}}if(a){const E=vl(e,h,s,t,es(x),n*1.1),j=vl(e,h,s+p0(i,n),t,es(x),n*1.1);return{parts:v(j),clipPath:E}}const b=(E,j)=>{const L=j?{fill:"#000",fillStyle:"solid"}:{},P=e==="circle"?pt.ellipse(h.width/2,h.height/2,h.width-s*2,h.height-s*2,{seed:E,roughness:n,bowing:r,strokeWidth:i,...L}):pt.path(g0(h,s,t,es(E)),{seed:E,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:i,...L});return pt.toPaths(P)},C=o?b(x,!0).filter(E=>!!E.fill&&E.fill!=="none").map(E=>({d:E.d,filled:!0})):[],_=b(g,!1).filter(E=>!E.fill||E.fill==="none").map(E=>({d:E.d,filled:!1}));return{parts:[...C,..._],clipPath:null}},[h,u,a,l,e,t,n,r,i,s,o]);return S.useEffect(()=>{var w;const g=(w=d.current)==null?void 0:w.parentElement;if(g)return y?g.style.setProperty("--sketch-clip",`path("${y}")`):g.style.removeProperty("--sketch-clip"),()=>{g.style.removeProperty("--sketch-clip")}},[y]),f.jsx("svg",{ref:d,className:J(xl.svg,o&&xl.behind,c),viewBox:h?`0 0 ${h.width} ${h.height}`:void 0,"aria-hidden":"true",children:m==null?void 0:m.map((w,g)=>w.filled?f.jsx("path",{className:xl.fill,d:w.d},`f-${g}`):f.jsx("path",{className:xl.stroke,d:w.d,strokeWidth:i},`s-${g}`))})}function p0(e,t){return e/2+t*1.5}function es(e){let t=e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function vl(e,t,n,r,i,s){const o=t.width-n*2,a=t.height-n*2,l=t.width/2,c=t.height/2,u=()=>(i()-.5)*s*2,d=[];if(e==="circle")for(let h=0;h<16;h++){const p=h/16*Math.PI*2;d.push({x:l+Math.cos(p)*o/2+u(),y:c+Math.sin(p)*a/2+u()})}else{const h=Math.max(2,Math.min(r,o/2,a/2)),p=n,m=n,y=(x,v,b)=>{for(const C of[0,45,90]){const _=(b+C)*Math.PI/180;d.push({x:x+Math.cos(_)*h+u(),y:v+Math.sin(_)*h+u()})}},w=(x,v,b,C)=>{for(const _ of[.5])d.push({x:x+(b-x)*_+u(),y:v+(C-v)*_+u()})};y(p+h,m+h,180),w(p+h,m,p+o-h,m),y(p+o-h,m+h,270),w(p+o,m+h,p+o,m+a-h),y(p+o-h,m+a-h,0),w(p+o-h,m+a,p+h,m+a),y(p+h,m+a-h,90),w(p,m+a-h,p,m+h);const g=3;return m0([...d.slice(g),...d.slice(0,g)])}return m0(d)}function m0(e){const t=e.length;if(t<3)return"";const n=(i,s)=>Math.max(.001,Math.hypot(s.x-i.x,s.y-i.y)**.5);let r=`M ${e[0].x.toFixed(2)} ${e[0].y.toFixed(2)}`;for(let i=0;i<t;i++){const s=e[(i-1+t)%t],o=e[i],a=e[(i+1)%t],l=e[(i+2)%t],c=n(s,o),u=n(o,a),d=n(a,l),h=a.x-o.x+u*((o.x-s.x)/c-(a.x-s.x)/(c+u)),p=a.y-o.y+u*((o.y-s.y)/c-(a.y-s.y)/(c+u)),m=a.x-o.x+u*((l.x-a.x)/d-(l.x-o.x)/(u+d)),y=a.y-o.y+u*((l.y-a.y)/d-(l.y-o.y)/(u+d)),w=o.x+h/3,g=o.y+p/3,x=a.x-m/3,v=a.y-y/3;r+=` C ${w.toFixed(2)} ${g.toFixed(2)}, ${x.toFixed(2)} ${v.toFixed(2)}, ${a.x.toFixed(2)} ${a.y.toFixed(2)}`}return`${r} Z`}function g0(e,t,n,r){const i=[0,0,0,0].map(()=>Math.max(2,n+(r()-.5)*3));return DA(t,t,e.width-t*2,e.height-t*2,i)}function DA(e,t,n,r,i){const s=u=>Math.min(u,n/2,r/2),[o,a,l,c]=i.map(s);return[`M ${_e(e+o)} ${_e(t)}`,`L ${_e(e+n-a)} ${_e(t)}`,`Q ${_e(e+n)} ${_e(t)} ${_e(e+n)} ${_e(t+a)}`,`L ${_e(e+n)} ${_e(t+r-l)}`,`Q ${_e(e+n)} ${_e(t+r)} ${_e(e+n-l)} ${_e(t+r)}`,`L ${_e(e+c)} ${_e(t+r)}`,`Q ${_e(e)} ${_e(t+r)} ${_e(e)} ${_e(t+r-c)}`,`L ${_e(e)} ${_e(t+o)}`,`Q ${_e(e)} ${_e(t)} ${_e(e+o)} ${_e(t)}`,"Z"].join(" ")}function _e(e){return e.toFixed(2)}const Qt={surface:{radius:12,inset:2.5,roughness:.5,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}},NA="page-module__page___-uHnG",FA="page-module__outlined___Wwtyg",zA="page-module__surface___sWfI6",BA="page-module__withAccent___lsv-m",OA="page-module__accentBlue___XxbMV",$A="page-module__accentGreen___Ne6Q8",VA="page-module__accentAmber___kLAwa",UA="page-module__accentRose___O9ZbZ",WA="page-module__accentSlate___xCB66",Oo={page:NA,outlined:FA,surface:zA,withAccent:BA,accentBlue:OA,accentGreen:$A,accentAmber:VA,accentRose:UA,accentSlate:WA},HA=Am(Oo),KA={all:14,top:14,none:2};function k_({children:e,className:t,style:n,texture:r=!0,withAccent:i=!1,accentColor:s="blue",rounded:o="all",outline:a=!1}){const l=Gi(r,{texture:"white",ruledType:"lines",ruledColor:"blue"})??{backgroundColor:"var(--pui-bg-base)"};return f.jsxs("div",{className:J(Oo.page,a&&Oo.outlined,i&&Oo.withAccent,i&&HA[s],t),style:n,children:[f.jsx(Gt,{clip:!0,...Qt.surface,radius:KA[o]}),f.jsx("div",{className:Oo.surface,style:l,children:e})]})}const GA="layout-module__layout___O1aWi",QA="layout-module__header___I-kxe",YA="layout-module__headerLeft___JChJQ",qA="layout-module__headerTitles___aqSUG",XA="layout-module__headerTitle___wvr39",ZA="layout-module__headerSubtitle___6f5BD",JA="layout-module__headerActions___adC12",eD="layout-module__mobileToggle___4WpVG",tD="layout-module__body___tywNf",nD="layout-module__mobileOverlay___tzbBC",rD="layout-module__sidebar___8VKGq",iD="layout-module__sidebarOpen___47rtr",sD="layout-module__sidebarInner___tq2X6",oD="layout-module__logoArea___RLnC0",aD="layout-module__logoText___pAmfV",lD="layout-module__nav___FxcrZ",cD="layout-module__main___9z7bu",uD="layout-module__navIslandFixed___H4TwP",dD="layout-module__content___jL-VB",fD="layout-module__contentWithPage___vVdfN",hD="layout-module__footer___LyakU",pD="layout-module__footerText___8BYxc",Ne={layout:GA,header:QA,headerLeft:YA,headerTitles:qA,headerTitle:XA,headerSubtitle:ZA,headerActions:JA,mobileToggle:eD,body:tD,mobileOverlay:nD,sidebar:rD,sidebarOpen:iD,sidebarInner:sD,logoArea:oD,logoText:aD,nav:lD,main:cD,navIslandFixed:uD,content:dD,contentWithPage:fD,footer:hD,footerText:pD};function mD(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"}:Mm(e)}function gD({children:e,showHeader:t=!0,showFooter:n=!1,showSidebar:r=!0,showPage:i=!0,background:s="paper",title:o,subtitle:a,headerActions:l,headerHeight:c,headerTexture:u,navigationItems:d=[],activeItemId:h,onNavigate:p,logo:m,footerContent:y,navigationIsland:w,style:g,bleedBottom:x=!0,routeKey:v,stackOpen:b}){const[C,_]=S.useState(!1),E=Ru();Lm(C,()=>_(!1));const j=mD(s),L=r&&d.length>0,P=c!==void 0||u!==void 0?{...u!==void 0?Mm(u):{},...c!==void 0?{height:typeof c=="number"?`${c}px`:c}:{}}:void 0;return f.jsxs("div",{className:Ne.layout,style:{...j,...g},children:[t&&f.jsxs("header",{className:Ne.header,style:P,children:[f.jsxs("div",{className:Ne.headerLeft,children:[L&&f.jsx("button",{type:"button",className:Ne.mobileToggle,onClick:()=>_(!0),"aria-label":"Open navigation",children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:f.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),f.jsxs("div",{className:Ne.headerTitles,children:[o&&f.jsx("h1",{className:Ne.headerTitle,children:o}),a&&f.jsx("span",{className:Ne.headerSubtitle,children:a})]})]}),l&&f.jsx("div",{className:Ne.headerActions,children:l})]}),f.jsxs("div",{className:Ne.body,children:[C&&f.jsx("button",{type:"button",className:Ne.mobileOverlay,onClick:()=>_(!1),"aria-label":"Close navigation",tabIndex:-1}),L&&f.jsx("aside",{className:J(Ne.sidebar,C&&Ne.sidebarOpen),children:f.jsxs("div",{className:Ne.sidebarInner,children:[f.jsx("div",{className:Ne.logoArea,children:m||f.jsx("span",{className:Ne.logoText,children:"Paper UI"})}),f.jsx("nav",{className:Ne.nav,"aria-label":"Main navigation",children:d.map(R=>{const M=R.id===h;return f.jsx(de,{variant:"ghost",size:"small",isActive:M,onClick:()=>{p==null||p(R),_(!1)},"aria-current":M?"page":void 0,icon:R.icon,style:sA,children:R.label},R.id)})})]})}),f.jsx("div",{className:Ne.main,children:f.jsx("main",{className:i?Ne.contentWithPage:Ne.content,style:x?{paddingBottom:0}:void 0,children:(()=>{const R=v!==void 0?f.jsx(ju,{mode:"wait",children:f.jsx(Qs.div,{initial:E?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:E?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},style:{height:"100%"},children:e},v)}):e;return i?f.jsx(k_,{rounded:x?"top":"all",style:x&&w?{paddingBottom:`calc(${rc.navIslandBottom} + ${rc.navIslandHeight} + ${iA[4]})`}:void 0,children:R}):R})()})})]}),w&&f.jsx("div",{className:Ne.navIslandFixed,children:b!==void 0?f.jsx(Qs.div,{animate:{x:b?`-${rc.stackPanelWidth/2}px`:0},transition:{duration:E?0:.3,ease:[.4,0,.2,1]},children:w}):w}),n&&f.jsx("footer",{className:Ne.footer,children:y||f.jsx("p",{className:Ne.footerText,children:"Paper UI — Natural Materials Component Library"})})]})}const yD="checkbox-module__wrapper___uLYMI",xD="checkbox-module__blobFill___mPJSR",vD="checkbox-module__input___Ptgt7",wD="checkbox-module__blobBg___bw3sn",bD="checkbox-module__labelLeft___-vAmH",kD="checkbox-module__box___yAh-r",_D="checkbox-module__checkmark___tTyBz",SD="checkbox-module__indeterminateLine___IosI-",CD="checkbox-module__boxWrapper___byjoS",PD="checkbox-module__icon___RO-yn",ED="checkbox-module__labelText___bAnLr",jD="checkbox-module__chalkboard___sv6SL",zt={wrapper:yD,blobFill:xD,input:vD,blobBg:wD,labelLeft:bD,box:kD,checkmark:_D,indeterminateLine:SD,boxWrapper:CD,icon:PD,labelText:ED,chalkboard:jD},TD=S.forwardRef(function({label:e,labelPosition:t="right",indeterminate:n=!1,wobble:r=.4,surface:i="paper",className:s,checked:o,onChange:a,id:l,...c},u){const d=S.useId(),h=l??d,p=io(r),m=S.useRef(null);return S.useEffect(()=>{m.current&&(m.current.indeterminate=n)},[n]),f.jsxs("label",{className:J(zt.wrapper,t==="left"&&zt.labelLeft,i==="chalkboard"&&zt.chalkboard,s),htmlFor:h,children:[f.jsxs("span",{className:zt.boxWrapper,children:[f.jsx("input",{ref:y=>{m.current=y,typeof u=="function"?u(y):u&&(u.current=y)},id:h,type:"checkbox",className:zt.input,checked:o,onChange:a,...c}),f.jsx("svg",{className:zt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("path",{d:p.blob,className:zt.blobFill})}),f.jsxs("span",{className:zt.box,"aria-hidden":"true",children:[f.jsx(Gt,{smooth:!0,...Qt.control}),n?f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:zt.icon,children:f.jsx("line",{x1:"4",y1:"10",x2:"16",y2:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:zt.indeterminateLine})}):f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:zt.icon,children:f.jsx("path",{d:"M4 10 L8 14 L16 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:zt.checkmark})})]})]}),e&&f.jsx("span",{className:zt.labelText,children:e})]})}),RD="icon-button-module__iconButton___avg6i",LD="icon-button-module__blobBg___466Vy",MD="icon-button-module__blobFill___FTN1g",ID="icon-button-module__blobRing___hRdQb",AD="icon-button-module__isActive___XlvtM",DD="icon-button-module__icon___h204x",ND="icon-button-module__ghost___Wbxog",FD="icon-button-module__danger___p0Xz5",zD="icon-button-module__small___bPnCU",BD="icon-button-module__medium___nOxPf",OD="icon-button-module__large___UBU5z",$D="icon-button-module__chalkboard___mi0sQ",Xn={iconButton:RD,blobBg:LD,blobFill:MD,blobRing:ID,isActive:AD,icon:DD,default:"icon-button-module__default___9frNR",ghost:ND,danger:FD,small:zD,medium:BD,large:OD,chalkboard:$D},un=S.forwardRef(function({icon:e,variant:t="default",surface:n="paper",size:r="medium",label:i,wobble:s=.5,isActive:o=!1,className:a,...l},c){const u=io(s);return f.jsxs("button",{ref:c,type:"button",className:J(Xn.iconButton,Xn[t],n==="chalkboard"&&Xn.chalkboard,Xn[r],o&&Xn.isActive,a),"aria-label":i,title:i,...l,children:[f.jsxs("svg",{className:Xn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:u.blob,className:Xn.blobFill}),f.jsx("path",{d:u.ring,className:Xn.blobRing})]}),f.jsx("span",{className:Xn.icon,children:e})]})}),VD="stamp-module__stamp___5qaNY",UD="stamp-module__small___BBlBg",WD="stamp-module__medium___HG2YD",HD="stamp-module__large___aUT0I",KD="stamp-module__blobBg___Mdrdd",GD="stamp-module__blobFill___QyCeB",QD="stamp-module__blobRing___EUDx7",YD="stamp-module__dot___qZyCR",qD="stamp-module__label___T89iH",XD="stamp-module__chalkboard___syI4T",wr={stamp:VD,small:UD,medium:WD,large:HD,blobBg:KD,blobFill:GD,blobRing:QD,dot:YD,label:qD,chalkboard:XD},Vd={neutral:{fill:St(ve.accentSlate,.14),text:ve.accentSlateDark,ring:St(ve.accentSlateDark,.35)},info:{fill:St(ve.accentBlue,.14),text:ve.accentBlueDark,ring:St(ve.accentBlueDark,.35)},success:{fill:St(ve.accentGreen,.16),text:ve.accentGreenDark,ring:St(ve.accentGreenDark,.35)},warning:{fill:St(ve.accentAmber,.16),text:ve.accentAmberDark,ring:St(ve.accentAmberDark,.4)},error:{fill:St(ve.accentRose,.16),text:ve.accentRoseDark,ring:St(ve.accentRoseDark,.35)}},y0={fill:St(ve.chalkboardBorderBase,.1),ring:St(ve.chalkboardBorderBase,.35)};function jt({children:e,size:t="medium",variant:n,dot:r=!1,fillColor:i,textColor:s,wobble:o=.3,surface:a="paper",className:l}){const c=io(o),u=a==="chalkboard",d=n?u?y0.ring:Vd[n].ring:void 0,h=i??(n?u?y0.fill:Vd[n].fill:"transparent"),p=s??(n&&!u?Vd[n].text:void 0);return f.jsxs("span",{className:J(wr.stamp,wr[t],u&&wr.chalkboard,l),style:p?{color:p}:void 0,children:[f.jsxs("svg",{className:wr.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:c.blob,className:wr.blobFill,style:{fill:h}}),d&&f.jsx("path",{d:c.ring,className:wr.blobRing,style:{stroke:d}})]}),r&&f.jsx("span",{className:wr.dot,"aria-hidden":"true"}),f.jsx("span",{className:wr.label,children:e})]})}const ZD="copy-button-module__copyButton___-hTo4",JD="copy-button-module__dark___O45N-",eN="copy-button-module__chalkboard___hW4aw",tN="copy-button-module__copied___XlHFr",wl={copyButton:ZD,dark:JD,chalkboard:eN,copied:tN};function Dh({text:e,variant:t="light",surface:n="paper",className:r,...i}){const[s,o]=S.useState(!1),a=S.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:J(wl.copyButton,t==="dark"&&wl.dark,n==="chalkboard"&&wl.chalkboard,s&&wl.copied,r),...i,children:s?"Copied!":"Copy"})}const nN="code-block-module__codeBlock___dq28o",rN="code-block-module__header___42Fek",iN="code-block-module__relative___oO-zy",sN="code-block-module__copyOverlay___PjAuq",oN="code-block-module__pre___zXzLZ",aN="code-block-module__chalkboard___bdo9J",lN="code-block-module__chalkboardHeader___3RiVd",cN="code-block-module__chalkboardPre___iRBFR",br={codeBlock:nN,header:rN,relative:iN,copyOverlay:sN,pre:oN,chalkboard:aN,chalkboardHeader:lN,chalkboardPre:cN};function uN({code:e,filename:t,surface:n="paper"}){return f.jsxs("div",{className:J(br.codeBlock,n==="chalkboard"&&br.chalkboard),children:[t&&f.jsxs("div",{className:J(br.header,n==="chalkboard"&&br.chalkboardHeader),children:[f.jsx("span",{children:t}),f.jsx(Dh,{text:e,variant:"light",surface:n})]}),!t&&f.jsx("div",{className:br.relative,children:f.jsx("div",{className:br.copyOverlay,children:f.jsx(Dh,{text:e,variant:"dark",surface:n})})}),f.jsx("pre",{className:J(br.pre,n==="chalkboard"&&br.chalkboardPre),children:f.jsx("code",{children:e})})]})}function Qi({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 __({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 S_({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 dN({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 C_({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 fN="table-module__tableFrame___KP-90",hN="table-module__tableWrapper___gc3Y3",pN="table-module__toolbar___zhCel",mN="table-module__search___zIBk2",gN="table-module__searchIcon___ayhK8",yN="table-module__searchInput___PqsEG",xN="table-module__toolbarActions___EX6qS",vN="table-module__tableScroll___1gvc4",wN="table-module__table___tdU5g",bN="table-module__th___GQbKk",kN="table-module__td___WktB5",_N="table-module__tr___xeZno",SN="table-module__expandTh___uxkR4",CN="table-module__expandTd___VoBRC",PN="table-module__expandIcon___8V45X",EN="table-module__expandable___R7o2l",jN="table-module__expandedRow___1TbTQ",TN="table-module__expandedCell___sKAaD",RN="table-module__boardScroll___Y1yqm",LN="table-module__board___kFAI-",MN="table-module__boardColumn___-W9bP",IN="table-module__boardColumnHeader___kY3Fj",AN="table-module__accentBlue___PEJ1V",DN="table-module__accentGreen___wJ53r",NN="table-module__accentAmber___Iezjv",FN="table-module__accentRose___W8zxc",zN="table-module__accentSlate___oUZCX",BN="table-module__boardColumnLabel___JBEed",ON="table-module__boardColumnCount___Pkpiq",$N="table-module__boardColumnBody___uAgRF",VN="table-module__boardRow___C1P60",UN="table-module__boardEmpty___IKv2W",WN="table-module__chalkboardFrame___xB3N5",HN="table-module__chalkboardWrapper___KjY5r",KN="table-module__chalkboard___v0m3A",ae={tableFrame:fN,tableWrapper:hN,toolbar:pN,search:mN,searchIcon:gN,searchInput:yN,toolbarActions:xN,tableScroll:vN,table:wN,th:bN,td:kN,tr:_N,expandTh:SN,expandTd:CN,expandIcon:PN,expandable:EN,expandedRow:jN,expandedCell:TN,boardScroll:RN,board:LN,boardColumn:MN,boardColumnHeader:IN,accentBlue:AN,accentGreen:DN,accentAmber:NN,accentRose:FN,accentSlate:zN,boardColumnLabel:BN,boardColumnCount:ON,boardColumnBody:$N,boardRow:VN,boardEmpty:UN,chalkboardFrame:WN,chalkboardWrapper:HN,chalkboard:KN},GN=Am(ae);function Dm({data:e=[],columns:t=[],board:n,surface:r="paper",texture:i=!0,toolbar:s,expandable:o,showExpandColumn:a=!0,rowKey:l,rowClassName:c,className:u}){const d=Gi(i,r==="chalkboard"?"chalkboard":"paper"),h=!!s,[p,m]=S.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:J(ae.tableFrame,r==="chalkboard"&&ae.chalkboardFrame,u),children:[f.jsx(Gt,{clip:!0,...Qt.surface}),f.jsxs("div",{className:J(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(QN,{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(Gt,{fill:!0,...Qt.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:J(ae.boardColumnHeader,r==="chalkboard"&&ae.chalkboard,x.accent&&GN[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:J(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:J(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:J(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,C=o==null?void 0:o.render(x,v,r),_=!!C,E=_&&p.has(b);return f.jsxs(S.Fragment,{children:[f.jsxs("tr",{className:J(ae.tr,_&&ae.expandable,c==null?void 0:c(x,v)),onClick:()=>_&&y(b),children:[w&&f.jsx("td",{className:J(ae.td,ae.expandTd),children:_&&f.jsx("button",{type:"button",className:ae.expandIcon,"aria-expanded":E,"aria-label":E?"Collapse row":"Expand row",onClick:j=>{j.stopPropagation(),y(b)},children:f.jsx(C_,{size:14})})}),t.map(j=>f.jsx("td",{className:ae.td,children:j.cell(x,v,r)},j.key))]}),E&&f.jsx("tr",{className:ae.expandedRow,children:f.jsx("td",{colSpan:g,className:ae.expandedCell,children:C})})]},b)})})]})})]})]})}function QN({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 YN="card-module__borderLayer___WSpJq",qN="card-module__elevated___uhWj9",XN="card-module__textureLayer___Kcofz",ZN="card-module__small___HXUTr",JN="card-module__withAccent___2t7bV",e3="card-module__accentBlue___a1KIq",t3="card-module__accentGreen___RNWoA",n3="card-module__accentAmber___uMhom",r3="card-module__accentRose___VPI3t",i3="card-module__accentSlate___-l4jE",s3="card-module__chalkboard___bQ48O",vi={borderLayer:YN,default:"card-module__default___glPy-",elevated:qN,textureLayer:XN,small:ZN,withAccent:JN,accentBlue:e3,accentGreen:t3,accentAmber:n3,accentRose:r3,accentSlate:i3,chalkboard:s3},o3=Am(vi);function xt({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:J(vi.borderLayer,vi[t],n==="chalkboard"&&vi.chalkboard,vi[r],s&&vi.withAccent,s&&o3[o],a),children:[f.jsx(Gt,{clip:!0,...Qt.surface}),f.jsx("div",{className:vi.textureLayer,style:n==="chalkboard"?void 0:Gi(i),children:e})]})}const a3="input-module__wrapper___xaEw6",l3="input-module__label___lu7R1",c3="input-module__field___khFpX",u3="input-module__input___h7K-F",d3="input-module__small___SkByh",f3="input-module__medium___0QPuV",h3="input-module__large___zGwRu",p3="input-module__error___QDqga",m3="input-module__disabled___K-5hi",g3="input-module__helperText___njeLH",y3="input-module__helperError___qDBpD",x3="input-module__chalkboard___Xh-5s",Ln={wrapper:a3,label:l3,field:c3,input:u3,small:d3,medium:f3,large:h3,error:p3,disabled:m3,helperText:g3,helperError:y3,chalkboard:x3},jn=S.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a},l){const c=S.useId(),u=o??c;return f.jsxs("div",{className:J(Ln.wrapper,i==="chalkboard"&&Ln.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:u,className:Ln.label,children:e}),f.jsxs("span",{className:J(Ln.field,Ln[r],n&&Ln.error,a.disabled&&Ln.disabled),children:[f.jsx("input",{ref:l,id:u,className:Ln.input,...a}),f.jsx(Gt,{fill:!0,...Qt.field})]}),t&&f.jsx("span",{className:J(Ln.helperText,n&&Ln.helperError),children:t})]})}),v3="select-module__wrapper___Hc5F3",w3="select-module__label___ay-3s",b3="select-module__nativeSelect___UA2d-",k3="select-module__trigger___xMYHi",_3="select-module__open___w3mbZ",S3="select-module__triggerLabel___ihpER",C3="select-module__placeholder___0VOFP",P3="select-module__small___iU9W9",E3="select-module__chevron___0dCTg",j3="select-module__medium___B-XBN",T3="select-module__large___iII2c",R3="select-module__chevronOpen___cFOYe",L3="select-module__error___P5RBk",M3="select-module__dropdown___Q-uK3",I3="select-module__slideDown___sT374",A3="select-module__options___HmrQ0",D3="select-module__option___vNnue",N3="select-module__optionDisabled___ex2zq",F3="select-module__optionSelected___tAFjn",z3="select-module__optionHighlighted___zYQLq",B3="select-module__helperText___r5gyn",O3="select-module__helperError___ydSPT",$3="select-module__chalkboard___sXBw8",Oe={wrapper:v3,label:w3,nativeSelect:b3,trigger:k3,open:_3,triggerLabel:S3,placeholder:C3,small:P3,chevron:E3,medium:j3,large:T3,chevronOpen:R3,error:L3,dropdown:M3,slideDown:I3,options:A3,option:D3,optionDisabled:N3,optionSelected:F3,optionHighlighted:z3,helperText:B3,helperError:O3,chalkboard:$3};function Fi({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",options:s,placeholder:o,value:a,defaultValue:l,onChange:c,name:u,disabled:d=!1,width:h,texture:p=!1,className:m}){const y=S.useId(),[w,g]=S.useState(!1),[x,v]=S.useState(-1),[b,C]=S.useState(l??""),[_,E]=S.useState(null),j=S.useRef(null),L=S.useRef(null),P=a!==void 0,R=P?a:b,M=s.find(k=>k.value===R),F=(M==null?void 0:M.label)??o??"Select...",z=S.useCallback(()=>{if(d)return;g(!0);const k=s.findIndex(O=>O.value===R);v(k>=0?k:0)},[d,s,R]),N=S.useCallback(()=>{g(!1),v(-1)},[]),H=S.useCallback(k=>{var O;k.disabled||(P||C(k.value),c==null||c(k.value),N(),(O=j.current)==null||O.focus())},[P,c,N]),K=S.useCallback(k=>{if(!d)switch(k.key){case"Enter":case" ":k.preventDefault(),w&&x>=0?H(s[x]):z();break;case"Escape":k.preventDefault(),w&&N();break;case"ArrowDown":k.preventDefault(),w?v(O=>{let q=O+1;for(;q<s.length&&s[q].disabled;)q++;return q<s.length?q:O}):z();break;case"ArrowUp":k.preventDefault(),w?v(O=>{let q=O-1;for(;q>=0&&s[q].disabled;)q--;return q>=0?q:O}):z();break;case"Home":if(k.preventDefault(),w){let O=0;for(;O<s.length&&s[O].disabled;)O++;O<s.length&&v(O)}break;case"End":if(k.preventDefault(),w){let O=s.length-1;for(;O>=0&&s[O].disabled;)O--;O>=0&&v(O)}break;case"Tab":w&&N();break}},[d,w,x,s,z,N,H]);S.useEffect(()=>{if(!w)return;const k=O=>{var q,T;const le=O.target;(q=j.current)!=null&&q.contains(le)||(T=L.current)!=null&&T.contains(le)||N()};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[w,N]),S.useEffect(()=>{if(!w||x<0||!L.current)return;const k=L.current.querySelector(`[data-option-index="${x}"]`);k==null||k.scrollIntoView({block:"nearest"})},[w,x]),S.useEffect(()=>{if(!w){E(null);return}const k=()=>{if(!j.current)return;const O=j.current.getBoundingClientRect();if(O.bottom<0||O.top>window.innerHeight){N();return}E(O)};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,N]);const D=Gi(p),W=D?{"--sketch-fill":D.backgroundColor}:void 0;return f.jsxs("div",{className:J(Oe.wrapper,i==="chalkboard"&&Oe.chalkboard,m),style:h?{width:typeof h=="number"?`${h}px`:h}:void 0,children:[e&&f.jsx("label",{htmlFor:y,className:Oe.label,children:e}),f.jsxs("select",{id:y,name:u,className:Oe.nativeSelect,value:R,onChange:k=>c==null?void 0:c(k.target.value),disabled:d,"aria-hidden":"true",tabIndex:-1,children:[o&&f.jsx("option",{value:"",children:o}),s.map(k=>f.jsx("option",{value:k.value,disabled:k.disabled,children:k.label},k.value))]}),f.jsxs("button",{ref:j,type:"button",role:"combobox","aria-expanded":w,"aria-haspopup":"listbox","aria-controls":w?`${y}-listbox`:void 0,"aria-activedescendant":w&&x>=0?`${y}-option-${x}`:void 0,className:J(Oe.trigger,Oe[r],n&&Oe.error,w&&Oe.open,d&&Oe.disabled),onClick:()=>w?N():z(),onKeyDown:K,disabled:d,children:[f.jsx("span",{className:J(Oe.triggerLabel,!M&&Oe.placeholder),children:F}),f.jsx(V3,{className:J(Oe.chevron,w&&Oe.chevronOpen)}),f.jsx(Gt,{fill:!0,...Qt.field})]}),w&&_&&Zs.createPortal(f.jsxs("div",{ref:L,id:`${y}-listbox`,role:"listbox",tabIndex:-1,className:Oe.dropdown,style:{...W,position:"fixed",top:_.bottom+6,left:_.left,width:_.width},onKeyDown:k=>{var O;k.key==="Escape"&&(k.preventDefault(),N(),(O=j.current)==null||O.focus())},children:[f.jsx(Gt,{fill:!0,...Qt.surface}),f.jsx("div",{className:Oe.options,children:s.map((k,O)=>f.jsx("div",{id:`${y}-option-${O}`,role:"option","aria-selected":k.value===R,tabIndex:-1,"data-option-index":O,className:J(Oe.option,k.value===R&&Oe.optionSelected,O===x&&Oe.optionHighlighted,k.disabled&&Oe.optionDisabled),onClick:q=>{q.stopPropagation(),H(k)},onMouseEnter:()=>v(O),children:k.label},k.value))})]}),document.body),t&&f.jsx("span",{className:J(Oe.helperText,n&&Oe.helperError),children:t})]})}function V3({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 P_({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 U3="alert-module__alert___j7ZRS",W3="alert-module__surface___IaVgU",H3="alert-module__iconWrapper___kLoxT",K3="alert-module__message___klR2U",G3="alert-module__dismiss___f2uoG",Q3="alert-module__info___PBo1l",Y3="alert-module__success___AVBKS",q3="alert-module__warning___zkMaJ",X3="alert-module__error___cxg96",Z3="alert-module__chalkboard___7pgWk",fi={alert:U3,surface:W3,iconWrapper:H3,message:K3,dismiss:G3,info:Q3,success:Y3,warning:q3,error:X3,chalkboard:Z3};function Or({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:J(fi.alert,fi[t],a&&fi.chalkboard,o),role:t==="warning"||t==="error"?"alert":"status",children:[f.jsx(Gt,{clip:!0,...Qt.surface}),f.jsx("div",{className:fi.surface,style:a?void 0:Gi(r)}),f.jsx("span",{className:fi.iconWrapper,children:f.jsx(P_,{variant:t})}),f.jsx("div",{className:fi.message,children:e}),i&&f.jsx("button",{type:"button",className:fi.dismiss,onClick:s,"aria-label":"Dismiss alert",children:f.jsx(Qi,{size:16})})]})}const J3="modal-module__overlay___a52Ni",eF="modal-module__fadeIn___5OWd5",tF="modal-module__backdrop___RS4yj",nF="modal-module__modal___ZioOV",rF="modal-module__slideUp___vfFrm",iF="modal-module__small___hcxwF",sF="modal-module__medium___mjbM5",oF="modal-module__large___1dzyf",aF="modal-module__header___iP09B",lF="modal-module__title___nj06m",cF="modal-module__close___gQou9",uF="modal-module__body___Y-EdA",dF="modal-module__chalkboard___qY8qo",Zn={overlay:J3,fadeIn:eF,backdrop:tF,modal:nF,slideUp:rF,small:iF,medium:sF,large:oF,header:aF,title:lF,close:cF,body:uF,chalkboard:dF},fF='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function so({open:e,onClose:t,title:n,children:r,size:i="medium",surface:s="paper",texture:o=!1,className:a}){const l=S.useId(),c=S.useRef(null),u=S.useRef(null);if(Lm(e,t),S.useEffect(()=>{var h;if(!e)return;u.current=document.activeElement,(h=c.current)==null||h.focus();const p=y=>{var w;if(y.key!=="Tab")return;const g=(w=c.current)==null?void 0:w.querySelectorAll(fF);if(!g||g.length===0){y.preventDefault();return}const x=g[0],v=g[g.length-1];y.shiftKey&&document.activeElement===x?(y.preventDefault(),v.focus()):!y.shiftKey&&document.activeElement===v&&(y.preventDefault(),x.focus())};document.addEventListener("keydown",p);const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{var y,w;document.removeEventListener("keydown",p),document.body.style.overflow=m,(w=(y=u.current)==null?void 0:y.focus)==null||w.call(y)}},[e]),!e||typeof document>"u")return null;const d=Gi(o);return Zs.createPortal(f.jsxs("div",{className:Zn.overlay,children:[f.jsx("button",{type:"button",className:Zn.backdrop,"aria-label":"Close modal",onClick:t}),f.jsxs("div",{ref:c,className:J(Zn.modal,Zn[i],s==="chalkboard"&&Zn.chalkboard,a),style:d,role:"dialog","aria-modal":"true","aria-labelledby":n?l:void 0,tabIndex:-1,children:[f.jsxs("div",{className:Zn.header,children:[n&&f.jsx("h2",{id:l,className:Zn.title,children:n}),f.jsx("button",{type:"button",className:Zn.close,onClick:t,"aria-label":"Close modal",children:f.jsx(Qi,{size:18})})]}),f.jsx("div",{className:Zn.body,children:r})]})]}),document.body)}const hF="textarea-module__wrapper___NbiNO",pF="textarea-module__label___ejhyZ",mF="textarea-module__field___KluQf",gF="textarea-module__textarea___0y-7v",yF="textarea-module__resizeGrip___lONlE",xF="textarea-module__small___yPyr8",vF="textarea-module__medium___ezQxA",wF="textarea-module__large___xfeKi",bF="textarea-module__error___EkXKJ",kF="textarea-module__disabled___9CKbb",_F="textarea-module__helperText___l1sPh",SF="textarea-module__helperError___VfTLy",CF="textarea-module__chalkboard___zZ0X0",xn={wrapper:hF,label:pF,field:mF,textarea:gF,resizeGrip:yF,small:xF,medium:vF,large:wF,error:bF,disabled:kF,helperText:_F,helperError:SF,chalkboard:CF},PF=48,oo=S.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a},l){const c=S.useId(),u=o??c,d=S.useRef(null),h=S.useCallback(m=>{d.current=m,typeof l=="function"?l(m):l&&(l.current=m)},[l]),p=S.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(PF,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:J(xn.wrapper,i==="chalkboard"&&xn.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:u,className:xn.label,children:e}),f.jsxs("span",{className:J(xn.field,xn[r],n&&xn.error,a.disabled&&xn.disabled),children:[f.jsx("textarea",{ref:h,id:u,className:xn.textarea,...a}),f.jsx(Gt,{fill:!0,...Qt.field}),!a.disabled&&f.jsx("span",{className:xn.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:J(xn.helperText,n&&xn.helperError),children:t})]})}),EF="progress-module__track___a5BMO",jF="progress-module__svg___3U0-E",x0={track:EF,svg:jF},Ud=300,kr=1;function TF({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(Im()*1e6)),c=a?St(ve.chalkboardBorderBase,.16):St(ve.textPrimary,.12),u=n??(a?ve.chalkboardChalk:ve.textSecondary),d=S.useMemo(()=>pt.toPaths(pt.rectangle(kr,kr,Ud-kr*2,r-kr*2,{seed:l,roughness:2.2,fill:c,fillStyle:"solid",stroke:c,strokeWidth:1.5})),[l,c,r]),h=Math.max(o/100*(Ud-kr*2),0),p=S.useMemo(()=>h>0?pt.toPaths(pt.rectangle(kr,kr,h,r-kr*2,{seed:l+1,roughness:2,fill:u,fillStyle:"solid",stroke:u,strokeWidth:1})):[],[l,u,h,r]);return f.jsx("div",{className:J(x0.track,s),style:{height:r,borderRadius:r/2},children:f.jsxs("svg",{className:x0.svg,viewBox:`0 0 ${Ud} ${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 RF(e){const t=Im();return S.useMemo(()=>({blob:dA({seed:t,wobble:e}),ring:fA(t,e)}),[t,e])}const LF="list-item-module__listItem___-tw9O",MF="list-item-module__clickable___GLJmd",IF="list-item-module__blobBg___O3Mzh",AF="list-item-module__blobFill___dXHk1",DF="list-item-module__blobRing___S9mas",NF="list-item-module__active___UsL8O",FF="list-item-module__small___9dphK",zF="list-item-module__medium___yGZCr",BF="list-item-module__icon___2b4wU",OF="list-item-module__label___SIzJ4",$F="list-item-module__action___qGh0-",VF="list-item-module__chalkboard___qpWuM",tn={listItem:LF,static:"list-item-module__static___qtEX6",clickable:MF,blobBg:IF,blobFill:AF,blobRing:DF,active:NF,small:FF,medium:zF,icon:BF,label:OF,action:$F,chalkboard:VF};function Ei({active:e=!1,icon:t,action:n,size:r="medium",wobble:i=.5,surface:s="paper",children:o,className:a,...l}){const c=RF(i),u=!!l.onClick;return f.jsxs("button",{type:"button",className:J(tn.listItem,tn[r],u&&tn.clickable,!u&&!e&&tn.static,e&&tn.active,s==="chalkboard"&&tn.chalkboard,a),"aria-current":e?"page":void 0,...l,children:[f.jsxs("svg",{className:tn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:c.blob,className:tn.blobFill}),f.jsx("path",{d:c.ring,className:tn.blobRing})]}),t&&f.jsx("span",{className:tn.icon,children:t}),f.jsx("span",{className:tn.label,children:o}),n&&f.jsx("span",{className:tn.action,children:n})]})}const UF="accordion-module__accordion___mqGl-",WF="accordion-module__header___mLfbd",HF="accordion-module__icon___Z90NR",KF="accordion-module__title___HusgG",GF="accordion-module__content___1K0td",QF="accordion-module__chalkboard___am8r4",YF="accordion-module__expanded___836xG",hi={accordion:UF,header:WF,icon:HF,title:KF,content:GF,chalkboard:QF,expanded:YF};function v0({title:e,children:t,expanded:n=!1,onToggle:r,surface:i="paper",className:s}){return f.jsxs("div",{className:J(hi.accordion,n&&hi.expanded,i==="chalkboard"&&hi.chalkboard,s),children:[f.jsxs("button",{type:"button",className:hi.header,onClick:r,"aria-expanded":n,children:[f.jsx("span",{className:hi.icon,"aria-hidden":"true",children:f.jsx(C_,{size:14})}),f.jsx("span",{className:hi.title,children:e})]}),n&&f.jsx("div",{className:hi.content,children:t})]})}const qF="icon-module__icon___2vrJz",XF="icon-module__blobBg___ENPYJ",ZF="icon-module__blobFill___IPbwQ",JF="icon-module__blobRing___1awqV",ez="icon-module__content___TaZR6",tz="icon-module__small___Xp--F",nz="icon-module__medium___tCjMB",rz="icon-module__large___vBtP7",ts={icon:qF,blobBg:XF,blobFill:ZF,blobRing:JF,content:ez,small:tz,medium:nz,large:rz},iz={small:20,medium:24,large:28};function sz({icon:e,size:t="medium",wobble:n=.5,fillColor:r,className:i}){const s=io(n),o=iz[t];return f.jsxs("span",{className:J(ts.icon,ts[t],i),children:[f.jsxs("svg",{className:ts.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:s.blob,className:ts.blobFill,style:r?{fill:r}:void 0}),f.jsx("path",{d:s.ring,className:ts.blobRing})]}),f.jsx("span",{className:ts.content,style:{width:o,height:o},children:e})]})}const oz="radio-module__wrapper___BB05E",az="radio-module__blobFill___p5BX4",lz="radio-module__labelLeft___ijB93",cz="radio-module__input___M2nFJ",uz="radio-module__box___H7ofS",dz="radio-module__dot___jVJ-d",fz="radio-module__boxWrapper___Y3qis",hz="radio-module__blobBg___IR-M5",pz="radio-module__labelText___I-nu3",mz="radio-module__chalkboard___IIBqI",Mn={wrapper:oz,blobFill:az,labelLeft:lz,input:cz,box:uz,dot:dz,boxWrapper:fz,blobBg:hz,labelText:pz,chalkboard:mz};S.forwardRef(function({label:e,labelPosition:t="right",wobble:n=.4,surface:r="paper",className:i,checked:s,onChange:o,id:a,...l},c){const u=S.useId(),d=a??u,h=io(n);return f.jsxs("label",{className:J(Mn.wrapper,t==="left"&&Mn.labelLeft,r==="chalkboard"&&Mn.chalkboard,i),htmlFor:d,children:[f.jsxs("span",{className:Mn.boxWrapper,children:[f.jsx("input",{ref:c,id:d,type:"radio",className:Mn.input,checked:s,onChange:o,...l}),f.jsx("svg",{className:Mn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("path",{d:h.blob,className:Mn.blobFill})}),f.jsxs("span",{className:Mn.box,"aria-hidden":"true",children:[f.jsx(Gt,{smooth:!0,shape:"circle",...Qt.control}),f.jsx("span",{className:Mn.dot})]})]}),e&&f.jsx("span",{className:Mn.labelText,children:e})]})});const gz="switch-module__wrapper___5-2P1",yz="switch-module__labelLeft___WlT-N",xz="switch-module__input___YKZRj",vz="switch-module__track___QNvnO",wz="switch-module__thumb___cunvF",bz="switch-module__small___WPIxc",kz="switch-module__medium___yPulW",_z="switch-module__large___VlKV1",Sz="switch-module__labelText___9Qg39",Cz="switch-module__chalkboard___qKTMz",_r={wrapper:gz,labelLeft:yz,input:xz,track:vz,thumb:wz,small:bz,medium:kz,large:_z,labelText:Sz,chalkboard:Cz},Pz=S.forwardRef(function({label:e,labelPosition:t="right",size:n="medium",surface:r="paper",className:i,checked:s,onChange:o,id:a,...l},c){const u=S.useId(),d=a??u;return f.jsxs("label",{className:J(_r.wrapper,_r[n],t==="left"&&_r.labelLeft,r==="chalkboard"&&_r.chalkboard,i),htmlFor:d,children:[f.jsx("input",{ref:c,id:d,type:"checkbox",className:_r.input,checked:s,onChange:o,...l}),f.jsxs("span",{className:_r.track,"aria-hidden":"true",children:[f.jsx(Gt,{...Qt.pill}),f.jsx("span",{className:_r.thumb})]}),e&&f.jsx("span",{className:_r.labelText,children:e})]})}),Ez="spinner-module__spinner___FDTk2",jz="spinner-module__chalkboard___DLE1z",Tz="spinner-module__svg___JnCWN",Rz="spinner-module__track___xbnbo",Lz="spinner-module__head___j5dWe",Ro={spinner:Ez,chalkboard:jz,svg:Tz,track:Rz,head:Lz},Mz={small:18,medium:28,large:40},w0=25,Iz=18,b0=pt.toPaths(pt.circle(w0,w0,Iz*2,{seed:7,roughness:1.15,disableMultiStroke:!0})).map(e=>e.d).join(" ");function Nh({size:e="medium",color:t,label:n="Loading",surface:r="paper",className:i}){const s=Mz[e];return f.jsx("span",{className:J(Ro.spinner,r==="chalkboard"&&Ro.chalkboard,i),role:"status","aria-label":n,children:f.jsxs("svg",{width:s,height:s,viewBox:"0 0 50 50",className:Ro.svg,style:t?{color:t}:void 0,"aria-hidden":"true",children:[f.jsx("path",{className:Ro.track,d:b0,fill:"none",pathLength:100,strokeLinecap:"round"}),f.jsx("path",{className:Ro.head,d:b0,fill:"none",pathLength:100,strokeLinecap:"round"})]})})}const Az="divider-module__horizontal___tP3rG",Dz="divider-module__line___KnBes",Nz="divider-module__label___WiUwZ",Fz="divider-module__vertical___wBSrT",zz="divider-module__chalkboard___gXTde",ns={horizontal:Az,line:Dz,label:Nz,vertical:Fz,chalkboard:zz};function Ms({orientation:e="horizontal",label:t,surface:n="paper",className:r}){const i=n==="chalkboard"&&ns.chalkboard;return e==="vertical"?f.jsx("span",{className:J(ns.vertical,i,r),role:"separator","aria-orientation":"vertical"}):f.jsxs("div",{className:J(ns.horizontal,i,r),role:"separator",children:[f.jsx("span",{className:ns.line}),t!=null&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:ns.label,children:t}),f.jsx("span",{className:ns.line})]})]})}const Bz="tooltip-module__wrapper___XeVNe",Oz="tooltip-module__tooltip___e-rkz",$z="tooltip-module__tooltipIn___CZbRw",Vz="tooltip-module__top___78WWU",Uz="tooltip-module__bottom___Irl3O",Wz="tooltip-module__left___C1Ec4",Hz="tooltip-module__right___oUA-Z",Kz="tooltip-module__chalkboard___Um6dx",bl={wrapper:Bz,tooltip:Oz,tooltipIn:$z,top:Vz,bottom:Uz,left:Wz,right:Hz,chalkboard:Kz},kl=8,_l=8,Gz=typeof window>"u"?S.useEffect:S.useLayoutEffect;function Qz(e,t,n){let r,i;switch(t){case"bottom":r=e.bottom+kl,i=e.left+e.width/2-n.width/2;break;case"left":r=e.top+e.height/2-n.height/2,i=e.left-kl-n.width;break;case"right":r=e.top+e.height/2-n.height/2,i=e.right+kl;break;default:r=e.top-kl-n.height,i=e.left+e.width/2-n.width/2}return i=Math.min(Math.max(i,_l),window.innerWidth-n.width-_l),r=Math.min(Math.max(r,_l),window.innerHeight-n.height-_l),{top:r,left:i}}function Pn({content:e,children:t,placement:n="top",delay:r=300,disabled:i=!1,surface:s="paper"}){const o=S.useId(),[a,l]=S.useState(!1),[c,u]=S.useState(!1),[d,h]=S.useState(!1),[p,m]=S.useState(null),[y,w]=S.useState(null),g=S.useRef(null),x=S.useRef(null),v=S.useRef(),b=!i&&!!e&&!d&&(a||c),C=()=>{clearTimeout(v.current),v.current=setTimeout(()=>l(!0),r)},_=()=>{clearTimeout(v.current),l(!1),h(!1)},E=()=>{h(!1),u(!0)},j=()=>{u(!1),h(!1)};Lm(b,()=>h(!0)),S.useEffect(()=>{if(!b){m(null);return}const P=()=>{g.current&&m(g.current.getBoundingClientRect())};return P(),window.addEventListener("scroll",P,{capture:!0,passive:!0}),window.addEventListener("resize",P,{passive:!0}),()=>{window.removeEventListener("scroll",P,{capture:!0}),window.removeEventListener("resize",P)}},[b]),Gz(()=>{if(!b){w(null);return}const P=x.current;P&&w({width:P.offsetWidth,height:P.offsetHeight})},[b,e,n]),S.useEffect(()=>()=>clearTimeout(v.current),[]);const L=t.props;return f.jsxs("span",{ref:g,className:bl.wrapper,onMouseEnter:C,onMouseLeave:_,onFocus:E,onBlur:j,children:[S.cloneElement(t,{"aria-describedby":b?o:L["aria-describedby"]}),b&&p&&typeof document<"u"&&Zs.createPortal(f.jsx("span",{ref:x,id:o,role:"tooltip",className:J(bl.tooltip,bl[n],s==="chalkboard"&&bl.chalkboard),style:y?{position:"fixed",...Qz(p,n,y)}:{position:"fixed",top:0,left:0,visibility:"hidden"},children:e}),document.body)]})}const Yz="toast-module__stack___hDi0s",qz="toast-module__topLeft___Luw-F",Xz="toast-module__topCenter___N1DwF",Zz="toast-module__topRight___Dtgau",Jz="toast-module__bottomLeft___Eb2lo",eB="toast-module__bottomCenter___gs-Yb",tB="toast-module__bottomRight___-0e2j",nB="toast-module__item___RFjtm",rB="toast-module__toastIn___9m9iN",iB="toast-module__card___ZCvJS",sB="toast-module__surface___mfMl0",oB="toast-module__iconWrapper___lnjcC",aB="toast-module__content___AlliM",lB="toast-module__title___1Oqh8",cB="toast-module__description___eiUSB",uB="toast-module__dismiss___tUGx4",dB="toast-module__info___Nh8S9",fB="toast-module__success___hlKLc",hB="toast-module__warning___XUMJt",pB="toast-module__error___pSFFC",mB="toast-module__chalkboard___c49gt",rn={stack:Yz,topLeft:qz,topCenter:Xz,topRight:Zz,bottomLeft:Jz,bottomCenter:eB,bottomRight:tB,item:nB,toastIn:rB,card:iB,surface:sB,iconWrapper:oB,content:aB,title:lB,description:cB,dismiss:uB,info:dB,success:fB,warning:hB,error:pB,chalkboard:mB};function gB({record:e,surface:t="paper",onDismiss:n}){const r=S.useRef(e.duration),i=S.useRef(0),s=S.useRef(),o=S.useCallback(d=>{clearTimeout(s.current),!(d<=0)&&(i.current=Date.now(),s.current=setTimeout(()=>n(e.id),d))},[n,e.id]);S.useEffect(()=>(o(e.duration),()=>clearTimeout(s.current)),[o,e.duration]);const a=()=>{s.current&&(clearTimeout(s.current),r.current-=Date.now()-i.current)},l=()=>o(r.current),c=t==="chalkboard",u=e.variant==="warning"||e.variant==="error"?"alert":"status";return f.jsx("div",{className:rn.item,onMouseEnter:a,onMouseLeave:l,children:f.jsxs("div",{className:J(rn.card,rn[e.variant],c&&rn.chalkboard),role:u,children:[f.jsx(Gt,{clip:!0,...Qt.surface}),f.jsx("div",{className:rn.surface,style:c?void 0:Gi("kraft")}),f.jsx("span",{className:rn.iconWrapper,children:f.jsx(P_,{variant:e.variant})}),f.jsxs("div",{className:rn.content,children:[e.title&&f.jsx("div",{className:rn.title,children:e.title}),f.jsx("div",{className:rn.description,children:e.description})]}),f.jsx("button",{type:"button",className:rn.dismiss,onClick:()=>n(e.id),"aria-label":"Dismiss notification",children:f.jsx(Qi,{size:16})})]})})}const E_=S.createContext(null);function yB(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function xB({children:e,position:t="bottom-right",surface:n="paper",defaultDuration:r=5e3}){const[i,s]=S.useState([]),o=S.useRef(0),a=S.useCallback(u=>{s(d=>d.filter(h=>h.id!==u))},[]),l=S.useCallback(u=>{o.current+=1;const d=`toast-${o.current}`;return s(h=>[...h,{id:d,title:u.title,description:u.description,variant:u.variant??"info",duration:u.duration??r}]),d},[r]),c=t.startsWith("top")?[...i].reverse():i;return f.jsxs(E_.Provider,{value:{toast:l,dismiss:a},children:[e,typeof document<"u"&&Zs.createPortal(f.jsx("div",{className:J(rn.stack,rn[yB(t)]),role:"region","aria-label":"Notifications",children:c.map(u=>f.jsx(gB,{record:u,surface:n,onDismiss:a},u.id))}),document.body)]})}function ao(){const e=S.useContext(E_);if(!e)throw new Error("useToast must be used within a <ToastProvider>");return e}const vB="breadcrumb-module__breadcrumb___r-ILp",wB="breadcrumb-module__list___V3YFy",bB="breadcrumb-module__item___dDwYf",kB="breadcrumb-module__link___CHC9k",_B="breadcrumb-module__linkButton___XoMW-",SB="breadcrumb-module__current___dprI9",CB="breadcrumb-module__separator___uLhtn",PB="breadcrumb-module__chalkboard___COJpw",In={breadcrumb:vB,list:wB,item:bB,link:kB,linkButton:_B,current:SB,static:"breadcrumb-module__static___affaf",separator:CB,chalkboard:PB};function Fh({items:e,surface:t="paper",className:n}){return f.jsx("nav",{"aria-label":"Breadcrumb",className:J(In.breadcrumb,t==="chalkboard"&&In.chalkboard,n),children:f.jsx("ol",{className:In.list,children:e.map((r,i)=>{const s=i===e.length-1;return f.jsxs("li",{className:In.item,children:[s?f.jsx("span",{className:In.current,"aria-current":"page",children:r.label}):r.href?f.jsx("a",{href:r.href,className:In.link,onClick:r.onClick,children:r.label}):r.onClick?f.jsx("button",{type:"button",className:J(In.link,In.linkButton),onClick:r.onClick,children:r.label}):f.jsx("span",{className:In.static,children:r.label}),!s&&f.jsx(EB,{className:In.separator})]},r.id)})})})}function EB({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"},I={1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem"},ee={"2xs":"0.75rem",xs:"0.875rem",sm:"1rem",base:"1.125rem",md:"1.25rem",lg:"1.5rem"},Ht={tight:1.2,normal:1.5,relaxed:1.7},fe={textPrimary:"#1A1917",textSecondary:"#68635C",textTertiary:"#A8A399",accentAmberDark:"#A67B4F",accentGreenDark:"#5E8A66",accentRoseDark:"#9E5E5E",deskBg:"#1e3a2d",deskLight:"#264a3a",deskText:"#e8e4d9",deskTextMuted:"#a8b5a0",deskBorder:"rgba(200, 210, 195, 0.15)",deskChalk:"#d4e8cb"},j_={sidebarWidth:224,stackPanelWidth:480},T_=["idea","planned","in-progress","review","done","dropped"],jB=["feat","fix","chore","docs","refactor"],R_=["claude-code","opencode"],Nm={"claude-code":"Claude Code",opencode:"OpenCode"},Wd={"claude-code":{model:["opus","sonnet","fable","haiku"],effort:["low","medium","high","xhigh","max"]},opencode:{model:null}},Lo={phase:{agent:"opencode"},planDraft:{agent:"claude-code"},ideaExtend:{agent:"claude-code"},commitSuggest:{agent:"claude-code"}},TB=jB.map(e=>({value:e,label:e})),RB=({open:e,onClose:t,onAdd:n})=>{const[r,i]=S.useState(""),[s,o]=S.useState(""),[a,l]=S.useState("feat"),[c,u]=S.useState(!1),[d,h]=S.useState(null);S.useEffect(()=>{e&&(i(""),o(""),l("feat"),u(!1),h(null))},[e]);const p=async m=>{if(m.preventDefault(),!(!r.trim()||c)){h(null),u(!0);try{await n({title:r.trim(),content:s.trim()||void 0,kind:a}),t()}catch(y){h(y.message)}finally{u(!1)}}};return f.jsx(so,{open:e,onClose:t,title:"Quick plan",size:"small",children:f.jsxs("form",{onSubmit:p,style:{display:"flex",flexDirection:"column",gap:I[4]},children:[f.jsx(jn,{label:"Title",value:r,onChange:m=>i(m.target.value),placeholder:"Backlog item title…",disabled:c,autoFocus:!0,required:!0}),f.jsx(Fi,{label:"Kind",value:a,onChange:m=>l(m),options:TB,disabled:c}),f.jsx(oo,{label:"Description",value:s,onChange:m=>o(m.target.value),placeholder:"Optional details…",disabled:c,rows:4}),d&&f.jsx("p",{style:{margin:0,color:fe.accentRoseDark,fontSize:ee.sm},children:d}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[f.jsx(de,{type:"button",variant:"ghost",onClick:t,disabled:c,children:"Cancel"}),f.jsx(de,{type:"submit",variant:"primary",disabled:!r.trim()||c,children:"Add"})]})]})})},k0={go:"intent-button-go",stop:"intent-button-stop",log:"intent-button-log"},Is=({intent:e,className:t,...n})=>f.jsx(de,{variant:"primary",className:t?`${k0[e]} ${t}`:k0[e],...n}),zh=({children:e,onClick:t})=>f.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",padding:0,color:fe.accentAmberDark,cursor:"pointer",textDecoration:"underline",font:"inherit"},children:e});function LB(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const MB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AB={};function _0(e,t){return(AB.jsx?IB:MB).test(e)}const DB=/[ \t\n\f\r]/g;function NB(e){return typeof e=="object"?e.type==="text"?S0(e.value):!1:S0(e)}function S0(e){return e.replace(DB,"")===""}class Oa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Oa.prototype.normal={};Oa.prototype.property={};Oa.prototype.space=void 0;function L_(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Oa(n,r,t)}function Bh(e){return e.toLowerCase()}class At{constructor(t,n){this.attribute=n,this.property=t}}At.prototype.attribute="";At.prototype.booleanish=!1;At.prototype.boolean=!1;At.prototype.commaOrSpaceSeparated=!1;At.prototype.commaSeparated=!1;At.prototype.defined=!1;At.prototype.mustUseProperty=!1;At.prototype.number=!1;At.prototype.overloadedBoolean=!1;At.prototype.property="";At.prototype.spaceSeparated=!1;At.prototype.space=void 0;let FB=0;const ne=Yi(),Ve=Yi(),Oh=Yi(),U=Yi(),we=Yi(),zi=Yi(),Bt=Yi();function Yi(){return 2**++FB}const $h=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Ve,commaOrSpaceSeparated:Bt,commaSeparated:zi,number:U,overloadedBoolean:Oh,spaceSeparated:we},Symbol.toStringTag,{value:"Module"})),Hd=Object.keys($h);class Fm extends At{constructor(t,n,r,i){let s=-1;if(super(t,n),C0(this,"space",i),typeof r=="number")for(;++s<Hd.length;){const o=Hd[s];C0(this,Hd[s],(r&$h[o])===$h[o])}}}Fm.prototype.defined=!0;function C0(e,t,n){n&&(e[t]=n)}function lo(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Fm(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Bh(r)]=r,n[Bh(s.attribute)]=r}return new Oa(t,n,e.space)}const M_=lo({properties:{ariaActiveDescendant:null,ariaAtomic:Ve,ariaAutoComplete:null,ariaBusy:Ve,ariaChecked:Ve,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:we,ariaCurrent:null,ariaDescribedBy:we,ariaDetails:null,ariaDisabled:Ve,ariaDropEffect:we,ariaErrorMessage:null,ariaExpanded:Ve,ariaFlowTo:we,ariaGrabbed:Ve,ariaHasPopup:null,ariaHidden:Ve,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:we,ariaLevel:U,ariaLive:null,ariaModal:Ve,ariaMultiLine:Ve,ariaMultiSelectable:Ve,ariaOrientation:null,ariaOwns:we,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Ve,ariaReadOnly:Ve,ariaRelevant:null,ariaRequired:Ve,ariaRoleDescription:we,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Ve,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function I_(e,t){return t in e?e[t]:t}function A_(e,t){return I_(e,t.toLowerCase())}const zB=lo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zi,acceptCharset:we,accessKey:we,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alpha:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:we,autoFocus:ne,autoPlay:ne,blocking:we,capture:null,charSet:null,checked:ne,cite:null,className:we,closedBy:null,colorSpace:null,cols:U,colSpan:U,command:null,commandFor:null,content:null,contentEditable:Ve,controls:ne,controlsList:we,coords:U|zi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:Oh,draggable:Ve,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:we,height:U,hidden:Oh,high:U,href:null,hrefLang:null,htmlFor:we,httpEquiv:we,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:we,itemRef:we,itemScope:ne,itemType:we,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ne,optimum:U,pattern:null,ping:we,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:we,required:ne,reversed:ne,rows:U,rowSpan:U,sandbox:we,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootCustomElementRegistry:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shadowRootSerializable:ne,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Ve,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Ve,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:we,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Ve,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ne,disablePictureInPicture:ne,disableRemotePlayback:ne,exportParts:zi,part:we,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:A_}),BB=lo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Bt,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:we,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:zi,g2:zi,glyphName:zi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:Bt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:we,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bt,rev:Bt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bt,requiredFeatures:Bt,requiredFonts:Bt,requiredFormats:Bt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:Bt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bt,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:I_}),D_=lo({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()}}),N_=lo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:A_}),F_=lo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),OB={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"},$B=/[A-Z]/g,P0=/-[a-z]/g,VB=/^data[-\w.:]+$/i;function UB(e,t){const n=Bh(t);let r=t,i=At;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&VB.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(P0,HB);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!P0.test(s)){let o=s.replace($B,WB);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Fm}return new i(r,t)}function WB(e){return"-"+e.toLowerCase()}function HB(e){return e.charAt(1).toUpperCase()}const KB=L_([M_,zB,D_,N_,F_],"html"),zm=L_([M_,BB,D_,N_,F_],"svg");function GB(e){return e.join(" ").trim()}var Bm={},E0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,QB=/\n/g,YB=/^\s*/,qB=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,XB=/^:\s*/,ZB=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,JB=/^[;\s]*/,eO=/^\s+|\s+$/g,tO=`
65
+ `,j0="/",T0="*",wi="",nO="comment",rO="declaration";function iO(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(QB);y&&(n+=y.length);var w=m.lastIndexOf(tO);r=~w?m.length-w:r+m.length}function s(){var m={line:n,column:r};return function(y){return y.position=new o(m),c(),y}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function l(m){var y=m.exec(e);if(y){var w=y[0];return i(w),e=e.slice(w.length),y}}function c(){l(YB)}function u(m){var y;for(m=m||[];y=d();)y!==!1&&m.push(y);return m}function d(){var m=s();if(!(j0!=e.charAt(0)||T0!=e.charAt(1))){for(var y=2;wi!=e.charAt(y)&&(T0!=e.charAt(y)||j0!=e.charAt(y+1));)++y;if(y+=2,wi===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:nO,comment:w})}}function h(){var m=s(),y=l(qB);if(y){if(d(),!l(XB))return a("property missing ':'");var w=l(ZB),g=m({type:rO,property:R0(y[0].replace(E0,wi)),value:w?R0(w[0].replace(E0,wi)):wi});return l(JB),g}}function p(){var m=[];u(m);for(var y;y=h();)y!==!1&&(m.push(y),u(m));return m}return c(),p()}function R0(e){return e?e.replace(eO,wi):wi}var sO=iO,oO=ac&&ac.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bm,"__esModule",{value:!0});Bm.default=lO;const aO=oO(sO);function lO(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,aO.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 Iu={};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.camelCase=void 0;var cO=/^--[a-zA-Z0-9_-]+$/,uO=/-([a-z])/g,dO=/^[^-]+$/,fO=/^-(webkit|moz|ms|o|khtml)-/,hO=/^-(ms)-/,pO=function(e){return!e||dO.test(e)||cO.test(e)},mO=function(e,t){return t.toUpperCase()},L0=function(e,t){return"".concat(t,"-")},gO=function(e,t){return t===void 0&&(t={}),pO(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(hO,L0):e=e.replace(fO,L0),e.replace(uO,mO))};Iu.camelCase=gO;var yO=ac&&ac.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},xO=yO(Bm),vO=Iu;function Vh(e,t){var n={};return!e||typeof e!="string"||(0,xO.default)(e,function(r,i){r&&i&&(n[(0,vO.camelCase)(r,t)]=i)}),n}Vh.default=Vh;var wO=Vh;const bO=nu(wO),z_=B_("end"),Om=B_("start");function B_(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 kO(e){const t=Om(e),n=z_(e);if(t&&n)return{start:t,end:n}}function ea(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?M0(e.position):"start"in e||"end"in e?M0(e):"line"in e||"column"in e?Uh(e):""}function Uh(e){return I0(e&&e.line)+":"+I0(e&&e.column)}function M0(e){return Uh(e&&e.start)+"-"+Uh(e&&e.end)}function I0(e){return e&&typeof e=="number"?e:1}class ft 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=ea(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}}ft.prototype.file="";ft.prototype.name="";ft.prototype.reason="";ft.prototype.message="";ft.prototype.stack="";ft.prototype.column=void 0;ft.prototype.line=void 0;ft.prototype.ancestors=void 0;ft.prototype.cause=void 0;ft.prototype.fatal=void 0;ft.prototype.place=void 0;ft.prototype.ruleId=void 0;ft.prototype.source=void 0;const $m={}.hasOwnProperty,_O=new Map,SO=/[A-Z]/g,CO=new Set(["table","tbody","thead","tfoot","tr"]),PO=new Set(["td","th"]),O_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function EO(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=DO(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=AO(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"?zm:KB,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=$_(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function $_(e,t,n){if(t.type==="element")return jO(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return TO(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return LO(e,t,n);if(t.type==="mdxjsEsm")return RO(e,t);if(t.type==="root")return MO(e,t,n);if(t.type==="text")return IO(e,t)}function jO(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=zm,e.schema=i),e.ancestors.push(t);const s=U_(e,t.tagName,!1),o=NO(e,t);let a=Um(e,t);return CO.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!NB(l):!0})),V_(e,o,s,t),Vm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function TO(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)}ja(e,t.position)}function RO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ja(e,t.position)}function LO(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=zm,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:U_(e,t.name,!0),o=FO(e,t),a=Um(e,t);return V_(e,o,s,t),Vm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function MO(e,t,n){const r={};return Vm(r,Um(e,t)),e.create(t,e.Fragment,r,n)}function IO(e,t){return t.value}function V_(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function AO(e,t,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:t;return a?c(s,o,a):c(s,o)}}function DO(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Om(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 NO(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&$m.call(t.properties,i)){const s=zO(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&PO.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 FO(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 ja(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 ja(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Um(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:_O;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=$_(e,s,o);a!==void 0&&n.push(a)}return n}function zO(e,t,n){const r=UB(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?LB(n):GB(n)),r.property==="style"){let i=typeof n=="object"?n:BO(e,String(n));return e.stylePropertyNameCase==="css"&&(i=OO(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?OB[r.property]||r.property:r.attribute,n]}}function BO(e,t){try{return bO(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ft("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=O_+"#cannot-parse-style-attribute",i}}function U_(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=_0(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=_0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return $m.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ja(e)}function ja(e,t){const n=new ft("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=O_+"#cannot-handle-mdx-estrees-without-createevaluater",n}function OO(e){const t={};let n;for(n in e)$m.call(e,n)&&(t[$O(n)]=e[n]);return t}function $O(e){let t=e.replace(SO,VO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function VO(e){return"-"+e.toLowerCase()}const Kd={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"]},UO={};function WO(e,t){const n=UO,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return W_(e,r,i)}function W_(e,t,n){if(HO(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 A0(e.children,t,n)}return Array.isArray(e)?A0(e,t,n):""}function A0(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=W_(e[i],t,n);return r.join("")}function HO(e){return!!(e&&typeof e=="object")}const D0=document.createElement("i");function Wm(e){const t="&"+e+";";D0.innerHTML=t;const n=D0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Hn(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function an(e,t){return e.length>0?(Hn(e,e.length,0,t),e):t}const N0={}.hasOwnProperty;function KO(e){const t={};let n=-1;for(;++n<e.length;)GO(t,e[n]);return t}function GO(e,t){let n;for(n in t){const i=(N0.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){N0.call(i,o)||(i[o]=[]);const a=s[o];QO(i[o],Array.isArray(a)?a:a?[a]:[])}}}function QO(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Hn(e,0,0,r)}function H_(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 As(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const On=oi(/[A-Za-z]/),Vt=oi(/[\dA-Za-z]/),YO=oi(/[#-'*+\--9=?A-Z^-~]/);function Wh(e){return e!==null&&(e<32||e===127)}const Hh=oi(/\d/),qO=oi(/[\dA-Fa-f]/),XO=oi(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function Mt(e){return e!==null&&(e<0||e===32)}function me(e){return e===-2||e===-1||e===32}const ZO=oi(new RegExp("\\p{P}|\\p{S}","u")),JO=oi(/\s/);function oi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function co(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Vt(e.charCodeAt(n+1))&&Vt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ce(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return me(l)?(e.enter(n),a(l)):t(l)}function a(l){return me(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const e4={tokenize:t4};function t4(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ce(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return te(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const n4={tokenize:r4},F0={tokenize:i4};function r4(e){const t=this,n=[];let r=0,i,s,o;return a;function a(v){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const b=t.events.length;let C=b,_;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){_=t.events[C][1].end;break}g(r);let E=b;for(;E<t.events.length;)t.events[E][1].end={..._},E++;return Hn(t.events,C+1,0,t.events.slice(b)),t.events.length=E,c(v)}return a(v)}function c(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return m(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(F0,u,d)(v)}function u(v){return i&&x(),g(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(v)}function h(v){return t.containerState={},e.attempt(F0,p,m)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function m(v){if(v===null){i&&x(),g(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),y(v)}function y(v){if(v===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return te(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),y)}function w(v,b){const C=t.sliceStream(v);if(b&&C.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(C),t.parser.lazy[v.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<o&&(!i.events[_][1].end||i.events[_][1].end.offset>o))return;const E=t.events.length;let j=E,L,P;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(L){P=t.events[j][1].end;break}L=!0}for(g(r),_=E;_<t.events.length;)t.events[_][1].end={...P},_++;Hn(t.events,j+1,0,t.events.slice(E)),t.events.length=_}}function g(v){let b=n.length;for(;b-- >v;){const C=n[b];t.containerState=C[1],C[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 i4(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function z0(e){if(e===null||Mt(e)||JO(e))return 1;if(ZO(e))return 2}function Hm(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 Kh={name:"attention",resolveAll:s4,tokenize:o4};function s4(e,t){let n=-1,r,i,s,o,a,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};B0(d,-l),B0(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=an(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=an(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=an(c,Hm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=an(c,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=an(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Hn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function o4(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=z0(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const c=e.exit("attentionSequence"),u=z0(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?d:d&&(i||!h)),c._close=!!(s===42?h:h&&(u||!d)),t(l)}}function B0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const a4={name:"autolink",tokenize:l4};function l4(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 On(p)?(e.consume(p),o):p===64?n(p):c(p)}function o(p){return p===43||p===45||p===46||Vt(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Vt(p))&&r++<32?(e.consume(p),a):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Wh(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):YO(p)?(e.consume(p),c):n(p)}function u(p){return Vt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Vt(p))&&r++<63){const m=p===45?h:d;return e.consume(p),m}return n(p)}}const Au={partial:!0,tokenize:c4};function c4(e,t,n){return r;function r(s){return me(s)?Ce(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||te(s)?t(s):n(s)}}const K_={continuation:{tokenize:d4},exit:f4,name:"blockQuote",tokenize:u4};function u4(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return me(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function d4(e,t,n){const r=this;return i;function i(o){return me(o)?Ce(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(K_,t,n)(o)}}function f4(e){e.exit("blockQuote")}const G_={name:"characterEscape",tokenize:h4};function h4(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 XO(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Q_={name:"characterReference",tokenize:p4};function p4(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,o=Vt,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=qO,u):(e.enter("characterReferenceValue"),s=7,o=Hh,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Vt&&!Wm(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),u):n(d)}}const O0={partial:!0,tokenize:g4},$0={concrete:!0,name:"codeFenced",tokenize:m4};function m4(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,o=0,a;return l;function l(_){return c(_)}function c(_){const E=r.events[r.events.length-1];return s=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,a=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(_)}function u(_){return _===a?(o++,e.consume(_),u):o<3?n(_):(e.exit("codeFencedFenceSequence"),me(_)?Ce(e,d,"whitespace")(_):d(_))}function d(_){return _===null||te(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(O0,y,b)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===null||te(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(_)):me(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ce(e,p,"whitespace")(_)):_===96&&_===a?n(_):(e.consume(_),h)}function p(_){return _===null||te(_)?d(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===null||te(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(_)):_===96&&_===a?n(_):(e.consume(_),m)}function y(_){return e.attempt(i,b,w)(_)}function w(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),g}function g(_){return s>0&&me(_)?Ce(e,x,"linePrefix",s+1)(_):x(_)}function x(_){return _===null||te(_)?e.check(O0,y,b)(_):(e.enter("codeFlowValue"),v(_))}function v(_){return _===null||te(_)?(e.exit("codeFlowValue"),x(_)):(e.consume(_),v)}function b(_){return e.exit("codeFenced"),t(_)}function C(_,E,j){let L=0;return P;function P(N){return _.enter("lineEnding"),_.consume(N),_.exit("lineEnding"),R}function R(N){return _.enter("codeFencedFence"),me(N)?Ce(_,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):M(N)}function M(N){return N===a?(_.enter("codeFencedFenceSequence"),F(N)):j(N)}function F(N){return N===a?(L++,_.consume(N),F):L>=o?(_.exit("codeFencedFenceSequence"),me(N)?Ce(_,z,"whitespace")(N):z(N)):j(N)}function z(N){return N===null||te(N)?(_.exit("codeFencedFence"),E(N)):j(N)}}}function g4(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 Gd={name:"codeIndented",tokenize:x4},y4={partial:!0,tokenize:v4};function x4(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ce(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):te(c)?e.attempt(y4,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||te(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function v4(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):te(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Ce(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):te(o)?i(o):n(o)}}const w4={name:"codeText",previous:k4,resolve:b4,tokenize:_4};function b4(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 k4(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _4(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,u(d)):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||te(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class S4{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 Y_(e){const t={};let n=-1,r,i,s,o,a,l,c;const u=new S4(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,C4(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return Hn(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function C4(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],c={};let u,d,h=-1,p=n,m=0,y=0;const w=[y];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(y=h+1,w.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const g=a.slice(w[h],w[h+1]),x=s.pop();l.push([x,x+g.length-1]),e.splice(x,2,g)}for(l.reverse(),h=-1;++h<l.length;)c[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return c}const P4={resolve:j4,tokenize:T4},E4={partial:!0,tokenize:R4};function j4(e){return Y_(e),e}function T4(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):te(a)?e.check(E4,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 R4(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ce(e,s,"linePrefix")}function s(o){if(o===null||te(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function q_(e,t,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),h):g===null||g===32||g===41||Wh(g)?n(g):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(g))}function h(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(a),h(g)):g===null||g===60||te(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function y(g){return!u&&(g===null||g===41||Mt(g))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(g)):u<c&&g===40?(e.consume(g),u++,y):g===41?(e.consume(g),u--,y):g===null||g===32||g===40||Wh(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 X_(e,t,n,r,i,s){const o=this;let a=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),u}function u(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):te(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||te(p)||a++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!me(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function Z_(e,t,n,r,i,s){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),c(h))}function c(h){return h===o?(e.exit(s),l(o)):h===null?n(h):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ce(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||te(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:u)}function d(h){return h===o||h===92?(e.consume(h),u):u(h)}}function ta(e,t){let n;return r;function r(i){return te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):me(i)?Ce(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const L4={name:"definition",tokenize:I4},M4={partial:!0,tokenize:A4};function I4(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),o(p)}function o(p){return X_.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=As(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return Mt(p)?ta(e,c)(p):c(p)}function c(p){return q_(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(M4,d,d)(p)}function d(p){return me(p)?Ce(e,h,"whitespace")(p):h(p)}function h(p){return p===null||te(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function A4(e,t,n){return r;function r(a){return Mt(a)?ta(e,i)(a):n(a)}function i(a){return Z_(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return me(a)?Ce(e,o,"whitespace")(a):o(a)}function o(a){return a===null||te(a)?t(a):n(a)}}const D4={name:"hardBreakEscape",tokenize:N4};function N4(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return te(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const F4={name:"headingAtx",resolve:z4,tokenize:B4};function z4(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"},Hn(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function B4(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||Mt(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||te(u)?(e.exit("atxHeading"),t(u)):me(u)?Ce(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Mt(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const O4=["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"],V0=["pre","script","style","textarea"],$4={concrete:!0,name:"htmlFlow",resolveTo:W4,tokenize:H4},V4={partial:!0,tokenize:G4},U4={partial:!0,tokenize:K4};function W4(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 H4(e,t,n){const r=this;let i,s,o,a,l;return c;function c(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),s=!0,y):T===63?(e.consume(T),i=3,r.interrupt?t:k):On(T)?(e.consume(T),o=String.fromCharCode(T),w):n(T)}function h(T){return T===45?(e.consume(T),i=2,p):T===91?(e.consume(T),i=5,a=0,m):On(T)?(e.consume(T),i=4,r.interrupt?t:k):n(T)}function p(T){return T===45?(e.consume(T),r.interrupt?t:k):n(T)}function m(T){const le="CDATA[";return T===le.charCodeAt(a++)?(e.consume(T),a===le.length?r.interrupt?t:M:m):n(T)}function y(T){return On(T)?(e.consume(T),o=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||Mt(T)){const le=T===47,he=o.toLowerCase();return!le&&!s&&V0.includes(he)?(i=1,r.interrupt?t(T):M(T)):O4.includes(o.toLowerCase())?(i=6,le?(e.consume(T),g):r.interrupt?t(T):M(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):s?x(T):v(T))}return T===45||Vt(T)?(e.consume(T),o+=String.fromCharCode(T),w):n(T)}function g(T){return T===62?(e.consume(T),r.interrupt?t:M):n(T)}function x(T){return me(T)?(e.consume(T),x):P(T)}function v(T){return T===47?(e.consume(T),P):T===58||T===95||On(T)?(e.consume(T),b):me(T)?(e.consume(T),v):P(T)}function b(T){return T===45||T===46||T===58||T===95||Vt(T)?(e.consume(T),b):C(T)}function C(T){return T===61?(e.consume(T),_):me(T)?(e.consume(T),C):v(T)}function _(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,E):me(T)?(e.consume(T),_):j(T)}function E(T){return T===l?(e.consume(T),l=null,L):T===null||te(T)?n(T):(e.consume(T),E)}function j(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Mt(T)?C(T):(e.consume(T),j)}function L(T){return T===47||T===62||me(T)?v(T):n(T)}function P(T){return T===62?(e.consume(T),R):n(T)}function R(T){return T===null||te(T)?M(T):me(T)?(e.consume(T),R):n(T)}function M(T){return T===45&&i===2?(e.consume(T),H):T===60&&i===1?(e.consume(T),K):T===62&&i===4?(e.consume(T),O):T===63&&i===3?(e.consume(T),k):T===93&&i===5?(e.consume(T),W):te(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(V4,q,F)(T)):T===null||te(T)?(e.exit("htmlFlowData"),F(T)):(e.consume(T),M)}function F(T){return e.check(U4,z,q)(T)}function z(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),N}function N(T){return T===null||te(T)?F(T):(e.enter("htmlFlowData"),M(T))}function H(T){return T===45?(e.consume(T),k):M(T)}function K(T){return T===47?(e.consume(T),o="",D):M(T)}function D(T){if(T===62){const le=o.toLowerCase();return V0.includes(le)?(e.consume(T),O):M(T)}return On(T)&&o.length<8?(e.consume(T),o+=String.fromCharCode(T),D):M(T)}function W(T){return T===93?(e.consume(T),k):M(T)}function k(T){return T===62?(e.consume(T),O):T===45&&i===2?(e.consume(T),k):M(T)}function O(T){return T===null||te(T)?(e.exit("htmlFlowData"),q(T)):(e.consume(T),O)}function q(T){return e.exit("htmlFlow"),t(T)}}function K4(e,t,n){const r=this;return i;function i(o){return te(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function G4(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Au,t,n)}}const Q4={name:"htmlText",tokenize:Y4};function Y4(e,t,n){const r=this;let i,s,o;return a;function a(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),c):k===47?(e.consume(k),C):k===63?(e.consume(k),v):On(k)?(e.consume(k),j):n(k)}function c(k){return k===45?(e.consume(k),u):k===91?(e.consume(k),s=0,m):On(k)?(e.consume(k),x):n(k)}function u(k){return k===45?(e.consume(k),p):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),h):te(k)?(o=d,K(k)):(e.consume(k),d)}function h(k){return k===45?(e.consume(k),p):d(k)}function p(k){return k===62?H(k):k===45?h(k):d(k)}function m(k){const O="CDATA[";return k===O.charCodeAt(s++)?(e.consume(k),s===O.length?y:m):n(k)}function y(k){return k===null?n(k):k===93?(e.consume(k),w):te(k)?(o=y,K(k)):(e.consume(k),y)}function w(k){return k===93?(e.consume(k),g):y(k)}function g(k){return k===62?H(k):k===93?(e.consume(k),g):y(k)}function x(k){return k===null||k===62?H(k):te(k)?(o=x,K(k)):(e.consume(k),x)}function v(k){return k===null?n(k):k===63?(e.consume(k),b):te(k)?(o=v,K(k)):(e.consume(k),v)}function b(k){return k===62?H(k):v(k)}function C(k){return On(k)?(e.consume(k),_):n(k)}function _(k){return k===45||Vt(k)?(e.consume(k),_):E(k)}function E(k){return te(k)?(o=E,K(k)):me(k)?(e.consume(k),E):H(k)}function j(k){return k===45||Vt(k)?(e.consume(k),j):k===47||k===62||Mt(k)?L(k):n(k)}function L(k){return k===47?(e.consume(k),H):k===58||k===95||On(k)?(e.consume(k),P):te(k)?(o=L,K(k)):me(k)?(e.consume(k),L):H(k)}function P(k){return k===45||k===46||k===58||k===95||Vt(k)?(e.consume(k),P):R(k)}function R(k){return k===61?(e.consume(k),M):te(k)?(o=R,K(k)):me(k)?(e.consume(k),R):L(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,F):te(k)?(o=M,K(k)):me(k)?(e.consume(k),M):(e.consume(k),z)}function F(k){return k===i?(e.consume(k),i=void 0,N):k===null?n(k):te(k)?(o=F,K(k)):(e.consume(k),F)}function z(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||Mt(k)?L(k):(e.consume(k),z)}function N(k){return k===47||k===62||Mt(k)?L(k):n(k)}function H(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function K(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),D}function D(k){return me(k)?Ce(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):W(k)}function W(k){return e.enter("htmlTextData"),o(k)}}const Km={name:"labelEnd",resolveAll:J4,resolveTo:e$,tokenize:t$},q4={tokenize:n$},X4={tokenize:r$},Z4={tokenize:i$};function J4(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&&Hn(e,0,e.length,n),e}function e$(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=an(a,e.slice(s+1,s+r+3)),a=an(a,[["enter",u,t]]),a=an(a,Hm(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=an(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=an(a,e.slice(o+1)),a=an(a,[["exit",l,t]]),Hn(e,s,e.length,a),e}function t$(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(As(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(q4,u,o?u:d)(h):h===91?e.attempt(X4,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(Z4,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function n$(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Mt(d)?ta(e,s)(d):s(d)}function s(d){return d===41?u(d):q_(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Mt(d)?ta(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Z_(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Mt(d)?ta(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function r$(e,t,n){const r=this;return i;function i(a){return X_.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(As(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function i$(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 s$={name:"labelStartImage",resolveAll:Km.resolveAll,tokenize:o$};function o$(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 a$={name:"labelStartLink",resolveAll:Km.resolveAll,tokenize:l$};function l$(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 Qd={name:"lineEnding",tokenize:c$};function c$(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ce(e,t,"linePrefix")}}const ic={name:"thematicBreak",tokenize:u$};function u$(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),me(c)?Ce(e,a,"whitespace")(c):a(c))}}const _t={continuation:{tokenize:p$},exit:g$,name:"list",tokenize:h$},d$={partial:!0,tokenize:y$},f$={partial:!0,tokenize:m$};function h$(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:Hh(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(ic,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return Hh(p)&&++o<10?(e.consume(p),l):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Au,r.interrupt?n:u,e.attempt(d$,h,d))}function u(p){return r.containerState.initialBlankLine=!0,s++,h(p)}function d(p){return me(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function p$(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Au,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!me(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(f$,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(e,e.attempt(_t,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function m$(e,t,n){const r=this;return Ce(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function g$(e){e.exit(this.containerState.type)}function y$(e,t,n){const r=this;return Ce(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!me(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const U0={name:"setextUnderline",resolveTo:x$,tokenize:v$};function x$(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 v$(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),me(c)?Ce(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const w$={tokenize:b$};function b$(e){const t=this,n=e.attempt(Au,r,e.attempt(this.parser.constructs.flowInitial,i,Ce(e,e.attempt(this.parser.constructs.flow,i,e.attempt(P4,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 k$={resolveAll:eS()},_$=J_("string"),S$=J_("text");function J_(e){return{resolveAll:eS(e==="text"?C$:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function eS(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 C$(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const P$={42:_t,43:_t,45:_t,48:_t,49:_t,50:_t,51:_t,52:_t,53:_t,54:_t,55:_t,56:_t,57:_t,62:K_},E$={91:L4},j$={[-2]:Gd,[-1]:Gd,32:Gd},T$={35:F4,42:ic,45:[U0,ic],60:$4,61:U0,95:ic,96:$0,126:$0},R$={38:Q_,92:G_},L$={[-5]:Qd,[-4]:Qd,[-3]:Qd,33:s$,38:Q_,42:Kh,60:[a4,Q4],91:a$,92:[D4,G_],93:Km,95:Kh,96:w4},M$={null:[Kh,k$]},I$={null:[42,95]},A$={null:[]},D$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:I$,contentInitial:E$,disable:A$,document:P$,flow:T$,flowInitial:j$,insideSpan:M$,string:R$,text:L$},Symbol.toStringTag,{value:"Module"}));function N$(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:E(C),check:E(_),consume:x,enter:v,exit:b,interrupt:E(_,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function d(R){return o=an(o,R),w(),o[o.length-1]!==null?[]:(j(t,0),c.events=Hm(s,c.events,c),c.events)}function h(R,M){return z$(p(R),M)}function p(R){return F$(o,R)}function m(){const{_bufferIndex:R,_index:M,line:F,column:z,offset:N}=r;return{_bufferIndex:R,_index:M,line:F,column:z,offset:N}}function y(R){i[R.line]=R.column,P()}function w(){let R;for(;r._index<o.length;){const M=o[r._index];if(typeof M=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<M.length;)g(M.charCodeAt(r._bufferIndex));else g(M)}}function g(R){u=u(R)}function x(R){te(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,P()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function v(R,M){const F=M||{};return F.type=R,F.start=m(),c.events.push(["enter",F,c]),a.push(F),F}function b(R){const M=a.pop();return M.end=m(),c.events.push(["exit",M,c]),M}function C(R,M){j(R,M.from)}function _(R,M){M.restore()}function E(R,M){return F;function F(z,N,H){let K,D,W,k;return Array.isArray(z)?q(z):"tokenize"in z?q([z]):O(z);function O(pe){return rt;function rt(Be){const it=Be!==null&&pe[Be],Dt=Be!==null&&pe.null,Zt=[...Array.isArray(it)?it:it?[it]:[],...Array.isArray(Dt)?Dt:Dt?[Dt]:[]];return q(Zt)(Be)}}function q(pe){return K=pe,D=0,pe.length===0?H:T(pe[D])}function T(pe){return rt;function rt(Be){return k=L(),W=pe,pe.partial||(c.currentConstruct=pe),pe.name&&c.parser.constructs.disable.null.includes(pe.name)?he():pe.tokenize.call(M?Object.assign(Object.create(c),M):c,l,le,he)(Be)}}function le(pe){return R(W,k),N}function he(pe){return k.restore(),++D<K.length?T(K[D]):H}}}function j(R,M){R.resolveAll&&!s.includes(R)&&s.push(R),R.resolve&&Hn(c.events,M,c.events.length-M,R.resolve(c.events.slice(M),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function L(){const R=m(),M=c.previous,F=c.currentConstruct,z=c.events.length,N=Array.from(a);return{from:z,restore:H};function H(){r=R,c.previous=M,c.currentConstruct=F,c.events.length=z,a=N,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function F$(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 z$(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=`
66
+ `;break}case-3:{o=`\r
67
+ `;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 B$(e){const r={constructs:KO([D$,...(e||{}).extensions||[]]),content:i(e4),defined:[],document:i(n4),flow:i(w$),lazy:{},string:i(_$),text:i(S$)};return r;function i(s){return o;function o(a){return N$(r,s,a)}}}function O$(e){for(;!Y_(e););return e}const W0=/[\0\t\n\r]/g;function $$(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,d,h,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(W0.lastIndex=d,c=W0.exec(s),h=c&&c.index!==void 0?c.index:s.length,p=s.charCodeAt(h),!c){t=s.slice(d);break}if(p===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const V$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function U$(e){return e.replace(V$,W$)}function W$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return H_(n.slice(s?2:1),s?16:10)}return Wm(n)||e}const tS={}.hasOwnProperty;function H$(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),K$(n)(O$(B$(n).document().write($$()(e,t,!0))))}function K$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Jt),autolinkProtocol:L,autolinkEmail:L,atxHeading:s(fr),blockQuote:s(Dt),characterEscape:L,characterReference:L,codeFenced:s(Zt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Zt,o),codeText:s(Gn,o),codeTextData:L,data:L,codeFlowValue:L,definition:s(dr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(Qn),hardBreakEscape:s(Ye),hardBreakTrailing:s(Ye),htmlFlow:s(Pe,o),htmlFlowData:L,htmlText:s(Pe,o),htmlTextData:L,image:s(bt),label:o,link:s(Jt),listItem:s(fo),listItemValue:h,listOrdered:s(st,d),listUnordered:s(st),paragraph:s(hr),reference:T,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(fr),strong:s(ai),thematicBreak:s(ue)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:it,autolinkProtocol:Be,blockQuote:l(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:pe,characterReference:rt,codeFenced:l(w),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:P,codeIndented:l(g),codeText:l(N),codeTextData:P,data:P,definition:l(),definitionDestinationString:b,definitionLabelString:x,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(F),htmlFlowData:P,htmlText:l(z),htmlTextData:P,image:l(K),label:W,labelText:D,lineEnding:R,link:l(H),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:le,resourceDestinationString:k,resourceTitleString:O,resource:q,setextHeading:l(j),setextHeadingLineSequence:E,setextHeadingText:_,strong:l(),thematicBreak:l()}};nS(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(A){let $={type:"root",children:[]};const X={stack:[$],tokenStack:[],config:t,enter:a,exit:c,buffer:o,resume:u,data:n},se=[];let ge=-1;for(;++ge<A.length;)if(A[ge][1].type==="listOrdered"||A[ge][1].type==="listUnordered")if(A[ge][0]==="enter")se.push(ge);else{const Nt=se.pop();ge=i(A,Nt,ge)}for(ge=-1;++ge<A.length;){const Nt=t[A[ge][0]];tS.call(Nt,A[ge][1].type)&&Nt[A[ge][1].type].call(Object.assign({sliceSerialize:A[ge][2].sliceSerialize},X),A[ge][1])}if(X.tokenStack.length>0){const Nt=X.tokenStack[X.tokenStack.length-1];(Nt[1]||H0).call(X,void 0,Nt[0])}for($.position={start:Sr(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:Sr(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},ge=-1;++ge<t.transforms.length;)$=t.transforms[ge]($)||$;return $}function i(A,$,X){let se=$-1,ge=-1,Nt=!1,Yn,mn,li,mr;for(;++se<=X;){const ot=A[se];switch(ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ot[0]==="enter"?ge++:ge--,mr=void 0;break}case"lineEndingBlank":{ot[0]==="enter"&&(Yn&&!mr&&!ge&&!li&&(li=se),mr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mr=void 0}if(!ge&&ot[0]==="enter"&&ot[1].type==="listItemPrefix"||ge===-1&&ot[0]==="exit"&&(ot[1].type==="listUnordered"||ot[1].type==="listOrdered")){if(Yn){let B=se;for(mn=void 0;B--;){const xe=A[B];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;mn&&(A[mn][1].type="lineEndingBlank",Nt=!0),xe[1].type="lineEnding",mn=B}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}li&&(!mn||li<mn)&&(Yn._spread=!0),Yn.end=Object.assign({},mn?A[mn][1].start:ot[1].end),A.splice(mn||se,0,["exit",Yn,ot[2]]),se++,X++}if(ot[1].type==="listItemPrefix"){const B={type:"listItem",_spread:!1,start:Object.assign({},ot[1].start),end:void 0};Yn=B,A.splice(se,0,["enter",B,ot[2]]),se++,X++,li=void 0,mr=!0}}}return A[$][1]._spread=Nt,X}function s(A,$){return X;function X(se){a.call(this,A(se),se),$&&$.call(this,se)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(A,$,X){this.stack[this.stack.length-1].children.push(A),this.stack.push(A),this.tokenStack.push([$,X||void 0]),A.position={start:Sr($.start),end:void 0}}function l(A){return $;function $(X){A&&A.call(this,X),c.call(this,X)}}function c(A,$){const X=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==A.type&&($?$.call(this,A,se[0]):(se[1]||H0).call(this,A,se[0]));else throw new Error("Cannot close `"+A.type+"` ("+ea({start:A.start,end:A.end})+"): it’s not open");X.position.end=Sr(A.end)}function u(){return WO(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(A){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(A),10),this.data.expectingFirstListItemValue=void 0}}function p(){const A=this.resume(),$=this.stack[this.stack.length-1];$.lang=A}function m(){const A=this.resume(),$=this.stack[this.stack.length-1];$.meta=A}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const A=this.resume(),$=this.stack[this.stack.length-1];$.value=A.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const A=this.resume(),$=this.stack[this.stack.length-1];$.value=A.replace(/(\r?\n|\r)$/g,"")}function x(A){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=As(this.sliceSerialize(A)).toLowerCase()}function v(){const A=this.resume(),$=this.stack[this.stack.length-1];$.title=A}function b(){const A=this.resume(),$=this.stack[this.stack.length-1];$.url=A}function C(A){const $=this.stack[this.stack.length-1];if(!$.depth){const X=this.sliceSerialize(A).length;$.depth=X}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function E(A){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(A).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function L(A){const X=this.stack[this.stack.length-1].children;let se=X[X.length-1];(!se||se.type!=="text")&&(se=pr(),se.position={start:Sr(A.start),end:void 0},X.push(se)),this.stack.push(se)}function P(A){const $=this.stack.pop();$.value+=this.sliceSerialize(A),$.position.end=Sr(A.end)}function R(A){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=$.children[$.children.length-1];X.position.end=Sr(A.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes($.type)&&(L.call(this,A),P.call(this,A))}function M(){this.data.atHardBreak=!0}function F(){const A=this.resume(),$=this.stack[this.stack.length-1];$.value=A}function z(){const A=this.resume(),$=this.stack[this.stack.length-1];$.value=A}function N(){const A=this.resume(),$=this.stack[this.stack.length-1];$.value=A}function H(){const A=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=$,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function K(){const A=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=$,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function D(A){const $=this.sliceSerialize(A),X=this.stack[this.stack.length-2];X.label=U$($),X.identifier=As($).toLowerCase()}function W(){const A=this.stack[this.stack.length-1],$=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const se=A.children;X.children=se}else X.alt=$}function k(){const A=this.resume(),$=this.stack[this.stack.length-1];$.url=A}function O(){const A=this.resume(),$=this.stack[this.stack.length-1];$.title=A}function q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function le(A){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=As(this.sliceSerialize(A)).toLowerCase(),this.data.referenceType="full"}function he(A){this.data.characterReferenceType=A.type}function pe(A){const $=this.sliceSerialize(A),X=this.data.characterReferenceType;let se;X?(se=H_($,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=Wm($);const ge=this.stack[this.stack.length-1];ge.value+=se}function rt(A){const $=this.stack.pop();$.position.end=Sr(A.end)}function Be(A){P.call(this,A);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(A)}function it(A){P.call(this,A);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(A)}function Dt(){return{type:"blockquote",children:[]}}function Zt(){return{type:"code",lang:null,meta:null,value:""}}function Gn(){return{type:"inlineCode",value:""}}function dr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Qn(){return{type:"emphasis",children:[]}}function fr(){return{type:"heading",depth:0,children:[]}}function Ye(){return{type:"break"}}function Pe(){return{type:"html",value:""}}function bt(){return{type:"image",title:null,url:"",alt:null}}function Jt(){return{type:"link",title:null,url:"",children:[]}}function st(A){return{type:"list",ordered:A.type==="listOrdered",start:null,spread:A._spread,children:[]}}function fo(A){return{type:"listItem",spread:A._spread,checked:null,children:[]}}function hr(){return{type:"paragraph",children:[]}}function ai(){return{type:"strong",children:[]}}function pr(){return{type:"text",value:""}}function ue(){return{type:"thematicBreak"}}}function Sr(e){return{line:e.line,column:e.column,offset:e.offset}}function nS(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?nS(e,r):G$(e,r)}}function G$(e,t){let n;for(n in t)if(tS.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 H0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is still open")}function Q$(e){const t=this;t.parser=n;function n(r){return H$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Y$(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 q$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
68
+ `}]}function X$(e,t){const n=t.value?t.value+`
69
+ `:"",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 Z$(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function J$(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function e5(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=co(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function t5(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 n5(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function rS(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 r5(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rS(e,t);const i={src:co(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 i5(e,t){const n={src:co(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 s5(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 o5(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rS(e,t);const i={href:co(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 a5(e,t){const n={href:co(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 l5(e,t,n){const r=e.all(t),i=n?c5(n):iS(t),s={},o=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
70
+ `}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
71
+ `});const c={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,c),e.applyData(t,c)}function c5(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=iS(n[r])}return t}function iS(e){const t=e.spread;return t??e.children.length>1}function u5(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 d5(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function f5(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function h5(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function p5(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=Om(t.children[1]),l=z_(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 m5(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const c=[];for(;++l<a;){const d=t.children[l],h={},p=o?o[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:s,properties:h,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),c.push(m)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function g5(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const K0=9,G0=32;function y5(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Q0(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Q0(t.slice(i),i>0,!1)),s.join("")}function Q0(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===K0||s===G0;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===K0||s===G0;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function x5(e,t){const n={type:"text",value:y5(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function v5(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const w5={blockquote:Y$,break:q$,code:X$,delete:Z$,emphasis:J$,footnoteReference:e5,heading:t5,html:n5,imageReference:r5,image:i5,inlineCode:s5,linkReference:o5,link:a5,listItem:l5,list:u5,paragraph:d5,root:f5,strong:h5,table:p5,tableCell:g5,tableRow:m5,text:x5,thematicBreak:v5,toml:Sl,yaml:Sl,definition:Sl,footnoteDefinition:Sl};function Sl(){}const sS=-1,Du=0,na=1,Zc=2,Gm=3,Qm=4,Ym=5,qm=6,oS=7,aS=8,b5=typeof self=="object"?self:globalThis,Y0=(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 b5[e](t)},k5=(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 Du:case sS:return n(o,i);case na:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Zc:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case Gm:return n(new Date(o),i);case Qm:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Ym:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case qm:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case oS:{const{name:a,message:l}=o;return n(Y0(a,l),i)}case aS: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(Y0(s,o),i)};return r},q0=e=>k5(new Map,e)(0),rs="",{toString:_5}={},{keys:S5}=Object,Io=e=>{const t=typeof e;if(t!=="object"||!e)return[Du,t];const n=_5.call(e).slice(8,-1);switch(n){case"Array":return[na,rs];case"Object":return[Zc,rs];case"Date":return[Gm,rs];case"RegExp":return[Qm,rs];case"Map":return[Ym,rs];case"Set":return[qm,rs];case"DataView":return[na,n]}return n.includes("Array")?[na,n]:n.includes("Error")?[oS,n]:[Zc,n]},Cl=([e,t])=>e===Du&&(t==="function"||t==="symbol"),C5=(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]=Io(o);switch(a){case Du:{let u=o;switch(l){case"bigint":a=aS,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([sS],o)}return i([a,u],o)}case na:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const u=[],d=i([a,u],o);for(const h of o)u.push(s(h));return d}case Zc:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const u=[],d=i([a,u],o);for(const h of S5(o))(e||!Cl(Io(o[h])))&&u.push([s(h),s(o[h])]);return d}case Gm:return i([a,o.toISOString()],o);case Qm:{const{source:u,flags:d}=o;return i([a,{source:u,flags:d}],o)}case Ym:{const u=[],d=i([a,u],o);for(const[h,p]of o)(e||!(Cl(Io(h))||Cl(Io(p))))&&u.push([s(h),s(p)]);return d}case qm:{const u=[],d=i([a,u],o);for(const h of o)(e||!Cl(Io(h)))&&u.push(s(h));return d}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},X0=(e,{json:t,lossy:n}={})=>{const r=[];return C5(!(t||n),!!t,new Map,r)(e),r},Jc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?q0(X0(e,t)):structuredClone(e):(e,t)=>q0(X0(e,t));function P5(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 E5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function j5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||P5,r=e.options.footnoteBackLabel||E5,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),h=co(d.toLowerCase());let p=0;const m=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++p<=y;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(l,p);typeof x=="string"&&(x={type:"text",value:x}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const w=u[u.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const x=w.children[w.children.length-1];x&&x.type==="text"?x.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else u.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Jc(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
72
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
73
+ `}]}}const lS=function(e){if(e==null)return M5;if(typeof e=="function")return Nu(e);if(typeof e=="object")return Array.isArray(e)?T5(e):R5(e);if(typeof e=="string")return L5(e);throw new Error("Expected function, string, or object as test")};function T5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=lS(e[n]);return Nu(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function R5(e){const t=e;return Nu(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function L5(e){return Nu(t);function t(n){return n&&n.type===e}}function Nu(e){return t;function t(n,r,i){return!!(I5(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function M5(){return!0}function I5(e){return e!==null&&typeof e=="object"&&"type"in e}const cS=[],A5=!0,Z0=!1,D5="skip";function N5(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=lS(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=cS,m,y,w;if((!t||s(l,c,u[u.length-1]||void 0))&&(p=F5(n(l,u)),p[0]===Z0))return p;if("children"in l&&l.children){const g=l;if(g.children&&p[0]!==D5)for(y=(r?g.children.length:-1)+o,w=u.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=a(x,y,w)(),m[0]===Z0)return m;y=typeof m[1]=="number"?m[1]:y+o}}return p}}}function F5(e){return Array.isArray(e)?e:typeof e=="number"?[A5,e]:e==null?cS:[e]}function uS(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),N5(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const Gh={}.hasOwnProperty,z5={};function B5(e,t){const n=t||z5,r=new Map,i=new Map,s=new Map,o={...w5,...n.handlers},a={all:c,applyData:$5,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:O5,wrap:U5};return uS(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),a;function l(u,d){const h=u.type,p=a.handlers[h];if(Gh.call(a.handlers,h)&&p)return p(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:y,...w}=u,g=Jc(w);return g.children=a.all(u),g}return Jc(u)}return(a.options.unknownHandler||V5)(a,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let p=-1;for(;++p<h.length;){const m=a.one(h[p],u);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=J0(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=J0(y.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function O5(e,t){e.position&&(t.position=kO(e))}function $5(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,Jc(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function V5(e,t){const n=t.data||{},r="value"in t&&!(Gh.call(n,"hProperties")||Gh.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 U5(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
74
+ `});++r<e.length;)r&&n.push({type:"text",value:`
75
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
76
+ `}),n}function J0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ev(e,t){const n=B5(e,t),r=n.one(e,void 0),i=j5(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
77
+ `},i),s}function W5(e,t){return e&&"run"in e?async function(n,r){const i=ev(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ev(n,{file:r,...e||t})}}function tv(e){if(e)throw e}var sc=Object.prototype.hasOwnProperty,dS=Object.prototype.toString,nv=Object.defineProperty,rv=Object.getOwnPropertyDescriptor,iv=function(t){return typeof Array.isArray=="function"?Array.isArray(t):dS.call(t)==="[object Array]"},sv=function(t){if(!t||dS.call(t)!=="[object Object]")return!1;var n=sc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&sc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||sc.call(t,i)},ov=function(t,n){nv&&n.name==="__proto__"?nv(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},av=function(t,n){if(n==="__proto__")if(sc.call(t,n)){if(rv)return rv(t,n).value}else return;return t[n]},H5=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=av(a,n),i=av(t,n),a!==i&&(u&&i&&(sv(i)||(s=iv(i)))?(s?(s=!1,o=r&&iv(r)?r:[]):o=r&&sv(r)?r:{},ov(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&ov(a,{name:n,newValue:i}));return a};const Yd=nu(H5);function Qh(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 K5(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?G5(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function G5(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const Nn={basename:Q5,dirname:Y5,extname:q5,join:X5,sep:"/"};function Q5(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');$a(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 Y5(e){if($a(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 q5(e){$a(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 X5(...e){let t=-1,n;for(;++t<e.length;)$a(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Z5(n)}function Z5(e){$a(e);const t=e.codePointAt(0)===47;let n=J5(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function J5(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 $a(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const eV={cwd:tV};function tV(){return"/"}function Yh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function nV(e){if(typeof e=="string")e=new URL(e);else if(!Yh(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 rV(e)}function rV(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 qd=["history","path","basename","stem","extname","dirname"];class fS{constructor(t){let n;t?Yh(t)?n={path:t}:typeof t=="string"||iV(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":eV.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<qd.length;){const s=qd[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)qd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Nn.basename(this.path):void 0}set basename(t){Zd(t,"basename"),Xd(t,"basename"),this.path=Nn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Nn.dirname(this.path):void 0}set dirname(t){lv(this.basename,"dirname"),this.path=Nn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Nn.extname(this.path):void 0}set extname(t){if(Xd(t,"extname"),lv(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=Nn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Yh(t)&&(t=nV(t)),Zd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Nn.basename(this.path,this.extname):void 0}set stem(t){Zd(t,"stem"),Xd(t,"stem"),this.path=Nn.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 ft(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 Xd(e,t){if(e&&e.includes(Nn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Nn.sep+"`")}function Zd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function iV(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const sV=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},oV={}.hasOwnProperty;class Xm extends sV{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=K5()}copy(){const t=new Xm;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Yd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(tf("data",this.frozen),this.namespace[t]=n,this):oV.call(this.namespace,t)&&this.namespace[t]||void 0:t?(tf("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=Pl(t),r=this.parser||this.Parser;return Jd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Jd("process",this.parser||this.Parser),ef("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=Pl(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const p=d,m=r.stringify(p,h);cV(m)?h.value=m:h.result=m,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Jd("processSync",this.parser||this.Parser),ef("processSync",this.compiler||this.Compiler),this.process(t,i),uv("processSync","process",n),r;function i(s,o){n=!0,tv(s),r=o}}run(t,n,r){cv(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=Pl(n);i.run(t,l,c);function c(u,d,h){const p=d||t;u?a(u):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),uv("runSync","run",r),i;function s(o,a){tv(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=Pl(n),i=this.compiler||this.Compiler;return ef("stringify",i),cv(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(tf("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=Yd(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[p,...m]=u;const y=r[h][1];Qh(y)&&Qh(p)&&(p=Yd(!0,y,p)),r[h]=[c,p,...m]}}}}const aV=new Xm().freeze();function Jd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ef(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function tf(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 cv(e){if(!Qh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function uv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Pl(e){return lV(e)?e:new fS(e)}function lV(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cV(e){return typeof e=="string"||uV(e)}function uV(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dV="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",dv=[],fv={allowDangerousHtml:!0},fV=/^(https?|ircs?|mailto|xmpp)$/i,hV=[{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 pV(e){const t=mV(e),n=gV(e);return yV(t.runSync(t.parse(n),n),e)}function mV(e){const t=e.rehypePlugins||dv,n=e.remarkPlugins||dv,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...fv}:fv;return aV().use(Q$).use(n).use(W5,r).use(t)}function gV(e){const t=e.children||"",n=new fS;return typeof t=="string"&&(n.value=t),n}function yV(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||xV;for(const u of hV)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+dV+u.id,void 0);return uS(e,c),EO(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let p;for(p in Kd)if(Object.hasOwn(Kd,p)&&Object.hasOwn(u.properties,p)){const m=u.properties[p],y=Kd[p];(y===null||y.includes(u.tagName))&&(u.properties[p]=l(String(m||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(u,d,h)),p&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function xV(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||fV.test(e.slice(0,t))?e:""}const nf=e=>({fontFamily:ie.serif,fontWeight:600,fontSize:e,margin:`${I[6]} 0 ${I[3]}`,lineHeight:1.25}),vV={p:({children:e})=>f.jsx("p",{style:{margin:`0 0 ${I[4]}`},children:e}),strong:({children:e})=>f.jsx("strong",{style:{fontWeight:700},children:e}),h1:({children:e})=>f.jsx("h1",{style:nf(ee.lg),children:e}),h2:({children:e})=>f.jsx("h2",{style:nf("1.3rem"),children:e}),h3:({children:e})=>f.jsx("h3",{style:nf("1.1rem"),children:e}),a:({children:e,href:t})=>f.jsx("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:fe.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:`${I[3]} ${I[4]}`,overflowX:"auto",margin:`0 0 ${I[4]}`},children:e}),ul:({children:e})=>f.jsx("ul",{style:{listStyle:"disc",margin:`0 0 ${I[4]}`,paddingLeft:"1.4rem"},children:e}),ol:({children:e})=>f.jsx("ol",{style:{listStyle:"decimal",margin:`0 0 ${I[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 ${I[4]}`,paddingLeft:I[4],borderLeft:"3px solid rgba(0,0,0,0.15)",opacity:.85},children:e})},uo=({children:e})=>f.jsx(pV,{components:vV,children:e}),wV=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}},bV=async e=>{try{return(await fetch("/api/icon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUri:e})})).ok}catch{return!1}},kV=async()=>{try{return(await fetch("/api/package-name")).json()}catch{return null}},_V=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase()),hS=()=>{const[e,t]=S.useState(null),[n,r]=S.useState(null),[i,s]=S.useState(!0);return S.useEffect(()=>{let o=!1;return s(!0),Promise.all([kV().then(a=>{!o&&a&&t(_V(a))}),wV().then(a=>{o||r(a)})]).finally(()=>{o||s(!1)}),()=>{o=!0}},[]),{projectName:e,iconDataUri:n,loading:i}},eu=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`},pS=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)}},hv=e=>e.phases.length===0?null:Math.round(e.phases.filter(t=>t.done).length/e.phases.length*100),SV=(e,t)=>{if(e)return e.find(n=>n.status==="in-progress"||n.status==="review")},CV=["in-progress","review","planned","idea"],PV=["open"],Zm={statuses:CV,tags:[],search:"",sortKey:"status",sortDirection:"asc",noteStatuses:PV},pv={"in-progress":0,review:1,planned:2,idea:3,done:4,dropped:5},El=e=>{const t=new Date(e.updated??e.created).getTime();return Number.isNaN(t)?0:t},mv=e=>{var n;const t=(n=e.id)==null?void 0:n.match(/(\d+)\s*$/);return t?Number(t[1]):Number.POSITIVE_INFINITY},rf=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},gv=(e,t)=>t.size===0?!0:e.tags.some(n=>t.has(n)),Jm=(e,t,n)=>{switch(n){case"status":{const r=pv[e.status]-pv[t.status];return r!==0?r:El(t)-El(e)}case"updated":return El(t)-El(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 mv(e)-mv(t);case"progress":return(hv(t)??-1)-(hv(e)??-1);default:return 0}},qh=(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},oc=(e,t=Zm)=>{const n=new Set(t.tags),r=new Set(t.statuses),i=qh(e.filter(a=>gv(a,n)&&rf(a,t.search)),a=>[a.status]);for(const a of T_)i[a]??(i[a]=0);const s=qh(e.filter(a=>r.has(a.status)&&rf(a,t.search)),a=>a.tags);return{rows:e.filter(a=>r.has(a.status)&&gv(a,n)&&rf(a,t.search)).sort((a,l)=>{const c=Jm(a,l,t.sortKey);return t.sortDirection==="desc"?-c:c}),statusCounts:i,tagCounts:s}},EV=["open","done","dropped"],jV={open:"idea",done:"done",dropped:"dropped"},sf=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},yv=e=>e.type==="plan"?e.plan:e.type==="note"?{title:e.idea.title,id:e.idea.id??void 0,status:jV[e.idea.status??"open"],created:"",tags:[],body:e.idea.body,phases:[]}:{...(e.children.length>0?[...e.children].sort((n,r)=>Jm(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},TV=(e,t,n=Zm)=>{const{statusCounts:r,tagCounts:i}=oc(e,n),s=t.filter(p=>p.kind==="note"),o=t.filter(p=>p.kind!=="note"),a=new Set(o.map(p=>p.id).filter(p=>!!p)),l=new Map,c=[];for(const p of e)if(p.idea&&a.has(p.idea)){const m=l.get(p.idea)??[];m.push(p),l.set(p.idea,m)}else c.push(p);const u=new Set(n.noteStatuses),d=qh(s.filter(p=>sf(p,n.search)),p=>[p.status??"open"]);for(const p of EV)d[p]??(d[p]=0);const h=oc(c,n).rows.map(p=>({type:"plan",plan:p}));for(const p of o){const m=p.id?l.get(p.id)??[]:[],y=oc(m,n).rows;y.length===0&&(m.length>0||!sf(p,n.search))||h.push({type:"idea-group",idea:p,children:y})}for(const p of s)u.has(p.status??"open")&&sf(p,n.search)&&h.push({type:"note",idea:p});return h.sort((p,m)=>{const y=Jm(yv(p),yv(m),n.sortKey);return n.sortDirection==="desc"?-y:y}),{rows:h,statusCounts:r,tagCounts:i,noteStatusCounts:d}},RV={},xv=e=>{let t;const n=new Set,r=(u,d)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const p=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(m=>m(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(RV?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},LV=e=>e?xv(e):xv,mS={},{useDebugValue:MV}=Ds,{useSyncExternalStoreWithSelector:IV}=Nj;let vv=!1;const AV=e=>e;function DV(e,t=AV,n){(mS?"production":void 0)!=="production"&&n&&!vv&&(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"),vv=!0);const r=IV(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return MV(r),r}const wv=e=>{(mS?"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"?LV(e):e,n=(r,i)=>DV(t,r,i);return Object.assign(n,t),n},NV=e=>e?wv(e):wv,FV=async()=>(await fetch("/api/agent/status")).json(),zV=async()=>(await fetch("/api/agent/reconcile-queue")).json(),BV=async(e,t)=>{const n=await fetch("/api/agent/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,phaseIndex:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},OV=async(e,t)=>{const n=await fetch("/api/agent/launch-audit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,prompt:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},$V=async(e,t)=>{const n=await fetch("/api/agent/launch-reconcile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,prompt:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},VV=async(e,t)=>{const n=await fetch("/api/agent/launch-draft",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ideaId:e,prompt:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},UV=async(e,t)=>{const n=await fetch("/api/agent/launch-extend",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ideaId:e,prompt:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},WV=async()=>{const e=await fetch("/api/agent/launch-reconcile-all",{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({error:"Launch failed"}));throw new Error(t.error)}},HV=async e=>{const t=await fetch("/api/agent/launch-run-all",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Launch failed"}));throw new Error(n.error)}},KV=async()=>{const e=await fetch("/api/agent/stop",{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({error:"Stop failed"}));throw new Error(t.error)}},GV="modulepreload",QV=function(e){return"/"+e},bv={},YV=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=QV(l),l in bv)return;bv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":GV,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((h,p)=>{d.addEventListener("load",h),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},qV=async()=>(await fetch("/api/decisions")).json(),XV=async()=>(await fetch("/api/open-questions")).json(),ZV=async()=>(await fetch("/api/progress")).json(),JV=async()=>(await fetch("/api/docs")).json(),e6=async()=>(await fetch("/api/consistency")).json(),t6=async(e,t,n)=>{const r=await fetch(`/api/open-questions/resolve?title=${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:t,rationale:n})});if(!r.ok){const o=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error??"Failed to resolve open question")}const{loadDecisions:i,loadOpenQuestions:s}=await YV(async()=>{const{loadDecisions:o,loadOpenQuestions:a}=await Promise.resolve().then(()=>g6);return{loadDecisions:o,loadOpenQuestions:a}},void 0).then(o=>o.useAppStore.getState());return await Promise.all([i(),s()]),r.json()};async function Va(e,t){if(e.ok)return;const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}const n6=async()=>{const e=await fetch("/api/git/status");return await Va(e,"Failed to load git status"),e.json()},r6=async(e,t,n)=>{const r=await fetch("/api/git/commit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e,title:t,message:n})});await Va(r,"Commit failed")},i6=async()=>{const e=await fetch("/api/git/push",{method:"POST"});await Va(e,"Push failed")},s6=async e=>{const t=await fetch("/api/git/suggest-commit-message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})});return await Va(t,"Failed to suggest a commit message"),t.json()},o6=async e=>{const t=await fetch("/api/git/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e})});await Va(t,"Sync failed")},a6=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},l6=async()=>(await fetch("/api/ideas")).json(),c6=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},u6=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=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"DELETE"})},_s=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})`)}},h6=async()=>(await fetch("/api/status")).json(),p6=async e=>{await fetch(`/api/status/check?name=${e}`,{method:"POST"})},m6=async()=>{await fetch("/api/status/fix",{method:"POST"})},G=NV((e,t)=>({plans:null,plansLoading:!1,plansError:null,loadPlans:async()=>{e({plansLoading:!0});try{const n=await u6();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:Zm,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 qV();e({decisions:n.entries,decisionsLoading:!1})}catch{e({decisions:[],decisionsLoading:!1})}},openQuestions:[],openQuestionsLoading:!0,loadOpenQuestions:async()=>{e({openQuestionsLoading:!0});try{const n=await XV();e({openQuestions:n.entries,openQuestionsLoading:!1})}catch{e({openQuestions:[],openQuestionsLoading:!1})}},progress:[],progressLoading:!0,loadProgress:async()=>{e({progressLoading:!0});try{const n=await ZV();e({progress:n.entries,progressLoading:!1})}catch{e({progress:[],progressLoading:!1})}},repoDocs:[],repoDocsLoading:!0,loadRepoDocs:async()=>{e({repoDocsLoading:!0});try{const n=await JV();e({repoDocs:n.files,repoDocsLoading:!1});const{activeDocTitle:r}=t();if(!r){const i=["MAIN.md","README.md"].find(s=>n.files.some(o=>o.name===s));i&&e({activeDocTitle:i})}}catch{e({repoDocs:[],repoDocsLoading:!1})}},activeDocTitle:null,setActiveDocTitle:n=>e({activeDocTitle:n}),docSearchQuery:"",setDocSearchQuery:n=>e({docSearchQuery:n}),activeSettingsSection:"general",setActiveSettingsSection:n=>e({activeSettingsSection:n}),settingsConfigFiles:[],setSettingsConfigFiles:n=>e({settingsConfigFiles:n}),status:null,loadStatus:async()=>{try{const n=await h6();e({status:n})}catch{}},runCheck:async n=>{try{await p6(n)}catch{}},fixQuality:async()=>{try{await m6()}catch{}},consistency:[],loadConsistency:async()=>{try{const n=await e6();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 n6();e({gitStatus:r,gitBranch:n,gitAhead:i,gitBranchHygiene:s})}catch{}},agentStatus:null,loadAgentStatus:async()=>{try{const n=await FV();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 zV();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 BV(n,r),await t().loadAgentStatus()},launchPlanAudit:async(n,r)=>{await OV(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 $V(n,r)}catch(o){throw e({pendingReconcile:null}),o}await t().loadAgentStatus()},launchPlanDraft:async(n,r)=>{await VV(n,r),await t().loadAgentStatus()},launchIdeaExtend:async(n,r)=>{await UV(n,r),await t().loadAgentStatus()},launchBatchReconcile:async()=>{e({batchReconcileConsumed:!1}),await WV(),await t().loadAgentStatus()},launchRunAll:async n=>{await HV(n),await t().loadAgentStatus()},stopAgent:async()=>{await KV(),await t().loadAgentStatus()},pendingReconcile:null,reconcileQueue:[],removeFromReconcileQueue:n=>e(r=>({reconcileQueue:r.reconcileQueue.filter(i=>i.planId!==n)})),batchReconcileConsumed:!1})),g6=Object.freeze(Object.defineProperty({__proto__:null,useAppStore:G},Symbol.toStringTag,{value:"Module"})),y6=["decisions","questions","progress","repo-docs"];function eg(){const{planId:e}=Aa({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function x6(){const{ideaId:e}=Aa({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function v6(){const{section:e}=Aa({strict:!1});return y6.includes(e)?e:null}function gS(){const e=v6(),t=G(r=>r.activeDocTitle),n=G(r=>r.repoDocs);return e??(t&&n.some(r=>r.name===t)?"repo-docs":null)}const w6=({size:e="md"})=>{const{projectName:t,iconDataUri:n,loading:r}=hS(),i=e==="sm"?20:18,s=e==="sm"?ee.sm:ee.md;return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],minWidth:0},children:[n?f.jsx("img",{src:n,alt:"",style:{width:i,height:i,objectFit:"contain",flexShrink:0}}):f.jsx(sz,{icon:f.jsx(dN,{}),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"})]})},ji=({children:e})=>f.jsx("h1",{className:"text-4xl",style:{fontFamily:ie.serif,fontWeight:600,color:fe.textPrimary,margin:`0 0 ${I[6]}`,lineHeight:1.1},children:e}),b6=({routeKey:e,children:t,mobileOpen:n,onMobileClose:r})=>{const i=Ru(),s=S.useRef(null);return S.useEffect(()=>{if(!n)return;const o=a=>{a.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[n,r]),S.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:j_.sidebarWidth,flexShrink:0,height:"100%",display:"flex",flexDirection:"column",background:n?"var(--pui-bg-base)":"transparent",boxShadow:n?"2px 0 12px rgba(0,0,0,0.15)":void 0,overflow:"hidden"},children:f.jsx("div",{style:{flex:1,overflowY:"auto",paddingTop:I[5],position:"relative"},children:f.jsx(ju,{mode:"wait",children:f.jsx(Qs.div,{initial:i?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:i?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},children:t},e)})})})]})};function kv(e){const t=e.match(/Found (\d+) errors?\./);return t?Number(t[1]):0}function k6(e,t){const n=kv(e)+kv(t);return n>0?`${n} lint/format issue${n===1?"":"s"} found.`:"Lint or format check failed."}function _6(e){const t=e.match(/Tests\s+(\d+) failed/);return t?`${t[1]} test${t[1]==="1"?"":"s"} failed.`:"Tests failed."}const _v="papercamp.commitTitle",Sv="papercamp.commitMessage",S6=["core","cli","app","server","agent","plans","ideas","docs","settings","stack","ui","ci","config","deps","repo"];function Cv(e){try{return localStorage.getItem(e)??""}catch{return""}}function Pv(e,t){try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}const C6=({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("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"})]}),Ev=`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")`,jl=fe.deskBg,jv=fe.deskLight,j6=fe.deskText,nn=fe.deskTextMuted,T6=fe.deskBorder,Cr=fe.deskChalk,of={fontFamily:ie.serif,fontSize:ee.base,fontWeight:600,color:nn,marginBottom:I[3]},R6=({open:e,onToggle:t,pinned:n=!1})=>{var mr,ot;const r=e||n,i=G(B=>B.plans),s=G(B=>B.loadProgress),o=G(B=>B.loadPlans),a=G(B=>B.status),l=G(B=>B.loadStatus),c=G(B=>B.runCheck),u=G(B=>B.fixQuality),d=G(B=>B.consistency),h=G(B=>B.loadConsistency),p=G(B=>B.setActiveDocTitle),m=G(B=>B.loadGitStatus),y=G(B=>B.gitStatus),w=G(B=>B.gitBranch),g=G(B=>B.gitAhead),x=G(B=>B.gitBranchHygiene),v=G(B=>B.agentStatus),b=G(B=>B.loadAgentStatus),C=G(B=>B.stopAgent),[_,E]=S.useState(!1),[j,L]=S.useState(!1),[P,R]=S.useState(!1),[M,F]=S.useState(new Set),[z,N]=S.useState(()=>Cv(_v)),[H,K]=S.useState(()=>Cv(Sv)),[D,W]=S.useState(!1),[k,O]=S.useState(!1),[q,T]=S.useState(null),[le,he]=S.useState(null),[pe,rt]=S.useState(!1),[Be,it]=S.useState(null),[Dt,Zt]=S.useState(!1),[Gn,dr]=S.useState(null),Qn=Ru(),fr=Kn(),Ye=S.useRef({loadProgress:s,loadPlans:o,loadStatus:l,loadConsistency:h,loadGitStatus:m,loadAgentStatus:b});Ye.current={loadProgress:s,loadPlans:o,loadStatus:l,loadConsistency:h,loadGitStatus:m,loadAgentStatus:b},S.useEffect(()=>{Ye.current.loadProgress(),Ye.current.loadStatus(),Ye.current.loadConsistency(),Ye.current.loadGitStatus(),Ye.current.loadAgentStatus()},[]),S.useEffect(()=>{const B=new EventSource("/api/activity/stream");return B.onmessage=()=>{Ye.current.loadProgress(),Ye.current.loadPlans(),Ye.current.loadStatus(),Ye.current.loadConsistency(),Ye.current.loadGitStatus(),Ye.current.loadAgentStatus()},()=>B.close()},[]);const Pe=S.useMemo(()=>SV(i==null?void 0:i.entries),[i==null?void 0:i.entries]),bt=S.useMemo(()=>{var He,Tn;const B=((He=a==null?void 0:a.lint)==null?void 0:He.status)??"stale",xe=((Tn=a==null?void 0:a.format)==null?void 0:Tn.status)??"stale";return B==="running"||xe==="running"?"running":B==="fail"||xe==="fail"?"fail":B==="stale"&&xe==="stale"?"stale":"pass"},[a]),Jt=((mr=a==null?void 0:a.test)==null?void 0:mr.status)??"stale",st=((ot=a==null?void 0:a.consistency)==null?void 0:ot.status)??"stale",fo=bt==="running"||Jt==="running"||st==="running",hr=d.length>0,ai=bt==="fail"||Jt==="fail"||st==="fail"||hr,pr=(v==null?void 0:v.status)==="running"||(v==null?void 0:v.status)==="starting"||(v==null?void 0:v.status)==="stopping",ue=S.useMemo(()=>{var xe;return((xe=Pe==null?void 0:Pe.tags)==null?void 0:xe.find(He=>S6.includes(He)))??"repo"},[Pe]),A=S.useMemo(()=>!!(Pe!=null&&Pe.phases.length)&&Pe.phases.every(B=>B.done),[Pe]),$=S.useMemo(()=>{if(!Pe)return"";const B=Pe.kind??"feat";return A?`${B}(${ue}): updates`:`${B}(${ue}): ${Pe.title}`},[Pe,ue,A]),X=S.useMemo(()=>{if(!Pe)return"";const B=Pe.id?`Refs: ${Pe.id}`:"";return[!A&&Pe.phases.length?Pe.phases.map(He=>`- ${He.text}`).join(`
78
+ `):"",B].filter(Boolean).join(`
79
+
80
+ `)},[Pe,A]);S.useEffect(()=>{$&&!z&&N($)},[$,z]),S.useEffect(()=>{X&&!H&&K(X)},[X,H]),S.useEffect(()=>{Pv(_v,z)},[z]),S.useEffect(()=>{Pv(Sv,H)},[H]),S.useEffect(()=>{y&&F(new Set(y.map(B=>B.path)))},[y]);const se=S.useCallback(B=>{F(xe=>{const He=new Set(xe);return He.has(B)?He.delete(B):He.add(B),He})},[]),ge=S.useCallback(async()=>{if(z.trim()){W(!0),he(null);try{await r6([...M],z.trim(),H.trim()||void 0),N($),K(""),L(!1),await m()}catch(B){he(B.message)}finally{W(!1)}}},[z,H,M,$,m]),Nt=S.useCallback(async()=>{O(!0),T(null);try{await i6(),await m()}catch(B){T(B.message)}finally{O(!1)}},[m]),Yn=S.useCallback(async()=>{Zt(!0),dr(null);try{const B=y&&y.length===0;await o6(B?"clean":"dirty"),await m()}catch(B){dr(B.message)}finally{Zt(!1)}},[y,m]),mn=S.useCallback(async()=>{if(M.size!==0){rt(!0),it(null);try{const B=await s6([...M]);N(B.title),K(B.message)}catch(B){it(B.message)}finally{rt(!1)}}},[M]),li=S.useCallback(B=>{if(B.kind==="blocked-plan-active"&&B.planId){const xe=i==null?void 0:i.entries.find(He=>He.id===B.planId);if(xe){fr({to:"/plans/$planId",params:{planId:encodeURIComponent(xe.title)}});return}}p(B.title),fr({to:"/docs/$section",params:{section:B.section==="open-questions"?"questions":"decisions"}})},[i==null?void 0:i.entries,fr,p]);return f.jsxs(f.Fragment,{children:[f.jsx(ju,{children:!r&&f.jsx(Qs.div,{initial:Qn?void 0:{opacity:0,x:20},animate:{opacity:1,x:0},exit:Qn?void 0:{opacity:0,x:20},transition:{duration:Qn?0:.2,ease:"easeOut"},style:{position:"fixed",right:0,top:"50%",transform:"translateY(-50%)",zIndex:300,borderRadius:"6px 0 0 6px",background:jl,backgroundImage:`${Ev}, linear-gradient(135deg, ${jv} 0%, ${jl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)"},children:f.jsx(un,{icon:pr?f.jsx(Nh,{size:"small",surface:"chalkboard",label:"Agent running"}):ai?f.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:"#d6a0a0",boxShadow:"0 0 6px rgba(214, 160, 160, 0.9)"}}):f.jsx("span",{style:{fontSize:ee["2xs"]},children:"S"}),surface:"chalkboard",size:"small",label:pr?"Open stack panel — agent running":ai?"Open stack panel — checks failing":"Open stack panel",onClick:t,style:{width:28,height:64,borderRadius:"6px 0 0 6px",boxShadow:pr?"inset 0 0 0 1px rgba(214, 196, 160, 0.6)":ai?"inset 0 0 0 1px rgba(214, 160, 160, 0.6)":void 0}})})}),f.jsxs(Qs.div,{animate:{x:r?0:"100%"},transition:{duration:Qn?0:.3,ease:[.4,0,.2,1]},style:{position:"fixed",top:0,right:0,bottom:0,width:j_.stackPanelWidth,borderLeft:"4px solid rgba(61, 53, 43, 0.12)",backgroundColor:jl,backgroundImage:`${Ev}, linear-gradient(135deg, ${jv} 0%, ${jl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",color:j6,display:"flex",flexDirection:"column",overflow:"hidden",zIndex:300},children:[f.jsxs("div",{style:{height:80,padding:`0 ${I[6]}`,display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[f.jsx("span",{style:{fontFamily:ie.serif,fontSize:ee.base,fontWeight:700,color:Cr},children:"Stack"}),!n&&f.jsx(un,{icon:f.jsx("span",{style:{fontSize:ee.sm,lineHeight:1},children:"×"}),surface:"chalkboard",size:"small",label:"Close stack panel",onClick:t,style:{width:28,height:28,border:`1px solid ${T6}`}})]}),f.jsx(Ms,{surface:"chalkboard"}),f.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontFamily:ie.body},children:[f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:I[6]},children:[f.jsx("div",{style:of,children:"Agent"}),f.jsx(xt,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:v?f.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:I[2],marginBottom:I[1],flexShrink:0},children:[f.jsxs("span",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:ee.sm,color:Cr,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[v.planTitle,v.taskKind==="phase"&&v.phaseIndex!==void 0?` — phase ${v.phaseIndex+1}`:v.taskKind==="audit"?" — audit":v.taskKind==="batch-reconcile"?" — batch reconcile":v.taskKind==="draft"?" — drafting":v.taskKind==="extend"?" — extending":v.taskKind==="commit-suggest"?" — suggesting commit message":v.taskKind==="sync"?" — syncing to main":v.taskKind==="run-all"?" — run all phases":""," ","· ",Nm[v.agentId]]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2]},children:[(()=>{const B={starting:"#5a4a2d",running:"#5a4a2d",stopping:"#5a4a2d",done:"#2d5a3b",error:"#5a2d2d"},xe={starting:"#d6c4a0",running:"#d6c4a0",stopping:"#d6c4a0",done:"#b5d6b5",error:"#d6a0a0"};return f.jsx(jt,{surface:"chalkboard",size:"small",fillColor:B[v.status],textColor:xe[v.status],children:v.status})})(),(v.status==="running"||v.status==="starting"||v.status==="stopping")&&f.jsx(un,{icon:f.jsx(Qi,{}),variant:"ghost",size:"small",label:"Stop agent",onClick:C,disabled:v.status==="stopping"})]})]}),v.lines.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("span",{style:{fontFamily:ie.mono,fontSize:ee["2xs"],color:nn,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:I[2],flexShrink:0},children:v.lines[v.lines.length-1]}),f.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto"},children:f.jsx(v0,{title:`${v.lines.length} line${v.lines.length===1?"":"s"}`,expanded:P,onToggle:()=>R(!P),children:f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[1],fontFamily:ie.mono,fontSize:ee["2xs"],color:nn,paddingTop:I[2],maxHeight:160,overflowY:"auto"},children:v.lines.map((B,xe)=>f.jsx("span",{style:{whiteSpace:"pre-wrap"},children:B},`${xe}-${B}`))})})})]})]}):f.jsx("div",{style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx("p",{style:{opacity:.5,fontSize:ee.xs,margin:0},children:"No agent running."})})})]}),f.jsx(Ms,{surface:"chalkboard"}),f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:I[6]},children:[f.jsx("div",{style:of,children:"Status"}),f.jsx(xt,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:(()=>{var ig,sg,og;const B={pass:"#2d5a3b",fail:"#5a2d2d",running:"#5a4a2d",stale:"transparent"},xe={pass:"#b5d6b5",fail:"#d6a0a0",running:"#d6c4a0",stale:void 0},He=fo,Tn=hr;`${((ig=a==null?void 0:a.lint)==null?void 0:ig.output)||"(none)"}${((sg=a==null?void 0:a.format)==null?void 0:sg.output)||"(none)"}`;const IS=`Fix the failing tests in this repo. Output from the last test run:
81
+
82
+ ${((og=a==null?void 0:a.test)==null?void 0:og.output)||"(no output captured)"}`,zu=Me=>f.jsx(Pn,{content:Me.title,surface:"chalkboard",children:f.jsx("button",{type:"button",className:"stack-check-btn",onClick:()=>{He||Me.onClick()},disabled:He,style:{cursor:He?"not-allowed":"pointer",opacity:He&&Me.status!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsxs(jt,{surface:"chalkboard",size:"small",fillColor:B[Me.status],textColor:xe[Me.status],children:[Me.label,f.jsx("span",{style:{visibility:Me.status==="running"?"visible":"hidden"},children:"…"})]})})});return f.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:I[3]},children:[f.jsxs("div",{style:{display:"flex",gap:I[2],flexWrap:"wrap",justifyContent:"center"},children:[zu({label:"Quality",status:bt,title:"Run lint and format checks",onClick:()=>{c("lint"),c("format")}}),zu({label:"Tests",status:Jt,title:"Run tests",onClick:()=>c("test")}),zu({label:"Consistency",status:st,title:"Run codebase consistency (knip + dependency-cruiser)",onClick:()=>c("consistency")}),f.jsxs("div",{children:[f.jsx(Pn,{content:Tn?"Show plan/decision doc findings":"No plan/decision doc findings",surface:"chalkboard",children:f.jsx("button",{type:"button",className:Tn?"stack-check-btn":void 0,onClick:()=>{Tn&&E(Me=>!Me)},style:{cursor:Tn?"pointer":"default",display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsx(jt,{surface:"chalkboard",size:"small",fillColor:Tn?"#5a2d2d":"#2d5a3b",textColor:Tn?"#d6a0a0":"#b5d6b5",children:"Docs"})})}),_&&Tn&&f.jsx("div",{style:{marginTop:I[2],display:"flex",flexDirection:"column",gap:I[2]},children:d.map((Me,ci)=>f.jsx("div",{style:{fontFamily:ie.mono,fontSize:ee["2xs"],color:nn},children:f.jsx("button",{type:"button",onClick:()=>li(Me),style:{background:"none",border:"none",padding:0,color:Cr,textDecoration:"underline",cursor:"pointer",font:"inherit",textAlign:"left"},children:Me.message})},`${Me.kind}-${Me.title}-${ci}`))})]})]}),(()=>{var ag,lg,cg;let Me,ci=null;return He?Me=f.jsx("span",{style:{color:nn},children:"Running checks…"}):bt==="fail"?(Me=f.jsx("span",{style:{color:nn},children:k6(((ag=a==null?void 0:a.lint)==null?void 0:ag.output)??"",((lg=a==null?void 0:a.format)==null?void 0:lg.output)??"")}),ci=f.jsx("button",{type:"button",onClick:u,style:{background:"none",border:"none",padding:0,color:Cr,textDecoration:"underline",cursor:"pointer",font:"inherit"},children:"Suggested fix: run biome --write"})):Jt==="fail"?(Me=f.jsx("span",{style:{color:nn},children:_6(((cg=a==null?void 0:a.test)==null?void 0:cg.output)??"")}),ci=f.jsxs("span",{style:{color:Cr},children:["Suggested fix: ",f.jsx(Dh,{text:IS,surface:"chalkboard"})]})):st==="fail"?(Me=f.jsx("span",{style:{color:nn},children:"Codebase consistency failed (knip / dependency-cruiser)."}),ci=f.jsx("span",{style:{color:nn,opacity:.8},children:"Run pnpm run consistency for details."})):hr?Me=f.jsx("span",{style:{color:nn},children:"Plan/decision doc issues — see the Docs stamp."}):bt==="pass"&&Jt==="pass"&&st==="pass"?Me=f.jsx("span",{style:{color:"#b5d6b5"},children:"All checks passing."}):Me=f.jsx("span",{style:{color:nn,opacity:.6},children:"Checks haven't run yet."}),f.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",gap:I[1],fontFamily:ie.handwritten,fontSize:ee.sm},children:[Me,f.jsx("span",{style:{visibility:ci?"visible":"hidden"},children:ci??" "})]})})()]})})()})]}),f.jsxs("div",{style:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column",padding:I[6]},children:[f.jsxs("div",{style:{...of,display:"flex",alignItems:"center",gap:I[2]},children:["Commit",w&&f.jsx(jt,{surface:"chalkboard",size:"small",children:w})]}),f.jsx(xt,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:y&&y.length>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto"},children:f.jsx(v0,{title:`${y.length} file${y.length===1?"":"s"} changed`,expanded:j,onToggle:()=>L(!j),children:f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[2],paddingTop:I[2]},children:y.map(B=>f.jsxs("label",{style:{display:"flex",alignItems:"center",gap:I[2],fontFamily:ie.mono,fontSize:ee["2xs"],color:Cr,cursor:"pointer"},children:[f.jsx("input",{type:"checkbox",checked:M.has(B.path),onChange:()=>se(B.path),style:{accentColor:Cr}}),f.jsx("span",{style:{color:B.staged?Cr:nn,minWidth:24},children:B.status}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B.path})]},B.path))})})}),f.jsxs("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",gap:I[3],marginTop:I[3]},children:[Be&&f.jsx(Or,{surface:"chalkboard",dismissible:!0,onDismiss:()=>it(null),children:Be}),f.jsxs("div",{style:{display:"flex",gap:I[2],alignItems:"center"},children:[f.jsx("div",{style:{flex:1},children:f.jsx(jn,{surface:"chalkboard",size:"small",placeholder:"Commit title",value:z,onChange:B=>N(B.currentTarget.value)})}),f.jsx(un,{icon:f.jsx(C6,{size:16}),surface:"chalkboard",size:"small",label:"Suggest title and message from the diff",disabled:M.size===0||pe,onClick:mn,wobble:pe?1:0})]}),f.jsx(oo,{surface:"chalkboard",size:"small",placeholder:"Commit message (optional)",value:H,onChange:B=>K(B.currentTarget.value),rows:2}),le&&f.jsx(Or,{surface:"chalkboard",dismissible:!0,onDismiss:()=>he(null),children:le}),f.jsx(de,{surface:"chalkboard",size:"small",fullWidth:!0,disabled:M.size===0||!z.trim()||D,onClick:ge,children:D?"Committing…":"Commit"})]})]}):f.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:I[3]},children:g>0?f.jsxs(f.Fragment,{children:[f.jsxs("p",{style:{opacity:.5,fontSize:ee.xs,margin:0},children:["All changes committed — ",g," commit",g===1?"":"s"," ready to push."]}),q&&f.jsx(Or,{surface:"chalkboard",dismissible:!0,onDismiss:()=>T(null),children:q}),f.jsx(de,{surface:"chalkboard",size:"small",icon:f.jsx(P6,{size:14}),disabled:k,onClick:Nt,children:k?"Pushing…":`Push ${g} commit${g===1?"":"s"}`})]}):f.jsxs(f.Fragment,{children:[f.jsx("p",{style:{opacity:.5,fontSize:ee.xs,margin:0},children:"No changed files."}),Gn&&f.jsx(Or,{surface:"chalkboard",dismissible:!0,onDismiss:()=>dr(null),children:Gn}),f.jsx(Pn,{content:x==="clean-on-main"?"Already on clean main":void 0,surface:"chalkboard",children:f.jsx(de,{surface:"chalkboard",size:"small",icon:f.jsx(E6,{size:14}),disabled:Dt||x==="clean-on-main",onClick:Yn,children:Dt?"Syncing…":"Sync to main"})})]})})})]})]})]})]})},L6=()=>{const e=G(a=>a.decisions),t=G(a=>a.openQuestions),n=G(a=>a.activeDocTitle),r=G(a=>a.setActiveDocTitle),i=Kn(),s=e.find(a=>a.title===n);if(!s)return null;const o=t.filter(a=>a.resolvedBy===s.title);return f.jsxs("div",{children:[f.jsx("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${I[3]}`,lineHeight:Ht.tight},children:s.title}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2],marginBottom:I[5]},children:[f.jsx("span",{className:"text-sm",style:{opacity:.5},children:s.date}),f.jsx(jt,{size:"small",fillColor:s.status==="decided"?"rgba(143, 185, 150, 0.25)":"rgba(201, 139, 139, 0.25)",textColor:s.status==="decided"?fe.accentGreenDark:"#6E3A3A",children:s.status}),s.supersededBy&&f.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Superseded by"," ",f.jsx(zh,{onClick:()=>r(s.supersededBy),children:s.supersededBy})]}),o.length>0&&f.jsxs("span",{className:"text-sm",style:{opacity:.5},children:[o.length===1?"Resolves":"Resolves all of"," ",o.map((a,l)=>f.jsxs("span",{children:[l>0&&", ",f.jsx(zh,{onClick:()=>{i({to:"/docs/$section",params:{section:"questions"}}),r(a.title)},children:a.title})]},a.title))]})]}),f.jsx("div",{style:{fontFamily:ie.body,fontSize:ee.base,lineHeight:Ht.relaxed,color:"#1C1B18"},children:f.jsx(uo,{children:s.body})})]})},pi=(e,t)=>e.toLowerCase().includes(t.toLowerCase()),Tl=(e,t,n=120)=>{const r=e.toLowerCase().indexOf(t.toLowerCase());if(r===-1)return e.slice(0,n);const i=Math.max(0,r-40),s=Math.min(e.length,r+t.length+40);let o=e.slice(i,s);return i>0&&(o=`…${o}`),s<e.length&&(o=`${o}…`),o},M6=({query:e})=>{const{decisions:t,openQuestions:n,progress:r,repoDocs:i,setActiveDocTitle:s,setDocSearchQuery:o}=G(),a=Kn(),l=[];for(const d of t)(pi(d.title,e)||pi(d.body,e))&&l.push({section:"decisions",sectionLabel:"Decisions",title:d.title,snippet:Tl(d.body||d.title,e)});for(const d of n)(pi(d.title,e)||pi(d.body,e))&&l.push({section:"questions",sectionLabel:"Open Questions",title:d.title,snippet:Tl(d.body||d.title,e)});for(const d of r)for(const h of d.items)if(pi(h,e)){l.push({section:"progress",sectionLabel:"Progress",title:d.date,snippet:Tl(h,e)});break}for(const d of i)(pi(d.name,e)||pi(d.content,e))&&l.push({section:"repo-docs",sectionLabel:"Repo Docs",title:d.name,snippet:Tl(d.content,e)});const c={};for(const d of l)c[d.section]||(c[d.section]=[]),c[d.section].push(d);const u=(d,h)=>{a({to:"/docs/$section",params:{section:d}}),s(h),o("")};return l.length===0?f.jsxs("p",{style:{opacity:.5},children:['No results found for "',e,'".']}):f.jsxs("div",{children:[f.jsxs("p",{className:"text-sm",style:{opacity:.5,marginBottom:I[3]},children:[l.length," result",l.length===1?"":"s",' for "',e,'"']}),Object.entries(c).map(([d,h])=>f.jsxs("div",{style:{marginBottom:I[6]},children:[f.jsx("h3",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4,margin:`0 0 ${I[2]}`},children:h[0].sectionLabel}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[1]},children:h.map(p=>f.jsx(de,{variant:"ghost",size:"small",fullWidth:!0,onClick:()=>u(p.section,p.title),style:{justifyContent:"flex-start",padding:`${I[2]} ${I[3]}`},children:f.jsxs("span",{style:{textAlign:"left"},children:[f.jsx("span",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"0.95rem",display:"block",marginBottom:"0.2rem"},children:p.title}),f.jsx("span",{className:"text-sm",style:{opacity:.6},children:p.snippet})]})},`${p.section}-${p.title}`))})]},d))]})},I6=()=>{const e=G(g=>g.openQuestions),t=G(g=>g.activeDocTitle),n=G(g=>g.setActiveDocTitle),r=Kn(),[i,s]=S.useState(!1),[o,a]=S.useState(""),[l,c]=S.useState(""),[u,d]=S.useState(!1),h=e.find(g=>g.title===t);if(!h)return null;const p=()=>{h.resolvedBy&&(r({to:"/docs/$section",params:{section:"decisions"}}),n(h.resolvedBy))},m=()=>{a(""),c(""),d(!1),s(!0)},y=()=>{s(!1)},w=async g=>{if(g.preventDefault(),!(!o.trim()||u)){d(!0);try{await t6(h.title,o.trim(),l.trim()||void 0),s(!1)}catch{d(!1)}}};return f.jsxs("div",{children:[f.jsx("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${I[3]}`,lineHeight:Ht.tight},children:h.title}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2],marginBottom:I[5]},children:[f.jsx("span",{className:"text-sm",style:{opacity:.5},children:h.raised}),f.jsx(jt,{size:"small",fillColor:h.status==="open"?"rgba(212, 163, 115, 0.25)":"rgba(143, 185, 150, 0.25)",textColor:h.status==="open"?fe.accentAmberDark:fe.accentGreenDark,children:h.status}),h.resolvedBy&&f.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Resolved by"," ",f.jsx(zh,{onClick:p,children:h.resolvedBy})]}),h.status==="open"&&f.jsx(de,{surface:"chalkboard",onClick:m,children:"Resolve"})]}),f.jsx("div",{style:{fontFamily:ie.body,fontSize:ee.base,lineHeight:Ht.relaxed,color:"#1C1B18"},children:f.jsx(uo,{children:h.body})}),f.jsx(so,{open:i,onClose:y,title:"Resolve question",size:"small",children:f.jsxs("form",{onSubmit:w,style:{display:"flex",flexDirection:"column",gap:I[4]},children:[f.jsx(jn,{label:"Decision",value:o,onChange:g=>a(g.target.value),placeholder:"What was decided?",disabled:u,autoFocus:!0,required:!0}),f.jsx(oo,{label:"Rationale",value:l,onChange:g=>c(g.target.value),placeholder:"Optional reasoning…",disabled:u,rows:4}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[f.jsx(de,{type:"button",variant:"ghost",onClick:y,disabled:u,children:"Cancel"}),f.jsx(de,{type:"submit",variant:"primary",disabled:!o.trim()||u,children:"Resolve"})]})]})})]})},A6=()=>{const e=G(i=>i.progress),t=G(i=>i.activeDocTitle),r=[...t?e.filter(i=>i.date===t):e].sort((i,s)=>s.date.localeCompare(i.date));return r.length===0?f.jsx("p",{style:{opacity:.5},children:"No progress entries found."}):f.jsx("div",{children:r.map(i=>f.jsxs("div",{style:{marginBottom:I[8]},children:[f.jsx("h3",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:ee.md,margin:`0 0 ${I[3]}`,lineHeight:Ht.tight,opacity:.8},children:i.date}),f.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:I[2]},children:i.items.map((s,o)=>f.jsx("li",{style:{fontFamily:ie.body,fontSize:ee.sm,lineHeight:1.55,color:"#1C1B18",paddingLeft:I[4],borderLeft:"2px solid rgba(0,0,0,0.08)"},children:f.jsx(uo,{children:s})},`${i.date}-${o}`))})]},i.date))})},D6=()=>{const e=G(i=>i.repoDocs),t=G(i=>i.activeDocTitle),n=e.find(i=>i.name===t);if(!n)return null;const r=n.name.endsWith(".md");return f.jsxs("div",{children:[f.jsx("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${I[4]}`,lineHeight:Ht.tight},children:n.name}),r?f.jsx("div",{style:{fontFamily:ie.body,fontSize:ee.base,lineHeight:Ht.relaxed,color:"#1C1B18"},children:f.jsx(uo,{children:n.content})}):f.jsx("pre",{style:{fontFamily:ie.mono,fontSize:ee.xs,background:"rgba(0,0,0,0.04)",borderRadius:6,padding:I[4],overflowX:"auto",lineHeight:Ht.normal,whiteSpace:"pre-wrap"},children:n.content})]})},Rl=({itemId:e,label:t,onBack:n})=>f.jsx("div",{style:{marginBottom:I[4]},children:f.jsx(Fh,{items:[{id:"docs",label:"Docs",onClick:n},{id:e,label:t}]})}),yS=()=>{const e=G(s=>s.docSearchQuery),t=G(s=>s.activeDocTitle),n=Kn(),r=gS(),i=()=>n({to:"/docs"});return e.trim()?f.jsx("div",{children:f.jsx(M6,{query:e})}):r==="decisions"&&t?f.jsxs("div",{children:[f.jsx(Rl,{itemId:"decision",label:t,onBack:i}),f.jsx(ji,{children:"Decisions"}),f.jsx(L6,{})]}):r==="questions"&&t?f.jsxs("div",{children:[f.jsx(Rl,{itemId:"question",label:t,onBack:i}),f.jsx(ji,{children:"Open Questions"}),f.jsx(I6,{})]}):r==="progress"?f.jsxs("div",{children:[f.jsx(Rl,{itemId:"progress",label:t??"Progress",onBack:i}),f.jsx(ji,{children:"Progress"}),f.jsx(A6,{})]}):r==="repo-docs"&&t?f.jsxs("div",{children:[f.jsx(Rl,{itemId:"repo-doc",label:t,onBack:i}),f.jsx(D6,{})]}):f.jsxs("div",{children:[f.jsx(ji,{children:"Docs"}),f.jsx("p",{style:{opacity:.5},children:"Select a section from the sidebar."})]})},Ti=({label:e,children:t,action:n})=>f.jsxs("div",{style:{marginBottom:I[5]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.35rem",padding:`0 ${I[3]}`},children:[f.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),n]}),t]}),N6=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Pr=({children:e})=>f.jsx("span",{className:"text-sm",style:{display:"block",padding:`${I[1]} ${I[3]}`,opacity:.35,fontStyle:"italic"},children:e}),F6=()=>{const{decisions:e,openQuestions:t,progress:n,repoDocs:r,decisionsLoading:i,openQuestionsLoading:s,progressLoading:o,repoDocsLoading:a,loadDecisions:l,loadOpenQuestions:c,loadProgress:u,loadRepoDocs:d,activeDocTitle:h,setActiveDocTitle:p,docSearchQuery:m,setDocSearchQuery:y}=G(),w=gS(),g=Kn();S.useEffect(()=>{l(),c(),u(),d()},[l,c,u,d]);const x=v=>{g({to:"/docs/$section",params:{section:"decisions"}}),p(v)};return f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{marginBottom:I[4]},children:f.jsx(jn,{size:"small","aria-label":"Search docs",placeholder:"Search docs…",value:m,onChange:v=>y(v.target.value)})}),f.jsx(Ti,{label:"Repo Docs",children:a&&r.length===0?f.jsx(Pr,{children:"Loading…"}):r.length>0?r.map(v=>f.jsx(Ei,{size:"small",active:w==="repo-docs"&&h===v.name,onClick:()=>{g({to:"/docs/$section",params:{section:"repo-docs"}}),p(v.name)},children:N6(v.name)},v.name)):f.jsx(Pr,{children:"No repo docs found"})}),f.jsx(Ti,{label:"Decisions",children:i&&e.length===0?f.jsx(Pr,{children:"Loading…"}):e.length>0?e.map(v=>f.jsx(Ei,{size:"small",active:w==="decisions"&&h===v.title,onClick:()=>x(v.title),children:v.title},v.title)):f.jsx(Pr,{children:"No decisions yet"})}),f.jsx(Ti,{label:"Open Questions",children:s&&t.length===0?f.jsx(Pr,{children:"Loading…"}):t.length>0?t.map(v=>f.jsx(Ei,{size:"small",active:w==="questions"&&h===v.title,onClick:()=>{g({to:"/docs/$section",params:{section:"questions"}}),p(v.title)},children:v.title},v.title)):f.jsx(Pr,{children:"No open questions"})}),f.jsx(Ti,{label:"Progress",children:o&&n.length===0?f.jsx(Pr,{children:"Loading…"}):n.length>0?n.map(v=>f.jsx(Ei,{size:"small",active:w==="progress"&&h===v.date,onClick:()=>{g({to:"/docs/$section",params:{section:"progress"}}),p(v.date)},children:v.date},v.date)):f.jsx(Pr,{children:"No progress entries"})})]})},z6=({title:e,onClose:t,onConfirm:n})=>{const r=async()=>{e&&(await n(e),t())};return f.jsx(so,{open:e!==null,onClose:t,title:"Delete idea",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[4]},children:[f.jsxs("p",{style:{margin:0},children:['Delete idea "',e,'"?']}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[f.jsx(de,{type:"button",variant:"ghost",onClick:t,children:"Cancel"}),f.jsx(de,{type:"button",variant:"danger",onClick:r,children:"Delete"})]})]})})},xS={"in-progress":"#C89A5A",planned:"#6A9B72",idea:"#8A9BAA",review:"#9B7AB5",done:"#8A7A8A",dropped:"#A06060"},tg={idea:"Idea",planned:"Planned","in-progress":"In progress",review:"Review",done:"Done",dropped:"Dropped"},Xh={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"}},vS={open:"Open",done:"Done",dropped:"Dropped"},tu={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"}},B6=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}`},O6=(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=[B6(e),e.failure_scenario??e.reasoning].filter(Boolean).join(" — ");return{done:!1,text:n.trim(),description:r||void 0,source:"review"}},$6=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)=>O6(r,i))},V6=({onAdd:e,disabled:t})=>{const[n,r]=S.useState(!1),[i,s]=S.useState(""),[o,a]=S.useState(null),[l,c]=S.useState(!1),u=()=>{r(!1),s(""),a(null)},d=async()=>{let h;try{h=$6(i)}catch(p){a(p instanceof Error?p.message:"Could not parse findings");return}c(!0),a(null);try{await e(h),u()}finally{c(!1)}};return f.jsxs(f.Fragment,{children:[f.jsx(de,{variant:"secondary",size:"small",onClick:()=>r(!0),disabled:t,children:"Add as phases"}),f.jsx(so,{open:n,onClose:u,title:"Add /code-review findings",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[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(oo,{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(Or,{variant:"warning",children:["Could not add phases — ",o]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[f.jsx(de,{type:"button",variant:"ghost",onClick:u,disabled:l,children:"Cancel"}),f.jsx(de,{type:"button",variant:"primary",onClick:d,disabled:l||!i.trim(),children:"Add phases"})]})]})})]})},U6=({planId:e,phaseIndex:t,disabled:n})=>{const r=G(a=>a.launchAgent),[i,s]=S.useState(!1),o=async a=>{if(a.stopPropagation(),!!e){s(!0);try{await r(e,t)}catch(l){alert(l.message)}finally{s(!1)}}};return f.jsx(un,{icon:f.jsx("span",{style:{fontSize:12,lineHeight:1},children:"▶"}),variant:"ghost",size:"small",label:e?"Start agent on this phase":"Plan needs an ID before an agent can run",onClick:o,disabled:n||i||!e,className:"transition-opacity",style:{color:fe.textSecondary}})};function W6(e){const t=e.phases.map((i,s)=>`${s+1}. [${i.done?"x":" "}] ${i.text}`).join(`
83
+ `),n=e.log&&e.log.length>0?e.log.map(i=>`- ${i.date}: ${i.text}`).join(`
84
+ `):"(none)",r=e.clarifications&&e.clarifications.length>0?e.clarifications.map(i=>`- ${i.date}: ${i.text}`).join(`
85
+ `):"(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.
86
+
87
+ Plan body: ${e.body}
88
+
89
+ Current phases:
90
+ ${t}
91
+
92
+ Log entries (issues, bugs, and review notes recorded so far):
93
+ ${n}
94
+
95
+ Clarifications (answered scope/design questions):
96
+ ${r}
97
+
98
+ Task:
99
+ 1. Read the plan above, then inspect the relevant code in this repo.
100
+ 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.
101
+ 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.
102
+ 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.
103
+
104
+ Rules:
105
+ - Never modify, reorder, check, uncheck, or delete any existing line, even if it looks stale, wrong, or redundant.
106
+ - Never touch the YAML frontmatter.
107
+ - Append only: new unchecked phases at the end of the list, plus the single Log line.`}function H6(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(`
108
+ `):"(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.
109
+
110
+ ${t?"Plan":"Idea"} body: ${e.body}
111
+
112
+ Current phases:
113
+ ${r}
114
+
115
+ 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.
116
+
117
+ 1. Read the ${n} above, then inspect the relevant code in this repo to find what has actually changed since the prose was written.
118
+ 2. Reword only the sentences or phrases that are now stale: fix references and superseded approaches. Leave everything else byte-identical.
119
+ 3. Do not summarize, restructure, or "improve" prose that is still accurate — an unnecessary rewrite is a failure of this task, not a bonus.
120
+
121
+ Hard guardrails, never violate these:
122
+ - Never touch the YAML frontmatter (id, title, kind, status, created, idea, tags, or any other field).
123
+ - Never un-check, check, delete, or reorder any phase line, checked or unchecked.
124
+ - Never add or remove phases.
125
+ - Never touch the Log or Clarifications sections.
126
+ - If nothing is stale, make no edits at all.`}function K6(e){const t=e.log&&e.log.length>0?e.log.map(n=>`- ${n.date}: ${n.text}`).join(`
127
+ `):"(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.
128
+
129
+ Current idea body, in full (do not modify this):
130
+ ${e.body}
131
+
132
+ Prior Log entries:
133
+ ${t}
134
+
135
+ Task:
136
+ 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.
137
+ 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.
138
+ 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).
139
+
140
+ Keep unchanged:
141
+ - the YAML frontmatter (id, title)
142
+ - the \`## ${e.id??"IDEA-N"}: ${e.title}\` heading line and the original body prose beneath it
143
+
144
+ Append only — never rewrite or delete the idea's existing body or prior Log lines.`}function G6(e){return`You are clarifying the plan "${e.title}" (${e.id??"no id"}), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md (or papercamp/ideas/archive/${e.id??"<ID>"}.md if archived). Edit only that file, and within it only the \`### Clarifications\` section.
145
+
146
+ Plan body: ${e.body}
147
+
148
+ Current phases:
149
+ ${e.phases.length>0?e.phases.map((t,n)=>`${n+1}. [${t.done?"x":" "}] ${t.text}`).join(`
150
+ `):"(none yet)"}
151
+
152
+ Task: surface the plan's most important unanswered questions and get them answered by the user, one at a time.
153
+
154
+ 1. Check the plan for gaps in: functional scope, data model, UX flow, non-functional requirements, edge cases, terminology, and completion criteria.
155
+ 2. Pick the gaps that would most change the implementation — at most 5. If the plan has no meaningful gaps, say so and stop; do not invent questions.
156
+ 3. Ask the user one question at a time. With each question, propose an answer marked **Recommended:** so the user can accept it with a single word. Wait for the user's reply before asking the next question.
157
+ 4. After each answered question, append one line to the plan file's \`### Clarifications\` section, creating the section between the body and \`### Phases\` if it does not exist:
158
+
159
+ \`\`\`
160
+ - YYYY-MM-DD: Q: <question> → A: <the user's answer>
161
+ \`\`\`
162
+
163
+ Rules:
164
+ - Record only answers the user actually gave (accepting your recommendation counts).
165
+ - Append only — never rewrite or delete existing Clarifications lines.
166
+ - Use today's date.`}function Q6(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(`
167
+ `);return`### ${i.id??"no id"}: ${i.title} (status: ${i.status}${i.idea?`, idea: ${i.idea}`:""})
168
+ ${i.body}
169
+ ${s||" (no phases yet)"}`}).join(`
170
+
171
+ `):"(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.
172
+
173
+ Idea body, in full:
174
+ ${e.body}
175
+
176
+ ## What drafting adds to the file (see papercamp/about.md)
177
+
178
+ The file already has YAML frontmatter (id, title, status, created, …) and the prose body above. Drafting means:
179
+
180
+ 1. Add a \`type\` field to the frontmatter: the Conventional Commits type that best fits (\`feat | fix | chore | docs | refactor\` — most are \`feat\`).
181
+ 2. Add 1-4 short subsystem \`tags\` to the frontmatter if it has none.
182
+ 3. Append a \`### Phases\` checklist at the end of the file (after any \`### Log\` section move it below the phases — Phases, then Log):
183
+
184
+ \`\`\`
185
+ ### Phases
186
+ - [ ] Short phase title
187
+ Optional description of the phase, indented with 6 spaces.
188
+ \`\`\`
189
+
190
+ Hard rules:
191
+ - 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").
192
+ - Never rewrite or delete the existing prose body or \`### Log\` entries — the idea's history stays intact.
193
+ - 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.
194
+
195
+ ## Every other open (non-done) entity, for scope context
196
+
197
+ ${r}
198
+
199
+ Use the open entities above only to avoid duplicating in-flight scope and to match phase granularity. Edit only papercamp/ideas/${e.id??"<ID>"}.md — never create, edit, move, or rename any other file.`}const Y6=({plan:e,disabled:t})=>{const n=G(o=>o.launchPlanAudit),[r,i]=S.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,W6(e))}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(Pn,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(de,{variant:"secondary",size:"small",onClick:s,disabled:t||r||!e.id,children:"Audit phases against code"})})};async function wS(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 q6=({plan:e,disabled:t})=>{const[n,r]=S.useState("idle"),i=async()=>{const s=G6(e),o=await wS(s);r(o?"copied":"failed"),setTimeout(()=>r("idle"),1500)};return f.jsx(Pn,{content:n==="copied"?"Copied":n==="failed"?"Copy failed — select and copy manually":"Copy clarification prompt",children:f.jsx(de,{variant:"ghost",size:"small",onClick:i,disabled:t,icon:n==="copied"?f.jsx(__,{size:14}):n==="failed"?f.jsx(Qi,{size:14}):f.jsx(S_,{size:14}),style:{color:n==="copied"?"#6A9B72":n==="failed"?"#A06060":fe.textSecondary},children:"Copy Clarifications Prompt"})})};function bS(){const[e,t]=S.useState("idle"),[n,r]=S.useState(null),i=S.useRef(null),s=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=S.useCallback(()=>{i.current&&clearTimeout(i.current),t("idle"),r(null)},[]);return{state:e,errorMessage:n,run:s,reset:o,loading:e==="loading",success:e==="success"}}const kS=({idea:e,otherPlans:t})=>{const n=G(h=>h.launchPlanDraft),r=G(h=>h.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,errorMessage:o,run:a}=bS(),{toast:l}=ao(),c=()=>{const h=e.id;h&&a(async()=>{try{await n(h,Q6(e,t))}catch(p){throw l({title:"Draft failed",description:p.message,variant:"error"}),p}})},u=s==="loading"?"Drafting…":s==="success"?"Draft sent!":s==="error"?"Draft failed":"Draft plan",d=s==="error"?o??"Draft failed":e.id?void 0:"Idea needs an ID before an agent can run";return f.jsx(Pn,{content:d,children:f.jsx(de,{variant:"ghost",size:"small",onClick:c,disabled:i||s==="loading"||!e.id,style:{color:s==="error"?fe.accentRoseDark:fe.textSecondary},children:u})})},ng=({idea:e,compact:t})=>{const n=G(p=>p.launchIdeaExtend),r=G(p=>p.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,errorMessage:o,run:a}=bS(),{toast:l}=ao(),c=e.id,u=()=>{c&&a(async()=>{const p=G.getState().ideaEntries.find(m=>m.id===c);if(!p)throw new Error(`Idea ${c} not found`);try{await n(c,K6(p))}catch(m){throw l({title:"Extension failed",description:m.message,variant:"error"}),m}})},d=s==="loading"?"Extending…":s==="success"?t?"Sent!":"Extension sent!":s==="error"?"Extension failed":t?"Extend":"Extend with AI",h=s==="error"?o??"Extension failed":c?void 0:"Idea needs an ID before an agent can run";return f.jsx(Pn,{content:h,children:f.jsx(de,{variant:"ghost",size:"small",onClick:u,disabled:i||s==="loading"||!c,style:{color:s==="error"?fe.accentRoseDark:void 0},children:d})})},X6=({planTitle:e,planId:t,phaseIndex:n})=>{const[r,i]=S.useState("idle"),s=async o=>{o.stopPropagation();const a=`Start phase ${n+1} of plan "${e}" in papercamp/ideas/${t??"<ID>"}.md`,l=await wS(a);i(l?"copied":"failed"),setTimeout(()=>i("idle"),1500)};return f.jsx(un,{icon:r==="copied"?f.jsx(__,{size:16}):r==="failed"?f.jsx(Qi,{size:16}):f.jsx(S_,{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":fe.textSecondary}})},Fu=({id:e})=>e?f.jsx(jt,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}):null,_S=({pct:e,color:t,height:n=6})=>f.jsx(TF,{value:e,color:t,height:n}),Z6=({plan:e,disabled:t})=>{const n=G(o=>o.launchPlanReconcile),[r,i]=S.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,H6(e),{body:e.body,phases:e.phases})}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(Pn,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(de,{variant:"secondary",size:"small",onClick:s,disabled:t||r||!e.id,children:"Reconcile"})})};function J6(e){const t=e==null?void 0:e.match(/^[a-z]+\/([a-z]+-\d+)-/);return t?t[1].toUpperCase():null}const eU=({plan:e})=>{const t=G(P=>P.loadPlans),n=G(P=>P.plans),r=G(P=>P.gitBranch),i=G(P=>P.loadGitStatus),{toast:s}=ao(),[o,a]=S.useState(!1),l=G(P=>P.agentStatus),c=l!==null&&l.status!=="done"&&l.status!=="error",u=c&&l!==null&&l.planId===e.id?l.phaseIndex:null,d=c&&l!==null&&l.planId===e.id&&l.phaseIndex===void 0,[h,p]=S.useState(!1),[m,y]=S.useState(""),w=pS(e),g=e.phases.length>0,x={id:e.id??null,title:e.title,body:e.body,log:e.log},v=((n==null?void 0:n.entries)??[]).filter(P=>P.id!==e.id),b=e.id!==void 0&&J6(r)===e.id,C=e.status==="planned"||e.status==="in-progress"||e.status==="review",_=async()=>{if(e.id){a(!0);try{const P=await a6(e.id);s({title:"Branch ready",description:`Now on ${P}`,variant:"success"}),await i()}catch(P){s({title:"Branch failed",description:P.message,variant:"error"})}finally{a(!1)}}};w!==null&&w.done===w.total&&w.total>0;const E=async P=>{const R=e.phases.map((F,z)=>z===P?{...F,done:!F.done}:F);p(!0);const M=R.every(F=>F.done);try{M&&e.status==="in-progress"?await _s(e.title,{phases:R,status:"review"}):await _s(e.title,{phases:R}),await t()}catch(F){s({title:"Update failed",description:F.message,variant:"error"})}finally{p(!1)}},j=async P=>{p(!0);try{await _s(e.title,{phases:[...e.phases,...P]}),await t()}catch(R){s({title:"Update failed",description:R.message,variant:"error"})}finally{p(!1)}},L=async()=>{if(!m.trim())return;const R={date:new Date().toISOString().slice(0,10),text:m.trim().replace(/\n/g," ")},M=[...e.log??[],R];p(!0);try{await _s(e.title,{log:M}),await t(),y("")}catch(F){s({title:"Update failed",description:F.message,variant:"error"})}finally{p(!1)}};return f.jsxs("div",{children:[f.jsxs("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${I[3]}`,lineHeight:Ht.tight,display:"flex",alignItems:"center",gap:I[3]},children:[f.jsx(Fu,{id:e.id}),e.title]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2],flexWrap:"wrap",marginBottom:I[4]},children:[f.jsx("span",{className:"text-sm",style:{opacity:.45},children:e.updated?`updated ${eu(e.updated)}`:`created ${eu(e.created)}`}),e.tags.map(P=>f.jsx(jt,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:P},P)),w!==null&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2],flex:"0 0 140px"},children:[f.jsx("div",{style:{flex:1},children:f.jsx(_S,{pct:w.pct,color:xS[e.status]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[w.done,"/",w.total]})]}),f.jsx(q6,{plan:e,disabled:c})]}),C&&!b&&f.jsx(xt,{size:"small",accent:!0,accentColor:"amber",className:"mb-4",children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],flexWrap:"wrap"},children:[f.jsxs("span",{className:"text-sm",children:["Working branch: ",f.jsx("code",{children:r??"unknown"})," — not this plan's branch."]}),e.id&&f.jsx(Pn,{content:`Creates ${(e.kind??"feat").toLowerCase()}/${e.id.toLowerCase()}-… from main, or switches to it if it already exists`,children:f.jsx(de,{variant:"secondary",size:"small",onClick:_,disabled:o,children:o?"Switching…":"Create branch"})})]})}),C&&b&&f.jsxs("p",{className:"text-sm",style:{margin:`0 0 ${I[4]}`,opacity:.45},children:["Working branch: ",f.jsx("code",{children:r})]}),e.body&&f.jsx("div",{style:{marginBottom:I[4],opacity:.85},children:f.jsx(uo,{children:e.body})}),e.clarifications&&e.clarifications.length>0&&f.jsxs("div",{style:{marginBottom:I[5]},children:[f.jsx("h3",{style:{fontFamily:ie.serif,fontSize:ee.sm,fontWeight:600,margin:`0 0 ${I[3]}`,opacity:.65},children:"Clarifications"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[2],marginBottom:I[3]},children:e.clarifications.map((P,R)=>f.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[f.jsx("span",{style:{fontWeight:600,marginRight:I[2]},children:P.date}),P.text]},`clar-${P.date}-${R}`))})]}),!g&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],marginBottom:I[8]},children:[f.jsx(kS,{idea:x,otherPlans:v}),f.jsx(ng,{idea:x})]}),g&&f.jsxs("div",{style:{marginBottom:I[8]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:I[3],marginBottom:I[3]},children:[f.jsx("h3",{style:{fontFamily:ie.serif,fontSize:ee.sm,fontWeight:600,margin:0,opacity:.65},children:"Phases"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2]},children:[d&&f.jsx(Nh,{size:"small",label:"Audit running…"}),(e.status==="review"||e.status==="done")&&f.jsx(Y6,{plan:e,disabled:c}),e.status!=="done"&&f.jsx(Z6,{plan:e,disabled:c}),f.jsx(V6,{onAdd:j,disabled:h})]})]}),f.jsx(Dm,{data:e.phases,columns:[{key:"checkbox",header:"Status",cell:(P,R)=>f.jsx(TD,{checked:P.done,onChange:()=>E(R),disabled:h}),width:2},{key:"title",header:"Title",cell:P=>f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:I[2],textDecoration:P.done?"line-through":"none",opacity:P.done?.45:1},children:[P.text,P.source==="review"&&f.jsx(jt,{size:"small",fillColor:"rgba(155, 122, 181, 0.25)",textColor:"#7B5E9E",children:"review"})]})},{key:"actions",header:"Actions",cell:(P,R)=>f.jsxs("div",{style:{display:"flex",gap:I[2],alignItems:"center"},children:[f.jsx(X6,{planTitle:e.title,planId:e.id,phaseIndex:R}),!P.done&&u===R?f.jsx(Nh,{size:"small",label:`Agent ${l==null?void 0:l.status}…`}):!P.done&&f.jsx(U6,{planId:e.id,phaseIndex:R,disabled:c})]}),width:5}],expandable:{render:P=>P.description??null},showExpandColumn:!1,rowClassName:P=>P.source==="review"?"phase-row-review":void 0})]}),f.jsxs("div",{style:{marginBottom:I[8]},children:[f.jsx("h3",{style:{fontFamily:ie.serif,fontSize:ee.sm,fontWeight:600,margin:`0 0 ${I[3]}`,opacity:.65},children:"Log"}),e.log&&e.log.length>0&&f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[2],marginBottom:I[3]},children:e.log.map((P,R)=>f.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[f.jsx("span",{style:{fontWeight:600,marginRight:I[2]},children:P.date}),P.text]},`${P.date}-${R}`))}),f.jsxs("div",{style:{display:"flex",gap:I[2],alignItems:"flex-end"},children:[f.jsx(oo,{value:m,onChange:P=>y(P.target.value),placeholder:"Add a log entry…",rows:2}),f.jsx(Is,{intent:"log",size:"small",onClick:L,disabled:h||!m.trim(),children:"Add entry"})]})]})]})},is={fontSize:ee.sm,fontWeight:600,opacity:.6,whiteSpace:"nowrap",overflow:"hidden"},SS=({plans:e,activePlanTitle:t,onOpen:n,onDeleteIdea:r,showHeader:i=!0})=>{const s=r?"plan-rows-grid plan-rows-grid--deletable":"plan-rows-grid";return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[1]},children:[i&&f.jsx(xt,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:s,children:[f.jsx("span",{style:is,children:"Id"}),f.jsx("span",{style:is,children:"Title"}),f.jsx("span",{className:"plan-rows-cell-updated",style:is,children:"Updated"}),f.jsx("span",{style:is,children:"Progress"}),f.jsx("span",{style:is,children:"Status"}),r&&f.jsx("span",{style:is})]})}),e.map(o=>{const a=pS(o);return f.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onClick:n?()=>n(o.title):void 0,onKeyDown:n?l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n(o.title))}:void 0,className:o.title===t?"plan-row-highlighted":void 0,style:{cursor:n?"pointer":void 0,borderRadius:10},children:f.jsx(xt,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{className:s,children:[f.jsx(Fu,{id:o.id}),f.jsx("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.title}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45,whiteSpace:"nowrap"},children:o.updated?eu(o.updated):eu(o.created)}),a?f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[1]},children:[f.jsx("div",{style:{flex:1,minWidth:0},children:f.jsx(_S,{pct:a.pct,color:xS[o.status]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[a.done,"/",a.total]})]}):f.jsx("span",{className:"text-sm",style:{opacity:.3},children:"—"}),f.jsx(jt,{size:"small",fillColor:Xh[o.status].fill,textColor:Xh[o.status].text,children:tg[o.status]}),r&&(o.status==="idea"?f.jsx(un,{icon:f.jsx("span",{children:"×"}),variant:"ghost",size:"small",label:"Delete",style:{width:28,height:28},onClick:l=>{l.stopPropagation(),r(o.title)},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&l.stopPropagation()}}):f.jsx("span",{}))]})})},o.title)})]})},tU=5,ss={fontSize:ee.sm,fontWeight:600,opacity:.6,whiteSpace:"nowrap",overflow:"hidden"},CS={display:"flex",alignItems:"center",gap:I[2],minWidth:0,background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left",font:"inherit",color:"inherit",fontWeight:600},PS={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},nU=()=>f.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.55,flexShrink:0},children:[f.jsx("title",{children:"Idea"}),f.jsx("path",{d:"M9 18h6M10 22h4M12 2a6 6 0 0 0-3.5 10.9c.53.4.9 1.03.9 1.72V15h5.2v-.38c0-.69.37-1.32.9-1.72A6 6 0 0 0 12 2Z"})]}),rU=()=>f.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.55,flexShrink:0},children:[f.jsx("title",{children:"Note"}),f.jsx("path",{d:"M15 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z"}),f.jsx("path",{d:"M15 3v6h6"})]}),iU=({rows:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s})=>{const[o,a]=S.useState(new Set),l=s?"plan-rows-grid plan-rows-grid--deletable":"plan-rows-grid",c=u=>{a(d=>{const h=new Set(d);return h.has(u)?h.delete(u):h.add(u),h})};return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[1]},children:[f.jsx(xt,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:l,children:[f.jsx("span",{style:ss,children:"Id"}),f.jsx("span",{style:ss,children:"Title"}),f.jsx("span",{className:"plan-rows-cell-updated",style:ss,children:"Updated"}),f.jsx("span",{style:ss,children:"Progress"}),f.jsx("span",{style:ss,children:"Status"}),s&&f.jsx("span",{style:ss})]})}),e.map(u=>u.type==="plan"?f.jsx(SS,{plans:[u.plan],activePlanTitle:n,onOpen:r,onDeleteIdea:s,showHeader:!1},u.plan.title):u.type==="note"?f.jsx(sU,{row:u,onOpen:i,hasTrailingColumn:!!s},u.idea.title):f.jsx(oU,{row:u,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s,expanded:o.has(u.idea.title),onToggleExpanded:()=>c(u.idea.title)},u.idea.title))]})},sU=({row:e,onOpen:t,hasTrailingColumn:n})=>{const r=e.idea,i=r.status??"open";return f.jsx("div",{role:t?"button":void 0,tabIndex:t?0:void 0,onClick:t?()=>t(r.title):void 0,onKeyDown:t?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t(r.title))}:void 0,style:{cursor:t?"pointer":void 0,borderRadius:10},children:f.jsx(xt,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{className:n?"plan-rows-grid plan-rows-grid--deletable":"plan-rows-grid",children:[r.id?f.jsx(Fu,{id:r.id}):f.jsx("span",{}),f.jsxs("span",{style:{...CS,cursor:"inherit"},children:[f.jsx(rU,{}),f.jsx("span",{style:PS,children:r.title})]}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45},children:"—"}),f.jsx("span",{className:"text-sm",style:{opacity:.3},children:"—"}),f.jsx(jt,{size:"small",fillColor:tu[i].fill,textColor:tu[i].text,children:vS[i]}),n&&f.jsx("span",{})]})})})},oU=({row:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s,expanded:o,onToggleExpanded:a})=>{const l=e.idea,c=e.children,u=c.filter(m=>m.status==="done"),d=c.filter(m=>m.status!=="done"),h=c.length>tU,p=h&&!o?d:c;return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[1]},children:[f.jsx(xt,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{style:{display:"grid",gridTemplateColumns:"76px minmax(0, 1fr) 84px 1fr",gap:I[2],alignItems:"center"},children:[l.id?f.jsx(Fu,{id:l.id}):f.jsx("span",{}),f.jsxs("button",{type:"button",onClick:()=>i==null?void 0:i(l.title),style:CS,children:[f.jsx(nU,{}),f.jsx("span",{style:PS,children:l.title})]}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45},children:"—"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:I[2]},children:[f.jsx("span",{className:"text-sm",style:{opacity:c.length>0?.6:.3},children:c.length>0?`${u.length}/${c.length} plans done`:"—"}),f.jsx(ng,{idea:l,compact:!0}),f.jsx(kS,{idea:l,otherPlans:t})]})]})}),c.length>0&&f.jsxs("div",{style:{marginLeft:I[5],paddingLeft:I[3],borderLeft:"2px solid rgba(0,0,0,0.08)",display:"flex",flexDirection:"column",gap:I[1]},children:[f.jsx(SS,{plans:p,activePlanTitle:n,onOpen:r,onDeleteIdea:s,showHeader:!1}),h&&f.jsx("button",{type:"button",onClick:a,style:{alignSelf:"flex-start",background:"none",border:"none",padding:`${I[1]} 0`,opacity:.6,cursor:"pointer",textDecoration:"underline",fontSize:ee.xs,font:"inherit"},children:o?"Show less":`+${u.length} done`})]})]})},aU=({plans:e,rows:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s})=>{const o=S.useRef(null);return S.useEffect(()=>{var l;if(!n)return;const a=(l=o.current)==null?void 0:l.querySelector(".plan-row-highlighted");a==null||a.scrollIntoView({behavior:"smooth",block:"center"})},[n]),f.jsx("div",{ref:o,children:t.length>0?f.jsx(iU,{rows:t,plans:e,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,onDeleteIdea:s}):f.jsx("p",{style:{opacity:.5,padding:`${I[6]} 0`,textAlign:"center"},children:"No plans match your filters."})})},lU=({idea:e})=>f.jsxs("div",{style:{fontFamily:ie.body,fontSize:ee.base,lineHeight:Ht.relaxed,color:"#1C1B18"},children:[f.jsxs("h2",{style:{fontFamily:ie.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${I[4]}`,lineHeight:Ht.tight,display:"flex",alignItems:"center",gap:I[3]},children:[e.id&&f.jsx(jt,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e.id}),e.title,e.status&&f.jsx(jt,{size:"small",fillColor:tu[e.status].fill,textColor:tu[e.status].text,children:vS[e.status]})]}),f.jsx(uo,{children:e.body.replace(/^#{1,3}\s+.+(\n|$)/,"").replace(/^\s*-{3,}\s*(\n|$)/,"").trim()}),f.jsx("div",{style:{marginTop:I[6]},children:f.jsx(ng,{idea:e})})]}),cU=()=>{const e=G(o=>o.launchBatchReconcile),t=G(o=>o.agentStatus),[n,r]=S.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(de,{variant:"ghost",size:"small",onClick:s,disabled:i||n,style:{color:fe.textSecondary},children:"Actualise all"})},uU=()=>{const e=G(o=>o.loadPlans),t=G(o=>o.gitBranchHygiene),[n,r]=S.useState(!1),i=t==="stale-merged",s=async o=>{await d6(o),await e(),r(!1)};return f.jsxs(f.Fragment,{children:[f.jsx(Pn,{content:i?"Switch to main first":void 0,children:f.jsx(un,{icon:f.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:i?"Switch to main first":"Quick plan",disabled:i,onClick:()=>r(!0)})}),f.jsx(RB,{open:n,onClose:()=>r(!1),onAdd:s})]})},dU=({open:e,onClose:t,onAdd:n})=>{const[r,i]=S.useState(""),[s,o]=S.useState(""),[a,l]=S.useState(!1),[c,u]=S.useState(!1),[d,h]=S.useState(null);S.useEffect(()=>{e&&(i(""),o(""),l(!1),u(!1),h(null))},[e]);const p=async m=>{if(m.preventDefault(),!(!r.trim()||c)){h(null),u(!0);try{await n({title:r.trim(),content:s.trim()||void 0,kind:a?"note":void 0}),t()}catch(y){h(y.message)}finally{u(!1)}}};return f.jsx(so,{open:e,onClose:t,title:"New idea",size:"small",children:f.jsxs("form",{onSubmit:p,style:{display:"flex",flexDirection:"column",gap:I[4]},children:[f.jsx(jn,{label:"Title",value:r,onChange:m=>i(m.target.value),placeholder:"Idea title…",disabled:c,autoFocus:!0,required:!0}),f.jsx(oo,{label:"Description",value:s,onChange:m=>o(m.target.value),placeholder:"Optional details…",disabled:c,rows:4}),f.jsx(Pz,{label:"Note — never needs a plan",checked:a,onChange:m=>l(m.target.checked),disabled:c}),d&&f.jsx("p",{style:{margin:0,color:fe.accentRoseDark,fontSize:ee.sm},children:d}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[f.jsx(de,{type:"button",variant:"ghost",onClick:t,disabled:c,children:"Cancel"}),f.jsx(de,{type:"submit",variant:"primary",disabled:!r.trim()||c,children:"Add"})]})]})})},fU=()=>{const e=G(i=>i.loadIdeas),[t,n]=S.useState(!1),r=async i=>{await c6(i),await e(),n(!1)};return f.jsxs(f.Fragment,{children:[f.jsx(un,{icon:f.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:"New idea",onClick:()=>n(!0)}),f.jsx(dU,{open:t,onClose:()=>n(!1),onAdd:r})]})},hU=[{value:"status",label:"Status"},{value:"updated",label:"Updated"},{value:"created",label:"Created"},{value:"title",label:"Title"},{value:"id",label:"ID"},{value:"progress",label:"Phase progress"}],pU=()=>{const e=G(r=>r.planFilters),t=G(r=>r.setPlanSortKey),n=G(r=>r.togglePlanSortDirection);return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],marginBottom:I[6]},children:[f.jsx("h1",{className:"text-4xl",style:{flex:1,fontFamily:ie.serif,fontWeight:600,color:fe.textPrimary,margin:0,lineHeight:1.1},children:"Plans"}),f.jsxs("div",{style:{display:"flex",gap:I[2],alignItems:"center"},children:[f.jsx(Fi,{size:"small",options:hU,value:e.sortKey,onChange:r=>t(r)}),f.jsx(un,{icon:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:e.sortDirection==="desc"?"rotate(180deg)":void 0,transition:"transform 0.15s ease"},children:[f.jsx("title",{children:"Sort direction"}),f.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),f.jsx("polyline",{points:"5 12 12 5 19 12"})]}),label:e.sortDirection==="asc"?"Sort ascending":"Sort descending",size:"small",variant:"ghost",onClick:n})]}),f.jsx(fU,{}),f.jsx(uU,{}),f.jsx(cU,{})]})};function af(e,t){const n=e.split(/(\s+)/).filter(u=>u!==""),r=t.split(/(\s+)/).filter(u=>u!==""),i=n.length,s=r.length,o=Array.from({length:i+1},()=>new Array(s+1).fill(0));for(let u=i-1;u>=0;u--)for(let d=s-1;d>=0;d--)o[u][d]=n[u]===r[d]?o[u+1][d+1]+1:Math.max(o[u+1][d],o[u][d+1]);const a=[];let l=0,c=0;for(;l<i&&c<s;)n[l]===r[c]?(a.push({type:"same",text:n[l]}),l++,c++):o[l+1][c]>=o[l][c+1]?(a.push({type:"removed",text:n[l]}),l++):(a.push({type:"added",text:r[c]}),c++);for(;l<i;)a.push({type:"removed",text:n[l]}),l++;for(;c<s;)a.push({type:"added",text:r[c]}),c++;return mU(a)}function mU(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 lf=({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?fe.accentGreenDark:fe.accentRoseDark},children:t.text},`${t.type}-${n}`)})}),Tv=e=>f.jsx("h4",{style:{fontFamily:ie.serif,fontSize:ee.xs,fontWeight:600,margin:`0 0 ${I[2]}`,opacity:.65},children:e}),gU=({plan:e,before:t,onApprove:n,onDiscard:r,queuePosition:i})=>{const[s,o]=S.useState(!1),a=e.body!==t.body,l=e.phases.map((u,d)=>({phase:u,before:t.phases[d],index:d})).filter(({phase:u,before:d})=>d!==void 0&&(u.text!==d.text||(u.description??"")!==(d.description??""))),c=async()=>{o(!0);try{await r()}finally{o(!1)}};return f.jsx(so,{open:!0,title:i?`Review reconcile changes (${i.index} of ${i.total})`:"Review reconcile changes",size:"large",onClose:c,children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[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:[Tv("Body"),f.jsx("p",{className:"text-base",style:{margin:0,lineHeight:Ht.normal},children:f.jsx(lf,{tokens:af(t.body,e.body)})})]}),l.length>0&&f.jsxs("div",{children:[Tv("Phases"),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[3]},children:l.map(({phase:u,before:d,index:h})=>f.jsxs("div",{className:"text-sm",style:{lineHeight:Ht.normal},children:[f.jsx(lf,{tokens:af(d.text,u.text)}),(u.description||d.description)&&f.jsx("div",{style:{opacity:.85,marginTop:I[1]},children:f.jsx(lf,{tokens:af(d.description??"",u.description??"")})})]},h))})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:I[2]},children:[f.jsx(Is,{intent:"stop",size:"small",onClick:c,disabled:s,children:"Discard"}),f.jsx(Is,{intent:"go",size:"small",onClick:n,disabled:s,children:"Approve"})]})]})})},yU=()=>{const e=G(c=>c.reconcileQueue),t=G(c=>c.removeFromReconcileQueue),n=G(c=>c.plans),r=G(c=>c.loadPlans),{toast:i}=ao(),s=e[0]??null,o=s?(n==null?void 0:n.entries.find(c=>c.id===s.planId))??null:null;if(S.useEffect(()=>{s&&!o&&t(s.planId)},[s,o,t]),!s||!o)return null;const a=()=>{t(s.planId)},l=async()=>{try{await _s(o.title,{body:s.before.body,phases:s.before.phases}),await r(),t(s.planId)}catch(c){i({title:"Discard failed",description:c.message,variant:"error"})}};return f.jsx(gU,{plan:o,before:s.before,onApprove:a,onDiscard:l,queuePosition:{index:1,total:e.length}})},rg=()=>{const{plans:e,plansError:t,ideaEntries:n,loadPlans:r,planFilters:i}=G(),s=eg(),o=x6(),a=Kn(),l=()=>{a({to:"/"})},c=g=>{a({to:"/plans/$planId",params:{planId:encodeURIComponent(g)}})},u=g=>{a({to:"/ideas/$ideaId",params:{ideaId:encodeURIComponent(g)}})},[d,h]=S.useState(null),p=async g=>{await f6(g),await r(),s===g&&a({to:"/"})},m=s?e==null?void 0:e.entries.find(g=>g.title===s):null,y=o?n.find(g=>g.title===o):null;if(t)return f.jsxs("div",{children:[f.jsx(ji,{children:"Plans"}),f.jsxs(xt,{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(ji,{children:"Plans"}),f.jsx("p",{style:{opacity:.5},children:"Loading…"})]});const{rows:w}=TV(e.entries,n,i);return f.jsxs(f.Fragment,{children:[f.jsx(yU,{}),m?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:I[4]},children:f.jsx(Fh,{items:[{id:"plans",label:"Plans",onClick:l},{id:"plan",label:m.title}]})}),f.jsx(eU,{plan:m})]}):y?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:I[4]},children:f.jsx(Fh,{items:[{id:"plans",label:"Plans",onClick:l},{id:"idea",label:y.title}]})}),f.jsx(lU,{idea:y})]}):f.jsxs("div",{children:[f.jsx(pU,{}),e.warnings.length>0&&f.jsxs(xt,{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:I[5]},children:e.warnings.map(g=>f.jsxs("li",{children:[g.title,": ",g.message]},g.title))})]}),e.entries.length===0?f.jsxs("p",{style:{opacity:.5},children:["No plans yet. Run ",f.jsx("code",{children:'paper-camp add plan "name"'}),", or add one to the backlog above."]}):f.jsx(aU,{plans:e.entries,rows:w,activePlanTitle:s,onOpenPlan:c,onOpenIdea:u,onDeleteIdea:h}),f.jsx(z6,{title:d,onClose:()=>h(null),onConfirm:p})]})]})},Rv=8,xU=["in-progress","review","planned","idea","done","dropped"],vU={...tg,idea:"Backlog"},Lv={fontSize:ee["2xs"],fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:fe.textTertiary,margin:`0 0 ${I[2]}`},wU=()=>{const e=G(g=>g.plans),t=eg(),n=G(g=>g.planFilters),r=G(g=>g.togglePlanStatus),i=G(g=>g.togglePlanTag),s=G(g=>g.setPlanSearch),[o,a]=S.useState(!1);if(!e||t)return null;const{statusCounts:l,tagCounts:c}=oc(e.entries,n),u=new Set(n.statuses),d=new Set(n.tags),p=[...new Set([...Object.keys(c),...n.tags])].sort((g,x)=>{const v=(c[x]??0)-(c[g]??0);return v!==0?v:g.localeCompare(x)}),m=o?p:p.slice(0,Rv),y=p.length-m.length,w={background:"none",border:"none",padding:0,cursor:"pointer",opacity:.7,textDecoration:"underline",fontSize:ee["2xs"]};return f.jsx("div",{style:{marginTop:`calc(-1 * ${I[5]})`},children:f.jsx(xt,{surface:"paper",texture:"speckle",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[5]},children:[f.jsx("h2",{style:{margin:0,fontFamily:ie.serif,fontSize:ee.base,color:fe.textPrimary},children:"Filters"}),f.jsx(jn,{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:Lv,children:"Status"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:I[1]},children:xU.map(g=>{const x=u.has(g);return f.jsxs("button",{type:"button",onClick:()=>r(g),"aria-pressed":x,style:{display:"flex",alignItems:"center",gap:I[2],width:"100%",padding:`${I[1]} ${I[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:Xh[g].text}}),f.jsx("span",{style:{flex:1,fontSize:ee.xs,color:fe.textPrimary},children:vU[g]}),f.jsx("span",{style:{fontSize:ee["2xs"],color:fe.textSecondary},children:l[g]})]},g)})})]}),f.jsxs("div",{children:[f.jsx("div",{style:Lv,children:"Tags"}),f.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:I[1],alignItems:"center"},children:[p.length===0&&f.jsx("span",{style:{opacity:.5,fontSize:ee["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:ee["2xs"],padding:`2px ${I[2]}`,borderRadius:6,border:"0.5px solid rgba(0,0,0,0.12)",cursor:"pointer",background:x?"rgba(0,0,0,0.08)":"transparent",opacity:x?1:.55},children:[g," ",c[g]??0]},g)}),y>0&&f.jsxs("button",{type:"button",onClick:()=>a(!0),style:w,children:["+",y," more"]}),o&&p.length>Rv&&f.jsx("button",{type:"button",onClick:()=>a(!1),style:w,children:"Show less"})]})]})]})})})},bU=({plan:e,disabled:t})=>{const n=G(o=>o.launchRunAll),[r,i]=S.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id)}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(Pn,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(de,{variant:"ghost",size:"small",onClick:s,disabled:t||r||!e.id,style:{color:fe.textSecondary},children:"Run all phases"})})},Mv={fontSize:ee["2xs"],fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:fe.textTertiary,margin:`0 0 ${I[2]}`},kU=()=>{const e=G(y=>y.plans),t=eg(),n=G(y=>y.loadPlans),r=G(y=>y.agentStatus),{toast:i}=ao(),[s,o]=S.useState(!1),a=t?e==null?void 0:e.entries.find(y=>y.title===t):null;if(!a)return null;const l=r!==null&&r.status!=="done"&&r.status!=="error",c=a.phases.length>0,u=a.status==="in-progress",d=a.status==="review",h=a.phases.some(y=>!y.done),p=(a.status==="planned"||u)&&h,m=async y=>{o(!0);try{await _s(a.title,y),await n()}catch(w){i({title:"Update failed",description:w.message,variant:"error"})}finally{o(!1)}};return f.jsx("div",{style:{marginTop:`calc(-1 * ${I[5]})`},children:f.jsx(xt,{surface:"paper",texture:"speckle",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[5]},children:[f.jsx("h2",{style:{margin:0,fontFamily:ie.serif,fontSize:ee.base,color:fe.textPrimary},children:"Plan"}),f.jsxs("div",{children:[f.jsx("div",{style:Mv,children:"Status"}),f.jsx(Fi,{size:"small",value:a.status,onChange:y=>m({status:y}),disabled:s,options:T_.map(y=>({value:y,label:tg[y]}))})]}),f.jsxs("div",{children:[f.jsx("div",{style:Mv,children:"Agent"}),f.jsx(Fi,{size:"small",value:a.agent??"",onChange:y=>m({agent:y||null}),disabled:s,options:[{value:"",label:"Project default agent"},...R_.map(y=>({value:y,label:Nm[y]}))]})]}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:I[2]},children:[!d&&c&&f.jsx(Is,{intent:u?"stop":"go",size:"small",fullWidth:!0,onClick:()=>m({status:u?"planned":"in-progress"}),disabled:s,children:u?"Stop":"Start"}),p&&f.jsx(bU,{plan:a,disabled:l}),d&&f.jsxs(f.Fragment,{children:[f.jsx(Is,{intent:"go",size:"small",fullWidth:!0,onClick:()=>m({status:"done"}),disabled:s,children:"Approve & close"}),f.jsx(Is,{intent:"stop",size:"small",fullWidth:!0,onClick:()=>m({status:"in-progress"}),disabled:s,children:"Needs changes"})]})]})]})})})},_U=async()=>{try{return(await fetch("/api/config")).json()}catch{return null}},cf=async e=>{try{return(await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok}catch{return!1}},SU=async()=>{try{return(await(await fetch("/api/configs")).json()).files}catch{return[]}},CU=async e=>{try{const t=await fetch(`/api/configs?name=${encodeURIComponent(e)}`);return t.ok?(await t.json()).content:null}catch{return null}},ES=async()=>{try{return await(await fetch("/api/env")).json()}catch{return{exists:!1,exampleExists:!1,entries:[],missingKeys:[]}}},PU=async e=>{try{return(await fetch("/api/env",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entries:e})})).ok}catch{return!1}},Iv=["phase","planDraft","ideaExtend","commitSuggest"],EU={phase:"Phase run",planDraft:"Plan draft",ideaExtend:"Idea extend",commitSuggest:"Commit suggest"},jS=110,TS=140,Zh=160,RS=110,jU=()=>f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],paddingBottom:I[1]},children:[f.jsx("span",{style:{width:jS,flexShrink:0,fontSize:ee.sm,opacity:.45},children:"Task"}),f.jsx("span",{style:{width:TS,flexShrink:0,fontSize:ee.sm,opacity:.45},children:"Agent"}),f.jsx("span",{style:{width:Zh,flexShrink:0,fontSize:ee.sm,opacity:.45},children:"Model"}),f.jsx("span",{style:{width:RS,flexShrink:0,fontSize:ee.sm,opacity:.45},children:"Effort"})]}),TU=({taskKey:e,agentConfig:t,isLast:n,onSave:r})=>{const i=Wd[t.agent]??Wd["claude-code"],s=i.model,o=i.effort,[a,l]=S.useState(t.model??"");S.useEffect(()=>{l(t.model??"")},[t.model]);const c=p=>{var g;const m=p,y=Wd[m],w={agent:m};t.model&&(y.model===null||(g=y.model)!=null&&g.includes(t.model))&&(w.model=t.model),t.effort&&Array.isArray(y.effort)&&(w.effort=t.effort),r(e,w)},u=p=>{r(e,{...t,model:p||void 0})},d=()=>{r(e,{...t,model:a||void 0})},h=p=>{r(e,{...t,effort:p||void 0})};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],paddingBottom:I[2],paddingTop:I[2]},children:[f.jsx("span",{style:{width:jS,flexShrink:0,fontSize:ee.sm,opacity:.65},children:EU[e]}),f.jsx(Fi,{size:"small",width:TS,value:t.agent,onChange:c,options:R_.map(p=>({value:p,label:Nm[p]}))}),Array.isArray(s)?f.jsx(Fi,{size:"small",width:Zh,value:t.model??"",onChange:u,options:[{value:"",label:"Default"},...s.map(p=>({value:p,label:p}))]}):s===null?f.jsx(jn,{size:"small",style:{width:Zh},value:a,placeholder:"Default model",onChange:p=>l(p.target.value),onBlur:d}):null,f.jsx("div",{style:{visibility:Array.isArray(o)?"visible":"hidden"},children:f.jsx(Fi,{size:"small",width:RS,value:t.effort??"",onChange:h,options:[{value:"",label:"Default"},...(Array.isArray(o)?o:[]).map(p=>({value:p,label:p}))]})})]}),!n&&f.jsx(Ms,{})]})},RU=()=>{const e=S.useRef(null),[t,n]=S.useState(void 0),{iconDataUri:r,loading:i}=hS(),[s,o]=S.useState(null),a=s??r,[l,c]=S.useState(!1),[u,d]=S.useState(""),[h,p]=S.useState(""),{toast:m}=ao();S.useEffect(()=>{_U().then(v=>{n(v),(v==null?void 0:v.port)!==void 0&&d(String(v.port)),(v==null?void 0:v.projectName)!==void 0&&p(v.projectName)})},[]);const y=async(v,b)=>{const C=t==null?void 0:t.defaultAgents,_={phase:(C==null?void 0:C.phase)??Lo.phase,planDraft:(C==null?void 0:C.planDraft)??Lo.planDraft,ideaExtend:(C==null?void 0:C.ideaExtend)??Lo.ideaExtend,commitSuggest:(C==null?void 0:C.commitSuggest)??Lo.commitSuggest,[v]:b};await cf({defaultAgents:_})?(n(j=>j&&{...j,defaultAgents:_}),m({title:"Saved",variant:"success"})):m({title:"Failed to save",variant:"error"})},w=async()=>{const v=Number(u);if(!t||!Number.isInteger(v)||v<=0||v===t.port)return;await cf({port:v})?(n(C=>C&&{...C,port:v}),m({title:"Saved",variant:"success"})):m({title:"Failed to save",variant:"error"})},g=async()=>{const v=h.trim();if(!t||!v||v===t.projectName)return;await cf({projectName:v})?(n(C=>C&&{...C,projectName:v}),p(v),m({title:"Saved",variant:"success"})):m({title:"Failed to save",variant:"error"})},x=async v=>{var _;const b=(_=v.target.files)==null?void 0:_[0];if(!b)return;c(!0);const C=new FileReader;C.onloadend=async()=>{const E=C.result,j=await bV(E);c(!1),j?(o(E),m({title:"Saved",variant:"success"})):m({title:"Failed to save",variant:"error"})},C.readAsDataURL(b)};return f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:I[6]},children:f.jsx("h2",{style:{margin:0},children:"Project Info"})}),t===void 0&&f.jsx("p",{children:"Loading…"}),t===null&&f.jsxs(Or,{variant:"warning",children:["No papercamp/config.json found — run ",f.jsx("code",{children:"paper-camp init"})," in this directory first."]}),t&&f.jsxs(xt,{size:"small",children:[f.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:I[3],paddingBottom:I[3]},children:[f.jsx(jn,{value:h,onChange:v=>p(v.target.value),onBlur:g,label:"Project Name"}),f.jsxs(jt,{size:"small",fillColor:"rgba(143, 185, 150, 0.25)",textColor:fe.accentGreenDark,children:["v",t.version]})]}),f.jsx(Ms,{}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],paddingBottom:I[3],paddingTop:I[3]},children:[a&&f.jsx("img",{src:a,alt:"Project icon",style:{width:40,height:40,objectFit:"contain",flexShrink:0,borderRadius:4}}),f.jsxs("div",{children:[f.jsx("input",{ref:e,type:"file",accept:".svg,.png,.jpg,.jpeg,.gif,.webp",onChange:x,style:{display:"none"}}),f.jsx(de,{variant:"secondary",size:"small",onClick:()=>{var v;return(v=e.current)==null?void 0:v.click()},disabled:l,children:l?"Uploading…":"Choose File"}),i&&f.jsx("p",{className:"text-sm",style:{opacity:.5,margin:`${I[1]} 0 0`},children:"Loading…"}),!i&&!a&&!l&&f.jsx("p",{className:"text-sm",style:{opacity:.45,margin:`${I[1]} 0 0`},children:"No icon set."})]})]}),f.jsx(Ms,{}),f.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:I[3],paddingBottom:I[3],paddingTop:I[3]},children:f.jsx(jn,{type:"number",value:u,onChange:v=>d(v.target.value),onBlur:w,label:"Port",helperText:"Default for `paper-camp dev`. Does not affect the running server."})}),f.jsx(Ms,{}),f.jsx(jU,{}),Iv.map((v,b)=>{var C;return f.jsx(TU,{taskKey:v,agentConfig:((C=t.defaultAgents)==null?void 0:C[v])??Lo[v],isLast:b===Iv.length-1,onSave:y},v)})]}),f.jsxs("p",{style:{opacity:.45,fontSize:ee.sm,marginTop:I[4]},children:[f.jsx("strong",{children:"Initialized:"})," ",t?new Date(t.initializedAt).toLocaleString():"—"]})]})},LU=e=>{try{const t=JSON.parse(e);return!t.scripts||typeof t.scripts!="object"?null:Object.entries(t.scripts).map(([n,r])=>({name:n,command:r}))}catch{return null}},MU=({fileName:e})=>{const[t,n]=S.useState(null),[r,i]=S.useState(!0);if(S.useEffect(()=>{i(!0),CU(e).then(o=>{n(o),i(!1)})},[e]),r)return f.jsx("p",{children:"Loading…"});if(t===null)return f.jsxs(Or,{variant:"warning",children:["Could not load file — ",e," not found."]});const s=e==="package.json"?LU(t):null;return f.jsxs("div",{children:[f.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:I[4]},children:f.jsx("h2",{style:{margin:0},children:e})}),s?f.jsx(Dm,{data:s,columns:[{key:"name",header:"Script",cell:o=>f.jsx("span",{style:{fontFamily:ie.mono},children:o.name}),width:4},{key:"command",header:"Command",cell:o=>f.jsx("span",{style:{fontFamily:ie.mono},children:o.command})}]}):f.jsx(uN,{code:t,filename:e})]})},Av=e=>/key|secret|token|password/i.test(e),IU=()=>{const[e,t]=S.useState(!0),[n,r]=S.useState([]),[i,s]=S.useState([]),[o,a]=S.useState(new Set),[l,c]=S.useState(!1),[u,d]=S.useState(!1),[h,p]=S.useState(null);S.useEffect(()=>{ES().then(b=>{r(b.entries),s(b.missingKeys),t(!1)})},[]);const m=(b,C)=>{r(_=>_.map((E,j)=>j===b?{...E,...C}:E))},y=()=>r(b=>[...b,{key:"",value:""}]),w=b=>{r(C=>[...C,{key:b,value:""}]),s(C=>C.filter(_=>_!==b))},g=b=>{r(C=>C.filter((_,E)=>E!==b)),a(C=>{const _=new Set(C);return _.delete(b),_})},x=b=>a(C=>{const _=new Set(C);return _.has(b)?_.delete(b):_.add(b),_}),v=async()=>{const b=n.map(E=>({key:E.key.trim(),value:E.value})).filter(E=>E.key.length>0);if(new Set(b.map(E=>E.key)).size!==b.length){p("Duplicate keys are not allowed");return}p(null),c(!0);const _=await PU(b);c(!1),_?(r(b),d(!0),setTimeout(()=>d(!1),2e3)):p("Failed to save .env")};return e?f.jsx("p",{children:"Loading…"}):f.jsxs("div",{children:[f.jsx("h2",{style:{margin:0,marginBottom:I[4]},children:"Environment Variables"}),h&&f.jsxs(Or,{variant:"warning",children:["Could not save — ",h]}),i.length>0&&f.jsxs(xt,{size:"small",accent:!0,accentColor:"amber",children:[f.jsx("p",{style:{margin:0,fontWeight:600},children:"Missing from .env"}),f.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:I[2],alignItems:"center"},children:[f.jsx("span",{children:"Present in .env.example but not set:"}),i.map(b=>f.jsxs(de,{variant:"secondary",size:"small",onClick:()=>w(b),children:["+ ",b]},b))]})]}),f.jsx(Dm,{data:n,columns:[{key:"key",header:"Key",cell:(b,C)=>f.jsx(jn,{value:b.key,placeholder:"KEY",style:{fontFamily:ie.mono},onChange:_=>m(C,{key:_.target.value})}),width:6},{key:"value",header:"Value",cell:(b,C)=>{const _=Av(b.key)&&!o.has(C);return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[2]},children:[f.jsx(jn,{type:_?"password":"text",value:b.value,placeholder:"value",style:{fontFamily:ie.mono,flex:1},onChange:E=>m(C,{value:E.target.value})}),Av(b.key)&&f.jsx(de,{variant:"ghost",size:"small",onClick:()=>x(C),children:_?"Show":"Hide"})]})}},{key:"actions",header:"",width:2,cell:(b,C)=>f.jsx(un,{icon:f.jsx(Qi,{}),variant:"ghost",size:"small",label:"Remove variable",onClick:()=>g(C)})}]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:I[3],marginTop:I[4]},children:[f.jsx(de,{variant:"secondary",size:"small",onClick:y,children:"+ Add variable"}),f.jsx(de,{variant:"primary",size:"small",onClick:v,disabled:l,children:l?"Saving…":"Save"}),u&&f.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]})]})},AU=()=>{const e=G(t=>t.activeSettingsSection);return f.jsxs("div",{children:[f.jsx(ji,{children:"Settings"}),e==="general"&&f.jsx(RU,{}),e==="env"&&f.jsx(IU,{}),e.startsWith("config:")&&f.jsx(MU,{fileName:e.slice(7)})]})},DU=()=>{const e=G(o=>o.activeSettingsSection),t=G(o=>o.setActiveSettingsSection),n=G(o=>o.settingsConfigFiles),r=G(o=>o.setSettingsConfigFiles),[i,s]=S.useState(!1);return S.useEffect(()=>{SU().then(r),ES().then(o=>s(o.exists||o.exampleExists))},[r]),f.jsxs(f.Fragment,{children:[f.jsx(Ti,{label:"General",children:f.jsx(Ei,{size:"small",active:e==="general",onClick:()=>t("general"),children:"Project Info"})}),i&&f.jsx(Ti,{label:"Environment",children:f.jsx(Ei,{size:"small",active:e==="env",onClick:()=>t("env"),children:"Env Vars"})}),n.length>0&&f.jsx(Ti,{label:"Config Files",children:n.map(o=>f.jsx(Ei,{size:"small",active:e===`config:${o}`,onClick:()=>t(`config:${o}`),children:o},o))})]})},Dv=[{id:"plans",label:"Plans",path:"/"},{id:"docs",label:"Docs",path:"/docs"},{id:"settings",label:"Settings",path:"/settings"}],LS="stack-open";function NU(){try{return localStorage.getItem(LS)==="true"}catch{return!1}}function FU(e){try{localStorage.setItem(LS,String(e))}catch{}}const zU="(min-width: 1440px)",Nv=32;function BU(e){const[t,n]=S.useState(()=>typeof window<"u"?window.matchMedia(e).matches:!1);return S.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 OU=()=>{var m;const e=Kn(),t=dT({select:y=>y.location.pathname}),n=G(y=>y.loadPlans),r=G(y=>y.loadIdeas),i=t==="/"||t.startsWith("/plans/")||t.startsWith("/ideas/"),s=t==="/docs"||t.startsWith("/docs/"),o=i?"plans":s?"docs":(m=Dv.find(y=>y.path===t))==null?void 0:m.id,a=i||s||t==="/settings",[l,c]=S.useState(NU),[u,d]=S.useState(!1),h=Ru(),p=BU(zU);return S.useEffect(()=>{n(),r()},[n,r]),S.useEffect(()=>{d(!1)},[t]),f.jsxs(xB,{children:[f.jsx("div",{className:"h-screen box-border min-[1440px]:pr-[480px]",children:f.jsx(gD,{background:{texture:"paper",ruledType:"grid",ruledColor:"blue"},showHeader:!0,showSidebar:!1,showPage:!1,bleedBottom:!0,headerActions:f.jsxs(f.Fragment,{children:[a&&f.jsx(un,{variant:"ghost",size:"small",className:"lg:hidden",label:"Open sidebar",onClick:()=>d(!0),icon:f.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:f.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),f.jsx(w6,{size:"sm"}),f.jsx("div",{className:"flex-1"}),f.jsx("nav",{"aria-label":"Main navigation",className:"flex items-center gap-1",children:Dv.map(y=>f.jsx(de,{variant:"ghost",size:"small",isActive:y.id===o,onClick:()=>e({to:y.path}),"aria-current":y.id===o?"page":void 0,children:y.label},y.id))})]}),children:f.jsx("div",{className:"flex h-full min-h-0 justify-center items-stretch box-border overflow-hidden",children:f.jsxs("div",{className:"flex h-full min-h-0 min-w-0",style:{gap:rc.contentGap,...p?{width:"100%",paddingLeft:Nv,paddingRight:Nv}:{}},children:[a&&f.jsxs(b6,{routeKey:t,mobileOpen:u,onMobileClose:()=>d(!1),children:[i&&f.jsxs(f.Fragment,{children:[f.jsx(wU,{}),f.jsx(kU,{})]}),s&&f.jsx(F6,{}),t==="/settings"&&f.jsx(DU,{})]}),f.jsx("div",{className:"flex flex-col min-h-0 min-w-0",style:{flex:p?"1 1 0%":"0 1 800px"},children:f.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:f.jsx(k_,{texture:{texture:"parchment"},outline:!0,style:{height:"auto",...p?{maxWidth:"none"}:{}},children:f.jsx(ju,{mode:"wait",children:f.jsx(Qs.div,{initial:h?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:h?void 0:{opacity:0,y:-8},transition:{duration:h?0:.2,ease:"easeOut"},children:f.jsx(Sb,{})},t)})})})})]})})})}),f.jsx(R6,{open:l,pinned:p,onToggle:()=>{const y=!l;FU(y),c(y)}})]})},qi=qj({component:OU}),$U=Js({getParentRoute:()=>qi,path:"/",component:rg}),VU=Js({getParentRoute:()=>qi,path:"/plans/$planId",component:rg}),UU=Js({getParentRoute:()=>qi,path:"/ideas/$ideaId",component:rg}),WU=Js({getParentRoute:()=>qi,path:"/docs",component:yS}),HU=Js({getParentRoute:()=>qi,path:"/docs/$section",component:yS}),KU=Js({getParentRoute:()=>qi,path:"/settings",component:AU}),GU=qi.addChildren([$U,VU,UU,WU,HU,KU]),QU=aT({routeTree:GU}),MS=document.getElementById("root");if(!MS)throw new Error("#root element not found");Yw(MS).render(f.jsx(S.StrictMode,{children:f.jsx(uT,{router:QU})}));
200
+ //# sourceMappingURL=main-CDaKqAAm.js.map