@dendelion/paper-camp 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +26 -0
- package/dist/app/assets/main-B61tEYvn.css +1 -0
- package/dist/app/assets/main-tAEncq68.js +272 -0
- package/dist/app/assets/main-tAEncq68.js.map +1 -0
- package/dist/app/fonts/Luminari-Regular.woff +0 -0
- package/dist/app/index.html +18 -0
- package/dist/chunks/serializer.D1Ts_p8h.js +462 -0
- package/dist/chunks/serializer.D1Ts_p8h.js.map +1 -0
- package/dist/cli/index.js +1250 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/core/env.d.ts +9 -0
- package/dist/core/env.d.ts.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +35 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/parser.d.ts +16 -0
- package/dist/core/parser.d.ts.map +1 -0
- package/dist/core/parser.test.d.ts +2 -0
- package/dist/core/parser.test.d.ts.map +1 -0
- package/dist/core/scaffold.d.ts +14 -0
- package/dist/core/scaffold.d.ts.map +1 -0
- package/dist/core/schemas.d.ts +78 -0
- package/dist/core/schemas.d.ts.map +1 -0
- package/dist/core/serializer.d.ts +51 -0
- package/dist/core/serializer.d.ts.map +1 -0
- package/dist/core.d.ts +2 -0
- package/dist/fonts/Luminari-Regular.woff +0 -0
- package/dist/types/index.d.ts +132 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +23 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/package.json +79 -0
|
@@ -0,0 +1,272 @@
|
|
|
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 lc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wS={exports:{}},vd={},bS={exports:{}},le={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var yl=Symbol.for("react.element"),fA=Symbol.for("react.portal"),hA=Symbol.for("react.fragment"),pA=Symbol.for("react.strict_mode"),mA=Symbol.for("react.profiler"),gA=Symbol.for("react.provider"),yA=Symbol.for("react.context"),vA=Symbol.for("react.forward_ref"),xA=Symbol.for("react.suspense"),wA=Symbol.for("react.memo"),bA=Symbol.for("react.lazy"),Av=Symbol.iterator;function SA(e){return e===null||typeof e!="object"?null:(e=Av&&e[Av]||e["@@iterator"],typeof e=="function"?e:null)}var SS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_S=Object.assign,kS={};function Eo(e,t,n){this.props=e,this.context=t,this.refs=kS,this.updater=n||SS}Eo.prototype.isReactComponent={};Eo.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")};Eo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function CS(){}CS.prototype=Eo.prototype;function Hm(e,t,n){this.props=e,this.context=t,this.refs=kS,this.updater=n||SS}var Zm=Hm.prototype=new CS;Zm.constructor=Hm;_S(Zm,Eo.prototype);Zm.isPureReactComponent=!0;var Rv=Array.isArray,PS=Object.prototype.hasOwnProperty,Km={current:null},TS={key:!0,ref:!0,__self:!0,__source:!0};function ES(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)PS.call(t,r)&&!TS.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:yl,type:e,key:s,ref:o,props:i,_owner:Km.current}}function _A(e,t){return{$$typeof:yl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Gm(e){return typeof e=="object"&&e!==null&&e.$$typeof===yl}function kA(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Iv=/\/+/g;function af(e,t){return typeof e=="object"&&e!==null&&e.key!=null?kA(""+e.key):t.toString(36)}function Pu(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 yl:case fA:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+af(o,0):r,Rv(i)?(n="",e!=null&&(n=e.replace(Iv,"$&/")+"/"),Pu(i,t,n,"",function(u){return u})):i!=null&&(Gm(i)&&(i=_A(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Iv,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Rv(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+af(s,a);o+=Pu(s,t,n,l,i)}else if(l=SA(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+af(s,a++),o+=Pu(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 Ol(e,t,n){if(e==null)return e;var r=[],i=0;return Pu(e,r,"","",function(s){return t.call(n,s,i++)}),r}function CA(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 jt={current:null},Tu={transition:null},PA={ReactCurrentDispatcher:jt,ReactCurrentBatchConfig:Tu,ReactCurrentOwner:Km};function jS(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:Ol,forEach:function(e,t,n){Ol(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ol(e,function(){t++}),t},toArray:function(e){return Ol(e,function(t){return t})||[]},only:function(e){if(!Gm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Component=Eo;le.Fragment=hA;le.Profiler=mA;le.PureComponent=Hm;le.StrictMode=pA;le.Suspense=xA;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PA;le.act=jS;le.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=_S({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Km.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)PS.call(t,l)&&!TS.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:yl,type:e.type,key:i,ref:s,props:r,_owner:o}};le.createContext=function(e){return e={$$typeof:yA,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gA,_context:e},e.Consumer=e};le.createElement=ES;le.createFactory=function(e){var t=ES.bind(null,e);return t.type=e,t};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:vA,render:e}};le.isValidElement=Gm;le.lazy=function(e){return{$$typeof:bA,_payload:{_status:-1,_result:e},_init:CA}};le.memo=function(e,t){return{$$typeof:wA,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=Tu.transition;Tu.transition={};try{e()}finally{Tu.transition=t}};le.unstable_act=jS;le.useCallback=function(e,t){return jt.current.useCallback(e,t)};le.useContext=function(e){return jt.current.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e){return jt.current.useDeferredValue(e)};le.useEffect=function(e,t){return jt.current.useEffect(e,t)};le.useId=function(){return jt.current.useId()};le.useImperativeHandle=function(e,t,n){return jt.current.useImperativeHandle(e,t,n)};le.useInsertionEffect=function(e,t){return jt.current.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return jt.current.useLayoutEffect(e,t)};le.useMemo=function(e,t){return jt.current.useMemo(e,t)};le.useReducer=function(e,t,n){return jt.current.useReducer(e,t,n)};le.useRef=function(e){return jt.current.useRef(e)};le.useState=function(e){return jt.current.useState(e)};le.useSyncExternalStore=function(e,t,n){return jt.current.useSyncExternalStore(e,t,n)};le.useTransition=function(){return jt.current.useTransition()};le.version="18.3.1";bS.exports=le;var P=bS.exports;const os=yd(P);/**
|
|
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 TA=P,EA=Symbol.for("react.element"),jA=Symbol.for("react.fragment"),AA=Object.prototype.hasOwnProperty,RA=TA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,IA={key:!0,ref:!0,__self:!0,__source:!0};function AS(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)AA.call(t,r)&&!IA.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:EA,type:e,key:s,ref:o,props:i,_owner:RA.current}}vd.Fragment=jA;vd.jsx=AS;vd.jsxs=AS;wS.exports=vd;var g=wS.exports,RS={exports:{}},nn={},IS={exports:{}},MS={};/**
|
|
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,V){var _=D.length;D.push(V);e:for(;0<_;){var z=_-1>>>1,Y=D[z];if(0<i(Y,V))D[z]=V,D[_]=Y,_=z;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var V=D[0],_=D.pop();if(_!==V){D[0]=_;e:for(var z=0,Y=D.length,j=Y>>>1;z<j;){var ie=2*(z+1)-1,de=D[ie],ue=ie+1,qe=D[ue];if(0>i(de,_))ue<Y&&0>i(qe,de)?(D[z]=qe,D[ue]=_,z=ue):(D[z]=de,D[ie]=_,z=ie);else if(ue<Y&&0>i(qe,_))D[z]=qe,D[ue]=_,z=ue;else break e}}return V}function i(D,V){var _=D.sortIndex-V.sortIndex;return _!==0?_:D.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=D)r(u),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(u)}}function S(D){if(y=!1,w(D),!p)if(n(l)!==null)p=!0,G(k);else{var V=n(u);V!==null&&Z(S,V.startTime-D)}}function k(D,V){p=!1,y&&(y=!1,m(T),T=-1),h=!0;var _=f;try{for(w(V),d=n(l);d!==null&&(!(d.expirationTime>V)||D&&!I());){var z=d.callback;if(typeof z=="function"){d.callback=null,f=d.priorityLevel;var Y=z(d.expirationTime<=V);V=e.unstable_now(),typeof Y=="function"?d.callback=Y:d===n(l)&&r(l),w(V)}else r(l);d=n(l)}if(d!==null)var j=!0;else{var ie=n(u);ie!==null&&Z(S,ie.startTime-V),j=!1}return j}finally{d=null,f=_,h=!1}}var b=!1,C=null,T=-1,A=5,E=-1;function I(){return!(e.unstable_now()-E<A)}function M(){if(C!==null){var D=e.unstable_now();E=D;var V=!0;try{V=C(!0,D)}finally{V?F():(b=!1,C=null)}}else b=!1}var F;if(typeof v=="function")F=function(){v(M)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,$=B.port2;B.port1.onmessage=M,F=function(){$.postMessage(null)}}else F=function(){x(M,0)};function G(D){C=D,b||(b=!0,F())}function Z(D,V){T=x(function(){D(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,G(k))},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"):A=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(D){switch(f){case 1:case 2:case 3:var V=3;break;default:V=f}var _=f;f=V;try{return D()}finally{f=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,V){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var _=f;f=D;try{return V()}finally{f=_}},e.unstable_scheduleCallback=function(D,V,_){var z=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?z+_:z):_=z,D){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=_+Y,D={id:c++,callback:V,priorityLevel:D,startTime:_,expirationTime:Y,sortIndex:-1},_>z?(D.sortIndex=_,t(u,D),n(l)===null&&D===n(u)&&(y?(m(T),T=-1):y=!0,Z(S,_-z))):(D.sortIndex=Y,t(l,D),p||h||(p=!0,G(k))),D},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(D){var V=f;return function(){var _=f;f=V;try{return D.apply(this,arguments)}finally{f=_}}}})(MS);IS.exports=MS;var MA=IS.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 LA=P,tn=MA;function W(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 LS=new Set,Oa={};function ms(e,t){po(e,t),po(e+"Capture",t)}function po(e,t){for(Oa[e]=t,e=0;e<t.length;e++)LS.add(t[e])}var kr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$h=Object.prototype.hasOwnProperty,DA=/^[: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]*$/,Mv={},Lv={};function zA(e){return $h.call(Lv,e)?!0:$h.call(Mv,e)?!1:DA.test(e)?Lv[e]=!0:(Mv[e]=!0,!1)}function NA(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 $A(e,t,n,r){if(t===null||typeof t>"u"||NA(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 At(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 pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pt[e]=new At(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pt[t]=new At(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new At(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new At(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){pt[e]=new At(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new At(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pt[e]=new At(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pt[e]=new At(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pt[e]=new At(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ym=/[\-:]([a-z])/g;function Xm(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(Ym,Xm);pt[t]=new At(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(Ym,Xm);pt[t]=new At(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(Ym,Xm);pt[t]=new At(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new At(e,1,!1,e.toLowerCase(),null,!1,!1)});pt.xlinkHref=new At("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pt[e]=new At(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qm(e,t,n,r){var i=pt.hasOwnProperty(t)?pt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($A(t,n,i,r)&&(n=null),r||i===null?zA(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 Ar=LA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fl=Symbol.for("react.element"),Ds=Symbol.for("react.portal"),zs=Symbol.for("react.fragment"),qm=Symbol.for("react.strict_mode"),Oh=Symbol.for("react.profiler"),DS=Symbol.for("react.provider"),zS=Symbol.for("react.context"),Jm=Symbol.for("react.forward_ref"),Fh=Symbol.for("react.suspense"),Bh=Symbol.for("react.suspense_list"),eg=Symbol.for("react.memo"),Hr=Symbol.for("react.lazy"),NS=Symbol.for("react.offscreen"),Dv=Symbol.iterator;function Wo(e){return e===null||typeof e!="object"?null:(e=Dv&&e[Dv]||e["@@iterator"],typeof e=="function"?e:null)}var $e=Object.assign,lf;function ca(e){if(lf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);lf=t&&t[1]||""}return`
|
|
34
|
+
`+lf+e}var uf=!1;function cf(e,t){if(!e||uf)return"";uf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
+
`),s=r.stack.split(`
|
|
36
|
+
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
|
37
|
+
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{uf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ca(e):""}function OA(e){switch(e.tag){case 5:return ca(e.type);case 16:return ca("Lazy");case 13:return ca("Suspense");case 19:return ca("SuspenseList");case 0:case 2:case 15:return e=cf(e.type,!1),e;case 11:return e=cf(e.type.render,!1),e;case 1:return e=cf(e.type,!0),e;default:return""}}function Vh(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 zs:return"Fragment";case Ds:return"Portal";case Oh:return"Profiler";case qm:return"StrictMode";case Fh:return"Suspense";case Bh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case zS:return(e.displayName||"Context")+".Consumer";case DS:return(e._context.displayName||"Context")+".Provider";case Jm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case eg:return t=e.displayName||null,t!==null?t:Vh(e.type)||"Memo";case Hr:t=e._payload,e=e._init;try{return Vh(e(t))}catch{}}return null}function FA(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 Vh(t);case 8:return t===qm?"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 pi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $S(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function BA(e){var t=$S(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bl(e){e._valueTracker||(e._valueTracker=BA(e))}function OS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$S(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function uc(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 Uh(e,t){var n=t.checked;return $e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=pi(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 FS(e,t){t=t.checked,t!=null&&Qm(e,"checked",t,!1)}function Wh(e,t){FS(e,t);var n=pi(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")?Hh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Hh(e,t.type,pi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Nv(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 Hh(e,t,n){(t!=="number"||uc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var da=Array.isArray;function eo(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=""+pi(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 Zh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return $e({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $v(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(W(92));if(da(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:pi(n)}}function BS(e,t){var n=pi(t.value),r=pi(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 Ov(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function VS(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 Kh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?VS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Vl,US=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(Vl=Vl||document.createElement("div"),Vl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Vl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var va={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},VA=["Webkit","ms","Moz","O"];Object.keys(va).forEach(function(e){VA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),va[t]=va[e]})});function WS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||va.hasOwnProperty(e)&&va[e]?(""+t).trim():t+"px"}function HS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=WS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var UA=$e({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 Gh(e,t){if(t){if(UA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function Yh(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 Xh=null;function tg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qh=null,to=null,no=null;function Fv(e){if(e=wl(e)){if(typeof Qh!="function")throw Error(W(280));var t=e.stateNode;t&&(t=_d(t),Qh(e.stateNode,e.type,t))}}function ZS(e){to?no?no.push(e):no=[e]:to=e}function KS(){if(to){var e=to,t=no;if(no=to=null,Fv(e),t)for(e=0;e<t.length;e++)Fv(t[e])}}function GS(e,t){return e(t)}function YS(){}var df=!1;function XS(e,t,n){if(df)return e(t,n);df=!0;try{return GS(e,t,n)}finally{df=!1,(to!==null||no!==null)&&(YS(),KS())}}function Ba(e,t){var n=e.stateNode;if(n===null)return null;var r=_d(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(W(231,t,typeof n));return n}var qh=!1;if(kr)try{var Ho={};Object.defineProperty(Ho,"passive",{get:function(){qh=!0}}),window.addEventListener("test",Ho,Ho),window.removeEventListener("test",Ho,Ho)}catch{qh=!1}function WA(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var xa=!1,cc=null,dc=!1,Jh=null,HA={onError:function(e){xa=!0,cc=e}};function ZA(e,t,n,r,i,s,o,a,l){xa=!1,cc=null,WA.apply(HA,arguments)}function KA(e,t,n,r,i,s,o,a,l){if(ZA.apply(this,arguments),xa){if(xa){var u=cc;xa=!1,cc=null}else throw Error(W(198));dc||(dc=!0,Jh=u)}}function gs(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 QS(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 Bv(e){if(gs(e)!==e)throw Error(W(188))}function GA(e){var t=e.alternate;if(!t){if(t=gs(e),t===null)throw Error(W(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 Bv(i),e;if(s===r)return Bv(i),t;s=s.sibling}throw Error(W(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(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function qS(e){return e=GA(e),e!==null?JS(e):null}function JS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=JS(e);if(t!==null)return t;e=e.sibling}return null}var e_=tn.unstable_scheduleCallback,Vv=tn.unstable_cancelCallback,YA=tn.unstable_shouldYield,XA=tn.unstable_requestPaint,We=tn.unstable_now,QA=tn.unstable_getCurrentPriorityLevel,ng=tn.unstable_ImmediatePriority,t_=tn.unstable_UserBlockingPriority,fc=tn.unstable_NormalPriority,qA=tn.unstable_LowPriority,n_=tn.unstable_IdlePriority,xd=null,tr=null;function JA(e){if(tr&&typeof tr.onCommitFiberRoot=="function")try{tr.onCommitFiberRoot(xd,e,void 0,(e.current.flags&128)===128)}catch{}}var zn=Math.clz32?Math.clz32:nR,eR=Math.log,tR=Math.LN2;function nR(e){return e>>>=0,e===0?32:31-(eR(e)/tR|0)|0}var Ul=64,Wl=4194304;function fa(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 hc(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=fa(a):(s&=o,s!==0&&(r=fa(s)))}else o=n&~i,o!==0?r=fa(o):s!==0&&(r=fa(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-zn(t),i=1<<n,r|=e[n],t&=~i;return r}function rR(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 iR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-zn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=rR(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function ep(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function r_(){var e=Ul;return Ul<<=1,!(Ul&4194240)&&(Ul=64),e}function ff(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zn(t),e[t]=n}function sR(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-zn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function rg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-zn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ye=0;function i_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var s_,ig,o_,a_,l_,tp=!1,Hl=[],ii=null,si=null,oi=null,Va=new Map,Ua=new Map,Gr=[],oR="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 Uv(e,t){switch(e){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":si=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":Va.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ua.delete(t.pointerId)}}function Zo(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=wl(t),t!==null&&ig(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function aR(e,t,n,r,i){switch(t){case"focusin":return ii=Zo(ii,e,t,n,r,i),!0;case"dragenter":return si=Zo(si,e,t,n,r,i),!0;case"mouseover":return oi=Zo(oi,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Va.set(s,Zo(Va.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Ua.set(s,Zo(Ua.get(s)||null,e,t,n,r,i)),!0}return!1}function u_(e){var t=Bi(e.target);if(t!==null){var n=gs(t);if(n!==null){if(t=n.tag,t===13){if(t=QS(n),t!==null){e.blockedOn=t,l_(e.priority,function(){o_(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Eu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=np(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Xh=r,n.target.dispatchEvent(r),Xh=null}else return t=wl(n),t!==null&&ig(t),e.blockedOn=n,!1;t.shift()}return!0}function Wv(e,t,n){Eu(e)&&n.delete(t)}function lR(){tp=!1,ii!==null&&Eu(ii)&&(ii=null),si!==null&&Eu(si)&&(si=null),oi!==null&&Eu(oi)&&(oi=null),Va.forEach(Wv),Ua.forEach(Wv)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,tp||(tp=!0,tn.unstable_scheduleCallback(tn.unstable_NormalPriority,lR)))}function Wa(e){function t(i){return Ko(i,e)}if(0<Hl.length){Ko(Hl[0],e);for(var n=1;n<Hl.length;n++){var r=Hl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ii!==null&&Ko(ii,e),si!==null&&Ko(si,e),oi!==null&&Ko(oi,e),Va.forEach(t),Ua.forEach(t),n=0;n<Gr.length;n++)r=Gr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Gr.length&&(n=Gr[0],n.blockedOn===null);)u_(n),n.blockedOn===null&&Gr.shift()}var ro=Ar.ReactCurrentBatchConfig,pc=!0;function uR(e,t,n,r){var i=ye,s=ro.transition;ro.transition=null;try{ye=1,sg(e,t,n,r)}finally{ye=i,ro.transition=s}}function cR(e,t,n,r){var i=ye,s=ro.transition;ro.transition=null;try{ye=4,sg(e,t,n,r)}finally{ye=i,ro.transition=s}}function sg(e,t,n,r){if(pc){var i=np(e,t,n,r);if(i===null)Sf(e,t,r,mc,n),Uv(e,r);else if(aR(i,e,t,n,r))r.stopPropagation();else if(Uv(e,r),t&4&&-1<oR.indexOf(e)){for(;i!==null;){var s=wl(i);if(s!==null&&s_(s),s=np(e,t,n,r),s===null&&Sf(e,t,r,mc,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Sf(e,t,r,null,n)}}var mc=null;function np(e,t,n,r){if(mc=null,e=tg(r),e=Bi(e),e!==null)if(t=gs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=QS(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 mc=e,null}function c_(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(QA()){case ng:return 1;case t_:return 4;case fc:case qA:return 16;case n_:return 536870912;default:return 16}default:return 16}}var Xr=null,og=null,ju=null;function d_(){if(ju)return ju;var e,t=og,n=t.length,r,i="value"in Xr?Xr.value:Xr.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 ju=i.slice(e,1<r?1-r:void 0)}function Au(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 Zl(){return!0}function Hv(){return!1}function rn(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)?Zl:Hv,this.isPropagationStopped=Hv,this}return $e(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=Zl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),t}var jo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ag=rn(jo),xl=$e({},jo,{view:0,detail:0}),dR=rn(xl),hf,pf,Go,wd=$e({},xl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lg,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!==Go&&(Go&&e.type==="mousemove"?(hf=e.screenX-Go.screenX,pf=e.screenY-Go.screenY):pf=hf=0,Go=e),hf)},movementY:function(e){return"movementY"in e?e.movementY:pf}}),Zv=rn(wd),fR=$e({},wd,{dataTransfer:0}),hR=rn(fR),pR=$e({},xl,{relatedTarget:0}),mf=rn(pR),mR=$e({},jo,{animationName:0,elapsedTime:0,pseudoElement:0}),gR=rn(mR),yR=$e({},jo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vR=rn(yR),xR=$e({},jo,{data:0}),Kv=rn(xR),wR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bR={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"},SR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _R(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=SR[e])?!!t[e]:!1}function lg(){return _R}var kR=$e({},xl,{key:function(e){if(e.key){var t=wR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Au(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lg,charCode:function(e){return e.type==="keypress"?Au(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Au(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),CR=rn(kR),PR=$e({},wd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gv=rn(PR),TR=$e({},xl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lg}),ER=rn(TR),jR=$e({},jo,{propertyName:0,elapsedTime:0,pseudoElement:0}),AR=rn(jR),RR=$e({},wd,{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}),IR=rn(RR),MR=[9,13,27,32],ug=kr&&"CompositionEvent"in window,wa=null;kr&&"documentMode"in document&&(wa=document.documentMode);var LR=kr&&"TextEvent"in window&&!wa,f_=kr&&(!ug||wa&&8<wa&&11>=wa),Yv=" ",Xv=!1;function h_(e,t){switch(e){case"keyup":return MR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function p_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ns=!1;function DR(e,t){switch(e){case"compositionend":return p_(t);case"keypress":return t.which!==32?null:(Xv=!0,Yv);case"textInput":return e=t.data,e===Yv&&Xv?null:e;default:return null}}function zR(e,t){if(Ns)return e==="compositionend"||!ug&&h_(e,t)?(e=d_(),ju=og=Xr=null,Ns=!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 f_&&t.locale!=="ko"?null:t.data;default:return null}}var NR={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 Qv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!NR[e.type]:t==="textarea"}function m_(e,t,n,r){ZS(r),t=gc(t,"onChange"),0<t.length&&(n=new ag("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ba=null,Ha=null;function $R(e){P_(e,0)}function bd(e){var t=Fs(e);if(OS(t))return e}function OR(e,t){if(e==="change")return t}var g_=!1;if(kr){var gf;if(kr){var yf="oninput"in document;if(!yf){var qv=document.createElement("div");qv.setAttribute("oninput","return;"),yf=typeof qv.oninput=="function"}gf=yf}else gf=!1;g_=gf&&(!document.documentMode||9<document.documentMode)}function Jv(){ba&&(ba.detachEvent("onpropertychange",y_),Ha=ba=null)}function y_(e){if(e.propertyName==="value"&&bd(Ha)){var t=[];m_(t,Ha,e,tg(e)),XS($R,t)}}function FR(e,t,n){e==="focusin"?(Jv(),ba=t,Ha=n,ba.attachEvent("onpropertychange",y_)):e==="focusout"&&Jv()}function BR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bd(Ha)}function VR(e,t){if(e==="click")return bd(t)}function UR(e,t){if(e==="input"||e==="change")return bd(t)}function WR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Fn=typeof Object.is=="function"?Object.is:WR;function Za(e,t){if(Fn(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(!$h.call(t,i)||!Fn(e[i],t[i]))return!1}return!0}function e0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function t0(e,t){var n=e0(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=e0(n)}}function v_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?v_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function x_(){for(var e=window,t=uc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uc(e.document)}return t}function cg(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 HR(e){var t=x_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&v_(n.ownerDocument.documentElement,n)){if(r!==null&&cg(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=t0(n,s);var o=t0(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 ZR=kr&&"documentMode"in document&&11>=document.documentMode,$s=null,rp=null,Sa=null,ip=!1;function n0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ip||$s==null||$s!==uc(r)||(r=$s,"selectionStart"in r&&cg(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}),Sa&&Za(Sa,r)||(Sa=r,r=gc(rp,"onSelect"),0<r.length&&(t=new ag("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=$s)))}function Kl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Os={animationend:Kl("Animation","AnimationEnd"),animationiteration:Kl("Animation","AnimationIteration"),animationstart:Kl("Animation","AnimationStart"),transitionend:Kl("Transition","TransitionEnd")},vf={},w_={};kr&&(w_=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function Sd(e){if(vf[e])return vf[e];if(!Os[e])return e;var t=Os[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in w_)return vf[e]=t[n];return e}var b_=Sd("animationend"),S_=Sd("animationiteration"),__=Sd("animationstart"),k_=Sd("transitionend"),C_=new Map,r0="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 bi(e,t){C_.set(e,t),ms(t,[e])}for(var xf=0;xf<r0.length;xf++){var wf=r0[xf],KR=wf.toLowerCase(),GR=wf[0].toUpperCase()+wf.slice(1);bi(KR,"on"+GR)}bi(b_,"onAnimationEnd");bi(S_,"onAnimationIteration");bi(__,"onAnimationStart");bi("dblclick","onDoubleClick");bi("focusin","onFocus");bi("focusout","onBlur");bi(k_,"onTransitionEnd");po("onMouseEnter",["mouseout","mouseover"]);po("onMouseLeave",["mouseout","mouseover"]);po("onPointerEnter",["pointerout","pointerover"]);po("onPointerLeave",["pointerout","pointerover"]);ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ms("onBeforeInput",["compositionend","keypress","textInput","paste"]);ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ha="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(" "),YR=new Set("cancel close invalid load scroll toggle".split(" ").concat(ha));function i0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,KA(r,t,void 0,e),e.currentTarget=null}function P_(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;i0(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;i0(i,a,u),s=l}}}if(dc)throw e=Jh,dc=!1,Jh=null,e}function je(e,t){var n=t[up];n===void 0&&(n=t[up]=new Set);var r=e+"__bubble";n.has(r)||(T_(t,e,2,!1),n.add(r))}function bf(e,t,n){var r=0;t&&(r|=4),T_(n,e,r,t)}var Gl="_reactListening"+Math.random().toString(36).slice(2);function Ka(e){if(!e[Gl]){e[Gl]=!0,LS.forEach(function(n){n!=="selectionchange"&&(YR.has(n)||bf(n,!1,e),bf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gl]||(t[Gl]=!0,bf("selectionchange",!1,t))}}function T_(e,t,n,r){switch(c_(t)){case 1:var i=uR;break;case 4:i=cR;break;default:i=sg}n=i.bind(null,t,n,e),i=void 0,!qh||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 Sf(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}XS(function(){var u=s,c=tg(n),d=[];e:{var f=C_.get(e);if(f!==void 0){var h=ag,p=e;switch(e){case"keypress":if(Au(n)===0)break e;case"keydown":case"keyup":h=CR;break;case"focusin":p="focus",h=mf;break;case"focusout":p="blur",h=mf;break;case"beforeblur":case"afterblur":h=mf;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":h=Zv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=hR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=ER;break;case b_:case S_:case __:h=gR;break;case k_:h=AR;break;case"scroll":h=dR;break;case"wheel":h=IR;break;case"copy":case"cut":case"paste":h=vR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Gv}var y=(t&4)!==0,x=!y&&e==="scroll",m=y?f!==null?f+"Capture":null:f;y=[];for(var v=u,w;v!==null;){w=v;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,m!==null&&(S=Ba(v,m),S!=null&&y.push(Ga(v,S,w)))),x)break;v=v.return}0<y.length&&(f=new h(f,p,null,n,c),d.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Xh&&(p=n.relatedTarget||n.fromElement)&&(Bi(p)||p[Cr]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?Bi(p):null,p!==null&&(x=gs(p),p!==x||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=u),h!==p)){if(y=Zv,S="onMouseLeave",m="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(y=Gv,S="onPointerLeave",m="onPointerEnter",v="pointer"),x=h==null?f:Fs(h),w=p==null?f:Fs(p),f=new y(S,v+"leave",h,n,c),f.target=x,f.relatedTarget=w,S=null,Bi(c)===u&&(y=new y(m,v+"enter",p,n,c),y.target=w,y.relatedTarget=x,S=y),x=S,h&&p)t:{for(y=h,m=p,v=0,w=y;w;w=_s(w))v++;for(w=0,S=m;S;S=_s(S))w++;for(;0<v-w;)y=_s(y),v--;for(;0<w-v;)m=_s(m),w--;for(;v--;){if(y===m||m!==null&&y===m.alternate)break t;y=_s(y),m=_s(m)}y=null}else y=null;h!==null&&s0(d,f,h,y,!1),p!==null&&x!==null&&s0(d,x,p,y,!0)}}e:{if(f=u?Fs(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var k=OR;else if(Qv(f))if(g_)k=UR;else{k=BR;var b=FR}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=VR);if(k&&(k=k(e,u))){m_(d,k,n,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&Hh(f,"number",f.value)}switch(b=u?Fs(u):window,e){case"focusin":(Qv(b)||b.contentEditable==="true")&&($s=b,rp=u,Sa=null);break;case"focusout":Sa=rp=$s=null;break;case"mousedown":ip=!0;break;case"contextmenu":case"mouseup":case"dragend":ip=!1,n0(d,n,c);break;case"selectionchange":if(ZR)break;case"keydown":case"keyup":n0(d,n,c)}var C;if(ug)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Ns?h_(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(f_&&n.locale!=="ko"&&(Ns||T!=="onCompositionStart"?T==="onCompositionEnd"&&Ns&&(C=d_()):(Xr=c,og="value"in Xr?Xr.value:Xr.textContent,Ns=!0)),b=gc(u,T),0<b.length&&(T=new Kv(T,e,null,n,c),d.push({event:T,listeners:b}),C?T.data=C:(C=p_(n),C!==null&&(T.data=C)))),(C=LR?DR(e,n):zR(e,n))&&(u=gc(u,"onBeforeInput"),0<u.length&&(c=new Kv("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=C))}P_(d,t)})}function Ga(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ba(e,n),s!=null&&r.unshift(Ga(e,s,i)),s=Ba(e,t),s!=null&&r.push(Ga(e,s,i))),e=e.return}return r}function _s(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function s0(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Ba(n,s),l!=null&&o.unshift(Ga(n,l,a))):i||(l=Ba(n,s),l!=null&&o.push(Ga(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var XR=/\r\n?/g,QR=/\u0000|\uFFFD/g;function o0(e){return(typeof e=="string"?e:""+e).replace(XR,`
|
|
38
|
+
`).replace(QR,"")}function Yl(e,t,n){if(t=o0(t),o0(e)!==t&&n)throw Error(W(425))}function yc(){}var sp=null,op=null;function ap(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 lp=typeof setTimeout=="function"?setTimeout:void 0,qR=typeof clearTimeout=="function"?clearTimeout:void 0,a0=typeof Promise=="function"?Promise:void 0,JR=typeof queueMicrotask=="function"?queueMicrotask:typeof a0<"u"?function(e){return a0.resolve(null).then(e).catch(eI)}:lp;function eI(e){setTimeout(function(){throw e})}function _f(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),Wa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Wa(t)}function ai(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 l0(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 Ao=Math.random().toString(36).slice(2),qn="__reactFiber$"+Ao,Ya="__reactProps$"+Ao,Cr="__reactContainer$"+Ao,up="__reactEvents$"+Ao,tI="__reactListeners$"+Ao,nI="__reactHandles$"+Ao;function Bi(e){var t=e[qn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cr]||n[qn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=l0(e);e!==null;){if(n=e[qn])return n;e=l0(e)}return t}e=n,n=e.parentNode}return null}function wl(e){return e=e[qn]||e[Cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function _d(e){return e[Ya]||null}var cp=[],Bs=-1;function Si(e){return{current:e}}function Ae(e){0>Bs||(e.current=cp[Bs],cp[Bs]=null,Bs--)}function Pe(e,t){Bs++,cp[Bs]=e.current,e.current=t}var mi={},wt=Si(mi),Nt=Si(!1),as=mi;function mo(e,t){var n=e.type.contextTypes;if(!n)return mi;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 $t(e){return e=e.childContextTypes,e!=null}function vc(){Ae(Nt),Ae(wt)}function u0(e,t,n){if(wt.current!==mi)throw Error(W(168));Pe(wt,t),Pe(Nt,n)}function E_(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(W(108,FA(e)||"Unknown",i));return $e({},n,r)}function xc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mi,as=wt.current,Pe(wt,e),Pe(Nt,Nt.current),!0}function c0(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=E_(e,t,as),r.__reactInternalMemoizedMergedChildContext=e,Ae(Nt),Ae(wt),Pe(wt,e)):Ae(Nt),Pe(Nt,n)}var yr=null,kd=!1,kf=!1;function j_(e){yr===null?yr=[e]:yr.push(e)}function rI(e){kd=!0,j_(e)}function _i(){if(!kf&&yr!==null){kf=!0;var e=0,t=ye;try{var n=yr;for(ye=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}yr=null,kd=!1}catch(i){throw yr!==null&&(yr=yr.slice(e+1)),e_(ng,_i),i}finally{ye=t,kf=!1}}return null}var Vs=[],Us=0,wc=null,bc=0,ln=[],un=0,ls=null,vr=1,xr="";function zi(e,t){Vs[Us++]=bc,Vs[Us++]=wc,wc=e,bc=t}function A_(e,t,n){ln[un++]=vr,ln[un++]=xr,ln[un++]=ls,ls=e;var r=vr;e=xr;var i=32-zn(r)-1;r&=~(1<<i),n+=1;var s=32-zn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vr=1<<32-zn(t)+i|n<<i|r,xr=s+e}else vr=1<<s|n<<i|r,xr=e}function dg(e){e.return!==null&&(zi(e,1),A_(e,1,0))}function fg(e){for(;e===wc;)wc=Vs[--Us],Vs[Us]=null,bc=Vs[--Us],Vs[Us]=null;for(;e===ls;)ls=ln[--un],ln[un]=null,xr=ln[--un],ln[un]=null,vr=ln[--un],ln[un]=null}var Jt=null,Qt=null,Me=!1,Ln=null;function R_(e,t){var n=dn(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 d0(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,Jt=e,Qt=ai(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Jt=e,Qt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ls!==null?{id:vr,overflow:xr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=dn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Jt=e,Qt=null,!0):!1;default:return!1}}function dp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function fp(e){if(Me){var t=Qt;if(t){var n=t;if(!d0(e,t)){if(dp(e))throw Error(W(418));t=ai(n.nextSibling);var r=Jt;t&&d0(e,t)?R_(r,n):(e.flags=e.flags&-4097|2,Me=!1,Jt=e)}}else{if(dp(e))throw Error(W(418));e.flags=e.flags&-4097|2,Me=!1,Jt=e}}}function f0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Jt=e}function Xl(e){if(e!==Jt)return!1;if(!Me)return f0(e),Me=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ap(e.type,e.memoizedProps)),t&&(t=Qt)){if(dp(e))throw I_(),Error(W(418));for(;t;)R_(e,t),t=ai(t.nextSibling)}if(f0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qt=ai(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qt=null}}else Qt=Jt?ai(e.stateNode.nextSibling):null;return!0}function I_(){for(var e=Qt;e;)e=ai(e.nextSibling)}function go(){Qt=Jt=null,Me=!1}function hg(e){Ln===null?Ln=[e]:Ln.push(e)}var iI=Ar.ReactCurrentBatchConfig;function Yo(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(W(309));var r=n.stateNode}if(!r)throw Error(W(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(W(284));if(!n._owner)throw Error(W(290,e))}return e}function Ql(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function h0(e){var t=e._init;return t(e._payload)}function M_(e){function t(m,v){if(e){var w=m.deletions;w===null?(m.deletions=[v],m.flags|=16):w.push(v)}}function n(m,v){if(!e)return null;for(;v!==null;)t(m,v),v=v.sibling;return null}function r(m,v){for(m=new Map;v!==null;)v.key!==null?m.set(v.key,v):m.set(v.index,v),v=v.sibling;return m}function i(m,v){return m=di(m,v),m.index=0,m.sibling=null,m}function s(m,v,w){return m.index=w,e?(w=m.alternate,w!==null?(w=w.index,w<v?(m.flags|=2,v):w):(m.flags|=2,v)):(m.flags|=1048576,v)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,v,w,S){return v===null||v.tag!==6?(v=Rf(w,m.mode,S),v.return=m,v):(v=i(v,w),v.return=m,v)}function l(m,v,w,S){var k=w.type;return k===zs?c(m,v,w.props.children,S,w.key):v!==null&&(v.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Hr&&h0(k)===v.type)?(S=i(v,w.props),S.ref=Yo(m,v,w),S.return=m,S):(S=Nu(w.type,w.key,w.props,null,m.mode,S),S.ref=Yo(m,v,w),S.return=m,S)}function u(m,v,w,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=If(w,m.mode,S),v.return=m,v):(v=i(v,w.children||[]),v.return=m,v)}function c(m,v,w,S,k){return v===null||v.tag!==7?(v=Qi(w,m.mode,S,k),v.return=m,v):(v=i(v,w),v.return=m,v)}function d(m,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Rf(""+v,m.mode,w),v.return=m,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Fl:return w=Nu(v.type,v.key,v.props,null,m.mode,w),w.ref=Yo(m,null,v),w.return=m,w;case Ds:return v=If(v,m.mode,w),v.return=m,v;case Hr:var S=v._init;return d(m,S(v._payload),w)}if(da(v)||Wo(v))return v=Qi(v,m.mode,w,null),v.return=m,v;Ql(m,v)}return null}function f(m,v,w,S){var k=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:a(m,v,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Fl:return w.key===k?l(m,v,w,S):null;case Ds:return w.key===k?u(m,v,w,S):null;case Hr:return k=w._init,f(m,v,k(w._payload),S)}if(da(w)||Wo(w))return k!==null?null:c(m,v,w,S,null);Ql(m,w)}return null}function h(m,v,w,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return m=m.get(w)||null,a(v,m,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Fl:return m=m.get(S.key===null?w:S.key)||null,l(v,m,S,k);case Ds:return m=m.get(S.key===null?w:S.key)||null,u(v,m,S,k);case Hr:var b=S._init;return h(m,v,w,b(S._payload),k)}if(da(S)||Wo(S))return m=m.get(w)||null,c(v,m,S,k,null);Ql(v,S)}return null}function p(m,v,w,S){for(var k=null,b=null,C=v,T=v=0,A=null;C!==null&&T<w.length;T++){C.index>T?(A=C,C=null):A=C.sibling;var E=f(m,C,w[T],S);if(E===null){C===null&&(C=A);break}e&&C&&E.alternate===null&&t(m,C),v=s(E,v,T),b===null?k=E:b.sibling=E,b=E,C=A}if(T===w.length)return n(m,C),Me&&zi(m,T),k;if(C===null){for(;T<w.length;T++)C=d(m,w[T],S),C!==null&&(v=s(C,v,T),b===null?k=C:b.sibling=C,b=C);return Me&&zi(m,T),k}for(C=r(m,C);T<w.length;T++)A=h(C,m,T,w[T],S),A!==null&&(e&&A.alternate!==null&&C.delete(A.key===null?T:A.key),v=s(A,v,T),b===null?k=A:b.sibling=A,b=A);return e&&C.forEach(function(I){return t(m,I)}),Me&&zi(m,T),k}function y(m,v,w,S){var k=Wo(w);if(typeof k!="function")throw Error(W(150));if(w=k.call(w),w==null)throw Error(W(151));for(var b=k=null,C=v,T=v=0,A=null,E=w.next();C!==null&&!E.done;T++,E=w.next()){C.index>T?(A=C,C=null):A=C.sibling;var I=f(m,C,E.value,S);if(I===null){C===null&&(C=A);break}e&&C&&I.alternate===null&&t(m,C),v=s(I,v,T),b===null?k=I:b.sibling=I,b=I,C=A}if(E.done)return n(m,C),Me&&zi(m,T),k;if(C===null){for(;!E.done;T++,E=w.next())E=d(m,E.value,S),E!==null&&(v=s(E,v,T),b===null?k=E:b.sibling=E,b=E);return Me&&zi(m,T),k}for(C=r(m,C);!E.done;T++,E=w.next())E=h(C,m,T,E.value,S),E!==null&&(e&&E.alternate!==null&&C.delete(E.key===null?T:E.key),v=s(E,v,T),b===null?k=E:b.sibling=E,b=E);return e&&C.forEach(function(M){return t(m,M)}),Me&&zi(m,T),k}function x(m,v,w,S){if(typeof w=="object"&&w!==null&&w.type===zs&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Fl:e:{for(var k=w.key,b=v;b!==null;){if(b.key===k){if(k=w.type,k===zs){if(b.tag===7){n(m,b.sibling),v=i(b,w.props.children),v.return=m,m=v;break e}}else if(b.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Hr&&h0(k)===b.type){n(m,b.sibling),v=i(b,w.props),v.ref=Yo(m,b,w),v.return=m,m=v;break e}n(m,b);break}else t(m,b);b=b.sibling}w.type===zs?(v=Qi(w.props.children,m.mode,S,w.key),v.return=m,m=v):(S=Nu(w.type,w.key,w.props,null,m.mode,S),S.ref=Yo(m,v,w),S.return=m,m=S)}return o(m);case Ds:e:{for(b=w.key;v!==null;){if(v.key===b)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(m,v.sibling),v=i(v,w.children||[]),v.return=m,m=v;break e}else{n(m,v);break}else t(m,v);v=v.sibling}v=If(w,m.mode,S),v.return=m,m=v}return o(m);case Hr:return b=w._init,x(m,v,b(w._payload),S)}if(da(w))return p(m,v,w,S);if(Wo(w))return y(m,v,w,S);Ql(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(m,v.sibling),v=i(v,w),v.return=m,m=v):(n(m,v),v=Rf(w,m.mode,S),v.return=m,m=v),o(m)):n(m,v)}return x}var yo=M_(!0),L_=M_(!1),Sc=Si(null),_c=null,Ws=null,pg=null;function mg(){pg=Ws=_c=null}function gg(e){var t=Sc.current;Ae(Sc),e._currentValue=t}function hp(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 io(e,t){_c=e,pg=Ws=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dt=!0),e.firstContext=null)}function wn(e){var t=e._currentValue;if(pg!==e)if(e={context:e,memoizedValue:t,next:null},Ws===null){if(_c===null)throw Error(W(308));Ws=e,_c.dependencies={lanes:0,firstContext:e}}else Ws=Ws.next=e;return t}var Vi=null;function yg(e){Vi===null?Vi=[e]:Vi.push(e)}function D_(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,yg(t)):(n.next=i.next,i.next=n),t.interleaved=n,Pr(e,r)}function Pr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Zr=!1;function vg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function z_(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 Sr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function li(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,he&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Pr(e,n)}return i=r.interleaved,i===null?(t.next=t,yg(r)):(t.next=i.next,i.next=t),r.interleaved=t,Pr(e,n)}function Ru(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rg(e,n)}}function p0(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 kc(e,t,n,r){var i=e.updateQueue;Zr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,c=u=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,y=a;switch(f=t,h=n,y.tag){case 1:if(p=y.payload,typeof p=="function"){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=y.payload,f=typeof p=="function"?p.call(h,d,f):p,f==null)break e;d=$e({},d,f);break e;case 2:Zr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);cs|=o,e.lanes=o,e.memoizedState=d}}function m0(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(W(191,i));i.call(r)}}}var bl={},nr=Si(bl),Xa=Si(bl),Qa=Si(bl);function Ui(e){if(e===bl)throw Error(W(174));return e}function xg(e,t){switch(Pe(Qa,t),Pe(Xa,e),Pe(nr,bl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Kh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Kh(t,e)}Ae(nr),Pe(nr,t)}function vo(){Ae(nr),Ae(Xa),Ae(Qa)}function N_(e){Ui(Qa.current);var t=Ui(nr.current),n=Kh(t,e.type);t!==n&&(Pe(Xa,e),Pe(nr,n))}function wg(e){Xa.current===e&&(Ae(nr),Ae(Xa))}var ze=Si(0);function Cc(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 Cf=[];function bg(){for(var e=0;e<Cf.length;e++)Cf[e]._workInProgressVersionPrimary=null;Cf.length=0}var Iu=Ar.ReactCurrentDispatcher,Pf=Ar.ReactCurrentBatchConfig,us=0,Ne=null,tt=null,rt=null,Pc=!1,_a=!1,qa=0,sI=0;function gt(){throw Error(W(321))}function Sg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fn(e[n],t[n]))return!1;return!0}function _g(e,t,n,r,i,s){if(us=s,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Iu.current=e===null||e.memoizedState===null?uI:cI,e=n(r,i),_a){s=0;do{if(_a=!1,qa=0,25<=s)throw Error(W(301));s+=1,rt=tt=null,t.updateQueue=null,Iu.current=dI,e=n(r,i)}while(_a)}if(Iu.current=Tc,t=tt!==null&&tt.next!==null,us=0,rt=tt=Ne=null,Pc=!1,t)throw Error(W(300));return e}function kg(){var e=qa!==0;return qa=0,e}function Hn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?Ne.memoizedState=rt=e:rt=rt.next=e,rt}function bn(){if(tt===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=rt===null?Ne.memoizedState:rt.next;if(t!==null)rt=t,tt=e;else{if(e===null)throw Error(W(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},rt===null?Ne.memoizedState=rt=e:rt=rt.next=e}return rt}function Ja(e,t){return typeof t=="function"?t(e):t}function Tf(e){var t=bn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=tt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((us&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Ne.lanes|=c,cs|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Fn(r,t.memoizedState)||(Dt=!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,Ne.lanes|=s,cs|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ef(e){var t=bn(),n=t.queue;if(n===null)throw Error(W(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);Fn(s,t.memoizedState)||(Dt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function $_(){}function O_(e,t){var n=Ne,r=bn(),i=t(),s=!Fn(r.memoizedState,i);if(s&&(r.memoizedState=i,Dt=!0),r=r.queue,Cg(V_.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||rt!==null&&rt.memoizedState.tag&1){if(n.flags|=2048,el(9,B_.bind(null,n,r,i,t),void 0,null),it===null)throw Error(W(349));us&30||F_(n,t,i)}return i}function F_(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function B_(e,t,n,r){t.value=n,t.getSnapshot=r,U_(t)&&W_(e)}function V_(e,t,n){return n(function(){U_(t)&&W_(e)})}function U_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fn(e,n)}catch{return!0}}function W_(e){var t=Pr(e,1);t!==null&&Nn(t,e,1,-1)}function g0(e){var t=Hn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:e},t.queue=e,e=e.dispatch=lI.bind(null,Ne,e),[t.memoizedState,e]}function el(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.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 H_(){return bn().memoizedState}function Mu(e,t,n,r){var i=Hn();Ne.flags|=e,i.memoizedState=el(1|t,n,void 0,r===void 0?null:r)}function Cd(e,t,n,r){var i=bn();r=r===void 0?null:r;var s=void 0;if(tt!==null){var o=tt.memoizedState;if(s=o.destroy,r!==null&&Sg(r,o.deps)){i.memoizedState=el(t,n,s,r);return}}Ne.flags|=e,i.memoizedState=el(1|t,n,s,r)}function y0(e,t){return Mu(8390656,8,e,t)}function Cg(e,t){return Cd(2048,8,e,t)}function Z_(e,t){return Cd(4,2,e,t)}function K_(e,t){return Cd(4,4,e,t)}function G_(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 Y_(e,t,n){return n=n!=null?n.concat([e]):null,Cd(4,4,G_.bind(null,t,e),n)}function Pg(){}function X_(e,t){var n=bn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Q_(e,t){var n=bn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function q_(e,t,n){return us&21?(Fn(n,t)||(n=r_(),Ne.lanes|=n,cs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Dt=!0),e.memoizedState=n)}function oI(e,t){var n=ye;ye=n!==0&&4>n?n:4,e(!0);var r=Pf.transition;Pf.transition={};try{e(!1),t()}finally{ye=n,Pf.transition=r}}function J_(){return bn().memoizedState}function aI(e,t,n){var r=ci(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ek(e))tk(t,n);else if(n=D_(e,t,n,r),n!==null){var i=Et();Nn(n,e,r,i),nk(n,t,r)}}function lI(e,t,n){var r=ci(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ek(e))tk(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,Fn(a,o)){var l=t.interleaved;l===null?(i.next=i,yg(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=D_(e,t,i,r),n!==null&&(i=Et(),Nn(n,e,r,i),nk(n,t,r))}}function ek(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function tk(e,t){_a=Pc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nk(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rg(e,n)}}var Tc={readContext:wn,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},uI={readContext:wn,useCallback:function(e,t){return Hn().memoizedState=[e,t===void 0?null:t],e},useContext:wn,useEffect:y0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Mu(4194308,4,G_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Mu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Mu(4,2,e,t)},useMemo:function(e,t){var n=Hn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Hn();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=aI.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=Hn();return e={current:e},t.memoizedState=e},useState:g0,useDebugValue:Pg,useDeferredValue:function(e){return Hn().memoizedState=e},useTransition:function(){var e=g0(!1),t=e[0];return e=oI.bind(null,e[1]),Hn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,i=Hn();if(Me){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),it===null)throw Error(W(349));us&30||F_(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,y0(V_.bind(null,r,s,e),[e]),r.flags|=2048,el(9,B_.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Hn(),t=it.identifierPrefix;if(Me){var n=xr,r=vr;n=(r&~(1<<32-zn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=sI++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cI={readContext:wn,useCallback:X_,useContext:wn,useEffect:Cg,useImperativeHandle:Y_,useInsertionEffect:Z_,useLayoutEffect:K_,useMemo:Q_,useReducer:Tf,useRef:H_,useState:function(){return Tf(Ja)},useDebugValue:Pg,useDeferredValue:function(e){var t=bn();return q_(t,tt.memoizedState,e)},useTransition:function(){var e=Tf(Ja)[0],t=bn().memoizedState;return[e,t]},useMutableSource:$_,useSyncExternalStore:O_,useId:J_,unstable_isNewReconciler:!1},dI={readContext:wn,useCallback:X_,useContext:wn,useEffect:Cg,useImperativeHandle:Y_,useInsertionEffect:Z_,useLayoutEffect:K_,useMemo:Q_,useReducer:Ef,useRef:H_,useState:function(){return Ef(Ja)},useDebugValue:Pg,useDeferredValue:function(e){var t=bn();return tt===null?t.memoizedState=e:q_(t,tt.memoizedState,e)},useTransition:function(){var e=Ef(Ja)[0],t=bn().memoizedState;return[e,t]},useMutableSource:$_,useSyncExternalStore:O_,useId:J_,unstable_isNewReconciler:!1};function In(e,t){if(e&&e.defaultProps){t=$e({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function pp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:$e({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Pd={isMounted:function(e){return(e=e._reactInternals)?gs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Et(),i=ci(e),s=Sr(r,i);s.payload=t,n!=null&&(s.callback=n),t=li(e,s,i),t!==null&&(Nn(t,e,i,r),Ru(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Et(),i=ci(e),s=Sr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=li(e,s,i),t!==null&&(Nn(t,e,i,r),Ru(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Et(),r=ci(e),i=Sr(n,r);i.tag=2,t!=null&&(i.callback=t),t=li(e,i,r),t!==null&&(Nn(t,e,r,n),Ru(t,e,r))}};function v0(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?!Za(n,r)||!Za(i,s):!0}function rk(e,t,n){var r=!1,i=mi,s=t.contextType;return typeof s=="object"&&s!==null?s=wn(s):(i=$t(t)?as:wt.current,r=t.contextTypes,s=(r=r!=null)?mo(e,i):mi),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Pd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function x0(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&&Pd.enqueueReplaceState(t,t.state,null)}function mp(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},vg(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=wn(s):(s=$t(t)?as:wt.current,i.context=mo(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(pp(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&&Pd.enqueueReplaceState(i,i.state,null),kc(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function xo(e,t){try{var n="",r=t;do n+=OA(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 jf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function gp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var fI=typeof WeakMap=="function"?WeakMap:Map;function ik(e,t,n){n=Sr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){jc||(jc=!0,Pp=r),gp(e,t)},n}function sk(e,t,n){n=Sr(-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(){gp(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){gp(e,t),typeof r!="function"&&(ui===null?ui=new Set([this]):ui.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function w0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new fI;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=PI.bind(null,e,t,n),t.then(e,e))}function b0(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 S0(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=Sr(-1,1),t.tag=2,li(n,t,1))),n.lanes|=1),e)}var hI=Ar.ReactCurrentOwner,Dt=!1;function _t(e,t,n,r){t.child=e===null?L_(t,null,n,r):yo(t,e.child,n,r)}function _0(e,t,n,r,i){n=n.render;var s=t.ref;return io(t,i),r=_g(e,t,n,r,s,i),n=kg(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Tr(e,t,i)):(Me&&n&&dg(t),t.flags|=1,_t(e,t,r,i),t.child)}function k0(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Lg(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,ok(e,t,s,r,i)):(e=Nu(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:Za,n(o,r)&&e.ref===t.ref)return Tr(e,t,i)}return t.flags|=1,e=di(s,r),e.ref=t.ref,e.return=t,t.child=e}function ok(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Za(s,r)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Dt=!0);else return t.lanes=e.lanes,Tr(e,t,i)}return yp(e,t,n,r,i)}function ak(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},Pe(Zs,Xt),Xt|=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,Pe(Zs,Xt),Xt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Pe(Zs,Xt),Xt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Pe(Zs,Xt),Xt|=r;return _t(e,t,i,n),t.child}function lk(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function yp(e,t,n,r,i){var s=$t(n)?as:wt.current;return s=mo(t,s),io(t,i),n=_g(e,t,n,r,s,i),r=kg(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Tr(e,t,i)):(Me&&r&&dg(t),t.flags|=1,_t(e,t,n,i),t.child)}function C0(e,t,n,r,i){if($t(n)){var s=!0;xc(t)}else s=!1;if(io(t,i),t.stateNode===null)Lu(e,t),rk(t,n,r),mp(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=wn(u):(u=$t(n)?as:wt.current,u=mo(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&x0(t,o,r,u),Zr=!1;var f=t.memoizedState;o.state=f,kc(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Nt.current||Zr?(typeof c=="function"&&(pp(t,n,c,r),l=t.memoizedState),(a=Zr||v0(t,n,a,r,f,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,z_(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:In(t.type,a),o.props=u,d=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=wn(l):(l=$t(n)?as:wt.current,l=mo(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&x0(t,o,r,l),Zr=!1,f=t.memoizedState,o.state=f,kc(t,r,o,i);var p=t.memoizedState;a!==d||f!==p||Nt.current||Zr?(typeof h=="function"&&(pp(t,n,h,r),p=t.memoizedState),(u=Zr||v0(t,n,u,r,f,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return vp(e,t,n,r,s,i)}function vp(e,t,n,r,i,s){lk(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&c0(t,n,!1),Tr(e,t,s);r=t.stateNode,hI.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=yo(t,e.child,null,s),t.child=yo(t,null,a,s)):_t(e,t,a,s),t.memoizedState=r.state,i&&c0(t,n,!0),t.child}function uk(e){var t=e.stateNode;t.pendingContext?u0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&u0(e,t.context,!1),xg(e,t.containerInfo)}function P0(e,t,n,r,i){return go(),hg(i),t.flags|=256,_t(e,t,n,r),t.child}var xp={dehydrated:null,treeContext:null,retryLane:0};function wp(e){return{baseLanes:e,cachePool:null,transitions:null}}function ck(e,t,n){var r=t.pendingProps,i=ze.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),Pe(ze,i&1),e===null)return fp(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=jd(o,r,0,null),e=Qi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=wp(n),t.memoizedState=xp,e):Tg(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return pI(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=di(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=di(a,s):(s=Qi(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?wp(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=xp,r}return s=e.child,e=s.sibling,r=di(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 Tg(e,t){return t=jd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ql(e,t,n,r){return r!==null&&hg(r),yo(t,e.child,null,n),e=Tg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pI(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=jf(Error(W(422))),ql(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=jd({mode:"visible",children:r.children},i,0,null),s=Qi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&yo(t,e.child,null,o),t.child.memoizedState=wp(o),t.memoizedState=xp,s);if(!(t.mode&1))return ql(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(W(419)),r=jf(s,r,void 0),ql(e,t,o,r)}if(a=(o&e.childLanes)!==0,Dt||a){if(r=it,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Pr(e,i),Nn(r,e,i,-1))}return Mg(),r=jf(Error(W(421))),ql(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=TI.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Qt=ai(i.nextSibling),Jt=t,Me=!0,Ln=null,e!==null&&(ln[un++]=vr,ln[un++]=xr,ln[un++]=ls,vr=e.id,xr=e.overflow,ls=t),t=Tg(t,r.children),t.flags|=4096,t)}function T0(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),hp(e.return,t,n)}function Af(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 dk(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(_t(e,t,r.children,n),r=ze.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&&T0(e,n,t);else if(e.tag===19)T0(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(Pe(ze,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&&Cc(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Af(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&&Cc(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Af(t,!0,n,null,s);break;case"together":Af(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Lu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Tr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mI(e,t,n){switch(t.tag){case 3:uk(t),go();break;case 5:N_(t);break;case 1:$t(t.type)&&xc(t);break;case 4:xg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Pe(Sc,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Pe(ze,ze.current&1),t.flags|=128,null):n&t.child.childLanes?ck(e,t,n):(Pe(ze,ze.current&1),e=Tr(e,t,n),e!==null?e.sibling:null);Pe(ze,ze.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return dk(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Pe(ze,ze.current),r)break;return null;case 22:case 23:return t.lanes=0,ak(e,t,n)}return Tr(e,t,n)}var fk,bp,hk,pk;fk=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}};bp=function(){};hk=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ui(nr.current);var s=null;switch(n){case"input":i=Uh(e,i),r=Uh(e,r),s=[];break;case"select":i=$e({},i,{value:void 0}),r=$e({},r,{value:void 0}),s=[];break;case"textarea":i=Zh(e,i),r=Zh(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=yc)}Gh(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Oa.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Oa.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&je("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};pk=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xo(e,t){if(!Me)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 yt(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 gI(e,t,n){var r=t.pendingProps;switch(fg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return $t(t.type)&&vc(),yt(t),null;case 3:return r=t.stateNode,vo(),Ae(Nt),Ae(wt),bg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Xl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ln!==null&&(jp(Ln),Ln=null))),bp(e,t),yt(t),null;case 5:wg(t);var i=Ui(Qa.current);if(n=t.type,e!==null&&t.stateNode!=null)hk(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return yt(t),null}if(e=Ui(nr.current),Xl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[qn]=t,r[Ya]=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<ha.length;i++)je(ha[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":zv(r,s),je("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},je("invalid",r);break;case"textarea":$v(r,s),je("invalid",r)}Gh(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&&Yl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Yl(r.textContent,a,e),i=["children",""+a]):Oa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&je("scroll",r)}switch(n){case"input":Bl(r),Nv(r,s,!0);break;case"textarea":Bl(r),Ov(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=yc)}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=VS(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[qn]=t,e[Ya]=r,fk(e,t,!1,!1),t.stateNode=e;e:{switch(o=Yh(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<ha.length;i++)je(ha[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":zv(e,r),i=Uh(e,r),je("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=$e({},r,{value:void 0}),je("invalid",e);break;case"textarea":$v(e,r),i=Zh(e,r),je("invalid",e);break;default:i=r}Gh(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?HS(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&US(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Fa(e,l):typeof l=="number"&&Fa(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Oa.hasOwnProperty(s)?l!=null&&s==="onScroll"&&je("scroll",e):l!=null&&Qm(e,s,l,o))}switch(n){case"input":Bl(e),Nv(e,r,!1);break;case"textarea":Bl(e),Ov(e);break;case"option":r.value!=null&&e.setAttribute("value",""+pi(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?eo(e,!!r.multiple,s,!1):r.defaultValue!=null&&eo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=yc)}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 yt(t),null;case 6:if(e&&t.stateNode!=null)pk(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=Ui(Qa.current),Ui(nr.current),Xl(t)){if(r=t.stateNode,n=t.memoizedProps,r[qn]=t,(s=r.nodeValue!==n)&&(e=Jt,e!==null))switch(e.tag){case 3:Yl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Yl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[qn]=t,t.stateNode=r}return yt(t),null;case 13:if(Ae(ze),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Me&&Qt!==null&&t.mode&1&&!(t.flags&128))I_(),go(),t.flags|=98560,s=!1;else if(s=Xl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(W(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(W(317));s[qn]=t}else go(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yt(t),s=!1}else Ln!==null&&(jp(Ln),Ln=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||ze.current&1?nt===0&&(nt=3):Mg())),t.updateQueue!==null&&(t.flags|=4),yt(t),null);case 4:return vo(),bp(e,t),e===null&&Ka(t.stateNode.containerInfo),yt(t),null;case 10:return gg(t.type._context),yt(t),null;case 17:return $t(t.type)&&vc(),yt(t),null;case 19:if(Ae(ze),s=t.memoizedState,s===null)return yt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Xo(s,!1);else{if(nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Cc(e),o!==null){for(t.flags|=128,Xo(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 Pe(ze,ze.current&1|2),t.child}e=e.sibling}s.tail!==null&&We()>wo&&(t.flags|=128,r=!0,Xo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Cc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Me)return yt(t),null}else 2*We()-s.renderingStartTime>wo&&n!==1073741824&&(t.flags|=128,r=!0,Xo(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=We(),t.sibling=null,n=ze.current,Pe(ze,r?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return Ig(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xt&1073741824&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function yI(e,t){switch(fg(t),t.tag){case 1:return $t(t.type)&&vc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vo(),Ae(Nt),Ae(wt),bg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wg(t),null;case 13:if(Ae(ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));go()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(ze),null;case 4:return vo(),null;case 10:return gg(t.type._context),null;case 22:case 23:return Ig(),null;case 24:return null;default:return null}}var Jl=!1,vt=!1,vI=typeof WeakSet=="function"?WeakSet:Set,X=null;function Hs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ve(e,t,r)}else n.current=null}function Sp(e,t,n){try{n()}catch(r){Ve(e,t,r)}}var E0=!1;function xI(e,t){if(sp=pc,e=x_(),cg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;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),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(a=o),f===s&&++c===r&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(op={focusedElem:e,selectionRange:n},pc=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var y=p.memoizedProps,x=p.memoizedState,m=t.stateNode,v=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:In(t.type,y),x);m.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(S){Ve(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return p=E0,E0=!1,p}function ka(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&&Sp(t,n,s)}i=i.next}while(i!==r)}}function Td(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 _p(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 mk(e){var t=e.alternate;t!==null&&(e.alternate=null,mk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qn],delete t[Ya],delete t[up],delete t[tI],delete t[nI])),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 gk(e){return e.tag===5||e.tag===3||e.tag===4}function j0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gk(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 kp(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=yc));else if(r!==4&&(e=e.child,e!==null))for(kp(e,t,n),e=e.sibling;e!==null;)kp(e,t,n),e=e.sibling}function Cp(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(Cp(e,t,n),e=e.sibling;e!==null;)Cp(e,t,n),e=e.sibling}var at=null,Mn=!1;function Ir(e,t,n){for(n=n.child;n!==null;)yk(e,t,n),n=n.sibling}function yk(e,t,n){if(tr&&typeof tr.onCommitFiberUnmount=="function")try{tr.onCommitFiberUnmount(xd,n)}catch{}switch(n.tag){case 5:vt||Hs(n,t);case 6:var r=at,i=Mn;at=null,Ir(e,t,n),at=r,Mn=i,at!==null&&(Mn?(e=at,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):at.removeChild(n.stateNode));break;case 18:at!==null&&(Mn?(e=at,n=n.stateNode,e.nodeType===8?_f(e.parentNode,n):e.nodeType===1&&_f(e,n),Wa(e)):_f(at,n.stateNode));break;case 4:r=at,i=Mn,at=n.stateNode.containerInfo,Mn=!0,Ir(e,t,n),at=r,Mn=i;break;case 0:case 11:case 14:case 15:if(!vt&&(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)&&Sp(n,t,o),i=i.next}while(i!==r)}Ir(e,t,n);break;case 1:if(!vt&&(Hs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ve(n,t,a)}Ir(e,t,n);break;case 21:Ir(e,t,n);break;case 22:n.mode&1?(vt=(r=vt)||n.memoizedState!==null,Ir(e,t,n),vt=r):Ir(e,t,n);break;default:Ir(e,t,n)}}function A0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vI),t.forEach(function(r){var i=EI.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Pn(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:at=a.stateNode,Mn=!1;break e;case 3:at=a.stateNode.containerInfo,Mn=!0;break e;case 4:at=a.stateNode.containerInfo,Mn=!0;break e}a=a.return}if(at===null)throw Error(W(160));yk(s,o,i),at=null,Mn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ve(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vk(t,e),t=t.sibling}function vk(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Pn(t,e),Vn(e),r&4){try{ka(3,e,e.return),Td(3,e)}catch(y){Ve(e,e.return,y)}try{ka(5,e,e.return)}catch(y){Ve(e,e.return,y)}}break;case 1:Pn(t,e),Vn(e),r&512&&n!==null&&Hs(n,n.return);break;case 5:if(Pn(t,e),Vn(e),r&512&&n!==null&&Hs(n,n.return),e.flags&32){var i=e.stateNode;try{Fa(i,"")}catch(y){Ve(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&FS(i,s),Yh(a,o);var u=Yh(a,s);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?HS(i,d):c==="dangerouslySetInnerHTML"?US(i,d):c==="children"?Fa(i,d):Qm(i,c,d,u)}switch(a){case"input":Wh(i,s);break;case"textarea":BS(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?eo(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?eo(i,!!s.multiple,s.defaultValue,!0):eo(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ya]=s}catch(y){Ve(e,e.return,y)}}break;case 6:if(Pn(t,e),Vn(e),r&4){if(e.stateNode===null)throw Error(W(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){Ve(e,e.return,y)}}break;case 3:if(Pn(t,e),Vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wa(t.containerInfo)}catch(y){Ve(e,e.return,y)}break;case 4:Pn(t,e),Vn(e);break;case 13:Pn(t,e),Vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Ag=We())),r&4&&A0(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(vt=(u=vt)||c,Pn(t,e),vt=u):Pn(t,e),Vn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(X=e,c=e.child;c!==null;){for(d=X=c;X!==null;){switch(f=X,h=f.child,f.tag){case 0:case 11:case 14:case 15:ka(4,f,f.return);break;case 1:Hs(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(y){Ve(r,n,y)}}break;case 5:Hs(f,f.return);break;case 22:if(f.memoizedState!==null){I0(d);continue}}h!==null?(h.return=f,X=h):I0(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=WS("display",o))}catch(y){Ve(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){Ve(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Pn(t,e),Vn(e),r&4&&A0(e);break;case 21:break;default:Pn(t,e),Vn(e)}}function Vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(gk(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Fa(i,""),r.flags&=-33);var s=j0(e);Cp(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=j0(e);kp(e,a,o);break;default:throw Error(W(161))}}catch(l){Ve(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wI(e,t,n){X=e,xk(e)}function xk(e,t,n){for(var r=(e.mode&1)!==0;X!==null;){var i=X,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Jl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||vt;a=Jl;var u=vt;if(Jl=o,(vt=l)&&!u)for(X=i;X!==null;)o=X,l=o.child,o.tag===22&&o.memoizedState!==null?M0(i):l!==null?(l.return=o,X=l):M0(i);for(;s!==null;)X=s,xk(s),s=s.sibling;X=i,Jl=a,vt=u}R0(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,X=s):R0(e)}}function R0(e){for(;X!==null;){var t=X;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vt||Td(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!vt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:In(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&m0(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}m0(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Wa(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}vt||t.flags&512&&_p(t)}catch(f){Ve(t,t.return,f)}}if(t===e){X=null;break}if(n=t.sibling,n!==null){n.return=t.return,X=n;break}X=t.return}}function I0(e){for(;X!==null;){var t=X;if(t===e){X=null;break}var n=t.sibling;if(n!==null){n.return=t.return,X=n;break}X=t.return}}function M0(e){for(;X!==null;){var t=X;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Td(4,t)}catch(l){Ve(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ve(t,i,l)}}var s=t.return;try{_p(t)}catch(l){Ve(t,s,l)}break;case 5:var o=t.return;try{_p(t)}catch(l){Ve(t,o,l)}}}catch(l){Ve(t,t.return,l)}if(t===e){X=null;break}var a=t.sibling;if(a!==null){a.return=t.return,X=a;break}X=t.return}}var bI=Math.ceil,Ec=Ar.ReactCurrentDispatcher,Eg=Ar.ReactCurrentOwner,mn=Ar.ReactCurrentBatchConfig,he=0,it=null,Ye=null,ht=0,Xt=0,Zs=Si(0),nt=0,tl=null,cs=0,Ed=0,jg=0,Ca=null,Lt=null,Ag=0,wo=1/0,gr=null,jc=!1,Pp=null,ui=null,eu=!1,Qr=null,Ac=0,Pa=0,Tp=null,Du=-1,zu=0;function Et(){return he&6?We():Du!==-1?Du:Du=We()}function ci(e){return e.mode&1?he&2&&ht!==0?ht&-ht:iI.transition!==null?(zu===0&&(zu=r_()),zu):(e=ye,e!==0||(e=window.event,e=e===void 0?16:c_(e.type)),e):1}function Nn(e,t,n,r){if(50<Pa)throw Pa=0,Tp=null,Error(W(185));vl(e,n,r),(!(he&2)||e!==it)&&(e===it&&(!(he&2)&&(Ed|=n),nt===4&&Yr(e,ht)),Ot(e,r),n===1&&he===0&&!(t.mode&1)&&(wo=We()+500,kd&&_i()))}function Ot(e,t){var n=e.callbackNode;iR(e,t);var r=hc(e,e===it?ht:0);if(r===0)n!==null&&Vv(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Vv(n),t===1)e.tag===0?rI(L0.bind(null,e)):j_(L0.bind(null,e)),JR(function(){!(he&6)&&_i()}),n=null;else{switch(i_(r)){case 1:n=ng;break;case 4:n=t_;break;case 16:n=fc;break;case 536870912:n=n_;break;default:n=fc}n=Tk(n,wk.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wk(e,t){if(Du=-1,zu=0,he&6)throw Error(W(327));var n=e.callbackNode;if(so()&&e.callbackNode!==n)return null;var r=hc(e,e===it?ht:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Rc(e,r);else{t=r;var i=he;he|=2;var s=Sk();(it!==e||ht!==t)&&(gr=null,wo=We()+500,Xi(e,t));do try{kI();break}catch(a){bk(e,a)}while(!0);mg(),Ec.current=s,he=i,Ye!==null?t=0:(it=null,ht=0,t=nt)}if(t!==0){if(t===2&&(i=ep(e),i!==0&&(r=i,t=Ep(e,i))),t===1)throw n=tl,Xi(e,0),Yr(e,r),Ot(e,We()),n;if(t===6)Yr(e,r);else{if(i=e.current.alternate,!(r&30)&&!SI(i)&&(t=Rc(e,r),t===2&&(s=ep(e),s!==0&&(r=s,t=Ep(e,s))),t===1))throw n=tl,Xi(e,0),Yr(e,r),Ot(e,We()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:Ni(e,Lt,gr);break;case 3:if(Yr(e,r),(r&130023424)===r&&(t=Ag+500-We(),10<t)){if(hc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Et(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=lp(Ni.bind(null,e,Lt,gr),t);break}Ni(e,Lt,gr);break;case 4:if(Yr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-zn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=We()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bI(r/1960))-r,10<r){e.timeoutHandle=lp(Ni.bind(null,e,Lt,gr),r);break}Ni(e,Lt,gr);break;case 5:Ni(e,Lt,gr);break;default:throw Error(W(329))}}}return Ot(e,We()),e.callbackNode===n?wk.bind(null,e):null}function Ep(e,t){var n=Ca;return e.current.memoizedState.isDehydrated&&(Xi(e,t).flags|=256),e=Rc(e,t),e!==2&&(t=Lt,Lt=n,t!==null&&jp(t)),e}function jp(e){Lt===null?Lt=e:Lt.push.apply(Lt,e)}function SI(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(!Fn(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 Yr(e,t){for(t&=~jg,t&=~Ed,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-zn(t),r=1<<n;e[n]=-1,t&=~r}}function L0(e){if(he&6)throw Error(W(327));so();var t=hc(e,0);if(!(t&1))return Ot(e,We()),null;var n=Rc(e,t);if(e.tag!==0&&n===2){var r=ep(e);r!==0&&(t=r,n=Ep(e,r))}if(n===1)throw n=tl,Xi(e,0),Yr(e,t),Ot(e,We()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ni(e,Lt,gr),Ot(e,We()),null}function Rg(e,t){var n=he;he|=1;try{return e(t)}finally{he=n,he===0&&(wo=We()+500,kd&&_i())}}function ds(e){Qr!==null&&Qr.tag===0&&!(he&6)&&so();var t=he;he|=1;var n=mn.transition,r=ye;try{if(mn.transition=null,ye=1,e)return e()}finally{ye=r,mn.transition=n,he=t,!(he&6)&&_i()}}function Ig(){Xt=Zs.current,Ae(Zs)}function Xi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,qR(n)),Ye!==null)for(n=Ye.return;n!==null;){var r=n;switch(fg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vc();break;case 3:vo(),Ae(Nt),Ae(wt),bg();break;case 5:wg(r);break;case 4:vo();break;case 13:Ae(ze);break;case 19:Ae(ze);break;case 10:gg(r.type._context);break;case 22:case 23:Ig()}n=n.return}if(it=e,Ye=e=di(e.current,null),ht=Xt=t,nt=0,tl=null,jg=Ed=cs=0,Lt=Ca=null,Vi!==null){for(t=0;t<Vi.length;t++)if(n=Vi[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}Vi=null}return e}function bk(e,t){do{var n=Ye;try{if(mg(),Iu.current=Tc,Pc){for(var r=Ne.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Pc=!1}if(us=0,rt=tt=Ne=null,_a=!1,qa=0,Eg.current=null,n===null||n.return===null){nt=1,tl=t,Ye=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ht,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=b0(o);if(h!==null){h.flags&=-257,S0(h,o,a,s,t),h.mode&1&&w0(s,u,t),t=h,l=u;var p=t.updateQueue;if(p===null){var y=new Set;y.add(l),t.updateQueue=y}else p.add(l);break e}else{if(!(t&1)){w0(s,u,t),Mg();break e}l=Error(W(426))}}else if(Me&&a.mode&1){var x=b0(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),S0(x,o,a,s,t),hg(xo(l,a));break e}}s=l=xo(l,a),nt!==4&&(nt=2),Ca===null?Ca=[s]:Ca.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=ik(s,l,t);p0(s,m);break e;case 1:a=l;var v=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ui===null||!ui.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=sk(s,a,t);p0(s,S);break e}}s=s.return}while(s!==null)}kk(n)}catch(k){t=k,Ye===n&&n!==null&&(Ye=n=n.return);continue}break}while(!0)}function Sk(){var e=Ec.current;return Ec.current=Tc,e===null?Tc:e}function Mg(){(nt===0||nt===3||nt===2)&&(nt=4),it===null||!(cs&268435455)&&!(Ed&268435455)||Yr(it,ht)}function Rc(e,t){var n=he;he|=2;var r=Sk();(it!==e||ht!==t)&&(gr=null,Xi(e,t));do try{_I();break}catch(i){bk(e,i)}while(!0);if(mg(),he=n,Ec.current=r,Ye!==null)throw Error(W(261));return it=null,ht=0,nt}function _I(){for(;Ye!==null;)_k(Ye)}function kI(){for(;Ye!==null&&!YA();)_k(Ye)}function _k(e){var t=Pk(e.alternate,e,Xt);e.memoizedProps=e.pendingProps,t===null?kk(e):Ye=t,Eg.current=null}function kk(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=yI(n,t),n!==null){n.flags&=32767,Ye=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{nt=6,Ye=null;return}}else if(n=gI(n,t,Xt),n!==null){Ye=n;return}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);nt===0&&(nt=5)}function Ni(e,t,n){var r=ye,i=mn.transition;try{mn.transition=null,ye=1,CI(e,t,n,r)}finally{mn.transition=i,ye=r}return null}function CI(e,t,n,r){do so();while(Qr!==null);if(he&6)throw Error(W(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(W(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(sR(e,s),e===it&&(Ye=it=null,ht=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||eu||(eu=!0,Tk(fc,function(){return so(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=mn.transition,mn.transition=null;var o=ye;ye=1;var a=he;he|=4,Eg.current=null,xI(e,n),vk(n,e),HR(op),pc=!!sp,op=sp=null,e.current=n,wI(n),XA(),he=a,ye=o,mn.transition=s}else e.current=n;if(eu&&(eu=!1,Qr=e,Ac=i),s=e.pendingLanes,s===0&&(ui=null),JA(n.stateNode),Ot(e,We()),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=Pp,Pp=null,e;return Ac&1&&e.tag!==0&&so(),s=e.pendingLanes,s&1?e===Tp?Pa++:(Pa=0,Tp=e):Pa=0,_i(),null}function so(){if(Qr!==null){var e=i_(Ac),t=mn.transition,n=ye;try{if(mn.transition=null,ye=16>e?16:e,Qr===null)var r=!1;else{if(e=Qr,Qr=null,Ac=0,he&6)throw Error(W(331));var i=he;for(he|=4,X=e.current;X!==null;){var s=X,o=s.child;if(X.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(X=u;X!==null;){var c=X;switch(c.tag){case 0:case 11:case 15:ka(8,c,s)}var d=c.child;if(d!==null)d.return=c,X=d;else for(;X!==null;){c=X;var f=c.sibling,h=c.return;if(mk(c),c===u){X=null;break}if(f!==null){f.return=h,X=f;break}X=h}}}var p=s.alternate;if(p!==null){var y=p.child;if(y!==null){p.child=null;do{var x=y.sibling;y.sibling=null,y=x}while(y!==null)}}X=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,X=o;else e:for(;X!==null;){if(s=X,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ka(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,X=m;break e}X=s.return}}var v=e.current;for(X=v;X!==null;){o=X;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,X=w;else e:for(o=v;X!==null;){if(a=X,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Td(9,a)}}catch(k){Ve(a,a.return,k)}if(a===o){X=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,X=S;break e}X=a.return}}if(he=i,_i(),tr&&typeof tr.onPostCommitFiberRoot=="function")try{tr.onPostCommitFiberRoot(xd,e)}catch{}r=!0}return r}finally{ye=n,mn.transition=t}}return!1}function D0(e,t,n){t=xo(n,t),t=ik(e,t,1),e=li(e,t,1),t=Et(),e!==null&&(vl(e,1,t),Ot(e,t))}function Ve(e,t,n){if(e.tag===3)D0(e,e,n);else for(;t!==null;){if(t.tag===3){D0(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ui===null||!ui.has(r))){e=xo(n,e),e=sk(t,e,1),t=li(t,e,1),e=Et(),t!==null&&(vl(t,1,e),Ot(t,e));break}}t=t.return}}function PI(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Et(),e.pingedLanes|=e.suspendedLanes&n,it===e&&(ht&n)===n&&(nt===4||nt===3&&(ht&130023424)===ht&&500>We()-Ag?Xi(e,0):jg|=n),Ot(e,t)}function Ck(e,t){t===0&&(e.mode&1?(t=Wl,Wl<<=1,!(Wl&130023424)&&(Wl=4194304)):t=1);var n=Et();e=Pr(e,t),e!==null&&(vl(e,t,n),Ot(e,n))}function TI(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ck(e,n)}function EI(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(W(314))}r!==null&&r.delete(t),Ck(e,n)}var Pk;Pk=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Nt.current)Dt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Dt=!1,mI(e,t,n);Dt=!!(e.flags&131072)}else Dt=!1,Me&&t.flags&1048576&&A_(t,bc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Lu(e,t),e=t.pendingProps;var i=mo(t,wt.current);io(t,n),i=_g(null,t,r,e,i,n);var s=kg();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,$t(r)?(s=!0,xc(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,vg(t),i.updater=Pd,t.stateNode=i,i._reactInternals=t,mp(t,r,e,n),t=vp(null,t,r,!0,s,n)):(t.tag=0,Me&&s&&dg(t),_t(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Lu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=AI(r),e=In(r,e),i){case 0:t=yp(null,t,r,e,n);break e;case 1:t=C0(null,t,r,e,n);break e;case 11:t=_0(null,t,r,e,n);break e;case 14:t=k0(null,t,r,In(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:In(r,i),yp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:In(r,i),C0(e,t,r,i,n);case 3:e:{if(uk(t),e===null)throw Error(W(387));r=t.pendingProps,s=t.memoizedState,i=s.element,z_(e,t),kc(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=xo(Error(W(423)),t),t=P0(e,t,r,n,i);break e}else if(r!==i){i=xo(Error(W(424)),t),t=P0(e,t,r,n,i);break e}else for(Qt=ai(t.stateNode.containerInfo.firstChild),Jt=t,Me=!0,Ln=null,n=L_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(go(),r===i){t=Tr(e,t,n);break e}_t(e,t,r,n)}t=t.child}return t;case 5:return N_(t),e===null&&fp(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,ap(r,i)?o=null:s!==null&&ap(r,s)&&(t.flags|=32),lk(e,t),_t(e,t,o,n),t.child;case 6:return e===null&&fp(t),null;case 13:return ck(e,t,n);case 4:return xg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yo(t,null,r,n):_t(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:In(r,i),_0(e,t,r,i,n);case 7:return _t(e,t,t.pendingProps,n),t.child;case 8:return _t(e,t,t.pendingProps.children,n),t.child;case 12:return _t(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,Pe(Sc,r._currentValue),r._currentValue=o,s!==null)if(Fn(s.value,o)){if(s.children===i.children&&!Nt.current){t=Tr(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=Sr(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),hp(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(W(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),hp(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}_t(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,io(t,n),i=wn(i),r=r(i),t.flags|=1,_t(e,t,r,n),t.child;case 14:return r=t.type,i=In(r,t.pendingProps),i=In(r.type,i),k0(e,t,r,i,n);case 15:return ok(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:In(r,i),Lu(e,t),t.tag=1,$t(r)?(e=!0,xc(t)):e=!1,io(t,n),rk(t,r,i),mp(t,r,i,n),vp(null,t,r,!0,e,n);case 19:return dk(e,t,n);case 22:return ak(e,t,n)}throw Error(W(156,t.tag))};function Tk(e,t){return e_(e,t)}function jI(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 dn(e,t,n,r){return new jI(e,t,n,r)}function Lg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function AI(e){if(typeof e=="function")return Lg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Jm)return 11;if(e===eg)return 14}return 2}function di(e,t){var n=e.alternate;return n===null?(n=dn(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 Nu(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Lg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case zs:return Qi(n.children,i,s,t);case qm:o=8,i|=8;break;case Oh:return e=dn(12,n,t,i|2),e.elementType=Oh,e.lanes=s,e;case Fh:return e=dn(13,n,t,i),e.elementType=Fh,e.lanes=s,e;case Bh:return e=dn(19,n,t,i),e.elementType=Bh,e.lanes=s,e;case NS:return jd(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case DS:o=10;break e;case zS:o=9;break e;case Jm:o=11;break e;case eg:o=14;break e;case Hr:o=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=dn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Qi(e,t,n,r){return e=dn(7,e,r,t),e.lanes=n,e}function jd(e,t,n,r){return e=dn(22,e,r,t),e.elementType=NS,e.lanes=n,e.stateNode={isHidden:!1},e}function Rf(e,t,n){return e=dn(6,e,null,t),e.lanes=n,e}function If(e,t,n){return t=dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function RI(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=ff(0),this.expirationTimes=ff(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ff(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Dg(e,t,n,r,i,s,o,a,l){return e=new RI(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=dn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vg(s),e}function II(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ds,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ek(e){if(!e)return mi;e=e._reactInternals;e:{if(gs(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($t(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if($t(n))return E_(e,n,t)}return t}function jk(e,t,n,r,i,s,o,a,l){return e=Dg(n,r,!0,e,i,s,o,a,l),e.context=Ek(null),n=e.current,r=Et(),i=ci(n),s=Sr(r,i),s.callback=t??null,li(n,s,i),e.current.lanes=i,vl(e,i,r),Ot(e,r),e}function Ad(e,t,n,r){var i=t.current,s=Et(),o=ci(i);return n=Ek(n),t.context===null?t.context=n:t.pendingContext=n,t=Sr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=li(i,t,o),e!==null&&(Nn(e,i,o,s),Ru(e,i,o)),o}function Ic(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 z0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zg(e,t){z0(e,t),(e=e.alternate)&&z0(e,t)}function MI(){return null}var Ak=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ng(e){this._internalRoot=e}Rd.prototype.render=Ng.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Ad(e,t,null,null)};Rd.prototype.unmount=Ng.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ds(function(){Ad(null,e,null,null)}),t[Cr]=null}};function Rd(e){this._internalRoot=e}Rd.prototype.unstable_scheduleHydration=function(e){if(e){var t=a_();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Gr.length&&t!==0&&t<Gr[n].priority;n++);Gr.splice(n,0,e),n===0&&u_(e)}};function $g(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Id(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function N0(){}function LI(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Ic(o);s.call(u)}}var o=jk(t,r,e,0,null,!1,!1,"",N0);return e._reactRootContainer=o,e[Cr]=o.current,Ka(e.nodeType===8?e.parentNode:e),ds(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Ic(l);a.call(u)}}var l=Dg(e,0,!1,null,null,!1,!1,"",N0);return e._reactRootContainer=l,e[Cr]=l.current,Ka(e.nodeType===8?e.parentNode:e),ds(function(){Ad(t,l,n,r)}),l}function Md(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=Ic(o);a.call(l)}}Ad(t,o,e,i)}else o=LI(n,t,e,i,r);return Ic(o)}s_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fa(t.pendingLanes);n!==0&&(rg(t,n|1),Ot(t,We()),!(he&6)&&(wo=We()+500,_i()))}break;case 13:ds(function(){var r=Pr(e,1);if(r!==null){var i=Et();Nn(r,e,1,i)}}),zg(e,1)}};ig=function(e){if(e.tag===13){var t=Pr(e,134217728);if(t!==null){var n=Et();Nn(t,e,134217728,n)}zg(e,134217728)}};o_=function(e){if(e.tag===13){var t=ci(e),n=Pr(e,t);if(n!==null){var r=Et();Nn(n,e,t,r)}zg(e,t)}};a_=function(){return ye};l_=function(e,t){var n=ye;try{return ye=e,t()}finally{ye=n}};Qh=function(e,t,n){switch(t){case"input":if(Wh(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=_d(r);if(!i)throw Error(W(90));OS(r),Wh(r,i)}}}break;case"textarea":BS(e,n);break;case"select":t=n.value,t!=null&&eo(e,!!n.multiple,t,!1)}};GS=Rg;YS=ds;var DI={usingClientEntryPoint:!1,Events:[wl,Fs,_d,ZS,KS,Rg]},Qo={findFiberByHostInstance:Bi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zI={bundleType:Qo.bundleType,version:Qo.version,rendererPackageName:Qo.rendererPackageName,rendererConfig:Qo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ar.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=qS(e),e===null?null:e.stateNode},findFiberByHostInstance:Qo.findFiberByHostInstance||MI,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 tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tu.isDisabled&&tu.supportsFiber)try{xd=tu.inject(zI),tr=tu}catch{}}nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DI;nn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$g(t))throw Error(W(200));return II(e,t,null,n)};nn.createRoot=function(e,t){if(!$g(e))throw Error(W(299));var n=!1,r="",i=Ak;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Dg(e,1,!1,null,null,n,!1,r,i),e[Cr]=t.current,Ka(e.nodeType===8?e.parentNode:e),new Ng(t)};nn.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(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=qS(t),e=e===null?null:e.stateNode,e};nn.flushSync=function(e){return ds(e)};nn.hydrate=function(e,t,n){if(!Id(t))throw Error(W(200));return Md(null,e,t,!0,n)};nn.hydrateRoot=function(e,t,n){if(!$g(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Ak;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=jk(t,null,e,1,n??null,i,!1,s,o),e[Cr]=t.current,Ka(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 Rd(t)};nn.render=function(e,t,n){if(!Id(t))throw Error(W(200));return Md(null,e,t,!1,n)};nn.unmountComponentAtNode=function(e){if(!Id(e))throw Error(W(40));return e._reactRootContainer?(ds(function(){Md(null,null,e,!1,function(){e._reactRootContainer=null,e[Cr]=null})}),!0):!1};nn.unstable_batchedUpdates=Rg;nn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Id(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return Md(e,t,n,!1,r)};nn.version="18.3.1-next-f1338f8080-20240426";function Rk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rk)}catch(e){console.error(e)}}Rk(),RS.exports=nn;var Og=RS.exports,Ik,$0=Og;Ik=$0.createRoot,$0.hydrateRoot;var pa=typeof window<"u"?P.useLayoutEffect:P.useEffect;function Mf(e){const t=P.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function NI(e,t,n={},r={}){P.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 $I(e){const t=P.useRef(null);return P.useImperativeHandle(e,()=>t.current,[]),t}const Mk=!1;function nl(e){return e[e.length-1]}function OI(e){return typeof e=="function"}function qr(e,t){return OI(e)?e(t):e}const FI=Object.prototype.hasOwnProperty,O0=Object.prototype.propertyIsEnumerable,BI=()=>Object.create(null),Ii=(e,t)=>Jr(e,t,BI);function Jr(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,s=V0(e)&&V0(i);if(!s&&!(bo(e)&&bo(i)))return i;const o=s?e:F0(e);if(!o)return i;const a=s?i:F0(i);if(!a)return i;const l=o.length,u=a.length,c=s?new Array(u):n();let d=0;for(let f=0;f<u;f++){const h=s?f:a[f],p=e[h],y=i[h];if(p===y){c[h]=p,(s?f<l:FI.call(e,h))&&d++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){c[h]=y;continue}const x=Jr(p,y,n,r+1);c[h]=x,x===p&&d++}return l===u&&d===l?e:c}function F0(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!O0.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(!O0.call(e,i))return!1;r.push(i)}return r}function bo(e){if(!B0(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!B0(n)||!n.hasOwnProperty("isPrototypeOf"))}function B0(e){return Object.prototype.toString.call(e)==="[object Object]"}function V0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qi(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(!qi(e[r],t[r],n))return!1;return!0}if(bo(e)&&bo(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)&&!qi(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||!qi(e[o],t[o],n)))return!1;return i===s}return!1}function So(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 rl(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function VI(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function U0(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 VI(t)}const UI=["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 qo(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+=U0(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+U0(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function WI(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function HI(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 _r(){throw new Error("Invariant failed")}function il(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 ei=4,Lk=5;function ZI(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 Fg(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=ZI(s);if(o){const[a,l]=o,u=s.charCodeAt(a+1);if(u===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const c=a+3,d=l;if(c<d)return n[0]=3,n[1]=t+a,n[2]=t+c,n[3]=t+d,n[4]=t+l+1,n[5]=i,n}}else if(u===36){const c=a+1,d=a+2;return d===l?(n[0]=2,n[1]=t+a,n[2]=t+c,n[3]=t+d,n[4]=t+l+1,n[5]=e.length,n):(n[0]=1,n[1]=t+a,n[2]=t+d,n[3]=t+l,n[4]=t+l+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function Ld(e,t,n,r,i,s,o){var l,u,c,d,f,h,p,y,x,m,v,w,S;o==null||o(n);let a=r;{const k=n.fullPath??n.from,b=k.length,C=((l=n.options)==null?void 0:l.caseSensitive)??e,T=!!((c=(u=n.options)==null?void 0:u.params)!=null&&c.parse&&((f=(d=n.options)==null?void 0:d.skipRouteOnParseError)!=null&&f.params));for(;a<b;){const E=Fg(k,a,t);let I;const M=a,F=E[5];switch(a=F+1,s++,E[0]){case 0:{const B=k.substring(E[2],E[3]);if(C){const $=(h=i.static)==null?void 0:h.get(B);if($)I=$;else{i.static??(i.static=new Map);const G=Wi(n.fullPath??n.from);G.parent=i,G.depth=s,I=G,i.static.set(B,G)}}else{const $=B.toLowerCase(),G=(p=i.staticInsensitive)==null?void 0:p.get($);if(G)I=G;else{i.staticInsensitive??(i.staticInsensitive=new Map);const Z=Wi(n.fullPath??n.from);Z.parent=i,Z.depth=s,I=Z,i.staticInsensitive.set($,Z)}}break}case 1:{const B=k.substring(M,E[1]),$=k.substring(E[4],F),G=C&&!!(B||$),Z=B?G?B:B.toLowerCase():void 0,D=$?G?$:$.toLowerCase():void 0,V=!T&&((y=i.dynamic)==null?void 0:y.find(_=>!_.skipOnParamError&&_.caseSensitive===G&&_.prefix===Z&&_.suffix===D));if(V)I=V;else{const _=Df(1,n.fullPath??n.from,G,Z,D);I=_,_.depth=s,_.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(_)}break}case 3:{const B=k.substring(M,E[1]),$=k.substring(E[4],F),G=C&&!!(B||$),Z=B?G?B:B.toLowerCase():void 0,D=$?G?$:$.toLowerCase():void 0,V=!T&&((x=i.optional)==null?void 0:x.find(_=>!_.skipOnParamError&&_.caseSensitive===G&&_.prefix===Z&&_.suffix===D));if(V)I=V;else{const _=Df(3,n.fullPath??n.from,G,Z,D);I=_,_.parent=i,_.depth=s,i.optional??(i.optional=[]),i.optional.push(_)}break}case 2:{const B=k.substring(M,E[1]),$=k.substring(E[4],F),G=C&&!!(B||$),Z=B?G?B:B.toLowerCase():void 0,D=$?G?$:$.toLowerCase():void 0,V=Df(2,n.fullPath??n.from,G,Z,D);I=V,V.parent=i,V.depth=s,i.wildcard??(i.wildcard=[]),i.wildcard.push(V)}}i=I}if(T&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const E=Wi(n.fullPath??n.from);E.kind=Lk,E.parent=i,s++,E.depth=s,i.pathless??(i.pathless=[]),i.pathless.push(E),i=E}const A=(n.path||!n.children)&&!n.isRoot;if(A&&k.endsWith("/")){const E=Wi(n.fullPath??n.from);E.kind=ei,E.parent=i,s++,E.depth=s,i.index=E,i=E}i.parse=((v=(m=n.options)==null?void 0:m.params)==null?void 0:v.parse)??null,i.skipOnParamError=T,i.parsingPriority=((S=(w=n.options)==null?void 0:w.skipRouteOnParseError)==null?void 0:S.priority)??0,A&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const k of n.children)Ld(e,t,k,a,i,s,o)}function Lf(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 Kr(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Kr(i);if(e.static)for(const i of e.static.values())Kr(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Kr(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Lf);for(const i of e.dynamic)Kr(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(Lf);for(const i of e.optional)Kr(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(Lf);for(const i of e.wildcard)Kr(i)}}function Wi(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 Df(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 KI(e,t){const n=Wi("/"),r=new Uint16Array(6);for(const i of e)Ld(!1,r,i,1,n,0);Kr(n),t.masksTree=n,t.flatCache=il(1e3)}function GI(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=Bg(e,t.masksTree);return t.flatCache.set(e,r),r}function YI(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=Wi("/"),Ld(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(s,o)),Bg(r,o,n)}function XI(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=Bg(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)s=null;else throw o}return s&&(s.branch=JI(s.route)),t.matchCache.set(r,s),s}function QI(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function qI(e,t=!1,n){const r=Wi(e.fullPath),i=new Uint16Array(6),s={},o={};let a=0;return Ld(t,i,e,1,r,0,l=>{if(n==null||n(l,a),l.id in s&&_r(),s[l.id]=l,a!==0&&l.path){const u=QI(l.fullPath);(!o[u]||l.fullPath.endsWith("/"))&&(o[u]=l)}a++}),Kr(r),{processedTree:{segmentTree:r,singleCache:il(1e3),matchCache:il(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:o}}function Bg(e,t,n=!1){const r=e.split("/"),i=tM(e,r,t,n);if(!i)return null;const[s]=Dk(e,r,i);return{route:i.node.route,rawParams:s,parsedParams:i.parsedParams}}function Dk(e,t,n){var c,d,f,h,p,y,x,m,v,w;const r=eM(n.node);let i=null;const s=Object.create(null);let o=((c=n.extract)==null?void 0:c.part)??0,a=((d=n.extract)==null?void 0:d.node)??0,l=((f=n.extract)==null?void 0:f.path)??0,u=((h=n.extract)==null?void 0:h.segment)??0;for(;a<r.length;o++,a++,l++,u++){const S=r[a];if(S.kind===ei)break;if(S.kind===Lk){u--,o--,l--;continue}const k=t[o],b=l;if(k&&(l+=k.length),S.kind===1){i??(i=n.node.fullPath.split("/"));const C=i[u],T=((p=S.prefix)==null?void 0:p.length)??0;if(C.charCodeAt(T)===123){const A=((y=S.suffix)==null?void 0:y.length)??0,E=C.substring(T+2,C.length-A-1),I=k.substring(T,k.length-A);s[E]=decodeURIComponent(I)}else{const A=C.substring(1);s[A]=decodeURIComponent(k)}}else if(S.kind===3){if(n.skipped&1<<a){o--,l=b-1;continue}i??(i=n.node.fullPath.split("/"));const C=i[u],T=((x=S.prefix)==null?void 0:x.length)??0,A=((m=S.suffix)==null?void 0:m.length)??0,E=C.substring(T+3,C.length-A-1),I=S.suffix||S.prefix?k.substring(T,k.length-A):k;I&&(s[E]=decodeURIComponent(I))}else if(S.kind===2){const C=S,T=e.substring(b+(((v=C.prefix)==null?void 0:v.length)??0),e.length-(((w=C.suffix)==null?void 0:w.length)??0)),A=decodeURIComponent(T);s["*"]=A,s._splat=A;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:o,node:a,path:l,segment:u}]}function JI(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function eM(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function tM(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!nl(t),s=i&&e!=="/",o=t.length-(i?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let l=null,u=null;for(;a.length;){const c=a.pop(),{node:d,index:f,skipped:h,depth:p,statics:y,dynamics:x,optionals:m}=c;let{extract:v,rawParams:w,parsedParams:S}=c;if(d.kind===2&&d.route&&!ru(u,c))continue;if(d.skipOnParamError){if(!W0(e,t,c))continue;w=c.rawParams,v=c.extract,S=c.parsedParams}r&&d.route&&d.kind!==ei&&ru(l,c)&&(l=c);const k=f===o;if(k&&(d.route&&(!s||d.kind===ei||d.kind===2)&&ru(u,c)&&(u=c),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const b=k?void 0:t[f];let C;if(k&&d.index){const T={node:d.index,index:f,skipped:h,depth:p+1,statics:y,dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:S};let A=!0;if(d.index.skipOnParamError&&(W0(e,t,T)||(A=!1)),A){if(!x&&!m&&!h&&nM(y,o))return T;ru(u,T)&&(u=T)}}if(d.wildcard)for(let T=d.wildcard.length-1;T>=0;T--){const A=d.wildcard[T],{prefix:E,suffix:I}=A;if(!(E&&(k||!(A.caseSensitive?b:C??(C=b.toLowerCase())).startsWith(E)))){if(I){if(k)continue;const M=t.slice(f).join("/").slice(-I.length);if((A.caseSensitive?M:M.toLowerCase())!==I)continue}a.push({node:A,index:o,skipped:h,depth:p+1,statics:y,dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:S})}}if(d.optional){const T=h|1<<p,A=p+1;for(let E=d.optional.length-1;E>=0;E--){const I=d.optional[E];a.push({node:I,index:f,skipped:T,depth:A,statics:y,dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:S})}if(!k)for(let E=d.optional.length-1;E>=0;E--){const I=d.optional[E],{prefix:M,suffix:F}=I;if(M||F){const B=I.caseSensitive?b:C??(C=b.toLowerCase());if(M&&!B.startsWith(M)||F&&!B.endsWith(F))continue}a.push({node:I,index:f+1,skipped:h,depth:A,statics:y,dynamics:x,optionals:m+nu(o,f),extract:v,rawParams:w,parsedParams:S})}}if(!k&&d.dynamic&&b)for(let T=d.dynamic.length-1;T>=0;T--){const A=d.dynamic[T],{prefix:E,suffix:I}=A;if(E||I){const M=A.caseSensitive?b:C??(C=b.toLowerCase());if(E&&!M.startsWith(E)||I&&!M.endsWith(I))continue}a.push({node:A,index:f+1,skipped:h,depth:p+1,statics:y,dynamics:x+nu(o,f),optionals:m,extract:v,rawParams:w,parsedParams:S})}if(!k&&d.staticInsensitive){const T=d.staticInsensitive.get(C??(C=b.toLowerCase()));T&&a.push({node:T,index:f+1,skipped:h,depth:p+1,statics:y+nu(o,f),dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:S})}if(!k&&d.static){const T=d.static.get(b);T&&a.push({node:T,index:f+1,skipped:h,depth:p+1,statics:y+nu(o,f),dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:S})}if(d.pathless){const T=p+1;for(let A=d.pathless.length-1;A>=0;A--){const E=d.pathless[A];a.push({node:E,index:f,skipped:h,depth:T,statics:y,dynamics:x,optionals:m,extract:v,rawParams:w,parsedParams:S})}}}if(u)return u;if(r&&l){let c=l.index;for(let f=0;f<l.index;f++)c+=t[f].length;const d=c===e.length?"/":e.slice(c);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(d),l}return null}function nu(e,t){return 2**(e-t-1)}function nM(e,t){return e===2**(t-1)-1}function W0(e,t,n){try{const[r,i]=Dk(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 ru(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===ei)>(e.node.kind===ei)||t.node.kind===ei==(e.node.kind===ei)&&t.depth>e.depth))):!0}function $u(e){return Vg(e.filter(t=>t!==void 0).join("/"))}function Vg(e){return e.replace(/\/{2,}/g,"/")}function zk(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function fi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Nk(e){return fi(zk(e))}function Lc(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function rM(e,t,n){return Lc(e,n)===Lc(t,n)}function iM({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&&nl(a)==="";)a.pop();const d=t.split("/");for(let f=0,h=d.length;f<h;f++){const p=d[f];p===""?f?f===h-1&&a.push(p):a=[p]:p===".."?a.pop():p==="."||a.push(p)}}a.length>1&&(nl(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,u="";for(let d=0;d<a.length;d++){d>0&&(u+="/");const f=a[d];if(!f)continue;l=Fg(f,0,l);const h=l[0];if(h===0){u+=f;continue}const p=l[5],y=f.substring(0,l[1]),x=f.substring(l[4],p),m=f.substring(l[2],l[3]);h===1?u+=y||x?`${y}{$${m}}${x}`:`$${m}`:h===2?u+=y||x?`${y}{$}${x}`:"$":u+=`${y}{-$${m}}${x}`}u=Vg(u);const c=u||"/";return o&&r&&r.set(o,c),c}function sM(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 zf(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=>Z0(i,n)).join("/"):Z0(r,n)}function H0({path:e,params:t,decoder:n,...r}){let i=!1;const s=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:i};const o=e.length;let a=0,l,u="";for(;a<o;){const c=a;l=Fg(e,c,l);const d=l[5];if(a=d+1,c===d)continue;const f=l[0];if(f===0){u+="/"+e.substring(c,d);continue}if(f===2){const h=t._splat;s._splat=h,s["*"]=h;const p=e.substring(c,l[1]),y=e.substring(l[4],d);if(!h){i=!0,(p||y)&&(u+="/"+p+y);continue}const x=zf("_splat",t,n);u+="/"+p+x+y;continue}if(f===1){const h=e.substring(l[2],l[3]);!i&&!(h in t)&&(i=!0),s[h]=t[h];const p=e.substring(c,l[1]),y=e.substring(l[4],d),x=zf(h,t,n)??"undefined";u+="/"+p+x+y;continue}if(f===3){const h=e.substring(l[2],l[3]),p=t[h];if(p==null)continue;s[h]=p;const y=e.substring(c,l[1]),x=e.substring(l[4],d),m=zf(h,t,n)??"";u+="/"+y+m+x;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:s,interpolatedPath:u||"/",isMissingParams:i}}function Z0(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function xt(e){return(e==null?void 0:e.isNotFound)===!0}function oM(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const aM="tsr-scroll-restoration-v1_3";function lM(){const e=oM();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");bo(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=qr(r,t)||t},persist:()=>{try{e.setItem(aM,JSON.stringify(t))}catch{}}}}const K0=lM(),uM=e=>e.state.__TSR_key||e.href;function cM(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 iu=!1;const Jo="window",G0="data-scroll-restoration-id";function dM(e,t){if(!K0)return;const n=K0;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,iu=!1;const r=e.options.getScrollRestorationKey||uM,i=new Map;window.history.scrollRestoration="manual";const s=a=>{if(!(iu||!e.isScrollRestoring))if(a.target===document||a.target===window)i.set(Jo,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const l=a.target;i.set(l,{scrollX:l.scrollLeft||0,scrollY:l.scrollTop||0})}},o=a=>{var u;if(!e.isScrollRestoring||!a||i.size===0||!n)return;const l=(u=n.state)[a]||(u[a]={});for(const[c,d]of i){let f;if(c===Jo)f=Jo;else if(c.isConnected){const h=c.getAttribute(G0);f=h?`[${G0}="${h}"]`:cM(c)}f&&(l[f]=d)}};document.addEventListener("scroll",s,!0),e.subscribe("onBeforeLoad",a=>{o(a.fromLocation?r(a.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",a=>{var d;const l=r(a.toLocation),u=e.options.scrollRestorationBehavior,c=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){iu=!0;try{const f=e.isScrollRestoring?n.state[l]:void 0;let h=!1;if(f)for(const p in f){const y=f[p];if(!bo(y))continue;const{scrollX:x,scrollY:m}=y;if(!(!Number.isFinite(x)||!Number.isFinite(m))){if(p===Jo)window.scrollTo({top:m,left:x,behavior:u}),h=!0;else if(p){let v;try{v=document.querySelector(p)}catch{continue}v&&(v.scrollLeft=x,v.scrollTop=m,h=!0)}}}if(!h){const p=e.history.location.hash.slice(1);if(p){const y=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(y){const x=document.getElementById(p);x&&x.scrollIntoView(y)}}else{const y={top:0,left:0,behavior:u};if(window.scrollTo(y),c)for(const x of c){if(x===Jo)continue;const m=typeof x=="function"?x():document.querySelector(x);m&&m.scrollTo(y)}}}}finally{iu=!1}e.isScrollRestoring&&n.set(f=>(f[l]||(f[l]={}),f))}})}function fM(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 Nf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function hM(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]=Nf(i):Array.isArray(s)?s.push(Nf(i)):n[r]=[s,Nf(i)]}return n}const pM=gM(JSON.parse),mM=yM(JSON.stringify,JSON.parse);function gM(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=hM(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function yM(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=fM(i,r);return s?`?${s}`:""}}const Ji="__root__";function vM(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 zt(e){return e instanceof Response&&!!e.options}function xM(e){return{input:({url:t})=>{for(const n of e)t=Ap(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=$k(e[n],t);return t}}}function wM(e){const t=Nk(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=$u(["/",t,o.pathname]),o)}}function Ap(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function $k(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function bM(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:s}=t,o=new Map,a=new Map,l=new Map,u=n(e.status),c=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),h=n(e.location),p=n(e.resolvedLocation),y=n(e.statusCode),x=n(e.redirect),m=n([]),v=n([]),w=n([]),S=r(()=>$f(o,m.get())),k=r(()=>$f(a,v.get())),b=r(()=>$f(l,w.get())),C=r(()=>m.get()[0]),T=r(()=>m.get().some(Z=>{var D;return((D=o.get(Z))==null?void 0:D.get().status)==="pending"})),A=r(()=>{var Z;return{locationHref:h.get().href,resolvedLocationHref:(Z=p.get())==null?void 0:Z.href,status:u.get()}}),E=r(()=>({status:u.get(),loadedAt:c.get(),isLoading:d.get(),isTransitioning:f.get(),matches:S.get(),location:h.get(),resolvedLocation:p.get(),statusCode:y.get(),redirect:x.get()})),I=il(64);function M(Z){let D=I.get(Z);return D||(D=r(()=>{const V=m.get();for(const _ of V){const z=o.get(_);if(z&&z.routeId===Z)return z.get()}}),I.set(Z,D)),D}const F={status:u,loadedAt:c,isLoading:d,isTransitioning:f,location:h,resolvedLocation:p,statusCode:y,redirect:x,matchesId:m,pendingIds:v,cachedIds:w,matches:S,pendingMatches:k,cachedMatches:b,firstId:C,hasPending:T,matchRouteDeps:A,matchStores:o,pendingMatchStores:a,cachedMatchStores:l,__store:E,getRouteMatchStore:M,setMatches:B,setPending:$,setCached:G};B(e.matches),s==null||s(F);function B(Z){Of(Z,o,m,n,i)}function $(Z){Of(Z,a,v,n,i)}function G(Z){Of(Z,l,w,n,i)}return F}function $f(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function Of(e,t,n,r,i){const s=e.map(a=>a.id),o=new Set(s);i(()=>{for(const a of t.keys())o.has(a)||t.delete(a);for(const a of e){const l=t.get(a.id);if(!l){const u=r(a);u.routeId=a.routeId,t.set(a.id,u);continue}l.routeId=a.routeId,l.get()!==a&&l.set(a)}HI(n.get(),s)||n.set(s)})}const Rp=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},SM=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),Dd=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),es=(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},Y0=(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},ti=(e,t,n)=>{var r,i,s;if(!(!zt(n)&&!xt(n)))throw zt(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:zt(n)?"redirected":xt(n)?"notFound":o.status==="pending"?"success":o.status,context:es(e,t.index),isFetching:!1,error:n})),xt(n)&&!n.routeId&&(n.routeId=t.routeId),(s=t._nonReactive.loadPromise)==null||s.resolve()),zt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},Ok=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},X0=(e,t,n)=>{const r=es(e,n);e.updateMatch(t,i=>({...i,context:r}))},ea=(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),ti(e,e.router.getMatch(i),n);try{(l=(a=o.options).onError)==null||l.call(a,n)}catch(u){n=u,ti(e,e.router.getMatch(i),n)}e.updateMatch(i,u=>{var c,d;return(c=u._nonReactive.beforeLoadPromise)==null||c.resolve(),u._nonReactive.beforeLoadPromise=void 0,(d=u._nonReactive.loadPromise)==null||d.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!zt(n)&&!xt(n)&&(e.serialError??(e.serialError=n))},Fk=(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&&!Dd(e,t)&&(n.options.loader||n.options.beforeLoad||Vk(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((s=e.router.options)==null?void 0:s.defaultPendingComponent))){const o=setTimeout(()=>{Rp(e)},i);r._nonReactive.pendingTimeout=o}},_M=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Fk(e,t,n,r);const i=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&ti(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},kM=(e,t,n,r)=>{const i=e.router.getMatch(t);let s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=So(()=>{s==null||s.resolve(),s=void 0});const{paramsError:o,searchError:a}=i;o&&ea(e,n,o,"PARSE_PARAMS"),a&&ea(e,n,a,"VALIDATE_SEARCH"),Fk(e,t,r,i);const l=new AbortController;let u=!1;const c=()=>{u||(u=!0,e.updateMatch(t,S=>({...S,isFetching:"beforeLoad",fetchCount:S.fetchCount+1,abortController:l})))},d=()=>{var S;(S=i._nonReactive.beforeLoadPromise)==null||S.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{c(),d()});return}i._nonReactive.beforeLoadPromise=So();const f={...es(e,n,!1),...i.__routeContext},{search:h,params:p,cause:y}=i,x=Dd(e,t),m={search:h,abortController:l,params:p,preload:x,context:f,location:e.location,navigate:S=>e.router.navigate({...S,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:x?"preload":y,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=S=>{if(S===void 0){e.router.batch(()=>{c(),d()});return}(zt(S)||xt(S))&&(c(),ea(e,n,S,"BEFORE_LOAD")),e.router.batch(()=>{c(),e.updateMatch(t,k=>({...k,__beforeLoadContext:S})),d()})};let w;try{if(w=r.options.beforeLoad(m),rl(w))return c(),w.catch(S=>{ea(e,n,S,"BEFORE_LOAD")}).then(v)}catch(S){c(),ea(e,n,S,"BEFORE_LOAD")}v(w)},CM=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>a(),o=()=>kM(e,n,t,i),a=()=>{if(Ok(e,n))return;const l=_M(e,n,i);return rl(l)?l.then(o):o()};return s()},PM=(e,t,n)=>{var s,o,a,l,u,c;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(o=(s=n.options).head)==null?void 0:o.call(s,i),(l=(a=n.options).scripts)==null?void 0:l.call(a,i),(c=(u=n.options).headers)==null?void 0:c.call(u,i)]).then(([d,f,h])=>({meta:d==null?void 0:d.meta,links:d==null?void 0:d.links,headScripts:d==null?void 0:d.scripts,headers:h,scripts:f,styles:d==null?void 0:d.styles}))},Bk=(e,t,n,r,i)=>{const s=t[r-1],{params:o,loaderDeps:a,abortController:l,cause:u}=e.router.getMatch(n),c=es(e,r),d=Dd(e,n);return{params:o,deps:a,preload:!!d,parentMatchPromise:s,abortController:l,context:c,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:d?"preload":u,route:i,...e.router.options.additionalContext}},Q0=async(e,t,n,r,i)=>{var s,o,a,l,u;try{const c=e.router.getMatch(n);try{(!(Mk??e.router.isServer)||c.ssr===!0)&&sl(i);const d=i.options.loader,f=typeof d=="function"?d:d==null?void 0:d.handler,h=f==null?void 0:f(Bk(e,t,n,r,i)),p=!!f&&rl(h);if((p||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(n,x=>({...x,isFetching:"loader"})),f){const x=p?await h:h;ti(e,e.router.getMatch(n),x),x!==void 0&&e.updateMatch(n,m=>({...m,loaderData:x}))}i._lazyPromise&&await i._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,x=>({...x,error:void 0,context:es(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let f=d;if((f==null?void 0:f.name)==="AbortError"){if(c.abortController.signal.aborted){(s=c._nonReactive.loaderPromise)==null||s.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:es(e,r)}));return}const h=c._nonReactive.minPendingPromise;h&&await h,xt(d)&&await((a=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:a.call(o)),ti(e,e.router.getMatch(n),d);try{(u=(l=i.options).onError)==null||u.call(l,d)}catch(p){f=p,ti(e,e.router.getMatch(n),p)}!zt(f)&&!xt(f)&&await sl(i,["errorComponent"]),e.updateMatch(n,p=>({...p,error:f,context:es(e,r),status:"error",isFetching:!1}))}}catch(c){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),ti(e,d,c)}},TM=async(e,t,n)=>{var h,p,y,x;async function r(m,v,w,S,k){const b=Date.now()-v.updatedAt,C=m?k.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:k.options.staleTime??e.router.options.defaultStaleTime??0,T=k.options.shouldReload,A=typeof T=="function"?T(Bk(e,t,i,n,k)):T,{status:E,invalid:I}=S,M=b>=C&&(!!e.forceStaleReload||S.cause==="enter"||w!==void 0&&w!==S.id);o=E==="success"&&(I||(A??M)),m&&k.options.preload===!1||(o&&!e.sync&&c?(a=!0,(async()=>{var F,B;try{await Q0(e,t,i,n,k);const $=e.router.getMatch(i);(F=$._nonReactive.loaderPromise)==null||F.resolve(),(B=$._nonReactive.loadPromise)==null||B.resolve(),$._nonReactive.loaderPromise=void 0,$._nonReactive.loadPromise=void 0}catch($){zt($)&&await e.router.navigate($.options)}})()):E!=="success"||o?await Q0(e,t,i,n,k):X0(e,i,n))}const{id:i,routeId:s}=e.matches[n];let o=!1,a=!1;const l=e.router.looseRoutesById[s],u=l.options.loader,c=((typeof u=="function"||u==null?void 0:u.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(Ok(e,i)){if(!e.router.getMatch(i))return e.matches[n];X0(e,i,n)}else{const m=e.router.getMatch(i),v=e.router.stores.matchesId.get()[n],w=((h=v&&e.router.stores.matchStores.get(v)||null)==null?void 0:h.routeId)===s?v:(p=e.router.stores.matches.get().find(k=>k.routeId===s))==null?void 0:p.id,S=Dd(e,i);if(m._nonReactive.loaderPromise){if(m.status==="success"&&!e.sync&&!m.preload&&c)return m;await m._nonReactive.loaderPromise;const k=e.router.getMatch(i),b=k._nonReactive.error||k.error;b&&ti(e,k,b),k.status==="pending"&&await r(S,m,w,k,l)}else{const k=S&&!e.router.stores.matchStores.has(i),b=e.router.getMatch(i);b._nonReactive.loaderPromise=So(),k!==b.preload&&e.updateMatch(i,C=>({...C,preload:k})),await r(S,m,w,b,l)}}const d=e.router.getMatch(i);a||((y=d._nonReactive.loaderPromise)==null||y.resolve(),(x=d._nonReactive.loadPromise)==null||x.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,a||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;const f=a?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,m=>({...m,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function q0(e){var f,h;const t=e,n=[];SM(t.router)&&Rp(t);let r;for(let p=0;p<t.matches.length;p++){try{const y=CM(t,p);rl(y)&&await y}catch(y){if(zt(y))throw y;if(xt(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?Y0(t,r):void 0,o=r&&t.preload?0:s!==void 0?Math.min(s+1,i):i;let a,l;for(let p=0;p<o;p++)n.push(TM(t,n,p));try{await Promise.all(n)}catch{const p=await Promise.allSettled(n);for(const y of p){if(y.status!=="rejected")continue;const x=y.reason;if(zt(x))throw x;xt(x)?a??(a=x):l??(l=x)}if(l!==void 0)throw l}const u=a??(r&&!t.preload?r:void 0);let c=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const p=Y0(t,u);p===void 0&&_r();const y=t.matches[p],x=t.router.looseRoutesById[y.routeId],m=(f=t.router.options)==null?void 0:f.defaultNotFoundComponent;!x.options.notFoundComponent&&m&&(x.options.notFoundComponent=m),u.routeId=y.routeId;const v=y.routeId===t.router.routeTree.id;t.updateMatch(y.id,w=>({...w,...v?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),c=p,await sl(x,["notFoundComponent"])}else if(!t.preload){const p=t.matches[0];p.globalNotFound||(h=t.router.getMatch(p.id))!=null&&h.globalNotFound&&t.updateMatch(p.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const p=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await sl(p,["errorComponent"])}for(let p=0;p<=c;p++){const{id:y,routeId:x}=t.matches[p],m=t.router.looseRoutesById[x];try{const v=PM(t,y,m);if(v){const w=await v;t.updateMatch(y,S=>({...S,...w}))}}catch(v){console.error(`Error executing head for route ${x}:`,v)}}const d=Rp(t);if(rl(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function J0(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 sl(e,t=Ou){!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===Ou?(()=>{if(e._componentsPromise===void 0){const r=J0(e,Ou);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():J0(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Vk(e){var t;for(const n of Ou)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Ou=["component","errorComponent","pendingComponent","notFoundComponent"];var hi="__TSR_index",ex="popstate",tx="beforeunload";function EM(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,f;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const u=((d=e.getBlockers)==null?void 0:d.call(e))??[],c=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&c)for(const h of u){const p=Dc(l.path,l.state);if(await h.blockerFn({currentLocation:t,nextLocation:p,action:l.type})){(f=e.onBlocked)==null||f.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,a,l)=>{const u=t.state[hi];a=nx(u+1,a),s({task:()=>{e.pushState(o,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const u=t.state[hi];a=nx(u,a),s({task:()=>{e.replaceState(o,a),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:o,state:a})},go:(o,a)=>{s({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{s({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[hi]!==0,createHref:o=>e.createHref(o),block:o=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,o]),()=>{var c,d;const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];(d=e.setBlockers)==null||d.call(e,u.filter(f=>f!==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 nx(e,t){t||(t={});const n=Ug();return{...t,key:n,__TSR_key:n,[hi]:e}}function jM(e){var T,A;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,o=E=>i=E,a=E=>E,l=()=>Dc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((T=t.history.state)!=null&&T.__TSR_key)&&!((A=t.history.state)!=null&&A.key)){const E=Ug();t.history.replaceState({[hi]:0,key:E,__TSR_key:E},"")}let u=l(),c,d=!1,f=!1,h=!1,p=!1;const y=()=>u;let x,m;const v=()=>{x&&(C._ignoreSubscribers=!0,(x.isPush?t.history.pushState:t.history.replaceState)(x.state,"",x.href),C._ignoreSubscribers=!1,x=void 0,m=void 0,c=void 0)},w=(E,I,M)=>{const F=a(I);m||(c=u),u=Dc(I,M),x={href:F,state:M,isPush:(x==null?void 0:x.isPush)||E==="push"},m||(m=Promise.resolve().then(()=>v()))},S=E=>{u=l(),C.notify({type:E})},k=async()=>{if(f){f=!1;return}const E=l(),I=E.state[hi]-u.state[hi],M=I===1,F=I===-1,B=!M&&!F||d;d=!1;const $=B?"GO":F?"BACK":"FORWARD",G=B?{type:"GO",index:I}:{type:F?"BACK":"FORWARD"};if(h)h=!1;else{const Z=s();if(typeof document<"u"&&Z.length){for(const D of Z)if(await D.blockerFn({currentLocation:u,nextLocation:E,action:$})){f=!0,t.history.go(1),C.notify(G);return}}}u=l(),C.notify(G)},b=E=>{if(p){p=!1;return}let I=!1;const M=s();if(typeof document<"u"&&M.length)for(const F of M){const B=F.enableBeforeUnload??!0;if(B===!0){I=!0;break}if(typeof B=="function"&&B()===!0){I=!0;break}}if(I)return E.preventDefault(),E.returnValue=""},C=EM({getLocation:y,getLength:()=>t.history.length,pushState:(E,I)=>w("push",E,I),replaceState:(E,I)=>w("replace",E,I),back:E=>(E&&(h=!0),p=!0,t.history.back()),forward:E=>{E&&(h=!0),p=!0,t.history.forward()},go:E=>{d=!0,t.history.go(E)},createHref:E=>a(E),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(tx,b,{capture:!0}),t.removeEventListener(ex,k)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(tx,b,{capture:!0}),t.addEventListener(ex,k),t.history.pushState=function(...E){const I=n.apply(t.history,E);return C._ignoreSubscribers||S("PUSH"),I},t.history.replaceState=function(...E){const I=r.apply(t.history,E);return C._ignoreSubscribers||S("REPLACE"),I},C}function AM(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Dc(e,t){const n=AM(e),r=n.indexOf("#"),i=n.indexOf("?"),s=Ug();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||{[hi]:0,key:s,__TSR_key:s}}}function Ug(){return(Math.random()+1).toString(36).substring(7)}function oo(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 RM=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var c;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",s=this.basepath===void 0,o=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=sM(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=jM()),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=il(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=bM(MM(this.latestLocation),d),dM(this)}let a=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(s||i!==l||o!==u){this.basepath=l;const d=[],f=Nk(l);f&&f!=="/"&&d.push(wM({basepath:l})),u&&d.push(u),this.rewrite=d.length===0?void 0:d.length===1?d[0]:xM(d),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((c=window.CSS)==null?void 0:c.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=qI(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&KI(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:l,search:u,hash:c,href:d,state:f})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const m=this.options.parseSearch(u),v=this.options.stringifySearch(m);return{href:l+v+c,publicHref:l+v+c,pathname:qo(l).path,external:!1,searchStr:v,search:Ii(r==null?void 0:r.search,m),hash:qo(c.slice(1)).path,state:Jr(r==null?void 0:r.state,f)}}const h=new URL(d,this.origin),p=Ap(this.rewrite,h),y=this.options.parseSearch(p.search),x=this.options.stringifySearch(y);return p.search=x,{href:p.href.replace(p.origin,""),publicHref:d,pathname:qo(p.pathname).path,external:!!this.rewrite&&p.origin!==this.origin,searchStr:x,search:Ii(r==null?void 0:r.search,y),hash:qo(p.hash.slice(1)).path,state:Jr(r==null?void 0:r.state,f)}},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)=>iM({base:n,to:Vg(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=>LM({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(s={})=>{var E,I;const o=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutesLightweight(o);s.from;const l=s.unsafeRelative==="path"?o.pathname:s.from??a.fullPath,u=this.resolvePathWithBase(l,"."),c=a.search,d=Object.assign(Object.create(null),a.params),f=s.to?this.resolvePathWithBase(u,`${s.to}`):this.resolvePathWithBase(u,"."),h=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?d:Object.assign(d,qr(s.params,d)),p=this.getMatchedRoutes(f);let y=p.matchedRoutes;if((!p.foundRoute||p.foundRoute.path!=="/"&&p.routeParams["**"])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(h).length>0)for(const M of y){const F=((E=M.options.params)==null?void 0:E.stringify)??M.options.stringifyParams;if(F)try{Object.assign(h,F(h))}catch{}}const x=n.leaveParams?f:qo(H0({path:f,params:h,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let m=c;if(n._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const M={};y.forEach(F=>{if(F.options.validateSearch)try{Object.assign(M,Fu(F.options.validateSearch,{...M,...m}))}catch{}}),m=M}m=DM({search:m,dest:s,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),m=Ii(c,m);const v=this.options.stringifySearch(m),w=s.hash===!0?o.hash:s.hash?qr(s.hash,o.hash):void 0,S=w?`#${w}`:"";let k=s.state===!0?o.state:s.state?qr(s.state,o.state):{};k=Jr(o.state,k);const b=`${x}${v}${S}`;let C,T,A=!1;if(this.rewrite){const M=new URL(b,this.origin),F=$k(this.rewrite,M);C=M.href.replace(M.origin,""),F.origin!==this.origin?(T=F.href,A=!0):T=F.pathname+F.search+F.hash}else C=WI(b),T=C;return{publicHref:T,href:C,pathname:x,search:m,searchStr:v,state:k,hash:w??"",external:A,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{const a=r(s);let l=o?r(o):void 0;if(!l){const u=Object.create(null);if(this.options.routeMasks){const c=GI(a.pathname,this.processedTree);if(c){Object.assign(u,c.rawParams);const{from:d,params:f,...h}=c.route,p=f===!1||f===null?Object.create(null):(f??!0)===!0?u:Object.assign(u,qr(f,u));o={from:n.from,...h,params:p},l=r(o)}}}return l&&(a.maskedLocation=l),a};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const s=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(c=>{i.state[c]=this.latestLocation.state[c]});const u=qi(i.state,this.latestLocation.state);return l.forEach(c=>{delete i.state[c]}),u},o=fi(this.latestLocation.href)===fi(i.href);let a=this.commitLocationPromise;if(this.commitLocationPromise=So(()=>{a==null||a.resolve(),a=void 0}),o&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...c}=i;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:o,href:a,...l}={})=>{if(a){const d=this.history.location.state.__TSR_index,f=Dc(a,{__TSR_index:n?d:d+1}),h=new URL(f.pathname,this.origin);l.to=Ap(this.rewrite,h).pathname,l.search=this.options.parseSearch(f.search),l.hash=f.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const c=this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:s,...o})=>{var l,u;let a=!1;if(i)try{new URL(`${i}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(n!==void 0||!i){const d=this.buildLocation({to:n,...o});i=i??d.publicHref,s=s??d.publicHref}const c=!a&&s?s:i;if(Mc(c,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const d=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const f of d)if(f!=null&&f.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(s=>s.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,i,s;const o=this.stores.resolvedLocation.get()??this.stores.location.get();for(s=new Promise(l=>{this.startTransition(async()=>{var u;try{this.beforeLoad();const c=this.latestLocation,d=oo(c,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...d}),this.emit({type:"onBeforeLoad",...d}),await q0({router:this,sync:n==null?void 0:n.sync,forceStaleReload:o.href===c.href,matches:this.stores.pendingMatches.get(),location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var x,m;let f=null,h=null,p=null,y=null;this.batch(()=>{const v=this.stores.pendingMatches.get(),w=v.length,S=this.stores.matches.get();f=w?S.filter(C=>!this.stores.pendingMatchStores.has(C.id)):null;const k=new Set;for(const C of this.stores.pendingMatchStores.values())C.routeId&&k.add(C.routeId);const b=new Set;for(const C of this.stores.matchStores.values())C.routeId&&b.add(C.routeId);h=w?S.filter(C=>!k.has(C.routeId)):null,p=w?v.filter(C=>!b.has(C.routeId)):null,y=w?v.filter(C=>b.has(C.routeId)):S,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),w&&(this.stores.setMatches(v),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...f.filter(C=>C.status!=="error"&&C.status!=="notFound"&&C.status!=="redirected")]),this.clearExpiredCache())});for(const[v,w]of[[h,"onLeave"],[p,"onEnter"],[y,"onStay"]])if(v)for(const S of v)(m=(x=this.looseRoutesById[S.routeId].options)[w])==null||m.call(x,S)})})}})}catch(c){zt(c)?(r=c,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):xt(c)&&(i=c);const d=r?r.status:i?404:this.stores.matches.get().some(f=>f.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(d),this.stores.redirect.set(r)})}this.latestLoadPromise===s&&((u=this.commitLocationPromise)==null||u.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),l()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.matches.get().some(l=>l.status==="error")&&(a=500),a!==void 0&&this.stores.statusCode.set(a)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,o=this.stores.resolvedLocation.get(),a=typeof r.types=="function"?r.types(oo(s,o)):r.types;if(a===!1){n();return}i={update:n,types:a}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const s=this.stores.matchStores.get(n);if(s){s.set(r);return}const o=this.stores.cachedMatchStores.get(n);if(o){const a=r(o.get());a.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(l=>l.filter(u=>u!==n)):o.set(a)}})},this.getMatch=n=>{var r,i,s;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((s=this.stores.matchStores.get(n))==null?void 0:s.get())},this.invalidate=n=>{const r=i=>{var s;return((s=n==null?void 0:n.filter)==null?void 0:s.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(i);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const s=i.pathname+i.search+i.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&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=sl,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 q0({router:this,matches:i,location:r,preload:!0,updateMatch:(l,u)=>{s.has(l)?i=i.map(c=>c.id===l?u(c):c):this.updateMatch(l,u)}}),i}catch(l){if(zt(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:r});xt(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=YI(s.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!a||n.params&&!qi(a.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?qi(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??mM,parseSearch:e.parseSearch??pM,protocolAllowlist:e.protocolAllowlist??UI}),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,f;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:s}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&i["**"]:fi(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const l=a?NM(this.options.notFoundMode,o):void 0,u=new Array(o.length),c=new Map;for(const h of this.stores.matchStores.values())h.routeId&&c.set(h.routeId,h.get());for(let h=0;h<o.length;h++){const p=o[h],y=u[h-1];let x,m,v;{const $=(y==null?void 0:y.search)??e.search,G=(y==null?void 0:y._strictSearch)??void 0;try{const Z=Fu(p.options.validateSearch,{...$})??void 0;x={...$,...Z},m={...G,...Z},v=void 0}catch(Z){let D=Z;if(Z instanceof zc||(D=new zc(Z.message,{cause:Z})),t!=null&&t.throwOnError)throw D;x=$,m={},v=D}}const w=((f=(d=p.options).loaderDeps)==null?void 0:f.call(d,{search:x}))??"",S=w?JSON.stringify(w):"",{interpolatedPath:k,usedParams:b}=H0({path:p.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),C=p.id+k+S,T=this.getMatch(C),A=c.get(p.id),E=(T==null?void 0:T._strictParams)??b;let I;if(!T)try{rx(p,b,s,E)}catch($){if(xt($)||zt($)?I=$:I=new IM($.message,{cause:$}),t!=null&&t.throwOnError)throw I}Object.assign(i,E);const M=A?"stay":"enter";let F;if(T)F={...T,cause:M,params:(A==null?void 0:A.params)??i,_strictParams:E,search:Ii(A?A.search:T.search,x),_strictSearch:m};else{const $=p.options.loader||p.options.beforeLoad||p.lazyFn||Vk(p)?"pending":"success";F={id:C,ssr:p.options.ssr,index:h,routeId:p.id,params:(A==null?void 0:A.params)??i,_strictParams:E,pathname:k,updatedAt:Date.now(),search:A?Ii(A.search,x):x,_strictSearch:m,searchError:void 0,status:$,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:So()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:A?Jr(A.loaderDeps,w):w,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}t!=null&&t.preload||(F.globalNotFound=l===p.id),F.searchError=v;const B=this.getParentContext(y);F.context={...B,...F.__routeContext,...F.__beforeLoadContext},u[h]=F}for(let h=0;h<u.length;h++){const p=u[h],y=this.looseRoutesById[p.routeId],x=this.getMatch(p.id),m=c.get(p.routeId);if(p.params=m?Ii(m.params,i):i,!x){const v=u[h-1],w=this.getParentContext(v);if(y.options.context){const S={deps:p.loaderDeps,params:p.params,context:w??{},location:e,navigate:k=>this.navigate({...k,_fromLocation:e}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:u,routeId:y.id};p.__routeContext=y.options.context(S)??void 0}p.context={...w,...p.__routeContext,...p.__beforeLoadContext}}}return u}matchRoutesLightweight(e){var c;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=nl(t),s={...e.search};for(const d of t)try{Object.assign(s,Fu(d.options.validateSearch,s))}catch{}const o=nl(this.stores.matchesId.get()),a=o&&((c=this.stores.matchStores.get(o))==null?void 0:c.get()),l=a&&a.routeId===i.id&&a.pathname===e.pathname;let u;if(l)u=a.params;else{const d=Object.assign(Object.create(null),n);for(const f of t)try{rx(f,n,r??{},d)}catch{}u=d}return{matchedRoutes:t,fullPath:i.fullPath,search:s,params:u}}},zc=class extends Error{},IM=class extends Error{};function MM(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Fu(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new zc("Async validation not supported");if(n.issues)throw new zc(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 LM({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=fi(e);let s,o;const a=XI(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 DM({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return zM(n)(e,t,r??!1)}function zM(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)(i=s.options.search)!=null&&i.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const o=({search:a,next:l})=>{let u=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(u=s.options.preSearchFilters.reduce((d,f)=>f(d),a));const c=l(u);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((d,f)=>f(d),c):c};t.middlewares.push(o)}if(s.options.validateSearch){const o=({search:a,next:l})=>{const u=l(a);if(!t._includeValidateSearch)return u;try{return{...u,...Fu(s.options.validateSearch,u)??void 0}}catch{return u}};t.middlewares.push(o)}}const n=({search:s})=>{const o=t.dest;return o.search?o.search===!0?s:qr(o.search,s):{}};t.middlewares.push(n);const r=(s,o,a)=>{if(s>=a.length)return o;const l=a[s];return l({search:o,next:c=>r(s+1,c,a)})};return function(o,a,l){return t.dest=a,t._includeValidateSearch=l,r(0,o,t.middlewares)}}function NM(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 Ji}function rx(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 $M="Error preloading route! ☝️";var Uk=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var l,u;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),r?this._path=Ji:this.parentRoute||_r();let i=r?Ji:n==null?void 0:n.path;i&&i!=="/"&&(i=zk(i));const s=(n==null?void 0:n.id)||i;let o=r?Ji:$u([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=$u(["/",o]));const a=o==="__root__"?"/":$u([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=a,this._to=fi(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=>vM({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.")}},OM=class extends Uk{constructor(e){super(e)}};function FM(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 Wg(e){const t=e.errorComponent??Hg;return g.jsx(BM,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?P.createElement(t,{error:n,reset:r}):e.children})}var BM=class extends P.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 Hg({error:e}){const[t,n]=P.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),t?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?g.jsx("code",{children:e.message}):null})}):null]})}function VM({children:e,fallback:t=null}){return Wk()?g.jsx(os.Fragment,{children:e}):g.jsx(os.Fragment,{children:t})}function Wk(){return os.useSyncExternalStore(UM,()=>!0,()=>!1)}function UM(){return()=>{}}var Hk=P.createContext(null);function sn(e){return P.useContext(Hk)}var zd=P.createContext(void 0),WM=P.createContext(void 0),Ie=(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))(Ie||{});function HM({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:s,checkDirty:o,shallowPropagate:a};function r(u,c,d){const f=c.depsTail;if(f!==void 0&&f.dep===u)return;const h=f!==void 0?f.nextDep:c.deps;if(h!==void 0&&h.dep===u){h.version=d,c.depsTail=h;return}const p=u.subsTail;if(p!==void 0&&p.version===d&&p.sub===c)return;const y=c.depsTail=u.subsTail={version:d,dep:u,sub:c,prevDep:f,nextDep:h,prevSub:p,nextSub:void 0};h!==void 0&&(h.prevDep=y),f!==void 0?f.nextDep=y:c.deps=y,p!==void 0?p.nextSub=y:u.subs=y}function i(u,c=u.sub){const d=u.dep,f=u.prevDep,h=u.nextDep,p=u.nextSub,y=u.prevSub;return h!==void 0?h.prevDep=f:c.depsTail=f,f!==void 0?f.nextDep=h:c.deps=h,p!==void 0?p.prevSub=y:d.subsTail=y,y!==void 0?y.nextSub=p:(d.subs=p)===void 0&&n(d),h}function s(u){let c=u.nextSub,d;e:do{const f=u.sub;let h=f.flags;if(h&60?h&12?h&4?!(h&48)&&l(u,f)?(f.flags=h|40,h&=1):h=0:f.flags=h&-9|32:h=0:f.flags=h|32,h&2&&t(f),h&1){const p=f.subs;if(p!==void 0){const y=(u=p).nextSub;y!==void 0&&(d={value:c,prev:d},c=y);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function o(u,c){let d,f=0,h=!1;e:do{const p=u.dep,y=p.flags;if(c.flags&16)h=!0;else if((y&17)===17){if(e(p)){const x=p.subs;x.nextSub!==void 0&&a(x),h=!0}}else if((y&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=p.deps,c=p,++f;continue}if(!h){const x=u.nextDep;if(x!==void 0){u=x;continue}}for(;f--;){const x=c.subs,m=x.nextSub!==void 0;if(m?(u=d.value,d=d.prev):u=x,h){if(e(c)){m&&a(x),c=u.sub;continue}h=!1}else c.flags&=-33;c=u.sub;const v=u.nextDep;if(v!==void 0){u=v;continue e}}return h}while(!0)}function a(u){do{const c=u.sub,d=c.flags;(d&48)===32&&(c.flags=d|16,(d&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let d=c.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function ZM(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 Ip=[];let Bu=0;const{link:ix,unlink:KM,propagate:GM,checkDirty:Zk,shallowPropagate:sx}=HM({update(e){return e._update()},notify(e){Ip[Mp++]=e,e.flags&=~Ie.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ie.Mutable|Ie.Dirty,Nc(e))}});let su=0,Mp=0,Yn,Lp=0;function Kk(e){try{++Lp,e()}finally{--Lp||Gk()}}function Nc(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=KM(n,e)}function Gk(){if(!(Lp>0)){for(;su<Mp;){const e=Ip[su];Ip[su++]=void 0,e.notify()}su=0,Mp=0}}function ox(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?Ie.None:Ie.Mutable,get(){return Yn!==void 0&&ix(i,Yn,Bu),i._snapshot},subscribe(s){const o=ZM(s),a={current:!1},l=YM(()=>{var u;i.get(),a.current?(u=o.next)==null||u.call(o,i._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const o=Yn,a=(t==null?void 0:t.compare)??Object.is;if(n)Yn=i,++Bu,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=Ie.Mutable|Ie.RecursedCheck);try{const l=i._snapshot,u=typeof s=="function"?s(l):s===void 0&&n?r(l):s;return l===void 0||!a(l,u)?(i._snapshot=u,!0):!1}finally{Yn=o,n&&(i.flags&=~Ie.RecursedCheck),Nc(i)}}};return n?(i.flags=Ie.Mutable|Ie.Dirty,i.get=function(){const s=i.flags;if(s&Ie.Dirty||s&Ie.Pending&&Zk(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&sx(o)}}else s&Ie.Pending&&(i.flags=s&~Ie.Pending);return Yn!==void 0&&ix(i,Yn,Bu),i._snapshot}):i.set=function(s){if(i._update(s)){const o=i.subs;o!==void 0&&(GM(o),sx(o),Gk())}},i}function YM(e){const t=()=>{const r=Yn;Yn=n,++Bu,n.depsTail=void 0,n.flags=Ie.Watching|Ie.RecursedCheck;try{return e()}finally{Yn=r,n.flags&=~Ie.RecursedCheck,Nc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ie.Watching|Ie.RecursedCheck,notify(){const r=this.flags;r&Ie.Dirty||r&Ie.Pending&&Zk(this.deps,this)?t():this.flags=Ie.Watching},stop(){this.flags=Ie.None,this.depsTail=void 0,Nc(this)}};return t(),n}var Yk={exports:{}},Xk={},Qk={exports:{}},qk={};/**
|
|
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 _o=P;function XM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var QM=typeof Object.is=="function"?Object.is:XM,qM=_o.useState,JM=_o.useEffect,eL=_o.useLayoutEffect,tL=_o.useDebugValue;function nL(e,t){var n=t(),r=qM({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return eL(function(){i.value=n,i.getSnapshot=t,Ff(i)&&s({inst:i})},[e,n,t]),JM(function(){return Ff(i)&&s({inst:i}),e(function(){Ff(i)&&s({inst:i})})},[e]),tL(n),n}function Ff(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!QM(e,n)}catch{return!0}}function rL(e,t){return t()}var iL=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rL:nL;qk.useSyncExternalStore=_o.useSyncExternalStore!==void 0?_o.useSyncExternalStore:iL;Qk.exports=qk;var sL=Qk.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 Nd=P,oL=sL;function aL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lL=typeof Object.is=="function"?Object.is:aL,uL=oL.useSyncExternalStore,cL=Nd.useRef,dL=Nd.useEffect,fL=Nd.useMemo,hL=Nd.useDebugValue;Xk.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=cL(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=fL(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&&o.hasValue){var p=o.value;if(i(p,h))return d=p}return d=h}if(p=d,lL(c,h))return p;var y=r(h);return i!==void 0&&i(p,y)?(c=h,p):(c=h,d=y)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=uL(e,s[0],s[1]);return dL(function(){o.hasValue=!0,o.value=a},[a]),hL(a),a};Yk.exports=Xk;var Jk=Yk.exports;const pL=yd(Jk);function mL(e,t){return e===t}function Vt(e,t,n=mL){const r=P.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(o);return a},[e]),i=P.useCallback(()=>e==null?void 0:e.get(),[e]);return Jk.useSyncExternalStoreWithSelector(r,i,i,t,n)}var gL={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ys(e){const t=sn(),n=P.useContext(e.from?WM:zd),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=P.useRef(void 0);return Vt(i??gL,o=>{if((e.shouldThrow??!0)&&!o&&_r(),o===void 0)return;const a=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const l=Jr(s.current,a);return s.current=l,l}return a})}function eC(e){return ys({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function tC(e){const{select:t,...n}=e;return ys({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function nC(e){return ys({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 rC(e){return ys({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Ro(e){const t=sn();return P.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function iC(e){return ys({...e,select:t=>e.select?e.select(t.context):t.context})}function yL(e,t){const n=sn(),r=$I(t),{activeProps:i,inactiveProps:s,activeOptions:o,to:a,preload:l,preloadDelay:u,preloadIntentProximity:c,hashScrollIntoView:d,replace:f,startTransition:h,resetScroll:p,viewTransition:y,children:x,target:m,disabled:v,style:w,className:S,onClick:k,onBlur:b,onFocus:C,onMouseEnter:T,onMouseLeave:A,onTouchStart:E,ignoreBlocker:I,params:M,search:F,hash:B,state:$,mask:G,reloadDocument:Z,unsafeRelative:D,from:V,_fromLocation:_,...z}=e,Y=Wk(),j=P.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ie=Vt(n.stores.location,pe=>pe,(pe,N)=>pe.href===N.href),de=P.useMemo(()=>{const pe={_fromLocation:ie,...j};return n.buildLocation(pe)},[n,ie,j]),ue=de.maskedLocation?de.maskedLocation.publicHref:de.publicHref,qe=de.maskedLocation?de.maskedLocation.external:de.external,U=P.useMemo(()=>_L(ue,qe,n.history,v),[v,qe,ue,n.history]),Re=P.useMemo(()=>{if(U!=null&&U.external)return Mc(U.href,n.protocolAllowlist)?void 0:U.href;if(!kL(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),Mc(a,n.protocolAllowlist)?void 0:a}catch{}},[a,U,n.protocolAllowlist]),Ue=P.useMemo(()=>{if(Re)return!1;if(o!=null&&o.exact){if(!rM(ie.pathname,de.pathname,n.basepath))return!1}else{const pe=Lc(ie.pathname,n.basepath),N=Lc(de.pathname,n.basepath);if(!(pe.startsWith(N)&&(pe.length===N.length||pe[N.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!qi(ie.search,de.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?Y&&ie.hash===de.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,ie,Re,Y,de.hash,de.pathname,de.search,n.basepath]),Ht=Ue?qr(i,{})??vL:Bf,Rt=Ue?Bf:qr(s,{})??Bf,on=[S,Ht.className,Rt.className].filter(Boolean).join(" "),It=(w||Ht.style||Rt.style)&&{...w,...Ht.style,...Rt.style},[Bn,ji]=P.useState(!1),Rr=P.useRef(!1),_n=e.reloadDocument||Re?!1:l??n.options.defaultPreload,ur=u??n.options.defaultPreloadDelay??0,Zt=P.useCallback(()=>{n.preloadRoute({...j,_builtLocation:de}).catch(pe=>{console.warn(pe),console.warn($M)})},[n,j,de]);NI(r,P.useCallback(pe=>{pe!=null&&pe.isIntersecting&&Zt()},[Zt]),SL,{disabled:!!v||_n!=="viewport"}),P.useEffect(()=>{Rr.current||!v&&_n==="render"&&(Zt(),Rr.current=!0)},[v,Zt,_n]);const bs=pe=>{const N=pe.currentTarget.getAttribute("target"),K=m!==void 0?m:N;if(!v&&!CL(pe)&&!pe.defaultPrevented&&(!K||K==="_self")&&pe.button===0){pe.preventDefault(),Og.flushSync(()=>{ji(!0)});const ne=n.subscribe("onResolved",()=>{ne(),ji(!1)});n.navigate({...j,replace:f,resetScroll:p,hashScrollIntoView:d,startTransition:h,viewTransition:y,ignoreBlocker:I})}};if(Re)return{...z,ref:r,href:Re,...x&&{children:x},...m&&{target:m},...v&&{disabled:v},...w&&{style:w},...S&&{className:S},...k&&{onClick:k},...b&&{onBlur:b},...C&&{onFocus:C},...T&&{onMouseEnter:T},...A&&{onMouseLeave:A},...E&&{onTouchStart:E}};const Ai=pe=>{if(v||_n!=="intent")return;if(!ur){Zt();return}const N=pe.currentTarget;if(ta.has(N))return;const K=setTimeout(()=>{ta.delete(N),Zt()},ur);ta.set(N,K)},ot=pe=>{v||_n!=="intent"||Zt()},kn=pe=>{if(v||!_n||!ur)return;const N=pe.currentTarget,K=ta.get(N);K&&(clearTimeout(K),ta.delete(N))};return{...z,...Ht,...Rt,href:U==null?void 0:U.href,ref:r,onClick:ks([k,bs]),onBlur:ks([b,kn]),onFocus:ks([C,Ai]),onMouseEnter:ks([T,Ai]),onMouseLeave:ks([A,kn]),onTouchStart:ks([E,ot]),disabled:!!v,target:m,...It&&{style:It},...on&&{className:on},...v&&xL,...Ue&&wL,...Y&&Bn&&bL}}var Bf={},vL={className:"active"},xL={role:"link","aria-disabled":!0},wL={"data-status":"active","aria-current":"page"},bL={"data-transitioning":"transitioning"},ta=new WeakMap,SL={rootMargin:"100px"},ks=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function _L(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function kL(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var sC=P.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...s}=yL(r,t),o=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...l}=s;return P.createElement("a",l,o)}return P.createElement(n,s,o)});function CL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var PL=class extends Uk{constructor(e){super(e),this.useMatch=t=>ys({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>iC({...t,from:this.id}),this.useSearch=t=>rC({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>nC({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>tC({...t,from:this.id}),this.useLoaderData=t=>eC({...t,from:this.id}),this.useNavigate=()=>Ro({from:this.fullPath}),this.Link=os.forwardRef((t,n)=>g.jsx(sC,{ref:n,from:this.fullPath,...t}))}};function $d(e){return new PL(e)}var TL=class extends OM{constructor(e){super(e),this.useMatch=t=>ys({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>iC({...t,from:this.id}),this.useSearch=t=>rC({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>nC({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>tC({...t,from:this.id}),this.useLoaderData=t=>eC({...t,from:this.id}),this.useNavigate=()=>Ro({from:this.fullPath}),this.Link=os.forwardRef((t,n)=>g.jsx(sC,{ref:n,from:this.fullPath,...t}))}};function EL(e){return new TL(e)}function jL(e){const t=sn(),n=`not-found-${Vt(t.stores.location,r=>r.pathname)}-${Vt(t.stores.status,r=>r)}`;return g.jsx(Wg,{getResetKey:()=>n,onCatch:(r,i)=>{var s;if(xt(r))(s=e.onCatch)==null||s.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(xt(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function AL(){return g.jsx("p",{children:"Not Found"})}function As(e){return g.jsx(g.Fragment,{children:e.children})}function oC(e,t,n){return t.options.notFoundComponent?g.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?g.jsx(e.options.defaultNotFoundComponent,{...n}):g.jsx(AL,{})}function RL(e){return null}function IL(){return RL(sn()),null}var aC=P.memo(function({matchId:t}){const n=sn(),r=n.stores.matchStores.get(t);r||_r();const i=Vt(n.stores.loadedAt,o=>o),s=Vt(r,o=>o);return g.jsx(ML,{router:n,matchId:t,resetKey:i,matchState:P.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 ML({router:e,matchId:t,resetKey:n,matchState:r}){var p,y;const i=e.routesById[r.routeId],s=i.options.pendingComponent??e.options.defaultPendingComponent,o=s?g.jsx(s,{}):null,a=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??((p=e.options.notFoundRoute)==null?void 0:p.options.component):i.options.notFoundComponent,c=r.ssr===!1||r.ssr==="data-only",d=(!i.isRoot||i.options.wrapInSuspense||c)&&(i.options.wrapInSuspense??s??(((y=i.options.errorComponent)==null?void 0:y.preload)||c))?P.Suspense:As,f=a?Wg:As,h=u?jL:As;return g.jsxs(i.isRoot?i.options.shellComponent??As:As,{children:[g.jsx(zd.Provider,{value:t,children:g.jsx(d,{fallback:o,children:g.jsx(f,{getResetKey:()=>n,errorComponent:a||Hg,onCatch:(x,m)=>{if(xt(x))throw x.routeId??(x.routeId=r.routeId),x;l==null||l(x,m)},children:g.jsx(h,{fallback:x=>{if(x.routeId??(x.routeId=r.routeId),!u||x.routeId&&x.routeId!==r.routeId||!x.routeId&&!i.isRoot)throw x;return P.createElement(u,x)},children:c||r._displayPending?g.jsx(VM,{fallback:o,children:g.jsx(ax,{matchId:t})}):g.jsx(ax,{matchId:t})})})})}),r.parentRouteId===Ji?g.jsxs(g.Fragment,{children:[g.jsx(LL,{resetKey:n}),e.options.scrollRestoration&&Mk?g.jsx(IL,{}):null]}):null]})}function LL({resetKey:e}){const t=sn(),n=P.useRef(void 0);return pa(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...oo(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var ax=P.memo(function({matchId:t}){const n=sn(),r=(c,d)=>{var f;return((f=n.getMatch(c.id))==null?void 0:f._nonReactive[d])??c._nonReactive[d]},i=n.stores.matchStores.get(t);i||_r();const s=Vt(i,c=>c),o=s.routeId,a=n.routesById[o],l=P.useMemo(()=>{var d;const c=(d=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:d({routeId:o,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return c?JSON.stringify(c):void 0},[o,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),u=P.useMemo(()=>{const c=a.options.component??n.options.defaultComponent;return c?g.jsx(c,{},l):g.jsx(lC,{})},[l,a.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const c=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const d=n.getMatch(s.id);if(d&&!d._nonReactive.minPendingPromise){const f=So();d._nonReactive.minPendingPromise=f,setTimeout(()=>{f.resolve(),d._nonReactive.minPendingPromise=void 0},c)}}throw r(s,"loadPromise")}if(s.status==="notFound")return xt(s.error)||_r(),oC(n,a,s.error);if(s.status==="redirected")throw zt(s.error)||_r(),r(s,"loadPromise");if(s.status==="error")throw s.error;return u}),lC=P.memo(function(){const t=sn(),n=P.useContext(zd);let r,i=!1,s;{const u=n?t.stores.matchStores.get(n):void 0;[r,i]=Vt(u,c=>[c==null?void 0:c.routeId,(c==null?void 0:c.globalNotFound)??!1]),s=Vt(t.stores.matchesId,c=>c[c.findIndex(d=>d===n)+1])}const o=r?t.routesById[r]:void 0,a=t.options.defaultPendingComponent?g.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||_r(),oC(t,o,void 0);if(!s)return null;const l=g.jsx(aC,{matchId:s});return r===Ji?g.jsx(P.Suspense,{fallback:a,children:l}):l});function DL(){const e=sn(),t=P.useRef({router:e,mounted:!1}),[n,r]=P.useState(!1),i=Vt(e.stores.isLoading,d=>d),s=Vt(e.stores.hasPending,d=>d),o=Mf(i),a=i||n||s,l=Mf(a),u=i||s,c=Mf(u);return e.startTransition=d=>{r(!0),P.startTransition(()=>{d(),r(!1)})},P.useEffect(()=>{const d=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return fi(e.latestLocation.publicHref)!==fi(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{d()}},[e,e.history]),pa(()=>{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(f){console.error(f)}})()},[e]),pa(()=>{o&&!i&&e.emit({type:"onLoad",...oo(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),pa(()=>{c&&!u&&e.emit({type:"onBeforeRouteMount",...oo(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,c,e]),pa(()=>{if(l&&!a){const d=oo(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),Kk(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&FM(e)}},[a,l,e]),null}function zL(){const e=sn(),t=e.routesById[Ji].options.pendingComponent??e.options.defaultPendingComponent,n=t?g.jsx(t,{}):null,r=g.jsxs(typeof document<"u"&&e.ssr?As:P.Suspense,{fallback:n,children:[g.jsx(DL,{}),g.jsx(NL,{})]});return e.options.InnerWrap?g.jsx(e.options.InnerWrap,{children:r}):r}function NL(){const e=sn(),t=Vt(e.stores.firstId,i=>i),n=Vt(e.stores.loadedAt,i=>i),r=t?g.jsx(aC,{matchId:t}):null;return g.jsx(zd.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:g.jsx(Wg,{getResetKey:()=>n,errorComponent:Hg,onCatch:void 0,children:r})})}var $L=e=>({createMutableStore:ox,createReadonlyStore:ox,batch:Kk}),OL=e=>new FL(e),FL=class extends RM{constructor(e){super(e,$L)}};function BL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=g.jsx(Hk.Provider,{value:e,children:t});return e.options.Wrap?g.jsx(e.options.Wrap,{children:r}):r}function VL({router:e,...t}){return g.jsx(BL,{router:e,...t,children:g.jsx(zL,{})})}function Zg(e){const t=sn({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=P.useRef(void 0);return Vt(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=Jr(r.current,e.select(i));return r.current=s,s}return e.select(i)}return i})}function uC(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=uC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function UL(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=uC(e))&&(r&&(r+=" "),r+=t);return r}const Kg="-",WL=e=>{const t=ZL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Kg);return a[0]===""&&a.length!==1&&a.shift(),cC(a,t)||HL(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},cC=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?cC(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Kg);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},lx=/^\[(.+)\]$/,HL=e=>{if(lx.test(e)){const t=lx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ZL=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return GL(Object.entries(e.classGroups),n).forEach(([s,o])=>{Dp(o,r,s,t)}),r},Dp=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:ux(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(KL(i)){Dp(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Dp(o,ux(t,s),n,r)})})},ux=(e,t)=>{let n=e;return t.split(Kg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},KL=e=>e.isThemeGetter,GL=(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,YL=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)}}},dC="!",XL=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let x=0;x<a.length;x++){let m=a[x];if(u===0){if(m===i&&(r||a.slice(x,x+s)===t)){l.push(a.slice(c,x)),c=x+s;continue}if(m==="/"){d=x;continue}}m==="["?u++:m==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(dC),p=h?f.substring(1):f,y=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},QL=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},qL=e=>({cache:YL(e.cacheSize),parseClassName:XL(e),...WL(e)}),JL=/\s+/,eD=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(JL);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(u);let p=!!h,y=r(p?f.substring(0,h):f);if(!y){if(!p){a=u+(a.length>0?" "+a:a);continue}if(y=r(f),!y){a=u+(a.length>0?" "+a:a);continue}p=!1}const x=QL(c).join(":"),m=d?x+dC:x,v=m+y;if(s.includes(v))continue;s.push(v);const w=i(y,p);for(let S=0;S<w.length;++S){const k=w[S];s.push(m+k)}a=u+(a.length>0?" "+a:a)}return a};function tD(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=fC(t))&&(r&&(r+=" "),r+=n);return r}const fC=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=fC(e[r]))&&(n&&(n+=" "),n+=t);return n};function nD(e,...t){let n,r,i,s=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=qL(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=eD(l,n);return i(l,c),c}return function(){return s(tD.apply(null,arguments))}}const Ee=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},hC=/^\[(?:([a-z-]+):)?(.+)\]$/i,rD=/^\d+\/\d+$/,iD=new Set(["px","full","screen"]),sD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oD=/\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$/,aD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fr=e=>ao(e)||iD.has(e)||rD.test(e),Mr=e=>Io(e,"length",yD),ao=e=>!!e&&!Number.isNaN(Number(e)),Vf=e=>Io(e,"number",ao),na=e=>!!e&&Number.isInteger(Number(e)),cD=e=>e.endsWith("%")&&ao(e.slice(0,-1)),se=e=>hC.test(e),Lr=e=>sD.test(e),dD=new Set(["length","size","percentage"]),fD=e=>Io(e,dD,pC),hD=e=>Io(e,"position",pC),pD=new Set(["image","url"]),mD=e=>Io(e,pD,xD),gD=e=>Io(e,"",vD),ra=()=>!0,Io=(e,t,n)=>{const r=hC.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},yD=e=>oD.test(e)&&!aD.test(e),pC=()=>!1,vD=e=>lD.test(e),xD=e=>uD.test(e),wD=()=>{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"),u=Ee("grayscale"),c=Ee("hueRotate"),d=Ee("invert"),f=Ee("gap"),h=Ee("gradientColorStops"),p=Ee("gradientColorStopPositions"),y=Ee("inset"),x=Ee("margin"),m=Ee("opacity"),v=Ee("padding"),w=Ee("saturate"),S=Ee("scale"),k=Ee("sepia"),b=Ee("skew"),C=Ee("space"),T=Ee("translate"),A=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",se,t],M=()=>[se,t],F=()=>["",fr,Mr],B=()=>["auto",ao,se],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],Z=()=>["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"],V=()=>["","0",se],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[ao,se];return{cacheSize:500,separator:":",theme:{colors:[ra],spacing:[fr,Mr],blur:["none","",Lr,se],brightness:z(),borderColor:[e],borderRadius:["none","","full",Lr,se],borderSpacing:M(),borderWidth:F(),contrast:z(),grayscale:V(),hueRotate:z(),invert:V(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[cD,Mr],inset:I(),margin:I(),opacity:z(),padding:M(),saturate:z(),scale:z(),sepia:V(),skew:z(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",se]}],container:["container"],columns:[{columns:[Lr]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:[...$(),se]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],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",na,se]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",se]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",na,se]}],"grid-cols":[{"grid-cols":[ra]}],"col-start-end":[{col:["auto",{span:["full",na,se]},se]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[ra]}],"row-start-end":[{row:["auto",{span:[na,se]},se]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",se,t]}],"min-w":[{"min-w":[se,t,"min","max","fit"]}],"max-w":[{"max-w":[se,t,"none","full","min","max","fit","prose",{screen:[Lr]},Lr]}],h:[{h:[se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Lr,Mr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vf]}],"font-family":[{font:[ra]}],"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",se]}],"line-clamp":[{"line-clamp":["none",ao,Vf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fr,se]}],"list-image":[{"list-image":["none",se]}],"list-style-type":[{list:["none","disc","decimal",se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fr,Mr]}],"underline-offset":[{"underline-offset":["auto",fr,se]}],"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",se]}],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",se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),hD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},mD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:G()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[fr,se]}],"outline-w":[{outline:[fr,Mr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[fr,Mr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Lr,gD]}],"shadow-color":[{shadow:[ra]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Lr,se]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"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",se]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",se]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[na,se]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",se]}],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",se]}],"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",se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fr,Mr,Vf]}],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"]}}},bD=nD(wD);var SD={},mC={exports:{}},ia={};/**
|
|
57
|
+
* @license React
|
|
58
|
+
* react-jsx-runtime.production.min.js
|
|
59
|
+
*
|
|
60
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the MIT license found in the
|
|
63
|
+
* LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/var cx;function _D(){if(cx)return ia;cx=1;var e=os,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,u){var c,d={},f=null,h=null;u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(h=l.ref);for(c in l)r.call(l,c)&&!s.hasOwnProperty(c)&&(d[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)d[c]===void 0&&(d[c]=l[c]);return{$$typeof:t,type:a,key:f,ref:h,props:d,_owner:i.current}}return ia.Fragment=n,ia.jsx=o,ia.jsxs=o,ia}mC.exports=_D();var R=mC.exports;const Gg=P.createContext({});function Yg(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const kD=typeof window<"u",gC=kD?P.useLayoutEffect:P.useEffect,Od=P.createContext(null);function Xg(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 or=(e,t,n)=>n>t?t:n<e?e:n;function dx(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Sl=()=>{},fs=()=>{};var fx;typeof process<"u"&&((fx=SD)==null?void 0:fx.NODE_ENV)!=="production"&&(Sl=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(dx(t,n))},fs=(e,t,n)=>{if(!e)throw new Error(dx(t,n))});const gi={},yC=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vC=e=>typeof e=="object"&&e!==null,xC=e=>/^0[^.\s]+$/u.test(e);function wC(e){let t;return()=>(t===void 0&&(t=e()),t)}const gn=e=>e,_l=(...e)=>e.reduce((t,n)=>r=>n(t(r))),ol=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Qg{constructor(){this.subscriptions=[]}add(t){return Xg(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 Ft=e=>e*1e3,fn=e=>e/1e3,bC=(e,t)=>t?e*(1e3/t):0,SC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,CD=1e-7,PD=12;function TD(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=SC(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>CD&&++a<PD);return o}function kl(e,t,n,r){if(e===t&&n===r)return gn;const i=s=>TD(s,0,1,e,n);return s=>s===0||s===1?s:SC(i(s),t,r)}const _C=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kC=e=>t=>1-e(1-t),CC=kl(.33,1.53,.69,.99),qg=kC(CC),PC=_C(qg),TC=e=>e>=1?1:(e*=2)<1?.5*qg(e):.5*(2-Math.pow(2,-10*(e-1))),Jg=e=>1-Math.sin(Math.acos(e)),EC=kC(Jg),jC=_C(Jg),ED=kl(.42,0,1,1),jD=kl(0,0,.58,1),AC=kl(.42,0,.58,1),AD=e=>Array.isArray(e)&&typeof e[0]!="number",RC=e=>Array.isArray(e)&&typeof e[0]=="number",hx={linear:gn,easeIn:ED,easeInOut:AC,easeOut:jD,circIn:Jg,circInOut:jC,circOut:EC,backIn:qg,backInOut:PC,backOut:CC,anticipate:TC},RD=e=>typeof e=="string",px=e=>{if(RC(e)){fs(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return kl(t,n,r,i)}else if(RD(e))return fs(hx[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),hx[e];return e},ou=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ID(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const h=f&&i?n:r;return d&&o.add(c),h.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const MD=40;function IC(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=ou.reduce((m,v)=>(m[v]=ID(s),m),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=o,y=()=>{const m=gi.useManualTiming,v=m?i.timestamp:performance.now();n=!1,m||(i.delta=r?1e3/60:Math.max(Math.min(v-i.timestamp,MD),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},x=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:ou.reduce((m,v)=>{const w=o[v];return m[v]=(S,k=!1,b=!1)=>(n||x(),w.schedule(S,k,b)),m},{}),cancel:m=>{for(let v=0;v<ou.length;v++)o[ou[v]].cancel(m)},state:i,steps:o}}const{schedule:ke,cancel:yi,state:lt,steps:Uf}=IC(typeof requestAnimationFrame<"u"?requestAnimationFrame:gn,!0);let Vu;function LD(){Vu=void 0}const kt={now:()=>(Vu===void 0&&kt.set(lt.isProcessing||gi.useManualTiming?lt.timestamp:performance.now()),Vu),set:e=>{Vu=e,queueMicrotask(LD)}},MC=e=>t=>typeof t=="string"&&t.startsWith(e),LC=MC("--"),DD=MC("var(--"),ey=e=>DD(e)?zD.test(e.split("/*")[0].trim()):!1,zD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function mx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Mo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},al={...Mo,transform:e=>or(0,1,e)},au={...Mo,default:1},Ta=e=>Math.round(e*1e5)/1e5,ty=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ND(e){return e==null}const $D=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ny=(e,t)=>n=>!!(typeof n=="string"&&$D.test(n)&&n.startsWith(e)||t&&!ND(n)&&Object.prototype.hasOwnProperty.call(n,t)),DC=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(ty);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},OD=e=>or(0,255,e),Wf={...Mo,transform:e=>Math.round(OD(e))},Hi={test:ny("rgb","red"),parse:DC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Wf.transform(e)+", "+Wf.transform(t)+", "+Wf.transform(n)+", "+Ta(al.transform(r))+")"};function FD(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 zp={test:ny("#"),parse:FD,transform:Hi.transform},Cl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),pr=Cl("deg"),rr=Cl("%"),Q=Cl("px"),BD=Cl("vh"),VD=Cl("vw"),gx={...rr,parse:e=>rr.parse(e)/100,transform:e=>rr.transform(e*100)},Ks={test:ny("hsl","hue"),parse:DC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+rr.transform(Ta(t))+", "+rr.transform(Ta(n))+", "+Ta(al.transform(r))+")"},Ke={test:e=>Hi.test(e)||zp.test(e)||Ks.test(e),parse:e=>Hi.test(e)?Hi.parse(e):Ks.test(e)?Ks.parse(e):zp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Hi.transform(e):Ks.transform(e),getAnimatableNone:e=>{const t=Ke.parse(e);return t.alpha=0,Ke.transform(t)}},UD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function WD(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ty))==null?void 0:t.length)||0)+(((n=e.match(UD))==null?void 0:n.length)||0)>0}const zC="number",NC="color",HD="var",ZD="var(",yx="${}",KD=/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 ko(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const o=t.replace(KD,a=>(Ke.test(a)?(r.color.push(s),i.push(NC),n.push(Ke.parse(a))):a.startsWith(ZD)?(r.var.push(s),i.push(HD),n.push(a)):(r.number.push(s),i.push(zC),n.push(parseFloat(a))),++s,yx)).split(yx);return{values:n,split:o,indexes:r,types:i}}function GD(e){return ko(e).values}function $C({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===zC?i+=Ta(r[s]):o===NC?i+=Ke.transform(r[s]):i+=r[s]}return i}}function YD(e){return $C(ko(e))}const XD=e=>typeof e=="number"?0:Ke.test(e)?Ke.getAnimatableNone(e):e,QD=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:XD(e);function qD(e){const t=ko(e);return $C(t)(t.values.map((n,r)=>QD(n,t.split[r])))}const $n={test:WD,parse:GD,createTransformer:YD,getAnimatableNone:qD};function Hf(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 JD({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=Hf(l,a,e+1/3),s=Hf(l,a,e),o=Hf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Oc(e,t){return n=>n>0?t:e}const Se=(e,t,n)=>e+(t-e)*n,Zf=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},e2=[zp,Hi,Ks],t2=e=>e2.find(t=>t.test(e));function vx(e){const t=t2(e);if(Sl(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ks&&(n=JD(n)),n}const xx=(e,t)=>{const n=vx(e),r=vx(t);if(!n||!r)return Oc(e,t);const i={...n};return s=>(i.red=Zf(n.red,r.red,s),i.green=Zf(n.green,r.green,s),i.blue=Zf(n.blue,r.blue,s),i.alpha=Se(n.alpha,r.alpha,s),Hi.transform(i))},Np=new Set(["none","hidden"]);function n2(e,t){return Np.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function r2(e,t){return n=>Se(e,t,n)}function ry(e){return typeof e=="number"?r2:typeof e=="string"?ey(e)?Oc:Ke.test(e)?xx:o2:Array.isArray(e)?OC:typeof e=="object"?Ke.test(e)?xx:i2:Oc}function OC(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>ry(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function i2(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ry(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function s2(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 o2=(e,t)=>{const n=$n.createTransformer(t),r=ko(e),i=ko(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Np.has(e)&&!i.values.length||Np.has(t)&&!r.values.length?n2(e,t):_l(OC(s2(r,i),i.values),n):(Sl(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Oc(e,t))};function FC(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Se(e,t,n):ry(e)(e,t)}const a2=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>yi(t),now:()=>lt.isProcessing?lt.timestamp:kt.now()}},BC=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Fc=2e4;function iy(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Fc;)t+=n,r=e.next(t);return t>=Fc?1/0:t}function l2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(iy(r),Fc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:fn(i)}}const De={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function $p(e,t){return e*Math.sqrt(1-t*t)}const u2=12;function c2(e,t,n){let r=n;for(let i=1;i<u2;i++)r=r-e(r)/t(r);return r}const Kf=.001;function d2({duration:e=De.duration,bounce:t=De.bounce,velocity:n=De.velocity,mass:r=De.mass}){let i,s;Sl(e<=Ft(De.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=or(De.minDamping,De.maxDamping,o),e=or(De.minDuration,De.maxDuration,fn(e)),o<1?(i=u=>{const c=u*o,d=c*e,f=c-n,h=$p(u,o),p=Math.exp(-d);return Kf-f/h*p},s=u=>{const c=u*o*e,d=c*n+n,f=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-c),p=$p(Math.pow(u,2),o);return(-i(u)+Kf>0?-1:1)*((d-f)*h)/p}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Kf+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=c2(i,s,a);if(e=Ft(e),isNaN(l))return{stiffness:De.stiffness,damping:De.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const f2=["duration","bounce"],h2=["stiffness","damping","mass"];function wx(e,t){return t.some(n=>e[n]!==void 0)}function p2(e){let t={velocity:De.velocity,stiffness:De.stiffness,damping:De.damping,mass:De.mass,isResolvedFromDuration:!1,...e};if(!wx(e,h2)&&wx(e,f2))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*or(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:De.mass,stiffness:i,damping:s}}else{const n=d2({...e,velocity:0});t={...t,...n,mass:De.mass},t.isResolvedFromDuration=!0}return t}function Bc(e=De.visualDuration,t=De.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=p2({...n,velocity:-fn(n.velocity||0)}),p=f||0,y=u/(2*Math.sqrt(l*c)),x=o-s,m=fn(Math.sqrt(l/c)),v=Math.abs(x)<5;r||(r=v?De.restSpeed.granular:De.restSpeed.default),i||(i=v?De.restDelta.granular:De.restDelta.default);let w,S,k,b,C,T;if(y<1)k=$p(m,y),b=(p+y*m*x)/k,w=E=>{const I=Math.exp(-y*m*E);return o-I*(b*Math.sin(k*E)+x*Math.cos(k*E))},C=y*m*b+x*k,T=y*m*x-b*k,S=E=>Math.exp(-y*m*E)*(C*Math.sin(k*E)+T*Math.cos(k*E));else if(y===1){w=I=>o-Math.exp(-m*I)*(x+(p+m*x)*I);const E=p+m*x;S=I=>Math.exp(-m*I)*(m*E*I-p)}else{const E=m*Math.sqrt(y*y-1);w=B=>{const $=Math.exp(-y*m*B),G=Math.min(E*B,300);return o-$*((p+y*m*x)*Math.sinh(G)+E*x*Math.cosh(G))/E};const I=(p+y*m*x)/E,M=y*m*I-x*E,F=y*m*x-I*E;S=B=>{const $=Math.exp(-y*m*B),G=Math.min(E*B,300);return $*(M*Math.sinh(G)+F*Math.cosh(G))}}const A={calculatedDuration:h&&d||null,velocity:E=>Ft(S(E)),next:E=>{if(!h&&y<1){const M=Math.exp(-y*m*E),F=Math.sin(k*E),B=Math.cos(k*E),$=o-M*(b*F+x*B),G=Ft(M*(C*F+T*B));return a.done=Math.abs(G)<=r&&Math.abs(o-$)<=i,a.value=a.done?o:$,a}const I=w(E);if(h)a.done=E>=d;else{const M=Ft(S(E));a.done=Math.abs(M)<=r&&Math.abs(o-I)<=i}return a.value=a.done?o:I,a},toString:()=>{const E=Math.min(iy(A),Fc),I=BC(M=>A.next(E*M).value,E,30);return E+"ms "+I},toTransition:()=>{}};return A}Bc.applyToOptions=e=>{const t=l2(e,100,Bc);return e.ease=t.ease,e.duration=Ft(t.duration),e.type="keyframes",e};const m2=5;function VC(e,t,n){const r=Math.max(t-m2,0);return bC(n-e(r),t-r)}function Op({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let y=n*t;const x=d+y,m=o===void 0?x:o(x);m!==x&&(y=m-d);const v=T=>-y*Math.exp(-T/r),w=T=>m+v(T),S=T=>{const A=v(T),E=w(T);f.done=Math.abs(A)<=u,f.value=f.done?m:E};let k,b;const C=T=>{h(f.value)&&(k=T,b=Bc({keyframes:[f.value,p(f.value)],velocity:VC(w,T,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:T=>{let A=!1;return!b&&k===void 0&&(A=!0,S(T),C(T)),k!==void 0&&T>=k?b.next(T-k):(!A&&S(T),f)}}}function g2(e,t,n){const r=[],i=n||gi.mix||FC,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]||gn:t;a=_l(l,a)}r.push(a)}return r}function y2(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(fs(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=g2(t,r,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=ol(e[d],e[d+1],c);return a[d](f)};return n?c=>u(or(e[0],e[s-1],c)):u}function v2(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ol(0,t,r);e.push(Se(n,1,i))}}function x2(e){const t=[0];return v2(t,e.length-1),t}function w2(e,t){return e.map(n=>n*t)}function b2(e,t){return e.map(()=>t||AC).splice(0,e.length-1)}function Ea({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=AD(r)?r.map(px):px(r),s={done:!1,value:t[0]},o=w2(n&&n.length===t.length?n:x2(t),e),a=y2(o,t,{ease:Array.isArray(i)?i:b2(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const S2=e=>e!==null;function Fd(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(S2),o=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const _2={decay:Op,inertia:Op,tween:Ea,keyframes:Ea,spring:Bc};function UC(e){typeof e.type=="string"&&(e.type=_2[e.type])}class sy{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 k2=e=>e/100;class Vc extends sy{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var n,r;const{motionValue:i}=this.options;i&&i.updatedAt!==kt.now()&&this.tick(kt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(n=this.options).onStop)==null||r.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;UC(t);const{type:n=Ea,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Ea;l!==Ea&&typeof a[0]!="number"&&(this.mixKeyframes=_l(k2,FC(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=iy(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:y,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const m=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?m<0:m>i;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,S=r;if(d){const T=Math.min(this.currentTime,i)/a;let A=Math.floor(T),E=T%1;!E&&T>=1&&(E=1),E===1&&A--,A=Math.min(A,d+1),A%2&&(f==="reverse"?(E=1-E,h&&(E-=h/a)):f==="mirror"&&(S=o)),w=or(0,1,E)*a}let k;v?(this.delayState.value=c[0],k=this.delayState):k=S.next(w),s&&!v&&(k.value=s(k.value));let{done:b}=k;!v&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return C&&p!==Op&&(k.value=Fd(c,this.options,x,this.speed)),y&&y(k.value),C&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return fn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fn(t)}get time(){return fn(this.currentTime)}set time(t){t=Ft(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return VC(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(kt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=fn(this.currentTime))}play(){var t,n;if(this.isStopped)return;const{driver:r=a2,startTime:i}=this.options;this.driver||(this.driver=r(o=>this.tick(o))),(n=(t=this.options).onPlay)==null||n.call(t);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=i??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(kt.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 C2(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Zi=e=>e*180/Math.PI,Fp=e=>{const t=Zi(Math.atan2(e[1],e[0]));return Bp(t)},P2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Fp,rotateZ:Fp,skewX:e=>Zi(Math.atan(e[1])),skewY:e=>Zi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Bp=e=>(e=e%360,e<0&&(e+=360),e),bx=Fp,Sx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_x=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),T2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Sx,scaleY:_x,scale:e=>(Sx(e)+_x(e))/2,rotateX:e=>Bp(Zi(Math.atan2(e[6],e[5]))),rotateY:e=>Bp(Zi(Math.atan2(-e[2],e[0]))),rotateZ:bx,rotate:bx,skewX:e=>Zi(Math.atan(e[4])),skewY:e=>Zi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vp(e){return e.includes("scale")?1:0}function Up(e,t){if(!e||e==="none")return Vp(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=T2,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=P2,i=a}if(!i)return Vp(t);const s=r[t],o=i[1].split(",").map(j2);return typeof s=="function"?s(o):o[s]}const E2=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Up(n,t)};function j2(e){return parseFloat(e.trim())}const Lo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Do=new Set([...Lo,"pathRotation"]),kx=e=>e===Mo||e===Q,A2=new Set(["x","y","z"]),R2=Lo.filter(e=>!A2.has(e));function I2(e){const t=[];return R2.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ni={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})=>Up(t,"x"),y:(e,{transform:t})=>Up(t,"y")};ni.translateX=ni.x;ni.translateY=ni.y;const ts=new Set;let Wp=!1,Hp=!1,Zp=!1;function WC(){if(Hp){const e=Array.from(ts).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=I2(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)})}Hp=!1,Wp=!1,ts.forEach(e=>e.complete(Zp)),ts.clear()}function HC(){ts.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hp=!0)})}function M2(){Zp=!0,HC(),WC(),Zp=!1}class oy{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?(ts.add(this),Wp||(Wp=!0,ke.read(HC),ke.resolveKeyframes(WC))):(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])}C2(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ts.delete(this)}cancel(){this.state==="scheduled"&&(ts.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const L2=e=>e.startsWith("--");function ZC(e,t,n){L2(t)?e.style.setProperty(t,n):e.style[t]=n}const D2={};function KC(e,t){const n=wC(e);return()=>D2[t]??n()}const z2=KC(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),GC=KC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ma=([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:ma([0,.65,.55,1]),circOut:ma([.55,0,1,.45]),backIn:ma([.31,.01,.66,-.59]),backOut:ma([.33,1.53,.69,.99])};function YC(e,t){if(e)return typeof e=="function"?GC()?BC(e,t):"ease-out":RC(e)?ma(e):Array.isArray(e)?e.map(n=>YC(n,t)||Cx.easeOut):Cx[e]}function N2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=YC(a,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function XC(e){return typeof e=="function"&&"applyToOptions"in e}function $2({type:e,...t}){return XC(e)&&GC()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class QC extends sy{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,fs(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=$2(t);this.animation=N2(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=Fd(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),ZC(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n,r;const i=(t=this.options)==null?void 0:t.element;!this.isPseudoElement&&i!=null&&i.isConnected&&((r=(n=this.animation).commitStyles)==null||r.call(n))}get duration(){var t,n;const r=((n=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:n.call(t).duration)||0;return fn(Number(r))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fn(t)}get time(){return fn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ft(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&z2()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),gn):i(this)}}const qC={anticipate:TC,backInOut:PC,circInOut:jC};function O2(e){return e in qC}function F2(e){typeof e.ease=="string"&&O2(e.ease)&&(e.ease=qC[e.ease])}const Gf=10;class B2 extends QC{constructor(t){F2(t),UC(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 Vc({...o,autoplay:!1}),l=Math.max(Gf,kt.now()-this.startTime),u=or(0,Gf,l-Gf),c=a.sample(l).value,{name:d}=this.options;s&&d&&ZC(s,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Px=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($n.test(e)||e==="0")&&!e.startsWith("url("));function V2(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 U2(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=Px(i,t),a=Px(s,t);return Sl(o===a,`You are trying to animate ${t} from "${i}" to "${s}". "${o?s:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:V2(e)||(n==="spring"||XC(n))&&r}function Kp(e){e.duration=0,e.type="keyframes"}const JC=new Set(["opacity","clipPath","filter","transform"]),W2=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function H2(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&W2.test(e[t]))return!0;return!1}const Z2=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),K2=wC(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function G2(e){var t;const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a,keyframes:l}=e;if(!(((t=n==null?void 0:n.owner)==null?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=n.owner.getProps();return K2()&&r&&(JC.has(r)||Z2.has(r)&&H2(l))&&(r!=="transform"||!c)&&!u&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}const Y2=40;class X2 extends sy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var f;super(),this.stop=()=>{var y,x;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=kt.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},p=(c==null?void 0:c.KeyframeResolver)||oy;this.keyframeResolver=new p(a,(y,x,m)=>this.onKeyframesResolved(y,x,h,!m),l,u,c),(f=this.keyframeResolver)==null||f.scheduleResolve()}onKeyframesResolved(t,n,r,i){var s,o;this.keyframeResolver=void 0;const{name:a,type:l,velocity:u,delay:c,isHandoff:d,onUpdate:f}=r;this.resolvedAt=kt.now();let h=!0;U2(t,a,l,u)||(h=!1,(gi.instantAnimations||!c)&&(f==null||f(Fd(t,r,n))),t[0]=t[t.length-1],Kp(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Y2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=h&&!d&&G2(p),x=(o=(s=p.motionValue)==null?void 0:s.owner)==null?void 0:o.current;let m;if(y)try{m=new B2({...p,element:x})}catch{m=new Vc(p)}else m=new Vc(p);m.finished.then(()=>{this.notifyFinished()}).catch(gn),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),M2()),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 eP(e,t,n,r=0,i=1){const s=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}const Tx=30,Q2=e=>!isNaN(parseFloat(e));class q2{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=kt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=kt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Q2(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 Qg);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=kt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Tx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Tx);return bC(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 Co(e,t){return new q2(e,t)}function tP(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function ay(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?tP(n,e):n}const J2={type:"spring",stiffness:500,damping:25,restSpeed:10},ez=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),tz={type:"keyframes",duration:.8},nz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rz=(e,{keyframes:t})=>t.length>2?tz:Do.has(e)?e.startsWith("scale")?ez(t[1]):J2:nz,iz=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function sz(e){for(const t in e)if(!iz.has(t))return!0;return!1}const ly=(e,t,n,r={},i,s)=>o=>{const a=ay(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ft(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};sz(a)||Object.assign(c,rz(e,c)),c.duration&&(c.duration=Ft(c.duration)),c.repeatDelay&&(c.repeatDelay=Ft(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Kp(c),c.delay===0&&(d=!0)),(gi.instantAnimations||gi.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,Kp(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=Fd(c.keyframes,a);if(f!==void 0){ke.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Vc(c):new X2(c)},oz=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function az(e){const t=oz.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const lz=4;function nP(e,t,n=1){fs(n<=lz,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=az(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return yC(o)?parseFloat(o):o}return ey(i)?nP(i,t,n+1):i}function Ex(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function uy(e,t,n,r){if(typeof t=="function"){const[i,s]=Ex(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Ex(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function ns(e,t,n){const r=e.getProps();return uy(r,t,n!==void 0?n:r.custom,e)}const rP=new Set(["width","height","top","left","right","bottom",...Lo]),Gp=e=>Array.isArray(e);function uz(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Co(n))}function cz(e){return Gp(e)?e[e.length-1]||0:e}function dz(e,t){const n=ns(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=cz(s[o]);uz(e,o,a)}}const dt=e=>!!(e&&e.getVelocity);function fz(e){return!!(dt(e)&&e.add)}function Yp(e,t){const n=e.getValue("willChange");if(fz(n))return n.add(t);if(!n&&gi.WillChange){const r=new gi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function cy(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const hz="framerAppearId",iP="data-"+cy(hz);function sP(e){return e.props[iP]}function pz({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function oP(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?tP(s,l):l;const u=s==null?void 0:s.reduceMotion,c=s==null?void 0:s.skipAnimations;r&&(s=r);const d=[],f=i&&e.animationState&&e.animationState.getState()[i],h=s==null?void 0:s.path;h&&h.animateVisualElement(e,a,s,n,d);for(const p in a){const y=e.getValue(p,e.latestValues[p]??null),x=a[p];if(x===void 0||f&&pz(f,p))continue;const m={delay:n,...ay(s||{},p)};c&&(m.skipAnimations=!0);const v=y.get();if(v!==void 0&&!y.isAnimating()&&!Array.isArray(x)&&x===v&&!m.velocity){ke.update(()=>y.set(x));continue}let w=!1;if(window.MotionHandoffAnimation){const b=sP(e);if(b){const C=window.MotionHandoffAnimation(b,p,ke);C!==null&&(m.startTime=C,w=!0)}}Yp(e,p);const S=u??e.shouldReduceMotion;y.start(ly(p,y,x,S&&rP.has(p)?{type:!1}:m,e,w));const k=y.animation;k&&d.push(k)}if(o){const p=()=>ke.update(()=>{o&&dz(e,o)});d.length?Promise.all(d).then(p):p()}return d}function Xp(e,t,n={}){var r;const i=ns(e,t,n.type==="exit"?(r=e.presenceContext)==null?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(oP(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return mz(e,t,u,c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function mz(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(Xp(l,t,{...o,delay:n+(typeof r=="function"?0:r)+eP(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function gz(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Xp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Xp(e,t,n);else{const i=typeof t=="function"?ns(e,t,n.custom):t;r=Promise.all(oP(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const yz={test:e=>e==="auto",parse:e=>e},aP=e=>t=>t.test(e),lP=[Mo,Q,rr,pr,VD,BD,yz],jx=e=>lP.find(aP(e));function vz(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xC(e):!0}const xz=new Set(["brightness","contrast","saturate","opacity"]);function wz(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ty)||[];if(!r)return e;const i=n.replace(r,"");let s=xz.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const bz=/\b([a-z-]*)\(.*?\)/gu,Qp={...$n,getAnimatableNone:e=>{const t=e.match(bz);return t?t.map(wz).join(" "):e}},qp={...$n,getAnimatableNone:e=>{const t=$n.parse(e);return $n.createTransformer(e)(t.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},Ax={...Mo,transform:Math.round},Sz={rotate:pr,pathRotation:pr,rotateX:pr,rotateY:pr,rotateZ:pr,scale:au,scaleX:au,scaleY:au,scaleZ:au,skew:pr,skewX:pr,skewY:pr,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:al,originX:gx,originY:gx,originZ:Q},Uc={borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,inset:Q,insetBlock:Q,insetBlockStart:Q,insetBlockEnd:Q,insetInline:Q,insetInlineStart:Q,insetInlineEnd:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,paddingBlock:Q,paddingBlockStart:Q,paddingBlockEnd:Q,paddingInline:Q,paddingInlineStart:Q,paddingInlineEnd:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,marginBlock:Q,marginBlockStart:Q,marginBlockEnd:Q,marginInline:Q,marginInlineStart:Q,marginInlineEnd:Q,fontSize:Q,backgroundPositionX:Q,backgroundPositionY:Q,...Sz,zIndex:Ax,fillOpacity:al,strokeOpacity:al,numOctaves:Ax},_z={...Uc,color:Ke,backgroundColor:Ke,outlineColor:Ke,fill:Ke,stroke:Ke,borderColor:Ke,borderTopColor:Ke,borderRightColor:Ke,borderBottomColor:Ke,borderLeftColor:Ke,filter:Qp,WebkitFilter:Qp,mask:qp,WebkitMask:qp},uP=e=>_z[e],kz=new Set([Qp,qp]);function cP(e,t){let n=uP(e);return kz.has(n)||(n=$n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Cz=new Set(["auto","none","0"]);function Pz(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!Cz.has(s)&&ko(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=cP(n,i)}class Tz extends oy{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),ey(d))){const f=nP(d,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!rP.has(r)||t.length!==2)return;const[i,s]=t,o=jx(i),a=jx(s),l=mx(i),u=mx(s);if(l!==u&&ni[r]){this.needsMeasurement=!0;return}if(o!==a)if(kx(o)&&kx(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else ni[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||vz(t[i]))&&r.push(i);r.length&&Pz(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=ni[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ni[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(t=this.removedTransforms)!=null&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function dP(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const Jp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Uu(e){return vC(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:dy}=IC(queueMicrotask,!1),An={x:!1,y:!1};function fP(){return An.x||An.y}function Ez(e){return e==="x"||e==="y"?An[e]?null:(An[e]=!0,()=>{An[e]=!1}):An.x||An.y?null:(An.x=An.y=!0,()=>{An.x=An.y=!1})}function hP(e,t){const n=dP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function jz(e){return!(e.pointerType==="touch"||fP())}function Az(e,t,n={}){const[r,i,s]=hP(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},d=x=>{u&&(u(x),u=void 0),c()},f=x=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(x))},h=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},y=x=>{if(!jz(x))return;l=!1;const m=t(o,x);typeof m=="function"&&(u=m,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",h,i)}),s}const pP=(e,t)=>t?e===t?!0:pP(e,t.parentElement):!1,fy=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Rz=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Iz(e){return Rz.has(e.tagName)||e.isContentEditable===!0}const Mz=new Set(["INPUT","SELECT","TEXTAREA"]);function Lz(e){return Mz.has(e.tagName)||e.isContentEditable===!0}const Wu=new WeakSet;function Rx(e){return t=>{t.key==="Enter"&&e(t)}}function Yf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Dz=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Rx(()=>{if(Wu.has(n))return;Yf(n,"down");const i=Rx(()=>{Yf(n,"up")}),s=()=>Yf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ix(e){return fy(e)&&!fP()}const Mx=new WeakSet;function zz(e,t,n={}){const[r,i,s]=hP(e,n),o=a=>{const l=a.currentTarget;if(!Ix(a)||Mx.has(a))return;Wu.add(l),n.stopPropagation&&Mx.add(a);const u=t(l,a),c=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Wu.has(l)&&Wu.delete(l),Ix(h)&&typeof u=="function"&&u(h,{success:p})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||pP(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Uu(a)&&(a.addEventListener("focus",l=>Dz(l,i)),!Iz(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function hy(e){return vC(e)&&"ownerSVGElement"in e}const Hu=new WeakMap;let Rs;const mP=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:hy(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Nz=mP("inline","width","offsetWidth"),$z=mP("block","height","offsetHeight");function Oz({target:e,borderBoxSize:t}){var n;(n=Hu.get(e))==null||n.forEach(r=>{r(e,{get width(){return Nz(e,t)},get height(){return $z(e,t)}})})}function Fz(e){e.forEach(Oz)}function Bz(){typeof ResizeObserver>"u"||(Rs=new ResizeObserver(Fz))}function Vz(e,t){Rs||Bz();const n=dP(e);return n.forEach(r=>{let i=Hu.get(r);i||(i=new Set,Hu.set(r,i)),i.add(t),Rs==null||Rs.observe(r)}),()=>{n.forEach(r=>{const i=Hu.get(r);i==null||i.delete(t),i!=null&&i.size||Rs==null||Rs.unobserve(r)})}}const Zu=new Set;let Gs;function Uz(){Gs=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Zu.forEach(t=>t(e))},window.addEventListener("resize",Gs)}function Wz(e){return Zu.add(e),Gs||Uz(),()=>{Zu.delete(e),!Zu.size&&typeof Gs=="function"&&(window.removeEventListener("resize",Gs),Gs=void 0)}}function Lx(e,t){return typeof e=="function"?Wz(e):Vz(e,t)}function Hz(e){return hy(e)&&e.tagName==="svg"}const Zz=[...lP,Ke,$n],Kz=e=>Zz.find(aP(e)),Dx=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ys=()=>({x:Dx(),y:Dx()}),zx=()=>({min:0,max:0}),Je=()=>({x:zx(),y:zx()}),Gz=new WeakMap;function Bd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ll(e){return typeof e=="string"||Array.isArray(e)}const py=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],my=["initial",...py];function Vd(e){return Bd(e.animate)||my.some(t=>ll(e[t]))}function gP(e){return!!(Vd(e)||e.variants)}function Yz(e,t,n){for(const r in t){const i=t[r],s=n[r];if(dt(i))e.addValue(r,i);else if(dt(s))e.addValue(r,Co(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,Co(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Wc={current:null},gy={current:!1},Xz=typeof window<"u";function yP(){if(gy.current=!0,!!Xz)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Wc.current=e.matches;e.addEventListener("change",t),t()}else Wc.current=!1}const Nx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Hc={};function vP(e){Hc=e}function Qz(){return Hc}class qz{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=oy,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 h=kt.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ke.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Vd(n),this.isVariantNode=gP(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];u[h]!==void 0&&dt(p)&&p.set(u[h])}}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,Gz.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:(gy.current||yP(),this.shouldReduceMotion=Wc.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(),yi(this.notifyUpdate),yi(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&&JC.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new QC({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:Ft(c)}),f=o(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=Do.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 Hc){const n=Hc[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):Je()}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<Nx.length;r++){const i=Nx[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=Yz(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=Co(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"&&(yC(r)||xC(r))?r=parseFloat(r):!Kz(r)&&$n.test(n)&&(r=cP(t,n)),this.setBaseTarget(t,dt(r)?r.get():r)),dt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=uy(this.props,r,(n=this.presenceContext)==null?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!dt(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Qg),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){dy.render(this.render)}}class xP extends qz{constructor(){super(...arguments),this.KeyframeResolver=Tz}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;dt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ki{constructor(t){this.isMounted=!1,this.node=t}update(){}}function wP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Jz({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eN(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 Xf(e){return e===void 0||e===1}function em({scale:e,scaleX:t,scaleY:n}){return!Xf(e)||!Xf(t)||!Xf(n)}function $i(e){return em(e)||bP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bP(e){return $x(e.x)||$x(e.y)}function $x(e){return e&&e!=="0%"}function Zc(e,t,n){const r=e-n,i=t*r;return n+i}function Ox(e,t,n,r,i){return i!==void 0&&(e=Zc(e,i,r)),Zc(e,n,r)+t}function tm(e,t=0,n=1,r,i){e.min=Ox(e.min,t,n,r,i),e.max=Ox(e.max,t,n,r,i)}function SP(e,{x:t,y:n}){tm(e.x,t.translate,t.scale,t.originPoint),tm(e.y,n.translate,n.scale,n.originPoint)}const Fx=.999999999999,Bx=1.0000000000001;function tN(e,t,n,r=!1){var i;const s=n.length;if(!s)return;t.x=t.y=1;let o,a;for(let l=0;l<s;l++){o=n[l],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Xn(e.x,-o.scroll.offset.x),Xn(e.y,-o.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,SP(e,a)),r&&$i(o.latestValues)&&Ku(e,o.latestValues,(i=o.layout)==null?void 0:i.layoutBox))}t.x<Bx&&t.x>Fx&&(t.x=1),t.y<Bx&&t.y>Fx&&(t.y=1)}function Xn(e,t){e.min+=t,e.max+=t}function Vx(e,t,n,r,i=.5){const s=Se(e.min,e.max,i);tm(e,t,n,s,r)}function Ux(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Ku(e,t,n){const r=n??e;Vx(e.x,Ux(t.x,r.x),t.scaleX,t.scale,t.originX),Vx(e.y,Ux(t.y,r.y),t.scaleY,t.scale,t.originY)}function _P(e,t){return wP(eN(e.getBoundingClientRect(),t))}function nN(e,t,n){const r=_P(e,n),{scroll:i}=t;return i&&(Xn(r.x,i.offset.x),Xn(r.y,i.offset.y)),r}const rN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iN=Lo.length;function sN(e,t,n){let r="",i=!0;for(let o=0;o<iN;o++){const a=Lo[o],l=e[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=Jp(l,Uc[a]);if(!u){i=!1;const d=rN[a]||a;r+=`${d}(${c}) `}n&&(t[a]=c)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${Jp(s,Uc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function yy(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Do.has(l)){o=!0;continue}else if(LC(l)){i[l]=u;continue}else{const c=Jp(u,Uc[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=sN(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}function kP(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 Wx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const sa={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Q.test(e))e=parseFloat(e);else return e;const n=Wx(e,t.target.x),r=Wx(e,t.target.y);return`${n}% ${r}%`}},oN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=$n.parse(e);if(i.length>5)return r;const s=$n.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=Se(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},nm={borderRadius:{...sa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sa,borderTopRightRadius:sa,borderBottomLeftRadius:sa,borderBottomRightRadius:sa,boxShadow:oN};function CP(e,{layout:t,layoutId:n}){return Do.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!nm[e]||e==="opacity")}function vy(e,t,n){var r;const i=e.style,s=t==null?void 0:t.style,o={};if(!i)return o;for(const a in i)(dt(i[a])||s&&dt(s[a])||CP(a,e)||((r=n==null?void 0:n.getValue(a))==null?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}function aN(e){return window.getComputedStyle(e)}class lN extends xP{constructor(){super(...arguments),this.type="html",this.renderInstance=kP}readValueFromInstance(t,n){var r;if(Do.has(n))return(r=this.projection)!=null&&r.isProjecting?Vp(n):E2(t,n);{const i=aN(t),s=(LC(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return _P(t,n)}build(t,n,r){yy(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return vy(t,n,r)}}const uN={offset:"stroke-dashoffset",array:"stroke-dasharray"},cN={offset:"strokeDashoffset",array:"strokeDasharray"};function dN(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?uN:cN;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const fN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function PP(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(yy(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const h of fN)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&dN(d,i,s,o,!1)}const TP=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"]),EP=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hN(e,t,n,r){kP(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(TP.has(i)?i:cy(i),t.attrs[i])}function jP(e,t,n){const r=vy(e,t,n);for(const i in e)if(dt(e[i])||dt(t[i])){const s=Lo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class pN extends xP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Do.has(n)){const r=uP(n);return r&&r.default||0}return n=TP.has(n)?n:cy(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return jP(t,n,r)}build(t,n,r){PP(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){hN(t,n,r,i)}mount(t){this.isSVGTag=EP(t.tagName),super.mount(t)}}const mN=my.length;function AP(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?AP(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<mN;n++){const r=my[n],i=e.props[r];(ll(i)||i===!1)&&(t[r]=i)}return t}function RP(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 gN=[...py].reverse(),yN=py.length;function vN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>gz(e,n,r)))}function xN(e){let t=vN(e),n=Hx(),r=!0,i=!1;const s=u=>(c,d)=>{var f;const h=ns(e,d,u==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:y,...x}=h;c={...c,...x,...y}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=AP(e.parent)||{},f=[],h=new Set;let p={},y=1/0;for(let m=0;m<yN;m++){const v=gN[m],w=n[v],S=c[v]!==void 0?c[v]:d[v],k=ll(S),b=v===u?w.isActive:null;b===!1&&(y=m);let C=S===d[v]&&S!==c[v]&&k;if(C&&(r||i)&&e.manuallyAnimateOnMount&&(C=!1),w.protectedKeys={...p},!w.isActive&&b===null||!S&&!w.prevProp||Bd(S)||typeof S=="boolean")continue;if(v==="exit"&&w.isActive&&b!==!0){w.prevResolvedValues&&(p={...p,...w.prevResolvedValues});continue}const T=wN(w.prevProp,S);let A=T||v===u&&w.isActive&&!C&&k||m>y&&k,E=!1;const I=Array.isArray(S)?S:[S];let M=I.reduce(s(v),{});b===!1&&(M={});const{prevResolvedValues:F={}}=w,B={...F,...M},$=Z=>{A=!0,h.has(Z)&&(E=!0,h.delete(Z)),w.needsAnimating[Z]=!0;const D=e.getValue(Z);D&&(D.liveStyle=!1)};for(const Z in B){const D=M[Z],V=F[Z];if(p.hasOwnProperty(Z))continue;let _=!1;Gp(D)&&Gp(V)?_=!RP(D,V)||T:_=D!==V,_?D!=null?$(Z):h.add(Z):D!==void 0&&h.has(Z)?$(Z):w.protectedKeys[Z]=!0}w.prevProp=S,w.prevResolvedValues=M,w.isActive&&(p={...p,...M}),(r||i)&&e.blockInitialAnimation&&(A=!1);const G=C&&T;A&&(!G||E)&&f.push(...I.map(Z=>{const D={type:v};if(typeof Z=="string"&&(r||i)&&!G&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,_=ns(V,Z);if(V.enteringChildren&&_){const{delayChildren:z}=_.transition||{};D.delay=eP(V.enteringChildren,e,z)}}return{animation:Z,options:D}}))}if(h.size){const m={};if(typeof c.initial!="boolean"){const v=ns(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}h.forEach(v=>{const w=e.getBaseTarget(v),S=e.getValue(v);S&&(S.liveStyle=!0),m[v]=w??null}),f.push({animation:m})}let x=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,i=!1,x?t(f):Promise.resolve()}function l(u,c){var d;if(n[u].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(h=>{var p;return(p=h.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const f=a(u);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Hx(),i=!0}}}function wN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!RP(t,e):!1}function Mi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hx(){return{animate:Mi(!0),whileInView:Mi(),whileHover:Mi(),whileTap:Mi(),whileDrag:Mi(),whileFocus:Mi(),exit:Mi()}}function rm(e,t){e.min=t.min,e.max=t.max}function Tn(e,t){rm(e.x,t.x),rm(e.y,t.y)}function Zx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const IP=1e-4,bN=1-IP,SN=1+IP,MP=.01,_N=0-MP,kN=0+MP;function Ct(e){return e.max-e.min}function CN(e,t,n){return Math.abs(e-t)<=n}function Kx(e,t,n,r=.5){e.origin=r,e.originPoint=Se(t.min,t.max,e.origin),e.scale=Ct(n)/Ct(t),e.translate=Se(n.min,n.max,e.origin)-e.originPoint,(e.scale>=bN&&e.scale<=SN||isNaN(e.scale))&&(e.scale=1),(e.translate>=_N&&e.translate<=kN||isNaN(e.translate))&&(e.translate=0)}function ja(e,t,n,r){Kx(e.x,t.x,n.x,r?r.originX:void 0),Kx(e.y,t.y,n.y,r?r.originY:void 0)}function Gx(e,t,n,r=0){const i=r?Se(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+Ct(t)}function PN(e,t,n,r){Gx(e.x,t.x,n.x,r==null?void 0:r.x),Gx(e.y,t.y,n.y,r==null?void 0:r.y)}function Yx(e,t,n,r=0){const i=r?Se(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Ct(t)}function Kc(e,t,n,r){Yx(e.x,t.x,n.x,r==null?void 0:r.x),Yx(e.y,t.y,n.y,r==null?void 0:r.y)}function Xx(e,t,n,r,i){return e-=t,e=Zc(e,1/n,r),i!==void 0&&(e=Zc(e,1/i,r)),e}function TN(e,t=0,n=1,r=.5,i,s=e,o=e){if(rr.test(t)&&(t=parseFloat(t),t=Se(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Se(s.min,s.max,r);e===s&&(a-=t),e.min=Xx(e.min,t,n,a,i),e.max=Xx(e.max,t,n,a,i)}function Qx(e,t,[n,r,i],s,o){TN(e,t[n],t[r],t[i],t.scale,s,o)}const EN=["x","scaleX","originX"],jN=["y","scaleY","originY"];function qx(e,t,n,r){Qx(e.x,t,EN,n?n.x:void 0,r?r.x:void 0),Qx(e.y,t,jN,n?n.y:void 0,r?r.y:void 0)}function Jx(e){return e.translate===0&&e.scale===1}function LP(e){return Jx(e.x)&&Jx(e.y)}function ew(e,t){return e.min===t.min&&e.max===t.max}function AN(e,t){return ew(e.x,t.x)&&ew(e.y,t.y)}function tw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function DP(e,t){return tw(e.x,t.x)&&tw(e.y,t.y)}function nw(e){return Ct(e.x)/Ct(e.y)}function rw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Zn(e){return[e("x"),e("y")]}function RN(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,pathRotation:d,rotateX:f,rotateY:h,skewX:p,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const zP=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],IN=zP.length,iw=e=>typeof e=="string"?parseFloat(e):e,sw=e=>typeof e=="number"||Q.test(e);function MN(e,t,n,r,i,s){i?(e.opacity=Se(0,n.opacity??1,LN(r)),e.opacityExit=Se(t.opacity??1,0,DN(r))):s&&(e.opacity=Se(t.opacity??1,n.opacity??1,r));for(let o=0;o<IN;o++){const a=zP[o];let l=ow(t,a),u=ow(n,a);l===void 0&&u===void 0||(l||(l=0),u||(u=0),l===0||u===0||sw(l)===sw(u)?(e[a]=Math.max(Se(iw(l),iw(u),r),0),(rr.test(u)||rr.test(l))&&(e[a]+="%")):e[a]=u)}(t.rotate||n.rotate)&&(e.rotate=Se(t.rotate||0,n.rotate||0,r))}function ow(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const LN=NP(0,.5,EC),DN=NP(.5,.95,gn);function NP(e,t,n){return r=>r<e?0:r>t?1:n(ol(e,t,r))}function zN(e,t,n){const r=dt(e)?e:Co(e);return r.start(ly("",r,t,n)),r.animation}function ul(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const NN=(e,t)=>e.depth-t.depth;class $N{constructor(){this.children=[],this.isDirty=!1}add(t){Xg(this.children,t),this.isDirty=!0}remove(t){$c(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(NN),this.isDirty=!1,this.children.forEach(t)}}function ON(e,t){const n=kt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(yi(r),e(s-t))};return ke.setup(r,!0),()=>yi(r)}function Gu(e){return dt(e)?e.get():e}class FN{constructor(){this.members=[]}add(t){Xg(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 r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:o}=t.options;(s===void 0||s!==o)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),(r=t.root)!=null&&r.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,s,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(i=t.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||o.call(s)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Yu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Qf=["","X","Y","Z"],BN=1e3;let VN=0;function qf(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function $P(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=sP(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&&$P(r)}function OP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},o=t==null?void 0:t()){this.id=VN++,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(HN),this.nodes.forEach(QN),this.nodes.forEach(qN),this.nodes.forEach(ZN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new $N)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Qg),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const a=this.eventHandlers.get(s);a&&a.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=hy(s)&&!Hz(s),this.instance=s;const{layoutId:o,layout:a,visualElement:l}=this.options;if(l&&!l.current&&l.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||o)&&(this.isLayoutDirty=!0),e){let u,c=0;const d=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{c=window.innerWidth}),e(s,()=>{const f=window.innerWidth;f!==c&&(c=f,this.root.updateBlockedByResize=!0,u&&u(),u=ON(d,250),Yu.hasAnimatedSinceResize&&(Yu.hasAnimatedSinceResize=!1,this.nodes.forEach(uw)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&l&&(o||a)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||l.getDefaultTransition()||r$,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=l.getProps(),x=!this.targetLayout||!DP(this.targetLayout,f),m=!c&&d;if(this.options.layoutRoot||this.resumeFrom||m||c&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...ay(h,"layout"),onPlay:p,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,m,v.path)}else c||uw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yi(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(JN),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&$P(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const c=this.path[u];c.shouldResetTransform=!0,(typeof c.latestValues.x=="string"||typeof c.latestValues.y=="string")&&(c.isLayoutDirty=!0),c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:o,layout:a}=this.options;if(o===void 0&&!a)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const o=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),o&&this.nodes.forEach(GN),this.nodes.forEach(aw);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(lw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(YN),this.nodes.forEach(XN),this.nodes.forEach(UN),this.nodes.forEach(WN)):this.nodes.forEach(lw),this.clearAllSnapshots();const s=kt.now();lt.delta=or(0,1e3/60,s-lt.timestamp),lt.timestamp=s,lt.isProcessing=!0,Uf.update.process(lt),Uf.preRender.process(lt),Uf.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,dy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KN),this.sharedNodes.forEach(e$)}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&&!Ct(this.snapshot.measuredBox.x)&&!Ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let a=0;a<this.path.length;a++)this.path[a].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Je()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o&&this.instance){const a=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:a,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:a}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!LP(this.projectionDelta),a=this.getTransformTemplate(),l=a?a(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;s&&this.instance&&(o||$i(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let a=this.removeElementScroll(o);return s&&(a=this.removeTransform(a)),i$(a),{animationId:this.root.animationId,measuredBox:o,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:o}=this.options;if(!o)return Je();const a=o.measureViewportBox();if(!((s=this.scroll)!=null&&s.wasRoot||this.path.some(s$))){const{scroll:l}=this.root;l&&(Xn(a.x,l.offset.x),Xn(a.y,l.offset.y))}return a}removeElementScroll(s){var o;const a=Je();if(Tn(a,s),(o=this.scroll)!=null&&o.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&Tn(a,s),Xn(a.x,c.offset.x),Xn(a.y,c.offset.y))}return a}applyTransform(s,o=!1,a){var l,u;const c=a||Je();Tn(c,s);for(let d=0;d<this.path.length;d++){const f=this.path[d];!o&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Xn(c.x,-f.scroll.offset.x),Xn(c.y,-f.scroll.offset.y)),$i(f.latestValues)&&Ku(c,f.latestValues,(l=f.layout)==null?void 0:l.layoutBox)}return $i(this.latestValues)&&Ku(c,this.latestValues,(u=this.layout)==null?void 0:u.layoutBox),c}removeTransform(s){var o;const a=Je();Tn(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!$i(u.latestValues))continue;let c;u.instance&&(em(u.latestValues)&&u.updateSnapshot(),c=Je(),Tn(c,u.measurePageBox())),qx(a,u.latestValues,(o=u.snapshot)==null?void 0:o.layoutBox,c)}return $i(this.latestValues)&&qx(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var o;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(o=this.parent)!=null&&o.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:c}=this.options;if(!this.layout||!(u||c))return;this.resolvedRelativeTargetAt=lt.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Je(),this.targetWithTransforms=Je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Tn(this.target,this.layout.layoutBox),SP(this.target,this.targetDelta)):Tn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||em(this.parent.latestValues)||bP(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,o,a){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),Kc(this.relativeTargetOrigin,o,a,this.options.layoutAnchor||void 0),Tn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var s;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(s=this.parent)!=null&&s.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===lt.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Tn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;tN(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=Je());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Zx(this.prevProjectionDelta.x,this.projectionDelta.x),Zx(this.prevProjectionDelta.y,this.projectionDelta.y)),ja(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!rw(this.projectionDelta.x,this.prevProjectionDelta.x)||!rw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ys(),this.projectionDelta=Ys(),this.projectionDeltaWithTransform=Ys()}setAnimationOrigin(s,o=!1,a){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Ys();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=Je(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=h!==p,x=this.getStack(),m=!x||x.members.length<=1,v=!!(y&&!m&&this.options.crossfade===!0&&!this.path.some(n$));this.animationProgress=0;let w;const S=a==null?void 0:a.interpolateProjection(s);this.mixTargetDelta=k=>{const b=k/1e3,C=S==null?void 0:S(b);C?(d.x.translate=C.x,d.x.scale=Se(s.x.scale,1,b),d.x.origin=s.x.origin,d.x.originPoint=s.x.originPoint,d.y.translate=C.y,d.y.scale=Se(s.y.scale,1,b),d.y.origin=s.y.origin,d.y.originPoint=s.y.originPoint):(cw(d.x,s.x,b),cw(d.y,s.y,b)),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),t$(this.relativeTarget,this.relativeTargetOrigin,f,b),w&&AN(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Je()),Tn(w,this.relativeTarget)),y&&(this.animationValues=c,MN(c,u,this.latestValues,b,v,m)),C&&C.rotate!==void 0&&(this.animationValues||(this.animationValues=c),this.animationValues.pathRotation=C.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var o,a,l;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(l=(a=this.resumingFrom)==null?void 0:a.currentAnimation)==null||l.stop(),this.pendingAnimation&&(yi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{Yu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Co(0)),this.motionValue.jump(0,!1),this.currentAnimation=zN(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),s.onUpdate&&s.onUpdate(u)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(BN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:a,layout:l,latestValues:u}=s;if(!(!o||!a||!l)){if(this!==s&&this.layout&&l&&FP(this.options.animationType,this.layout.layoutBox,l.layoutBox)){a=this.target||Je();const c=Ct(this.layout.layoutBox.x);a.x.min=s.target.x.min,a.x.max=a.x.min+c;const d=Ct(this.layout.layoutBox.y);a.y.min=s.target.y.min,a.y.max=a.y.min+d}Tn(o,a),Ku(o,u),ja(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new FN),this.sharedNodes.get(s).add(o);const a=o.options.initialPromotionConfig;o.promote({transition:a?a.transition:void 0,preserveFollowOpacity:a&&a.shouldPreserveFollowOpacity?a.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())==null?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())==null?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:a}={}){const l=this.getStack();l&&l.promote(this,a),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:a}=s;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(o=!0),!o)return;const l={};a.z&&qf("z",s,l,this.animationValues);for(let u=0;u<Qf.length;u++)qf(`rotate${Qf[u]}`,s,l,this.animationValues),qf(`skew${Qf[u]}`,s,l,this.animationValues);s.render();for(const u in l)s.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);s.scheduleRender()}applyProjectionStyles(s,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const a=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Gu(o==null?void 0:o.pointerEvents)||"",s.transform=a?a(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Gu(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!$i(this.latestValues)&&(s.transform=a?a({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let c=RN(this.projectionDeltaWithTransform,this.treeScale,u);a&&(c=a(u,c)),s.transform=c;const{x:d,y:f}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,l.animationValues?s.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const h in nm){if(u[h]===void 0)continue;const{correct:p,applyTo:y,isCSSVariable:x}=nm[h],m=c==="none"?u[h]:p(u[h],l);if(y){const v=y.length;for(let w=0;w<v;w++)s[y[w]]=m}else x?this.options.visualElement.renderState.vars[h]=m:s[h]=m}this.options.layoutId&&(s.pointerEvents=l===this?Gu(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(aw),this.root.sharedNodes.clear()}}}function UN(e){e.updateLayout()}function WN(e){var t;const n=((t=e.resumeFrom)==null?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;if(s==="size")Zn(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],h=Ct(f);f.min=r[d].min,f.max=f.min+h});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";rm(o?n.measuredBox[d]:n.layoutBox[d],r[d])}else FP(s,n.layoutBox,r)&&Zn(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],h=Ct(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=Ys();ja(a,r,n.layoutBox);const l=Ys();o?ja(l,e.applyTransform(i,!0),n.measuredBox):ja(l,r,n.layoutBox);const u=!LP(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=e.options.layoutAnchor||void 0,y=Je();Kc(y,n.layoutBox,f.layoutBox,p);const x=Je();Kc(x,r,h.layoutBox,p),DP(y,x)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function HN(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 ZN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function KN(e){e.clearSnapshot()}function aw(e){e.clearMeasurements()}function GN(e){e.isLayoutDirty=!0,e.updateLayout()}function lw(e){e.isLayoutDirty=!1}function YN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function XN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function uw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function QN(e){e.resolveTargetDelta()}function qN(e){e.calcProjection()}function JN(e){e.resetSkewAndRotation()}function e$(e){e.removeLeadSnapshot()}function cw(e,t,n){e.translate=Se(t.translate,0,n),e.scale=Se(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function dw(e,t,n,r){e.min=Se(t.min,n.min,r),e.max=Se(t.max,n.max,r)}function t$(e,t,n,r){dw(e.x,t.x,n.x,r),dw(e.y,t.y,n.y,r)}function n$(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const r$={duration:.45,ease:[.4,0,.1,1]},fw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),hw=fw("applewebkit/")&&!fw("chrome/")?Math.round:gn;function pw(e){e.min=hw(e.min),e.max=hw(e.max)}function i$(e){pw(e.x),pw(e.y)}function FP(e,t,n){return e==="position"||e==="preserve-aspect"&&!CN(nw(t),nw(n),.2)}function s$(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const o$=OP({attachResizeListener:(e,t)=>ul(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}),Jf={current:void 0},BP=OP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jf.current){const e=new o$({});e.mount(window),e.setOptions({layoutScroll:!0}),Jf.current=e}return Jf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xy=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function mw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function a$(...e){return t=>{let n=!1;const r=e.map(i=>{const s=mw(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():mw(e[i],null)}}}}function l$(...e){return P.useCallback(a$(...e),e)}class u$ extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Uu(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Uu(r)&&r.offsetWidth||0,s=Uu(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 c$({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){var o;const a=P.useId(),l=P.useRef(null),u=P.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=P.useContext(xy),d=((o=e.props)==null?void 0:o.ref)??(e==null?void 0:e.ref),f=l$(l,d);return P.useInsertionEffect(()=>{const{width:h,height:p,top:y,left:x,right:m,bottom:v,direction:w}=u.current;if(t||s===!1||!l.current||!h||!p)return;const S=w==="rtl",k=n==="left"?S?`right: ${m}`:`left: ${x}`:S?`left: ${x}`:`right: ${m}`,b=r==="bottom"?`bottom: ${v}`:`top: ${y}`;l.current.dataset.motionPopId=a;const C=document.createElement("style");c&&(C.nonce=c);const T=i??document.head;return T.appendChild(C),C.sheet&&C.sheet.insertRule(`
|
|
65
|
+
[data-motion-pop-id="${a}"] {
|
|
66
|
+
position: absolute !important;
|
|
67
|
+
width: ${h}px !important;
|
|
68
|
+
height: ${p}px !important;
|
|
69
|
+
${k}px !important;
|
|
70
|
+
${b}px !important;
|
|
71
|
+
}
|
|
72
|
+
`),()=>{var A;(A=l.current)==null||A.removeAttribute("data-motion-pop-id"),T.contains(C)&&T.removeChild(C)}},[t]),R.jsx(u$,{isPresent:t,childRef:l,sizeRef:u,pop:s,children:s===!1?e:P.cloneElement(e,{ref:f})})}const d$=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=Yg(f$),d=P.useId();let f=!0,h=P.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:p=>{c.set(p,!0);for(const y of c.values())if(!y)return;r&&r()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,r]);return s&&f&&(h={...h}),P.useMemo(()=>{c.forEach((p,y)=>c.set(y,!1))},[n]),P.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=R.jsx(c$,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),R.jsx(Od.Provider,{value:h,children:e})};function f$(){return new Map}function VP(e=!0){const t=P.useContext(Od);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=P.useId();P.useEffect(()=>{if(e)return i(s)},[e]);const o=P.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const lu=e=>e.key||"";function gw(e){const t=[];return P.Children.forEach(e,n=>{P.isValidElement(n)&&t.push(n)}),t}const h$=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,d]=VP(o),f=P.useMemo(()=>gw(e),[e]),h=o&&!c?[]:f.map(lu),p=P.useRef(!0),y=P.useRef(f),x=Yg(()=>new Map),m=P.useRef(new Set),[v,w]=P.useState(f),[S,k]=P.useState(f);gC(()=>{p.current=!1,y.current=f;for(let T=0;T<S.length;T++){const A=lu(S[T]);h.includes(A)?(x.delete(A),m.current.delete(A)):x.get(A)!==!0&&x.set(A,!1)}},[S,h.length,h.join("-")]);const b=[];if(f!==v){let T=[...f];for(let A=0;A<S.length;A++){const E=S[A],I=lu(E);h.includes(I)||(T.splice(A,0,E),b.push(E))}return s==="wait"&&b.length&&(T=b),k(gw(T)),w(f),null}const{forceRender:C}=P.useContext(Gg);return R.jsx(R.Fragment,{children:S.map(T=>{const A=lu(T),E=o&&!c?!1:f===S||h.includes(A),I=()=>{if(m.current.has(A))return;if(x.has(A))m.current.add(A),x.set(A,!0);else return;let M=!0;x.forEach(F=>{F||(M=!1)}),M&&(C==null||C(),k(y.current),o&&(d==null||d()),r&&r())};return R.jsx(d$,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:E?void 0:I,anchorX:a,anchorY:l,children:T},A)})})},UP=P.createContext({strict:!1}),yw={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 vw=!1;function p$(){if(vw)return;const e={};for(const t in yw)e[t]={isEnabled:n=>yw[t].some(r=>!!n[r])};vP(e),vw=!0}function WP(){return p$(),Qz()}function m$(e){const t=WP();for(const n in e)t[n]={...t[n],...e[n]};vP(t)}const g$=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 Gc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||g$.has(e)}let HP=e=>!Gc(e);function y$(e){typeof e=="function"&&(HP=t=>t.startsWith("on")?!Gc(t):e(t))}try{y$(require("@emotion/is-prop-valid").default)}catch{}function v$(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||dt(e[i])||(HP(i)||n===!0&&Gc(i)||!t&&!Gc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Ud=P.createContext({});function x$(e,t){if(Vd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ll(n)?n:void 0,animate:ll(r)?r:void 0}}return e.inherit!==!1?t:{}}function w$(e){const{initial:t,animate:n}=x$(e,P.useContext(Ud));return P.useMemo(()=>({initial:t,animate:n}),[xw(t),xw(n)])}function xw(e){return Array.isArray(e)?e.join(" "):e}const wy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ZP(e,t,n){for(const r in t)!dt(t[r])&&!CP(r,n)&&(e[r]=t[r])}function b$({transformTemplate:e},t){return P.useMemo(()=>{const n=wy();return yy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function S$(e,t){const n=e.style||{},r={};return ZP(r,n,e),Object.assign(r,b$(e,t)),r}function _$(e,t){const n={},r=S$(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 KP=()=>({...wy(),attrs:{}});function k$(e,t,n,r){const i=P.useMemo(()=>{const s=KP();return PP(s,t,EP(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};ZP(s,e.style,e),i.style={...s,...i.style}}return i}const C$=["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 by(e){return typeof e!="string"||e.includes("-")?!1:!!(C$.indexOf(e)>-1||/[A-Z]/u.test(e))}function P$(e,t,n,{latestValues:r},i,s=!1,o){const a=(o??by(e)?k$:_$)(t,r,i,e),l=v$(t,typeof e=="string",s),u=e!==P.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=P.useMemo(()=>dt(c)?c.get():c,[c]);return P.createElement(e,{...u,children:d})}function T$({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:E$(n,r,i,e),renderState:t()}}function E$(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=Gu(s[f]);let{initial:o,animate:a}=e;const l=Vd(e),u=gP(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Bd(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=uy(e,f[h]);if(p){const{transitionEnd:y,transition:x,...m}=p;for(const v in m){let w=m[v];if(Array.isArray(w)){const S=c?w.length-1:0;w=w[S]}w!==null&&(i[v]=w)}for(const v in y)i[v]=y[v]}}}return i}const GP=e=>(t,n)=>{const r=P.useContext(Ud),i=P.useContext(Od),s=()=>T$(e,t,r,i);return n?s():Yg(s)},j$=GP({scrapeMotionValuesFromProps:vy,createRenderState:wy}),A$=GP({scrapeMotionValuesFromProps:jP,createRenderState:KP}),R$=Symbol.for("motionComponentSymbol");function I$(e,t,n){const r=P.useRef(n);P.useInsertionEffect(()=>{r.current=n});const i=P.useRef(null);return P.useCallback(s=>{var o;s&&((o=e.onMount)==null||o.call(e,s)),t&&(s?t.mount(s):t.unmount());const a=r.current;if(typeof a=="function")if(s){const l=a(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):a(s);else a&&(a.current=s)},[t])}const YP=P.createContext({});function Is(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function M$(e,t,n,r,i,s){var o,a;const{visualElement:l}=P.useContext(Ud),u=P.useContext(UP),c=P.useContext(Od),d=P.useContext(xy),f=d.reducedMotion,h=d.skipAnimations,p=P.useRef(null),y=P.useRef(!1);r=r||u.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:l,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f,skipAnimations:h,isSVG:s}),y.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const x=p.current,m=P.useContext(YP);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&L$(p.current,n,i,m);const v=P.useRef(!1);P.useInsertionEffect(()=>{x&&v.current&&x.update(n,c)});const w=n[iP],S=P.useRef(!!w&&typeof window<"u"&&!((o=window.MotionHandoffIsComplete)!=null&&o.call(window,w))&&((a=window.MotionHasOptimisedAnimation)==null?void 0:a.call(window,w)));return gC(()=>{y.current=!0,x&&(v.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),S.current&&x.animationState&&x.animationState.animateChanges())}),P.useEffect(()=>{x&&(!S.current&&x.animationState&&x.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,w)}),S.current=!1),x.enteringChildren=void 0)}),x}function L$(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:XP(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Is(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function XP(e){if(e)return e.options.allowProjection!==!1?e.projection:XP(e.parent)}function eh(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&m$(r);const s=n?n==="svg":by(e),o=s?A$:j$;function a(u,c){let d;const f={...P.useContext(xy),...u,layoutId:D$(u)},{isStatic:h}=f,p=w$(u),y=o(u,h);if(!h&&typeof window<"u"){z$();const x=N$(f);d=x.MeasureLayout,p.visualElement=M$(e,y,f,i,x.ProjectionNode,s)}return R.jsxs(Ud.Provider,{value:p,children:[d&&p.visualElement?R.jsx(d,{visualElement:p.visualElement,...f}):null,P$(e,u,I$(y,p.visualElement,c),y,h,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=P.forwardRef(a);return l[R$]=e,l}function D$({layoutId:e}){const t=P.useContext(Gg).id;return t&&e!==void 0?t+"-"+e:e}function z$(e,t){P.useContext(UP).strict}function N$(e){const t=WP(),{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 $$(e,t){if(typeof Proxy>"u")return eh;const n=new Map,r=(s,o)=>eh(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,eh(o,void 0,e,t)),n.get(o))})}const O$=(e,t)=>t.isSVG??by(e)?new pN(t):new lN(t,{allowProjection:e!==P.Fragment});class F$ extends ki{constructor(t){super(t),t.animationState||(t.animationState=xN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Bd(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 B$=0;class V$ extends ki{constructor(){super(...arguments),this.id=B$++,this.isExitComplete=!1}update(){var t;if(!this.node.presenceContext)return;const{isPresent:n,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||n===i)return;if(n&&i===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=ns(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...d}=l;for(const f in d)(t=this.node.getValue(f))==null||t.jump(d[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!n);r&&!n&&s.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const U$={animation:{Feature:F$},exit:{Feature:V$}};function Pl(e){return{point:{x:e.pageX,y:e.pageY}}}const W$=e=>t=>fy(t)&&e(t,Pl(t));function Aa(e,t,n,r){return ul(e,t,W$(n),r)}const QP=({current:e})=>e?e.ownerDocument.defaultView:null,ww=(e,t)=>Math.abs(e-t);function H$(e,t){const n=ww(e.x,t.x),r=ww(e.y,t.y);return Math.sqrt(n**2+r**2)}const bw=new Set(["auto","scroll"]);class qP{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=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=uu(this.lastRawMoveEventInfo,this.transformPagePoint));const h=th(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=H$(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!y)return;const{point:x}=h,{timestamp:m}=lt;this.history.push({...x,timestamp:m});const{onStart:v,onMove:w}=this.handlers;p||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=uu(p,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:m}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=th(h.type==="pointercancel"?this.lastMoveEventInfo:uu(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(h,v),x&&x(h,v)},!fy(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=Pl(t),u=uu(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=lt;this.history=[{...c,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,th(u,this.history)),this.removeListeners=_l(Aa(this.contextWindow,"pointermove",this.handlePointerMove),Aa(this.contextWindow,"pointerup",this.handlePointerUp),Aa(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(bw.has(r.overflowX)||bw.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(),yi(this.updatePoint)}}function uu(e,t){return t?{point:t(e.point)}:e}function Sw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function th({point:e},t){return{point:e,delta:Sw(e,JP(t)),offset:Sw(e,Z$(t)),velocity:K$(t,.1)}}function Z$(e){return e[0]}function JP(e){return e[e.length-1]}function K$(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=JP(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ft(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ft(t)*2&&(r=e[1]);const s=fn(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 G$(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Se(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Se(n,e,r.max):Math.min(e,n)),e}function _w(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 Y$(e,{top:t,left:n,bottom:r,right:i}){return{x:_w(e.x,n,i),y:_w(e.y,t,r)}}function kw(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 X$(e,t){return{x:kw(e.x,t.x),y:kw(e.y,t.y)}}function Q$(e,t){let n=.5;const r=Ct(e),i=Ct(t);return i>r?n=ol(t.min,t.max-r,e.min):r>i&&(n=ol(e.min,e.max-i,t.min)),or(0,1,n)}function q$(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 im=.35;function J$(e=im){return e===!1?e=0:e===!0&&(e=im),{x:Cw(e,"left","right"),y:Cw(e,"top","bottom")}}function Cw(e,t,n){return{min:Pw(e,t),max:Pw(e,n)}}function Pw(e,t){return typeof e=="number"?e:e[t]||0}const eO=new WeakMap;class tO{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=Je(),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(Pl(d).point),this.stopAnimation()},o=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:y}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ez(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zn(m=>{let v=this.getAxisMotionValue(m).get()||0;if(rr.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[m];S&&(v=Ct(S)*(parseFloat(v)/100))}}this.originPoint[m]=v}),y&&ke.update(()=>y(d,f),!1,!0),Yp(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:y,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:m}=f;if(p&&this.currentDirection===null){this.currentDirection=rO(m),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,m),this.updateAxis("y",f.point,m),this.visualElement.render(),x&&ke.update(()=>x(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new qP(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:QP(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||!cu(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=G$(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)==null?void 0:t.layout,s=this.constraints;n&&Is(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Y$(i.layoutBox,n):this.constraints=!1,this.elastic=J$(r),s!==this.constraints&&!Is(n)&&i&&this.constraints&&!this.hasMutatedConstraints&&Zn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=q$(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Is(t))return!1;const r=t.current;fs(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const s=nN(r,i.root,this.visualElement.getTransformPagePoint());let o=X$(i.layout.layoutBox,s);if(n){const a=n(Jz(o));this.hasMutatedConstraints=!!a,a&&(o=wP(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Zn(c=>{if(!cu(c,n,this.currentDirection))return;let d=l&&l[c]||{};(o===!0||o===c)&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Yp(this.visualElement,t),r.start(ly(t,r,0,n,this.visualElement,!1))}stopAnimation(){Zn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`;return this.visualElement.getProps()[n]||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Zn(n=>{const{drag:r}=this.getProps();if(!cu(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-Se(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Is(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Q$({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(),Zn(o=>{if(!cu(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Se(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;eO.set(this.visualElement,this);const t=this.visualElement.current,n=Aa(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),f=u.target,h=f!==t&&Lz(f);c&&d&&!h&&this.start(u)});let r;const i=()=>{const{dragConstraints:u}=this.getProps();Is(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=nO(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ke.read(i);const a=ul(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=u[d].translate,f.set(f.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=im,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Tw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function nO(e,t,n){const r=Lx(e,Tw(n)),i=Lx(t,Tw(n));return()=>{r(),i()}}function cu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function rO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class iO extends ki{constructor(t){super(t),this.removeGroupControls=gn,this.removeListeners=gn,this.controls=new tO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gn}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 nh=e=>(t,n)=>{e&&ke.update(()=>e(t,n),!1,!0)};class sO extends ki{constructor(){super(...arguments),this.removePointerDownListener=gn}onPointerDown(t){this.session=new qP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:QP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:nh(t),onStart:nh(n),onMove:nh(r),onEnd:(s,o)=>{delete this.session,i&&ke.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Aa(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 rh=!1;class oO extends P.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),rh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Yu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),rh=!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(),dy.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;rh=!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 eT(e){const[t,n]=VP(),r=P.useContext(Gg);return R.jsx(oO,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(YP),isPresent:t,safeToRemove:n})}const aO={pan:{Feature:sO},drag:{Feature:iO,ProjectionNode:BP,MeasureLayout:eT}};function Ew(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,Pl(t)))}class lO extends ki{mount(){const{current:t}=this.node;t&&(this.unmount=Az(t,(n,r)=>(Ew(this.node,r,"Start"),i=>Ew(this.node,i,"End"))))}unmount(){}}class uO extends ki{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=_l(ul(this.node.current,"focus",()=>this.onFocus()),ul(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ke.postRender(()=>s(t,Pl(t)))}class cO extends ki{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=zz(t,(i,s)=>(jw(this.node,s,"Start"),(o,{success:a})=>jw(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const sm=new WeakMap,ih=new WeakMap,dO=e=>{const t=sm.get(e.target);t&&t(e)},fO=e=>{e.forEach(dO)};function hO({root:e,...t}){const n=e||document;ih.has(n)||ih.set(n,{});const r=ih.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(fO,{root:e,...t})),r[i]}function pO(e,t,n){const r=hO(t);return sm.set(e,n),r.observe(e),()=>{sm.delete(e),r.unobserve(e)}}const mO={some:0,all:1};class gO extends ki{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var t;(t=this.stopObserver)==null||t.call(this);const{viewport:n={}}=this.node.getProps(),{root:r,margin:i,amount:s="some",once:o}=n,a={root:r?r.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:mO[s]},l=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=c?d:f;h&&h(u)};this.stopObserver=pO(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(yO(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function yO({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const vO={inView:{Feature:gO},tap:{Feature:cO},focus:{Feature:uO},hover:{Feature:lO}},xO={layout:{ProjectionNode:BP,MeasureLayout:eT}},wO={...U$,...vO,...aO,...xO},Aw=$$(wO,O$);function bO(){!gy.current&&yP();const[e]=P.useState(Wc.current);return e}function ae(...e){return bD(UL(e))}const SO={height:32,lineHeight:"32px",padding:"0 16px"};function _O(e){const t=Hd((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=8+Math.round(n*6),i=50,s=50,o=46,a=2+n*14,l=[];for(let u=0;u<r;u++){const c=u/r*Math.PI*2+(t()-.5)*.15*n,d=o+(t()-.5)*a*2;l.push({x:i+Math.cos(c)*d,y:s+Math.sin(c)*d})}return Wd(l)}function kO(e,t){const n=Hd(e+"-ring"),r=Math.max(0,Math.min(1,t??.5)),i=8+Math.round(r*6),s=50,o=50,a=49,l=2+r*14,u=[];for(let c=0;c<i;c++){const d=c/i*Math.PI*2+(n()-.5)*.15*r,f=a+(n()-.5)*l*2;u.push({x:s+Math.cos(d)*f,y:o+Math.sin(d)*f})}return Wd(u)}function CO(e){const t=Hd((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=3+Math.round(n*3),i=2,s=3+n*10,o=[],a=[{ax:i,ay:i,bx:100-i,by:i},{ax:100-i,ay:i,bx:100-i,by:100-i},{ax:100-i,ay:100-i,bx:i,by:100-i},{ax:i,ay:100-i,bx:i,by:i}];for(const l of a)for(let u=0;u<r;u++){const c=(u+.5)/r,d=l.ax+(l.bx-l.ax)*c,f=l.ay+(l.by-l.ay)*c,h=l.bx-l.ax,p=l.by-l.ay,y=Math.sqrt(h*h+p*p)||1,x=-p/y,m=h/y,v=(t()-.5)*s*2;o.push({x:d+x*v,y:f+m*v})}return Wd(o)}function PO(e,t){const n=Hd(e+"-ring"),r=Math.max(0,Math.min(1,t??.5)),i=3+Math.round(r*3),s=0,o=3+r*10,a=[],l=[{ax:s,ay:s,bx:100-s,by:s},{ax:100-s,ay:s,bx:100-s,by:100-s},{ax:100-s,ay:100-s,bx:s,by:100-s},{ax:s,ay:100-s,bx:s,by:s}];for(const u of l)for(let c=0;c<i;c++){const d=(c+.5)/i,f=u.ax+(u.bx-u.ax)*d,h=u.ay+(u.by-u.ay)*d,p=u.bx-u.ax,y=u.by-u.ay,x=Math.sqrt(p*p+y*y)||1,m=-y/x,v=p/x,w=(n()-.5)*o*2;a.push({x:f+m*w,y:h+v*w})}return Wd(a)}function Wd(e){const t=e.length;if(t<3)return"";let n=`M ${Dr(e[0].x)} ${Dr(e[0].y)}`;for(let r=0;r<t;r++){const i=e[(r-1+t)%t],s=e[r],o=e[(r+1)%t],a=e[(r+2)%t],l=s.x+(o.x-i.x)/6,u=s.y+(o.y-i.y)/6,c=o.x-(a.x-s.x)/6,d=o.y-(a.y-s.y)/6;n+=` C ${Dr(l)} ${Dr(u)}, ${Dr(c)} ${Dr(d)}, ${Dr(o.x)} ${Dr(o.y)}`}return n+=" Z",n}function Dr(e){return e.toFixed(2)}function Hd(e){let t=typeof e=="string"?TO(e):e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function TO(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 Tl(e){return P.useMemo(()=>{const t=Math.random();return{blob:_O({seed:t,wobble:e}),ring:kO(t,e)}},[e])}const EO="button-module__button___Z331g",jO="button-module__blobBg___QQFzf",AO="button-module__blobFill___XwLjV",RO="button-module__blobRing___567UW",IO="button-module__isActive___FXNSJ",MO="button-module__primary___ppbyq",LO="button-module__secondary___esy5L",DO="button-module__ghost___NisA0",zO="button-module__danger___Wnvuq",NO="button-module__chalkboard___d3Nqb",$O="button-module__small___u7y8a",OO="button-module__medium___HBIAj",FO="button-module__large___RPzNy",BO="button-module__fullWidth___H0P0F",VO="button-module__iconLeft___s60SZ",UO="button-module__iconRight___75eFu",WO="button-module__label___pXAyM",an={button:EO,blobBg:jO,blobFill:AO,blobRing:RO,isActive:IO,primary:MO,secondary:LO,ghost:DO,danger:zO,chalkboard:NO,small:$O,medium:OO,large:FO,fullWidth:BO,iconLeft:VO,iconRight:UO,label:WO};function ge({variant:e="primary",size:t="medium",icon:n,iconRight:r,fullWidth:i=!1,wobble:s=.5,isActive:o=!1,children:a,className:l,...u}){const c=Tl(s);return R.jsxs("button",{type:"button",className:ae(an.button,an[e],an[t],e==="chalkboard"&&an.chalkboard,o&&an.isActive,i&&an.fullWidth,l),...u,children:[R.jsxs("svg",{className:an.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[R.jsx("path",{d:c.blob,className:an.blobFill}),R.jsx("path",{d:c.ring,className:an.blobRing})]}),n&&R.jsx("span",{className:an.iconLeft,children:n}),R.jsx("span",{className:an.label,children:a}),r&&R.jsx("span",{className:an.iconRight,children:r})]})}function Sy(e){return{blue:e.accentBlue,green:e.accentGreen,amber:e.accentAmber,rose:e.accentRose,slate:e.accentSlate}}const _y={paper:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E")`,parchment:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='par'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.48 0 0 0 0 0.35 0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23par)' opacity='1'/%3E%3C/svg%3E")`,kraft:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.50 0 0 0 0 0.35 0 0 0 0 0.20 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)' opacity='1'/%3E%3C/svg%3E")`,white:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.97 0 0 0 0 0.96 0 0 0 0 0.95 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)' opacity='1'/%3E%3C/svg%3E")`,speckle:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='speckle'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23speckle)' opacity='0.06'/%3E%3C/svg%3E")`,canvas:"repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(61, 53, 43, 0.06) 3px, rgba(61, 53, 43, 0.06) 3.8px, transparent 3.8px, transparent 6.5px, rgba(61, 53, 43, 0.035) 6.5px, rgba(61, 53, 43, 0.035) 7px), repeating-linear-gradient(90deg, transparent, transparent 4px, rgba(61, 53, 43, 0.045) 4px, rgba(61, 53, 43, 0.045) 4.8px, transparent 4.8px, transparent 7.5px, rgba(61, 53, 43, 0.025) 7.5px, rgba(61, 53, 43, 0.025) 8px)",chalkboard:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.15 0 0 0 0 0.28 0 0 0 0 0.20 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='1'/%3E%3C/svg%3E")`},ky={paper:"#FAF8F0",parchment:"#F5F1E6",kraft:"#E5DBC4",white:"#FDFCF8",speckle:"#FAF8F0",canvas:"#F0EAD8",chalkboard:"#142e22"},HO={blue:"rgba(168, 200, 216, 0.35)",brown:"rgba(164, 144, 120, 0.35)",black:"rgba(61, 53, 43, 0.15)"};function Er(e){const t=e.texture??"paper",n=e.ruledType??"none",r=e.ruledColor??"blue",i=_y[t],s=ky[t],o=HO[r];return n==="none"?{backgroundColor:s,backgroundImage:i,backgroundRepeat:"repeat",backgroundSize:"200px 200px"}:n==="lines"?{backgroundColor:s,backgroundImage:`${i}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${o} 31px, ${o} 32px)`,backgroundRepeat:"repeat, repeat",backgroundSize:"200px 200px, 100% 32px"}:{backgroundColor:s,backgroundImage:`${i}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${o} 31px, ${o} 32px), repeating-linear-gradient(90deg, transparent, transparent 31px, ${o} 31px, ${o} 32px)`,backgroundRepeat:"repeat, repeat, repeat",backgroundSize:"200px 200px, 100% 32px, 32px 32px"}}const ZO="page-module__page___-uHnG",KO="page-module__roundedTop___KQ4dD",GO="page-module__withAccent___lsv-m",YO="page-module__accentBlue___XxbMV",XO="page-module__accentGreen___Ne6Q8",QO="page-module__accentAmber___kLAwa",qO="page-module__accentRose___O9ZbZ",JO="page-module__accentSlate___xCB66",Xu={page:ZO,roundedTop:KO,withAccent:GO,accentBlue:YO,accentGreen:XO,accentAmber:QO,accentRose:qO,accentSlate:JO},eF=Sy(Xu);function tT({children:e,className:t,style:n,withTexture:r=!0,texture:i,withAccent:s=!1,accentColor:o="blue",rounded:a="all"}){const l=i?Er(i):r?Er({texture:"white",ruledType:"lines",ruledColor:"blue"}):{backgroundColor:"var(--pui-bg-base)"};return R.jsx("div",{className:ae(Xu.page,s&&Xu.withAccent,s&&eF[o],a==="top"&&Xu.roundedTop,t),style:{...l,...n},children:e})}const Ki={stackPanelWidth:480,navIslandBottom:"1.5rem",navIslandHeight:"4.5rem",contentGap:"1.5rem"},nT={4:"1rem"},tF="layout-module__layout___O1aWi",nF="layout-module__header___I-kxe",rF="layout-module__headerLeft___JChJQ",iF="layout-module__headerTitles___aqSUG",sF="layout-module__headerTitle___wvr39",oF="layout-module__headerSubtitle___6f5BD",aF="layout-module__headerActions___adC12",lF="layout-module__mobileToggle___4WpVG",uF="layout-module__body___tywNf",cF="layout-module__mobileOverlay___tzbBC",dF="layout-module__sidebar___8VKGq",fF="layout-module__sidebarOpen___47rtr",hF="layout-module__sidebarInner___tq2X6",pF="layout-module__logoArea___RLnC0",mF="layout-module__logoText___pAmfV",gF="layout-module__nav___FxcrZ",yF="layout-module__main___9z7bu",vF="layout-module__navIslandFixed___H4TwP",xF="layout-module__content___jL-VB",wF="layout-module__contentWithPage___vVdfN",bF="layout-module__footer___LyakU",SF="layout-module__footerText___8BYxc",Fe={layout:tF,header:nF,headerLeft:rF,headerTitles:iF,headerTitle:sF,headerSubtitle:oF,headerActions:aF,mobileToggle:lF,body:uF,mobileOverlay:cF,sidebar:dF,sidebarOpen:fF,sidebarInner:hF,logoArea:pF,logoText:mF,nav:gF,main:yF,navIslandFixed:vF,content:xF,contentWithPage:wF,footer:bF,footerText:SF};function _F(e){return!e||e==="plain"?{backgroundColor:"var(--pui-bg-base)"}:typeof e=="object"&&"image"in e?{backgroundImage:`url(${e.image})`,backgroundRepeat:"repeat",backgroundSize:"200px 200px"}:typeof e=="object"&&"texture"in e?Er({texture:e.texture,ruledType:e.ruledType,ruledColor:e.ruledColor}):Er({texture:e})}function kF({children:e,showHeader:t=!0,showFooter:n=!1,showSidebar:r=!0,showPage:i=!0,background:s="paper",title:o,subtitle:a,headerActions:l,navigationItems:u=[],activeItemId:c,onNavigate:d,logo:f,footerContent:h,navigationIsland:p,style:y,bleedBottom:x=!0,routeKey:m,stackOpen:v}){const[w,S]=P.useState(!1),k=bO(),b=_F(s),C=r&&u.length>0;return R.jsxs("div",{className:Fe.layout,style:{...b,...y},children:[t&&R.jsxs("header",{className:Fe.header,children:[R.jsxs("div",{className:Fe.headerLeft,children:[C&&R.jsx("button",{type:"button",className:Fe.mobileToggle,onClick:()=>S(!0),"aria-label":"Open navigation",children:R.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:R.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),R.jsxs("div",{className:Fe.headerTitles,children:[o&&R.jsx("h1",{className:Fe.headerTitle,children:o}),a&&R.jsx("span",{className:Fe.headerSubtitle,children:a})]})]}),l&&R.jsx("div",{className:Fe.headerActions,children:l})]}),R.jsxs("div",{className:Fe.body,children:[w&&R.jsx("div",{className:Fe.mobileOverlay,onClick:()=>S(!1),"aria-hidden":"true"}),C&&R.jsx("aside",{className:ae(Fe.sidebar,w&&Fe.sidebarOpen),role:"navigation","aria-label":"Main navigation",children:R.jsxs("div",{className:Fe.sidebarInner,children:[R.jsx("div",{className:Fe.logoArea,children:f||R.jsx("span",{className:Fe.logoText,children:"Paper UI"})}),R.jsx("nav",{className:Fe.nav,children:u.map(T=>{const A=T.id===c;return R.jsx(ge,{variant:"ghost",size:"small",isActive:A,onClick:()=>{d==null||d(T),S(!1)},"aria-current":A?"page":void 0,icon:T.icon,style:SO,children:T.label},T.id)})})]})}),R.jsx("div",{className:Fe.main,children:R.jsx("main",{className:i?Fe.contentWithPage:Fe.content,style:x?{paddingBottom:0}:void 0,children:(()=>{const T=m!==void 0?R.jsx(h$,{mode:"wait",children:R.jsx(Aw.div,{initial:k?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:k?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},style:{height:"100%"},children:e},m)}):e;return i?R.jsx(tT,{withTexture:!0,rounded:x?"top":"all",style:x&&p?{paddingBottom:`calc(${Ki.navIslandBottom} + ${Ki.navIslandHeight} + ${nT[4]})`}:void 0,children:T}):T})()})})]}),p&&R.jsx("div",{className:Fe.navIslandFixed,children:v!==void 0?R.jsx(Aw.div,{animate:{x:v?`-${Ki.stackPanelWidth/2}px`:0},transition:{duration:k?0:.3,ease:[.4,0,.2,1]},children:p}):p}),n&&R.jsx("footer",{className:Fe.footer,children:h||R.jsx("p",{className:Fe.footerText,children:"Paper UI — Natural Materials Component Library"})})]})}const CF="island-module__island___Yd2ej",PF="island-module__chalkboard___yK6AH",Rw={island:CF,chalkboard:PF};function TF({children:e,variant:t="default",className:n}){return R.jsx("div",{className:ae(Rw.island,t==="chalkboard"&&Rw.chalkboard,n),role:"region","aria-label":"Controls",children:e})}const EF="checkbox-module__wrapper___uLYMI",jF="checkbox-module__blobFill___mPJSR",AF="checkbox-module__input___Ptgt7",RF="checkbox-module__blobBg___bw3sn",IF="checkbox-module__labelLeft___-vAmH",MF="checkbox-module__box___yAh-r",LF="checkbox-module__checkmark___tTyBz",DF="checkbox-module__indeterminateLine___IosI-",zF="checkbox-module__boxWrapper___byjoS",NF="checkbox-module__icon___RO-yn",$F="checkbox-module__labelText___bAnLr",OF="checkbox-module__chalkboard___sv6SL",Gt={wrapper:EF,blobFill:jF,input:AF,blobBg:RF,labelLeft:IF,box:MF,checkmark:LF,indeterminateLine:DF,boxWrapper:zF,icon:NF,labelText:$F,chalkboard:OF};function FF({label:e,labelPosition:t="right",indeterminate:n=!1,wobble:r=.4,variant:i="default",className:s,checked:o,onChange:a,...l}){const u=P.useId(),c=Tl(r);return R.jsxs("label",{className:ae(Gt.wrapper,t==="left"&&Gt.labelLeft,i==="chalkboard"&&Gt.chalkboard,s),htmlFor:u,children:[R.jsxs("span",{className:Gt.boxWrapper,children:[R.jsx("input",{id:u,type:"checkbox",className:Gt.input,checked:o,onChange:a,...l}),R.jsx("svg",{className:Gt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:R.jsx("path",{d:c.blob,className:Gt.blobFill})}),R.jsx("span",{className:Gt.box,"aria-hidden":"true",children:n?R.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Gt.icon,children:R.jsx("line",{x1:"4",y1:"10",x2:"16",y2:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:Gt.indeterminateLine})}):R.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Gt.icon,children:R.jsx("path",{d:"M4 10 L8 14 L16 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:Gt.checkmark})})})]}),e&&R.jsx("span",{className:Gt.labelText,children:e})]})}const BF="icon-button-module__iconButton___avg6i",VF="icon-button-module__blobBg___466Vy",UF="icon-button-module__blobFill___FTN1g",WF="icon-button-module__blobRing___hRdQb",HF="icon-button-module__isActive___XlvtM",ZF="icon-button-module__icon___h204x",KF="icon-button-module__ghost___Wbxog",GF="icon-button-module__danger___p0Xz5",YF="icon-button-module__small___bPnCU",XF="icon-button-module__medium___nOxPf",QF="icon-button-module__large___UBU5z",qF="icon-button-module__chalkboard___mi0sQ",hr={iconButton:BF,blobBg:VF,blobFill:UF,blobRing:WF,isActive:HF,icon:ZF,default:"icon-button-module__default___9frNR",ghost:KF,danger:GF,small:YF,medium:XF,large:QF,chalkboard:qF};function yn({icon:e,variant:t="default",size:n="medium",label:r,wobble:i=.5,isActive:s=!1,className:o,...a}){const l=Tl(i);return R.jsxs("button",{type:"button",className:ae(hr.iconButton,hr[t],t==="chalkboard"&&hr.chalkboard,hr[n],s&&hr.isActive,o),"aria-label":r,title:r,...a,children:[R.jsxs("svg",{className:hr.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[R.jsx("path",{d:l.blob,className:hr.blobFill}),R.jsx("path",{d:l.ring,className:hr.blobRing})]}),R.jsx("span",{className:hr.icon,children:e})]})}const JF="stamp-module__stamp___5qaNY",e3="stamp-module__small___BBlBg",t3="stamp-module__medium___HG2YD",n3="stamp-module__large___aUT0I",r3="stamp-module__blobBg___Mdrdd",i3="stamp-module__blobFill___QyCeB",s3="stamp-module__label___T89iH",o3="stamp-module__chalkboard___syI4T",Cs={stamp:JF,small:e3,medium:t3,large:n3,blobBg:r3,blobFill:i3,label:s3,chalkboard:o3};function ct({children:e,size:t="medium",fillColor:n="transparent",textColor:r,wobble:i=.3,variant:s="default",className:o}){const a=Tl(i);return R.jsxs("span",{className:ae(Cs.stamp,Cs[t],s==="chalkboard"&&Cs.chalkboard,o),style:r?{color:r}:void 0,children:[R.jsx("svg",{className:Cs.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:R.jsx("path",{d:a.blob,className:Cs.blobFill,style:{fill:n}})}),R.jsx("span",{className:Cs.label,children:e})]})}const a3="copy-button-module__copyButton___-hTo4",l3="copy-button-module__dark___O45N-",u3="copy-button-module__chalkboard___hW4aw",c3="copy-button-module__copied___XlHFr",du={copyButton:a3,dark:l3,chalkboard:u3,copied:c3};function Iw({text:e,variant:t="light",className:n,...r}){const[i,s]=P.useState(!1),o=P.useCallback(async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),1500)}catch(a){console.error("Failed to copy:",a)}},[e]);return R.jsx("button",{type:"button",onClick:o,className:ae(du.copyButton,t==="dark"&&du.dark,t==="chalkboard"&&du.chalkboard,i&&du.copied,n),...r,children:i?"Copied!":"Copy"})}const d3="code-block-module__codeBlock___dq28o",f3="code-block-module__header___42Fek",h3="code-block-module__relative___oO-zy",p3="code-block-module__copyOverlay___PjAuq",m3="code-block-module__pre___zXzLZ",g3="code-block-module__chalkboard___bdo9J",y3="code-block-module__chalkboardHeader___3RiVd",v3="code-block-module__chalkboardPre___iRBFR",zr={codeBlock:d3,header:f3,relative:h3,copyOverlay:p3,pre:m3,chalkboard:g3,chalkboardHeader:y3,chalkboardPre:v3};function x3({code:e,filename:t,variant:n="default"}){return R.jsxs("div",{className:ae(zr.codeBlock,n==="chalkboard"&&zr.chalkboard),children:[t&&R.jsxs("div",{className:ae(zr.header,n==="chalkboard"&&zr.chalkboardHeader),children:[R.jsx("span",{children:t}),R.jsx(Iw,{text:e,variant:n==="chalkboard"?"chalkboard":"light"})]}),!t&&R.jsx("div",{className:zr.relative,children:R.jsx("div",{className:zr.copyOverlay,children:R.jsx(Iw,{text:e,variant:n==="chalkboard"?"chalkboard":"dark"})})}),R.jsx("pre",{className:ae(zr.pre,n==="chalkboard"&&zr.chalkboardPre),children:R.jsx("code",{children:e})})]})}function w3(e,t){return Er(t||(e==="chalkboard"?{texture:"chalkboard",ruledType:"none"}:{texture:"paper",ruledType:"none"}))}const b3="table-module__tableWrapper___gc3Y3",S3="table-module__toolbar___zhCel",_3="table-module__search___zIBk2",k3="table-module__searchIcon___ayhK8",C3="table-module__searchInput___PqsEG",P3="table-module__toolbarActions___EX6qS",T3="table-module__tableScroll___1gvc4",E3="table-module__table___tdU5g",j3="table-module__th___GQbKk",A3="table-module__td___WktB5",R3="table-module__tr___xeZno",I3="table-module__expandTh___uxkR4",M3="table-module__expandTd___VoBRC",L3="table-module__expandIcon___8V45X",D3="table-module__expandable___R7o2l",z3="table-module__expandedRow___1TbTQ",N3="table-module__expandedCell___sKAaD",$3="table-module__boardScroll___Y1yqm",O3="table-module__board___kFAI-",F3="table-module__boardColumn___-W9bP",B3="table-module__boardColumnHeader___kY3Fj",V3="table-module__accentBlue___PEJ1V",U3="table-module__accentGreen___wJ53r",W3="table-module__accentAmber___Iezjv",H3="table-module__accentRose___W8zxc",Z3="table-module__accentSlate___oUZCX",K3="table-module__boardColumnLabel___JBEed",G3="table-module__boardColumnCount___Pkpiq",Y3="table-module__boardColumnBody___uAgRF",X3="table-module__boardRow___C1P60",Q3="table-module__boardEmpty___IKv2W",q3="table-module__chalkboardWrapper___KjY5r",J3="table-module__chalkboard___v0m3A",fe={tableWrapper:b3,toolbar:S3,search:_3,searchIcon:k3,searchInput:C3,toolbarActions:P3,tableScroll:T3,table:E3,th:j3,td:A3,tr:R3,expandTh:I3,expandTd:M3,expandIcon:L3,expandable:D3,expandedRow:z3,expandedCell:N3,boardScroll:$3,board:O3,boardColumn:F3,boardColumnHeader:B3,accentBlue:V3,accentGreen:U3,accentAmber:W3,accentRose:H3,accentSlate:Z3,boardColumnLabel:K3,boardColumnCount:G3,boardColumnBody:Y3,boardRow:X3,boardEmpty:Q3,chalkboardWrapper:q3,chalkboard:J3},eB=Sy(fe);function El({data:e=[],columns:t=[],board:n,variant:r="paper",texture:i,toolbar:s,expandable:o,showExpandColumn:a=!0,rowClassName:l,className:u}){const c=w3(r,i),d=!!s,[f,h]=P.useState(new Set),p=m=>{h(v=>{const w=new Set(v);return w.has(m)?w.delete(m):w.add(m),w})},y=!!(o&&a),x=y?t.length+1:t.length;return R.jsxs("div",{className:ae(fe.tableWrapper,r==="chalkboard"&&fe.chalkboardWrapper,u),style:c,children:[d&&R.jsxs("div",{className:fe.toolbar,children:[s.search&&R.jsxs("div",{className:fe.search,children:[R.jsx(tB,{className:fe.searchIcon}),R.jsx("input",{type:"text",className:fe.searchInput,placeholder:s.search.placeholder??"Search...",value:s.search.value??"",onChange:m=>{var v,w;return(w=(v=s.search)==null?void 0:v.onChange)==null?void 0:w.call(v,m.target.value)}})]}),s.actions&&R.jsx("div",{className:fe.toolbarActions,children:typeof s.actions=="function"?s.actions(r):s.actions})]}),n?R.jsx("div",{className:fe.boardScroll,children:R.jsx("div",{className:fe.board,children:n.map(m=>R.jsxs("div",{className:fe.boardColumn,children:[R.jsxs("div",{className:ae(fe.boardColumnHeader,r==="chalkboard"&&fe.chalkboard,m.accent&&eB[m.accent]),children:[R.jsx("span",{className:fe.boardColumnLabel,children:m.label}),R.jsx("span",{className:fe.boardColumnCount,children:m.items.length})]}),R.jsx("div",{className:fe.boardColumnBody,children:m.items.length===0?R.jsx("div",{className:fe.boardEmpty,children:m.emptyLabel??"empty"}):m.items.map((v,w)=>R.jsx("div",{className:ae(fe.boardRow,r==="chalkboard"&&fe.chalkboard),children:m.renderItem(v,w,r)},m.getKey?m.getKey(v,w):w))})]},m.key))})}):R.jsx("div",{className:fe.tableScroll,children:R.jsxs("table",{className:ae(fe.table,r==="chalkboard"&&fe.chalkboard),children:[R.jsxs("colgroup",{children:[y&&R.jsx("col",{style:{width:"48px"}}),t.map(m=>R.jsx("col",{style:m.width?{width:`${m.width*32}px`}:void 0},m.key))]}),R.jsx("thead",{children:R.jsxs("tr",{children:[y&&R.jsx("th",{className:ae(fe.th,fe.expandTh),"aria-label":"Expand"}),t.map(m=>R.jsx("th",{className:fe.th,children:m.header},m.key))]})}),R.jsx("tbody",{children:e.map((m,v)=>{const w=o==null?void 0:o.render(m,v,r),S=!!w,k=S&&f.has(v);return R.jsxs(P.Fragment,{children:[R.jsxs("tr",{className:ae(fe.tr,S&&fe.expandable,l==null?void 0:l(m,v)),onClick:()=>S&&p(v),children:[y&&R.jsx("td",{className:ae(fe.td,fe.expandTd),children:S&&R.jsx("span",{className:fe.expandIcon,"aria-hidden":"true",children:k?"▼":"▶"})}),t.map(b=>R.jsx("td",{className:fe.td,children:b.cell(m,v,r)},b.key))]}),k&&R.jsx("tr",{className:fe.expandedRow,children:R.jsx("td",{colSpan:x,className:fe.expandedCell,children:w})})]},v)})})]})})]})}function tB({className:e}){return R.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[R.jsx("circle",{cx:"11",cy:"11",r:"8"}),R.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}const nB="card-module__borderLayer___WSpJq",rB="card-module__elevated___uhWj9",iB="card-module__textureLayer___Kcofz",sB="card-module__small___HXUTr",oB="card-module__withAccent___2t7bV",aB="card-module__accentBlue___a1KIq",lB="card-module__accentGreen___RNWoA",uB="card-module__accentAmber___uMhom",cB="card-module__accentRose___VPI3t",dB="card-module__accentSlate___-l4jE",fB="card-module__chalkboard___bQ48O",Ms={borderLayer:nB,default:"card-module__default___glPy-",elevated:rB,textureLayer:iB,small:sB,withAccent:oB,accentBlue:aB,accentGreen:lB,accentAmber:uB,accentRose:cB,accentSlate:dB,chalkboard:fB},hB=Sy(Ms);function lo({children:e,variant:t="default",size:n="default",texture:r="parchment",accent:i=!1,accentColor:s="blue",className:o}){return R.jsx("div",{className:ae(Ms.borderLayer,Ms[t],Ms[n],i&&Ms.withAccent,i&&hB[s],o),children:R.jsx("div",{className:Ms.textureLayer,style:t==="chalkboard"?void 0:{backgroundColor:ky[r],backgroundImage:_y[r],backgroundSize:"200px 200px",backgroundRepeat:"repeat"},children:e})})}const pB="input-module__wrapper___xaEw6",mB="input-module__label___lu7R1",gB="input-module__input___h7K-F",yB="input-module__small___SkByh",vB="input-module__medium___0QPuV",xB="input-module__large___zGwRu",wB="input-module__error___QDqga",bB="input-module__helperText___njeLH",SB="input-module__helperError___qDBpD",_B="input-module__chalkboard___Xh-5s",Nr={wrapper:pB,label:mB,input:gB,small:yB,medium:vB,large:xB,error:wB,helperText:bB,helperError:SB,chalkboard:_B};function vi({label:e,helperText:t,error:n=!1,size:r="medium",variant:i="default",className:s,id:o,...a}){const l=o??`input-${Math.random().toString(36).slice(2,9)}`;return R.jsxs("div",{className:ae(Nr.wrapper,i==="chalkboard"&&Nr.chalkboard,s),children:[e&&R.jsx("label",{htmlFor:l,className:Nr.label,children:e}),R.jsx("input",{id:l,className:ae(Nr.input,Nr[r],n&&Nr.error),...a}),t&&R.jsx("span",{className:ae(Nr.helperText,n&&Nr.helperError),children:t})]})}const kB="select-module__wrapper___Hc5F3",CB="select-module__label___ay-3s",PB="select-module__nativeSelect___UA2d-",TB="select-module__trigger___xMYHi",EB="select-module__open___w3mbZ",jB="select-module__triggerLabel___ihpER",AB="select-module__placeholder___0VOFP",RB="select-module__small___iU9W9",IB="select-module__chevron___0dCTg",MB="select-module__medium___B-XBN",LB="select-module__large___iII2c",DB="select-module__chevronOpen___cFOYe",zB="select-module__error___P5RBk",NB="select-module__dropdown___Q-uK3",$B="select-module__slideDown___sT374",OB="select-module__option___vNnue",FB="select-module__optionDisabled___ex2zq",BB="select-module__optionSelected___tAFjn",VB="select-module__optionHighlighted___zYQLq",UB="select-module__helperText___r5gyn",WB="select-module__helperError___ydSPT",HB="select-module__chalkboard___sXBw8",He={wrapper:kB,label:CB,nativeSelect:PB,trigger:TB,open:EB,triggerLabel:jB,placeholder:AB,small:RB,chevron:IB,medium:MB,large:LB,chevronOpen:DB,error:zB,dropdown:NB,slideDown:$B,option:OB,optionDisabled:FB,optionSelected:BB,optionHighlighted:VB,helperText:UB,helperError:WB,chalkboard:HB};function uo({label:e,helperText:t,error:n=!1,size:r="medium",variant:i="default",options:s,placeholder:o,value:a,defaultValue:l,onChange:u,disabled:c=!1,width:d,texture:f,withTexture:h=!1,className:p}){const y=P.useId(),[x,m]=P.useState(!1),[v,w]=P.useState(-1),[S,k]=P.useState(l??""),[b,C]=P.useState(null),T=P.useRef(null),A=P.useRef(null),E=a!==void 0,I=E?a:S,M=s.find(_=>_.value===I),F=(M==null?void 0:M.label)??o??"Select...",B=P.useCallback(()=>{if(c)return;m(!0);const _=s.findIndex(z=>z.value===I);w(_>=0?_:0)},[c,s,I]),$=P.useCallback(()=>{m(!1),w(-1)},[]),G=P.useCallback(_=>{var z;_.disabled||(E||k(_.value),u==null||u(_.value),$(),(z=T.current)==null||z.focus())},[E,u,$]),Z=P.useCallback(_=>{if(!c)switch(_.key){case"Enter":case" ":_.preventDefault(),x&&v>=0?G(s[v]):B();break;case"Escape":_.preventDefault(),x&&$();break;case"ArrowDown":_.preventDefault(),x?w(z=>{let Y=z+1;for(;Y<s.length&&s[Y].disabled;)Y++;return Y<s.length?Y:z}):B();break;case"ArrowUp":_.preventDefault(),x?w(z=>{let Y=z-1;for(;Y>=0&&s[Y].disabled;)Y--;return Y>=0?Y:z}):B();break;case"Home":if(_.preventDefault(),x){let z=0;for(;z<s.length&&s[z].disabled;)z++;z<s.length&&w(z)}break;case"End":if(_.preventDefault(),x){let z=s.length-1;for(;z>=0&&s[z].disabled;)z--;z>=0&&w(z)}break}},[c,x,v,s,B,$,G]);P.useEffect(()=>{if(!x)return;const _=z=>{var Y,j;const ie=z.target;(Y=T.current)!=null&&Y.contains(ie)||(j=A.current)!=null&&j.contains(ie)||$()};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[x,$]),P.useEffect(()=>{if(!x||v<0||!A.current)return;const _=A.current.querySelector(`[data-option-index="${v}"]`);_==null||_.scrollIntoView({block:"nearest"})},[x,v]),P.useEffect(()=>{if(!x){C(null);return}const _=()=>{T.current&&C(T.current.getBoundingClientRect())};return _(),document.addEventListener("scroll",_,{capture:!0,passive:!0}),window.addEventListener("resize",_,{passive:!0}),()=>{document.removeEventListener("scroll",_,{capture:!0}),window.removeEventListener("resize",_)}},[x]);const D=f?Er(f):h?Er({texture:"paper",ruledType:"none"}):void 0,V=D?{"--pui-texture":D.backgroundImage,"--pui-fill":D.backgroundColor}:void 0;return R.jsxs("div",{className:ae(He.wrapper,i==="chalkboard"&&He.chalkboard,p),style:d?{width:typeof d=="number"?`${d}px`:d}:void 0,children:[e&&R.jsx("label",{htmlFor:y,className:He.label,children:e}),R.jsxs("select",{id:y,className:He.nativeSelect,value:I,onChange:_=>u==null?void 0:u(_.target.value),disabled:c,"aria-hidden":"true",tabIndex:-1,children:[o&&R.jsx("option",{value:"",children:o}),s.map(_=>R.jsx("option",{value:_.value,disabled:_.disabled,children:_.label},_.value))]}),R.jsxs("button",{ref:T,type:"button",role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-controls":x?`${y}-listbox`:void 0,"aria-activedescendant":x&&v>=0?`${y}-option-${v}`:void 0,className:ae(He.trigger,He[r],n&&He.error,x&&He.open,c&&He.disabled),onClick:()=>x?$():B(),onKeyDown:Z,disabled:c,children:[R.jsx("span",{className:ae(He.triggerLabel,!M&&He.placeholder),children:F}),R.jsx(ZB,{className:ae(He.chevron,x&&He.chevronOpen)})]}),x&&b&&Og.createPortal(R.jsx("div",{ref:A,id:`${y}-listbox`,role:"listbox",className:He.dropdown,style:{...V,position:"fixed",top:b.bottom+6,left:b.left,width:b.width,zIndex:1e3},onKeyDown:_=>{var z;_.key==="Escape"&&(_.preventDefault(),$(),(z=T.current)==null||z.focus())},children:s.map((_,z)=>R.jsx("div",{id:`${y}-option-${z}`,role:"option","aria-selected":_.value===I,"data-option-index":z,className:ae(He.option,_.value===I&&He.optionSelected,z===v&&He.optionHighlighted,_.disabled&&He.optionDisabled),onClick:Y=>{Y.stopPropagation(),G(_)},onMouseEnter:()=>w(z),children:_.label},_.value))}),document.body),t&&R.jsx("span",{className:ae(He.helperText,n&&He.helperError),children:t})]})}function ZB({className:e}){return R.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:R.jsx("polyline",{points:"6 9 12 15 18 9"})})}function vs({size:e=16}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function KB({size:e=16}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("path",{d:"M9 18h6"}),R.jsx("path",{d:"M10 22h4"}),R.jsx("path",{d:"M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"})]})}function Zd({size:e=16}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:R.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Cy({size:e=16}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),R.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function GB({size:e=16}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:R.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}const YB="alert-module__alert___j7ZRS",XB="alert-module__iconWrapper___kLoxT",QB="alert-module__content___0FEM2",qB="alert-module__title___MWel2",JB="alert-module__message___klR2U",eV="alert-module__dismiss___f2uoG",tV="alert-module__info___PBo1l",nV="alert-module__success___AVBKS",rV="alert-module__warning___zkMaJ",iV="alert-module__error___cxg96",sV="alert-module__chalkboard___7pgWk",$r={alert:YB,iconWrapper:XB,content:QB,title:qB,message:JB,dismiss:eV,info:tV,success:nV,warning:rV,error:iV,chalkboard:sV};function jr({children:e,variant:t="info",texture:n="canvas",title:r,dismissible:i=!1,onDismiss:s,className:o}){const a=t==="chalkboard";return R.jsxs("div",{className:ae($r.alert,$r[t],o),style:{backgroundColor:a?void 0:ky[n],backgroundImage:a?void 0:_y[n],backgroundRepeat:"repeat",backgroundSize:"200px 200px"},role:"alert",children:[R.jsx("div",{className:$r.tint}),R.jsx("span",{className:$r.iconWrapper,children:R.jsx(oV,{variant:t})}),R.jsxs("div",{className:$r.content,children:[r&&R.jsx("div",{className:$r.title,children:r}),R.jsx("div",{className:$r.message,children:e})]}),i&&R.jsx("button",{type:"button",className:$r.dismiss,onClick:s,"aria-label":"Dismiss alert",children:R.jsx(vs,{size:16})})]})}function oV({variant:e}){switch(e){case"info":return R.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("circle",{cx:"12",cy:"12",r:"10"}),R.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),R.jsx("circle",{cx:"12",cy:"8",r:"0.5",fill:"currentColor"})]});case"success":return R.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),R.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]});case"warning":return R.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),R.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),R.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]});case"error":return R.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R.jsx("circle",{cx:"12",cy:"12",r:"10"}),R.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),R.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}}const aV="modal-module__overlay___a52Ni",lV="modal-module__fadeIn___5OWd5",uV="modal-module__modal___ZioOV",cV="modal-module__slideUp___vfFrm",dV="modal-module__small___hcxwF",fV="modal-module__medium___mjbM5",hV="modal-module__large___1dzyf",pV="modal-module__header___iP09B",mV="modal-module__title___nj06m",gV="modal-module__close___gQou9",yV="modal-module__body___Y-EdA",vV="modal-module__chalkboard___qY8qo",Or={overlay:aV,fadeIn:lV,modal:uV,slideUp:cV,small:dV,medium:fV,large:hV,header:pV,title:mV,close:gV,body:yV,chalkboard:vV};function Py({open:e,onClose:t,title:n,children:r,size:i="medium",variant:s="default",texture:o,withTexture:a=!1,className:l}){if(!e)return null;const u=o?Er(o):a?Er({texture:"paper",ruledType:"none"}):void 0;return R.jsx("div",{className:Or.overlay,onClick:t,role:"dialog","aria-modal":"true",children:R.jsxs("div",{className:ae(Or.modal,Or[i],s==="chalkboard"&&Or.chalkboard,l),style:u,onClick:c=>c.stopPropagation(),children:[R.jsxs("div",{className:Or.header,children:[n&&R.jsx("h2",{className:Or.title,children:n}),R.jsx("button",{type:"button",className:Or.close,onClick:t,"aria-label":"Close modal",children:R.jsx(vs,{size:18})})]}),R.jsx("div",{className:Or.body,children:r})]})})}const xV="textarea-module__wrapper___NbiNO",wV="textarea-module__label___ejhyZ",bV="textarea-module__textarea___0y-7v",SV="textarea-module__small___yPyr8",_V="textarea-module__medium___ezQxA",kV="textarea-module__large___xfeKi",CV="textarea-module__error___EkXKJ",PV="textarea-module__helperText___l1sPh",TV="textarea-module__helperError___VfTLy",EV="textarea-module__chalkboard___zZ0X0",Fr={wrapper:xV,label:wV,textarea:bV,small:SV,medium:_V,large:kV,error:CV,helperText:PV,helperError:TV,chalkboard:EV};function jl({label:e,helperText:t,error:n=!1,size:r="medium",variant:i="default",className:s,id:o,...a}){const l=o??`textarea-${Math.random().toString(36).slice(2,9)}`;return R.jsxs("div",{className:ae(Fr.wrapper,i==="chalkboard"&&Fr.chalkboard,s),children:[e&&R.jsx("label",{htmlFor:l,className:Fr.label,children:e}),R.jsx("textarea",{id:l,className:ae(Fr.textarea,Fr[r],n&&Fr.error),...a}),t&&R.jsx("span",{className:ae(Fr.helperText,n&&Fr.helperError),children:t})]})}const jV="progress-module__track___a5BMO",AV="progress-module__fill___E9mUF",Mw={track:jV,fill:AV};function rT({value:e,max:t=100,color:n,height:r=6,className:i}){const s=Math.max(0,Math.min(100,Math.round(e/t*100)));return R.jsx("div",{className:ae(Mw.track,i),style:{height:r,borderRadius:r/2},children:R.jsx("div",{className:Mw.fill,style:{width:`${s}%`,height:r,borderRadius:r/2,background:n}})})}function RV(e){return P.useMemo(()=>{const t=Math.random();return{blob:CO({seed:t,wobble:e}),ring:PO(t,e)}},[e])}const IV="list-item-module__listItem___-tw9O",MV="list-item-module__clickable___GLJmd",LV="list-item-module__blobBg___O3Mzh",DV="list-item-module__blobFill___dXHk1",zV="list-item-module__blobRing___S9mas",NV="list-item-module__active___UsL8O",$V="list-item-module__small___9dphK",OV="list-item-module__medium___yGZCr",FV="list-item-module__icon___2b4wU",BV="list-item-module__label___SIzJ4",VV="list-item-module__action___qGh0-",En={listItem:IV,static:"list-item-module__static___qtEX6",clickable:MV,blobBg:LV,blobFill:DV,blobRing:zV,active:NV,small:$V,medium:OV,icon:FV,label:BV,action:VV};function wr({active:e=!1,icon:t,action:n,size:r="medium",wobble:i=.5,children:s,className:o,...a}){const l=RV(i),u=!!a.onClick;return R.jsxs("button",{type:"button",className:ae(En.listItem,En[r],u&&En.clickable,!u&&!e&&En.static,e&&En.active,o),"aria-current":e?"page":void 0,...a,children:[R.jsxs("svg",{className:En.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[R.jsx("path",{d:l.blob,className:En.blobFill}),R.jsx("path",{d:l.ring,className:En.blobRing})]}),t&&R.jsx("span",{className:En.icon,children:t}),R.jsx("span",{className:En.label,children:s}),n&&R.jsx("span",{className:En.action,children:n})]})}const UV="accordion-module__accordion___mqGl-",WV="accordion-module__header___mLfbd",HV="accordion-module__icon___Z90NR",ZV="accordion-module__title___HusgG",KV="accordion-module__content___1K0td",Ps={accordion:UV,header:WV,icon:HV,title:ZV,content:KV};function GV({title:e,children:t,expanded:n=!1,onToggle:r,className:i}){return R.jsxs("div",{className:ae(Ps.accordion,n&&Ps.expanded,i),children:[R.jsxs("button",{type:"button",className:Ps.header,onClick:r,"aria-expanded":n,children:[R.jsx("span",{className:Ps.icon,"aria-hidden":"true",children:n?"▼":"▶"}),R.jsx("span",{className:Ps.title,children:e})]}),n&&R.jsx("div",{className:Ps.content,children:t})]})}const YV="icon-module__icon___2vrJz",XV="icon-module__blobBg___ENPYJ",QV="icon-module__blobFill___IPbwQ",qV="icon-module__blobRing___1awqV",JV="icon-module__content___TaZR6",e4="icon-module__small___Xp--F",t4="icon-module__medium___tCjMB",n4="icon-module__large___vBtP7",Ts={icon:YV,blobBg:XV,blobFill:QV,blobRing:qV,content:JV,small:e4,medium:t4,large:n4},r4={small:20,medium:24,large:28};function iT({icon:e,size:t="medium",wobble:n=.5,fillColor:r,className:i}){const s=Tl(n),o=r4[t];return R.jsxs("span",{className:ae(Ts.icon,Ts[t],i),children:[R.jsxs("svg",{className:Ts.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[R.jsx("path",{d:s.blob,className:Ts.blobFill,style:r?{fill:r}:void 0}),R.jsx("path",{d:s.ring,className:Ts.blobRing})]}),R.jsx("span",{className:Ts.content,style:{width:o,height:o},children:e})]})}const Ty=P.createContext({});function Ey(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const i4=typeof window<"u",sT=i4?P.useLayoutEffect:P.useEffect,Kd=P.createContext(null);function jy(e,t){e.indexOf(t)===-1&&e.push(t)}function Yc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ar=(e,t,n)=>n>t?t:n<e?e:n;let Ay=()=>{};const xi={},oT=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),aT=e=>typeof e=="object"&&e!==null,lT=e=>/^0[^.\s]+$/u.test(e);function uT(e){let t;return()=>(t===void 0&&(t=e()),t)}const vn=e=>e,Al=(...e)=>e.reduce((t,n)=>r=>n(t(r))),cl=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Ry{constructor(){this.subscriptions=[]}add(t){return jy(this.subscriptions,t),()=>Yc(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 en=e=>e*1e3,hn=e=>e/1e3,cT=(e,t)=>t?e*(1e3/t):0,dT=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,s4=1e-7,o4=12;function a4(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=dT(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>s4&&++a<o4);return o}function Rl(e,t,n,r){if(e===t&&n===r)return vn;const i=s=>a4(s,0,1,e,n);return s=>s===0||s===1?s:dT(i(s),t,r)}const fT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hT=e=>t=>1-e(1-t),pT=Rl(.33,1.53,.69,.99),Iy=hT(pT),mT=fT(Iy),gT=e=>e>=1?1:(e*=2)<1?.5*Iy(e):.5*(2-Math.pow(2,-10*(e-1))),My=e=>1-Math.sin(Math.acos(e)),yT=hT(My),vT=fT(My),l4=Rl(.42,0,1,1),u4=Rl(0,0,.58,1),xT=Rl(.42,0,.58,1),c4=e=>Array.isArray(e)&&typeof e[0]!="number",wT=e=>Array.isArray(e)&&typeof e[0]=="number",d4={linear:vn,easeIn:l4,easeInOut:xT,easeOut:u4,circIn:My,circInOut:vT,circOut:yT,backIn:Iy,backInOut:mT,backOut:pT,anticipate:gT},f4=e=>typeof e=="string",Lw=e=>{if(wT(e)){Ay(e.length===4);const[t,n,r,i]=e;return Rl(t,n,r,i)}else if(f4(e))return d4[e];return e},fu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function h4(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const p=f&&i?n:r;return d&&o.add(c),p.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const p4=40;function bT(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=fu.reduce((w,S)=>(w[S]=h4(s),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=o,y=()=>{const w=xi.useManualTiming,S=w?i.timestamp:performance.now();n=!1,w||(i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,p4),1)),i.timestamp=S,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},x=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:fu.reduce((w,S)=>{const k=o[S];return w[S]=(b,C=!1,T=!1)=>(n||x(),k.schedule(b,C,T)),w},{}),cancel:w=>{for(let S=0;S<fu.length;S++)o[fu[S]].cancel(w)},state:i,steps:o}}const{schedule:Ce,cancel:wi,state:ut,steps:sh}=bT(typeof requestAnimationFrame<"u"?requestAnimationFrame:vn,!0);let Qu;function m4(){Qu=void 0}const Pt={now:()=>(Qu===void 0&&Pt.set(ut.isProcessing||xi.useManualTiming?ut.timestamp:performance.now()),Qu),set:e=>{Qu=e,queueMicrotask(m4)}},ST=e=>t=>typeof t=="string"&&t.startsWith(e),_T=ST("--"),g4=ST("var(--"),Ly=e=>g4(e)?y4.test(e.split("/*")[0].trim()):!1,y4=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Dw(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const zo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},dl={...zo,transform:e=>ar(0,1,e)},hu={...zo,default:1},Ra=e=>Math.round(e*1e5)/1e5,Dy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function v4(e){return e==null}const x4=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zy=(e,t)=>n=>!!(typeof n=="string"&&x4.test(n)&&n.startsWith(e)||t&&!v4(n)&&Object.prototype.hasOwnProperty.call(n,t)),kT=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Dy);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},w4=e=>ar(0,255,e),oh={...zo,transform:e=>Math.round(w4(e))},Gi={test:zy("rgb","red"),parse:kT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+oh.transform(e)+", "+oh.transform(t)+", "+oh.transform(n)+", "+Ra(dl.transform(r))+")"};function b4(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 om={test:zy("#"),parse:b4,transform:Gi.transform},Il=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),mr=Il("deg"),ir=Il("%"),q=Il("px"),S4=Il("vh"),_4=Il("vw"),zw={...ir,parse:e=>ir.parse(e)/100,transform:e=>ir.transform(e*100)},Xs={test:zy("hsl","hue"),parse:kT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ir.transform(Ra(t))+", "+ir.transform(Ra(n))+", "+Ra(dl.transform(r))+")"},Ge={test:e=>Gi.test(e)||om.test(e)||Xs.test(e),parse:e=>Gi.test(e)?Gi.parse(e):Xs.test(e)?Xs.parse(e):om.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Gi.transform(e):Xs.transform(e),getAnimatableNone:e=>{const t=Ge.parse(e);return t.alpha=0,Ge.transform(t)}},k4=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function C4(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Dy))==null?void 0:t.length)||0)+(((n=e.match(k4))==null?void 0:n.length)||0)>0}const CT="number",PT="color",P4="var",T4="var(",Nw="${}",E4=/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 Po(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(E4,l=>(Ge.test(l)?(r.color.push(s),i.push(PT),n.push(Ge.parse(l))):l.startsWith(T4)?(r.var.push(s),i.push(P4),n.push(l)):(r.number.push(s),i.push(CT),n.push(parseFloat(l))),++s,Nw)).split(Nw);return{values:n,split:a,indexes:r,types:i}}function j4(e){return Po(e).values}function TT({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===CT?i+=Ra(r[s]):o===PT?i+=Ge.transform(r[s]):i+=r[s]}return i}}function A4(e){return TT(Po(e))}const R4=e=>typeof e=="number"?0:Ge.test(e)?Ge.getAnimatableNone(e):e,I4=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:R4(e);function M4(e){const t=Po(e);return TT(t)(t.values.map((r,i)=>I4(r,t.split[i])))}const On={test:C4,parse:j4,createTransformer:A4,getAnimatableNone:M4};function ah(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 L4({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=ah(l,a,e+1/3),s=ah(l,a,e),o=ah(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Xc(e,t){return n=>n>0?t:e}const _e=(e,t,n)=>e+(t-e)*n,lh=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},D4=[om,Gi,Xs],z4=e=>D4.find(t=>t.test(e));function $w(e){const t=z4(e);if(!t)return!1;let n=t.parse(e);return t===Xs&&(n=L4(n)),n}const Ow=(e,t)=>{const n=$w(e),r=$w(t);if(!n||!r)return Xc(e,t);const i={...n};return s=>(i.red=lh(n.red,r.red,s),i.green=lh(n.green,r.green,s),i.blue=lh(n.blue,r.blue,s),i.alpha=_e(n.alpha,r.alpha,s),Gi.transform(i))},am=new Set(["none","hidden"]);function N4(e,t){return am.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function $4(e,t){return n=>_e(e,t,n)}function Ny(e){return typeof e=="number"?$4:typeof e=="string"?Ly(e)?Xc:Ge.test(e)?Ow:B4:Array.isArray(e)?ET:typeof e=="object"?Ge.test(e)?Ow:O4:Xc}function ET(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Ny(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function O4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ny(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function F4(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 B4=(e,t)=>{const n=On.createTransformer(t),r=Po(e),i=Po(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?am.has(e)&&!i.values.length||am.has(t)&&!r.values.length?N4(e,t):Al(ET(F4(r,i),i.values),n):Xc(e,t)};function jT(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?_e(e,t,n):Ny(e)(e,t)}const V4=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ce.update(t,n),stop:()=>wi(t),now:()=>ut.isProcessing?ut.timestamp:Pt.now()}},AT=(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)})`},Qc=2e4;function $y(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Qc;)t+=n,r=e.next(t);return t>=Qc?1/0:t}function U4(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min($y(r),Qc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:hn(i)}}const Be={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 lm(e,t){return e*Math.sqrt(1-t*t)}const W4=12;function H4(e,t,n){let r=n;for(let i=1;i<W4;i++)r=r-e(r)/t(r);return r}const uh=.001;function Z4({duration:e=Be.duration,bounce:t=Be.bounce,velocity:n=Be.velocity,mass:r=Be.mass}){let i,s,o=1-t;o=ar(Be.minDamping,Be.maxDamping,o),e=ar(Be.minDuration,Be.maxDuration,hn(e)),o<1?(i=u=>{const c=u*o,d=c*e,f=c-n,h=lm(u,o),p=Math.exp(-d);return uh-f/h*p},s=u=>{const d=u*o*e,f=d*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-d),y=lm(Math.pow(u,2),o);return(-i(u)+uh>0?-1:1)*((f-h)*p)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-uh+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=H4(i,s,a);if(e=en(e),isNaN(l))return{stiffness:Be.stiffness,damping:Be.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const K4=["duration","bounce"],G4=["stiffness","damping","mass"];function Fw(e,t){return t.some(n=>e[n]!==void 0)}function Y4(e){let t={velocity:Be.velocity,stiffness:Be.stiffness,damping:Be.damping,mass:Be.mass,isResolvedFromDuration:!1,...e};if(!Fw(e,G4)&&Fw(e,K4))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*ar(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Be.mass,stiffness:i,damping:s}}else{const n=Z4({...e,velocity:0});t={...t,...n,mass:Be.mass},t.isResolvedFromDuration=!0}return t}function qc(e=Be.visualDuration,t=Be.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=Y4({...n,velocity:-hn(n.velocity||0)}),p=f||0,y=u/(2*Math.sqrt(l*c)),x=o-s,m=hn(Math.sqrt(l/c)),v=Math.abs(x)<5;r||(r=v?Be.restSpeed.granular:Be.restSpeed.default),i||(i=v?Be.restDelta.granular:Be.restDelta.default);let w,S,k,b,C,T;if(y<1)k=lm(m,y),b=(p+y*m*x)/k,w=E=>{const I=Math.exp(-y*m*E);return o-I*(b*Math.sin(k*E)+x*Math.cos(k*E))},C=y*m*b+x*k,T=y*m*x-b*k,S=E=>Math.exp(-y*m*E)*(C*Math.sin(k*E)+T*Math.cos(k*E));else if(y===1){w=I=>o-Math.exp(-m*I)*(x+(p+m*x)*I);const E=p+m*x;S=I=>Math.exp(-m*I)*(m*E*I-p)}else{const E=m*Math.sqrt(y*y-1);w=B=>{const $=Math.exp(-y*m*B),G=Math.min(E*B,300);return o-$*((p+y*m*x)*Math.sinh(G)+E*x*Math.cosh(G))/E};const I=(p+y*m*x)/E,M=y*m*I-x*E,F=y*m*x-I*E;S=B=>{const $=Math.exp(-y*m*B),G=Math.min(E*B,300);return $*(M*Math.sinh(G)+F*Math.cosh(G))}}const A={calculatedDuration:h&&d||null,velocity:E=>en(S(E)),next:E=>{if(!h&&y<1){const M=Math.exp(-y*m*E),F=Math.sin(k*E),B=Math.cos(k*E),$=o-M*(b*F+x*B),G=en(M*(C*F+T*B));return a.done=Math.abs(G)<=r&&Math.abs(o-$)<=i,a.value=a.done?o:$,a}const I=w(E);if(h)a.done=E>=d;else{const M=en(S(E));a.done=Math.abs(M)<=r&&Math.abs(o-I)<=i}return a.value=a.done?o:I,a},toString:()=>{const E=Math.min($y(A),Qc),I=AT(M=>A.next(E*M).value,E,30);return E+"ms "+I},toTransition:()=>{}};return A}qc.applyToOptions=e=>{const t=U4(e,100,qc);return e.ease=t.ease,e.duration=en(t.duration),e.type="keyframes",e};const X4=5;function RT(e,t,n){const r=Math.max(t-X4,0);return cT(n-e(r),t-r)}function um({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let y=n*t;const x=d+y,m=o===void 0?x:o(x);m!==x&&(y=m-d);const v=T=>-y*Math.exp(-T/r),w=T=>m+v(T),S=T=>{const A=v(T),E=w(T);f.done=Math.abs(A)<=u,f.value=f.done?m:E};let k,b;const C=T=>{h(f.value)&&(k=T,b=qc({keyframes:[f.value,p(f.value)],velocity:RT(w,T,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:T=>{let A=!1;return!b&&k===void 0&&(A=!0,S(T),C(T)),k!==void 0&&T>=k?b.next(T-k):(!A&&S(T),f)}}}function Q4(e,t,n){const r=[],i=n||xi.mix||jT,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]||vn:t;a=Al(l,a)}r.push(a)}return r}function q4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Ay(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=Q4(t,r,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=cl(e[d],e[d+1],c);return a[d](f)};return n?c=>u(ar(e[0],e[s-1],c)):u}function J4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=cl(0,t,r);e.push(_e(n,1,i))}}function e5(e){const t=[0];return J4(t,e.length-1),t}function t5(e,t){return e.map(n=>n*t)}function n5(e,t){return e.map(()=>t||xT).splice(0,e.length-1)}function Ia({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=c4(r)?r.map(Lw):Lw(r),s={done:!1,value:t[0]},o=t5(n&&n.length===t.length?n:e5(t),e),a=q4(o,t,{ease:Array.isArray(i)?i:n5(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const r5=e=>e!==null;function Gd(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(r5),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const i5={decay:um,inertia:um,tween:Ia,keyframes:Ia,spring:qc};function IT(e){typeof e.type=="string"&&(e.type=i5[e.type])}class Oy{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 s5=e=>e/100;class Jc extends Oy{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Pt.now()&&this.tick(Pt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;IT(t);const{type:n=Ia,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Ia;l!==Ia&&typeof a[0]!="number"&&(this.mixKeyframes=Al(s5,jT(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=$y(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:y,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const m=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?m<0:m>i;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,S=r;if(d){const T=Math.min(this.currentTime,i)/a;let A=Math.floor(T),E=T%1;!E&&T>=1&&(E=1),E===1&&A--,A=Math.min(A,d+1),!!(A%2)&&(f==="reverse"?(E=1-E,h&&(E-=h/a)):f==="mirror"&&(S=o)),w=ar(0,1,E)*a}let k;v?(this.delayState.value=c[0],k=this.delayState):k=S.next(w),s&&!v&&(k.value=s(k.value));let{done:b}=k;!v&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return C&&p!==um&&(k.value=Gd(c,this.options,x,this.speed)),y&&y(k.value),C&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return hn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+hn(t)}get time(){return hn(this.currentTime)}set time(t){t=en(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 RT(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Pt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=hn(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=V4,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Pt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function o5(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Yi=e=>e*180/Math.PI,cm=e=>{const t=Yi(Math.atan2(e[1],e[0]));return dm(t)},a5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cm,rotateZ:cm,skewX:e=>Yi(Math.atan(e[1])),skewY:e=>Yi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},dm=e=>(e=e%360,e<0&&(e+=360),e),Bw=cm,Vw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Uw=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),l5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Vw,scaleY:Uw,scale:e=>(Vw(e)+Uw(e))/2,rotateX:e=>dm(Yi(Math.atan2(e[6],e[5]))),rotateY:e=>dm(Yi(Math.atan2(-e[2],e[0]))),rotateZ:Bw,rotate:Bw,skewX:e=>Yi(Math.atan(e[4])),skewY:e=>Yi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fm(e){return e.includes("scale")?1:0}function hm(e,t){if(!e||e==="none")return fm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=l5,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=a5,i=a}if(!i)return fm(t);const s=r[t],o=i[1].split(",").map(c5);return typeof s=="function"?s(o):o[s]}const u5=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return hm(n,t)};function c5(e){return parseFloat(e.trim())}const No=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$o=new Set([...No,"pathRotation"]),Ww=e=>e===zo||e===q,d5=new Set(["x","y","z"]),f5=No.filter(e=>!d5.has(e));function h5(e){const t=[];return f5.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ri={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})=>hm(t,"x"),y:(e,{transform:t})=>hm(t,"y")};ri.translateX=ri.x;ri.translateY=ri.y;const rs=new Set;let pm=!1,mm=!1,gm=!1;function MT(){if(mm){const e=Array.from(rs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=h5(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)})}mm=!1,pm=!1,rs.forEach(e=>e.complete(gm)),rs.clear()}function LT(){rs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mm=!0)})}function p5(){gm=!0,LT(),MT(),gm=!1}class Fy{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?(rs.add(this),pm||(pm=!0,Ce.read(LT),Ce.resolveKeyframes(MT))):(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])}o5(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),rs.delete(this)}cancel(){this.state==="scheduled"&&(rs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const m5=e=>e.startsWith("--");function DT(e,t,n){m5(t)?e.style.setProperty(t,n):e.style[t]=n}const g5={};function zT(e,t){const n=uT(e);return()=>g5[t]??n()}const y5=zT(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),NT=zT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ga=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Hw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ga([0,.65,.55,1]),circOut:ga([.55,0,1,.45]),backIn:ga([.31,.01,.66,-.59]),backOut:ga([.33,1.53,.69,.99])};function $T(e,t){if(e)return typeof e=="function"?NT()?AT(e,t):"ease-out":wT(e)?ga(e):Array.isArray(e)?e.map(n=>$T(n,t)||Hw.easeOut):Hw[e]}function v5(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=$T(a,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function OT(e){return typeof e=="function"&&"applyToOptions"in e}function x5({type:e,...t}){return OT(e)&&NT()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class FT extends Oy{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,Ay(typeof t.type!="string");const u=x5(t);this.animation=v5(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=Gd(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),DT(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return hn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+hn(t)}get time(){return hn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=en(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&&y5()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),vn):i(this)}}const BT={anticipate:gT,backInOut:mT,circInOut:vT};function w5(e){return e in BT}function b5(e){typeof e.ease=="string"&&w5(e.ease)&&(e.ease=BT[e.ease])}const ch=10;class S5 extends FT{constructor(t){b5(t),IT(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 Jc({...o,autoplay:!1}),l=Math.max(ch,Pt.now()-this.startTime),u=ar(0,ch,l-ch),c=a.sample(l).value,{name:d}=this.options;s&&d&&DT(s,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Zw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(On.test(e)||e==="0")&&!e.startsWith("url("));function _5(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 k5(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=Zw(i,t),a=Zw(s,t);return!o||!a?!1:_5(e)||(n==="spring"||OT(n))&&r}function ym(e){e.duration=0,e.type="keyframes"}const VT=new Set(["opacity","clipPath","filter","transform"]),C5=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function P5(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&C5.test(e[t]))return!0;return!1}const T5=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),E5=uT(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function j5(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=t.owner.getProps();return E5()&&n&&(VT.has(n)||T5.has(n)&&P5(a))&&(n!=="transform"||!c)&&!u&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const A5=40;class R5 extends Oy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var p;super(),this.stop=()=>{var y,x;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Pt.now();const f={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||Fy;this.keyframeResolver=new h(a,(y,x,m)=>this.onKeyframesResolved(y,x,f,!m),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,r,i){var m,v;this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=Pt.now();let d=!0;k5(t,s,o,a)||(d=!1,(xi.instantAnimations||!l)&&(c==null||c(Gd(t,r,n))),t[0]=t[t.length-1],ym(r),r.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>A5?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=d&&!u&&j5(h),y=(v=(m=h.motionValue)==null?void 0:m.owner)==null?void 0:v.current;let x;if(p)try{x=new S5({...h,element:y})}catch{x=new Jc(h)}else x=new Jc(h);x.finished.then(()=>{this.notifyFinished()}).catch(vn),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),p5()),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 UT(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}const Kw=30,I5=e=>!isNaN(parseFloat(e));class M5{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=Pt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Pt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=I5(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 Ry);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ce.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Pt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Kw)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kw);return cT(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 To(e,t){return new M5(e,t)}function WT(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function By(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?WT(n,e):n}const L5={type:"spring",stiffness:500,damping:25,restSpeed:10},D5=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),z5={type:"keyframes",duration:.8},N5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$5=(e,{keyframes:t})=>t.length>2?z5:$o.has(e)?e.startsWith("scale")?D5(t[1]):L5:N5,O5=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function F5(e){for(const t in e)if(!O5.has(t))return!0;return!1}const Vy=(e,t,n,r={},i,s)=>o=>{const a=By(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-en(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};F5(a)||Object.assign(c,$5(e,c)),c.duration&&(c.duration=en(c.duration)),c.repeatDelay&&(c.repeatDelay=en(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(ym(c),c.delay===0&&(d=!0)),(xi.instantAnimations||xi.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,ym(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=Gd(c.keyframes,a);if(f!==void 0){Ce.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Jc(c):new R5(c)},B5=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function V5(e){const t=B5.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function HT(e,t,n=1){const[r,i]=V5(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return oT(o)?parseFloat(o):o}return Ly(i)?HT(i,t,n+1):i}function Gw(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Uy(e,t,n,r){if(typeof t=="function"){const[i,s]=Gw(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]=Gw(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function is(e,t,n){const r=e.getProps();return Uy(r,t,n!==void 0?n:r.custom,e)}const ZT=new Set(["width","height","top","left","right","bottom",...No]),vm=e=>Array.isArray(e);function U5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,To(n))}function W5(e){return vm(e)?e[e.length-1]||0:e}function H5(e,t){const n=is(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=W5(s[o]);U5(e,o,a)}}const ft=e=>!!(e&&e.getVelocity);function Z5(e){return!!(ft(e)&&e.add)}function xm(e,t){const n=e.getValue("willChange");if(Z5(n))return n.add(t);if(!n&&xi.WillChange){const r=new xi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Wy(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const K5="framerAppearId",KT="data-"+Wy(K5);function GT(e){return e.props[KT]}function G5({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function YT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?WT(s,l):l;const u=s==null?void 0:s.reduceMotion,c=s==null?void 0:s.skipAnimations;r&&(s=r);const d=[],f=i&&e.animationState&&e.animationState.getState()[i],h=s==null?void 0:s.path;h&&h.animateVisualElement(e,a,s,n,d);for(const p in a){const y=e.getValue(p,e.latestValues[p]??null),x=a[p];if(x===void 0||f&&G5(f,p))continue;const m={delay:n,...By(s||{},p)};c&&(m.skipAnimations=!0);const v=y.get();if(v!==void 0&&!y.isAnimating()&&!Array.isArray(x)&&x===v&&!m.velocity){Ce.update(()=>y.set(x));continue}let w=!1;if(window.MotionHandoffAnimation){const b=GT(e);if(b){const C=window.MotionHandoffAnimation(b,p,Ce);C!==null&&(m.startTime=C,w=!0)}}xm(e,p);const S=u??e.shouldReduceMotion;y.start(Vy(p,y,x,S&&ZT.has(p)?{type:!1}:m,e,w));const k=y.animation;k&&d.push(k)}if(o){const p=()=>Ce.update(()=>{o&&H5(e,o)});d.length?Promise.all(d).then(p):p()}return d}function wm(e,t,n={}){var l;const r=is(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(YT(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return Y5(e,t,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function Y5(e,t,n=0,r=0,i=0,s=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(wm(l,t,{...o,delay:n+(typeof r=="function"?0:r)+UT(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function X5(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>wm(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=wm(e,t,n);else{const i=typeof t=="function"?is(e,t,n.custom):t;r=Promise.all(YT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Q5={test:e=>e==="auto",parse:e=>e},XT=e=>t=>t.test(e),QT=[zo,q,ir,mr,_4,S4,Q5],Yw=e=>QT.find(XT(e));function q5(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||lT(e):!0}const J5=new Set(["brightness","contrast","saturate","opacity"]);function e6(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Dy)||[];if(!r)return e;const i=n.replace(r,"");let s=J5.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const t6=/\b([a-z-]*)\(.*?\)/gu,bm={...On,getAnimatableNone:e=>{const t=e.match(t6);return t?t.map(e6).join(" "):e}},Sm={...On,getAnimatableNone:e=>{const t=On.parse(e);return On.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Xw={...zo,transform:Math.round},n6={rotate:mr,pathRotation:mr,rotateX:mr,rotateY:mr,rotateZ:mr,scale:hu,scaleX:hu,scaleY:hu,scaleZ:hu,skew:mr,skewX:mr,skewY:mr,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:dl,originX:zw,originY:zw,originZ:q},ed={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...n6,zIndex:Xw,fillOpacity:dl,strokeOpacity:dl,numOctaves:Xw},r6={...ed,color:Ge,backgroundColor:Ge,outlineColor:Ge,fill:Ge,stroke:Ge,borderColor:Ge,borderTopColor:Ge,borderRightColor:Ge,borderBottomColor:Ge,borderLeftColor:Ge,filter:bm,WebkitFilter:bm,mask:Sm,WebkitMask:Sm},qT=e=>r6[e],i6=new Set([bm,Sm]);function JT(e,t){let n=qT(e);return i6.has(n)||(n=On),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const s6=new Set(["auto","none","0"]);function o6(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!s6.has(s)&&Po(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=JT(n,i)}class a6 extends Fy{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),Ly(d))){const f=HT(d,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ZT.has(r)||t.length!==2)return;const[i,s]=t,o=Yw(i),a=Yw(s),l=Dw(i),u=Dw(s);if(l!==u&&ri[r]){this.needsMeasurement=!0;return}if(o!==a)if(Ww(o)&&Ww(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else ri[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||q5(t[i]))&&r.push(i);r.length&&o6(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=ri[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]=ri[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function eE(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 _m=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function qu(e){return aT(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Hy}=bT(queueMicrotask,!1),Rn={x:!1,y:!1};function tE(){return Rn.x||Rn.y}function l6(e){return e==="x"||e==="y"?Rn[e]?null:(Rn[e]=!0,()=>{Rn[e]=!1}):Rn.x||Rn.y?null:(Rn.x=Rn.y=!0,()=>{Rn.x=Rn.y=!1})}function nE(e,t){const n=eE(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function u6(e){return!(e.pointerType==="touch"||tE())}function c6(e,t,n={}){const[r,i,s]=nE(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},d=x=>{u&&(u(x),u=void 0),c()},f=x=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(x))},h=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},y=x=>{if(!u6(x))return;l=!1;const m=t(o,x);typeof m=="function"&&(u=m,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",h,i)}),s}const rE=(e,t)=>t?e===t?!0:rE(e,t.parentElement):!1,Zy=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,d6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function f6(e){return d6.has(e.tagName)||e.isContentEditable===!0}const h6=new Set(["INPUT","SELECT","TEXTAREA"]);function p6(e){return h6.has(e.tagName)||e.isContentEditable===!0}const Ju=new WeakSet;function Qw(e){return t=>{t.key==="Enter"&&e(t)}}function dh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const m6=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Qw(()=>{if(Ju.has(n))return;dh(n,"down");const i=Qw(()=>{dh(n,"up")}),s=()=>dh(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 qw(e){return Zy(e)&&!tE()}const Jw=new WeakSet;function g6(e,t,n={}){const[r,i,s]=nE(e,n),o=a=>{const l=a.currentTarget;if(!qw(a)||Jw.has(a))return;Ju.add(l),n.stopPropagation&&Jw.add(a);const u=t(l,a),c=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ju.has(l)&&Ju.delete(l),qw(h)&&typeof u=="function"&&u(h,{success:p})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||rE(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),qu(a)&&(a.addEventListener("focus",u=>m6(u,i)),!f6(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Ky(e){return aT(e)&&"ownerSVGElement"in e}const ec=new WeakMap;let Ur;const iE=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:Ky(r)&&"getBBox"in r?r.getBBox()[t]:r[n],y6=iE("inline","width","offsetWidth"),v6=iE("block","height","offsetHeight");function x6({target:e,borderBoxSize:t}){var n;(n=ec.get(e))==null||n.forEach(r=>{r(e,{get width(){return y6(e,t)},get height(){return v6(e,t)}})})}function w6(e){e.forEach(x6)}function b6(){typeof ResizeObserver>"u"||(Ur=new ResizeObserver(w6))}function S6(e,t){Ur||b6();const n=eE(e);return n.forEach(r=>{let i=ec.get(r);i||(i=new Set,ec.set(r,i)),i.add(t),Ur==null||Ur.observe(r)}),()=>{n.forEach(r=>{const i=ec.get(r);i==null||i.delete(t),i!=null&&i.size||Ur==null||Ur.unobserve(r)})}}const tc=new Set;let Qs;function _6(){Qs=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};tc.forEach(t=>t(e))},window.addEventListener("resize",Qs)}function k6(e){return tc.add(e),Qs||_6(),()=>{tc.delete(e),!tc.size&&typeof Qs=="function"&&(window.removeEventListener("resize",Qs),Qs=void 0)}}function e1(e,t){return typeof e=="function"?k6(e):S6(e,t)}function C6(e){return Ky(e)&&e.tagName==="svg"}const P6=[...QT,Ge,On],T6=e=>P6.find(XT(e)),t1=()=>({translate:0,scale:1,origin:0,originPoint:0}),qs=()=>({x:t1(),y:t1()}),n1=()=>({min:0,max:0}),et=()=>({x:n1(),y:n1()}),E6=new WeakMap;function Yd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function fl(e){return typeof e=="string"||Array.isArray(e)}const Gy=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yy=["initial",...Gy];function Xd(e){return Yd(e.animate)||Yy.some(t=>fl(e[t]))}function sE(e){return!!(Xd(e)||e.variants)}function j6(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ft(i))e.addValue(r,i);else if(ft(s))e.addValue(r,To(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,To(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const td={current:null},Xy={current:!1},A6=typeof window<"u";function oE(){if(Xy.current=!0,!!A6)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>td.current=e.matches;e.addEventListener("change",t),t()}else td.current=!1}const r1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let nd={};function aE(e){nd=e}function R6(){return nd}class I6{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=Fy,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 h=Pt.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Ce.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Xd(n),this.isVariantNode=sE(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];u[h]!==void 0&&ft(p)&&p.set(u[h])}}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,E6.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:(Xy.current||oE(),this.shouldReduceMotion=td.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(),wi(this.notifyUpdate),wi(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&&VT.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new FT({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:en(c)}),f=o(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=$o.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Ce.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 nd){const n=nd[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):et()}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<r1.length;r++){const i=r1[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=j6(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=To(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"&&(oT(r)||lT(r))?r=parseFloat(r):!T6(r)&&On.test(n)&&(r=JT(t,n)),this.setBaseTarget(t,ft(r)?r.get():r)),ft(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=Uy(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&&!ft(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 Ry),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Hy.render(this.render)}}class lE extends I6{constructor(){super(...arguments),this.KeyframeResolver=a6}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;ft(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ci{constructor(t){this.isMounted=!1,this.node=t}update(){}}function uE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function M6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function L6(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function fh(e){return e===void 0||e===1}function km({scale:e,scaleX:t,scaleY:n}){return!fh(e)||!fh(t)||!fh(n)}function Oi(e){return km(e)||cE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cE(e){return i1(e.x)||i1(e.y)}function i1(e){return e&&e!=="0%"}function rd(e,t,n){const r=e-n,i=t*r;return n+i}function s1(e,t,n,r,i){return i!==void 0&&(e=rd(e,i,r)),rd(e,n,r)+t}function Cm(e,t=0,n=1,r,i){e.min=s1(e.min,t,n,r,i),e.max=s1(e.max,t,n,r,i)}function dE(e,{x:t,y:n}){Cm(e.x,t.translate,t.scale,t.originPoint),Cm(e.y,n.translate,n.scale,n.originPoint)}const o1=.999999999999,a1=1.0000000000001;function D6(e,t,n,r=!1){var a;const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;l<i;l++){s=n[l],o=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(Qn(e.x,-s.scroll.offset.x),Qn(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,dE(e,o)),r&&Oi(s.latestValues)&&nc(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<a1&&t.x>o1&&(t.x=1),t.y<a1&&t.y>o1&&(t.y=1)}function Qn(e,t){e.min+=t,e.max+=t}function l1(e,t,n,r,i=.5){const s=_e(e.min,e.max,i);Cm(e,t,n,s,r)}function u1(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function nc(e,t,n){const r=n??e;l1(e.x,u1(t.x,r.x),t.scaleX,t.scale,t.originX),l1(e.y,u1(t.y,r.y),t.scaleY,t.scale,t.originY)}function fE(e,t){return uE(L6(e.getBoundingClientRect(),t))}function z6(e,t,n){const r=fE(e,n),{scroll:i}=t;return i&&(Qn(r.x,i.offset.x),Qn(r.y,i.offset.y)),r}const N6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$6=No.length;function O6(e,t,n){let r="",i=!0;for(let o=0;o<$6;o++){const a=No[o],l=e[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=_m(l,ed[a]);if(!u){i=!1;const d=N6[a]||a;r+=`${d}(${c}) `}n&&(t[a]=c)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${_m(s,ed.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Qy(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if($o.has(l)){o=!0;continue}else if(_T(l)){i[l]=u;continue}else{const c=_m(u,ed[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=O6(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}function hE(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 c1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const oa={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(q.test(e))e=parseFloat(e);else return e;const n=c1(e,t.target.x),r=c1(e,t.target.y);return`${n}% ${r}%`}},F6={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=On.parse(e);if(i.length>5)return r;const s=On.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=_e(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},Pm={borderRadius:{...oa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oa,borderTopRightRadius:oa,borderBottomLeftRadius:oa,borderBottomRightRadius:oa,boxShadow:F6};function pE(e,{layout:t,layoutId:n}){return $o.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pm[e]||e==="opacity")}function qy(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)(ft(r[a])||i&&ft(i[a])||pE(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function B6(e){return window.getComputedStyle(e)}class V6 extends lE{constructor(){super(...arguments),this.type="html",this.renderInstance=hE}readValueFromInstance(t,n){var r;if($o.has(n))return(r=this.projection)!=null&&r.isProjecting?fm(n):u5(t,n);{const i=B6(t),s=(_T(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return fE(t,n)}build(t,n,r){Qy(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return qy(t,n,r)}}const U6={offset:"stroke-dashoffset",array:"stroke-dasharray"},W6={offset:"strokeDashoffset",array:"strokeDasharray"};function H6(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?U6:W6;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const Z6=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function mE(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(Qy(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const h of Z6)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&H6(d,i,s,o,!1)}const gE=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"]),yE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function K6(e,t,n,r){hE(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(gE.has(i)?i:Wy(i),t.attrs[i])}function vE(e,t,n){const r=qy(e,t,n);for(const i in e)if(ft(e[i])||ft(t[i])){const s=No.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class G6 extends lE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=et}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($o.has(n)){const r=qT(n);return r&&r.default||0}return n=gE.has(n)?n:Wy(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return vE(t,n,r)}build(t,n,r){mE(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){K6(t,n,r,i)}mount(t){this.isSVGTag=yE(t.tagName),super.mount(t)}}const Y6=Yy.length;function xE(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xE(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Y6;n++){const r=Yy[n],i=e.props[r];(fl(i)||i===!1)&&(t[r]=i)}return t}function wE(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 X6=[...Gy].reverse(),Q6=Gy.length;function q6(e){return t=>Promise.all(t.map(({animation:n,options:r})=>X5(e,n,r)))}function J6(e){let t=q6(e),n=d1(),r=!0,i=!1;const s=u=>(c,d)=>{var h;const f=is(e,d,u==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(f){const{transition:p,transitionEnd:y,...x}=f;c={...c,...x,...y}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=xE(e.parent)||{},f=[],h=new Set;let p={},y=1/0;for(let m=0;m<Q6;m++){const v=X6[m],w=n[v],S=c[v]!==void 0?c[v]:d[v],k=fl(S),b=v===u?w.isActive:null;b===!1&&(y=m);let C=S===d[v]&&S!==c[v]&&k;if(C&&(r||i)&&e.manuallyAnimateOnMount&&(C=!1),w.protectedKeys={...p},!w.isActive&&b===null||!S&&!w.prevProp||Yd(S)||typeof S=="boolean")continue;if(v==="exit"&&w.isActive&&b!==!0){w.prevResolvedValues&&(p={...p,...w.prevResolvedValues});continue}const T=eU(w.prevProp,S);let A=T||v===u&&w.isActive&&!C&&k||m>y&&k,E=!1;const I=Array.isArray(S)?S:[S];let M=I.reduce(s(v),{});b===!1&&(M={});const{prevResolvedValues:F={}}=w,B={...F,...M},$=D=>{A=!0,h.has(D)&&(E=!0,h.delete(D)),w.needsAnimating[D]=!0;const V=e.getValue(D);V&&(V.liveStyle=!1)};for(const D in B){const V=M[D],_=F[D];if(p.hasOwnProperty(D))continue;let z=!1;vm(V)&&vm(_)?z=!wE(V,_)||T:z=V!==_,z?V!=null?$(D):h.add(D):V!==void 0&&h.has(D)?$(D):w.protectedKeys[D]=!0}w.prevProp=S,w.prevResolvedValues=M,w.isActive&&(p={...p,...M}),(r||i)&&e.blockInitialAnimation&&(A=!1);const G=C&&T;A&&(!G||E)&&f.push(...I.map(D=>{const V={type:v};if(typeof D=="string"&&(r||i)&&!G&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,z=is(_,D);if(_.enteringChildren&&z){const{delayChildren:Y}=z.transition||{};V.delay=UT(_.enteringChildren,e,Y)}}return{animation:D,options:V}}))}if(h.size){const m={};if(typeof c.initial!="boolean"){const v=is(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}h.forEach(v=>{const w=e.getBaseTarget(v),S=e.getValue(v);S&&(S.liveStyle=!0),m[v]=w??null}),f.push({animation:m})}let x=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,i=!1,x?t(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(h=>{var p;return(p=h.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const d=a(u);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=d1(),i=!0}}}function eU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!wE(t,e):!1}function Li(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function d1(){return{animate:Li(!0),whileInView:Li(),whileHover:Li(),whileTap:Li(),whileDrag:Li(),whileFocus:Li(),exit:Li()}}function Tm(e,t){e.min=t.min,e.max=t.max}function jn(e,t){Tm(e.x,t.x),Tm(e.y,t.y)}function f1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const bE=1e-4,tU=1-bE,nU=1+bE,SE=.01,rU=0-SE,iU=0+SE;function Tt(e){return e.max-e.min}function sU(e,t,n){return Math.abs(e-t)<=n}function h1(e,t,n,r=.5){e.origin=r,e.originPoint=_e(t.min,t.max,e.origin),e.scale=Tt(n)/Tt(t),e.translate=_e(n.min,n.max,e.origin)-e.originPoint,(e.scale>=tU&&e.scale<=nU||isNaN(e.scale))&&(e.scale=1),(e.translate>=rU&&e.translate<=iU||isNaN(e.translate))&&(e.translate=0)}function Ma(e,t,n,r){h1(e.x,t.x,n.x,r?r.originX:void 0),h1(e.y,t.y,n.y,r?r.originY:void 0)}function p1(e,t,n,r=0){const i=r?_e(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+Tt(t)}function oU(e,t,n,r){p1(e.x,t.x,n.x,r==null?void 0:r.x),p1(e.y,t.y,n.y,r==null?void 0:r.y)}function m1(e,t,n,r=0){const i=r?_e(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Tt(t)}function id(e,t,n,r){m1(e.x,t.x,n.x,r==null?void 0:r.x),m1(e.y,t.y,n.y,r==null?void 0:r.y)}function g1(e,t,n,r,i){return e-=t,e=rd(e,1/n,r),i!==void 0&&(e=rd(e,1/i,r)),e}function aU(e,t=0,n=1,r=.5,i,s=e,o=e){if(ir.test(t)&&(t=parseFloat(t),t=_e(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=_e(s.min,s.max,r);e===s&&(a-=t),e.min=g1(e.min,t,n,a,i),e.max=g1(e.max,t,n,a,i)}function y1(e,t,[n,r,i],s,o){aU(e,t[n],t[r],t[i],t.scale,s,o)}const lU=["x","scaleX","originX"],uU=["y","scaleY","originY"];function v1(e,t,n,r){y1(e.x,t,lU,n?n.x:void 0,r?r.x:void 0),y1(e.y,t,uU,n?n.y:void 0,r?r.y:void 0)}function x1(e){return e.translate===0&&e.scale===1}function _E(e){return x1(e.x)&&x1(e.y)}function w1(e,t){return e.min===t.min&&e.max===t.max}function cU(e,t){return w1(e.x,t.x)&&w1(e.y,t.y)}function b1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kE(e,t){return b1(e.x,t.x)&&b1(e.y,t.y)}function S1(e){return Tt(e.x)/Tt(e.y)}function _1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Kn(e){return[e("x"),e("y")]}function dU(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,pathRotation:d,rotateX:f,rotateY:h,skewX:p,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const CE=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],fU=CE.length,k1=e=>typeof e=="string"?parseFloat(e):e,C1=e=>typeof e=="number"||q.test(e);function hU(e,t,n,r,i,s){i?(e.opacity=_e(0,n.opacity??1,pU(r)),e.opacityExit=_e(t.opacity??1,0,mU(r))):s&&(e.opacity=_e(t.opacity??1,n.opacity??1,r));for(let o=0;o<fU;o++){const a=CE[o];let l=P1(t,a),u=P1(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||C1(l)===C1(u)?(e[a]=Math.max(_e(k1(l),k1(u),r),0),(ir.test(u)||ir.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=_e(t.rotate||0,n.rotate||0,r))}function P1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pU=PE(0,.5,yT),mU=PE(.5,.95,vn);function PE(e,t,n){return r=>r<e?0:r>t?1:n(cl(e,t,r))}function gU(e,t,n){const r=ft(e)?e:To(e);return r.start(Vy("",r,t,n)),r.animation}function hl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const yU=(e,t)=>e.depth-t.depth;class vU{constructor(){this.children=[],this.isDirty=!1}add(t){jy(this.children,t),this.isDirty=!0}remove(t){Yc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(yU),this.isDirty=!1,this.children.forEach(t)}}function xU(e,t){const n=Pt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(wi(r),e(s-t))};return Ce.setup(r,!0),()=>wi(r)}function rc(e){return ft(e)?e.get():e}class wU{constructor(){this.members=[]}add(t){jy(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&&(Yc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Yc(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 ic={hasAnimatedSinceResize:!0,hasEverUpdated:!1},hh=["","X","Y","Z"],bU=1e3;let SU=0;function ph(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function TE(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=GT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ce,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&TE(r)}function EE({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=SU++,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(CU),this.nodes.forEach(RU),this.nodes.forEach(IU),this.nodes.forEach(PU)},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 vU)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ry),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=Ky(o)&&!C6(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;Ce.read(()=>{d=window.innerWidth}),e(o,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=xU(f,250),ic.hasAnimatedSinceResize&&(ic.hasAnimatedSinceResize=!1,this.nodes.forEach(j1)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||NU,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),m=!this.targetLayout||!kE(this.targetLayout,h),v=!d&&f;if(this.options.layoutRoot||this.resumeFrom||v||d&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...By(p,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,v,w.path)}else d||j1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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(),wi(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(MU),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&&TE(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(EU),this.nodes.forEach(T1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(E1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jU),this.nodes.forEach(AU),this.nodes.forEach(_U),this.nodes.forEach(kU)):this.nodes.forEach(E1),this.clearAllSnapshots();const a=Pt.now();ut.delta=ar(0,1e3/60,a-ut.timestamp),ut.timestamp=a,ut.isProcessing=!0,sh.update.process(ut),sh.preRender.process(ut),sh.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(TU),this.sharedNodes.forEach(LU)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Tt(this.snapshot.measuredBox.x)&&!Tt(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=et()),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&&!_E(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Oi(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),$U(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return et();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(OU))){const{scroll:c}=this.root;c&&(Qn(a.x,c.offset.x),Qn(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=et();if(jn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&jn(a,o),Qn(a.x,d.offset.x),Qn(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var c,d;const u=l||et();jn(u,o);for(let f=0;f<this.path.length;f++){const h=this.path[f];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Qn(u.x,-h.scroll.offset.x),Qn(u.y,-h.scroll.offset.y)),Oi(h.latestValues)&&nc(u,h.latestValues,(c=h.layout)==null?void 0:c.layoutBox)}return Oi(this.latestValues)&&nc(u,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),u}removeTransform(o){var l;const a=et();jn(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!Oi(c.latestValues))continue;let d;c.instance&&(km(c.latestValues)&&c.updateSnapshot(),d=et(),jn(d,c.measurePageBox())),v1(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,d)}return Oi(this.latestValues)&&v1(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!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var h;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||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=ut.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=et(),this.targetWithTransforms=et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),oU(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):jn(this.target,this.layout.layoutBox),dE(this.target,this.targetDelta)):jn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||km(this.parent.latestValues)||cE(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=et(),this.relativeTargetOrigin=et(),id(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),jn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ut.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;jn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;D6(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=et());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(f1(this.prevProjectionDelta.x,this.projectionDelta.x),f1(this.prevProjectionDelta.y,this.projectionDelta.y)),Ma(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!_1(this.projectionDelta.x,this.prevProjectionDelta.x)||!_1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}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=qs(),this.projectionDelta=qs(),this.projectionDeltaWithTransform=qs()}setAnimationOrigin(o,a=!1,l){const u=this.snapshot,c=u?u.latestValues:{},d={...this.latestValues},f=qs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=et(),p=u?u.source:void 0,y=this.layout?this.layout.source:void 0,x=p!==y,m=this.getStack(),v=!m||m.members.length<=1,w=!!(x&&!v&&this.options.crossfade===!0&&!this.path.some(zU));this.animationProgress=0;let S;const k=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=b=>{const C=b/1e3,T=k==null?void 0:k(C);T?(f.x.translate=T.x,f.x.scale=_e(o.x.scale,1,C),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=T.y,f.y.scale=_e(o.y.scale,1,C),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(A1(f.x,o.x,C),A1(f.y,o.y,C)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(id(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),DU(this.relativeTarget,this.relativeTargetOrigin,h,C),S&&cU(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=et()),jn(S,this.relativeTarget)),x&&(this.animationValues=d,hU(d,c,this.latestValues,C,w,v)),T&&T.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=T.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(wi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{ic.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=To(0)),this.motionValue.jump(0,!1),this.currentAnimation=gU(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bU),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&jE(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||et();const d=Tt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=Tt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}jn(a,l),nc(a,c),Ma(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new wU),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ph("z",o,u,this.animationValues);for(let c=0;c<hh.length;c++)ph(`rotate${hh[c]}`,o,u,this.animationValues),ph(`skew${hh[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=rc(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=rc(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Oi(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=dU(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:f,y:h}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in Pm){if(c[p]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:m}=Pm[p],v=d==="none"?c[p]:y(c[p],u);if(x){const w=x.length;for(let S=0;S<w;S++)o[x[S]]=v}else m?this.options.visualElement.renderState.vars[p]=v:o[p]=v}this.options.layoutId&&(o.pointerEvents=u===this?rc(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(T1),this.root.sharedNodes.clear()}}}function _U(e){e.updateLayout()}function kU(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")Kn(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],h=Tt(f);f.min=r[d].min,f.max=f.min+h});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";Tm(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else jE(s,t.layoutBox,r)&&Kn(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],h=Tt(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=qs();Ma(a,r,t.layoutBox);const l=qs();o?Ma(l,e.applyTransform(i,!0),t.measuredBox):Ma(l,r,t.layoutBox);const u=!_E(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=e.options.layoutAnchor||void 0,y=et();id(y,t.layoutBox,f.layoutBox,p);const x=et();id(x,r,h.layoutBox,p),kE(y,x)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function CU(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 PU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function TU(e){e.clearSnapshot()}function T1(e){e.clearMeasurements()}function EU(e){e.isLayoutDirty=!0,e.updateLayout()}function E1(e){e.isLayoutDirty=!1}function jU(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function AU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function j1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function RU(e){e.resolveTargetDelta()}function IU(e){e.calcProjection()}function MU(e){e.resetSkewAndRotation()}function LU(e){e.removeLeadSnapshot()}function A1(e,t,n){e.translate=_e(t.translate,0,n),e.scale=_e(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function R1(e,t,n,r){e.min=_e(t.min,n.min,r),e.max=_e(t.max,n.max,r)}function DU(e,t,n,r){R1(e.x,t.x,n.x,r),R1(e.y,t.y,n.y,r)}function zU(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const NU={duration:.45,ease:[.4,0,.1,1]},I1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),M1=I1("applewebkit/")&&!I1("chrome/")?Math.round:vn;function L1(e){e.min=M1(e.min),e.max=M1(e.max)}function $U(e){L1(e.x),L1(e.y)}function jE(e,t,n){return e==="position"||e==="preserve-aspect"&&!sU(S1(t),S1(n),.2)}function OU(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const FU=EE({attachResizeListener:(e,t)=>hl(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}),mh={current:void 0},AE=EE({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!mh.current){const e=new FU({});e.mount(window),e.setOptions({layoutScroll:!0}),mh.current=e}return mh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jy=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function D1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function BU(...e){return t=>{let n=!1;const r=e.map(i=>{const s=D1(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():D1(e[i],null)}}}}function VU(...e){return P.useCallback(BU(...e),e)}class UU extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(qu(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=qu(r)&&r.offsetWidth||0,s=qu(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 WU({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){var f;const o=P.useId(),a=P.useRef(null),l=P.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=P.useContext(Jy),c=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),d=VU(a,c);return P.useInsertionEffect(()=>{const{width:h,height:p,top:y,left:x,right:m,bottom:v,direction:w}=l.current;if(t||s===!1||!a.current||!h||!p)return;const S=w==="rtl",k=n==="left"?S?`right: ${m}`:`left: ${x}`:S?`left: ${x}`:`right: ${m}`,b=r==="bottom"?`bottom: ${v}`:`top: ${y}`;a.current.dataset.motionPopId=o;const C=document.createElement("style");u&&(C.nonce=u);const T=i??document.head;return T.appendChild(C),C.sheet&&C.sheet.insertRule(`
|
|
73
|
+
[data-motion-pop-id="${o}"] {
|
|
74
|
+
position: absolute !important;
|
|
75
|
+
width: ${h}px !important;
|
|
76
|
+
height: ${p}px !important;
|
|
77
|
+
${k}px !important;
|
|
78
|
+
${b}px !important;
|
|
79
|
+
}
|
|
80
|
+
`),()=>{var A;(A=a.current)==null||A.removeAttribute("data-motion-pop-id"),T.contains(C)&&T.removeChild(C)}},[t]),g.jsx(UU,{isPresent:t,childRef:a,sizeRef:l,pop:s,children:s===!1?e:P.cloneElement(e,{ref:d})})}const HU=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=Ey(ZU),d=P.useId();let f=!0,h=P.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:p=>{c.set(p,!0);for(const y of c.values())if(!y)return;r&&r()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,r]);return s&&f&&(h={...h}),P.useMemo(()=>{c.forEach((p,y)=>c.set(y,!1))},[n]),P.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=g.jsx(WU,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),g.jsx(Kd.Provider,{value:h,children:e})};function ZU(){return new Map}function RE(e=!0){const t=P.useContext(Kd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=P.useId();P.useEffect(()=>{if(e)return i(s)},[e]);const o=P.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const pu=e=>e.key||"";function z1(e){const t=[];return P.Children.forEach(e,n=>{P.isValidElement(n)&&t.push(n)}),t}const ev=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,d]=RE(o),f=P.useMemo(()=>z1(e),[e]),h=o&&!c?[]:f.map(pu),p=P.useRef(!0),y=P.useRef(f),x=Ey(()=>new Map),m=P.useRef(new Set),[v,w]=P.useState(f),[S,k]=P.useState(f);sT(()=>{p.current=!1,y.current=f;for(let T=0;T<S.length;T++){const A=pu(S[T]);h.includes(A)?(x.delete(A),m.current.delete(A)):x.get(A)!==!0&&x.set(A,!1)}},[S,h.length,h.join("-")]);const b=[];if(f!==v){let T=[...f];for(let A=0;A<S.length;A++){const E=S[A],I=pu(E);h.includes(I)||(T.splice(A,0,E),b.push(E))}return s==="wait"&&b.length&&(T=b),k(z1(T)),w(f),null}const{forceRender:C}=P.useContext(Ty);return g.jsx(g.Fragment,{children:S.map(T=>{const A=pu(T),E=o&&!c?!1:f===S||h.includes(A),I=()=>{if(m.current.has(A))return;if(x.has(A))m.current.add(A),x.set(A,!0);else return;let M=!0;x.forEach(F=>{F||(M=!1)}),M&&(C==null||C(),k(y.current),o&&(d==null||d()),r&&r())};return g.jsx(HU,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:E?void 0:I,anchorX:a,anchorY:l,children:T},A)})})},IE=P.createContext({strict:!1}),N1={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 $1=!1;function KU(){if($1)return;const e={};for(const t in N1)e[t]={isEnabled:n=>N1[t].some(r=>!!n[r])};aE(e),$1=!0}function ME(){return KU(),R6()}function GU(e){const t=ME();for(const n in e)t[n]={...t[n],...e[n]};aE(t)}const YU=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 sd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||YU.has(e)}let LE=e=>!sd(e);function XU(e){typeof e=="function"&&(LE=t=>t.startsWith("on")?!sd(t):e(t))}try{XU(require("@emotion/is-prop-valid").default)}catch{}function QU(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||ft(e[i])||(LE(i)||n===!0&&sd(i)||!t&&!sd(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Qd=P.createContext({});function qU(e,t){if(Xd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||fl(n)?n:void 0,animate:fl(r)?r:void 0}}return e.inherit!==!1?t:{}}function JU(e){const{initial:t,animate:n}=qU(e,P.useContext(Qd));return P.useMemo(()=>({initial:t,animate:n}),[O1(t),O1(n)])}function O1(e){return Array.isArray(e)?e.join(" "):e}const tv=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function DE(e,t,n){for(const r in t)!ft(t[r])&&!pE(r,n)&&(e[r]=t[r])}function eW({transformTemplate:e},t){return P.useMemo(()=>{const n=tv();return Qy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tW(e,t){const n=e.style||{},r={};return DE(r,n,e),Object.assign(r,eW(e,t)),r}function nW(e,t){const n={},r=tW(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 zE=()=>({...tv(),attrs:{}});function rW(e,t,n,r){const i=P.useMemo(()=>{const s=zE();return mE(s,t,yE(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};DE(s,e.style,e),i.style={...s,...i.style}}return i}const iW=["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 nv(e){return typeof e!="string"||e.includes("-")?!1:!!(iW.indexOf(e)>-1||/[A-Z]/u.test(e))}function sW(e,t,n,{latestValues:r},i,s=!1,o){const l=(o??nv(e)?rW:nW)(t,r,i,e),u=QU(t,typeof e=="string",s),c=e!==P.Fragment?{...u,...l,ref:n}:{},{children:d}=t,f=P.useMemo(()=>ft(d)?d.get():d,[d]);return P.createElement(e,{...c,children:f})}function oW({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:aW(n,r,i,e),renderState:t()}}function aW(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=rc(s[f]);let{initial:o,animate:a}=e;const l=Xd(e),u=sE(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Yd(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Uy(e,f[h]);if(p){const{transitionEnd:y,transition:x,...m}=p;for(const v in m){let w=m[v];if(Array.isArray(w)){const S=c?w.length-1:0;w=w[S]}w!==null&&(i[v]=w)}for(const v in y)i[v]=y[v]}}}return i}const NE=e=>(t,n)=>{const r=P.useContext(Qd),i=P.useContext(Kd),s=()=>oW(e,t,r,i);return n?s():Ey(s)},lW=NE({scrapeMotionValuesFromProps:qy,createRenderState:tv}),uW=NE({scrapeMotionValuesFromProps:vE,createRenderState:zE}),cW=Symbol.for("motionComponentSymbol");function dW(e,t,n){const r=P.useRef(n);P.useInsertionEffect(()=>{r.current=n});const i=P.useRef(null);return P.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 $E=P.createContext({});function Ls(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function fW(e,t,n,r,i,s){var w,S;const{visualElement:o}=P.useContext(Qd),a=P.useContext(IE),l=P.useContext(Kd),u=P.useContext(Jy),c=u.reducedMotion,d=u.skipAnimations,f=P.useRef(null),h=P.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:s}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,y=P.useContext($E);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&hW(f.current,n,i,y);const x=P.useRef(!1);P.useInsertionEffect(()=>{p&&x.current&&p.update(n,l)});const m=n[KT],v=P.useRef(!!m&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,m))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,m)));return sT(()=>{h.current=!0,p&&(x.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),P.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,m)}),v.current=!1),p.enteringChildren=void 0)}),p}function hW(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:OE(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Ls(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function OE(e){if(e)return e.options.allowProjection!==!1?e.projection:OE(e.parent)}function gh(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&GU(r);const s=n?n==="svg":nv(e),o=s?uW:lW;function a(u,c){let d;const f={...P.useContext(Jy),...u,layoutId:pW(u)},{isStatic:h}=f,p=JU(u),y=o(u,h);if(!h&&typeof window<"u"){mW();const x=gW(f);d=x.MeasureLayout,p.visualElement=fW(e,y,f,i,x.ProjectionNode,s)}return g.jsxs(Qd.Provider,{value:p,children:[d&&p.visualElement?g.jsx(d,{visualElement:p.visualElement,...f}):null,sW(e,u,dW(y,p.visualElement,c),y,h,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=P.forwardRef(a);return l[cW]=e,l}function pW({layoutId:e}){const t=P.useContext(Ty).id;return t&&e!==void 0?t+"-"+e:e}function mW(e,t){P.useContext(IE).strict}function gW(e){const t=ME(),{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 yW(e,t){if(typeof Proxy>"u")return gh;const n=new Map,r=(s,o)=>gh(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,gh(o,void 0,e,t)),n.get(o))})}const vW=(e,t)=>t.isSVG??nv(e)?new G6(t):new V6(t,{allowProjection:e!==P.Fragment});class xW extends Ci{constructor(t){super(t),t.animationState||(t.animationState=J6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let wW=0;class bW extends Ci{constructor(){super(...arguments),this.id=wW++,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=is(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...d}=l;for(const f in d)(s=this.node.getValue(f))==null||s.jump(d[f])}}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 SW={animation:{Feature:xW},exit:{Feature:bW}};function Ml(e){return{point:{x:e.pageX,y:e.pageY}}}const _W=e=>t=>Zy(t)&&e(t,Ml(t));function La(e,t,n,r){return hl(e,t,_W(n),r)}const FE=({current:e})=>e?e.ownerDocument.defaultView:null,F1=(e,t)=>Math.abs(e-t);function kW(e,t){const n=F1(e.x,t.x),r=F1(e.y,t.y);return Math.sqrt(n**2+r**2)}const B1=new Set(["auto","scroll"]);class BE{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=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=mu(this.lastRawMoveEventInfo,this.transformPagePoint));const h=yh(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=kW(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!y)return;const{point:x}=h,{timestamp:m}=ut;this.history.push({...x,timestamp:m});const{onStart:v,onMove:w}=this.handlers;p||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=mu(p,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:m}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=yh(h.type==="pointercancel"?this.lastMoveEventInfo:mu(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(h,v),x&&x(h,v)},!Zy(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=Ml(t),u=mu(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=ut;this.history=[{...c,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,yh(u,this.history)),this.removeListeners=Al(La(this.contextWindow,"pointermove",this.handlePointerMove),La(this.contextWindow,"pointerup",this.handlePointerUp),La(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(B1.has(r.overflowX)||B1.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),Ce.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),wi(this.updatePoint)}}function mu(e,t){return t?{point:t(e.point)}:e}function V1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function yh({point:e},t){return{point:e,delta:V1(e,VE(t)),offset:V1(e,CW(t)),velocity:PW(t,.1)}}function CW(e){return e[0]}function VE(e){return e[e.length-1]}function PW(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=VE(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>en(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>en(t)*2&&(r=e[1]);const s=hn(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 TW(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?_e(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?_e(n,e,r.max):Math.min(e,n)),e}function U1(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 EW(e,{top:t,left:n,bottom:r,right:i}){return{x:U1(e.x,n,i),y:U1(e.y,t,r)}}function W1(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 jW(e,t){return{x:W1(e.x,t.x),y:W1(e.y,t.y)}}function AW(e,t){let n=.5;const r=Tt(e),i=Tt(t);return i>r?n=cl(t.min,t.max-r,e.min):r>i&&(n=cl(e.min,e.max-i,t.min)),ar(0,1,n)}function RW(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 Em=.35;function IW(e=Em){return e===!1?e=0:e===!0&&(e=Em),{x:H1(e,"left","right"),y:H1(e,"top","bottom")}}function H1(e,t,n){return{min:Z1(e,t),max:Z1(e,n)}}function Z1(e,t){return typeof e=="number"?e:e[t]||0}const MW=new WeakMap;class LW{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=et(),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(Ml(d).point),this.stopAnimation()},o=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:y}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=l6(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Kn(m=>{let v=this.getAxisMotionValue(m).get()||0;if(ir.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[m];S&&(v=Tt(S)*(parseFloat(v)/100))}}this.originPoint[m]=v}),y&&Ce.update(()=>y(d,f),!1,!0),xm(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:y,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:m}=f;if(p&&this.currentDirection===null){this.currentDirection=zW(m),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,m),this.updateAxis("y",f.point,m),this.visualElement.render(),x&&Ce.update(()=>x(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new BE(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:FE(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&&Ce.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||!gu(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=TW(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Ls(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=EW(r.layoutBox,t):this.constraints=!1,this.elastic=IW(n),i!==this.constraints&&!Ls(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Kn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=RW(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ls(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const s=z6(r,i.root,this.visualElement.getTransformPagePoint());let o=jW(i.layout.layoutBox,s);if(n){const a=n(M6(o));this.hasMutatedConstraints=!!a,a&&(o=uE(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Kn(c=>{if(!gu(c,n,this.currentDirection))return;let d=l&&l[c]||{};(o===!0||o===c)&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return xm(this.visualElement,t),r.start(Vy(t,r,0,n,this.visualElement,!1))}stopAnimation(){Kn(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){Kn(n=>{const{drag:r}=this.getProps();if(!gu(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]-_e(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ls(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Kn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=AW({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(),Kn(o=>{if(!gu(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(_e(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;MW.set(this.visualElement,this);const t=this.visualElement.current,n=La(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),f=u.target,h=f!==t&&p6(f);c&&d&&!h&&this.start(u)});let r;const i=()=>{const{dragConstraints:u}=this.getProps();Ls(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=DW(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ce.read(i);const a=hl(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Kn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=u[d].translate,f.set(f.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Em,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function K1(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function DW(e,t,n){const r=e1(e,K1(n)),i=e1(t,K1(n));return()=>{r(),i()}}function gu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function zW(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class NW extends Ci{constructor(t){super(t),this.removeGroupControls=vn,this.removeListeners=vn,this.controls=new LW(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vn}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 vh=e=>(t,n)=>{e&&Ce.update(()=>e(t,n),!1,!0)};class $W extends Ci{constructor(){super(...arguments),this.removePointerDownListener=vn}onPointerDown(t){this.session=new BE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:FE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:vh(t),onStart:vh(n),onMove:vh(r),onEnd:(s,o)=>{delete this.session,i&&Ce.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=La(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let xh=!1;class OW extends P.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),xh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ic.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}),xh=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Ce.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(),Hy.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;xh=!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 UE(e){const[t,n]=RE(),r=P.useContext(Ty);return g.jsx(OW,{...e,layoutGroup:r,switchLayoutGroup:P.useContext($E),isPresent:t,safeToRemove:n})}const FW={pan:{Feature:$W},drag:{Feature:NW,ProjectionNode:AE,MeasureLayout:UE}};function G1(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&&Ce.postRender(()=>s(t,Ml(t)))}class BW extends Ci{mount(){const{current:t}=this.node;t&&(this.unmount=c6(t,(n,r)=>(G1(this.node,r,"Start"),i=>G1(this.node,i,"End"))))}unmount(){}}class VW extends Ci{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=Al(hl(this.node.current,"focus",()=>this.onFocus()),hl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Y1(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&&Ce.postRender(()=>s(t,Ml(t)))}class UW extends Ci{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=g6(t,(i,s)=>(Y1(this.node,s,"Start"),(o,{success:a})=>Y1(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const jm=new WeakMap,wh=new WeakMap,WW=e=>{const t=jm.get(e.target);t&&t(e)},HW=e=>{e.forEach(WW)};function ZW({root:e,...t}){const n=e||document;wh.has(n)||wh.set(n,{});const r=wh.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(HW,{root:e,...t})),r[i]}function KW(e,t,n){const r=ZW(t);return jm.set(e,n),r.observe(e),()=>{jm.delete(e),r.unobserve(e)}}const GW={some:0,all:1};class YW extends Ci{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:GW[i]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=c?d:f;h&&h(u)};this.stopObserver=KW(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(XW(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function XW({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const QW={inView:{Feature:YW},tap:{Feature:UW},focus:{Feature:VW},hover:{Feature:BW}},qW={layout:{ProjectionNode:AE,MeasureLayout:UE}},JW={...SW,...QW,...FW,...qW},od=yW(JW,vW);function rv(){!Xy.current&&oE();const[e]=P.useState(td.current);return e}const oe={serif:"'Luminari', 'Cormorant Garamond', Georgia, serif",body:"'Cormorant Garamond', Georgia, serif",handwritten:"'Caveat', cursive",mono:"'JetBrains Mono', monospace"},L={1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem"},be={"2xs":"0.75rem",xs:"0.875rem",sm:"1rem",base:"1.125rem",md:"1.25rem",lg:"1.5rem"},xn={tight:1.2,normal:1.5,relaxed:1.7},st={textPrimary:"#1A1917",textSecondary:"#68635C",accentAmberDark:"#A67B4F",accentGreenDark:"#5E8A66",deskBg:"#1e3a2d",deskLight:"#264a3a",deskText:"#e8e4d9",deskTextMuted:"#a8b5a0",deskBorder:"rgba(200, 210, 195, 0.15)",deskChalk:"#d4e8cb"},WE={sidebarWidth:220,stackPanelWidth:480},e8=["idea","planned","in-progress","review","done","dropped"],t8=["feat","fix","chore","docs","refactor"],br=["claude-code","opencode"],Da={"claude-code":"Claude Code",opencode:"OpenCode"},Es={phase:"opencode",planDraft:"claude-code",ideaExtend:"claude-code"},n8=t8.map(e=>({value:e,label:e})),r8=({open:e,onClose:t,onAdd:n})=>{const[r,i]=P.useState(""),[s,o]=P.useState(""),[a,l]=P.useState("feat"),[u,c]=P.useState(!1);P.useEffect(()=>{e&&(i(""),o(""),l("feat"),c(!1))},[e]);const d=async f=>{f.preventDefault(),!(!r.trim()||u)&&(c(!0),await n({title:r.trim(),content:s.trim()||void 0,kind:a}),c(!1),t())};return g.jsx(Py,{open:e,onClose:t,title:"Add to backlog",size:"small",children:g.jsxs("form",{onSubmit:d,style:{display:"flex",flexDirection:"column",gap:L[4]},children:[g.jsx(vi,{label:"Title",value:r,onChange:f=>i(f.target.value),placeholder:"Backlog item title…",disabled:u,autoFocus:!0,required:!0}),g.jsx(uo,{label:"Kind",value:a,onChange:f=>l(f),options:n8,disabled:u}),g.jsx(jl,{label:"Description",value:s,onChange:f=>o(f.target.value),placeholder:"Optional details…",disabled:u,rows:4}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:L[2]},children:[g.jsx(ge,{type:"button",variant:"ghost",onClick:t,disabled:u,children:"Cancel"}),g.jsx(ge,{type:"submit",variant:"primary",disabled:!r.trim()||u,children:"Add"})]})]})})},Am=({children:e,onClick:t})=>g.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",padding:0,color:st.accentAmberDark,cursor:"pointer",textDecoration:"underline",font:"inherit"},children:e});function i8(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const s8=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o8=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,a8={};function X1(e,t){return(a8.jsx?o8:s8).test(e)}const l8=/[ \t\n\f\r]/g;function u8(e){return typeof e=="object"?e.type==="text"?Q1(e.value):!1:Q1(e)}function Q1(e){return e.replace(l8,"")===""}class Ll{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ll.prototype.normal={};Ll.prototype.property={};Ll.prototype.space=void 0;function HE(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ll(n,r,t)}function Rm(e){return e.toLowerCase()}class Ut{constructor(t,n){this.attribute=n,this.property=t}}Ut.prototype.attribute="";Ut.prototype.booleanish=!1;Ut.prototype.boolean=!1;Ut.prototype.commaOrSpaceSeparated=!1;Ut.prototype.commaSeparated=!1;Ut.prototype.defined=!1;Ut.prototype.mustUseProperty=!1;Ut.prototype.number=!1;Ut.prototype.overloadedBoolean=!1;Ut.prototype.property="";Ut.prototype.spaceSeparated=!1;Ut.prototype.space=void 0;let c8=0;const re=xs(),Ze=xs(),Im=xs(),H=xs(),we=xs(),ss=xs(),Yt=xs();function xs(){return 2**++c8}const Mm=Object.freeze(Object.defineProperty({__proto__:null,boolean:re,booleanish:Ze,commaOrSpaceSeparated:Yt,commaSeparated:ss,number:H,overloadedBoolean:Im,spaceSeparated:we},Symbol.toStringTag,{value:"Module"})),bh=Object.keys(Mm);class iv extends Ut{constructor(t,n,r,i){let s=-1;if(super(t,n),q1(this,"space",i),typeof r=="number")for(;++s<bh.length;){const o=bh[s];q1(this,bh[s],(r&Mm[o])===Mm[o])}}}iv.prototype.defined=!0;function q1(e,t,n){n&&(e[t]=n)}function Oo(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new iv(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Rm(r)]=r,n[Rm(s.attribute)]=r}return new Ll(t,n,e.space)}const ZE=Oo({properties:{ariaActiveDescendant:null,ariaAtomic:Ze,ariaAutoComplete:null,ariaBusy:Ze,ariaChecked:Ze,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:we,ariaCurrent:null,ariaDescribedBy:we,ariaDetails:null,ariaDisabled:Ze,ariaDropEffect:we,ariaErrorMessage:null,ariaExpanded:Ze,ariaFlowTo:we,ariaGrabbed:Ze,ariaHasPopup:null,ariaHidden:Ze,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:we,ariaLevel:H,ariaLive:null,ariaModal:Ze,ariaMultiLine:Ze,ariaMultiSelectable:Ze,ariaOrientation:null,ariaOwns:we,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Ze,ariaReadOnly:Ze,ariaRelevant:null,ariaRequired:Ze,ariaRoleDescription:we,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Ze,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function KE(e,t){return t in e?e[t]:t}function GE(e,t){return KE(e,t.toLowerCase())}const d8=Oo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ss,acceptCharset:we,accessKey:we,action:null,allow:null,allowFullScreen:re,allowPaymentRequest:re,allowUserMedia:re,alpha:re,alt:null,as:null,async:re,autoCapitalize:null,autoComplete:we,autoFocus:re,autoPlay:re,blocking:we,capture:null,charSet:null,checked:re,cite:null,className:we,closedBy:null,colorSpace:null,cols:H,colSpan:H,command:null,commandFor:null,content:null,contentEditable:Ze,controls:re,controlsList:we,coords:H|ss,crossOrigin:null,data:null,dateTime:null,decoding:null,default:re,defer:re,dir:null,dirName:null,disabled:re,download:Im,draggable:Ze,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:re,formTarget:null,headers:we,height:H,hidden:Im,high:H,href:null,hrefLang:null,htmlFor:we,httpEquiv:we,id:null,imageSizes:null,imageSrcSet:null,inert:re,inputMode:null,integrity:null,is:null,isMap:re,itemId:null,itemProp:we,itemRef:we,itemScope:re,itemType:we,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:re,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:re,muted:re,name:null,nonce:null,noModule:re,noValidate:re,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:re,optimum:H,pattern:null,ping:we,placeholder:null,playsInline:re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:re,referrerPolicy:null,rel:we,required:re,reversed:re,rows:H,rowSpan:H,sandbox:we,scope:null,scoped:re,seamless:re,selected:re,shadowRootClonable:re,shadowRootCustomElementRegistry:re,shadowRootDelegatesFocus:re,shadowRootMode:null,shadowRootSerializable:re,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Ze,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:re,useMap:null,value:Ze,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:we,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:re,declare:re,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:re,noHref:re,noShade:re,noWrap:re,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Ze,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:re,disablePictureInPicture:re,disableRemotePlayback:re,exportParts:ss,part:we,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:GE}),f8=Oo({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:Yt,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:we,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:re,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ss,g2:ss,glyphName:ss,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Yt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:we,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Yt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Yt,rev:Yt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Yt,requiredFeatures:Yt,requiredFonts:Yt,requiredFormats:Yt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Yt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Yt,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Yt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:KE}),YE=Oo({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()}}),XE=Oo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:GE}),QE=Oo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),h8={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"},p8=/[A-Z]/g,J1=/-[a-z]/g,m8=/^data[-\w.:]+$/i;function g8(e,t){const n=Rm(t);let r=t,i=Ut;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&m8.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(J1,v8);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!J1.test(s)){let o=s.replace(p8,y8);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=iv}return new i(r,t)}function y8(e){return"-"+e.toLowerCase()}function v8(e){return e.charAt(1).toUpperCase()}const x8=HE([ZE,d8,YE,XE,QE],"html"),sv=HE([ZE,f8,YE,XE,QE],"svg");function w8(e){return e.join(" ").trim()}var ov={},eb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,b8=/\n/g,S8=/^\s*/,_8=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,k8=/^:\s*/,C8=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,P8=/^[;\s]*/,T8=/^\s+|\s+$/g,E8=`
|
|
81
|
+
`,tb="/",nb="*",Fi="",j8="comment",A8="declaration";function R8(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var y=p.match(b8);y&&(n+=y.length);var x=p.lastIndexOf(E8);r=~x?p.length-x:r+p.length}function s(){var p={line:n,column:r};return function(y){return y.position=new o(p),u(),y}}function o(p){this.start=p,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(p){var y=new Error(t.source+":"+n+":"+r+": "+p);if(y.reason=p,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function l(p){var y=p.exec(e);if(y){var x=y[0];return i(x),e=e.slice(x.length),y}}function u(){l(S8)}function c(p){var y;for(p=p||[];y=d();)y!==!1&&p.push(y);return p}function d(){var p=s();if(!(tb!=e.charAt(0)||nb!=e.charAt(1))){for(var y=2;Fi!=e.charAt(y)&&(nb!=e.charAt(y)||tb!=e.charAt(y+1));)++y;if(y+=2,Fi===e.charAt(y-1))return a("End of comment missing");var x=e.slice(2,y-2);return r+=2,i(x),e=e.slice(y),r+=2,p({type:j8,comment:x})}}function f(){var p=s(),y=l(_8);if(y){if(d(),!l(k8))return a("property missing ':'");var x=l(C8),m=p({type:A8,property:rb(y[0].replace(eb,Fi)),value:x?rb(x[0].replace(eb,Fi)):Fi});return l(P8),m}}function h(){var p=[];c(p);for(var y;y=f();)y!==!1&&(p.push(y),c(p));return p}return u(),h()}function rb(e){return e?e.replace(T8,Fi):Fi}var I8=R8,M8=lc&&lc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ov,"__esModule",{value:!0});ov.default=D8;const L8=M8(I8);function D8(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,L8.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 qd={};Object.defineProperty(qd,"__esModule",{value:!0});qd.camelCase=void 0;var z8=/^--[a-zA-Z0-9_-]+$/,N8=/-([a-z])/g,$8=/^[^-]+$/,O8=/^-(webkit|moz|ms|o|khtml)-/,F8=/^-(ms)-/,B8=function(e){return!e||$8.test(e)||z8.test(e)},V8=function(e,t){return t.toUpperCase()},ib=function(e,t){return"".concat(t,"-")},U8=function(e,t){return t===void 0&&(t={}),B8(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(F8,ib):e=e.replace(O8,ib),e.replace(N8,V8))};qd.camelCase=U8;var W8=lc&&lc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},H8=W8(ov),Z8=qd;function Lm(e,t){var n={};return!e||typeof e!="string"||(0,H8.default)(e,function(r,i){r&&i&&(n[(0,Z8.camelCase)(r,t)]=i)}),n}Lm.default=Lm;var K8=Lm;const G8=yd(K8),qE=JE("end"),av=JE("start");function JE(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 Y8(e){const t=av(e),n=qE(e);if(t&&n)return{start:t,end:n}}function za(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?sb(e.position):"start"in e||"end"in e?sb(e):"line"in e||"column"in e?Dm(e):""}function Dm(e){return ob(e&&e.line)+":"+ob(e&&e.column)}function sb(e){return Dm(e&&e.start)+"-"+Dm(e&&e.end)}function ob(e){return e&&typeof e=="number"?e:1}class bt 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=za(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}}bt.prototype.file="";bt.prototype.name="";bt.prototype.reason="";bt.prototype.message="";bt.prototype.stack="";bt.prototype.column=void 0;bt.prototype.line=void 0;bt.prototype.ancestors=void 0;bt.prototype.cause=void 0;bt.prototype.fatal=void 0;bt.prototype.place=void 0;bt.prototype.ruleId=void 0;bt.prototype.source=void 0;const lv={}.hasOwnProperty,X8=new Map,Q8=/[A-Z]/g,q8=new Set(["table","tbody","thead","tfoot","tr"]),J8=new Set(["td","th"]),ej="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function e9(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=l9(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=a9(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"?sv:x8,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=tj(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function tj(e,t,n){if(t.type==="element")return t9(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return n9(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return i9(e,t,n);if(t.type==="mdxjsEsm")return r9(e,t);if(t.type==="root")return s9(e,t,n);if(t.type==="text")return o9(e,t)}function t9(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=sv,e.schema=i),e.ancestors.push(t);const s=rj(e,t.tagName,!1),o=u9(e,t);let a=cv(e,t);return q8.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!u8(l):!0})),nj(e,o,s,t),uv(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function n9(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)}pl(e,t.position)}function r9(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);pl(e,t.position)}function i9(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=sv,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:rj(e,t.name,!0),o=c9(e,t),a=cv(e,t);return nj(e,o,s,t),uv(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function s9(e,t,n){const r={};return uv(r,cv(e,t)),e.create(t,e.Fragment,r,n)}function o9(e,t){return t.value}function nj(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function uv(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function a9(e,t,n){return r;function r(i,s,o,a){const u=Array.isArray(o.children)?n:t;return a?u(s,o,a):u(s,o)}}function l9(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=av(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 u9(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&lv.call(t.properties,i)){const s=d9(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&J8.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 c9(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 pl(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 pl(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function cv(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:X8;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;o=l+"-"+u,i.set(l,u+1)}}const a=tj(e,s,o);a!==void 0&&n.push(a)}return n}function d9(e,t,n){const r=g8(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?i8(n):w8(n)),r.property==="style"){let i=typeof n=="object"?n:f9(e,String(n));return e.stylePropertyNameCase==="css"&&(i=h9(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?h8[r.property]||r.property:r.attribute,n]}}function f9(e,t){try{return G8(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new bt("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=ej+"#cannot-parse-style-attribute",i}}function rj(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=X1(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=X1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return lv.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);pl(e)}function pl(e,t){const n=new bt("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=ej+"#cannot-handle-mdx-estrees-without-createevaluater",n}function h9(e){const t={};let n;for(n in e)lv.call(e,n)&&(t[p9(n)]=e[n]);return t}function p9(e){let t=e.replace(Q8,m9);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function m9(e){return"-"+e.toLowerCase()}const Sh={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"]},g9={};function y9(e,t){const n=g9,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ij(e,r,i)}function ij(e,t,n){if(v9(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 ab(e.children,t,n)}return Array.isArray(e)?ab(e,t,n):""}function ab(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ij(e[i],t,n);return r.join("")}function v9(e){return!!(e&&typeof e=="object")}const lb=document.createElement("i");function dv(e){const t="&"+e+";";lb.innerHTML=t;const n=lb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function lr(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 cn(e,t){return e.length>0?(lr(e,e.length,0,t),e):t}const ub={}.hasOwnProperty;function x9(e){const t={};let n=-1;for(;++n<e.length;)w9(t,e[n]);return t}function w9(e,t){let n;for(n in t){const i=(ub.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){ub.call(i,o)||(i[o]=[]);const a=s[o];b9(i[o],Array.isArray(a)?a:a?[a]:[])}}}function b9(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);lr(e,0,0,r)}function sj(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 co(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Jn=Pi(/[A-Za-z]/),qt=Pi(/[\dA-Za-z]/),S9=Pi(/[#-'*+\--9=?A-Z^-~]/);function zm(e){return e!==null&&(e<32||e===127)}const Nm=Pi(/\d/),_9=Pi(/[\dA-Fa-f]/),k9=Pi(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function Bt(e){return e!==null&&(e<0||e===32)}function me(e){return e===-2||e===-1||e===32}const C9=Pi(new RegExp("\\p{P}|\\p{S}","u")),P9=Pi(/\s/);function Pi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Fo(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&qt(e.charCodeAt(n+1))&&qt(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 Te(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 T9={tokenize:E9};function E9(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"),Te(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 j9={tokenize:A9},cb={tokenize:R9};function A9(e){const t=this,n=[];let r=0,i,s,o;return a;function a(w){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const S=t.events.length;let k=S,b;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){b=t.events[k][1].end;break}m(r);let C=S;for(;C<t.events.length;)t.events[C][1].end={...b},C++;return lr(t.events,k+1,0,t.events.slice(S)),t.events.length=C,u(w)}return a(w)}function u(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return p(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cb,c,d)(w)}function c(w){return i&&v(),m(r),f(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,p(w)}function f(w){return t.containerState={},e.attempt(cb,h,p)(w)}function h(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function p(w){if(w===null){i&&v(),m(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),y(w)}function y(w){if(w===null){x(e.exit("chunkFlow"),!0),m(0),e.consume(w);return}return te(w)?(e.consume(w),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(w),y)}function x(w,S){const k=t.sliceStream(w);if(S&&k.push(null),w.previous=s,s&&(s.next=w),s=w,i.defineSkip(w.start),i.write(k),t.parser.lazy[w.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<o&&(!i.events[b][1].end||i.events[b][1].end.offset>o))return;const C=t.events.length;let T=C,A,E;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(A){E=t.events[T][1].end;break}A=!0}for(m(r),b=C;b<t.events.length;)t.events[b][1].end={...E},b++;lr(t.events,T+1,0,t.events.slice(C)),t.events.length=b}}function m(w){let S=n.length;for(;S-- >w;){const k=n[S];t.containerState=k[1],k[0].exit.call(t,e)}n.length=w}function v(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function R9(e,t,n){return Te(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function db(e){if(e===null||Bt(e)||P9(e))return 1;if(C9(e))return 2}function fv(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 $m={name:"attention",resolveAll:I9,tokenize:M9};function I9(e,t){let n=-1,r,i,s,o,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};fb(d,-l),fb(f,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:f},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=cn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=cn(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),u=cn(u,fv(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=cn(u,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=cn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,lr(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function M9(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=db(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const u=e.exit("attentionSequence"),c=db(l),d=!c||c===2&&i||n.includes(l),f=!i||i===2&&c||n.includes(r);return u._open=!!(s===42?d:d&&(i||!f)),u._close=!!(s===42?f:f&&(c||!d)),t(l)}}function fb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const L9={name:"autolink",tokenize:D9};function D9(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(h){return Jn(h)?(e.consume(h),o):h===64?n(h):u(h)}function o(h){return h===43||h===45||h===46||qt(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||qt(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||zm(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),c):S9(h)?(e.consume(h),u):n(h)}function c(h){return qt(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||qt(h))&&r++<63){const p=h===45?f:d;return e.consume(h),p}return n(h)}}const Jd={partial:!0,tokenize:z9};function z9(e,t,n){return r;function r(s){return me(s)?Te(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||te(s)?t(s):n(s)}}const oj={continuation:{tokenize:$9},exit:O9,name:"blockQuote",tokenize:N9};function N9(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 $9(e,t,n){const r=this;return i;function i(o){return me(o)?Te(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(oj,t,n)(o)}}function O9(e){e.exit("blockQuote")}const aj={name:"characterEscape",tokenize:F9};function F9(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 k9(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const lj={name:"characterReference",tokenize:B9};function B9(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,o=qt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=_9,c):(e.enter("characterReferenceValue"),s=7,o=Nm,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return o===qt&&!dv(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),c):n(d)}}const hb={partial:!0,tokenize:U9},pb={concrete:!0,name:"codeFenced",tokenize:V9};function V9(e,t,n){const r=this,i={partial:!0,tokenize:k};let s=0,o=0,a;return l;function l(b){return u(b)}function u(b){const C=r.events[r.events.length-1];return s=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(b)}function c(b){return b===a?(o++,e.consume(b),c):o<3?n(b):(e.exit("codeFencedFenceSequence"),me(b)?Te(e,d,"whitespace")(b):d(b))}function d(b){return b===null||te(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(hb,y,S)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===null||te(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(b)):me(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Te(e,h,"whitespace")(b)):b===96&&b===a?n(b):(e.consume(b),f)}function h(b){return b===null||te(b)?d(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||te(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(b)):b===96&&b===a?n(b):(e.consume(b),p)}function y(b){return e.attempt(i,S,x)(b)}function x(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m}function m(b){return s>0&&me(b)?Te(e,v,"linePrefix",s+1)(b):v(b)}function v(b){return b===null||te(b)?e.check(hb,y,S)(b):(e.enter("codeFlowValue"),w(b))}function w(b){return b===null||te(b)?(e.exit("codeFlowValue"),v(b)):(e.consume(b),w)}function S(b){return e.exit("codeFenced"),t(b)}function k(b,C,T){let A=0;return E;function E($){return b.enter("lineEnding"),b.consume($),b.exit("lineEnding"),I}function I($){return b.enter("codeFencedFence"),me($)?Te(b,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):M($)}function M($){return $===a?(b.enter("codeFencedFenceSequence"),F($)):T($)}function F($){return $===a?(A++,b.consume($),F):A>=o?(b.exit("codeFencedFenceSequence"),me($)?Te(b,B,"whitespace")($):B($)):T($)}function B($){return $===null||te($)?(b.exit("codeFencedFence"),C($)):T($)}}}function U9(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 _h={name:"codeIndented",tokenize:H9},W9={partial:!0,tokenize:Z9};function H9(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Te(e,s,"linePrefix",5)(u)}function s(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):te(u)?e.attempt(W9,o,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||te(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function Z9(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):Te(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 K9={name:"codeText",previous:Y9,resolve:G9,tokenize:X9};function G9(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 Y9(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function X9(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,c(d)):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||te(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}class Q9{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&&aa(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),aa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),aa(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);aa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);aa(this.left,n.reverse())}}}function aa(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 uj(e){const t={};let n=-1,r,i,s,o,a,l,u;const c=new Q9(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,q9(c,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=c.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return lr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function q9(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],u={};let c,d,f=-1,h=n,p=0,y=0;const x=[y];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(y=f+1,x.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):x.pop(),f=x.length;f--;){const m=a.slice(x[f],x[f+1]),v=s.pop();l.push([v,v+m.length-1]),e.splice(v,2,m)}for(l.reverse(),f=-1;++f<l.length;)u[p+l[f][0]]=p+l[f][1],p+=l[f][1]-l[f][0]-1;return u}const J9={resolve:tH,tokenize:nH},eH={partial:!0,tokenize:rH};function tH(e){return uj(e),e}function nH(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(eH,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 rH(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Te(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 cj(e,t,n,r,i,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(m){return m===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(m),e.exit(s),f):m===null||m===32||m===41||zm(m)?n(m):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(m))}function f(m){return m===62?(e.enter(s),e.consume(m),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===62?(e.exit("chunkString"),e.exit(a),f(m)):m===null||m===60||te(m)?n(m):(e.consume(m),m===92?p:h)}function p(m){return m===60||m===62||m===92?(e.consume(m),h):h(m)}function y(m){return!c&&(m===null||m===41||Bt(m))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(m)):c<u&&m===40?(e.consume(m),c++,y):m===41?(e.consume(m),c--,y):m===null||m===32||m===40||zm(m)?n(m):(e.consume(m),m===92?x:y)}function x(m){return m===40||m===41||m===92?(e.consume(m),y):y(m)}}function dj(e,t,n,r,i,s){const o=this;let a=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(s),c}function c(h){return a>999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(e.exit(s),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||te(h)||a++>999?(e.exit("chunkString"),c(h)):(e.consume(h),l||(l=!me(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function fj(e,t,n,r,i,s){let o;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),o=f===40?41:f,l):n(f)}function l(f){return f===o?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(s),u(f))}function u(f){return f===o?(e.exit(s),l(o)):f===null?n(f):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Te(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===o||f===null||te(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===o||f===92?(e.consume(f),c):c(f)}}function Na(e,t){let n;return r;function r(i){return te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):me(i)?Te(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const iH={name:"definition",tokenize:oH},sH={partial:!0,tokenize:aH};function oH(e,t,n){const r=this;let i;return s;function s(h){return e.enter("definition"),o(h)}function o(h){return dj.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=co(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return Bt(h)?Na(e,u)(h):u(h)}function u(h){return cj(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(sH,d,d)(h)}function d(h){return me(h)?Te(e,f,"whitespace")(h):f(h)}function f(h){return h===null||te(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function aH(e,t,n){return r;function r(a){return Bt(a)?Na(e,i)(a):n(a)}function i(a){return fj(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return me(a)?Te(e,o,"whitespace")(a):o(a)}function o(a){return a===null||te(a)?t(a):n(a)}}const lH={name:"hardBreakEscape",tokenize:uH};function uH(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 cH={name:"headingAtx",resolve:dH,tokenize:fH};function dH(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"},lr(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function fH(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||Bt(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||te(c)?(e.exit("atxHeading"),t(c)):me(c)?Te(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||Bt(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const hH=["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"],mb=["pre","script","style","textarea"],pH={concrete:!0,name:"htmlFlow",resolveTo:yH,tokenize:vH},mH={partial:!0,tokenize:wH},gH={partial:!0,tokenize:xH};function yH(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 vH(e,t,n){const r=this;let i,s,o,a,l;return u;function u(j){return c(j)}function c(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),d}function d(j){return j===33?(e.consume(j),f):j===47?(e.consume(j),s=!0,y):j===63?(e.consume(j),i=3,r.interrupt?t:_):Jn(j)?(e.consume(j),o=String.fromCharCode(j),x):n(j)}function f(j){return j===45?(e.consume(j),i=2,h):j===91?(e.consume(j),i=5,a=0,p):Jn(j)?(e.consume(j),i=4,r.interrupt?t:_):n(j)}function h(j){return j===45?(e.consume(j),r.interrupt?t:_):n(j)}function p(j){const ie="CDATA[";return j===ie.charCodeAt(a++)?(e.consume(j),a===ie.length?r.interrupt?t:M:p):n(j)}function y(j){return Jn(j)?(e.consume(j),o=String.fromCharCode(j),x):n(j)}function x(j){if(j===null||j===47||j===62||Bt(j)){const ie=j===47,de=o.toLowerCase();return!ie&&!s&&mb.includes(de)?(i=1,r.interrupt?t(j):M(j)):hH.includes(o.toLowerCase())?(i=6,ie?(e.consume(j),m):r.interrupt?t(j):M(j)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):s?v(j):w(j))}return j===45||qt(j)?(e.consume(j),o+=String.fromCharCode(j),x):n(j)}function m(j){return j===62?(e.consume(j),r.interrupt?t:M):n(j)}function v(j){return me(j)?(e.consume(j),v):E(j)}function w(j){return j===47?(e.consume(j),E):j===58||j===95||Jn(j)?(e.consume(j),S):me(j)?(e.consume(j),w):E(j)}function S(j){return j===45||j===46||j===58||j===95||qt(j)?(e.consume(j),S):k(j)}function k(j){return j===61?(e.consume(j),b):me(j)?(e.consume(j),k):w(j)}function b(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),l=j,C):me(j)?(e.consume(j),b):T(j)}function C(j){return j===l?(e.consume(j),l=null,A):j===null||te(j)?n(j):(e.consume(j),C)}function T(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||Bt(j)?k(j):(e.consume(j),T)}function A(j){return j===47||j===62||me(j)?w(j):n(j)}function E(j){return j===62?(e.consume(j),I):n(j)}function I(j){return j===null||te(j)?M(j):me(j)?(e.consume(j),I):n(j)}function M(j){return j===45&&i===2?(e.consume(j),G):j===60&&i===1?(e.consume(j),Z):j===62&&i===4?(e.consume(j),z):j===63&&i===3?(e.consume(j),_):j===93&&i===5?(e.consume(j),V):te(j)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(mH,Y,F)(j)):j===null||te(j)?(e.exit("htmlFlowData"),F(j)):(e.consume(j),M)}function F(j){return e.check(gH,B,Y)(j)}function B(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),$}function $(j){return j===null||te(j)?F(j):(e.enter("htmlFlowData"),M(j))}function G(j){return j===45?(e.consume(j),_):M(j)}function Z(j){return j===47?(e.consume(j),o="",D):M(j)}function D(j){if(j===62){const ie=o.toLowerCase();return mb.includes(ie)?(e.consume(j),z):M(j)}return Jn(j)&&o.length<8?(e.consume(j),o+=String.fromCharCode(j),D):M(j)}function V(j){return j===93?(e.consume(j),_):M(j)}function _(j){return j===62?(e.consume(j),z):j===45&&i===2?(e.consume(j),_):M(j)}function z(j){return j===null||te(j)?(e.exit("htmlFlowData"),Y(j)):(e.consume(j),z)}function Y(j){return e.exit("htmlFlow"),t(j)}}function xH(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 wH(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Jd,t,n)}}const bH={name:"htmlText",tokenize:SH};function SH(e,t,n){const r=this;let i,s,o;return a;function a(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),l}function l(_){return _===33?(e.consume(_),u):_===47?(e.consume(_),k):_===63?(e.consume(_),w):Jn(_)?(e.consume(_),T):n(_)}function u(_){return _===45?(e.consume(_),c):_===91?(e.consume(_),s=0,p):Jn(_)?(e.consume(_),v):n(_)}function c(_){return _===45?(e.consume(_),h):n(_)}function d(_){return _===null?n(_):_===45?(e.consume(_),f):te(_)?(o=d,Z(_)):(e.consume(_),d)}function f(_){return _===45?(e.consume(_),h):d(_)}function h(_){return _===62?G(_):_===45?f(_):d(_)}function p(_){const z="CDATA[";return _===z.charCodeAt(s++)?(e.consume(_),s===z.length?y:p):n(_)}function y(_){return _===null?n(_):_===93?(e.consume(_),x):te(_)?(o=y,Z(_)):(e.consume(_),y)}function x(_){return _===93?(e.consume(_),m):y(_)}function m(_){return _===62?G(_):_===93?(e.consume(_),m):y(_)}function v(_){return _===null||_===62?G(_):te(_)?(o=v,Z(_)):(e.consume(_),v)}function w(_){return _===null?n(_):_===63?(e.consume(_),S):te(_)?(o=w,Z(_)):(e.consume(_),w)}function S(_){return _===62?G(_):w(_)}function k(_){return Jn(_)?(e.consume(_),b):n(_)}function b(_){return _===45||qt(_)?(e.consume(_),b):C(_)}function C(_){return te(_)?(o=C,Z(_)):me(_)?(e.consume(_),C):G(_)}function T(_){return _===45||qt(_)?(e.consume(_),T):_===47||_===62||Bt(_)?A(_):n(_)}function A(_){return _===47?(e.consume(_),G):_===58||_===95||Jn(_)?(e.consume(_),E):te(_)?(o=A,Z(_)):me(_)?(e.consume(_),A):G(_)}function E(_){return _===45||_===46||_===58||_===95||qt(_)?(e.consume(_),E):I(_)}function I(_){return _===61?(e.consume(_),M):te(_)?(o=I,Z(_)):me(_)?(e.consume(_),I):A(_)}function M(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,F):te(_)?(o=M,Z(_)):me(_)?(e.consume(_),M):(e.consume(_),B)}function F(_){return _===i?(e.consume(_),i=void 0,$):_===null?n(_):te(_)?(o=F,Z(_)):(e.consume(_),F)}function B(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Bt(_)?A(_):(e.consume(_),B)}function $(_){return _===47||_===62||Bt(_)?A(_):n(_)}function G(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function Z(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),D}function D(_){return me(_)?Te(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):V(_)}function V(_){return e.enter("htmlTextData"),o(_)}}const hv={name:"labelEnd",resolveAll:PH,resolveTo:TH,tokenize:EH},_H={tokenize:jH},kH={tokenize:AH},CH={tokenize:RH};function PH(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&&lr(e,0,e.length,n),e}function TH(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=cn(a,e.slice(s+1,s+r+3)),a=cn(a,[["enter",c,t]]),a=cn(a,fv(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=cn(a,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),a=cn(a,e.slice(o+1)),a=cn(a,[["exit",l,t]]),lr(e,s,e.length,a),e}function EH(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(f){return s?s._inactive?d(f):(o=r.parser.defined.includes(co(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(_H,c,o?c:d)(f):f===91?e.attempt(kH,c,o?u:d)(f):o?c(f):d(f)}function u(f){return e.attempt(CH,c,d)(f)}function c(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function jH(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 Bt(d)?Na(e,s)(d):s(d)}function s(d){return d===41?c(d):cj(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Bt(d)?Na(e,l)(d):c(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?fj(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Bt(d)?Na(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function AH(e,t,n){const r=this;return i;function i(a){return dj.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(co(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function RH(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 IH={name:"labelStartImage",resolveAll:hv.resolveAll,tokenize:MH};function MH(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 LH={name:"labelStartLink",resolveAll:hv.resolveAll,tokenize:DH};function DH(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 kh={name:"lineEnding",tokenize:zH};function zH(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Te(e,t,"linePrefix")}}const sc={name:"thematicBreak",tokenize:NH};function NH(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||te(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),me(u)?Te(e,a,"whitespace")(u):a(u))}}const Mt={continuation:{tokenize:BH},exit:UH,name:"list",tokenize:FH},$H={partial:!0,tokenize:WH},OH={partial:!0,tokenize:VH};function FH(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(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Nm(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(sc,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return Nm(h)&&++o<10?(e.consume(h),l):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Jd,r.interrupt?n:c,e.attempt($H,f,d))}function c(h){return r.containerState.initialBlankLine=!0,s++,f(h)}function d(h){return me(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function BH(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Jd,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Te(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(OH,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Te(e,e.attempt(Mt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function VH(e,t,n){const r=this;return Te(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 UH(e){e.exit(this.containerState.type)}function WH(e,t,n){const r=this;return Te(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 gb={name:"setextUnderline",resolveTo:HH,tokenize:ZH};function HH(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 ZH(e,t,n){const r=this;let i;return s;function s(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),me(u)?Te(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||te(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const KH={tokenize:GH};function GH(e){const t=this,n=e.attempt(Jd,r,e.attempt(this.parser.constructs.flowInitial,i,Te(e,e.attempt(this.parser.constructs.flow,i,e.attempt(J9,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const YH={resolveAll:pj()},XH=hj("string"),QH=hj("text");function hj(e){return{resolveAll:pj(e==="text"?qH:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function pj(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 qH(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)l=!0,a++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const JH={42:Mt,43:Mt,45:Mt,48:Mt,49:Mt,50:Mt,51:Mt,52:Mt,53:Mt,54:Mt,55:Mt,56:Mt,57:Mt,62:oj},eZ={91:iH},tZ={[-2]:_h,[-1]:_h,32:_h},nZ={35:cH,42:sc,45:[gb,sc],60:pH,61:gb,95:sc,96:pb,126:pb},rZ={38:lj,92:aj},iZ={[-5]:kh,[-4]:kh,[-3]:kh,33:IH,38:lj,42:$m,60:[L9,bH],91:LH,92:[lH,aj],93:hv,95:$m,96:K9},sZ={null:[$m,YH]},oZ={null:[42,95]},aZ={null:[]},lZ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:oZ,contentInitial:eZ,disable:aZ,document:JH,flow:nZ,flowInitial:tZ,insideSpan:sZ,string:rZ,text:iZ},Symbol.toStringTag,{value:"Module"}));function uZ(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:C(k),check:C(b),consume:v,enter:w,exit:S,interrupt:C(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:p,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function d(I){return o=cn(o,I),x(),o[o.length-1]!==null?[]:(T(t,0),u.events=fv(s,u.events,u),u.events)}function f(I,M){return dZ(h(I),M)}function h(I){return cZ(o,I)}function p(){const{_bufferIndex:I,_index:M,line:F,column:B,offset:$}=r;return{_bufferIndex:I,_index:M,line:F,column:B,offset:$}}function y(I){i[I.line]=I.column,E()}function x(){let I;for(;r._index<o.length;){const M=o[r._index];if(typeof M=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<M.length;)m(M.charCodeAt(r._bufferIndex));else m(M)}}function m(I){c=c(I)}function v(I){te(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,E()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=I}function w(I,M){const F=M||{};return F.type=I,F.start=p(),u.events.push(["enter",F,u]),a.push(F),F}function S(I){const M=a.pop();return M.end=p(),u.events.push(["exit",M,u]),M}function k(I,M){T(I,M.from)}function b(I,M){M.restore()}function C(I,M){return F;function F(B,$,G){let Z,D,V,_;return Array.isArray(B)?Y(B):"tokenize"in B?Y([B]):z(B);function z(ue){return qe;function qe(U){const Re=U!==null&&ue[U],Ue=U!==null&&ue.null,Ht=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(Ue)?Ue:Ue?[Ue]:[]];return Y(Ht)(U)}}function Y(ue){return Z=ue,D=0,ue.length===0?G:j(ue[D])}function j(ue){return qe;function qe(U){return _=A(),V=ue,ue.partial||(u.currentConstruct=ue),ue.name&&u.parser.constructs.disable.null.includes(ue.name)?de():ue.tokenize.call(M?Object.assign(Object.create(u),M):u,l,ie,de)(U)}}function ie(ue){return I(V,_),$}function de(ue){return _.restore(),++D<Z.length?j(Z[D]):G}}}function T(I,M){I.resolveAll&&!s.includes(I)&&s.push(I),I.resolve&&lr(u.events,M,u.events.length-M,I.resolve(u.events.slice(M),u)),I.resolveTo&&(u.events=I.resolveTo(u.events,u))}function A(){const I=p(),M=u.previous,F=u.currentConstruct,B=u.events.length,$=Array.from(a);return{from:B,restore:G};function G(){r=I,u.previous=M,u.currentConstruct=F,u.events.length=B,a=$,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function cZ(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 dZ(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
|
|
82
|
+
`;break}case-3:{o=`\r
|
|
83
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function fZ(e){const r={constructs:x9([lZ,...(e||{}).extensions||[]]),content:i(T9),defined:[],document:i(j9),flow:i(KH),lazy:{},string:i(XH),text:i(QH)};return r;function i(s){return o;function o(a){return uZ(r,s,a)}}}function hZ(e){for(;!uj(e););return e}const yb=/[\0\t\n\r]/g;function pZ(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let u,c,d,f,h;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(yb.lastIndex=d,u=yb.exec(s),f=u&&u.index!==void 0?u.index:s.length,h=s.charCodeAt(f),!u){t=s.slice(d);break}if(h===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(s.slice(d,f)),e+=f-d),h){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const mZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gZ(e){return e.replace(mZ,yZ)}function yZ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return sj(n.slice(s?2:1),s?16:10)}return dv(n)||e}const mj={}.hasOwnProperty;function vZ(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),xZ(n)(hZ(fZ(n).document().write(pZ()(e,t,!0))))}function xZ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ur),autolinkProtocol:A,autolinkEmail:A,atxHeading:s(Bn),blockQuote:s(Ue),characterEscape:A,characterReference:A,codeFenced:s(Ht),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Ht,o),codeText:s(Rt,o),codeTextData:A,data:A,codeFlowValue:A,definition:s(on),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(It),hardBreakEscape:s(ji),hardBreakTrailing:s(ji),htmlFlow:s(Rr,o),htmlFlowData:A,htmlText:s(Rr,o),htmlTextData:A,image:s(_n),label:o,link:s(ur),listItem:s(bs),listItemValue:f,listOrdered:s(Zt,d),listUnordered:s(Zt),paragraph:s(Ai),reference:j,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Bn),strong:s(ot),thematicBreak:s(pe)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:Re,autolinkProtocol:U,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ue,characterReference:qe,codeFenced:l(x),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:E,codeIndented:l(m),codeText:l($),codeTextData:E,data:E,definition:l(),definitionDestinationString:S,definitionLabelString:v,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(F),htmlFlowData:E,htmlText:l(B),htmlTextData:E,image:l(Z),label:V,labelText:D,lineEnding:I,link:l(G),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ie,resourceDestinationString:_,resourceTitleString:z,resource:Y,setextHeading:l(T),setextHeadingLineSequence:C,setextHeadingText:b,strong:l(),thematicBreak:l()}};gj(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let K={type:"root",children:[]};const ne={stack:[K],tokenStack:[],config:t,enter:a,exit:u,buffer:o,resume:c,data:n},ce=[];let xe=-1;for(;++xe<N.length;)if(N[xe][1].type==="listOrdered"||N[xe][1].type==="listUnordered")if(N[xe][0]==="enter")ce.push(xe);else{const Cn=ce.pop();xe=i(N,Cn,xe)}for(xe=-1;++xe<N.length;){const Cn=t[N[xe][0]];mj.call(Cn,N[xe][1].type)&&Cn[N[xe][1].type].call(Object.assign({sliceSerialize:N[xe][2].sliceSerialize},ne),N[xe][1])}if(ne.tokenStack.length>0){const Cn=ne.tokenStack[ne.tokenStack.length-1];(Cn[1]||vb).call(ne,void 0,Cn[0])}for(K.position={start:Br(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:Br(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},xe=-1;++xe<t.transforms.length;)K=t.transforms[xe](K)||K;return K}function i(N,K,ne){let ce=K-1,xe=-1,Cn=!1,Ri,cr,Vo,Uo;for(;++ce<=ne;){const Kt=N[ce];switch(Kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Kt[0]==="enter"?xe++:xe--,Uo=void 0;break}case"lineEndingBlank":{Kt[0]==="enter"&&(Ri&&!Uo&&!xe&&!Vo&&(Vo=ce),Uo=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Uo=void 0}if(!xe&&Kt[0]==="enter"&&Kt[1].type==="listItemPrefix"||xe===-1&&Kt[0]==="exit"&&(Kt[1].type==="listUnordered"||Kt[1].type==="listOrdered")){if(Ri){let Ss=ce;for(cr=void 0;Ss--;){const dr=N[Ss];if(dr[1].type==="lineEnding"||dr[1].type==="lineEndingBlank"){if(dr[0]==="exit")continue;cr&&(N[cr][1].type="lineEndingBlank",Cn=!0),dr[1].type="lineEnding",cr=Ss}else if(!(dr[1].type==="linePrefix"||dr[1].type==="blockQuotePrefix"||dr[1].type==="blockQuotePrefixWhitespace"||dr[1].type==="blockQuoteMarker"||dr[1].type==="listItemIndent"))break}Vo&&(!cr||Vo<cr)&&(Ri._spread=!0),Ri.end=Object.assign({},cr?N[cr][1].start:Kt[1].end),N.splice(cr||ce,0,["exit",Ri,Kt[2]]),ce++,ne++}if(Kt[1].type==="listItemPrefix"){const Ss={type:"listItem",_spread:!1,start:Object.assign({},Kt[1].start),end:void 0};Ri=Ss,N.splice(ce,0,["enter",Ss,Kt[2]]),ce++,ne++,Vo=void 0,Uo=!0}}}return N[K][1]._spread=Cn,ne}function s(N,K){return ne;function ne(ce){a.call(this,N(ce),ce),K&&K.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(N,K,ne){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([K,ne||void 0]),N.position={start:Br(K.start),end:void 0}}function l(N){return K;function K(ne){N&&N.call(this,ne),u.call(this,ne)}}function u(N,K){const ne=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==N.type&&(K?K.call(this,N,ce[0]):(ce[1]||vb).call(this,N,ce[0]));else throw new Error("Cannot close `"+N.type+"` ("+za({start:N.start,end:N.end})+"): it’s not open");ne.position.end=Br(N.end)}function c(){return y9(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(N){if(this.data.expectingFirstListItemValue){const K=this.stack[this.stack.length-2];K.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function h(){const N=this.resume(),K=this.stack[this.stack.length-1];K.lang=N}function p(){const N=this.resume(),K=this.stack[this.stack.length-1];K.meta=N}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const N=this.resume(),K=this.stack[this.stack.length-1];K.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const N=this.resume(),K=this.stack[this.stack.length-1];K.value=N.replace(/(\r?\n|\r)$/g,"")}function v(N){const K=this.resume(),ne=this.stack[this.stack.length-1];ne.label=K,ne.identifier=co(this.sliceSerialize(N)).toLowerCase()}function w(){const N=this.resume(),K=this.stack[this.stack.length-1];K.title=N}function S(){const N=this.resume(),K=this.stack[this.stack.length-1];K.url=N}function k(N){const K=this.stack[this.stack.length-1];if(!K.depth){const ne=this.sliceSerialize(N).length;K.depth=ne}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function C(N){const K=this.stack[this.stack.length-1];K.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function A(N){const ne=this.stack[this.stack.length-1].children;let ce=ne[ne.length-1];(!ce||ce.type!=="text")&&(ce=kn(),ce.position={start:Br(N.start),end:void 0},ne.push(ce)),this.stack.push(ce)}function E(N){const K=this.stack.pop();K.value+=this.sliceSerialize(N),K.position.end=Br(N.end)}function I(N){const K=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=K.children[K.children.length-1];ne.position.end=Br(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(K.type)&&(A.call(this,N),E.call(this,N))}function M(){this.data.atHardBreak=!0}function F(){const N=this.resume(),K=this.stack[this.stack.length-1];K.value=N}function B(){const N=this.resume(),K=this.stack[this.stack.length-1];K.value=N}function $(){const N=this.resume(),K=this.stack[this.stack.length-1];K.value=N}function G(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=K,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function Z(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=K,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function D(N){const K=this.sliceSerialize(N),ne=this.stack[this.stack.length-2];ne.label=gZ(K),ne.identifier=co(K).toLowerCase()}function V(){const N=this.stack[this.stack.length-1],K=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const ce=N.children;ne.children=ce}else ne.alt=K}function _(){const N=this.resume(),K=this.stack[this.stack.length-1];K.url=N}function z(){const N=this.resume(),K=this.stack[this.stack.length-1];K.title=N}function Y(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function ie(N){const K=this.resume(),ne=this.stack[this.stack.length-1];ne.label=K,ne.identifier=co(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function de(N){this.data.characterReferenceType=N.type}function ue(N){const K=this.sliceSerialize(N),ne=this.data.characterReferenceType;let ce;ne?(ce=sj(K,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=dv(K);const xe=this.stack[this.stack.length-1];xe.value+=ce}function qe(N){const K=this.stack.pop();K.position.end=Br(N.end)}function U(N){E.call(this,N);const K=this.stack[this.stack.length-1];K.url=this.sliceSerialize(N)}function Re(N){E.call(this,N);const K=this.stack[this.stack.length-1];K.url="mailto:"+this.sliceSerialize(N)}function Ue(){return{type:"blockquote",children:[]}}function Ht(){return{type:"code",lang:null,meta:null,value:""}}function Rt(){return{type:"inlineCode",value:""}}function on(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function It(){return{type:"emphasis",children:[]}}function Bn(){return{type:"heading",depth:0,children:[]}}function ji(){return{type:"break"}}function Rr(){return{type:"html",value:""}}function _n(){return{type:"image",title:null,url:"",alt:null}}function ur(){return{type:"link",title:null,url:"",children:[]}}function Zt(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function bs(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function Ai(){return{type:"paragraph",children:[]}}function ot(){return{type:"strong",children:[]}}function kn(){return{type:"text",value:""}}function pe(){return{type:"thematicBreak"}}}function Br(e){return{line:e.line,column:e.column,offset:e.offset}}function gj(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?gj(e,r):wZ(e,r)}}function wZ(e,t){let n;for(n in t)if(mj.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 vb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+za({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+za({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+za({start:t.start,end:t.end})+") is still open")}function bZ(e){const t=this;t.parser=n;function n(r){return vZ(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function SZ(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 _Z(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
84
|
+
`}]}function kZ(e,t){const n=t.value?t.value+`
|
|
85
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function CZ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PZ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TZ(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Fo(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function EZ(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 jZ(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function yj(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 AZ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yj(e,t);const i={src:Fo(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 RZ(e,t){const n={src:Fo(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 IZ(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 MZ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yj(e,t);const i={href:Fo(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 LZ(e,t){const n={href:Fo(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 DZ(e,t,n){const r=e.all(t),i=n?zZ(n):vj(t),s={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
86
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
87
|
+
`});const u={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,u),e.applyData(t,u)}function zZ(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=vj(n[r])}return t}function vj(e){const t=e.spread;return t??e.children.length>1}function NZ(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 $Z(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OZ(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function FZ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BZ(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=av(t.children[1]),l=qE(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 VZ(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const d=t.children[l],f={},h=o?o[l]:void 0;h&&(f.align=h);let p={type:"element",tagName:s,properties:f,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),u.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function UZ(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const xb=9,wb=32;function WZ(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(bb(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(bb(t.slice(i),i>0,!1)),s.join("")}function bb(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===xb||s===wb;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===xb||s===wb;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function HZ(e,t){const n={type:"text",value:WZ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ZZ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const KZ={blockquote:SZ,break:_Z,code:kZ,delete:CZ,emphasis:PZ,footnoteReference:TZ,heading:EZ,html:jZ,imageReference:AZ,image:RZ,inlineCode:IZ,linkReference:MZ,link:LZ,listItem:DZ,list:NZ,paragraph:$Z,root:OZ,strong:FZ,table:BZ,tableCell:UZ,tableRow:VZ,text:HZ,thematicBreak:ZZ,toml:yu,yaml:yu,definition:yu,footnoteDefinition:yu};function yu(){}const xj=-1,ef=0,$a=1,ad=2,pv=3,mv=4,gv=5,yv=6,wj=7,bj=8,GZ=typeof self=="object"?self:globalThis,Sb=(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 GZ[e](t)},YZ=(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 ef:case xj:return n(o,i);case $a:{const a=n([],i);for(const l of o)a.push(r(l));return a}case ad:{const a=n({},i);for(const[l,u]of o)a[r(l)]=r(u);return a}case pv:return n(new Date(o),i);case mv:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case gv:{const a=n(new Map,i);for(const[l,u]of o)a.set(r(l),r(u));return a}case yv:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case wj:{const{name:a,message:l}=o;return n(Sb(a,l),i)}case bj: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(Sb(s,o),i)};return r},_b=e=>YZ(new Map,e)(0),js="",{toString:XZ}={},{keys:QZ}=Object,la=e=>{const t=typeof e;if(t!=="object"||!e)return[ef,t];const n=XZ.call(e).slice(8,-1);switch(n){case"Array":return[$a,js];case"Object":return[ad,js];case"Date":return[pv,js];case"RegExp":return[mv,js];case"Map":return[gv,js];case"Set":return[yv,js];case"DataView":return[$a,n]}return n.includes("Array")?[$a,n]:n.includes("Error")?[wj,n]:[ad,n]},vu=([e,t])=>e===ef&&(t==="function"||t==="symbol"),qZ=(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]=la(o);switch(a){case ef:{let c=o;switch(l){case"bigint":a=bj,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([xj],o)}return i([a,c],o)}case $a:{if(l){let f=o;return l==="DataView"?f=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(o)),i([l,[...f]],o)}const c=[],d=i([a,c],o);for(const f of o)c.push(s(f));return d}case ad:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const c=[],d=i([a,c],o);for(const f of QZ(o))(e||!vu(la(o[f])))&&c.push([s(f),s(o[f])]);return d}case pv:return i([a,o.toISOString()],o);case mv:{const{source:c,flags:d}=o;return i([a,{source:c,flags:d}],o)}case gv:{const c=[],d=i([a,c],o);for(const[f,h]of o)(e||!(vu(la(f))||vu(la(h))))&&c.push([s(f),s(h)]);return d}case yv:{const c=[],d=i([a,c],o);for(const f of o)(e||!vu(la(f)))&&c.push(s(f));return d}}const{message:u}=o;return i([a,{name:l,message:u}],o)};return s},kb=(e,{json:t,lossy:n}={})=>{const r=[];return qZ(!(t||n),!!t,new Map,r)(e),r},ld=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?_b(kb(e,t)):structuredClone(e):(e,t)=>_b(kb(e,t));function JZ(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 eK(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function tK(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||JZ,r=e.options.footnoteBackLabel||eK,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),f=Fo(d.toLowerCase());let h=0;const p=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++h<=y;){p.length>0&&p.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,h);typeof v=="string"&&(v={type:"text",value:v}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const x=c[c.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const v=x.children[x.children.length-1];v&&v.type==="text"?v.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...p)}else c.push(...p);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(c,!0)};e.patch(u,m),a.push(m)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ld(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
88
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
89
|
+
`}]}}const Sj=function(e){if(e==null)return sK;if(typeof e=="function")return tf(e);if(typeof e=="object")return Array.isArray(e)?nK(e):rK(e);if(typeof e=="string")return iK(e);throw new Error("Expected function, string, or object as test")};function nK(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Sj(e[n]);return tf(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function rK(e){const t=e;return tf(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function iK(e){return tf(t);function t(n){return n&&n.type===e}}function tf(e){return t;function t(n,r,i){return!!(oK(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function sK(){return!0}function oK(e){return e!==null&&typeof e=="object"&&"type"in e}const _j=[],aK=!0,Cb=!1,lK="skip";function uK(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Sj(i),o=r?-1:1;a(e,void 0,[])();function a(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=_j,p,y,x;if((!t||s(l,u,c[c.length-1]||void 0))&&(h=cK(n(l,c)),h[0]===Cb))return h;if("children"in l&&l.children){const m=l;if(m.children&&h[0]!==lK)for(y=(r?m.children.length:-1)+o,x=c.concat(m);y>-1&&y<m.children.length;){const v=m.children[y];if(p=a(v,y,x)(),p[0]===Cb)return p;y=typeof p[1]=="number"?p[1]:y+o}}return h}}}function cK(e){return Array.isArray(e)?e:typeof e=="number"?[aK,e]:e==null?_j:[e]}function kj(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),uK(e,s,a,i);function a(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return o(l,d,c)}}const Om={}.hasOwnProperty,dK={};function fK(e,t){const n=t||dK,r=new Map,i=new Map,s=new Map,o={...KZ,...n.handlers},a={all:u,applyData:pK,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:hK,wrap:gK};return kj(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:i,f=String(c.identifier).toUpperCase();d.has(f)||d.set(f,c)}}),a;function l(c,d){const f=c.type,h=a.handlers[f];if(Om.call(a.handlers,f)&&h)return h(a,c,d);if(a.options.passThrough&&a.options.passThrough.includes(f)){if("children"in c){const{children:y,...x}=c,m=ld(x);return m.children=a.all(c),m}return ld(c)}return(a.options.unknownHandler||mK)(a,c,d)}function u(c){const d=[];if("children"in c){const f=c.children;let h=-1;for(;++h<f.length;){const p=a.one(f[h],c);if(p){if(h&&f[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=Pb(p.value)),!Array.isArray(p)&&p.type==="element")){const y=p.children[0];y&&y.type==="text"&&(y.value=Pb(y.value))}Array.isArray(p)?d.push(...p):d.push(p)}}}return d}}function hK(e,t){e.position&&(t.position=Y8(e))}function pK(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,ld(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function mK(e,t){const n=t.data||{},r="value"in t&&!(Om.call(n,"hProperties")||Om.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 gK(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
90
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
91
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
92
|
+
`}),n}function Pb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Tb(e,t){const n=fK(e,t),r=n.one(e,void 0),i=tK(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
93
|
+
`},i),s}function yK(e,t){return e&&"run"in e?async function(n,r){const i=Tb(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Tb(n,{file:r,...e||t})}}function Eb(e){if(e)throw e}var oc=Object.prototype.hasOwnProperty,Cj=Object.prototype.toString,jb=Object.defineProperty,Ab=Object.getOwnPropertyDescriptor,Rb=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Cj.call(t)==="[object Array]"},Ib=function(t){if(!t||Cj.call(t)!=="[object Object]")return!1;var n=oc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&oc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||oc.call(t,i)},Mb=function(t,n){jb&&n.name==="__proto__"?jb(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Lb=function(t,n){if(n==="__proto__")if(oc.call(t,n)){if(Ab)return Ab(t,n).value}else return;return t[n]},vK=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=Lb(a,n),i=Lb(t,n),a!==i&&(c&&i&&(Ib(i)||(s=Rb(i)))?(s?(s=!1,o=r&&Rb(r)?r:[]):o=r&&Ib(r)?r:{},Mb(a,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&Mb(a,{name:n,newValue:i}));return a};const Ch=yd(vK);function Fm(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 xK(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...u){const c=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?wK(c,a)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function wK(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const Gn={basename:bK,dirname:SK,extname:_K,join:kK,sep:"/"};function bK(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Dl(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 SK(e){if(Dl(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 _K(e){Dl(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 kK(...e){let t=-1,n;for(;++t<e.length;)Dl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":CK(n)}function CK(e){Dl(e);const t=e.codePointAt(0)===47;let n=PK(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function PK(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 Dl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const TK={cwd:EK};function EK(){return"/"}function Bm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function jK(e){if(typeof e=="string")e=new URL(e);else if(!Bm(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 AK(e)}function AK(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 Ph=["history","path","basename","stem","extname","dirname"];class Pj{constructor(t){let n;t?Bm(t)?n={path:t}:typeof t=="string"||RK(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":TK.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ph.length;){const s=Ph[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)Ph.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Gn.basename(this.path):void 0}set basename(t){Eh(t,"basename"),Th(t,"basename"),this.path=Gn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gn.dirname(this.path):void 0}set dirname(t){Db(this.basename,"dirname"),this.path=Gn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gn.extname(this.path):void 0}set extname(t){if(Th(t,"extname"),Db(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=Gn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Bm(t)&&(t=jK(t)),Eh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gn.basename(this.path,this.extname):void 0}set stem(t){Eh(t,"stem"),Th(t,"stem"),this.path=Gn.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 bt(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 Th(e,t){if(e&&e.includes(Gn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gn.sep+"`")}function Eh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Db(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function RK(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const IK=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},MK={}.hasOwnProperty;class vv extends IK{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=xK()}copy(){const t=new vv;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ch(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Rh("data",this.frozen),this.namespace[t]=n,this):MK.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Rh("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=xu(t),r=this.parser||this.Parser;return jh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),jh("process",this.parser||this.Parser),Ah("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=xu(t),l=r.parse(a);r.run(l,a,function(c,d,f){if(c||!d||!f)return u(c);const h=d,p=r.stringify(h,f);zK(p)?f.value=p:f.result=p,u(c,f)});function u(c,d){c||!d?o(c):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),jh("processSync",this.parser||this.Parser),Ah("processSync",this.compiler||this.Compiler),this.process(t,i),Nb("processSync","process",n),r;function i(s,o){n=!0,Eb(s),r=o}}run(t,n,r){zb(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=xu(n);i.run(t,l,u);function u(c,d,f){const h=d||t;c?a(c):o?o(h):r(void 0,h,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Nb("runSync","run",r),i;function s(o,a){Eb(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=xu(n),i=this.compiler||this.Compiler;return Ah("stringify",i),zb(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Rh("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;l(c,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Ch(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===u){f=d;break}if(f===-1)r.push([u,...c]);else if(c.length>0){let[h,...p]=c;const y=r[f][1];Fm(y)&&Fm(h)&&(h=Ch(!0,y,h)),r[f]=[u,h,...p]}}}}const LK=new vv().freeze();function jh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ah(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Rh(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 zb(e){if(!Fm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Nb(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xu(e){return DK(e)?e:new Pj(e)}function DK(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function zK(e){return typeof e=="string"||NK(e)}function NK(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $K="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$b=[],Ob={allowDangerousHtml:!0},OK=/^(https?|ircs?|mailto|xmpp)$/i,FK=[{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 BK(e){const t=VK(e),n=UK(e);return WK(t.runSync(t.parse(n),n),e)}function VK(e){const t=e.rehypePlugins||$b,n=e.remarkPlugins||$b,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ob}:Ob;return LK().use(bZ).use(n).use(yK,r).use(t)}function UK(e){const t=e.children||"",n=new Pj;return typeof t=="string"&&(n.value=t),n}function WK(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||HK;for(const c of FK)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+$K+c.id,void 0);return kj(e,u),e9(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function u(c,d,f){if(c.type==="raw"&&f&&typeof d=="number")return o?f.children.splice(d,1):f.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let h;for(h in Sh)if(Object.hasOwn(Sh,h)&&Object.hasOwn(c.properties,h)){const p=c.properties[h],y=Sh[h];(y===null||y.includes(c.tagName))&&(c.properties[h]=l(String(p||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):s?s.includes(c.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(c,d,f)),h&&f&&typeof d=="number")return a&&c.children?f.children.splice(d,1,...c.children):f.children.splice(d,1),d}}}function HK(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||OK.test(e.slice(0,t))?e:""}const Ih=e=>({fontFamily:oe.serif,fontWeight:600,fontSize:e,margin:`${L[6]} 0 ${L[3]}`,lineHeight:1.25}),ZK={p:({children:e})=>g.jsx("p",{style:{margin:`0 0 ${L[4]}`},children:e}),strong:({children:e})=>g.jsx("strong",{style:{fontWeight:700},children:e}),h1:({children:e})=>g.jsx("h1",{style:Ih(be.lg),children:e}),h2:({children:e})=>g.jsx("h2",{style:Ih("1.3rem"),children:e}),h3:({children:e})=>g.jsx("h3",{style:Ih("1.1rem"),children:e}),a:({children:e,href:t})=>g.jsx("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:st.accentAmberDark},children:e}),code:({children:e})=>g.jsx("code",{style:{fontFamily:oe.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:3,padding:"0.1em 0.35em"},children:e}),pre:({children:e})=>g.jsx("pre",{style:{fontFamily:oe.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:6,padding:`${L[3]} ${L[4]}`,overflowX:"auto",margin:`0 0 ${L[4]}`},children:e}),ul:({children:e})=>g.jsx("ul",{style:{listStyle:"disc",margin:`0 0 ${L[4]}`,paddingLeft:"1.4rem"},children:e}),ol:({children:e})=>g.jsx("ol",{style:{listStyle:"decimal",margin:`0 0 ${L[4]}`,paddingLeft:"1.4rem"},children:e}),li:({children:e})=>g.jsx("li",{style:{marginBottom:"0.4rem"},children:e}),blockquote:({children:e})=>g.jsx("blockquote",{style:{margin:`0 0 ${L[4]}`,paddingLeft:L[4],borderLeft:"3px solid rgba(0,0,0,0.15)",opacity:.85},children:e})},zl=({children:e})=>g.jsx(BK,{components:ZK,children:e}),KK=async()=>{try{const e=await fetch("/api/icon");if(!e.ok)return null;const t=await e.blob();return new Promise(n=>{const r=new FileReader;r.onloadend=()=>n(r.result),r.readAsDataURL(t)})}catch{return null}},GK=async e=>{try{return(await fetch("/api/icon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUri:e})})).ok}catch{return!1}},YK=async()=>{try{return(await fetch("/api/package-name")).json()}catch{return null}},XK=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase()),Tj=()=>{const[e,t]=P.useState(null),[n,r]=P.useState(null),[i,s]=P.useState(!0);return P.useEffect(()=>{let o=!1;return s(!0),Promise.all([YK().then(a=>{!o&&a&&t(XK(a))}),KK().then(a=>{o||r(a)})]).finally(()=>{o||s(!1)}),()=>{o=!0}},[]),{projectName:e,iconDataUri:n,loading:i}},Ej=({size:e="md"})=>{const{projectName:t,iconDataUri:n,loading:r}=Tj(),i=e==="sm"?20:18,s=e==="sm"?be.sm:be.md;return g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3]},children:[n?g.jsx("img",{src:n,alt:"",style:{width:i,height:i,objectFit:"contain"}}):g.jsx(iT,{icon:g.jsx(GB,{}),size:"small"}),g.jsx("span",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:s,whiteSpace:"nowrap"},children:r?"Loading…":t??"Paper Camp"})]})},Dn=({children:e})=>g.jsx("h1",{className:"text-4xl",style:{fontFamily:oe.serif,fontWeight:600,color:st.textPrimary,margin:`0 0 ${L[6]}`,lineHeight:1.1},children:e}),QK=({routeKey:e,children:t})=>{const n=rv();return g.jsxs("aside",{style:{width:WE.sidebarWidth,flexShrink:0,height:"100%",position:"sticky",top:0,display:"flex",flexDirection:"column",background:"transparent",overflow:"hidden"},children:[g.jsx("div",{style:{padding:`${L[5]} ${L[3]} ${L[4]}`,flexShrink:0},children:g.jsx(Ej,{})}),g.jsx("div",{style:{height:1,background:"rgba(0,0,0,0.08)",margin:`${L[3]} ${L[3]}`}}),g.jsx("div",{style:{flex:1,overflowY:"auto",paddingTop:L[1],position:"relative"},children:g.jsx(ev,{mode:"wait",children:g.jsx(od.div,{initial:n?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:n?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},children:t},e)})})]})},ud=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`},jj=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)}},qK=e=>e.phases.length===0?null:Math.round(e.phases.filter(t=>t.done).length/e.phases.length*100),JK=(e,t)=>{if(e)return e.find(n=>n.status==="in-progress"||n.status==="review")},e7=async()=>{const e=await fetch("/api/git/status");if(!e.ok){const t=await e.json().catch(()=>({error:"Failed to load git status"}));throw new Error(t.error)}return e.json()},t7=async(e,t,n)=>{const r=await fetch("/api/git/commit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e,title:t,message:n})});if(!r.ok){const i=await r.json().catch(()=>({error:"Commit failed"}));throw new Error(i.error)}};var Fb;function O(e,t,n){function r(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const u=o.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){const f=c[d];f in a||(a[f]=u[f].bind(a))}}const i=(n==null?void 0:n.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function o(a){var l;const u=n!=null&&n.Parent?new s:this;r(u,a),(l=u._zod).deferred??(l.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>{var l,u;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(u=(l=a==null?void 0:a._zod)==null?void 0:l.traits)==null?void 0:u.has(e)}}),Object.defineProperty(o,"name",{value:e}),o}class fo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Aj extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Fb=globalThis).__zod_globalConfig??(Fb.__zod_globalConfig={});const xv=globalThis.__zod_globalConfig;function hs(e){return xv}function Rj(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Vm(e,t){return typeof t=="bigint"?t.toString():t}function wv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function bv(e){return e==null}function Sv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function n7(e,t){const n=e/t,r=Math.round(n),i=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}const Bb=Symbol("evaluating");function ve(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Bb)return r===void 0&&(r=Bb,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function ws(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ti(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Vb(e){return JSON.stringify(e)}function r7(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ij="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function cd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const i7=wv(()=>{var e;if(xv.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function ml(e){if(cd(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(cd(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Mj(e){return ml(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const s7=new Set(["string","number","symbol"]);function nf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ei(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function ee(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function o7(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const a7={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function l7(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Ti(e._zod.def,{get shape(){const o={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=n.shape[a])}return ws(this,"shape",o),o},checks:[]});return Ei(e,s)}function u7(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Ti(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return ws(this,"shape",o),o},checks:[]});return Ei(e,s)}function c7(e,t){if(!ml(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const o in t)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Ti(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return ws(this,"shape",s),s}});return Ei(e,i)}function d7(e,t){if(!ml(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ti(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return ws(this,"shape",r),r}});return Ei(e,n)}function f7(e,t){var r;if((r=e._zod.def.checks)!=null&&r.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Ti(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return ws(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ei(e,n)}function h7(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=Ti(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)l[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return ws(this,"shape",l),l},checks:[]});return Ei(t,o)}function p7(e,t,n){const r=Ti(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(n)for(const o in n){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(s[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(const o in i)s[o]=new e({type:"nonoptional",innerType:i[o]});return ws(this,"shape",s),s}});return Ei(t,r)}function Js(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function m7(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)===!1)return!0;return!1}function Lj(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function wu(e){return typeof e=="string"?e:e==null?void 0:e.message}function ps(e,t,n){var l,u,c,d,f,h;const r=e.message?e.message:wu((c=(u=(l=e.inst)==null?void 0:l._zod.def)==null?void 0:u.error)==null?void 0:c.call(u,e))??wu((d=t==null?void 0:t.error)==null?void 0:d.call(t,e))??wu((f=n.customError)==null?void 0:f.call(n,e))??wu((h=n.localeError)==null?void 0:h.call(n,e))??"Invalid input",{inst:i,continue:s,input:o,...a}=e;return a.path??(a.path=[]),a.message=r,t!=null&&t.reportInput&&(a.input=o),a}function _v(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gl(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Dj=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Vm,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zj=O("$ZodError",Dj),Nj=O("$ZodError",Dj,{Parent:Error});function g7(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function y7(e,t=n=>n.message){const n={_errors:[]},r=(i,s=[])=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>r({issues:a},[...s,...o.path]));else if(o.code==="invalid_key")r({issues:o.issues},[...s,...o.path]);else if(o.code==="invalid_element")r({issues:o.issues},[...s,...o.path]);else{const a=[...s,...o.path];if(a.length===0)n._errors.push(t(o));else{let l=n,u=0;for(;u<a.length;){const c=a[u];u===a.length-1?(l[c]=l[c]||{_errors:[]},l[c]._errors.push(t(o))):l[c]=l[c]||{_errors:[]},l=l[c],u++}}}};return r(e),n}const kv=e=>(t,n,r,i)=>{const s=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new fo;if(o.issues.length){const a=new((i==null?void 0:i.Err)??e)(o.issues.map(l=>ps(l,s,hs())));throw Ij(a,i==null?void 0:i.callee),a}return o.value},Cv=e=>async(t,n,r,i)=>{const s=r?{...r,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new((i==null?void 0:i.Err)??e)(o.issues.map(l=>ps(l,s,hs())));throw Ij(a,i==null?void 0:i.callee),a}return o.value},rf=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new fo;return s.issues.length?{success:!1,error:new(e??zj)(s.issues.map(o=>ps(o,i,hs())))}:{success:!0,data:s.value}},v7=rf(Nj),sf=e=>async(t,n,r)=>{const i=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(o=>ps(o,i,hs())))}:{success:!0,data:s.value}},x7=sf(Nj),w7=e=>(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return kv(e)(t,n,i)},b7=e=>(t,n,r)=>kv(e)(t,n,r),S7=e=>async(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return Cv(e)(t,n,i)},_7=e=>async(t,n,r)=>Cv(e)(t,n,r),k7=e=>(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return rf(e)(t,n,i)},C7=e=>(t,n,r)=>rf(e)(t,n,r),P7=e=>async(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return sf(e)(t,n,i)},T7=e=>async(t,n,r)=>sf(e)(t,n,r),E7=/^[cC][0-9a-z]{6,}$/,j7=/^[0-9a-z]+$/,A7=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,R7=/^[0-9a-vA-V]{20}$/,I7=/^[A-Za-z0-9]{27}$/,M7=/^[a-zA-Z0-9_-]{21}$/,L7=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,D7=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ub=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,z7=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,N7="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function $7(){return new RegExp(N7,"u")}const O7=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,F7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,B7=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,V7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,U7=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$j=/^[A-Za-z0-9_-]*$/,W7=/^https?$/,H7=/^\+[1-9]\d{6,14}$/,Oj="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Z7=new RegExp(`^${Oj}$`);function Fj(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function K7(e){return new RegExp(`^${Fj(e)}$`)}function G7(e){const t=Fj({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Oj}T(?:${r})$`)}const Y7=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},X7=/^-?\d+$/,Q7=/^-?\d+(?:\.\d+)?$/,q7=/^[^A-Z]*$/,J7=/^[^a-z]*$/,Wt=O("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Bj={number:"number",bigint:"bigint",object:"date"},Vj=O("$ZodCheckLessThan",(e,t)=>{Wt.init(e,t);const n=Bj[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Uj=O("$ZodCheckGreaterThan",(e,t)=>{Wt.init(e,t);const n=Bj[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eG=O("$ZodCheckMultipleOf",(e,t)=>{Wt.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):n7(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),tG=O("$ZodCheckNumberFormat",(e,t)=>{var o;Wt.init(e,t),t.format=t.format||"float64";const n=(o=t.format)==null?void 0:o.includes("int"),r=n?"int":"number",[i,s]=a7[t.format];e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,l.minimum=i,l.maximum=s,n&&(l.pattern=X7)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}l<i&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>s&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),nG=O("$ZodCheckMaxLength",(e,t)=>{var n;Wt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!bv(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const o=_v(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),rG=O("$ZodCheckMinLength",(e,t)=>{var n;Wt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!bv(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const o=_v(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),iG=O("$ZodCheckLengthEquals",(e,t)=>{var n;Wt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!bv(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,s=i.length;if(s===t.length)return;const o=_v(i),a=s>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),of=O("$ZodCheckStringFormat",(e,t)=>{var n,r;Wt.init(e,t),e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),sG=O("$ZodCheckRegex",(e,t)=>{of.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),oG=O("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=q7),of.init(e,t)}),aG=O("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=J7),of.init(e,t)}),lG=O("$ZodCheckIncludes",(e,t)=>{Wt.init(e,t);const n=nf(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),uG=O("$ZodCheckStartsWith",(e,t)=>{Wt.init(e,t);const n=new RegExp(`^${nf(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),cG=O("$ZodCheckEndsWith",(e,t)=>{Wt.init(e,t);const n=new RegExp(`.*${nf(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),dG=O("$ZodCheckOverwrite",(e,t)=>{Wt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class fG{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
94
|
+
`).filter(o=>o),i=Math.min(...r.map(o=>o.length-o.trimStart().length)),s=r.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(const o of s)this.content.push(o)}compile(){const t=Function,n=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new t(...n,i.join(`
|
|
95
|
+
`))}}const hG={major:4,minor:4,patch:3},Xe=O("$ZodType",(e,t)=>{var i;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=hG;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const o of s._zod.onattach)o(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(i=e._zod.deferred)==null||i.push(()=>{e._zod.run=e._zod.parse});else{const s=(a,l,u)=>{let c=Js(a),d;for(const f of l){if(f._zod.def.when){if(m7(a)||!f._zod.def.when(a))continue}else if(c)continue;const h=a.issues.length,p=f._zod.check(a);if(p instanceof Promise&&(u==null?void 0:u.async)===!1)throw new fo;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,a.issues.length!==h&&(c||(c=Js(a,h)))});else{if(a.issues.length===h)continue;c||(c=Js(a,h))}}return d?d.then(()=>a):a},o=(a,l,u)=>{if(Js(a))return a.aborted=!0,a;const c=s(l,r,u);if(c instanceof Promise){if(u.async===!1)throw new fo;return c.then(d=>e._zod.parse(d,u))}return e._zod.parse(c,u)};e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){const c=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(d=>o(d,a,l)):o(c,a,l)}const u=e._zod.parse(a,l);if(u instanceof Promise){if(l.async===!1)throw new fo;return u.then(c=>s(c,r,l))}return s(u,r,l)}}ve(e,"~standard",()=>({validate:s=>{var o;try{const a=v7(e,s);return a.success?{value:a.data}:{issues:(o=a.error)==null?void 0:o.issues}}catch{return x7(e,s).then(l=>{var u;return l.success?{value:l.data}:{issues:(u=l.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),Pv=O("$ZodString",(e,t)=>{var n;Xe.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??Y7(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Le=O("$ZodStringFormat",(e,t)=>{of.init(e,t),Pv.init(e,t)}),pG=O("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=D7),Le.init(e,t)}),mG=O("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ub(r))}else t.pattern??(t.pattern=Ub());Le.init(e,t)}),gG=O("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=z7),Le.init(e,t)}),yG=O("$ZodURL",(e,t)=>{Le.init(e,t),e._zod.check=n=>{var r;try{const i=n.value.trim();if(!t.normalize&&((r=t.protocol)==null?void 0:r.source)===W7.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),vG=O("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=$7()),Le.init(e,t)}),xG=O("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=M7),Le.init(e,t)}),wG=O("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=E7),Le.init(e,t)}),bG=O("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=j7),Le.init(e,t)}),SG=O("$ZodULID",(e,t)=>{t.pattern??(t.pattern=A7),Le.init(e,t)}),_G=O("$ZodXID",(e,t)=>{t.pattern??(t.pattern=R7),Le.init(e,t)}),kG=O("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=I7),Le.init(e,t)}),CG=O("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=G7(t)),Le.init(e,t)}),PG=O("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Z7),Le.init(e,t)}),TG=O("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=K7(t)),Le.init(e,t)}),EG=O("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=L7),Le.init(e,t)}),jG=O("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=O7),Le.init(e,t),e._zod.bag.format="ipv4"}),AG=O("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=F7),Le.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),RG=O("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=B7),Le.init(e,t)}),IG=O("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=V7),Le.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,s]=r;if(!s)throw new Error;const o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Wj(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const MG=O("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=U7),Le.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Wj(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function LG(e){if(!$j.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Wj(n)}const DG=O("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$j),Le.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{LG(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),zG=O("$ZodE164",(e,t)=>{t.pattern??(t.pattern=H7),Le.init(e,t)});function NG(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const $G=O("$ZodJWT",(e,t)=>{Le.init(e,t),e._zod.check=n=>{NG(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Hj=O("$ZodNumber",(e,t)=>{Xe.init(e,t),e._zod.pattern=e._zod.bag.pattern??Q7,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),n}}),OG=O("$ZodNumberFormat",(e,t)=>{tG.init(e,t),Hj.init(e,t)}),FG=O("$ZodUnknown",(e,t)=>{Xe.init(e,t),e._zod.parse=n=>n}),BG=O("$ZodNever",(e,t)=>{Xe.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Wb(e,t,n){e.issues.length&&t.issues.push(...Lj(n,e.issues)),t.value[n]=e.value}const VG=O("$ZodArray",(e,t)=>{Xe.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const s=[];for(let o=0;o<i.length;o++){const a=i[o],l=t.element._zod.run({value:a,issues:[]},r);l instanceof Promise?s.push(l.then(u=>Wb(u,n,o))):Wb(l,n,o)}return s.length?Promise.all(s).then(()=>n):n}});function dd(e,t,n,r,i,s){const o=n in r;if(e.issues.length){if(i&&s&&!o)return;t.issues.push(...Lj(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Zj(e){var r,i,s,o;const t=Object.keys(e.shape);for(const a of t)if(!((o=(s=(i=(r=e.shape)==null?void 0:r[a])==null?void 0:i._zod)==null?void 0:s.traits)!=null&&o.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=o7(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Kj(e,t,n,r,i,s){const o=[],a=i.keySet,l=i.catchall._zod,u=l.def.type,c=l.optin==="optional",d=l.optout==="optional";for(const f in t){if(f==="__proto__"||a.has(f))continue;if(u==="never"){o.push(f);continue}const h=l.run({value:t[f],issues:[]},r);h instanceof Promise?e.push(h.then(p=>dd(p,n,f,t,c,d))):dd(h,n,f,t,c,d)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const UG=O("$ZodObject",(e,t)=>{Xe.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...a};return Object.defineProperty(t,"shape",{value:l}),l}})}const r=wv(()=>Zj(t));ve(e._zod,"propValues",()=>{const a=t.shape,l={};for(const u in a){const c=a[u]._zod;if(c.values){l[u]??(l[u]=new Set);for(const d of c.values)l[u].add(d)}}return l});const i=cd,s=t.catchall;let o;e._zod.parse=(a,l)=>{o??(o=r.value);const u=a.value;if(!i(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const c=[],d=o.shape;for(const f of o.keys){const h=d[f],p=h._zod.optin==="optional",y=h._zod.optout==="optional",x=h._zod.run({value:u[f],issues:[]},l);x instanceof Promise?c.push(x.then(m=>dd(m,a,f,u,p,y))):dd(x,a,f,u,p,y)}return s?Kj(c,u,a,l,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),WG=O("$ZodObjectJIT",(e,t)=>{UG.init(e,t);const n=e._zod.parse,r=wv(()=>Zj(t)),i=f=>{var w,S;const h=new fG(["shape","payload","ctx"]),p=r.value,y=k=>{const b=Vb(k);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};h.write("const input = payload.value;");const x=Object.create(null);let m=0;for(const k of p.keys)x[k]=`key_${m++}`;h.write("const newResult = {};");for(const k of p.keys){const b=x[k],C=Vb(k),T=f[k],A=((w=T==null?void 0:T._zod)==null?void 0:w.optin)==="optional",E=((S=T==null?void 0:T._zod)==null?void 0:S.optout)==="optional";h.write(`const ${b} = ${y(k)};`),A&&E?h.write(`
|
|
96
|
+
if (${b}.issues.length) {
|
|
97
|
+
if (${C} in input) {
|
|
98
|
+
payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
|
|
99
|
+
...iss,
|
|
100
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
101
|
+
})));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (${b}.value === undefined) {
|
|
106
|
+
if (${C} in input) {
|
|
107
|
+
newResult[${C}] = undefined;
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
newResult[${C}] = ${b}.value;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
`):A?h.write(`
|
|
114
|
+
if (${b}.issues.length) {
|
|
115
|
+
payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
|
|
116
|
+
...iss,
|
|
117
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
118
|
+
})));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (${b}.value === undefined) {
|
|
122
|
+
if (${C} in input) {
|
|
123
|
+
newResult[${C}] = undefined;
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
newResult[${C}] = ${b}.value;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
`):h.write(`
|
|
130
|
+
const ${b}_present = ${C} in input;
|
|
131
|
+
if (${b}.issues.length) {
|
|
132
|
+
payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
|
|
133
|
+
...iss,
|
|
134
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
135
|
+
})));
|
|
136
|
+
}
|
|
137
|
+
if (!${b}_present && !${b}.issues.length) {
|
|
138
|
+
payload.issues.push({
|
|
139
|
+
code: "invalid_type",
|
|
140
|
+
expected: "nonoptional",
|
|
141
|
+
input: undefined,
|
|
142
|
+
path: [${C}]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (${b}_present) {
|
|
147
|
+
if (${b}.value === undefined) {
|
|
148
|
+
newResult[${C}] = undefined;
|
|
149
|
+
} else {
|
|
150
|
+
newResult[${C}] = ${b}.value;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
`)}h.write("payload.value = newResult;"),h.write("return payload;");const v=h.compile();return(k,b)=>v(f,k,b)};let s;const o=cd,a=!xv.jitless,u=a&&i7.value,c=t.catchall;let d;e._zod.parse=(f,h)=>{d??(d=r.value);const p=f.value;return o(p)?a&&u&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(s||(s=i(t.shape)),f=s(f,h),c?Kj([],p,f,h,d,e):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),f)}});function Hb(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!Js(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(o=>ps(o,r,hs())))}),t)}const HG=O("$ZodUnion",(e,t)=>{Xe.init(e,t),ve(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ve(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ve(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ve(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>Sv(i.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let s=!1;const o=[];for(const a of t.options){const l=a._zod.run({value:r.value,issues:[]},i);if(l instanceof Promise)o.push(l),s=!0;else{if(l.issues.length===0)return l;o.push(l)}}return s?Promise.all(o).then(a=>Hb(a,r,e,i)):Hb(o,r,e,i)}}),ZG=O("$ZodIntersection",(e,t)=>{Xe.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,s=t.left._zod.run({value:i,issues:[]},r),o=t.right._zod.run({value:i,issues:[]},r);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([l,u])=>Zb(n,l,u)):Zb(n,s,o)}});function Um(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ml(e)&&ml(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),i={...e,...t};for(const s of r){const o=Um(e[s],t[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],s=t[r],o=Um(i,s);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Zb(e,t,n){const r=new Map;let i;for(const a of t.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(a);const s=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&e.issues.push({...i,keys:s}),Js(e))return e;const o=Um(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const KG=O("$ZodEnum",(e,t)=>{Xe.init(e,t);const n=Rj(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>s7.has(typeof i)).map(i=>typeof i=="string"?nf(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:e}),i}}),GG=O("$ZodTransform",(e,t)=>{Xe.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Aj(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(n.value=o,n.fallback=!0,n));if(i instanceof Promise)throw new fo;return n.value=i,n.fallback=!0,n}});function Kb(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Gj=O("$ZodOptional",(e,t)=>{Xe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ve(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Sv(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=n.value,s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(o=>Kb(o,i)):Kb(s,i)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),YG=O("$ZodExactOptional",(e,t)=>{Gj.init(e,t),ve(e._zod,"values",()=>t.innerType._zod.values),ve(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),XG=O("$ZodNullable",(e,t)=>{Xe.init(e,t),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Sv(n.source)}|null)$`):void 0}),ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),QG=O("$ZodDefault",(e,t)=>{Xe.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>Gb(s,t)):Gb(i,t)}});function Gb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const qG=O("$ZodPrefault",(e,t)=>{Xe.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),JG=O("$ZodNonOptional",(e,t)=>{Xe.init(e,t),ve(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>Yb(s,e)):Yb(i,e)}});function Yb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const eY=O("$ZodCatch",(e,t)=>{Xe.init(e,t),e._zod.optin="optional",ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(o=>ps(o,r,hs()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>ps(s,r,hs()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),tY=O("$ZodPipe",(e,t)=>{Xe.init(e,t),ve(e._zod,"values",()=>t.in._zod.values),ve(e._zod,"optin",()=>t.in._zod.optin),ve(e._zod,"optout",()=>t.out._zod.optout),ve(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(o=>bu(o,t.in,r)):bu(s,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(s=>bu(s,t.out,r)):bu(i,t.out,r)}});function bu(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const nY=O("$ZodReadonly",(e,t)=>{Xe.init(e,t),ve(e._zod,"propValues",()=>t.innerType._zod.propValues),ve(e._zod,"values",()=>t.innerType._zod.values),ve(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),ve(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(Xb):Xb(i)}});function Xb(e){return e.value=Object.freeze(e.value),e}const rY=O("$ZodCustom",(e,t)=>{Wt.init(e,t),Xe.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(s=>Qb(s,n,r,e));Qb(i,n,r,e)}});function Qb(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(gl(i))}}var qb;class iY{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function sY(){return new iY}(qb=globalThis).__zod_globalRegistry??(qb.__zod_globalRegistry=sY());const ya=globalThis.__zod_globalRegistry;function oY(e,t){return new e({type:"string",...ee(t)})}function aY(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ee(t)})}function Jb(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ee(t)})}function lY(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ee(t)})}function uY(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ee(t)})}function cY(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ee(t)})}function dY(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ee(t)})}function fY(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ee(t)})}function hY(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ee(t)})}function pY(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ee(t)})}function mY(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ee(t)})}function gY(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ee(t)})}function yY(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ee(t)})}function vY(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ee(t)})}function xY(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ee(t)})}function wY(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ee(t)})}function bY(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ee(t)})}function SY(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ee(t)})}function _Y(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ee(t)})}function kY(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ee(t)})}function CY(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ee(t)})}function PY(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ee(t)})}function TY(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ee(t)})}function EY(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ee(t)})}function jY(e,t){return new e({type:"string",format:"date",check:"string_format",...ee(t)})}function AY(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ee(t)})}function RY(e,t){return new e({type:"string",format:"duration",check:"string_format",...ee(t)})}function IY(e,t){return new e({type:"number",checks:[],...ee(t)})}function MY(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ee(t)})}function LY(e){return new e({type:"unknown"})}function DY(e,t){return new e({type:"never",...ee(t)})}function eS(e,t){return new Vj({check:"less_than",...ee(t),value:e,inclusive:!1})}function Mh(e,t){return new Vj({check:"less_than",...ee(t),value:e,inclusive:!0})}function tS(e,t){return new Uj({check:"greater_than",...ee(t),value:e,inclusive:!1})}function Lh(e,t){return new Uj({check:"greater_than",...ee(t),value:e,inclusive:!0})}function nS(e,t){return new eG({check:"multiple_of",...ee(t),value:e})}function Yj(e,t){return new nG({check:"max_length",...ee(t),maximum:e})}function fd(e,t){return new rG({check:"min_length",...ee(t),minimum:e})}function Xj(e,t){return new iG({check:"length_equals",...ee(t),length:e})}function zY(e,t){return new sG({check:"string_format",format:"regex",...ee(t),pattern:e})}function NY(e){return new oG({check:"string_format",format:"lowercase",...ee(e)})}function $Y(e){return new aG({check:"string_format",format:"uppercase",...ee(e)})}function OY(e,t){return new lG({check:"string_format",format:"includes",...ee(t),includes:e})}function FY(e,t){return new uG({check:"string_format",format:"starts_with",...ee(t),prefix:e})}function BY(e,t){return new cG({check:"string_format",format:"ends_with",...ee(t),suffix:e})}function Bo(e){return new dG({check:"overwrite",tx:e})}function VY(e){return Bo(t=>t.normalize(e))}function UY(){return Bo(e=>e.trim())}function WY(){return Bo(e=>e.toLowerCase())}function HY(){return Bo(e=>e.toUpperCase())}function ZY(){return Bo(e=>r7(e))}function KY(e,t,n){return new e({type:"array",element:t,...ee(n)})}function GY(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ee(n)})}function YY(e,t){const n=XY(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(gl(i,r.value,n._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(gl(s))}},e(r.value,r)),t);return n}function XY(e,t){const n=new Wt({check:"custom",...ee(t)});return n._zod.check=e,n}function Qj(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??ya,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function mt(e,t,n={path:[],schemaPath:[]}){var c,d;var r;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);const a=(d=(c=e._zod).toJSONSchema)==null?void 0:d.call(c);if(a)o.schema=a;else{const f={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,f);else{const p=o.schema,y=t.processors[i.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);y(e,t,p,f)}const h=e._zod.parent;h&&(o.ref||(o.ref=h),mt(h,t,f),t.seen.get(h).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),t.io==="input"&&St(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&"_prefault"in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function qj(e,t){var o,a,l,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const c of e.seen.entries()){const d=(o=e.metadataRegistry.get(c[0]))==null?void 0:o.id;if(d){const f=r.get(d);if(f&&f!==c[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,c[0])}}const i=c=>{var y;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const x=(y=e.external.registry.get(c[0]))==null?void 0:y.id,m=e.external.uri??(w=>w);if(x)return{ref:m(x)};const v=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=v,{defId:v,ref:`${m("__shared")}#/${d}/${v}`}}if(c[1]===n)return{ref:"#"};const h=`#/${d}/`,p=c[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},s=c=>{if(c[1].schema.$ref)return;const d=c[1],{ref:f,defId:h}=i(c);d.def={...d.schema},h&&(d.defId=h);const p=d.schema;for(const y in p)delete p[y];p.$ref=f};if(e.cycles==="throw")for(const c of e.seen.entries()){const d=c[1];if(d.cycle)throw new Error(`Cycle detected: #/${(a=d.cycle)==null?void 0:a.join("/")}/<root>
|
|
155
|
+
|
|
156
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const d=c[1];if(t===c[0]){s(c);continue}if(e.external){const h=(l=e.external.registry.get(c[0]))==null?void 0:l.id;if(t!==c[0]&&h){s(c);continue}}if((u=e.metadataRegistry.get(c[0]))==null?void 0:u.id){s(c);continue}if(d.cycle){s(c);continue}if(d.count>1&&e.reused==="ref"){s(c);continue}}}function Jj(e,t){var a,l,u,c;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=d=>{const f=e.seen.get(d);if(f.ref===null)return;const h=f.def??f.schema,p={...h},y=f.ref;if(f.ref=null,y){r(y);const m=e.seen.get(y),v=m.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(v)):Object.assign(h,v),Object.assign(h,p),d._zod.parent===y)for(const S in h)S==="$ref"||S==="allOf"||S in p||delete h[S];if(v.$ref&&m.def)for(const S in h)S==="$ref"||S==="allOf"||S in m.def&&JSON.stringify(h[S])===JSON.stringify(m.def[S])&&delete h[S]}const x=d._zod.parent;if(x&&x!==y){r(x);const m=e.seen.get(x);if(m!=null&&m.schema.$ref&&(h.$ref=m.schema.$ref,m.def))for(const v in h)v==="$ref"||v==="allOf"||v in m.def&&JSON.stringify(h[v])===JSON.stringify(m.def[v])&&delete h[v]}e.override({zodSchema:d,jsonSchema:h,path:f.path??[]})};for(const d of[...e.seen.entries()].reverse())r(d[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const d=(l=e.external.registry.get(t))==null?void 0:l.id;if(!d)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(d)}Object.assign(i,n.def??n.schema);const s=(u=e.metadataRegistry.get(t))==null?void 0:u.id;s!==void 0&&i.id===s&&delete i.id;const o=((c=e.external)==null?void 0:c.defs)??{};for(const d of e.seen.entries()){const f=d[1];f.def&&f.defId&&(f.def.id===f.defId&&delete f.def.id,o[f.defId]=f.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{const d=JSON.parse(JSON.stringify(i));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:hd(t,"input",e.processors),output:hd(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function St(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return St(r.element,n);if(r.type==="set")return St(r.valueType,n);if(r.type==="lazy")return St(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return St(r.innerType,n);if(r.type==="intersection")return St(r.left,n)||St(r.right,n);if(r.type==="record"||r.type==="map")return St(r.keyType,n)||St(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:St(r.in,n)||St(r.out,n);if(r.type==="object"){for(const i in r.shape)if(St(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(St(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(St(i,n))return!0;return!!(r.rest&&St(r.rest,n))}return!1}const QY=(e,t={})=>n=>{const r=Qj({...n,processors:t});return mt(e,r),qj(r,e),Jj(r,e)},hd=(e,t,n={})=>r=>{const{libraryOptions:i,target:s}=r??{},o=Qj({...i??{},target:s,io:t,processors:n});return mt(e,o),qj(o,e),Jj(o,e)},qY={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},JY=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=qY[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),l&&l.size>0){const c=[...l];c.length===1?i.pattern=c[0].source:c.length>1&&(i.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},eX=(e,t,n,r)=>{const i=n,{minimum:s,maximum:o,format:a,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number";const d=typeof c=="number"&&c>=(s??Number.NEGATIVE_INFINITY),f=typeof u=="number"&&u<=(o??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";d?h?(i.minimum=c,i.exclusiveMinimum=!0):i.exclusiveMinimum=c:typeof s=="number"&&(i.minimum=s),f?h?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u:typeof o=="number"&&(i.maximum=o),typeof l=="number"&&(i.multipleOf=l)},tX=(e,t,n,r)=>{n.not={}},nX=(e,t,n,r)=>{},rX=(e,t,n,r)=>{const i=e._zod.def,s=Rj(i.entries);s.every(o=>typeof o=="number")&&(n.type="number"),s.every(o=>typeof o=="string")&&(n.type="string"),n.enum=s},iX=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},sX=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},oX=(e,t,n,r)=>{const i=n,s=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=mt(s.element,t,{...r,path:[...r.path,"items"]})},aX=(e,t,n,r)=>{var u;const i=n,s=e._zod.def;i.type="object",i.properties={};const o=s.shape;for(const c in o)i.properties[c]=mt(o[c],t,{...r,path:[...r.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(c=>{const d=s.shape[c]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),((u=s.catchall)==null?void 0:u._zod.def.type)==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=mt(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},lX=(e,t,n,r)=>{const i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>mt(a,t,{...r,path:[...r.path,s?"oneOf":"anyOf",l]}));s?n.oneOf=o:n.anyOf=o},uX=(e,t,n,r)=>{const i=e._zod.def,s=mt(i.left,t,{...r,path:[...r.path,"allOf",0]}),o=mt(i.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];n.allOf=l},cX=(e,t,n,r)=>{const i=e._zod.def,s=mt(i.innerType,t,r),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},dX=(e,t,n,r)=>{const i=e._zod.def;mt(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType},fX=(e,t,n,r)=>{const i=e._zod.def;mt(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},hX=(e,t,n,r)=>{const i=e._zod.def;mt(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},pX=(e,t,n,r)=>{const i=e._zod.def;mt(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},mX=(e,t,n,r)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),o=t.io==="input"?s?i.out:i.in:i.out;mt(o,t,r);const a=t.seen.get(e);a.ref=o},gX=(e,t,n,r)=>{const i=e._zod.def;mt(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType,n.readOnly=!0},eA=(e,t,n,r)=>{const i=e._zod.def;mt(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType},yX=O("ZodISODateTime",(e,t)=>{CG.init(e,t),Oe.init(e,t)});function vX(e){return EY(yX,e)}const xX=O("ZodISODate",(e,t)=>{PG.init(e,t),Oe.init(e,t)});function wX(e){return jY(xX,e)}const bX=O("ZodISOTime",(e,t)=>{TG.init(e,t),Oe.init(e,t)});function SX(e){return AY(bX,e)}const _X=O("ZodISODuration",(e,t)=>{EG.init(e,t),Oe.init(e,t)});function kX(e){return RY(_X,e)}const CX=(e,t)=>{zj.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>y7(e,n)},flatten:{value:n=>g7(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Vm,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Vm,2)}},isEmpty:{get(){return e.issues.length===0}}})},Sn=O("ZodError",CX,{Parent:Error}),PX=kv(Sn),TX=Cv(Sn),EX=rf(Sn),jX=sf(Sn),AX=w7(Sn),RX=b7(Sn),IX=S7(Sn),MX=_7(Sn),LX=k7(Sn),DX=C7(Sn),zX=P7(Sn),NX=T7(Sn),rS=new WeakMap;function Nl(e,t,n){const r=Object.getPrototypeOf(e);let i=rS.get(r);if(i||(i=new Set,rS.set(r,i)),!i.has(t)){i.add(t);for(const s in n){const o=n[s];Object.defineProperty(r,s,{configurable:!0,enumerable:!1,get(){const a=o.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}const Qe=O("ZodType",(e,t)=>(Xe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:hd(e,"input"),output:hd(e,"output")}}),e.toJSONSchema=QY(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>PX(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>EX(e,n,r),e.parseAsync=async(n,r)=>TX(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>jX(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>AX(e,n,r),e.decode=(n,r)=>RX(e,n,r),e.encodeAsync=async(n,r)=>IX(e,n,r),e.decodeAsync=async(n,r)=>MX(e,n,r),e.safeEncode=(n,r)=>LX(e,n,r),e.safeDecode=(n,r)=>DX(e,n,r),e.safeEncodeAsync=async(n,r)=>zX(e,n,r),e.safeDecodeAsync=async(n,r)=>NX(e,n,r),Nl(e,"ZodType",{check(...n){const r=this.def;return this.clone(Ti(r,{checks:[...r.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return Ei(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(jQ(n,r))},superRefine(n,r){return this.check(AQ(n,r))},overwrite(n){return this.check(Bo(n))},optional(){return aS(this)},exactOptional(){return gQ(this)},nullable(){return lS(this)},nullish(){return aS(lS(this))},nonoptional(n){return SQ(this,n)},array(){return aQ(this)},or(n){return cQ([this,n])},and(n){return fQ(this,n)},transform(n){return uS(this,pQ(n))},default(n){return xQ(this,n)},prefault(n){return bQ(this,n)},catch(n){return kQ(this,n)},pipe(n){return uS(this,n)},readonly(){return TQ(this)},describe(n){const r=this.clone();return ya.add(r,{description:n}),r},meta(...n){if(n.length===0)return ya.get(this);const r=this.clone();return ya.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=ya.get(e))==null?void 0:n.description},configurable:!0}),e)),tA=O("_ZodString",(e,t)=>{Pv.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(r,i,s)=>JY(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Nl(e,"_ZodString",{regex(...r){return this.check(zY(...r))},includes(...r){return this.check(OY(...r))},startsWith(...r){return this.check(FY(...r))},endsWith(...r){return this.check(BY(...r))},min(...r){return this.check(fd(...r))},max(...r){return this.check(Yj(...r))},length(...r){return this.check(Xj(...r))},nonempty(...r){return this.check(fd(1,...r))},lowercase(r){return this.check(NY(r))},uppercase(r){return this.check($Y(r))},trim(){return this.check(UY())},normalize(...r){return this.check(VY(...r))},toLowerCase(){return this.check(WY())},toUpperCase(){return this.check(HY())},slugify(){return this.check(ZY())}})}),$X=O("ZodString",(e,t)=>{Pv.init(e,t),tA.init(e,t),e.email=n=>e.check(aY(OX,n)),e.url=n=>e.check(fY(FX,n)),e.jwt=n=>e.check(TY(tQ,n)),e.emoji=n=>e.check(hY(BX,n)),e.guid=n=>e.check(Jb(iS,n)),e.uuid=n=>e.check(lY(Su,n)),e.uuidv4=n=>e.check(uY(Su,n)),e.uuidv6=n=>e.check(cY(Su,n)),e.uuidv7=n=>e.check(dY(Su,n)),e.nanoid=n=>e.check(pY(VX,n)),e.guid=n=>e.check(Jb(iS,n)),e.cuid=n=>e.check(mY(UX,n)),e.cuid2=n=>e.check(gY(WX,n)),e.ulid=n=>e.check(yY(HX,n)),e.base64=n=>e.check(kY(qX,n)),e.base64url=n=>e.check(CY(JX,n)),e.xid=n=>e.check(vY(ZX,n)),e.ksuid=n=>e.check(xY(KX,n)),e.ipv4=n=>e.check(wY(GX,n)),e.ipv6=n=>e.check(bY(YX,n)),e.cidrv4=n=>e.check(SY(XX,n)),e.cidrv6=n=>e.check(_Y(QX,n)),e.e164=n=>e.check(PY(eQ,n)),e.datetime=n=>e.check(vX(n)),e.date=n=>e.check(wX(n)),e.time=n=>e.check(SX(n)),e.duration=n=>e.check(kX(n))});function sr(e){return oY($X,e)}const Oe=O("ZodStringFormat",(e,t)=>{Le.init(e,t),tA.init(e,t)}),OX=O("ZodEmail",(e,t)=>{gG.init(e,t),Oe.init(e,t)}),iS=O("ZodGUID",(e,t)=>{pG.init(e,t),Oe.init(e,t)}),Su=O("ZodUUID",(e,t)=>{mG.init(e,t),Oe.init(e,t)}),FX=O("ZodURL",(e,t)=>{yG.init(e,t),Oe.init(e,t)}),BX=O("ZodEmoji",(e,t)=>{vG.init(e,t),Oe.init(e,t)}),VX=O("ZodNanoID",(e,t)=>{xG.init(e,t),Oe.init(e,t)}),UX=O("ZodCUID",(e,t)=>{wG.init(e,t),Oe.init(e,t)}),WX=O("ZodCUID2",(e,t)=>{bG.init(e,t),Oe.init(e,t)}),HX=O("ZodULID",(e,t)=>{SG.init(e,t),Oe.init(e,t)}),ZX=O("ZodXID",(e,t)=>{_G.init(e,t),Oe.init(e,t)}),KX=O("ZodKSUID",(e,t)=>{kG.init(e,t),Oe.init(e,t)}),GX=O("ZodIPv4",(e,t)=>{jG.init(e,t),Oe.init(e,t)}),YX=O("ZodIPv6",(e,t)=>{AG.init(e,t),Oe.init(e,t)}),XX=O("ZodCIDRv4",(e,t)=>{RG.init(e,t),Oe.init(e,t)}),QX=O("ZodCIDRv6",(e,t)=>{IG.init(e,t),Oe.init(e,t)}),qX=O("ZodBase64",(e,t)=>{MG.init(e,t),Oe.init(e,t)}),JX=O("ZodBase64URL",(e,t)=>{DG.init(e,t),Oe.init(e,t)}),eQ=O("ZodE164",(e,t)=>{zG.init(e,t),Oe.init(e,t)}),tQ=O("ZodJWT",(e,t)=>{$G.init(e,t),Oe.init(e,t)}),nA=O("ZodNumber",(e,t)=>{Hj.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(r,i,s)=>eX(e,r,i),Nl(e,"ZodNumber",{gt(r,i){return this.check(tS(r,i))},gte(r,i){return this.check(Lh(r,i))},min(r,i){return this.check(Lh(r,i))},lt(r,i){return this.check(eS(r,i))},lte(r,i){return this.check(Mh(r,i))},max(r,i){return this.check(Mh(r,i))},int(r){return this.check(sS(r))},safe(r){return this.check(sS(r))},positive(r){return this.check(tS(0,r))},nonnegative(r){return this.check(Lh(0,r))},negative(r){return this.check(eS(0,r))},nonpositive(r){return this.check(Mh(0,r))},multipleOf(r,i){return this.check(nS(r,i))},step(r,i){return this.check(nS(r,i))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ua(e){return IY(nA,e)}const nQ=O("ZodNumberFormat",(e,t)=>{OG.init(e,t),nA.init(e,t)});function sS(e){return MY(nQ,e)}const rQ=O("ZodUnknown",(e,t)=>{FG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>nX()});function oS(){return LY(rQ)}const iQ=O("ZodNever",(e,t)=>{BG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tX(e,n,r)});function sQ(e){return DY(iQ,e)}const oQ=O("ZodArray",(e,t)=>{VG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>oX(e,n,r,i),e.element=t.element,Nl(e,"ZodArray",{min(n,r){return this.check(fd(n,r))},nonempty(n){return this.check(fd(1,n))},max(n,r){return this.check(Yj(n,r))},length(n,r){return this.check(Xj(n,r))},unwrap(){return this.element}})});function aQ(e,t){return KY(oQ,e,t)}const lQ=O("ZodObject",(e,t)=>{WG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>aX(e,n,r,i),ve(e,"shape",()=>t.shape),Nl(e,"ZodObject",{keyof(){return er(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:oS()})},loose(){return this.clone({...this._zod.def,catchall:oS()})},strict(){return this.clone({...this._zod.def,catchall:sQ()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return c7(this,n)},safeExtend(n){return d7(this,n)},merge(n){return f7(this,n)},pick(n){return l7(this,n)},omit(n){return u7(this,n)},partial(...n){return h7(rA,this,n[0])},required(...n){return p7(iA,this,n[0])}})});function ho(e,t){const n={type:"object",shape:e??{},...ee(t)};return new lQ(n)}const uQ=O("ZodUnion",(e,t)=>{HG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>lX(e,n,r,i),e.options=t.options});function cQ(e,t){return new uQ({type:"union",options:e,...ee(t)})}const dQ=O("ZodIntersection",(e,t)=>{ZG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>uX(e,n,r,i)});function fQ(e,t){return new dQ({type:"intersection",left:e,right:t})}const Wm=O("ZodEnum",(e,t)=>{KG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(r,i,s)=>rX(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const s={};for(const o of r)if(n.has(o))s[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Wm({...t,checks:[],...ee(i),entries:s})},e.exclude=(r,i)=>{const s={...t.entries};for(const o of r)if(n.has(o))delete s[o];else throw new Error(`Key ${o} not found in enum`);return new Wm({...t,checks:[],...ee(i),entries:s})}});function er(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Wm({type:"enum",entries:n,...ee(t)})}const hQ=O("ZodTransform",(e,t)=>{GG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>sX(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Aj(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(gl(s,n.value,t));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(gl(o))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(s=>(n.value=s,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function pQ(e){return new hQ({type:"transform",transform:e})}const rA=O("ZodOptional",(e,t)=>{Gj.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>eA(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function aS(e){return new rA({type:"optional",innerType:e})}const mQ=O("ZodExactOptional",(e,t)=>{YG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>eA(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function gQ(e){return new mQ({type:"optional",innerType:e})}const yQ=O("ZodNullable",(e,t)=>{XG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>cX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function lS(e){return new yQ({type:"nullable",innerType:e})}const vQ=O("ZodDefault",(e,t)=>{QG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>fX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xQ(e,t){return new vQ({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Mj(t)}})}const wQ=O("ZodPrefault",(e,t)=>{qG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>hX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function bQ(e,t){return new wQ({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Mj(t)}})}const iA=O("ZodNonOptional",(e,t)=>{JG.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>dX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function SQ(e,t){return new iA({type:"nonoptional",innerType:e,...ee(t)})}const _Q=O("ZodCatch",(e,t)=>{eY.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>pX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function kQ(e,t){return new _Q({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const CQ=O("ZodPipe",(e,t)=>{tY.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>mX(e,n,r,i),e.in=t.in,e.out=t.out});function uS(e,t){return new CQ({type:"pipe",in:e,out:t})}const PQ=O("ZodReadonly",(e,t)=>{nY.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function TQ(e){return new PQ({type:"readonly",innerType:e})}const EQ=O("ZodCustom",(e,t)=>{rY.init(e,t),Qe.init(e,t),e._zod.processJSONSchema=(n,r,i)=>iX(e,n)});function jQ(e,t={}){return GY(EQ,e,t)}function AQ(e,t){return YY(e,t)}const pd=sr().regex(/^\d{4}-\d{2}-\d{2}$/,"expected a YYYY-MM-DD date");ho({status:er(["idea","planned","in-progress","review","done","dropped"]),kind:er(["feat","fix","chore","docs","refactor"]).optional(),id:sr().optional(),idea:sr().optional(),agent:er(br).optional(),created:pd,updated:pd.optional(),tags:sr().optional()});ho({date:pd,status:er(["decided","superseded"]),"superseded-by":sr().optional()});ho({status:er(["open","resolved"]),raised:pd,"resolved-by":sr().optional(),blocks:sr().optional()});ho({version:sr(),projectName:sr(),initializedAt:sr(),nextId:ho({feat:ua(),fix:ua(),chore:ua(),docs:ua(),refactor:ua()}).optional(),defaultAgent:er(br).optional(),defaultAgents:ho({phase:er(br),planDraft:er(br),ideaExtend:er(br)}).optional()});const RQ=/^(IDEA-\d+):\s*/,IQ=/\n---+\n/;function MQ(e){return e.split(IQ).filter(Boolean).map(n=>{var l;const r=n.match(/^#{1,3}\s+(.+)/m),i=r?r[1].trim():((l=n.trim().split(`
|
|
157
|
+
`)[0])==null?void 0:l.trim())??"Untitled",s=i.match(RQ),o=(s==null?void 0:s[1])??null,a=o?i.slice(s[0].length):i;return{id:o,title:a,body:n.trim()}})}function cS(e,t){return e.map(n=>{if(!n.id)return{...n,status:"planned"};const r=t.filter(s=>s.idea===n.id);if(r.length===0)return{...n,status:"planned"};const i=r.every(s=>s.status==="done"||s.status==="dropped");return{...n,status:i?"done":"planned"}})}const LQ={},dS=e=>{let t;const n=new Set,r=(c,d)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(p=>p(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(LQ?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},DQ=e=>e?dS(e):dS,sA={},{useDebugValue:zQ}=os,{useSyncExternalStoreWithSelector:NQ}=pL;let fS=!1;const $Q=e=>e;function OQ(e,t=$Q,n){(sA?"production":void 0)!=="production"&&n&&!fS&&(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"),fS=!0);const r=NQ(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return zQ(r),r}const hS=e=>{(sA?"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"?DQ(e):e,n=(r,i)=>OQ(t,r,i);return Object.assign(n,t),n},FQ=e=>e?hS(e):hS,BQ=async()=>(await fetch("/api/agent/status")).json(),VQ=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)}},UQ=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)}},WQ=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)}},HQ=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)}},ZQ=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)}},KQ=async()=>(await fetch("/api/decisions")).json(),GQ=async()=>(await fetch("/api/open-questions")).json(),YQ=async()=>(await fetch("/api/progress")).json(),XQ=async()=>(await fetch("/api/docs")).json(),QQ=async()=>(await fetch("/api/consistency")).json(),qQ=async()=>(await(await fetch("/api/ideas")).json()).content??"",JQ=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},eq=async()=>(await fetch("/api/plans")).json(),tq=async e=>{await fetch("/api/plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},nq=async e=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"DELETE"})},Un=async(e,t)=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},rq=async()=>(await fetch("/api/status")).json(),iq=async e=>{await fetch(`/api/status/check?name=${e}`,{method:"POST"})},sq=async()=>{await fetch("/api/status/fix",{method:"POST"})},J=FQ((e,t)=>({plans:null,plansLoading:!1,plansError:null,loadPlans:async()=>{e({plansLoading:!0});try{const n=await eq(),{ideaEntries:r}=t();e({plans:n,plansError:null,plansLoading:!1,ideaEntries:cS(r,n.entries)})}catch(n){e({plansError:String(n),plansLoading:!1})}},ideasContent:null,ideaEntries:[],loadIdeas:async()=>{try{const n=await qQ(),r=n.trim()?MQ(n):[],{plans:i}=t();e({ideasContent:n,ideaEntries:cS(r,(i==null?void 0:i.entries)??[])})}catch{e({ideasContent:null,ideaEntries:[]})}},activePlanTitle:null,setActivePlanTitle:n=>e({activePlanTitle:n}),activeIdeaTitle:null,setActiveIdeaTitle:n=>e({activeIdeaTitle:n}),view:"list",setView:n=>e({view:n}),decisions:[],decisionsLoading:!0,loadDecisions:async()=>{e({decisionsLoading:!0});try{const n=await KQ();e({decisions:n.entries,decisionsLoading:!1})}catch{e({decisions:[],decisionsLoading:!1})}},openQuestions:[],openQuestionsLoading:!0,loadOpenQuestions:async()=>{e({openQuestionsLoading:!0});try{const n=await GQ();e({openQuestions:n.entries,openQuestionsLoading:!1})}catch{e({openQuestions:[],openQuestionsLoading:!1})}},progress:[],progressLoading:!0,loadProgress:async()=>{e({progressLoading:!0});try{const n=await YQ();e({progress:n.entries,progressLoading:!1})}catch{e({progress:[],progressLoading:!1})}},repoDocs:[],repoDocsLoading:!0,loadRepoDocs:async()=>{e({repoDocsLoading:!0});try{const n=await XQ();e({repoDocs:n.files,repoDocsLoading:!1});const{activeDocSection:r}=t();!r&&n.files.some(i=>i.name==="MAIN.md")&&e({activeDocSection:"repo-docs",activeDocTitle:"MAIN.md"})}catch{e({repoDocs:[],repoDocsLoading:!1})}},activeDocSection:null,setActiveDocSection:n=>e({activeDocSection:n}),activeDocTitle:null,setActiveDocTitle:n=>e({activeDocTitle:n}),docSearchQuery:"",setDocSearchQuery:n=>e({docSearchQuery:n}),activeSettingsSection:"general",setActiveSettingsSection:n=>e({activeSettingsSection:n}),settingsConfigFiles:[],setSettingsConfigFiles:n=>e({settingsConfigFiles:n}),status:null,loadStatus:async()=>{try{const n=await rq();e({status:n})}catch{}},runCheck:async n=>{try{await iq(n)}catch{}},fixQuality:async()=>{try{await sq()}catch{}},consistency:[],loadConsistency:async()=>{try{const n=await QQ();e({consistency:n})}catch{}},gitStatus:null,gitBranch:null,loadGitStatus:async()=>{try{const{branch:n,entries:r}=await e7();e({gitStatus:r,gitBranch:n})}catch{}},agentStatus:null,loadAgentStatus:async()=>{try{const n=await BQ();e({agentStatus:n})}catch{}},launchAgent:async(n,r)=>{await VQ(n,r),await t().loadAgentStatus()},launchPlanAudit:async(n,r)=>{await UQ(n,r),await t().loadAgentStatus()},launchPlanDraft:async(n,r)=>{await WQ(n,r),await t().loadAgentStatus()},launchIdeaExtend:async(n,r)=>{await HQ(n,r),await t().loadAgentStatus()},stopAgent:async()=>{await ZQ(),await t().loadAgentStatus()}}));function pS(e){const t=e.match(/Found (\d+) errors?\./);return t?Number(t[1]):0}function oq(e,t){const n=pS(e)+pS(t);return n>0?`${n} lint/format issue${n===1?"":"s"} found.`:"Lint or format check failed."}function aq(e){const t=e.match(/Tests\s+(\d+) failed/);return t?`${t[1]} test${t[1]==="1"?"":"s"} failed.`:"Tests failed."}async function Tv(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 lq=({prompt:e,label:t="Copy fix prompt",variant:n="icon"})=>{const[r,i]=P.useState("idle"),s=async o=>{o.stopPropagation();const a=await Tv(e);i(a?"copied":"failed"),setTimeout(()=>i("idle"),1500)};if(n==="link"){const o=r==="copied"?"Copied!":r==="failed"?"Copy failed":t;return g.jsx("button",{type:"button",onClick:s,style:{background:"none",border:"none",padding:0,color:"inherit",textDecoration:"underline",cursor:"pointer",font:"inherit",fontFamily:oe.handwritten,fontSize:be.sm},children:o})}return g.jsx(yn,{icon:r==="copied"?g.jsx(Zd,{size:16}):r==="failed"?g.jsx(vs,{size:16}):g.jsx(Cy,{size:16}),variant:"chalkboard",size:"small",label:r==="copied"?"Copied":r==="failed"?"Copy failed":t,onClick:s})},mS=`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")`,_u=st.deskBg,gS=st.deskLight,uq=st.deskText,Wr=st.deskTextMuted,ku=st.deskBorder,Wn=st.deskChalk,Dh={fontFamily:oe.serif,fontSize:be.base,fontWeight:600,color:Wr,marginBottom:L[3]},cq=({open:e,onToggle:t})=>{const n=J(U=>U.plans),r=J(U=>U.loadProgress),i=J(U=>U.loadPlans),s=J(U=>U.status),o=J(U=>U.loadStatus),a=J(U=>U.runCheck),l=J(U=>U.fixQuality),u=J(U=>U.consistency),c=J(U=>U.loadConsistency),d=J(U=>U.setActiveDocSection),f=J(U=>U.setActiveDocTitle),h=J(U=>U.setActivePlanTitle),p=J(U=>U.loadGitStatus),y=J(U=>U.gitStatus),x=J(U=>U.gitBranch),m=J(U=>U.agentStatus),v=J(U=>U.loadAgentStatus),w=J(U=>U.stopAgent),[S,k]=P.useState(!1),[b,C]=P.useState(!1),[T,A]=P.useState(new Set),[E,I]=P.useState(""),[M,F]=P.useState(""),[B,$]=P.useState(!1),[G,Z]=P.useState(null),[D,V]=P.useState(!1),_=rv(),z=Ro(),Y=P.useRef({loadProgress:r,loadPlans:i,loadStatus:o,loadConsistency:c,loadGitStatus:p,loadAgentStatus:v});Y.current={loadProgress:r,loadPlans:i,loadStatus:o,loadConsistency:c,loadGitStatus:p,loadAgentStatus:v},P.useEffect(()=>{Y.current.loadProgress(),Y.current.loadStatus(),Y.current.loadConsistency(),Y.current.loadGitStatus(),Y.current.loadAgentStatus()},[]),P.useEffect(()=>{const U=new EventSource("/api/activity/stream");return U.onmessage=()=>{Y.current.loadProgress(),Y.current.loadPlans(),Y.current.loadStatus(),Y.current.loadConsistency(),Y.current.loadGitStatus(),Y.current.loadAgentStatus()},()=>U.close()},[]);const j=P.useMemo(()=>JK(n==null?void 0:n.entries),[n==null?void 0:n.entries]),ie=P.useMemo(()=>j?`${j.kind??"feat"}: ${j.title}`:"",[j]);P.useEffect(()=>{ie&&!E&&I(ie)},[ie,E]),P.useEffect(()=>{y&&A(new Set(y.map(U=>U.path)))},[y]);const de=P.useCallback(U=>{A(Re=>{const Ue=new Set(Re);return Ue.has(U)?Ue.delete(U):Ue.add(U),Ue})},[]),ue=P.useCallback(async()=>{if(E.trim()){$(!0),Z(null);try{const U=D&&(j!=null&&j.id)?`${M}
|
|
158
|
+
|
|
159
|
+
Refs: ${j.id}`:M;await t7([...T],E.trim(),U.trim()||void 0),I(ie),F(""),V(!1),C(!1)}catch(U){Z(U.message)}finally{$(!1)}}},[E,M,T,D,j,ie]),qe=P.useCallback(U=>{if(U.kind==="blocked-plan-active"&&U.planId){const Re=n==null?void 0:n.entries.find(Ue=>Ue.id===U.planId);if(Re){h(Re.title),z({to:"/"});return}}d(U.section==="open-questions"?"questions":"decisions"),f(U.title),z({to:"/docs"})},[n==null?void 0:n.entries,z,h,d,f]);return g.jsxs(g.Fragment,{children:[g.jsx(ev,{children:!e&&g.jsx(od.div,{initial:_?void 0:{opacity:0,x:20},animate:{opacity:1,x:0},exit:_?void 0:{opacity:0,x:20},transition:{duration:_?0:.2,ease:"easeOut"},style:{position:"fixed",right:0,top:"50%",transform:"translateY(-50%)",zIndex:100,borderRadius:"6px 0 0 6px",background:_u,backgroundImage:`${mS}, linear-gradient(135deg, ${gS} 0%, ${_u} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)"},children:g.jsx(yn,{icon:g.jsx("span",{style:{fontSize:be["2xs"]},children:"S"}),variant:"chalkboard",size:"small",label:"Open stack panel",onClick:t,style:{width:28,height:64,borderRadius:"6px 0 0 6px"}})})}),g.jsxs(od.div,{animate:{x:e?0:"100%"},transition:{duration:_?0:.3,ease:[.4,0,.2,1]},style:{position:"fixed",top:0,right:0,bottom:0,width:WE.stackPanelWidth,borderLeft:"4px solid rgba(61, 53, 43, 0.12)",backgroundColor:_u,backgroundImage:`${mS}, linear-gradient(135deg, ${gS} 0%, ${_u} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",color:uq,display:"flex",flexDirection:"column",overflow:"hidden",zIndex:100},children:[g.jsxs("div",{style:{height:80,padding:`0 ${L[6]}`,borderBottom:`1px solid ${ku}`,display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[g.jsx("span",{style:{fontFamily:oe.serif,fontSize:be.base,fontWeight:700,color:Wn},children:"Stack"}),g.jsx(yn,{icon:g.jsx("span",{style:{fontSize:be.sm,lineHeight:1},children:"×"}),variant:"chalkboard",size:"small",label:"Close stack panel",onClick:t,style:{width:28,height:28,border:`1px solid ${ku}`}})]}),g.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontFamily:oe.body},children:[g.jsxs("div",{style:{flex:2,minHeight:0,display:"flex",flexDirection:"column",padding:L[6],borderBottom:`1px solid ${ku}`},children:[g.jsx("div",{style:Dh,children:"Agent"}),g.jsx(lo,{variant:"chalkboard",size:"small",className:"stack-card-fill",children:m?g.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:L[2],marginBottom:L[2],flexShrink:0},children:[g.jsxs("span",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:be.sm,color:Wn},children:[m.planTitle,m.taskKind==="phase"&&m.phaseIndex!==void 0?` — phase ${m.phaseIndex+1}`:m.taskKind==="audit"?" — audit":m.taskKind==="draft"?" — drafting":m.taskKind==="extend"?" — extending":""," ","· ",Da[m.agentId]]}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2]},children:[(()=>{const U={starting:"#5a4a2d",running:"#5a4a2d",stopping:"#5a4a2d",done:"#2d5a3b",error:"#5a2d2d"},Re={starting:"#d6c4a0",running:"#d6c4a0",stopping:"#d6c4a0",done:"#b5d6b5",error:"#d6a0a0"};return g.jsx(ct,{variant:"chalkboard",size:"small",fillColor:U[m.status],textColor:Re[m.status],children:m.status})})(),(m.status==="running"||m.status==="starting"||m.status==="stopping")&&g.jsx(yn,{icon:g.jsx(vs,{}),variant:"ghost",size:"small",label:"Stop agent",onClick:w,disabled:m.status==="stopping"})]})]}),m.lines.length>0&&g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[1],fontFamily:oe.mono,fontSize:be["2xs"],color:Wr,flex:1,minHeight:0,overflowY:"auto"},children:m.lines.map((U,Re)=>g.jsx("span",{style:{whiteSpace:"pre-wrap"},children:U},`${Re}-${U}`))})]}):g.jsx("div",{style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx("p",{style:{opacity:.5,fontSize:be.xs,margin:0},children:"No agent running."})})})]}),g.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",padding:L[6],borderBottom:`1px solid ${ku}`},children:[g.jsx("div",{style:Dh,children:"Status"}),g.jsx(lo,{variant:"chalkboard",size:"small",className:"stack-card-fill",children:(()=>{var Rr,_n,ur,Zt,bs,Ai;const U={pass:"#2d5a3b",fail:"#5a2d2d",running:"#5a4a2d",stale:"transparent"},Re={pass:"#b5d6b5",fail:"#d6a0a0",running:"#d6c4a0",stale:void 0},Ue=((Rr=s==null?void 0:s.lint)==null?void 0:Rr.status)??"stale",Ht=((_n=s==null?void 0:s.format)==null?void 0:_n.status)??"stale",Rt=((ur=s==null?void 0:s.test)==null?void 0:ur.status)??"stale",on=Ue==="running"||Ht==="running"?"running":Ue==="fail"||Ht==="fail"?"fail":Ue==="stale"&&Ht==="stale"?"stale":"pass",It=on==="running"||Rt==="running",Bn=u.length>0;`${((Zt=s==null?void 0:s.lint)==null?void 0:Zt.output)||"(none)"}${((bs=s==null?void 0:s.format)==null?void 0:bs.output)||"(none)"}`;const ji=`Fix the failing tests in this repo. Output from the last test run:
|
|
160
|
+
|
|
161
|
+
${((Ai=s==null?void 0:s.test)==null?void 0:Ai.output)||"(no output captured)"}`;return g.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:L[3]},children:[g.jsxs("div",{style:{display:"flex",gap:L[2],flexWrap:"wrap",justifyContent:"center"},children:[g.jsx("button",{type:"button",onClick:()=>{It||(a("lint"),a("format"))},disabled:It,style:{cursor:It?"not-allowed":"pointer",opacity:It&&on!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:g.jsxs(ct,{variant:"chalkboard",size:"small",fillColor:U[on],textColor:Re[on],children:["Quality",g.jsx("span",{style:{visibility:on==="running"?"visible":"hidden"},children:"…"})]})}),g.jsx("button",{type:"button",onClick:()=>{It||a("test")},disabled:It,style:{cursor:It?"not-allowed":"pointer",opacity:It&&Rt!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:g.jsxs(ct,{variant:"chalkboard",size:"small",fillColor:U[Rt],textColor:Re[Rt],children:["Tests",g.jsx("span",{style:{visibility:Rt==="running"?"visible":"hidden"},children:"…"})]})}),g.jsxs("div",{children:[g.jsx("button",{type:"button",onClick:()=>{Bn&&k(ot=>!ot)},style:{cursor:Bn?"pointer":"default",display:"inline-flex",background:"none",border:"none",padding:0},children:g.jsx(ct,{variant:"chalkboard",size:"small",fillColor:Bn?"#5a2d2d":"#2d5a3b",textColor:Bn?"#d6a0a0":"#b5d6b5",children:"Consistency"})}),S&&Bn&&g.jsx("div",{style:{marginTop:L[2],display:"flex",flexDirection:"column",gap:L[2]},children:u.map((ot,kn)=>g.jsx("div",{style:{fontFamily:oe.mono,fontSize:be["2xs"],color:Wr},children:g.jsx("button",{type:"button",onClick:()=>qe(ot),style:{background:"none",border:"none",padding:0,color:Wn,textDecoration:"underline",cursor:"pointer",font:"inherit",textAlign:"left"},children:ot.message})},`${ot.kind}-${ot.title}-${kn}`))})]})]}),(()=>{var pe,N,K;let ot,kn=null;return It?ot=g.jsx("span",{style:{color:Wr},children:"Running checks…"}):on==="fail"?(ot=g.jsx("span",{style:{color:Wr},children:oq(((pe=s==null?void 0:s.lint)==null?void 0:pe.output)??"",((N=s==null?void 0:s.format)==null?void 0:N.output)??"")}),kn=g.jsx("button",{type:"button",onClick:l,style:{background:"none",border:"none",padding:0,color:Wn,textDecoration:"underline",cursor:"pointer",font:"inherit"},children:"Suggested fix: run biome --write"})):Rt==="fail"?(ot=g.jsx("span",{style:{color:Wr},children:aq(((K=s==null?void 0:s.test)==null?void 0:K.output)??"")}),kn=g.jsxs("span",{style:{color:Wn},children:["Suggested fix:"," ",g.jsx(lq,{prompt:ji,label:"copy a fix prompt",variant:"link"})]})):on==="pass"&&Rt==="pass"?ot=g.jsx("span",{style:{color:"#b5d6b5"},children:"All checks passing."}):ot=g.jsx("span",{style:{color:Wr,opacity:.6},children:"Checks haven't run yet."}),g.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",gap:L[1],fontFamily:oe.handwritten,fontSize:be.sm},children:[ot,g.jsx("span",{style:{visibility:kn?"visible":"hidden"},children:kn??" "})]})})()]})})()})]}),g.jsxs("div",{style:{flex:2,minHeight:0,display:"flex",flexDirection:"column",padding:L[6]},children:[g.jsxs("div",{style:{...Dh,display:"flex",alignItems:"center",gap:L[2]},children:["Commit",x&&g.jsx(ct,{variant:"chalkboard",size:"small",children:x})]}),g.jsx(lo,{variant:"chalkboard",size:"small",className:"stack-card-fill",children:y&&y.length>0?g.jsxs(g.Fragment,{children:[g.jsx(GV,{title:`${y.length} file${y.length===1?"":"s"} changed`,expanded:b,onToggle:()=>C(!b),children:g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[2],paddingTop:L[2]},children:y.map(U=>g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:L[2],fontFamily:oe.mono,fontSize:be["2xs"],color:Wn,cursor:"pointer"},children:[g.jsx("input",{type:"checkbox",checked:T.has(U.path),onChange:()=>de(U.path),style:{accentColor:Wn}}),g.jsx("span",{style:{color:U.staged?Wn:Wr,minWidth:24},children:U.status}),g.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:U.path})]},U.path))})}),g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:L[3],marginTop:L[3]},children:[g.jsx(vi,{variant:"chalkboard",size:"small",placeholder:"Commit title",value:E,onChange:U=>I(U.currentTarget.value)}),g.jsx(jl,{variant:"chalkboard",size:"small",placeholder:"Commit message (optional)",value:M,onChange:U=>F(U.currentTarget.value),rows:2}),(j==null?void 0:j.id)&&g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:L[2],fontFamily:oe.handwritten,fontSize:be.sm,color:Wn,cursor:"pointer"},children:[g.jsx("input",{type:"checkbox",checked:D,onChange:()=>V(!D),style:{accentColor:Wn}}),"Add Refs: ",j.id]}),G&&g.jsx(jr,{variant:"chalkboard",dismissible:!0,onDismiss:()=>Z(null),children:G}),g.jsx(ge,{variant:"chalkboard",size:"small",fullWidth:!0,disabled:T.size===0||!E.trim()||B,onClick:ue,children:B?"Committing…":"Commit"})]})]}):g.jsx("div",{style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx("p",{style:{opacity:.5,fontSize:be.xs,margin:0},children:"No changed files."})})})]})]})]})]})},dq=()=>{const e=J(a=>a.decisions),t=J(a=>a.openQuestions),n=J(a=>a.activeDocTitle),r=J(a=>a.setActiveDocSection),i=J(a=>a.setActiveDocTitle),s=e.find(a=>a.title===n);if(!s)return null;const o=t.filter(a=>a.resolvedBy===s.title);return g.jsxs("div",{children:[g.jsx("h2",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${L[3]}`,lineHeight:xn.tight},children:s.title}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2],marginBottom:L[5]},children:[g.jsx("span",{className:"text-sm",style:{opacity:.5},children:s.date}),g.jsx(ct,{size:"small",fillColor:s.status==="decided"?"rgba(143, 185, 150, 0.25)":"rgba(201, 139, 139, 0.25)",textColor:s.status==="decided"?st.accentGreenDark:"#6E3A3A",children:s.status}),s.supersededBy&&g.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Superseded by"," ",g.jsx(Am,{onClick:()=>i(s.supersededBy),children:s.supersededBy})]}),o.length>0&&g.jsxs("span",{className:"text-sm",style:{opacity:.5},children:[o.length===1?"Resolves":"Resolves all of"," ",o.map((a,l)=>g.jsxs("span",{children:[l>0&&", ",g.jsx(Am,{onClick:()=>{r("questions"),i(a.title)},children:a.title})]},a.title))]})]}),g.jsx("div",{style:{fontFamily:oe.body,fontSize:be.base,lineHeight:xn.relaxed,color:"#1C1B18"},children:g.jsx(zl,{children:s.body})})]})},Di=(e,t)=>e.toLowerCase().includes(t.toLowerCase()),Cu=(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},fq=({query:e})=>{const{decisions:t,openQuestions:n,progress:r,repoDocs:i,setActiveDocSection:s,setActiveDocTitle:o,setDocSearchQuery:a}=J(),l=[];for(const d of t)(Di(d.title,e)||Di(d.body,e))&&l.push({section:"decisions",sectionLabel:"Decisions",title:d.title,snippet:Cu(d.body||d.title,e)});for(const d of n)(Di(d.title,e)||Di(d.body,e))&&l.push({section:"questions",sectionLabel:"Open Questions",title:d.title,snippet:Cu(d.body||d.title,e)});for(const d of r)for(const f of d.items)if(Di(f,e)){l.push({section:"progress",sectionLabel:"Progress",title:d.date,snippet:Cu(f,e)});break}for(const d of i)(Di(d.name,e)||Di(d.content,e))&&l.push({section:"repo-docs",sectionLabel:"Repo Docs",title:d.name,snippet:Cu(d.content,e)});const u={};for(const d of l)u[d.section]||(u[d.section]=[]),u[d.section].push(d);const c=(d,f)=>{s(d),o(f),a("")};return l.length===0?g.jsxs("p",{style:{opacity:.5},children:['No results found for "',e,'".']}):g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm",style:{opacity:.5,marginBottom:L[3]},children:[l.length," result",l.length===1?"":"s",' for "',e,'"']}),Object.entries(u).map(([d,f])=>g.jsxs("div",{style:{marginBottom:L[6]},children:[g.jsx("h3",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4,margin:`0 0 ${L[2]}`},children:f[0].sectionLabel}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[1]},children:f.map(h=>g.jsx(ge,{variant:"ghost",size:"small",fullWidth:!0,onClick:()=>c(h.section,h.title),style:{justifyContent:"flex-start",padding:`${L[2]} ${L[3]}`},children:g.jsxs("span",{style:{textAlign:"left"},children:[g.jsx("span",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:"0.95rem",display:"block",marginBottom:"0.2rem"},children:h.title}),g.jsx("span",{className:"text-sm",style:{opacity:.6},children:h.snippet})]})},`${h.section}-${h.title}`))})]},d))]})},hq=()=>{const e=J(o=>o.openQuestions),t=J(o=>o.activeDocTitle),n=J(o=>o.setActiveDocSection),r=J(o=>o.setActiveDocTitle),i=e.find(o=>o.title===t);if(!i)return null;const s=()=>{i.resolvedBy&&(n("decisions"),r(i.resolvedBy))};return g.jsxs("div",{children:[g.jsx("h2",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${L[3]}`,lineHeight:xn.tight},children:i.title}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2],marginBottom:L[5]},children:[g.jsx("span",{className:"text-sm",style:{opacity:.5},children:i.raised}),g.jsx(ct,{size:"small",fillColor:i.status==="open"?"rgba(212, 163, 115, 0.25)":"rgba(143, 185, 150, 0.25)",textColor:i.status==="open"?st.accentAmberDark:st.accentGreenDark,children:i.status}),i.resolvedBy&&g.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Resolved by"," ",g.jsx(Am,{onClick:s,children:i.resolvedBy})]})]}),g.jsx("div",{style:{fontFamily:oe.body,fontSize:be.base,lineHeight:xn.relaxed,color:"#1C1B18"},children:g.jsx(zl,{children:i.body})})]})},pq=()=>{const e=J(i=>i.progress),t=J(i=>i.activeDocTitle),r=[...t?e.filter(i=>i.date===t):e].sort((i,s)=>s.date.localeCompare(i.date));return r.length===0?g.jsx("p",{style:{opacity:.5},children:"No progress entries found."}):g.jsx("div",{children:r.map(i=>g.jsxs("div",{style:{marginBottom:L[8]},children:[g.jsx("h3",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:be.md,margin:`0 0 ${L[3]}`,lineHeight:xn.tight,opacity:.8},children:i.date}),g.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:L[2]},children:i.items.map((s,o)=>g.jsx("li",{style:{fontFamily:oe.body,fontSize:be.sm,lineHeight:1.55,color:"#1C1B18",paddingLeft:L[4],borderLeft:"2px solid rgba(0,0,0,0.08)"},children:g.jsx(zl,{children:s})},`${i.date}-${o}`))})]},i.date))})},mq=()=>{const e=J(i=>i.repoDocs),t=J(i=>i.activeDocTitle),n=e.find(i=>i.name===t);if(!n)return null;const r=n.name.endsWith(".md");return g.jsxs("div",{children:[g.jsx("h2",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${L[4]}`,lineHeight:xn.tight},children:n.name}),r?g.jsx("div",{style:{fontFamily:oe.body,fontSize:be.base,lineHeight:xn.relaxed,color:"#1C1B18"},children:g.jsx(zl,{children:n.content})}):g.jsx("pre",{style:{fontFamily:oe.mono,fontSize:be.xs,background:"rgba(0,0,0,0.04)",borderRadius:6,padding:L[4],overflowX:"auto",lineHeight:xn.normal,whiteSpace:"pre-wrap"},children:n.content})]})},gq=()=>{const e=J(r=>r.docSearchQuery),t=J(r=>r.activeDocSection),n=J(r=>r.activeDocTitle);return e.trim()?g.jsx("div",{children:g.jsx(fq,{query:e})}):t==="decisions"&&n?g.jsxs("div",{children:[g.jsx(Dn,{children:"Decisions"}),g.jsx(dq,{})]}):t==="questions"&&n?g.jsxs("div",{children:[g.jsx(Dn,{children:"Open Questions"}),g.jsx(hq,{})]}):t==="progress"?g.jsxs("div",{children:[g.jsx(Dn,{children:"Progress"}),g.jsx(pq,{})]}):t==="repo-docs"&&n?g.jsx("div",{children:g.jsx(mq,{})}):g.jsxs("div",{children:[g.jsx(Dn,{children:"Docs"}),g.jsx("p",{style:{opacity:.5},children:"Select a section from the sidebar."})]})},pn=({label:e,children:t,action:n})=>g.jsxs("div",{style:{marginBottom:L[5]},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.35rem",padding:`0 ${L[3]}`},children:[g.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),n]}),t]}),yq=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Vr=({children:e})=>g.jsx("span",{className:"text-sm",style:{display:"block",padding:`${L[1]} ${L[3]}`,opacity:.35,fontStyle:"italic"},children:e}),vq=()=>{const{decisions:e,openQuestions:t,progress:n,repoDocs:r,decisionsLoading:i,openQuestionsLoading:s,progressLoading:o,repoDocsLoading:a,loadDecisions:l,loadOpenQuestions:u,loadProgress:c,loadRepoDocs:d,activeDocSection:f,setActiveDocSection:h,activeDocTitle:p,setActiveDocTitle:y}=J();P.useEffect(()=>{l(),u(),c(),d()},[l,u,c,d]);const x=m=>{h("decisions"),y(m)};return g.jsxs(g.Fragment,{children:[g.jsx(pn,{label:"Repo Docs",children:a&&r.length===0?g.jsx(Vr,{children:"Loading…"}):r.length>0?r.map(m=>g.jsx(wr,{size:"small",active:f==="repo-docs"&&p===m.name,onClick:()=>{h("repo-docs"),y(m.name)},children:yq(m.name)},m.name)):g.jsx(Vr,{children:"No repo docs found"})}),g.jsx(pn,{label:"Decisions",children:i&&e.length===0?g.jsx(Vr,{children:"Loading…"}):e.length>0?e.map(m=>g.jsx(wr,{size:"small",active:f==="decisions"&&p===m.title,onClick:()=>x(m.title),children:m.title},m.title)):g.jsx(Vr,{children:"No decisions yet"})}),g.jsx(pn,{label:"Open Questions",children:s&&t.length===0?g.jsx(Vr,{children:"Loading…"}):t.length>0?t.map(m=>g.jsx(wr,{size:"small",active:f==="questions"&&p===m.title,onClick:()=>{h("questions"),y(m.title)},children:m.title},m.title)):g.jsx(Vr,{children:"No open questions"})}),g.jsx(pn,{label:"Progress",children:o&&n.length===0?g.jsx(Vr,{children:"Loading…"}):n.length>0?n.map(m=>g.jsx(wr,{size:"small",active:f==="progress"&&p===m.date,onClick:()=>{h("progress"),y(m.date)},children:m.date},m.date)):g.jsx(Vr,{children:"No progress entries"})})]})};function oA(){const[e,t]=P.useState("idle"),[n,r]=P.useState(null),i=P.useRef(null),s=P.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=P.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 Ev={"in-progress":"#C89A5A",planned:"#6A9B72",idea:"#8A9BAA",review:"#9B7AB5",done:"#8A7A8A",dropped:"#A06060"},aA={idea:"Idea",planned:"Planned","in-progress":"In progress",review:"Review",done:"Done",dropped:"Dropped"},md={idea:"slate",planned:"blue","in-progress":"amber",review:"slate",done:"green",dropped:"rose"},yS={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"}},xq=[{status:"planned",label:"Planned"},{status:"in-progress",label:"In Progress"}],jv=({id:e})=>e?g.jsx(ct,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}):null,wq=({plan:e})=>g.jsxs("div",{children:[g.jsxs("div",{className:"text-sm",style:{fontWeight:500,lineHeight:1.3,display:"flex",alignItems:"center",gap:L[1]},children:[g.jsx(jv,{id:e.id}),e.title]}),e.tags.length>0&&g.jsx("div",{style:{display:"flex",gap:L[1],flexWrap:"wrap",marginTop:"0.4rem"},children:e.tags.map(t=>g.jsx(ct,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:t},t))})]}),bq=({plans:e})=>g.jsx(El,{board:xq.map(({status:t,label:n})=>({key:t,label:n,accent:md[t],items:e.filter(r=>r.status===t||t==="in-progress"&&r.status==="review"),getKey:r=>r.title,renderItem:r=>g.jsx(wq,{plan:r})}))}),lA=({pct:e,color:t,height:n=6})=>g.jsx(rT,{value:e,color:t,height:n}),gd=({plan:e,highlighted:t,onOpen:n,rank:r})=>{const i=jj(e);return g.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onClick:n?()=>n(e.title):void 0,onKeyDown:n?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(e.title))}:void 0,style:{cursor:n?"pointer":void 0,...t?{outline:"2px solid rgba(200,154,90,0.5)",outlineOffset:2,borderRadius:4}:void 0},children:g.jsxs(lo,{texture:"kraft",accent:!0,accentColor:md[e.status],children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:L[3]},children:[g.jsxs("h2",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:"1.3rem",margin:0,lineHeight:1.3,display:"flex",alignItems:"center",gap:L[2]},children:[r!==void 0&&g.jsxs("span",{className:"text-sm",style:{opacity:.4,fontWeight:600},children:[r,"."]}),g.jsx(jv,{id:e.id}),e.title]}),g.jsx(ct,{size:"small",fillColor:yS[e.status].fill,textColor:yS[e.status].text,children:aA[e.status]})]}),g.jsxs("div",{style:{marginTop:"0.3rem",display:"flex",alignItems:"center",gap:L[2],flexWrap:"wrap"},children:[g.jsx("span",{className:"text-sm",style:{opacity:.45},children:e.updated?`updated ${ud(e.updated)}`:`created ${ud(e.created)}`}),e.tags.map(s=>g.jsx(ct,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:s},s))]}),i!==null&&g.jsx("div",{style:{marginTop:L[3]},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3]},children:[g.jsx("div",{style:{flex:1},children:g.jsx(lA,{pct:i.pct,color:Ev[e.status]})}),g.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[i.done,"/",i.total]})]})})]})})},Sq=({plans:e,onOpen:t})=>{const[n,r]=P.useState(!1);return e.length===0?null:g.jsxs("div",{style:{marginTop:L[8]},children:[g.jsxs(ge,{type:"button",variant:"ghost",size:"small",onClick:()=>r(i=>!i),style:{display:"flex",alignItems:"baseline",gap:"0.35rem"},children:[g.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.35},children:"Closed"}),g.jsx("span",{className:"text-xs",style:{opacity:.3},children:e.length}),g.jsx("span",{className:"text-xs",style:{opacity:.3},children:n?"▴":"▾"})]}),n&&g.jsx("div",{style:{marginTop:"0.65rem",display:"flex",flexDirection:"column",gap:"0.65rem"},children:e.map(i=>g.jsx(gd,{plan:i,onOpen:t},i.title))})]})};function _q(e){const t=e.phases.map((i,s)=>`${s+1}. [${i.done?"x":" "}] ${i.text}`).join(`
|
|
162
|
+
`),n=e.log&&e.log.length>0?e.log.map(i=>`- ${i.date}: ${i.text}`).join(`
|
|
163
|
+
`):"(none)",r=e.clarifications&&e.clarifications.length>0?e.clarifications.map(i=>`- ${i.date}: ${i.text}`).join(`
|
|
164
|
+
`):"(none)";return`You're auditing the plan "${e.title}" (${e.id??"no id"}) in papercamp/plans.md.
|
|
165
|
+
|
|
166
|
+
Plan body: ${e.body}
|
|
167
|
+
|
|
168
|
+
Current phases:
|
|
169
|
+
${t}
|
|
170
|
+
|
|
171
|
+
Log entries (issues, bugs, and review notes documented so far):
|
|
172
|
+
${n}
|
|
173
|
+
|
|
174
|
+
Clarifications (answered questions about scope and design):
|
|
175
|
+
${r}
|
|
176
|
+
|
|
177
|
+
Read this plan's phases, body, Log entries, and Clarifications, then inspect the current repo state. The Log entries often document bugs, UX issues, or missing functionality that should be turned into new phases. Append any phase that's clearly required but missing as a normal \`- [ ]\` line at the end of the \`### Phases\` list — optionally with the existing indented description format. Explicitly never touch existing lines: never reorder, check, uncheck, or rewrite anything already there, no matter how stale or redundant it looks.
|
|
178
|
+
|
|
179
|
+
If you append anything, finish with exactly one new \`### Log\` line (date: summary) describing what was found and appended.
|
|
180
|
+
|
|
181
|
+
If nothing is missing, write nothing at all — not even an empty heading or a Log line. The audit must be safe to re-run anytime without producing log spam.`}function kq(e){return`You're extending an idea in papercamp/ideas.md: ${e.id??"no id"} ("${e.title}").
|
|
182
|
+
|
|
183
|
+
Idea body, in full:
|
|
184
|
+
${e.body}
|
|
185
|
+
|
|
186
|
+
Your job: explore the current codebase and rewrite this idea's body in place in ideas.md with more specific detail — concrete approaches, file references, and any relevant architectural context you find in the code. Keep the idea's heading (${e.id??"IDEA-N"}: ${e.title}) unchanged; only update the prose body below it.
|
|
187
|
+
|
|
188
|
+
Write the full updated body — everything below the heading. Make the description more specific and actionable while keeping the same general intent. Do not change the \`### IDEA-N:\` heading line.`}function Cq(e){return`You're clarifying the plan "${e.title}" (${e.id??"no id"}) in papercamp/plans.md.
|
|
189
|
+
|
|
190
|
+
Plan body: ${e.body}
|
|
191
|
+
|
|
192
|
+
Current phases:
|
|
193
|
+
${e.phases.length>0?e.phases.map((t,n)=>`${n+1}. [${t.done?"x":" "}] ${t.text}`).join(`
|
|
194
|
+
`):"(none yet)"}
|
|
195
|
+
|
|
196
|
+
Scan this plan against: functional scope, data model, UX flow, non-functional attributes, edge cases, terminology, completion signals.
|
|
197
|
+
|
|
198
|
+
Surface at most 5 highest-impact gaps, one question at a time, each with a **Recommended:** answer. Write accepted answers to \`### Clarifications\` as:
|
|
199
|
+
|
|
200
|
+
\`\`\`
|
|
201
|
+
- YYYY-MM-DD: Q: <question> → A: <answer>
|
|
202
|
+
\`\`\`
|
|
203
|
+
|
|
204
|
+
Only append answered lines. Keep existing clarifications intact. Use today's date.`}function Pq(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(`
|
|
205
|
+
`);return`### ${i.id??"no id"}: ${i.title} (status: ${i.status}${i.idea?`, idea: ${i.idea}`:""})
|
|
206
|
+
${i.body}
|
|
207
|
+
${s||" (no phases yet)"}`}).join(`
|
|
208
|
+
|
|
209
|
+
`):"(no other open plans exist yet)";return`You're drafting a new plans.md entry from an idea: ${e.id??"no id"} ("${e.title}") in papercamp/ideas.md.
|
|
210
|
+
|
|
211
|
+
Idea body, in full:
|
|
212
|
+
${e.body}
|
|
213
|
+
|
|
214
|
+
## Plan record shape (papercamp/about.md)
|
|
215
|
+
|
|
216
|
+
Each plan is a \`## <Title>\` heading (a short verb-led headline, 2-6 words) followed by \`**Field:** value\` lines, a free-prose body paragraph, then an optional \`### Phases\` checklist:
|
|
217
|
+
|
|
218
|
+
\`\`\`
|
|
219
|
+
## <Short headline>
|
|
220
|
+
|
|
221
|
+
**Status:** idea
|
|
222
|
+
**Kind:** feat | fix | chore | docs | refactor
|
|
223
|
+
**Id:** <KIND>-<N>
|
|
224
|
+
**Idea:** ${e.id??"IDEA-N"}
|
|
225
|
+
**Created:** <today, YYYY-MM-DD>
|
|
226
|
+
**Tags:** comma, separated
|
|
227
|
+
|
|
228
|
+
One or two paragraphs of free prose giving context — what this is and why,
|
|
229
|
+
in the same voice as the existing entries in plans.md.
|
|
230
|
+
|
|
231
|
+
### Phases
|
|
232
|
+
- [ ] Short phase title
|
|
233
|
+
Optional indented long-form description of the phase.
|
|
234
|
+
\`\`\`
|
|
235
|
+
|
|
236
|
+
- \`Kind\` picks the ID prefix — choose whichever Conventional Commits type
|
|
237
|
+
best fits this idea (most are \`feat\`).
|
|
238
|
+
- \`Id\` must come from the persistent per-kind counter in
|
|
239
|
+
\`.paper-camp/config.json\`'s \`nextId\` field — read the current value for
|
|
240
|
+
your chosen \`Kind\` (e.g. \`nextId.feat\`), use it as \`<KIND>-<N>\`, and
|
|
241
|
+
increment that counter in the same write. Never derive the number by
|
|
242
|
+
scanning plans.md for the highest existing one — a deleted plan's number
|
|
243
|
+
must never be reused.
|
|
244
|
+
- \`Idea\` must be exactly \`${e.id??"this idea's id"}\` — that backlink is
|
|
245
|
+
what the rest of the dashboard (and this task's own success check) uses to
|
|
246
|
+
find the plan you wrote.
|
|
247
|
+
- Write \`Status: idea\`, never anything further along. Per
|
|
248
|
+
papercamp/decisions.md ("Plan-drafting agent writes plans.md directly,
|
|
249
|
+
same as phase execution"), this entry lands straight in the Backlog with
|
|
250
|
+
no separate approval step — a human reviews and promotes it from there,
|
|
251
|
+
the same as any other backlog entry.
|
|
252
|
+
- Phases should be genuinely actionable steps a future agent or human could
|
|
253
|
+
pick up one at a time — match the granularity of the existing phases shown
|
|
254
|
+
below, not a single giant phase.
|
|
255
|
+
|
|
256
|
+
## Every other open (non-done) plan, for priority/ordering context
|
|
257
|
+
|
|
258
|
+
${r}
|
|
259
|
+
|
|
260
|
+
## Where to insert it
|
|
261
|
+
|
|
262
|
+
Plan priority is file order in papercamp/plans.md — earlier means higher
|
|
263
|
+
priority. Compare this idea's scope and urgency against every plan listed
|
|
264
|
+
above and insert your new \`## Heading\` block at the file position that
|
|
265
|
+
actually reflects where it belongs, not appended at the end by default.
|
|
266
|
+
|
|
267
|
+
If the right position means an existing plan should now sit before or after
|
|
268
|
+
where it currently sits, you may move that plan's whole heading block to its
|
|
269
|
+
new position — but you must never edit its title, phases, or body while
|
|
270
|
+
doing so; a moved block must be byte-for-byte identical content, just
|
|
271
|
+
relocated. Do not touch any other plan's content for any other reason.`}const Tq=({idea:e,otherPlans:t})=>{const n=J(l=>l.launchPlanDraft),r=J(l=>l.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,run:o}=oA(),a=()=>{const l=e.id;l&&o(async()=>{await n(l,Pq(e,t))})};return g.jsx(ge,{variant:"ghost",size:"small",onClick:a,disabled:i||s==="loading"||!e.id,title:e.id?void 0:"Idea needs an ID before an agent can run",style:{color:st.textSecondary},children:s==="loading"?"Drafting…":s==="success"?"Draft sent!":"Draft plan"})},Eq=[{key:"planned",label:"Planned",accent:md.planned,icon:g.jsx(KB,{}),iconFill:void 0,filter:e=>!e.status||e.status==="planned"},{key:"done",label:"Done",accent:md.done,icon:g.jsx(Zd,{size:14}),iconFill:"rgba(143, 185, 150, 0.35)",filter:e=>e.status==="done"}],jq=({ideas:e,plans:t,onOpenIdea:n,onOpenPlan:r})=>{const[i,s]=P.useState(null),[o,a]=P.useState(!1),l=4;if(e.length===0)return null;const u=c=>t.filter(d=>d.idea===c);return g.jsx(El,{board:Eq.map(({key:c,label:d,accent:f,icon:h,iconFill:p,filter:y})=>{const x=e.filter(y),m=c==="done",v=m?x.length-l:0,S=v>0&&!o?[...x.slice(0,l),{__overflow:!0,count:v}]:x;return{key:c,label:m?`${d} (${x.length})`:d,accent:f,items:S,getKey:k=>"__overflow"in k?"__overflow":k.title,renderItem:k=>{if("__overflow"in k)return g.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:`${L[2]} 0`},children:g.jsxs("button",{type:"button",onClick:()=>a(!0),style:{background:"none",border:"none",padding:0,cursor:"pointer",font:"inherit",color:"inherit",fontSize:"0.8rem",opacity:.5,textDecoration:"underline"},children:[k.count," more idea",k.count===1?"":"s"]})});const b=i===k.title,C=k.id?u(k.id):[],T=C.length>0;return g.jsxs("div",{children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2]},children:[g.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(k.title),style:{flex:1,minWidth:0,background:"none",border:"none",padding:0,cursor:"pointer",display:"flex",alignItems:"center",gap:L[2],textAlign:"left",font:"inherit",color:"inherit"},children:[g.jsx(iT,{icon:h,size:"small",fillColor:p}),g.jsx("span",{className:"text-sm",style:{fontWeight:500,lineHeight:1.3},children:k.title})]}),T&&g.jsxs("button",{type:"button","aria-label":b?"Hide linked plans":"Show linked plans",onClick:()=>s(b?null:k.title),style:{flexShrink:0,background:"none",border:"none",padding:0,opacity:.45,cursor:"pointer",fontSize:"0.7rem",font:"inherit"},children:[b?"▾":"▸"," ",C.length]}),!T&&k.id&&g.jsx("div",{style:{flexShrink:0},children:g.jsx(Tq,{idea:k,otherPlans:t})})]}),b&&T&&g.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:L[1],marginTop:L[2]},children:C.map(A=>g.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(A.title),style:{background:"none",border:"none",padding:0,cursor:"pointer",font:"inherit"},children:g.jsx(ct,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:A.id})},A.title))})]})}}})})},Aq=({ideaId:e})=>g.jsxs(lo,{texture:"kraft",children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:L[3]},children:[g.jsxs("h2",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:"1.3rem",margin:0,lineHeight:1.3,display:"flex",alignItems:"center",gap:L[2]},children:[g.jsx(ct,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}),g.jsx("span",{style:{opacity:.55},children:"Creating a plan…"})]}),g.jsx("div",{className:"paper-camp-skeleton",style:{width:60,height:20,opacity:.18}})]}),g.jsxs("div",{style:{marginTop:"0.3rem",display:"flex",alignItems:"center",gap:L[2]},children:[g.jsx("div",{className:"paper-camp-skeleton",style:{width:90,height:12,opacity:.18}}),g.jsx("div",{className:"paper-camp-skeleton",style:{width:50,height:18,borderRadius:999,opacity:.18}})]}),g.jsx("div",{style:{marginTop:L[3]},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3]},children:[g.jsx("div",{className:"paper-camp-skeleton",style:{flex:1,height:6,opacity:.18}}),g.jsx("div",{className:"paper-camp-skeleton",style:{width:28,height:12,flexShrink:0,opacity:.18}})]})})]}),zh=({label:e,count:t})=>g.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"0.4rem",marginBottom:"0.65rem"},children:[g.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),g.jsx("span",{className:"text-xs",style:{opacity:.3},children:t})]}),Rq=({plans:e,activePlanTitle:t,onOpenPlan:n,ideaEntries:r,onOpenIdea:i,draftingIdeaId:s})=>{const o=P.useRef({});P.useEffect(()=>{var f;t&&o.current[t]&&((f=o.current[t])==null||f.scrollIntoView({behavior:"smooth",block:"center"}))},[t]);const a=e.filter(f=>f.status==="in-progress"||f.status==="review"),l=e.filter(f=>f.status==="planned"||f.status==="idea"),u=e.filter(f=>f.status==="done"||f.status==="dropped"),c=!!s&&!e.some(f=>f.idea===s),d=f=>h=>{o.current[f]=h};return g.jsxs("div",{children:[a.length>0&&g.jsxs("section",{style:{marginBottom:L[8]},children:[g.jsx(zh,{label:"In progress",count:a.length}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[3]},children:a.map(f=>g.jsx("div",{ref:d(f.title),children:g.jsx(gd,{plan:f,highlighted:t===f.title,onOpen:n})},f.title))})]}),(l.length>0||c)&&g.jsxs("section",{style:{marginBottom:L[8]},children:[g.jsx(zh,{label:"Backlog",count:l.length}),g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:L[3]},children:[c&&s&&g.jsx(Aq,{ideaId:s}),l.map((f,h)=>g.jsx("div",{ref:d(f.title),children:g.jsx(gd,{plan:f,highlighted:t===f.title,onOpen:n,rank:h+1})},f.title))]})]}),r&&r.length>0&&g.jsxs("section",{style:{marginBottom:L[8]},children:[g.jsx(zh,{label:"Ideas",count:r.length}),g.jsx(jq,{ideas:r,plans:e,onOpenIdea:i,onOpenPlan:n})]}),g.jsx(Sq,{plans:u,onOpen:n})]})},Iq=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}`},Mq=(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=[Iq(e),e.failure_scenario??e.reasoning].filter(Boolean).join(" — ");return{done:!1,text:n.trim(),description:r||void 0,source:"review"}},Lq=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)=>Mq(r,i))},Dq=({onAdd:e,disabled:t})=>{const[n,r]=P.useState(!1),[i,s]=P.useState(""),[o,a]=P.useState(null),[l,u]=P.useState(!1),c=()=>{r(!1),s(""),a(null)},d=async()=>{let f;try{f=Lq(i)}catch(h){a(h instanceof Error?h.message:"Could not parse findings");return}u(!0),a(null);try{await e(f),c()}finally{u(!1)}};return g.jsxs(g.Fragment,{children:[g.jsx(ge,{variant:"ghost",size:"small",onClick:()=>r(!0),disabled:t,children:"Add as phases"}),g.jsx(Py,{open:n,onClose:c,title:"Add /code-review findings",size:"small",children:g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:L[4]},children:[g.jsxs("p",{className:"text-sm",style:{margin:0,opacity:.7},children:["Paste the JSON findings from a ",g.jsx("code",{children:"/code-review"})," run. Each finding becomes a new, unchecked phase on this plan."]}),g.jsx(jl,{value:i,onChange:f=>s(f.target.value),placeholder:'[{ "description": "...", "file": "src/foo.ts", "line_start": 12, "failure_scenario": "..." }]',rows:10,disabled:l}),o&&g.jsx(jr,{variant:"warning",title:"Could not add phases",children:o}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:L[2]},children:[g.jsx(ge,{type:"button",variant:"ghost",onClick:c,disabled:l,children:"Cancel"}),g.jsx(ge,{type:"button",variant:"primary",onClick:d,disabled:l||!i.trim(),children:"Add phases"})]})]})})]})},zq=({planId:e,phaseIndex:t,disabled:n})=>{const r=J(a=>a.launchAgent),[i,s]=P.useState(!1),o=async a=>{if(a.stopPropagation(),!!e){s(!0);try{await r(e,t)}catch(l){alert(l.message)}finally{s(!1)}}};return g.jsx(yn,{icon:g.jsx("span",{style:{fontSize:12,lineHeight:1},children:"▶"}),variant:"ghost",size:"small",label:e?"Start agent on this phase":"Plan needs an ID before an agent can run",onClick:o,disabled:n||i||!e,className:"transition-opacity",style:{color:st.textSecondary}})},Nq=({plan:e,disabled:t})=>{const n=J(o=>o.launchPlanAudit),[r,i]=P.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,_q(e))}catch(o){alert(o.message)}finally{i(!1)}}};return g.jsx(ge,{variant:"ghost",size:"small",onClick:s,disabled:t||r||!e.id,title:e.id?void 0:"Plan needs an ID before an agent can run",style:{color:st.textSecondary},children:"Audit phases against code"})},$q=({plan:e,disabled:t})=>{const[n,r]=P.useState("idle"),i=async()=>{const s=Cq(e),o=await Tv(s);r(o?"copied":"failed"),setTimeout(()=>r("idle"),1500)};return g.jsx(ge,{variant:"ghost",size:"small",onClick:i,disabled:t,icon:n==="copied"?g.jsx(Zd,{size:14}):n==="failed"?g.jsx(vs,{size:14}):g.jsx(Cy,{size:14}),title:n==="copied"?"Copied":n==="failed"?"Copy failed — select and copy manually":"Copy clarification prompt",style:{color:n==="copied"?"#6A9B72":n==="failed"?"#A06060":st.textSecondary},children:"Copy Clarifications Prompt"})},Oq=({planTitle:e,phaseIndex:t})=>{const[n,r]=P.useState("idle"),i=async s=>{s.stopPropagation();const o=`Start phase ${t+1} of plan "${e}" in papercamp/plans.md`,a=await Tv(o);r(a?"copied":"failed"),setTimeout(()=>r("idle"),1500)};return g.jsx(yn,{icon:n==="copied"?g.jsx(Zd,{size:16}):n==="failed"?g.jsx(vs,{size:16}):g.jsx(Cy,{size:16}),variant:"ghost",size:"small",label:n==="copied"?"Copied":n==="failed"?"Copy failed — select and copy manually":"Copy phase prompt",onClick:i,className:"transition-opacity",style:{color:n==="copied"?"#6A9B72":n==="failed"?"#A06060":st.textSecondary}})},uA=({plan:e})=>{const t=J(b=>b.loadPlans),n=J(b=>b.agentStatus),r=n!==null&&n.status!=="done"&&n.status!=="error",i=r&&n!==null&&n.planId===e.id?n.phaseIndex:null,s=r&&n!==null&&n.planId===e.id&&n.phaseIndex===void 0,[o,a]=P.useState(!1),[l,u]=P.useState(""),c=jj(e),d=e.status==="in-progress",f=e.status==="review";c!==null&&c.done===c.total&&c.total>0;const h=async()=>{a(!0),await Un(e.title,{status:"in-progress"}),await t(),a(!1)},p=async()=>{a(!0),await Un(e.title,{status:"planned"}),await t(),a(!1)},y=async b=>{const C=e.phases.map((A,E)=>E===b?{...A,done:!A.done}:A);a(!0),C.every(A=>A.done)&&e.status==="in-progress"?await Un(e.title,{phases:C,status:"review"}):await Un(e.title,{phases:C}),await t(),a(!1)},x=async()=>{a(!0),await Un(e.title,{status:"done"}),await t(),a(!1)},m=async()=>{a(!0),await Un(e.title,{status:"in-progress"}),await t(),a(!1)},v=async b=>{a(!0),await Un(e.title,{status:b}),await t(),a(!1)},w=async b=>{a(!0),await Un(e.title,{agent:b||null}),await t(),a(!1)},S=async b=>{a(!0),await Un(e.title,{phases:[...e.phases,...b]}),await t(),a(!1)},k=async()=>{if(!l.trim())return;const C={date:new Date().toISOString().slice(0,10),text:l.trim().replace(/\n/g," ")},T=[...e.log??[],C];a(!0),await Un(e.title,{log:T}),await t(),u(""),a(!1)};return g.jsxs("div",{children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:L[4],marginBottom:L[3]},children:[g.jsxs("h2",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:"1.75rem",margin:0,lineHeight:xn.tight,display:"flex",alignItems:"center",gap:L[3]},children:[g.jsx(jv,{id:e.id}),e.title]}),!f&&g.jsx(ge,{variant:"primary",size:"small",className:d?"btn-orange":"btn-green",onClick:d?p:h,disabled:o,children:d?"Stop":"Start"})]}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2],flexWrap:"wrap",marginBottom:L[4]},children:[g.jsx(uo,{size:"small",width:140,value:e.status,onChange:v,disabled:o,options:e8.map(b=>({value:b,label:aA[b]}))}),g.jsx("span",{className:"text-sm",style:{opacity:.45},children:e.updated?`updated ${ud(e.updated)}`:`created ${ud(e.created)}`}),e.tags.map(b=>g.jsx(ct,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:b},b))]}),g.jsx("div",{style:{marginBottom:L[1]},children:g.jsx($q,{plan:e,disabled:r})}),e.body&&g.jsx("p",{className:"text-base",style:{margin:`0 0 ${L[4]}`,opacity:.8,lineHeight:xn.normal},children:e.body}),e.clarifications&&e.clarifications.length>0&&g.jsxs("div",{style:{marginBottom:L[5]},children:[g.jsx("h3",{style:{fontFamily:oe.serif,fontSize:be.sm,fontWeight:600,margin:`0 0 ${L[3]}`,opacity:.65},children:"Clarifications"}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[2],marginBottom:L[3]},children:e.clarifications.map((b,C)=>g.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[g.jsx("span",{style:{fontWeight:600,marginRight:L[2]},children:b.date}),b.text]},`clar-${b.date}-${C}`))})]}),c!==null&&g.jsx("div",{style:{marginBottom:L[5]},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3]},children:[g.jsx("div",{style:{flex:1},children:g.jsx(lA,{pct:c.pct,color:Ev[e.status]})}),g.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[c.done,"/",c.total]})]})}),g.jsx("div",{style:{marginBottom:L[5]},children:g.jsx(uo,{size:"small",width:220,value:e.agent??"",onChange:w,disabled:o,options:[{value:"",label:"Project default agent"},...br.map(b=>({value:b,label:Da[b]}))]})}),e.phases.length>0&&g.jsxs("div",{style:{marginBottom:L[8]},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:L[3],marginBottom:L[3]},children:[g.jsx("h3",{style:{fontFamily:oe.serif,fontSize:be.sm,fontWeight:600,margin:0,opacity:.65},children:"Phases"}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2]},children:[s&&g.jsx("span",{className:"spinner",style:{opacity:.6},title:"Audit running…"}),g.jsx(Nq,{plan:e,disabled:r}),g.jsx(Dq,{onAdd:S,disabled:o})]})]}),g.jsx(El,{data:e.phases,columns:[{key:"checkbox",header:"Status",cell:(b,C)=>g.jsx(FF,{checked:b.done,onChange:()=>y(C),disabled:o}),width:2},{key:"title",header:"Title",cell:b=>g.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:L[2],textDecoration:b.done?"line-through":"none",opacity:b.done?.45:1},children:[b.text,b.source==="review"&&g.jsx(ct,{size:"small",fillColor:"rgba(155, 122, 181, 0.25)",textColor:"#7B5E9E",children:"review"})]})},{key:"actions",header:"Actions",cell:(b,C)=>g.jsxs("div",{style:{display:"flex",gap:L[2],alignItems:"center"},children:[g.jsx(Oq,{planTitle:e.title,phaseIndex:C}),!b.done&&i===C?g.jsx("span",{className:"spinner",style:{opacity:.6},title:`Agent ${n==null?void 0:n.status}…`}):!b.done&&g.jsx(zq,{planId:e.id,phaseIndex:C,disabled:r})]}),width:5}],expandable:{render:b=>b.description??null},showExpandColumn:!1,rowClassName:b=>b.source==="review"?"phase-row-review":void 0})]}),f&&g.jsxs("div",{style:{display:"flex",gap:L[3],marginBottom:L[6]},children:[g.jsx(ge,{variant:"primary",size:"small",className:"btn-green",onClick:x,disabled:o,children:"Approve & close"}),g.jsx(ge,{variant:"primary",size:"small",className:"btn-orange",onClick:m,disabled:o,children:"Needs changes"})]}),g.jsxs("div",{style:{marginBottom:L[8]},children:[g.jsx("h3",{style:{fontFamily:oe.serif,fontSize:be.sm,fontWeight:600,margin:`0 0 ${L[3]}`,opacity:.65},children:"Log"}),e.log&&e.log.length>0&&g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[2],marginBottom:L[3]},children:e.log.map((b,C)=>g.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[g.jsx("span",{style:{fontWeight:600,marginRight:L[2]},children:b.date}),b.text]},`${b.date}-${C}`))}),g.jsxs("div",{style:{display:"flex",gap:L[2],alignItems:"flex-end"},children:[g.jsx(jl,{value:l,onChange:b=>u(b.target.value),placeholder:"Add a log entry…",rows:2}),g.jsx(ge,{variant:"primary",size:"small",className:"btn-violet",onClick:k,disabled:o||!l.trim(),children:"Add entry"})]})]})]})},Fq=({view:e,onChange:t})=>g.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[g.jsx(yn,{icon:g.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[g.jsx("title",{children:"List view icon"}),g.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),g.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),g.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),g.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),g.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),g.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),label:"List view",title:"List view",size:"small",variant:"ghost",isActive:e==="list",onClick:()=>t("list")}),g.jsx(yn,{icon:g.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[g.jsx("title",{children:"Board view icon"}),g.jsx("rect",{x:"3",y:"3",width:"5",height:"18",rx:"1"}),g.jsx("rect",{x:"10",y:"3",width:"5",height:"12",rx:"1"}),g.jsx("rect",{x:"17",y:"3",width:"5",height:"15",rx:"1"})]}),label:"Board view",title:"Board view",size:"small",variant:"ghost",isActive:e==="board",onClick:()=>t("board")})]}),Bq=()=>{const{plans:e,plansError:t,activePlanTitle:n,setActivePlanTitle:r,activeIdeaTitle:i,setActiveIdeaTitle:s,view:o,setView:a,ideaEntries:l,agentStatus:u}=J(),c=u!=null&&u.ideaId&&(u.status==="starting"||u.status==="running")?u.ideaId:null,d=()=>{r(null),s(null)},f=x=>{r(x),s(null)},h=x=>{s(x),r(null)},p=n?e==null?void 0:e.entries.find(x=>x.title===n):null,y=i?l.find(x=>x.title===i):null;return t?g.jsxs("div",{children:[g.jsx(Dn,{children:"Plans"}),g.jsx(jr,{variant:"error",title:"Couldn't load plans.md",children:t})]}):e?p?g.jsxs("div",{children:[g.jsx("div",{style:{marginBottom:L[4]},children:g.jsx(ge,{variant:"ghost",size:"small",onClick:d,children:"← All plans"})}),g.jsx(uA,{plan:p})]}):y?g.jsxs("div",{children:[g.jsx("div",{style:{marginBottom:L[4]},children:g.jsx(ge,{variant:"ghost",size:"small",onClick:d,children:"← All plans"})}),g.jsxs("div",{style:{fontFamily:oe.body,fontSize:be.base,lineHeight:xn.relaxed,color:"#1C1B18"},children:[g.jsxs("h2",{style:{fontFamily:oe.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${L[4]}`,lineHeight:xn.tight,display:"flex",alignItems:"center",gap:L[3]},children:[y.id&&g.jsx(ct,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:y.id}),y.title]}),g.jsx(zl,{children:y.body.replace(/^#{1,3}\s+.+(\n|$)/,"").replace(/^-{3,}\s*$/m,"").trim()}),g.jsx("div",{style:{marginTop:L[6]},children:g.jsx(Vq,{ideaId:y.id})})]})]}):g.jsxs("div",{children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:L[7]},children:[g.jsx(Dn,{children:"Plans"}),g.jsx(Fq,{view:o,onChange:a})]}),e.warnings.length>0&&g.jsx(jr,{variant:"warning",title:"Some entries couldn't be parsed",children:g.jsx("ul",{children:e.warnings.map(x=>g.jsxs("li",{children:[x.title,": ",x.message]},x.title))})}),e.entries.length===0&&l.length===0?g.jsxs("p",{style:{opacity:.5},children:["No plans yet. Run ",g.jsx("code",{children:'paper-camp add plan "name"'}),", or add an idea from the sidebar."]}):o==="board"?g.jsx(bq,{plans:e.entries}):g.jsx(Rq,{plans:e.entries,activePlanTitle:n,onOpenPlan:f,ideaEntries:l,onOpenIdea:h,draftingIdeaId:c})]}):g.jsxs("div",{children:[g.jsx(Dn,{children:"Plans"}),g.jsx("p",{style:{opacity:.5},children:"Loading…"})]})},Vq=({ideaId:e})=>{const t=J(a=>a.launchIdeaExtend),n=J(a=>a.agentStatus),r=n!==null&&n.status!=="done"&&n.status!=="error",{state:i,run:s}=oA(),o=()=>{e&&s(async()=>{const a=J.getState().ideaEntries.find(l=>l.id===e);a&&await t(e,kq(a))})};return g.jsx(ge,{variant:"ghost",size:"small",onClick:o,disabled:r||i==="loading"||!e,title:e?void 0:"Idea needs an ID before an agent can run",children:i==="loading"?"Extending…":i==="success"?"Extension sent!":"Extend with AI"})},Uq=({open:e,onClose:t,onAdd:n})=>{const[r,i]=P.useState(""),[s,o]=P.useState(""),[a,l]=P.useState(!1);P.useEffect(()=>{e&&(i(""),o(""),l(!1))},[e]);const u=async c=>{c.preventDefault(),!(!r.trim()||a)&&(l(!0),await n({title:r.trim(),content:s.trim()||void 0}),l(!1),t())};return g.jsx(Py,{open:e,onClose:t,title:"New idea",size:"small",children:g.jsxs("form",{onSubmit:u,style:{display:"flex",flexDirection:"column",gap:L[4]},children:[g.jsx(vi,{label:"Title",value:r,onChange:c=>i(c.target.value),placeholder:"Idea title…",disabled:a,autoFocus:!0,required:!0}),g.jsx(jl,{label:"Description",value:s,onChange:c=>o(c.target.value),placeholder:"Optional details…",disabled:a,rows:4}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:L[2]},children:[g.jsx(ge,{type:"button",variant:"ghost",onClick:t,disabled:a,children:"Cancel"}),g.jsx(ge,{type:"submit",variant:"primary",disabled:!r.trim()||a,children:"Add"})]})]})})},Wq=({pct:e,color:t})=>g.jsx("div",{style:{width:40,flexShrink:0},children:g.jsx(rT,{value:e,color:t,height:3})}),ac=({plan:e,active:t,onClick:n,action:r})=>{const i=qK(e),s=Ev[e.status];return g.jsx(wr,{active:t,onClick:n,size:"small",icon:g.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:s,flexShrink:0}}),action:g.jsxs(g.Fragment,{children:[i!==null&&g.jsx(Wq,{pct:i,color:s}),r]}),children:e.title})},Hq=()=>{const e=Ro(),t=Zg({select:b=>b.location.pathname}),{plans:n,loadPlans:r,loadIdeas:i,activePlanTitle:s,setActivePlanTitle:o,activeIdeaTitle:a,setActiveIdeaTitle:l,ideaEntries:u}=J(),[c,d]=P.useState(!1),[f,h]=P.useState(!1),p=(n==null?void 0:n.entries.filter(b=>b.status==="in-progress"||b.status==="review"))??[],y=(n==null?void 0:n.entries.filter(b=>b.status==="planned"))??[],x=(n==null?void 0:n.entries.filter(b=>b.status==="idea"))??[],m=async b=>{await tq(b),await r(),d(!1)},v=async b=>{await JQ(b),await i(),h(!1)},w=async b=>{window.confirm(`Delete idea "${b}"?`)&&(await nq(b),await r(),s===b&&o(null))},S=b=>{e({to:"/"}),o(b.title),l(null)},k=b=>{l(b),o(null),e({to:"/"})};return g.jsxs(g.Fragment,{children:[p.length>0&&g.jsx(pn,{label:"In progress",children:p.map(b=>g.jsx(ac,{plan:b,active:t==="/"&&s===b.title,onClick:()=>S(b)},b.title))}),y.length>0&&g.jsx(pn,{label:"Planned",children:y.map(b=>g.jsx(ac,{plan:b,active:t==="/"&&s===b.title,onClick:()=>S(b)},b.title))}),u.filter(b=>b.status!=="done").length>0&&g.jsx(pn,{label:"Ideas",action:g.jsx(yn,{icon:g.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:"New idea",onClick:()=>h(!0)}),children:u.filter(b=>b.status!=="done").map(b=>g.jsx(wr,{size:"small",active:a===b.title,onClick:()=>k(b.title),children:b.title},b.title))}),g.jsxs(pn,{label:"Backlog",action:g.jsx(yn,{icon:g.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:"Add to backlog",onClick:()=>d(!0)}),children:[x.map(b=>g.jsx(ac,{plan:b,active:t==="/"&&s===b.title,onClick:()=>S(b),action:g.jsx(yn,{icon:g.jsx("span",{children:"×"}),variant:"ghost",size:"small",label:"Delete",onClick:C=>{C.stopPropagation(),w(b.title)}})},b.title)),x.length===0&&g.jsx("span",{className:"text-sm",style:{display:"block",padding:`${L[1]} ${L[3]}`,opacity:.35,fontStyle:"italic"},children:"Nothing yet"})]}),g.jsx(r8,{open:c,onClose:()=>d(!1),onAdd:m}),g.jsx(Uq,{open:f,onClose:()=>h(!1),onAdd:v})]})},Zq=()=>{const{plans:e,plansError:t,activePlanTitle:n,setActivePlanTitle:r,setActiveIdeaTitle:i}=J(),s=()=>{r(null),i(null)},o=u=>{r(u),i(null)},a=(e==null?void 0:e.entries.filter(u=>u.status==="review"))??[],l=n?e==null?void 0:e.entries.find(u=>u.title===n):null;return t?g.jsxs("div",{children:[g.jsx(Dn,{children:"Review"}),g.jsx(jr,{variant:"error",title:"Couldn't load plans.md",children:t})]}):e?l?g.jsxs("div",{children:[g.jsx("div",{style:{marginBottom:L[4]},children:g.jsx(ge,{variant:"ghost",size:"small",onClick:s,children:"← Back to review"})}),g.jsx(uA,{plan:l})]}):g.jsxs("div",{children:[g.jsx(Dn,{children:"Review"}),a.length===0?g.jsx("p",{style:{opacity:.5},children:"No plans pending review."}):g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[3]},children:a.map(u=>g.jsx(gd,{plan:u,onOpen:o},u.title))})]}):g.jsxs("div",{children:[g.jsx(Dn,{children:"Review"}),g.jsx("p",{style:{opacity:.5},children:"Loading…"})]})},Kq=()=>{const e=Ro(),t=Zg({select:l=>l.location.pathname}),{plans:n,activePlanTitle:r,setActivePlanTitle:i,setActiveIdeaTitle:s}=J(),o=(n==null?void 0:n.entries.filter(l=>l.status==="review"))??[],a=l=>{e({to:"/review"}),i(l),s(null)};return g.jsx(pn,{label:"Pending review",children:o.length===0?g.jsx("span",{className:"text-sm",style:{display:"block",padding:"0.25rem 0.75rem",opacity:.35,fontStyle:"italic"},children:"None"}):o.map(l=>g.jsx(ac,{plan:l,active:t==="/review"&&r===l.title,onClick:()=>a(l.title)},l.title))})},Gq=async()=>{try{return(await fetch("/api/config")).json()}catch{return null}},Nh=async e=>{try{return(await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok}catch{return!1}},Yq=async()=>{try{return(await(await fetch("/api/configs")).json()).files}catch{return[]}},Xq=async e=>{try{const t=await fetch(`/api/configs?name=${encodeURIComponent(e)}`);return t.ok?(await t.json()).content:null}catch{return null}},cA=async()=>{try{return await(await fetch("/api/env")).json()}catch{return{exists:!1,exampleExists:!1,entries:[],missingKeys:[]}}},Qq=async e=>{try{return(await fetch("/api/env",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entries:e})})).ok}catch{return!1}},qq=()=>{var D,V,_;const e=P.useRef(null),[t,n]=P.useState(void 0),{iconDataUri:r,loading:i}=Tj(),[s,o]=P.useState(null),a=s??r,[l,u]=P.useState(!1),[c,d]=P.useState(!1),[f,h]=P.useState(""),[p,y]=P.useState(!1),[x,m]=P.useState(!1),[v,w]=P.useState(""),[S,k]=P.useState(!1),[b,C]=P.useState(!1),[T,A]=P.useState(!1),[E,I]=P.useState(!1),[M,F]=P.useState(!1);P.useEffect(()=>{Gq().then(z=>{n(z),(z==null?void 0:z.port)!==void 0&&h(String(z.port)),(z==null?void 0:z.projectName)!==void 0&&w(z.projectName)})},[]);const B=async(z,Y)=>{const j=t==null?void 0:t.defaultAgents,ie={phase:(j==null?void 0:j.phase)??Es.phase,planDraft:(j==null?void 0:j.planDraft)??Es.planDraft,ideaExtend:(j==null?void 0:j.ideaExtend)??Es.ideaExtend,[z]:Y};if(await Nh({defaultAgents:ie})){n(qe=>qe&&{...qe,defaultAgents:ie});const ue=z==="phase"?A:z==="planDraft"?I:F;ue(!0),setTimeout(()=>ue(!1),2e3)}},$=async()=>{const z=Number(f);if(!Number.isInteger(z)||z<=0)return;y(!0);const Y=await Nh({port:z});y(!1),Y&&(n(j=>j&&{...j,port:z}),m(!0),setTimeout(()=>m(!1),2e3))},G=async()=>{const z=v.trim();if(!z)return;k(!0);const Y=await Nh({projectName:z});k(!1),Y&&(n(j=>j&&{...j,projectName:z}),w(z),C(!0),setTimeout(()=>C(!1),2e3))},Z=async z=>{var ie;const Y=(ie=z.target.files)==null?void 0:ie[0];if(!Y)return;u(!0);const j=new FileReader;j.onloadend=async()=>{const de=j.result,ue=await GK(de);u(!1),ue&&(d(!0),o(de),setTimeout(()=>d(!1),2e3))},j.readAsDataURL(Y)};return g.jsxs("div",{children:[g.jsx("div",{style:{marginBottom:L[6]},children:g.jsx("h2",{style:{margin:0},children:"Project Info"})}),t===void 0&&g.jsx("p",{children:"Loading…"}),t===null&&g.jsxs(jr,{variant:"warning",title:"No .paper-camp/config.json found",children:["Run ",g.jsx("code",{children:"paper-camp init"})," in this directory first."]}),t&&g.jsxs(lo,{size:"small",children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:L[3],borderBottom:"1px solid rgba(61, 53, 43, 0.1)",paddingBottom:L[3]},children:[g.jsx(vi,{value:v,onChange:z=>w(z.target.value),label:"Project Name"}),g.jsx(ge,{variant:"secondary",size:"small",onClick:G,disabled:S||!v.trim()||v.trim()===t.projectName,children:S?"Saving…":"Save"}),g.jsxs(ct,{size:"small",fillColor:"rgba(143, 185, 150, 0.25)",textColor:st.accentGreenDark,children:["v",t.version]}),b&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3],borderBottom:"1px solid rgba(61, 53, 43, 0.1)",paddingBottom:L[3],paddingTop:L[3]},children:[a&&g.jsx("img",{src:a,alt:"Project icon",style:{width:40,height:40,objectFit:"contain",flexShrink:0,borderRadius:4}}),g.jsxs("div",{children:[g.jsx("input",{ref:e,type:"file",accept:".svg,.png,.jpg,.jpeg,.gif,.webp",onChange:Z,style:{display:"none"}}),g.jsx(ge,{variant:"secondary",size:"small",onClick:()=>{var z;return(z=e.current)==null?void 0:z.click()},disabled:l,children:l?"Uploading…":"Choose File"}),c&&g.jsx("span",{className:"text-sm",style:{opacity:.6,marginLeft:L[2]},children:"Saved"}),i&&g.jsx("p",{className:"text-sm",style:{opacity:.5,margin:`${L[1]} 0 0`},children:"Loading…"}),!i&&!a&&!l&&g.jsx("p",{className:"text-sm",style:{opacity:.45,margin:`${L[1]} 0 0`},children:"No icon set."})]})]}),g.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:L[3],borderBottom:"1px solid rgba(61, 53, 43, 0.1)",paddingBottom:L[3],paddingTop:L[3]},children:[g.jsx(vi,{type:"number",value:f,onChange:z=>h(z.target.value),label:"Port",helperText:"Default for `paper-camp dev`. Does not affect the running server."}),g.jsx(ge,{variant:"secondary",size:"small",onClick:$,disabled:p||!f,children:p?"Saving…":"Save"}),x&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),g.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:L[3],borderBottom:"1px solid rgba(61, 53, 43, 0.1)",paddingBottom:L[3],paddingTop:L[3]},children:[g.jsx(uo,{value:((D=t.defaultAgents)==null?void 0:D.phase)??Es.phase,onChange:z=>B("phase",z),options:br.map(z=>({value:z,label:Da[z]})),label:"Phase execution",helperText:"Runs a single phase of a plan."}),T&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),g.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:L[3],borderBottom:"1px solid rgba(61, 53, 43, 0.1)",paddingBottom:L[3],paddingTop:L[3]},children:[g.jsx(uo,{value:((V=t.defaultAgents)==null?void 0:V.planDraft)??Es.planDraft,onChange:z=>B("planDraft",z),options:br.map(z=>({value:z,label:Da[z]})),label:"Plan drafting",helperText:"Writes a new plan from an idea."}),E&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),g.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:L[3],paddingTop:L[3]},children:[g.jsx(uo,{value:((_=t.defaultAgents)==null?void 0:_.ideaExtend)??Es.ideaExtend,onChange:z=>B("ideaExtend",z),options:br.map(z=>({value:z,label:Da[z]})),label:"Idea extension",helperText:"Expands an idea with AI-generated detail."}),M&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]})]}),g.jsxs("p",{style:{opacity:.45,fontSize:be.sm,marginTop:L[4]},children:[g.jsx("strong",{children:"Initialized:"})," ",t?new Date(t.initializedAt).toLocaleString():"—"]})]})},Jq=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}},eJ=({fileName:e})=>{const[t,n]=P.useState(null),[r,i]=P.useState(!0);if(P.useEffect(()=>{i(!0),Xq(e).then(o=>{n(o),i(!1)})},[e]),r)return g.jsx("p",{children:"Loading…"});if(t===null)return g.jsxs(jr,{variant:"warning",title:"Could not load file",children:[e," not found."]});const s=e==="package.json"?Jq(t):null;return g.jsxs("div",{children:[g.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:L[4]},children:g.jsx("h2",{style:{margin:0},children:e})}),s?g.jsx(El,{data:s,columns:[{key:"name",header:"Script",cell:o=>g.jsx("span",{style:{fontFamily:oe.mono},children:o.name}),width:4},{key:"command",header:"Command",cell:o=>g.jsx("span",{style:{fontFamily:oe.mono},children:o.command})}]}):g.jsx(x3,{code:t,filename:e})]})},vS=e=>/key|secret|token|password/i.test(e),tJ=()=>{const[e,t]=P.useState(!0),[n,r]=P.useState([]),[i,s]=P.useState([]),[o,a]=P.useState(new Set),[l,u]=P.useState(!1),[c,d]=P.useState(!1),[f,h]=P.useState(null);P.useEffect(()=>{cA().then(S=>{r(S.entries),s(S.missingKeys),t(!1)})},[]);const p=(S,k)=>{r(b=>b.map((C,T)=>T===S?{...C,...k}:C))},y=()=>r(S=>[...S,{key:"",value:""}]),x=S=>{r(k=>[...k,{key:S,value:""}]),s(k=>k.filter(b=>b!==S))},m=S=>{r(k=>k.filter((b,C)=>C!==S)),a(k=>{const b=new Set(k);return b.delete(S),b})},v=S=>a(k=>{const b=new Set(k);return b.has(S)?b.delete(S):b.add(S),b}),w=async()=>{const S=n.map(C=>({key:C.key.trim(),value:C.value})).filter(C=>C.key.length>0);if(new Set(S.map(C=>C.key)).size!==S.length){h("Duplicate keys are not allowed");return}h(null),u(!0);const b=await Qq(S);u(!1),b?(r(S),d(!0),setTimeout(()=>d(!1),2e3)):h("Failed to save .env")};return e?g.jsx("p",{children:"Loading…"}):g.jsxs("div",{children:[g.jsx("h2",{style:{margin:0,marginBottom:L[4]},children:"Environment Variables"}),f&&g.jsx(jr,{variant:"warning",title:"Could not save",children:f}),i.length>0&&g.jsx(jr,{variant:"warning",title:"Missing from .env",children:g.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:L[2],alignItems:"center"},children:[g.jsx("span",{children:"Present in .env.example but not set:"}),i.map(S=>g.jsxs(ge,{variant:"secondary",size:"small",onClick:()=>x(S),children:["+ ",S]},S))]})}),g.jsx(El,{data:n,columns:[{key:"key",header:"Key",cell:(S,k)=>g.jsx(vi,{value:S.key,placeholder:"KEY",style:{fontFamily:oe.mono},onChange:b=>p(k,{key:b.target.value})}),width:6},{key:"value",header:"Value",cell:(S,k)=>{const b=vS(S.key)&&!o.has(k);return g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2]},children:[g.jsx(vi,{type:b?"password":"text",value:S.value,placeholder:"value",style:{fontFamily:oe.mono,flex:1},onChange:C=>p(k,{value:C.target.value})}),vS(S.key)&&g.jsx(ge,{variant:"ghost",size:"small",onClick:()=>v(k),children:b?"Show":"Hide"})]})}},{key:"actions",header:"",width:2,cell:(S,k)=>g.jsx(yn,{icon:g.jsx(vs,{}),variant:"ghost",size:"small",label:"Remove variable",onClick:()=>m(k)})}]}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3],marginTop:L[4]},children:[g.jsx(ge,{variant:"secondary",size:"small",onClick:y,children:"+ Add variable"}),g.jsx(ge,{variant:"primary",size:"small",onClick:w,disabled:l,children:l?"Saving…":"Save"}),c&&g.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]})]})},nJ=()=>{const e=J(t=>t.activeSettingsSection);return g.jsxs("div",{children:[g.jsx(Dn,{children:"Settings"}),e==="general"&&g.jsx(qq,{}),e==="env"&&g.jsx(tJ,{}),e.startsWith("config:")&&g.jsx(eJ,{fileName:e.slice(7)})]})},rJ=()=>{const e=J(o=>o.activeSettingsSection),t=J(o=>o.setActiveSettingsSection),n=J(o=>o.settingsConfigFiles),r=J(o=>o.setSettingsConfigFiles),[i,s]=P.useState(!1);return P.useEffect(()=>{Yq().then(r),cA().then(o=>s(o.exists||o.exampleExists))},[r]),g.jsxs(g.Fragment,{children:[g.jsx(pn,{label:"General",children:g.jsx(wr,{size:"small",active:e==="general",onClick:()=>t("general"),children:"Project Info"})}),i&&g.jsx(pn,{label:"Environment",children:g.jsx(wr,{size:"small",active:e==="env",onClick:()=>t("env"),children:"Env Vars"})}),n.length>0&&g.jsx(pn,{label:"Config Files",children:n.map(o=>g.jsx(wr,{size:"small",active:e===`config:${o}`,onClick:()=>t(`config:${o}`),children:o},o))})]})},xS=[{id:"plans",label:"Plans",path:"/"},{id:"review",label:"Review",path:"/review"},{id:"docs",label:"Docs",path:"/docs"},{id:"settings",label:"Settings",path:"/settings"}],iJ=()=>{var f;const e=Ro(),t=Zg({select:h=>h.location.pathname}),n=J(h=>h.loadPlans),r=J(h=>h.loadIdeas),i=J(h=>h.setActivePlanTitle),s=J(h=>h.setActiveIdeaTitle),o=(f=xS.find(h=>h.path===t))==null?void 0:f.id,a=J(h=>h.docSearchQuery),l=J(h=>h.setDocSearchQuery),[u,c]=P.useState(!0),d=rv();return P.useEffect(()=>{n(),r()},[n,r]),P.useEffect(()=>{i(null),s(null)},[t,i,s]),g.jsxs(kF,{background:{texture:"paper",ruledType:"grid",ruledColor:"blue"},showHeader:!1,showSidebar:!1,showPage:!1,bleedBottom:!0,stackOpen:u,navigationIsland:g.jsx("nav",{"aria-label":"Navigation island",children:g.jsxs(TF,{children:[g.jsx(Ej,{size:"sm"}),g.jsx("div",{style:{width:1,height:24,background:"rgba(0,0,0,0.12)"}}),t==="/docs"&&g.jsx("div",{style:{width:180},children:g.jsx(vi,{size:"small",placeholder:"Search docs…",value:a,onChange:h=>l(h.target.value)})}),g.jsx("div",{style:{width:1,height:24,background:"rgba(0,0,0,0.12)"}}),g.jsx("div",{className:"flex items-center gap-1",children:xS.map(h=>g.jsx(ge,{variant:"ghost",size:"small",isActive:h.id===o,onClick:()=>e({to:h.path}),"aria-current":h.id===o?"page":void 0,children:h.label},h.id))})]})}),children:[g.jsx("div",{className:"flex h-full min-h-0 justify-center items-stretch box-border overflow-hidden",style:{paddingRight:u?Ki.stackPanelWidth:0},children:g.jsxs("div",{className:"flex h-full min-h-0 w-full max-w-layout",style:{gap:Ki.contentGap},children:[g.jsxs(QK,{routeKey:t,children:[t==="/"&&g.jsx(Hq,{}),t==="/review"&&g.jsx(Kq,{}),t==="/docs"&&g.jsx(vq,{}),t==="/settings"&&g.jsx(rJ,{})]}),g.jsx("div",{className:"flex flex-1 flex-col min-h-0 min-w-0",children:g.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:g.jsx(tT,{texture:{texture:"parchment"},style:{height:"auto",paddingBottom:`calc(${Ki.navIslandBottom} + ${Ki.navIslandHeight} + ${nT[4]})`},children:g.jsx(ev,{mode:"wait",children:g.jsx(od.div,{initial:d?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:d?void 0:{opacity:0,y:-8},transition:{duration:d?0:.2,ease:"easeOut"},children:g.jsx(lC,{})},t)})})})})]})}),g.jsx(cq,{open:u,onToggle:()=>c(h=>!h)})]})},$l=EL({component:iJ}),sJ=$d({getParentRoute:()=>$l,path:"/",component:Bq}),oJ=$d({getParentRoute:()=>$l,path:"/review",component:Zq}),aJ=$d({getParentRoute:()=>$l,path:"/docs",component:gq}),lJ=$d({getParentRoute:()=>$l,path:"/settings",component:nJ}),uJ=$l.addChildren([sJ,oJ,aJ,lJ]),cJ=OL({routeTree:uJ}),dA=document.getElementById("root");if(!dA)throw new Error("#root element not found");Ik(dA).render(g.jsx(P.StrictMode,{children:g.jsx(VL,{router:cJ})}));
|
|
272
|
+
//# sourceMappingURL=main-tAEncq68.js.map
|