awel 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/README.zh-CN.md +8 -0
- package/dist/cli/agent.d.ts +2 -1
- package/dist/cli/agent.js +3 -2
- package/dist/cli/awel-config.d.ts +10 -0
- package/dist/cli/awel-config.js +28 -0
- package/dist/cli/babel-setup.js +2 -19
- package/dist/cli/create.d.ts +1 -0
- package/dist/cli/create.js +136 -0
- package/dist/cli/index.js +60 -4
- package/dist/cli/onboarding.d.ts +1 -0
- package/dist/cli/onboarding.js +58 -0
- package/dist/cli/providers/registry.d.ts +12 -0
- package/dist/cli/providers/registry.js +41 -0
- package/dist/cli/providers/types.d.ts +2 -0
- package/dist/cli/providers/vercel.js +44 -1
- package/dist/cli/proxy.d.ts +1 -1
- package/dist/cli/proxy.js +40 -7
- package/dist/cli/server.d.ts +2 -1
- package/dist/cli/server.js +14 -3
- package/dist/cli/templates/blank/AGENT.md +24 -0
- package/dist/cli/templates/blank/src/app/page.tsx +10 -0
- package/dist/cli/templates/blog/AGENT.md +26 -0
- package/dist/cli/templates/blog/src/app/blog/[slug]/page.tsx +38 -0
- package/dist/cli/templates/blog/src/app/page.tsx +35 -0
- package/dist/cli/templates/blog/src/lib/posts.ts +42 -0
- package/dist/cli/templates/dashboard/AGENT.md +26 -0
- package/dist/cli/templates/dashboard/src/app/layout.tsx +28 -0
- package/dist/cli/templates/dashboard/src/app/page.tsx +30 -0
- package/dist/cli/templates/dashboard/src/components/Sidebar.tsx +31 -0
- package/dist/cli/templates/dashboard/src/components/StatsCard.tsx +24 -0
- package/dist/cli/templates/landing/AGENT.md +26 -0
- package/dist/cli/templates/landing/src/app/page.tsx +13 -0
- package/dist/cli/templates/landing/src/components/CTA.tsx +23 -0
- package/dist/cli/templates/landing/src/components/Features.tsx +46 -0
- package/dist/cli/templates/landing/src/components/Hero.tsx +26 -0
- package/dist/cli/templates/portfolio/AGENT.md +24 -0
- package/dist/cli/templates/portfolio/src/app/page.tsx +50 -0
- package/dist/cli/templates/portfolio/src/components/ProjectCard.tsx +30 -0
- package/dist/cli/templates/saas/AGENT.md +28 -0
- package/dist/cli/templates/saas/src/app/dashboard/page.tsx +10 -0
- package/dist/cli/templates/saas/src/app/page.tsx +37 -0
- package/dist/cli/templates/saas/src/app/pricing/page.tsx +53 -0
- package/dist/cli/templates/saas/src/components/Navbar.tsx +25 -0
- package/dist/cli/templates/saas/src/components/PricingCard.tsx +46 -0
- package/dist/cli/templates/templates/blank/AGENT.md +24 -0
- package/dist/cli/templates/templates/blank/src/app/page.tsx +10 -0
- package/dist/cli/templates/templates/blog/AGENT.md +26 -0
- package/dist/cli/templates/templates/blog/src/app/blog/[slug]/page.tsx +38 -0
- package/dist/cli/templates/templates/blog/src/app/page.tsx +35 -0
- package/dist/cli/templates/templates/blog/src/lib/posts.ts +42 -0
- package/dist/cli/templates/templates/dashboard/AGENT.md +26 -0
- package/dist/cli/templates/templates/dashboard/src/app/layout.tsx +28 -0
- package/dist/cli/templates/templates/dashboard/src/app/page.tsx +30 -0
- package/dist/cli/templates/templates/dashboard/src/components/Sidebar.tsx +31 -0
- package/dist/cli/templates/templates/dashboard/src/components/StatsCard.tsx +24 -0
- package/dist/cli/templates/templates/landing/AGENT.md +26 -0
- package/dist/cli/templates/templates/landing/src/app/page.tsx +13 -0
- package/dist/cli/templates/templates/landing/src/components/CTA.tsx +23 -0
- package/dist/cli/templates/templates/landing/src/components/Features.tsx +46 -0
- package/dist/cli/templates/templates/landing/src/components/Hero.tsx +26 -0
- package/dist/cli/templates/templates/portfolio/AGENT.md +24 -0
- package/dist/cli/templates/templates/portfolio/src/app/page.tsx +50 -0
- package/dist/cli/templates/templates/portfolio/src/components/ProjectCard.tsx +30 -0
- package/dist/cli/templates/templates/saas/AGENT.md +28 -0
- package/dist/cli/templates/templates/saas/src/app/dashboard/page.tsx +10 -0
- package/dist/cli/templates/templates/saas/src/app/page.tsx +37 -0
- package/dist/cli/templates/templates/saas/src/app/pricing/page.tsx +53 -0
- package/dist/cli/templates/templates/saas/src/components/Navbar.tsx +25 -0
- package/dist/cli/templates/templates/saas/src/components/PricingCard.tsx +46 -0
- package/dist/dashboard/assets/index-3djfaQxV.js +323 -0
- package/dist/dashboard/assets/index-BQNq3kAP.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/host/host.js +2 -8
- package/package.json +2 -1
- package/dist/dashboard/assets/index-B374_cjZ.css +0 -1
- package/dist/dashboard/assets/index-BJ6wUfxa.js +0 -318
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function i(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function l(s){if(s.ep)return;s.ep=!0;const a=i(s);fetch(s.href,a)}})();function wl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ha={exports:{}},Ii={},ma={exports:{}},ze={};/**
|
|
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 yf;function Zg(){if(yf)return ze;yf=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function k(j){return j===null||typeof j!="object"?null:(j=y&&j[y]||j["@@iterator"],typeof j=="function"?j:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,T={};function _(j,B,C){this.props=j,this.context=B,this.refs=T,this.updater=C||v}_.prototype.isReactComponent={},_.prototype.setState=function(j,B){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,B,"setState")},_.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function b(){}b.prototype=_.prototype;function $(j,B,C){this.props=j,this.context=B,this.refs=T,this.updater=C||v}var F=$.prototype=new b;F.constructor=$,N(F,_.prototype),F.isPureReactComponent=!0;var U=Array.isArray,H=Object.prototype.hasOwnProperty,R={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function A(j,B,C){var Se,Ee={},G=null,V=null;if(B!=null)for(Se in B.ref!==void 0&&(V=B.ref),B.key!==void 0&&(G=""+B.key),B)H.call(B,Se)&&!W.hasOwnProperty(Se)&&(Ee[Se]=B[Se]);var J=arguments.length-2;if(J===1)Ee.children=C;else if(1<J){for(var pe=Array(J),ae=0;ae<J;ae++)pe[ae]=arguments[ae+2];Ee.children=pe}if(j&&j.defaultProps)for(Se in J=j.defaultProps,J)Ee[Se]===void 0&&(Ee[Se]=J[Se]);return{$$typeof:t,type:j,key:G,ref:V,props:Ee,_owner:R.current}}function K(j,B){return{$$typeof:t,type:j.type,key:B,ref:j.ref,props:j.props,_owner:j._owner}}function X(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function le(j){var B={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(C){return B[C]})}var D=/\/+/g;function re(j,B){return typeof j=="object"&&j!==null&&j.key!=null?le(""+j.key):B.toString(36)}function Y(j,B,C,Se,Ee){var G=typeof j;(G==="undefined"||G==="boolean")&&(j=null);var V=!1;if(j===null)V=!0;else switch(G){case"string":case"number":V=!0;break;case"object":switch(j.$$typeof){case t:case r:V=!0}}if(V)return V=j,Ee=Ee(V),j=Se===""?"."+re(V,0):Se,U(Ee)?(C="",j!=null&&(C=j.replace(D,"$&/")+"/"),Y(Ee,B,C,"",function(ae){return ae})):Ee!=null&&(X(Ee)&&(Ee=K(Ee,C+(!Ee.key||V&&V.key===Ee.key?"":(""+Ee.key).replace(D,"$&/")+"/")+j)),B.push(Ee)),1;if(V=0,Se=Se===""?".":Se+":",U(j))for(var J=0;J<j.length;J++){G=j[J];var pe=Se+re(G,J);V+=Y(G,B,C,pe,Ee)}else if(pe=k(j),typeof pe=="function")for(j=pe.call(j),J=0;!(G=j.next()).done;)G=G.value,pe=Se+re(G,J++),V+=Y(G,B,C,pe,Ee);else if(G==="object")throw B=String(j),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return V}function Q(j,B,C){if(j==null)return j;var Se=[],Ee=0;return Y(j,Se,"","",function(G){return B.call(C,G,Ee++)}),Se}function de(j){if(j._status===-1){var B=j._result;B=B(),B.then(function(C){(j._status===0||j._status===-1)&&(j._status=1,j._result=C)},function(C){(j._status===0||j._status===-1)&&(j._status=2,j._result=C)}),j._status===-1&&(j._status=0,j._result=B)}if(j._status===1)return j._result.default;throw j._result}var fe={current:null},ee={transition:null},ce={ReactCurrentDispatcher:fe,ReactCurrentBatchConfig:ee,ReactCurrentOwner:R};function S(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:Q,forEach:function(j,B,C){Q(j,function(){B.apply(this,arguments)},C)},count:function(j){var B=0;return Q(j,function(){B++}),B},toArray:function(j){return Q(j,function(B){return B})||[]},only:function(j){if(!X(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},ze.Component=_,ze.Fragment=i,ze.Profiler=s,ze.PureComponent=$,ze.StrictMode=l,ze.Suspense=p,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ce,ze.act=S,ze.cloneElement=function(j,B,C){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var Se=N({},j.props),Ee=j.key,G=j.ref,V=j._owner;if(B!=null){if(B.ref!==void 0&&(G=B.ref,V=R.current),B.key!==void 0&&(Ee=""+B.key),j.type&&j.type.defaultProps)var J=j.type.defaultProps;for(pe in B)H.call(B,pe)&&!W.hasOwnProperty(pe)&&(Se[pe]=B[pe]===void 0&&J!==void 0?J[pe]:B[pe])}var pe=arguments.length-2;if(pe===1)Se.children=C;else if(1<pe){J=Array(pe);for(var ae=0;ae<pe;ae++)J[ae]=arguments[ae+2];Se.children=J}return{$$typeof:t,type:j.type,key:Ee,ref:G,props:Se,_owner:V}},ze.createContext=function(j){return j={$$typeof:c,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:a,_context:j},j.Consumer=j},ze.createElement=A,ze.createFactory=function(j){var B=A.bind(null,j);return B.type=j,B},ze.createRef=function(){return{current:null}},ze.forwardRef=function(j){return{$$typeof:f,render:j}},ze.isValidElement=X,ze.lazy=function(j){return{$$typeof:g,_payload:{_status:-1,_result:j},_init:de}},ze.memo=function(j,B){return{$$typeof:m,type:j,compare:B===void 0?null:B}},ze.startTransition=function(j){var B=ee.transition;ee.transition={};try{j()}finally{ee.transition=B}},ze.unstable_act=S,ze.useCallback=function(j,B){return fe.current.useCallback(j,B)},ze.useContext=function(j){return fe.current.useContext(j)},ze.useDebugValue=function(){},ze.useDeferredValue=function(j){return fe.current.useDeferredValue(j)},ze.useEffect=function(j,B){return fe.current.useEffect(j,B)},ze.useId=function(){return fe.current.useId()},ze.useImperativeHandle=function(j,B,C){return fe.current.useImperativeHandle(j,B,C)},ze.useInsertionEffect=function(j,B){return fe.current.useInsertionEffect(j,B)},ze.useLayoutEffect=function(j,B){return fe.current.useLayoutEffect(j,B)},ze.useMemo=function(j,B){return fe.current.useMemo(j,B)},ze.useReducer=function(j,B,C){return fe.current.useReducer(j,B,C)},ze.useRef=function(j){return fe.current.useRef(j)},ze.useState=function(j){return fe.current.useState(j)},ze.useSyncExternalStore=function(j,B,C){return fe.current.useSyncExternalStore(j,B,C)},ze.useTransition=function(){return fe.current.useTransition()},ze.version="18.3.1",ze}var xf;function kl(){return xf||(xf=1,ma.exports=Zg()),ma.exports}/**
|
|
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 vf;function ey(){if(vf)return Ii;vf=1;var t=kl(),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(f,p,m){var g,y={},k=null,v=null;m!==void 0&&(k=""+m),p.key!==void 0&&(k=""+p.key),p.ref!==void 0&&(v=p.ref);for(g in p)l.call(p,g)&&!a.hasOwnProperty(g)&&(y[g]=p[g]);if(f&&f.defaultProps)for(g in p=f.defaultProps,p)y[g]===void 0&&(y[g]=p[g]);return{$$typeof:r,type:f,key:k,ref:v,props:y,_owner:s.current}}return Ii.Fragment=i,Ii.jsx=c,Ii.jsxs=c,Ii}var wf;function ty(){return wf||(wf=1,ha.exports=ey()),ha.exports}var x=ty(),I=kl();const ny=wl(I);var ll={},ga={exports:{}},It={},ya={exports:{}},xa={};/**
|
|
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
|
+
*/var kf;function ry(){return kf||(kf=1,(function(t){function r(ee,ce){var S=ee.length;ee.push(ce);e:for(;0<S;){var j=S-1>>>1,B=ee[j];if(0<s(B,ce))ee[j]=ce,ee[S]=B,S=j;else break e}}function i(ee){return ee.length===0?null:ee[0]}function l(ee){if(ee.length===0)return null;var ce=ee[0],S=ee.pop();if(S!==ce){ee[0]=S;e:for(var j=0,B=ee.length,C=B>>>1;j<C;){var Se=2*(j+1)-1,Ee=ee[Se],G=Se+1,V=ee[G];if(0>s(Ee,S))G<B&&0>s(V,Ee)?(ee[j]=V,ee[G]=S,j=G):(ee[j]=Ee,ee[Se]=S,j=Se);else if(G<B&&0>s(V,S))ee[j]=V,ee[G]=S,j=G;else break e}}return ce}function s(ee,ce){var S=ee.sortIndex-ce.sortIndex;return S!==0?S:ee.id-ce.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var c=Date,f=c.now();t.unstable_now=function(){return c.now()-f}}var p=[],m=[],g=1,y=null,k=3,v=!1,N=!1,T=!1,_=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(ee){for(var ce=i(m);ce!==null;){if(ce.callback===null)l(m);else if(ce.startTime<=ee)l(m),ce.sortIndex=ce.expirationTime,r(p,ce);else break;ce=i(m)}}function U(ee){if(T=!1,F(ee),!N)if(i(p)!==null)N=!0,de(H);else{var ce=i(m);ce!==null&&fe(U,ce.startTime-ee)}}function H(ee,ce){N=!1,T&&(T=!1,b(A),A=-1),v=!0;var S=k;try{for(F(ce),y=i(p);y!==null&&(!(y.expirationTime>ce)||ee&&!le());){var j=y.callback;if(typeof j=="function"){y.callback=null,k=y.priorityLevel;var B=j(y.expirationTime<=ce);ce=t.unstable_now(),typeof B=="function"?y.callback=B:y===i(p)&&l(p),F(ce)}else l(p);y=i(p)}if(y!==null)var C=!0;else{var Se=i(m);Se!==null&&fe(U,Se.startTime-ce),C=!1}return C}finally{y=null,k=S,v=!1}}var R=!1,W=null,A=-1,K=5,X=-1;function le(){return!(t.unstable_now()-X<K)}function D(){if(W!==null){var ee=t.unstable_now();X=ee;var ce=!0;try{ce=W(!0,ee)}finally{ce?re():(R=!1,W=null)}}else R=!1}var re;if(typeof $=="function")re=function(){$(D)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,Q=Y.port2;Y.port1.onmessage=D,re=function(){Q.postMessage(null)}}else re=function(){_(D,0)};function de(ee){W=ee,R||(R=!0,re())}function fe(ee,ce){A=_(function(){ee(t.unstable_now())},ce)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(ee){ee.callback=null},t.unstable_continueExecution=function(){N||v||(N=!0,de(H))},t.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<ee?Math.floor(1e3/ee):5},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_getFirstCallbackNode=function(){return i(p)},t.unstable_next=function(ee){switch(k){case 1:case 2:case 3:var ce=3;break;default:ce=k}var S=k;k=ce;try{return ee()}finally{k=S}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(ee,ce){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var S=k;k=ee;try{return ce()}finally{k=S}},t.unstable_scheduleCallback=function(ee,ce,S){var j=t.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?j+S:j):S=j,ee){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=S+B,ee={id:g++,callback:ce,priorityLevel:ee,startTime:S,expirationTime:B,sortIndex:-1},S>j?(ee.sortIndex=S,r(m,ee),i(p)===null&&ee===i(m)&&(T?(b(A),A=-1):T=!0,fe(U,S-j))):(ee.sortIndex=B,r(p,ee),N||v||(N=!0,de(H))),ee},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(ee){var ce=k;return function(){var S=k;k=ce;try{return ee.apply(this,arguments)}finally{k=S}}}})(xa)),xa}var Sf;function iy(){return Sf||(Sf=1,ya.exports=ry()),ya.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 Cf;function oy(){if(Cf)return It;Cf=1;var t=kl(),r=iy();function i(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,s={};function a(e,n){c(e,n),c(e+"Capture",n)}function c(e,n){for(s[e]=n,e=0;e<n.length;e++)l.add(n[e])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,g={},y={};function k(e){return p.call(y,e)?!0:p.call(g,e)?!1:m.test(e)?y[e]=!0:(g[e]=!0,!1)}function v(e,n,o,u){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return u?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,n,o,u){if(n===null||typeof n>"u"||v(e,n,o,u))return!0;if(u)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function T(e,n,o,u,d,h,w){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=u,this.attributeNamespace=d,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=h,this.removeEmptyString=w}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_[e]=new T(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];_[n]=new T(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){_[e]=new T(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_[e]=new T(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){_[e]=new T(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){_[e]=new T(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){_[e]=new T(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){_[e]=new T(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){_[e]=new T(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function $(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 n=e.replace(b,$);_[n]=new T(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(b,$);_[n]=new T(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(b,$);_[n]=new T(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){_[e]=new T(e,1,!1,e.toLowerCase(),null,!1,!1)}),_.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){_[e]=new T(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,n,o,u){var d=_.hasOwnProperty(n)?_[n]:null;(d!==null?d.type!==0:u||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(N(n,o,d,u)&&(o=null),u||d===null?k(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):d.mustUseProperty?e[d.propertyName]=o===null?d.type===3?!1:"":o:(n=d.attributeName,u=d.attributeNamespace,o===null?e.removeAttribute(n):(d=d.type,o=d===3||d===4&&o===!0?"":""+o,u?e.setAttributeNS(u,n,o):e.setAttribute(n,o))))}var U=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,H=Symbol.for("react.element"),R=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),le=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),de=Symbol.for("react.lazy"),fe=Symbol.for("react.offscreen"),ee=Symbol.iterator;function ce(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var S=Object.assign,j;function B(e){if(j===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);j=n&&n[1]||""}return`
|
|
34
|
+
`+j+e}var C=!1;function Se(e,n){if(!e||C)return"";C=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(M){var u=M}Reflect.construct(e,[],n)}else{try{n.call()}catch(M){u=M}e.call(n.prototype)}else{try{throw Error()}catch(M){u=M}e()}}catch(M){if(M&&u&&typeof M.stack=="string"){for(var d=M.stack.split(`
|
|
35
|
+
`),h=u.stack.split(`
|
|
36
|
+
`),w=d.length-1,E=h.length-1;1<=w&&0<=E&&d[w]!==h[E];)E--;for(;1<=w&&0<=E;w--,E--)if(d[w]!==h[E]){if(w!==1||E!==1)do if(w--,E--,0>E||d[w]!==h[E]){var P=`
|
|
37
|
+
`+d[w].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=w&&0<=E);break}}}finally{C=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?B(e):""}function Ee(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=Se(e.type,!1),e;case 11:return e=Se(e.type.render,!1),e;case 1:return e=Se(e.type,!0),e;default:return""}}function G(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 W:return"Fragment";case R:return"Portal";case K:return"Profiler";case A:return"StrictMode";case re:return"Suspense";case Y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case le:return(e.displayName||"Context")+".Consumer";case X:return(e._context.displayName||"Context")+".Provider";case D:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return n=e.displayName||null,n!==null?n:G(e.type)||"Memo";case de:n=e._payload,e=e._init;try{return G(e(n))}catch{}}return null}function V(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return G(n);case 8:return n===A?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function J(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pe(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ae(e){var n=pe(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),u=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,h=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(w){u=""+w,h.call(this,w)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(w){u=""+w},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ye(e){e._valueTracker||(e._valueTracker=ae(e))}function Le(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),u="";return e&&(u=pe(e)?e.checked?"true":"false":e.value),e=u,e!==o?(n.setValue(e),!0):!1}function ie(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 we(e,n){var o=n.checked;return S({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function ve(e,n){var o=n.defaultValue==null?"":n.defaultValue,u=n.checked!=null?n.checked:n.defaultChecked;o=J(n.value!=null?n.value:o),e._wrapperState={initialChecked:u,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Ae(e,n){n=n.checked,n!=null&&F(e,"checked",n,!1)}function Ve(e,n){Ae(e,n);var o=J(n.value),u=n.type;if(o!=null)u==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(u==="submit"||u==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?st(e,n.type,o):n.hasOwnProperty("defaultValue")&&st(e,n.type,J(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function $e(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var u=n.type;if(!(u!=="submit"&&u!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function st(e,n,o){(n!=="number"||ie(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var He=Array.isArray;function gt(e,n,o,u){if(e=e.options,n){n={};for(var d=0;d<o.length;d++)n["$"+o[d]]=!0;for(o=0;o<e.length;o++)d=n.hasOwnProperty("$"+e[o].value),e[o].selected!==d&&(e[o].selected=d),d&&u&&(e[o].defaultSelected=!0)}else{for(o=""+J(o),n=null,d=0;d<e.length;d++){if(e[d].value===o){e[d].selected=!0,u&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function at(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(i(91));return S({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Nn(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(i(92));if(He(o)){if(1<o.length)throw Error(i(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:J(o)}}function Yi(e,n){var o=J(n.value),u=J(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),u!=null&&(e.defaultValue=""+u)}function Xi(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function q(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 ue(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?q(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ne,Re=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,u,d){MSApp.execUnsafeLocalFunction(function(){return e(n,o,u,d)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Ne=Ne||document.createElement("div"),Ne.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Ne.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Me(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var ft={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},gn=["Webkit","ms","Moz","O"];Object.keys(ft).forEach(function(e){gn.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),ft[n]=ft[e]})});function Bt(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||ft.hasOwnProperty(e)&&ft[e]?(""+n).trim():n+"px"}function jn(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var u=o.indexOf("--")===0,d=Bt(o,n[o],u);o==="float"&&(o="cssFloat"),u?e.setProperty(o,d):e[o]=d}}var Xn=S({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 pt(e,n){if(n){if(Xn[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(i(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(i(61))}if(n.style!=null&&typeof n.style!="object")throw Error(i(62))}}function on(e,n){if(e.indexOf("-")===-1)return typeof n.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 zt=null;function Tl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ll=null,mr=null,gr=null;function Ou(e){if(e=gi(e)){if(typeof Ll!="function")throw Error(i(280));var n=e.stateNode;n&&(n=ko(n),Ll(e.stateNode,e.type,n))}}function Ru(e){mr?gr?gr.push(e):gr=[e]:mr=e}function zu(){if(mr){var e=mr,n=gr;if(gr=mr=null,Ou(e),n)for(e=0;e<n.length;e++)Ou(n[e])}}function Au(e,n){return e(n)}function Mu(){}var Il=!1;function Du(e,n,o){if(Il)return e(n,o);Il=!0;try{return Au(e,n,o)}finally{Il=!1,(mr!==null||gr!==null)&&(Mu(),zu())}}function Gr(e,n){var o=e.stateNode;if(o===null)return null;var u=ko(o);if(u===null)return null;o=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(i(231,n,typeof o));return o}var _l=!1;if(f)try{var Yr={};Object.defineProperty(Yr,"passive",{get:function(){_l=!0}}),window.addEventListener("test",Yr,Yr),window.removeEventListener("test",Yr,Yr)}catch{_l=!1}function om(e,n,o,u,d,h,w,E,P){var M=Array.prototype.slice.call(arguments,3);try{n.apply(o,M)}catch(te){this.onError(te)}}var Xr=!1,Ji=null,Zi=!1,Ol=null,lm={onError:function(e){Xr=!0,Ji=e}};function sm(e,n,o,u,d,h,w,E,P){Xr=!1,Ji=null,om.apply(lm,arguments)}function am(e,n,o,u,d,h,w,E,P){if(sm.apply(this,arguments),Xr){if(Xr){var M=Ji;Xr=!1,Ji=null}else throw Error(i(198));Zi||(Zi=!0,Ol=M)}}function Jn(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function Fu(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function $u(e){if(Jn(e)!==e)throw Error(i(188))}function um(e){var n=e.alternate;if(!n){if(n=Jn(e),n===null)throw Error(i(188));return n!==e?null:e}for(var o=e,u=n;;){var d=o.return;if(d===null)break;var h=d.alternate;if(h===null){if(u=d.return,u!==null){o=u;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===o)return $u(d),e;if(h===u)return $u(d),n;h=h.sibling}throw Error(i(188))}if(o.return!==u.return)o=d,u=h;else{for(var w=!1,E=d.child;E;){if(E===o){w=!0,o=d,u=h;break}if(E===u){w=!0,u=d,o=h;break}E=E.sibling}if(!w){for(E=h.child;E;){if(E===o){w=!0,o=h,u=d;break}if(E===u){w=!0,u=h,o=d;break}E=E.sibling}if(!w)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?e:n}function Uu(e){return e=um(e),e!==null?Bu(e):null}function Bu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Bu(e);if(n!==null)return n;e=e.sibling}return null}var Vu=r.unstable_scheduleCallback,Hu=r.unstable_cancelCallback,cm=r.unstable_shouldYield,dm=r.unstable_requestPaint,tt=r.unstable_now,fm=r.unstable_getCurrentPriorityLevel,Rl=r.unstable_ImmediatePriority,Wu=r.unstable_UserBlockingPriority,eo=r.unstable_NormalPriority,pm=r.unstable_LowPriority,qu=r.unstable_IdlePriority,to=null,ln=null;function hm(e){if(ln&&typeof ln.onCommitFiberRoot=="function")try{ln.onCommitFiberRoot(to,e,void 0,(e.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:ym,mm=Math.log,gm=Math.LN2;function ym(e){return e>>>=0,e===0?32:31-(mm(e)/gm|0)|0}var no=64,ro=4194304;function Jr(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 io(e,n){var o=e.pendingLanes;if(o===0)return 0;var u=0,d=e.suspendedLanes,h=e.pingedLanes,w=o&268435455;if(w!==0){var E=w&~d;E!==0?u=Jr(E):(h&=w,h!==0&&(u=Jr(h)))}else w=o&~d,w!==0?u=Jr(w):h!==0&&(u=Jr(h));if(u===0)return 0;if(n!==0&&n!==u&&(n&d)===0&&(d=u&-u,h=n&-n,d>=h||d===16&&(h&4194240)!==0))return n;if((u&4)!==0&&(u|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=u;0<n;)o=31-Yt(n),d=1<<o,u|=e[o],n&=~d;return u}function xm(e,n){switch(e){case 1:case 2:case 4:return n+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 n+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 vm(e,n){for(var o=e.suspendedLanes,u=e.pingedLanes,d=e.expirationTimes,h=e.pendingLanes;0<h;){var w=31-Yt(h),E=1<<w,P=d[w];P===-1?((E&o)===0||(E&u)!==0)&&(d[w]=xm(E,n)):P<=n&&(e.expiredLanes|=E),h&=~E}}function zl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ku(){var e=no;return no<<=1,(no&4194240)===0&&(no=64),e}function Al(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function Zr(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Yt(n),e[n]=o}function wm(e,n){var o=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var u=e.eventTimes;for(e=e.expirationTimes;0<o;){var d=31-Yt(o),h=1<<d;n[d]=0,u[d]=-1,e[d]=-1,o&=~h}}function Ml(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var u=31-Yt(o),d=1<<u;d&n|e[u]&n&&(e[u]|=n),o&=~d}}var Be=0;function Qu(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Gu,Dl,Yu,Xu,Ju,Fl=!1,oo=[],Pn=null,Tn=null,Ln=null,ei=new Map,ti=new Map,In=[],km="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 Zu(e,n){switch(e){case"focusin":case"focusout":Pn=null;break;case"dragenter":case"dragleave":Tn=null;break;case"mouseover":case"mouseout":Ln=null;break;case"pointerover":case"pointerout":ei.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ti.delete(n.pointerId)}}function ni(e,n,o,u,d,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:o,eventSystemFlags:u,nativeEvent:h,targetContainers:[d]},n!==null&&(n=gi(n),n!==null&&Dl(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function Sm(e,n,o,u,d){switch(n){case"focusin":return Pn=ni(Pn,e,n,o,u,d),!0;case"dragenter":return Tn=ni(Tn,e,n,o,u,d),!0;case"mouseover":return Ln=ni(Ln,e,n,o,u,d),!0;case"pointerover":var h=d.pointerId;return ei.set(h,ni(ei.get(h)||null,e,n,o,u,d)),!0;case"gotpointercapture":return h=d.pointerId,ti.set(h,ni(ti.get(h)||null,e,n,o,u,d)),!0}return!1}function ec(e){var n=Zn(e.target);if(n!==null){var o=Jn(n);if(o!==null){if(n=o.tag,n===13){if(n=Fu(o),n!==null){e.blockedOn=n,Ju(e.priority,function(){Yu(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function lo(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=Ul(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var u=new o.constructor(o.type,o);zt=u,o.target.dispatchEvent(u),zt=null}else return n=gi(o),n!==null&&Dl(n),e.blockedOn=o,!1;n.shift()}return!0}function tc(e,n,o){lo(e)&&o.delete(n)}function Cm(){Fl=!1,Pn!==null&&lo(Pn)&&(Pn=null),Tn!==null&&lo(Tn)&&(Tn=null),Ln!==null&&lo(Ln)&&(Ln=null),ei.forEach(tc),ti.forEach(tc)}function ri(e,n){e.blockedOn===n&&(e.blockedOn=null,Fl||(Fl=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Cm)))}function ii(e){function n(d){return ri(d,e)}if(0<oo.length){ri(oo[0],e);for(var o=1;o<oo.length;o++){var u=oo[o];u.blockedOn===e&&(u.blockedOn=null)}}for(Pn!==null&&ri(Pn,e),Tn!==null&&ri(Tn,e),Ln!==null&&ri(Ln,e),ei.forEach(n),ti.forEach(n),o=0;o<In.length;o++)u=In[o],u.blockedOn===e&&(u.blockedOn=null);for(;0<In.length&&(o=In[0],o.blockedOn===null);)ec(o),o.blockedOn===null&&In.shift()}var yr=U.ReactCurrentBatchConfig,so=!0;function bm(e,n,o,u){var d=Be,h=yr.transition;yr.transition=null;try{Be=1,$l(e,n,o,u)}finally{Be=d,yr.transition=h}}function Em(e,n,o,u){var d=Be,h=yr.transition;yr.transition=null;try{Be=4,$l(e,n,o,u)}finally{Be=d,yr.transition=h}}function $l(e,n,o,u){if(so){var d=Ul(e,n,o,u);if(d===null)is(e,n,u,ao,o),Zu(e,u);else if(Sm(d,e,n,o,u))u.stopPropagation();else if(Zu(e,u),n&4&&-1<km.indexOf(e)){for(;d!==null;){var h=gi(d);if(h!==null&&Gu(h),h=Ul(e,n,o,u),h===null&&is(e,n,u,ao,o),h===d)break;d=h}d!==null&&u.stopPropagation()}else is(e,n,u,null,o)}}var ao=null;function Ul(e,n,o,u){if(ao=null,e=Tl(u),e=Zn(e),e!==null)if(n=Jn(e),n===null)e=null;else if(o=n.tag,o===13){if(e=Fu(n),e!==null)return e;e=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return ao=e,null}function nc(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(fm()){case Rl:return 1;case Wu:return 4;case eo:case pm:return 16;case qu:return 536870912;default:return 16}default:return 16}}var _n=null,Bl=null,uo=null;function rc(){if(uo)return uo;var e,n=Bl,o=n.length,u,d="value"in _n?_n.value:_n.textContent,h=d.length;for(e=0;e<o&&n[e]===d[e];e++);var w=o-e;for(u=1;u<=w&&n[o-u]===d[h-u];u++);return uo=d.slice(e,1<u?1-u:void 0)}function co(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function fo(){return!0}function ic(){return!1}function At(e){function n(o,u,d,h,w){this._reactName=o,this._targetInst=d,this.type=u,this.nativeEvent=h,this.target=w,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(o=e[E],this[E]=o?o(h):h[E]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?fo:ic,this.isPropagationStopped=ic,this}return S(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=fo)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=fo)},persist:function(){},isPersistent:fo}),n}var xr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vl=At(xr),oi=S({},xr,{view:0,detail:0}),Nm=At(oi),Hl,Wl,li,po=S({},oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kl,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!==li&&(li&&e.type==="mousemove"?(Hl=e.screenX-li.screenX,Wl=e.screenY-li.screenY):Wl=Hl=0,li=e),Hl)},movementY:function(e){return"movementY"in e?e.movementY:Wl}}),oc=At(po),jm=S({},po,{dataTransfer:0}),Pm=At(jm),Tm=S({},oi,{relatedTarget:0}),ql=At(Tm),Lm=S({},xr,{animationName:0,elapsedTime:0,pseudoElement:0}),Im=At(Lm),_m=S({},xr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Om=At(_m),Rm=S({},xr,{data:0}),lc=At(Rm),zm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Am={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"},Mm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dm(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Mm[e])?!!n[e]:!1}function Kl(){return Dm}var Fm=S({},oi,{key:function(e){if(e.key){var n=zm[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=co(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Am[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kl,charCode:function(e){return e.type==="keypress"?co(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?co(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$m=At(Fm),Um=S({},po,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sc=At(Um),Bm=S({},oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kl}),Vm=At(Bm),Hm=S({},xr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wm=At(Hm),qm=S({},po,{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}),Km=At(qm),Qm=[9,13,27,32],Ql=f&&"CompositionEvent"in window,si=null;f&&"documentMode"in document&&(si=document.documentMode);var Gm=f&&"TextEvent"in window&&!si,ac=f&&(!Ql||si&&8<si&&11>=si),uc=" ",cc=!1;function dc(e,n){switch(e){case"keyup":return Qm.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vr=!1;function Ym(e,n){switch(e){case"compositionend":return fc(n);case"keypress":return n.which!==32?null:(cc=!0,uc);case"textInput":return e=n.data,e===uc&&cc?null:e;default:return null}}function Xm(e,n){if(vr)return e==="compositionend"||!Ql&&dc(e,n)?(e=rc(),uo=Bl=_n=null,vr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return ac&&n.locale!=="ko"?null:n.data;default:return null}}var Jm={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 pc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Jm[e.type]:n==="textarea"}function hc(e,n,o,u){Ru(u),n=xo(n,"onChange"),0<n.length&&(o=new Vl("onChange","change",null,o,u),e.push({event:o,listeners:n}))}var ai=null,ui=null;function Zm(e){_c(e,0)}function ho(e){var n=br(e);if(Le(n))return e}function eg(e,n){if(e==="change")return n}var mc=!1;if(f){var Gl;if(f){var Yl="oninput"in document;if(!Yl){var gc=document.createElement("div");gc.setAttribute("oninput","return;"),Yl=typeof gc.oninput=="function"}Gl=Yl}else Gl=!1;mc=Gl&&(!document.documentMode||9<document.documentMode)}function yc(){ai&&(ai.detachEvent("onpropertychange",xc),ui=ai=null)}function xc(e){if(e.propertyName==="value"&&ho(ui)){var n=[];hc(n,ui,e,Tl(e)),Du(Zm,n)}}function tg(e,n,o){e==="focusin"?(yc(),ai=n,ui=o,ai.attachEvent("onpropertychange",xc)):e==="focusout"&&yc()}function ng(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ho(ui)}function rg(e,n){if(e==="click")return ho(n)}function ig(e,n){if(e==="input"||e==="change")return ho(n)}function og(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Xt=typeof Object.is=="function"?Object.is:og;function ci(e,n){if(Xt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),u=Object.keys(n);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var d=o[u];if(!p.call(n,d)||!Xt(e[d],n[d]))return!1}return!0}function vc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wc(e,n){var o=vc(e);e=0;for(var u;o;){if(o.nodeType===3){if(u=e+o.textContent.length,e<=n&&u>=n)return{node:o,offset:n-e};e=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=vc(o)}}function kc(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?kc(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Sc(){for(var e=window,n=ie();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=ie(e.document)}return n}function Xl(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function lg(e){var n=Sc(),o=e.focusedElem,u=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&kc(o.ownerDocument.documentElement,o)){if(u!==null&&Xl(o)){if(n=u.start,e=u.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var d=o.textContent.length,h=Math.min(u.start,d);u=u.end===void 0?h:Math.min(u.end,d),!e.extend&&h>u&&(d=u,u=h,h=d),d=wc(o,h);var w=wc(o,u);d&&w&&(e.rangeCount!==1||e.anchorNode!==d.node||e.anchorOffset!==d.offset||e.focusNode!==w.node||e.focusOffset!==w.offset)&&(n=n.createRange(),n.setStart(d.node,d.offset),e.removeAllRanges(),h>u?(e.addRange(n),e.extend(w.node,w.offset)):(n.setEnd(w.node,w.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<n.length;o++)e=n[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var sg=f&&"documentMode"in document&&11>=document.documentMode,wr=null,Jl=null,di=null,Zl=!1;function Cc(e,n,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Zl||wr==null||wr!==ie(u)||(u=wr,"selectionStart"in u&&Xl(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),di&&ci(di,u)||(di=u,u=xo(Jl,"onSelect"),0<u.length&&(n=new Vl("onSelect","select",null,n,o),e.push({event:n,listeners:u}),n.target=wr)))}function mo(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var kr={animationend:mo("Animation","AnimationEnd"),animationiteration:mo("Animation","AnimationIteration"),animationstart:mo("Animation","AnimationStart"),transitionend:mo("Transition","TransitionEnd")},es={},bc={};f&&(bc=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);function go(e){if(es[e])return es[e];if(!kr[e])return e;var n=kr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in bc)return es[e]=n[o];return e}var Ec=go("animationend"),Nc=go("animationiteration"),jc=go("animationstart"),Pc=go("transitionend"),Tc=new Map,Lc="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 On(e,n){Tc.set(e,n),a(n,[e])}for(var ts=0;ts<Lc.length;ts++){var ns=Lc[ts],ag=ns.toLowerCase(),ug=ns[0].toUpperCase()+ns.slice(1);On(ag,"on"+ug)}On(Ec,"onAnimationEnd"),On(Nc,"onAnimationIteration"),On(jc,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(Pc,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fi="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(" "),cg=new Set("cancel close invalid load scroll toggle".split(" ").concat(fi));function Ic(e,n,o){var u=e.type||"unknown-event";e.currentTarget=o,am(u,n,void 0,e),e.currentTarget=null}function _c(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var u=e[o],d=u.event;u=u.listeners;e:{var h=void 0;if(n)for(var w=u.length-1;0<=w;w--){var E=u[w],P=E.instance,M=E.currentTarget;if(E=E.listener,P!==h&&d.isPropagationStopped())break e;Ic(d,E,M),h=P}else for(w=0;w<u.length;w++){if(E=u[w],P=E.instance,M=E.currentTarget,E=E.listener,P!==h&&d.isPropagationStopped())break e;Ic(d,E,M),h=P}}}if(Zi)throw e=Ol,Zi=!1,Ol=null,e}function Qe(e,n){var o=n[cs];o===void 0&&(o=n[cs]=new Set);var u=e+"__bubble";o.has(u)||(Oc(n,e,2,!1),o.add(u))}function rs(e,n,o){var u=0;n&&(u|=4),Oc(o,e,u,n)}var yo="_reactListening"+Math.random().toString(36).slice(2);function pi(e){if(!e[yo]){e[yo]=!0,l.forEach(function(o){o!=="selectionchange"&&(cg.has(o)||rs(o,!1,e),rs(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[yo]||(n[yo]=!0,rs("selectionchange",!1,n))}}function Oc(e,n,o,u){switch(nc(n)){case 1:var d=bm;break;case 4:d=Em;break;default:d=$l}o=d.bind(null,n,o,e),d=void 0,!_l||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),u?d!==void 0?e.addEventListener(n,o,{capture:!0,passive:d}):e.addEventListener(n,o,!0):d!==void 0?e.addEventListener(n,o,{passive:d}):e.addEventListener(n,o,!1)}function is(e,n,o,u,d){var h=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var w=u.tag;if(w===3||w===4){var E=u.stateNode.containerInfo;if(E===d||E.nodeType===8&&E.parentNode===d)break;if(w===4)for(w=u.return;w!==null;){var P=w.tag;if((P===3||P===4)&&(P=w.stateNode.containerInfo,P===d||P.nodeType===8&&P.parentNode===d))return;w=w.return}for(;E!==null;){if(w=Zn(E),w===null)return;if(P=w.tag,P===5||P===6){u=h=w;continue e}E=E.parentNode}}u=u.return}Du(function(){var M=h,te=Tl(o),ne=[];e:{var Z=Tc.get(e);if(Z!==void 0){var he=Vl,ge=e;switch(e){case"keypress":if(co(o)===0)break e;case"keydown":case"keyup":he=$m;break;case"focusin":ge="focus",he=ql;break;case"focusout":ge="blur",he=ql;break;case"beforeblur":case"afterblur":he=ql;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=oc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=Pm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=Vm;break;case Ec:case Nc:case jc:he=Im;break;case Pc:he=Wm;break;case"scroll":he=Nm;break;case"wheel":he=Km;break;case"copy":case"cut":case"paste":he=Om;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=sc}var xe=(n&4)!==0,nt=!xe&&e==="scroll",O=xe?Z!==null?Z+"Capture":null:Z;xe=[];for(var L=M,z;L!==null;){z=L;var se=z.stateNode;if(z.tag===5&&se!==null&&(z=se,O!==null&&(se=Gr(L,O),se!=null&&xe.push(hi(L,se,z)))),nt)break;L=L.return}0<xe.length&&(Z=new he(Z,ge,null,o,te),ne.push({event:Z,listeners:xe}))}}if((n&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",he=e==="mouseout"||e==="pointerout",Z&&o!==zt&&(ge=o.relatedTarget||o.fromElement)&&(Zn(ge)||ge[yn]))break e;if((he||Z)&&(Z=te.window===te?te:(Z=te.ownerDocument)?Z.defaultView||Z.parentWindow:window,he?(ge=o.relatedTarget||o.toElement,he=M,ge=ge?Zn(ge):null,ge!==null&&(nt=Jn(ge),ge!==nt||ge.tag!==5&&ge.tag!==6)&&(ge=null)):(he=null,ge=M),he!==ge)){if(xe=oc,se="onMouseLeave",O="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(xe=sc,se="onPointerLeave",O="onPointerEnter",L="pointer"),nt=he==null?Z:br(he),z=ge==null?Z:br(ge),Z=new xe(se,L+"leave",he,o,te),Z.target=nt,Z.relatedTarget=z,se=null,Zn(te)===M&&(xe=new xe(O,L+"enter",ge,o,te),xe.target=z,xe.relatedTarget=nt,se=xe),nt=se,he&&ge)t:{for(xe=he,O=ge,L=0,z=xe;z;z=Sr(z))L++;for(z=0,se=O;se;se=Sr(se))z++;for(;0<L-z;)xe=Sr(xe),L--;for(;0<z-L;)O=Sr(O),z--;for(;L--;){if(xe===O||O!==null&&xe===O.alternate)break t;xe=Sr(xe),O=Sr(O)}xe=null}else xe=null;he!==null&&Rc(ne,Z,he,xe,!1),ge!==null&&nt!==null&&Rc(ne,nt,ge,xe,!0)}}e:{if(Z=M?br(M):window,he=Z.nodeName&&Z.nodeName.toLowerCase(),he==="select"||he==="input"&&Z.type==="file")var ke=eg;else if(pc(Z))if(mc)ke=ig;else{ke=ng;var Ce=tg}else(he=Z.nodeName)&&he.toLowerCase()==="input"&&(Z.type==="checkbox"||Z.type==="radio")&&(ke=rg);if(ke&&(ke=ke(e,M))){hc(ne,ke,o,te);break e}Ce&&Ce(e,Z,M),e==="focusout"&&(Ce=Z._wrapperState)&&Ce.controlled&&Z.type==="number"&&st(Z,"number",Z.value)}switch(Ce=M?br(M):window,e){case"focusin":(pc(Ce)||Ce.contentEditable==="true")&&(wr=Ce,Jl=M,di=null);break;case"focusout":di=Jl=wr=null;break;case"mousedown":Zl=!0;break;case"contextmenu":case"mouseup":case"dragend":Zl=!1,Cc(ne,o,te);break;case"selectionchange":if(sg)break;case"keydown":case"keyup":Cc(ne,o,te)}var be;if(Ql)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else vr?dc(e,o)&&(je="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(je="onCompositionStart");je&&(ac&&o.locale!=="ko"&&(vr||je!=="onCompositionStart"?je==="onCompositionEnd"&&vr&&(be=rc()):(_n=te,Bl="value"in _n?_n.value:_n.textContent,vr=!0)),Ce=xo(M,je),0<Ce.length&&(je=new lc(je,e,null,o,te),ne.push({event:je,listeners:Ce}),be?je.data=be:(be=fc(o),be!==null&&(je.data=be)))),(be=Gm?Ym(e,o):Xm(e,o))&&(M=xo(M,"onBeforeInput"),0<M.length&&(te=new lc("onBeforeInput","beforeinput",null,o,te),ne.push({event:te,listeners:M}),te.data=be))}_c(ne,n)})}function hi(e,n,o){return{instance:e,listener:n,currentTarget:o}}function xo(e,n){for(var o=n+"Capture",u=[];e!==null;){var d=e,h=d.stateNode;d.tag===5&&h!==null&&(d=h,h=Gr(e,o),h!=null&&u.unshift(hi(e,h,d)),h=Gr(e,n),h!=null&&u.push(hi(e,h,d))),e=e.return}return u}function Sr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Rc(e,n,o,u,d){for(var h=n._reactName,w=[];o!==null&&o!==u;){var E=o,P=E.alternate,M=E.stateNode;if(P!==null&&P===u)break;E.tag===5&&M!==null&&(E=M,d?(P=Gr(o,h),P!=null&&w.unshift(hi(o,P,E))):d||(P=Gr(o,h),P!=null&&w.push(hi(o,P,E)))),o=o.return}w.length!==0&&e.push({event:n,listeners:w})}var dg=/\r\n?/g,fg=/\u0000|\uFFFD/g;function zc(e){return(typeof e=="string"?e:""+e).replace(dg,`
|
|
38
|
+
`).replace(fg,"")}function vo(e,n,o){if(n=zc(n),zc(e)!==n&&o)throw Error(i(425))}function wo(){}var os=null,ls=null;function ss(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var as=typeof setTimeout=="function"?setTimeout:void 0,pg=typeof clearTimeout=="function"?clearTimeout:void 0,Ac=typeof Promise=="function"?Promise:void 0,hg=typeof queueMicrotask=="function"?queueMicrotask:typeof Ac<"u"?function(e){return Ac.resolve(null).then(e).catch(mg)}:as;function mg(e){setTimeout(function(){throw e})}function us(e,n){var o=n,u=0;do{var d=o.nextSibling;if(e.removeChild(o),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(u===0){e.removeChild(d),ii(n);return}u--}else o!=="$"&&o!=="$?"&&o!=="$!"||u++;o=d}while(o);ii(n)}function Rn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Mc(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var Cr=Math.random().toString(36).slice(2),sn="__reactFiber$"+Cr,mi="__reactProps$"+Cr,yn="__reactContainer$"+Cr,cs="__reactEvents$"+Cr,gg="__reactListeners$"+Cr,yg="__reactHandles$"+Cr;function Zn(e){var n=e[sn];if(n)return n;for(var o=e.parentNode;o;){if(n=o[yn]||o[sn]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Mc(e);e!==null;){if(o=e[sn])return o;e=Mc(e)}return n}e=o,o=e.parentNode}return null}function gi(e){return e=e[sn]||e[yn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function br(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function ko(e){return e[mi]||null}var ds=[],Er=-1;function zn(e){return{current:e}}function Ge(e){0>Er||(e.current=ds[Er],ds[Er]=null,Er--)}function We(e,n){Er++,ds[Er]=e.current,e.current=n}var An={},yt=zn(An),Nt=zn(!1),er=An;function Nr(e,n){var o=e.type.contextTypes;if(!o)return An;var u=e.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===n)return u.__reactInternalMemoizedMaskedChildContext;var d={},h;for(h in o)d[h]=n[h];return u&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=d),d}function jt(e){return e=e.childContextTypes,e!=null}function So(){Ge(Nt),Ge(yt)}function Dc(e,n,o){if(yt.current!==An)throw Error(i(168));We(yt,n),We(Nt,o)}function Fc(e,n,o){var u=e.stateNode;if(n=n.childContextTypes,typeof u.getChildContext!="function")return o;u=u.getChildContext();for(var d in u)if(!(d in n))throw Error(i(108,V(e)||"Unknown",d));return S({},o,u)}function Co(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||An,er=yt.current,We(yt,e),We(Nt,Nt.current),!0}function $c(e,n,o){var u=e.stateNode;if(!u)throw Error(i(169));o?(e=Fc(e,n,er),u.__reactInternalMemoizedMergedChildContext=e,Ge(Nt),Ge(yt),We(yt,e)):Ge(Nt),We(Nt,o)}var xn=null,bo=!1,fs=!1;function Uc(e){xn===null?xn=[e]:xn.push(e)}function xg(e){bo=!0,Uc(e)}function Mn(){if(!fs&&xn!==null){fs=!0;var e=0,n=Be;try{var o=xn;for(Be=1;e<o.length;e++){var u=o[e];do u=u(!0);while(u!==null)}xn=null,bo=!1}catch(d){throw xn!==null&&(xn=xn.slice(e+1)),Vu(Rl,Mn),d}finally{Be=n,fs=!1}}return null}var jr=[],Pr=0,Eo=null,No=0,Vt=[],Ht=0,tr=null,vn=1,wn="";function nr(e,n){jr[Pr++]=No,jr[Pr++]=Eo,Eo=e,No=n}function Bc(e,n,o){Vt[Ht++]=vn,Vt[Ht++]=wn,Vt[Ht++]=tr,tr=e;var u=vn;e=wn;var d=32-Yt(u)-1;u&=~(1<<d),o+=1;var h=32-Yt(n)+d;if(30<h){var w=d-d%5;h=(u&(1<<w)-1).toString(32),u>>=w,d-=w,vn=1<<32-Yt(n)+d|o<<d|u,wn=h+e}else vn=1<<h|o<<d|u,wn=e}function ps(e){e.return!==null&&(nr(e,1),Bc(e,1,0))}function hs(e){for(;e===Eo;)Eo=jr[--Pr],jr[Pr]=null,No=jr[--Pr],jr[Pr]=null;for(;e===tr;)tr=Vt[--Ht],Vt[Ht]=null,wn=Vt[--Ht],Vt[Ht]=null,vn=Vt[--Ht],Vt[Ht]=null}var Mt=null,Dt=null,Xe=!1,Jt=null;function Vc(e,n){var o=Qt(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function Hc(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Mt=e,Dt=Rn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Mt=e,Dt=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=tr!==null?{id:vn,overflow:wn}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=Qt(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,Mt=e,Dt=null,!0):!1;default:return!1}}function ms(e){return(e.mode&1)!==0&&(e.flags&128)===0}function gs(e){if(Xe){var n=Dt;if(n){var o=n;if(!Hc(e,n)){if(ms(e))throw Error(i(418));n=Rn(o.nextSibling);var u=Mt;n&&Hc(e,n)?Vc(u,o):(e.flags=e.flags&-4097|2,Xe=!1,Mt=e)}}else{if(ms(e))throw Error(i(418));e.flags=e.flags&-4097|2,Xe=!1,Mt=e}}}function Wc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mt=e}function jo(e){if(e!==Mt)return!1;if(!Xe)return Wc(e),Xe=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!ss(e.type,e.memoizedProps)),n&&(n=Dt)){if(ms(e))throw qc(),Error(i(418));for(;n;)Vc(e,n),n=Rn(n.nextSibling)}if(Wc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){Dt=Rn(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}Dt=null}}else Dt=Mt?Rn(e.stateNode.nextSibling):null;return!0}function qc(){for(var e=Dt;e;)e=Rn(e.nextSibling)}function Tr(){Dt=Mt=null,Xe=!1}function ys(e){Jt===null?Jt=[e]:Jt.push(e)}var vg=U.ReactCurrentBatchConfig;function yi(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(i(309));var u=o.stateNode}if(!u)throw Error(i(147,e));var d=u,h=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===h?n.ref:(n=function(w){var E=d.refs;w===null?delete E[h]:E[h]=w},n._stringRef=h,n)}if(typeof e!="string")throw Error(i(284));if(!o._owner)throw Error(i(290,e))}return e}function Po(e,n){throw e=Object.prototype.toString.call(n),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Kc(e){var n=e._init;return n(e._payload)}function Qc(e){function n(O,L){if(e){var z=O.deletions;z===null?(O.deletions=[L],O.flags|=16):z.push(L)}}function o(O,L){if(!e)return null;for(;L!==null;)n(O,L),L=L.sibling;return null}function u(O,L){for(O=new Map;L!==null;)L.key!==null?O.set(L.key,L):O.set(L.index,L),L=L.sibling;return O}function d(O,L){return O=Wn(O,L),O.index=0,O.sibling=null,O}function h(O,L,z){return O.index=z,e?(z=O.alternate,z!==null?(z=z.index,z<L?(O.flags|=2,L):z):(O.flags|=2,L)):(O.flags|=1048576,L)}function w(O){return e&&O.alternate===null&&(O.flags|=2),O}function E(O,L,z,se){return L===null||L.tag!==6?(L=aa(z,O.mode,se),L.return=O,L):(L=d(L,z),L.return=O,L)}function P(O,L,z,se){var ke=z.type;return ke===W?te(O,L,z.props.children,se,z.key):L!==null&&(L.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===de&&Kc(ke)===L.type)?(se=d(L,z.props),se.ref=yi(O,L,z),se.return=O,se):(se=Jo(z.type,z.key,z.props,null,O.mode,se),se.ref=yi(O,L,z),se.return=O,se)}function M(O,L,z,se){return L===null||L.tag!==4||L.stateNode.containerInfo!==z.containerInfo||L.stateNode.implementation!==z.implementation?(L=ua(z,O.mode,se),L.return=O,L):(L=d(L,z.children||[]),L.return=O,L)}function te(O,L,z,se,ke){return L===null||L.tag!==7?(L=cr(z,O.mode,se,ke),L.return=O,L):(L=d(L,z),L.return=O,L)}function ne(O,L,z){if(typeof L=="string"&&L!==""||typeof L=="number")return L=aa(""+L,O.mode,z),L.return=O,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case H:return z=Jo(L.type,L.key,L.props,null,O.mode,z),z.ref=yi(O,null,L),z.return=O,z;case R:return L=ua(L,O.mode,z),L.return=O,L;case de:var se=L._init;return ne(O,se(L._payload),z)}if(He(L)||ce(L))return L=cr(L,O.mode,z,null),L.return=O,L;Po(O,L)}return null}function Z(O,L,z,se){var ke=L!==null?L.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return ke!==null?null:E(O,L,""+z,se);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case H:return z.key===ke?P(O,L,z,se):null;case R:return z.key===ke?M(O,L,z,se):null;case de:return ke=z._init,Z(O,L,ke(z._payload),se)}if(He(z)||ce(z))return ke!==null?null:te(O,L,z,se,null);Po(O,z)}return null}function he(O,L,z,se,ke){if(typeof se=="string"&&se!==""||typeof se=="number")return O=O.get(z)||null,E(L,O,""+se,ke);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case H:return O=O.get(se.key===null?z:se.key)||null,P(L,O,se,ke);case R:return O=O.get(se.key===null?z:se.key)||null,M(L,O,se,ke);case de:var Ce=se._init;return he(O,L,z,Ce(se._payload),ke)}if(He(se)||ce(se))return O=O.get(z)||null,te(L,O,se,ke,null);Po(L,se)}return null}function ge(O,L,z,se){for(var ke=null,Ce=null,be=L,je=L=0,dt=null;be!==null&&je<z.length;je++){be.index>je?(dt=be,be=null):dt=be.sibling;var Fe=Z(O,be,z[je],se);if(Fe===null){be===null&&(be=dt);break}e&&be&&Fe.alternate===null&&n(O,be),L=h(Fe,L,je),Ce===null?ke=Fe:Ce.sibling=Fe,Ce=Fe,be=dt}if(je===z.length)return o(O,be),Xe&&nr(O,je),ke;if(be===null){for(;je<z.length;je++)be=ne(O,z[je],se),be!==null&&(L=h(be,L,je),Ce===null?ke=be:Ce.sibling=be,Ce=be);return Xe&&nr(O,je),ke}for(be=u(O,be);je<z.length;je++)dt=he(be,O,je,z[je],se),dt!==null&&(e&&dt.alternate!==null&&be.delete(dt.key===null?je:dt.key),L=h(dt,L,je),Ce===null?ke=dt:Ce.sibling=dt,Ce=dt);return e&&be.forEach(function(qn){return n(O,qn)}),Xe&&nr(O,je),ke}function xe(O,L,z,se){var ke=ce(z);if(typeof ke!="function")throw Error(i(150));if(z=ke.call(z),z==null)throw Error(i(151));for(var Ce=ke=null,be=L,je=L=0,dt=null,Fe=z.next();be!==null&&!Fe.done;je++,Fe=z.next()){be.index>je?(dt=be,be=null):dt=be.sibling;var qn=Z(O,be,Fe.value,se);if(qn===null){be===null&&(be=dt);break}e&&be&&qn.alternate===null&&n(O,be),L=h(qn,L,je),Ce===null?ke=qn:Ce.sibling=qn,Ce=qn,be=dt}if(Fe.done)return o(O,be),Xe&&nr(O,je),ke;if(be===null){for(;!Fe.done;je++,Fe=z.next())Fe=ne(O,Fe.value,se),Fe!==null&&(L=h(Fe,L,je),Ce===null?ke=Fe:Ce.sibling=Fe,Ce=Fe);return Xe&&nr(O,je),ke}for(be=u(O,be);!Fe.done;je++,Fe=z.next())Fe=he(be,O,je,Fe.value,se),Fe!==null&&(e&&Fe.alternate!==null&&be.delete(Fe.key===null?je:Fe.key),L=h(Fe,L,je),Ce===null?ke=Fe:Ce.sibling=Fe,Ce=Fe);return e&&be.forEach(function(Jg){return n(O,Jg)}),Xe&&nr(O,je),ke}function nt(O,L,z,se){if(typeof z=="object"&&z!==null&&z.type===W&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case H:e:{for(var ke=z.key,Ce=L;Ce!==null;){if(Ce.key===ke){if(ke=z.type,ke===W){if(Ce.tag===7){o(O,Ce.sibling),L=d(Ce,z.props.children),L.return=O,O=L;break e}}else if(Ce.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===de&&Kc(ke)===Ce.type){o(O,Ce.sibling),L=d(Ce,z.props),L.ref=yi(O,Ce,z),L.return=O,O=L;break e}o(O,Ce);break}else n(O,Ce);Ce=Ce.sibling}z.type===W?(L=cr(z.props.children,O.mode,se,z.key),L.return=O,O=L):(se=Jo(z.type,z.key,z.props,null,O.mode,se),se.ref=yi(O,L,z),se.return=O,O=se)}return w(O);case R:e:{for(Ce=z.key;L!==null;){if(L.key===Ce)if(L.tag===4&&L.stateNode.containerInfo===z.containerInfo&&L.stateNode.implementation===z.implementation){o(O,L.sibling),L=d(L,z.children||[]),L.return=O,O=L;break e}else{o(O,L);break}else n(O,L);L=L.sibling}L=ua(z,O.mode,se),L.return=O,O=L}return w(O);case de:return Ce=z._init,nt(O,L,Ce(z._payload),se)}if(He(z))return ge(O,L,z,se);if(ce(z))return xe(O,L,z,se);Po(O,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,L!==null&&L.tag===6?(o(O,L.sibling),L=d(L,z),L.return=O,O=L):(o(O,L),L=aa(z,O.mode,se),L.return=O,O=L),w(O)):o(O,L)}return nt}var Lr=Qc(!0),Gc=Qc(!1),To=zn(null),Lo=null,Ir=null,xs=null;function vs(){xs=Ir=Lo=null}function ws(e){var n=To.current;Ge(To),e._currentValue=n}function ks(e,n,o){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===o)break;e=e.return}}function _r(e,n){Lo=e,xs=Ir=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(Pt=!0),e.firstContext=null)}function Wt(e){var n=e._currentValue;if(xs!==e)if(e={context:e,memoizedValue:n,next:null},Ir===null){if(Lo===null)throw Error(i(308));Ir=e,Lo.dependencies={lanes:0,firstContext:e}}else Ir=Ir.next=e;return n}var rr=null;function Ss(e){rr===null?rr=[e]:rr.push(e)}function Yc(e,n,o,u){var d=n.interleaved;return d===null?(o.next=o,Ss(n)):(o.next=d.next,d.next=o),n.interleaved=o,kn(e,u)}function kn(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Dn=!1;function Cs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xc(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Sn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Fn(e,n,o){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(De&2)!==0){var d=u.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),u.pending=n,kn(e,o)}return d=u.interleaved,d===null?(n.next=n,Ss(u)):(n.next=d.next,d.next=n),u.interleaved=n,kn(e,o)}function Io(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var u=n.lanes;u&=e.pendingLanes,o|=u,n.lanes=o,Ml(e,o)}}function Jc(e,n){var o=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var d=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var w={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};h===null?d=h=w:h=h.next=w,o=o.next}while(o!==null);h===null?d=h=n:h=h.next=n}else d=h=n;o={baseState:u.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:u.shared,effects:u.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function _o(e,n,o,u){var d=e.updateQueue;Dn=!1;var h=d.firstBaseUpdate,w=d.lastBaseUpdate,E=d.shared.pending;if(E!==null){d.shared.pending=null;var P=E,M=P.next;P.next=null,w===null?h=M:w.next=M,w=P;var te=e.alternate;te!==null&&(te=te.updateQueue,E=te.lastBaseUpdate,E!==w&&(E===null?te.firstBaseUpdate=M:E.next=M,te.lastBaseUpdate=P))}if(h!==null){var ne=d.baseState;w=0,te=M=P=null,E=h;do{var Z=E.lane,he=E.eventTime;if((u&Z)===Z){te!==null&&(te=te.next={eventTime:he,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var ge=e,xe=E;switch(Z=n,he=o,xe.tag){case 1:if(ge=xe.payload,typeof ge=="function"){ne=ge.call(he,ne,Z);break e}ne=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=xe.payload,Z=typeof ge=="function"?ge.call(he,ne,Z):ge,Z==null)break e;ne=S({},ne,Z);break e;case 2:Dn=!0}}E.callback!==null&&E.lane!==0&&(e.flags|=64,Z=d.effects,Z===null?d.effects=[E]:Z.push(E))}else he={eventTime:he,lane:Z,tag:E.tag,payload:E.payload,callback:E.callback,next:null},te===null?(M=te=he,P=ne):te=te.next=he,w|=Z;if(E=E.next,E===null){if(E=d.shared.pending,E===null)break;Z=E,E=Z.next,Z.next=null,d.lastBaseUpdate=Z,d.shared.pending=null}}while(!0);if(te===null&&(P=ne),d.baseState=P,d.firstBaseUpdate=M,d.lastBaseUpdate=te,n=d.shared.interleaved,n!==null){d=n;do w|=d.lane,d=d.next;while(d!==n)}else h===null&&(d.shared.lanes=0);lr|=w,e.lanes=w,e.memoizedState=ne}}function Zc(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var u=e[n],d=u.callback;if(d!==null){if(u.callback=null,u=o,typeof d!="function")throw Error(i(191,d));d.call(u)}}}var xi={},an=zn(xi),vi=zn(xi),wi=zn(xi);function ir(e){if(e===xi)throw Error(i(174));return e}function bs(e,n){switch(We(wi,n),We(vi,e),We(an,xi),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ue(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ue(n,e)}Ge(an),We(an,n)}function Or(){Ge(an),Ge(vi),Ge(wi)}function ed(e){ir(wi.current);var n=ir(an.current),o=ue(n,e.type);n!==o&&(We(vi,e),We(an,o))}function Es(e){vi.current===e&&(Ge(an),Ge(vi))}var Je=zn(0);function Oo(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Ns=[];function js(){for(var e=0;e<Ns.length;e++)Ns[e]._workInProgressVersionPrimary=null;Ns.length=0}var Ro=U.ReactCurrentDispatcher,Ps=U.ReactCurrentBatchConfig,or=0,Ze=null,ot=null,ut=null,zo=!1,ki=!1,Si=0,wg=0;function xt(){throw Error(i(321))}function Ts(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!Xt(e[o],n[o]))return!1;return!0}function Ls(e,n,o,u,d,h){if(or=h,Ze=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ro.current=e===null||e.memoizedState===null?bg:Eg,e=o(u,d),ki){h=0;do{if(ki=!1,Si=0,25<=h)throw Error(i(301));h+=1,ut=ot=null,n.updateQueue=null,Ro.current=Ng,e=o(u,d)}while(ki)}if(Ro.current=Do,n=ot!==null&&ot.next!==null,or=0,ut=ot=Ze=null,zo=!1,n)throw Error(i(300));return e}function Is(){var e=Si!==0;return Si=0,e}function un(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?Ze.memoizedState=ut=e:ut=ut.next=e,ut}function qt(){if(ot===null){var e=Ze.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var n=ut===null?Ze.memoizedState:ut.next;if(n!==null)ut=n,ot=e;else{if(e===null)throw Error(i(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},ut===null?Ze.memoizedState=ut=e:ut=ut.next=e}return ut}function Ci(e,n){return typeof n=="function"?n(e):n}function _s(e){var n=qt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var u=ot,d=u.baseQueue,h=o.pending;if(h!==null){if(d!==null){var w=d.next;d.next=h.next,h.next=w}u.baseQueue=d=h,o.pending=null}if(d!==null){h=d.next,u=u.baseState;var E=w=null,P=null,M=h;do{var te=M.lane;if((or&te)===te)P!==null&&(P=P.next={lane:0,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),u=M.hasEagerState?M.eagerState:e(u,M.action);else{var ne={lane:te,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null};P===null?(E=P=ne,w=u):P=P.next=ne,Ze.lanes|=te,lr|=te}M=M.next}while(M!==null&&M!==h);P===null?w=u:P.next=E,Xt(u,n.memoizedState)||(Pt=!0),n.memoizedState=u,n.baseState=w,n.baseQueue=P,o.lastRenderedState=u}if(e=o.interleaved,e!==null){d=e;do h=d.lane,Ze.lanes|=h,lr|=h,d=d.next;while(d!==e)}else d===null&&(o.lanes=0);return[n.memoizedState,o.dispatch]}function Os(e){var n=qt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var u=o.dispatch,d=o.pending,h=n.memoizedState;if(d!==null){o.pending=null;var w=d=d.next;do h=e(h,w.action),w=w.next;while(w!==d);Xt(h,n.memoizedState)||(Pt=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),o.lastRenderedState=h}return[h,u]}function td(){}function nd(e,n){var o=Ze,u=qt(),d=n(),h=!Xt(u.memoizedState,d);if(h&&(u.memoizedState=d,Pt=!0),u=u.queue,Rs(od.bind(null,o,u,e),[e]),u.getSnapshot!==n||h||ut!==null&&ut.memoizedState.tag&1){if(o.flags|=2048,bi(9,id.bind(null,o,u,d,n),void 0,null),ct===null)throw Error(i(349));(or&30)!==0||rd(o,n,d)}return d}function rd(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=Ze.updateQueue,n===null?(n={lastEffect:null,stores:null},Ze.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function id(e,n,o,u){n.value=o,n.getSnapshot=u,ld(n)&&sd(e)}function od(e,n,o){return o(function(){ld(n)&&sd(e)})}function ld(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Xt(e,o)}catch{return!0}}function sd(e){var n=kn(e,1);n!==null&&nn(n,e,1,-1)}function ad(e){var n=un();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ci,lastRenderedState:e},n.queue=e,e=e.dispatch=Cg.bind(null,Ze,e),[n.memoizedState,e]}function bi(e,n,o,u){return e={tag:e,create:n,destroy:o,deps:u,next:null},n=Ze.updateQueue,n===null?(n={lastEffect:null,stores:null},Ze.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(u=o.next,o.next=e,e.next=u,n.lastEffect=e)),e}function ud(){return qt().memoizedState}function Ao(e,n,o,u){var d=un();Ze.flags|=e,d.memoizedState=bi(1|n,o,void 0,u===void 0?null:u)}function Mo(e,n,o,u){var d=qt();u=u===void 0?null:u;var h=void 0;if(ot!==null){var w=ot.memoizedState;if(h=w.destroy,u!==null&&Ts(u,w.deps)){d.memoizedState=bi(n,o,h,u);return}}Ze.flags|=e,d.memoizedState=bi(1|n,o,h,u)}function cd(e,n){return Ao(8390656,8,e,n)}function Rs(e,n){return Mo(2048,8,e,n)}function dd(e,n){return Mo(4,2,e,n)}function fd(e,n){return Mo(4,4,e,n)}function pd(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function hd(e,n,o){return o=o!=null?o.concat([e]):null,Mo(4,4,pd.bind(null,n,e),o)}function zs(){}function md(e,n){var o=qt();n=n===void 0?null:n;var u=o.memoizedState;return u!==null&&n!==null&&Ts(n,u[1])?u[0]:(o.memoizedState=[e,n],e)}function gd(e,n){var o=qt();n=n===void 0?null:n;var u=o.memoizedState;return u!==null&&n!==null&&Ts(n,u[1])?u[0]:(e=e(),o.memoizedState=[e,n],e)}function yd(e,n,o){return(or&21)===0?(e.baseState&&(e.baseState=!1,Pt=!0),e.memoizedState=o):(Xt(o,n)||(o=Ku(),Ze.lanes|=o,lr|=o,e.baseState=!0),n)}function kg(e,n){var o=Be;Be=o!==0&&4>o?o:4,e(!0);var u=Ps.transition;Ps.transition={};try{e(!1),n()}finally{Be=o,Ps.transition=u}}function xd(){return qt().memoizedState}function Sg(e,n,o){var u=Vn(e);if(o={lane:u,action:o,hasEagerState:!1,eagerState:null,next:null},vd(e))wd(n,o);else if(o=Yc(e,n,o,u),o!==null){var d=Ct();nn(o,e,u,d),kd(o,n,u)}}function Cg(e,n,o){var u=Vn(e),d={lane:u,action:o,hasEagerState:!1,eagerState:null,next:null};if(vd(e))wd(n,d);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var w=n.lastRenderedState,E=h(w,o);if(d.hasEagerState=!0,d.eagerState=E,Xt(E,w)){var P=n.interleaved;P===null?(d.next=d,Ss(n)):(d.next=P.next,P.next=d),n.interleaved=d;return}}catch{}finally{}o=Yc(e,n,d,u),o!==null&&(d=Ct(),nn(o,e,u,d),kd(o,n,u))}}function vd(e){var n=e.alternate;return e===Ze||n!==null&&n===Ze}function wd(e,n){ki=zo=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function kd(e,n,o){if((o&4194240)!==0){var u=n.lanes;u&=e.pendingLanes,o|=u,n.lanes=o,Ml(e,o)}}var Do={readContext:Wt,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},bg={readContext:Wt,useCallback:function(e,n){return un().memoizedState=[e,n===void 0?null:n],e},useContext:Wt,useEffect:cd,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Ao(4194308,4,pd.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Ao(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ao(4,2,e,n)},useMemo:function(e,n){var o=un();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var u=un();return n=o!==void 0?o(n):n,u.memoizedState=u.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},u.queue=e,e=e.dispatch=Sg.bind(null,Ze,e),[u.memoizedState,e]},useRef:function(e){var n=un();return e={current:e},n.memoizedState=e},useState:ad,useDebugValue:zs,useDeferredValue:function(e){return un().memoizedState=e},useTransition:function(){var e=ad(!1),n=e[0];return e=kg.bind(null,e[1]),un().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var u=Ze,d=un();if(Xe){if(o===void 0)throw Error(i(407));o=o()}else{if(o=n(),ct===null)throw Error(i(349));(or&30)!==0||rd(u,n,o)}d.memoizedState=o;var h={value:o,getSnapshot:n};return d.queue=h,cd(od.bind(null,u,h,e),[e]),u.flags|=2048,bi(9,id.bind(null,u,h,o,n),void 0,null),o},useId:function(){var e=un(),n=ct.identifierPrefix;if(Xe){var o=wn,u=vn;o=(u&~(1<<32-Yt(u)-1)).toString(32)+o,n=":"+n+"R"+o,o=Si++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=wg++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Eg={readContext:Wt,useCallback:md,useContext:Wt,useEffect:Rs,useImperativeHandle:hd,useInsertionEffect:dd,useLayoutEffect:fd,useMemo:gd,useReducer:_s,useRef:ud,useState:function(){return _s(Ci)},useDebugValue:zs,useDeferredValue:function(e){var n=qt();return yd(n,ot.memoizedState,e)},useTransition:function(){var e=_s(Ci)[0],n=qt().memoizedState;return[e,n]},useMutableSource:td,useSyncExternalStore:nd,useId:xd,unstable_isNewReconciler:!1},Ng={readContext:Wt,useCallback:md,useContext:Wt,useEffect:Rs,useImperativeHandle:hd,useInsertionEffect:dd,useLayoutEffect:fd,useMemo:gd,useReducer:Os,useRef:ud,useState:function(){return Os(Ci)},useDebugValue:zs,useDeferredValue:function(e){var n=qt();return ot===null?n.memoizedState=e:yd(n,ot.memoizedState,e)},useTransition:function(){var e=Os(Ci)[0],n=qt().memoizedState;return[e,n]},useMutableSource:td,useSyncExternalStore:nd,useId:xd,unstable_isNewReconciler:!1};function Zt(e,n){if(e&&e.defaultProps){n=S({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function As(e,n,o,u){n=e.memoizedState,o=o(u,n),o=o==null?n:S({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var Fo={isMounted:function(e){return(e=e._reactInternals)?Jn(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var u=Ct(),d=Vn(e),h=Sn(u,d);h.payload=n,o!=null&&(h.callback=o),n=Fn(e,h,d),n!==null&&(nn(n,e,d,u),Io(n,e,d))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var u=Ct(),d=Vn(e),h=Sn(u,d);h.tag=1,h.payload=n,o!=null&&(h.callback=o),n=Fn(e,h,d),n!==null&&(nn(n,e,d,u),Io(n,e,d))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=Ct(),u=Vn(e),d=Sn(o,u);d.tag=2,n!=null&&(d.callback=n),n=Fn(e,d,u),n!==null&&(nn(n,e,u,o),Io(n,e,u))}};function Sd(e,n,o,u,d,h,w){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,h,w):n.prototype&&n.prototype.isPureReactComponent?!ci(o,u)||!ci(d,h):!0}function Cd(e,n,o){var u=!1,d=An,h=n.contextType;return typeof h=="object"&&h!==null?h=Wt(h):(d=jt(n)?er:yt.current,u=n.contextTypes,h=(u=u!=null)?Nr(e,d):An),n=new n(o,h),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Fo,e.stateNode=n,n._reactInternals=e,u&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=d,e.__reactInternalMemoizedMaskedChildContext=h),n}function bd(e,n,o,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,u),n.state!==e&&Fo.enqueueReplaceState(n,n.state,null)}function Ms(e,n,o,u){var d=e.stateNode;d.props=o,d.state=e.memoizedState,d.refs={},Cs(e);var h=n.contextType;typeof h=="object"&&h!==null?d.context=Wt(h):(h=jt(n)?er:yt.current,d.context=Nr(e,h)),d.state=e.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(As(e,n,h,o),d.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(n=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),n!==d.state&&Fo.enqueueReplaceState(d,d.state,null),_o(e,o,d,u),d.state=e.memoizedState),typeof d.componentDidMount=="function"&&(e.flags|=4194308)}function Rr(e,n){try{var o="",u=n;do o+=Ee(u),u=u.return;while(u);var d=o}catch(h){d=`
|
|
39
|
+
Error generating stack: `+h.message+`
|
|
40
|
+
`+h.stack}return{value:e,source:n,stack:d,digest:null}}function Ds(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function Fs(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var jg=typeof WeakMap=="function"?WeakMap:Map;function Ed(e,n,o){o=Sn(-1,o),o.tag=3,o.payload={element:null};var u=n.value;return o.callback=function(){qo||(qo=!0,ea=u),Fs(e,n)},o}function Nd(e,n,o){o=Sn(-1,o),o.tag=3;var u=e.type.getDerivedStateFromError;if(typeof u=="function"){var d=n.value;o.payload=function(){return u(d)},o.callback=function(){Fs(e,n)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(o.callback=function(){Fs(e,n),typeof u!="function"&&(Un===null?Un=new Set([this]):Un.add(this));var w=n.stack;this.componentDidCatch(n.value,{componentStack:w!==null?w:""})}),o}function jd(e,n,o){var u=e.pingCache;if(u===null){u=e.pingCache=new jg;var d=new Set;u.set(n,d)}else d=u.get(n),d===void 0&&(d=new Set,u.set(n,d));d.has(o)||(d.add(o),e=Ug.bind(null,e,n,o),n.then(e,e))}function Pd(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Td(e,n,o,u,d){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=Sn(-1,1),n.tag=2,Fn(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=d,e)}var Pg=U.ReactCurrentOwner,Pt=!1;function St(e,n,o,u){n.child=e===null?Gc(n,null,o,u):Lr(n,e.child,o,u)}function Ld(e,n,o,u,d){o=o.render;var h=n.ref;return _r(n,d),u=Ls(e,n,o,u,h,d),o=Is(),e!==null&&!Pt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,Cn(e,n,d)):(Xe&&o&&ps(n),n.flags|=1,St(e,n,u,d),n.child)}function Id(e,n,o,u,d){if(e===null){var h=o.type;return typeof h=="function"&&!sa(h)&&h.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=h,_d(e,n,h,u,d)):(e=Jo(o.type,null,u,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,(e.lanes&d)===0){var w=h.memoizedProps;if(o=o.compare,o=o!==null?o:ci,o(w,u)&&e.ref===n.ref)return Cn(e,n,d)}return n.flags|=1,e=Wn(h,u),e.ref=n.ref,e.return=n,n.child=e}function _d(e,n,o,u,d){if(e!==null){var h=e.memoizedProps;if(ci(h,u)&&e.ref===n.ref)if(Pt=!1,n.pendingProps=u=h,(e.lanes&d)!==0)(e.flags&131072)!==0&&(Pt=!0);else return n.lanes=e.lanes,Cn(e,n,d)}return $s(e,n,o,u,d)}function Od(e,n,o){var u=n.pendingProps,d=u.children,h=e!==null?e.memoizedState:null;if(u.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(Ar,Ft),Ft|=o;else{if((o&1073741824)===0)return e=h!==null?h.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,We(Ar,Ft),Ft|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=h!==null?h.baseLanes:o,We(Ar,Ft),Ft|=u}else h!==null?(u=h.baseLanes|o,n.memoizedState=null):u=o,We(Ar,Ft),Ft|=u;return St(e,n,d,o),n.child}function Rd(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function $s(e,n,o,u,d){var h=jt(o)?er:yt.current;return h=Nr(n,h),_r(n,d),o=Ls(e,n,o,u,h,d),u=Is(),e!==null&&!Pt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,Cn(e,n,d)):(Xe&&u&&ps(n),n.flags|=1,St(e,n,o,d),n.child)}function zd(e,n,o,u,d){if(jt(o)){var h=!0;Co(n)}else h=!1;if(_r(n,d),n.stateNode===null)Uo(e,n),Cd(n,o,u),Ms(n,o,u,d),u=!0;else if(e===null){var w=n.stateNode,E=n.memoizedProps;w.props=E;var P=w.context,M=o.contextType;typeof M=="object"&&M!==null?M=Wt(M):(M=jt(o)?er:yt.current,M=Nr(n,M));var te=o.getDerivedStateFromProps,ne=typeof te=="function"||typeof w.getSnapshotBeforeUpdate=="function";ne||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(E!==u||P!==M)&&bd(n,w,u,M),Dn=!1;var Z=n.memoizedState;w.state=Z,_o(n,u,w,d),P=n.memoizedState,E!==u||Z!==P||Nt.current||Dn?(typeof te=="function"&&(As(n,o,te,u),P=n.memoizedState),(E=Dn||Sd(n,o,E,u,Z,P,M))?(ne||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(n.flags|=4194308)):(typeof w.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=P),w.props=u,w.state=P,w.context=M,u=E):(typeof w.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{w=n.stateNode,Xc(e,n),E=n.memoizedProps,M=n.type===n.elementType?E:Zt(n.type,E),w.props=M,ne=n.pendingProps,Z=w.context,P=o.contextType,typeof P=="object"&&P!==null?P=Wt(P):(P=jt(o)?er:yt.current,P=Nr(n,P));var he=o.getDerivedStateFromProps;(te=typeof he=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(E!==ne||Z!==P)&&bd(n,w,u,P),Dn=!1,Z=n.memoizedState,w.state=Z,_o(n,u,w,d);var ge=n.memoizedState;E!==ne||Z!==ge||Nt.current||Dn?(typeof he=="function"&&(As(n,o,he,u),ge=n.memoizedState),(M=Dn||Sd(n,o,M,u,Z,ge,P)||!1)?(te||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(u,ge,P),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(u,ge,P)),typeof w.componentDidUpdate=="function"&&(n.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof w.componentDidUpdate!="function"||E===e.memoizedProps&&Z===e.memoizedState||(n.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&Z===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=ge),w.props=u,w.state=ge,w.context=P,u=M):(typeof w.componentDidUpdate!="function"||E===e.memoizedProps&&Z===e.memoizedState||(n.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&Z===e.memoizedState||(n.flags|=1024),u=!1)}return Us(e,n,o,u,h,d)}function Us(e,n,o,u,d,h){Rd(e,n);var w=(n.flags&128)!==0;if(!u&&!w)return d&&$c(n,o,!1),Cn(e,n,h);u=n.stateNode,Pg.current=n;var E=w&&typeof o.getDerivedStateFromError!="function"?null:u.render();return n.flags|=1,e!==null&&w?(n.child=Lr(n,e.child,null,h),n.child=Lr(n,null,E,h)):St(e,n,E,h),n.memoizedState=u.state,d&&$c(n,o,!0),n.child}function Ad(e){var n=e.stateNode;n.pendingContext?Dc(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Dc(e,n.context,!1),bs(e,n.containerInfo)}function Md(e,n,o,u,d){return Tr(),ys(d),n.flags|=256,St(e,n,o,u),n.child}var Bs={dehydrated:null,treeContext:null,retryLane:0};function Vs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Dd(e,n,o){var u=n.pendingProps,d=Je.current,h=!1,w=(n.flags&128)!==0,E;if((E=w)||(E=e!==null&&e.memoizedState===null?!1:(d&2)!==0),E?(h=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(d|=1),We(Je,d&1),e===null)return gs(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(w=u.children,e=u.fallback,h?(u=n.mode,h=n.child,w={mode:"hidden",children:w},(u&1)===0&&h!==null?(h.childLanes=0,h.pendingProps=w):h=Zo(w,u,0,null),e=cr(e,u,o,null),h.return=n,e.return=n,h.sibling=e,n.child=h,n.child.memoizedState=Vs(o),n.memoizedState=Bs,e):Hs(n,w));if(d=e.memoizedState,d!==null&&(E=d.dehydrated,E!==null))return Tg(e,n,w,u,E,d,o);if(h){h=u.fallback,w=n.mode,d=e.child,E=d.sibling;var P={mode:"hidden",children:u.children};return(w&1)===0&&n.child!==d?(u=n.child,u.childLanes=0,u.pendingProps=P,n.deletions=null):(u=Wn(d,P),u.subtreeFlags=d.subtreeFlags&14680064),E!==null?h=Wn(E,h):(h=cr(h,w,o,null),h.flags|=2),h.return=n,u.return=n,u.sibling=h,n.child=u,u=h,h=n.child,w=e.child.memoizedState,w=w===null?Vs(o):{baseLanes:w.baseLanes|o,cachePool:null,transitions:w.transitions},h.memoizedState=w,h.childLanes=e.childLanes&~o,n.memoizedState=Bs,u}return h=e.child,e=h.sibling,u=Wn(h,{mode:"visible",children:u.children}),(n.mode&1)===0&&(u.lanes=o),u.return=n,u.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=u,n.memoizedState=null,u}function Hs(e,n){return n=Zo({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function $o(e,n,o,u){return u!==null&&ys(u),Lr(n,e.child,null,o),e=Hs(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Tg(e,n,o,u,d,h,w){if(o)return n.flags&256?(n.flags&=-257,u=Ds(Error(i(422))),$o(e,n,w,u)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(h=u.fallback,d=n.mode,u=Zo({mode:"visible",children:u.children},d,0,null),h=cr(h,d,w,null),h.flags|=2,u.return=n,h.return=n,u.sibling=h,n.child=u,(n.mode&1)!==0&&Lr(n,e.child,null,w),n.child.memoizedState=Vs(w),n.memoizedState=Bs,h);if((n.mode&1)===0)return $o(e,n,w,null);if(d.data==="$!"){if(u=d.nextSibling&&d.nextSibling.dataset,u)var E=u.dgst;return u=E,h=Error(i(419)),u=Ds(h,u,void 0),$o(e,n,w,u)}if(E=(w&e.childLanes)!==0,Pt||E){if(u=ct,u!==null){switch(w&-w){case 4:d=2;break;case 16:d=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:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(u.suspendedLanes|w))!==0?0:d,d!==0&&d!==h.retryLane&&(h.retryLane=d,kn(e,d),nn(u,e,d,-1))}return la(),u=Ds(Error(i(421))),$o(e,n,w,u)}return d.data==="$?"?(n.flags|=128,n.child=e.child,n=Bg.bind(null,e),d._reactRetry=n,null):(e=h.treeContext,Dt=Rn(d.nextSibling),Mt=n,Xe=!0,Jt=null,e!==null&&(Vt[Ht++]=vn,Vt[Ht++]=wn,Vt[Ht++]=tr,vn=e.id,wn=e.overflow,tr=n),n=Hs(n,u.children),n.flags|=4096,n)}function Fd(e,n,o){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),ks(e.return,n,o)}function Ws(e,n,o,u,d){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:d}:(h.isBackwards=n,h.rendering=null,h.renderingStartTime=0,h.last=u,h.tail=o,h.tailMode=d)}function $d(e,n,o){var u=n.pendingProps,d=u.revealOrder,h=u.tail;if(St(e,n,u.children,o),u=Je.current,(u&2)!==0)u=u&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fd(e,o,n);else if(e.tag===19)Fd(e,o,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}u&=1}if(We(Je,u),(n.mode&1)===0)n.memoizedState=null;else switch(d){case"forwards":for(o=n.child,d=null;o!==null;)e=o.alternate,e!==null&&Oo(e)===null&&(d=o),o=o.sibling;o=d,o===null?(d=n.child,n.child=null):(d=o.sibling,o.sibling=null),Ws(n,!1,d,o,h);break;case"backwards":for(o=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&Oo(e)===null){n.child=d;break}e=d.sibling,d.sibling=o,o=d,d=e}Ws(n,!0,o,null,h);break;case"together":Ws(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Uo(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Cn(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),lr|=n.lanes,(o&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,o=Wn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Wn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function Lg(e,n,o){switch(n.tag){case 3:Ad(n),Tr();break;case 5:ed(n);break;case 1:jt(n.type)&&Co(n);break;case 4:bs(n,n.stateNode.containerInfo);break;case 10:var u=n.type._context,d=n.memoizedProps.value;We(To,u._currentValue),u._currentValue=d;break;case 13:if(u=n.memoizedState,u!==null)return u.dehydrated!==null?(We(Je,Je.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?Dd(e,n,o):(We(Je,Je.current&1),e=Cn(e,n,o),e!==null?e.sibling:null);We(Je,Je.current&1);break;case 19:if(u=(o&n.childLanes)!==0,(e.flags&128)!==0){if(u)return $d(e,n,o);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),We(Je,Je.current),u)break;return null;case 22:case 23:return n.lanes=0,Od(e,n,o)}return Cn(e,n,o)}var Ud,qs,Bd,Vd;Ud=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},qs=function(){},Bd=function(e,n,o,u){var d=e.memoizedProps;if(d!==u){e=n.stateNode,ir(an.current);var h=null;switch(o){case"input":d=we(e,d),u=we(e,u),h=[];break;case"select":d=S({},d,{value:void 0}),u=S({},u,{value:void 0}),h=[];break;case"textarea":d=at(e,d),u=at(e,u),h=[];break;default:typeof d.onClick!="function"&&typeof u.onClick=="function"&&(e.onclick=wo)}pt(o,u);var w;o=null;for(M in d)if(!u.hasOwnProperty(M)&&d.hasOwnProperty(M)&&d[M]!=null)if(M==="style"){var E=d[M];for(w in E)E.hasOwnProperty(w)&&(o||(o={}),o[w]="")}else M!=="dangerouslySetInnerHTML"&&M!=="children"&&M!=="suppressContentEditableWarning"&&M!=="suppressHydrationWarning"&&M!=="autoFocus"&&(s.hasOwnProperty(M)?h||(h=[]):(h=h||[]).push(M,null));for(M in u){var P=u[M];if(E=d!=null?d[M]:void 0,u.hasOwnProperty(M)&&P!==E&&(P!=null||E!=null))if(M==="style")if(E){for(w in E)!E.hasOwnProperty(w)||P&&P.hasOwnProperty(w)||(o||(o={}),o[w]="");for(w in P)P.hasOwnProperty(w)&&E[w]!==P[w]&&(o||(o={}),o[w]=P[w])}else o||(h||(h=[]),h.push(M,o)),o=P;else M==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,E=E?E.__html:void 0,P!=null&&E!==P&&(h=h||[]).push(M,P)):M==="children"?typeof P!="string"&&typeof P!="number"||(h=h||[]).push(M,""+P):M!=="suppressContentEditableWarning"&&M!=="suppressHydrationWarning"&&(s.hasOwnProperty(M)?(P!=null&&M==="onScroll"&&Qe("scroll",e),h||E===P||(h=[])):(h=h||[]).push(M,P))}o&&(h=h||[]).push("style",o);var M=h;(n.updateQueue=M)&&(n.flags|=4)}},Vd=function(e,n,o,u){o!==u&&(n.flags|=4)};function Ei(e,n){if(!Xe)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function vt(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,u=0;if(n)for(var d=e.child;d!==null;)o|=d.lanes|d.childLanes,u|=d.subtreeFlags&14680064,u|=d.flags&14680064,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)o|=d.lanes|d.childLanes,u|=d.subtreeFlags,u|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=u,e.childLanes=o,n}function Ig(e,n,o){var u=n.pendingProps;switch(hs(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(n),null;case 1:return jt(n.type)&&So(),vt(n),null;case 3:return u=n.stateNode,Or(),Ge(Nt),Ge(yt),js(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(e===null||e.child===null)&&(jo(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Jt!==null&&(ra(Jt),Jt=null))),qs(e,n),vt(n),null;case 5:Es(n);var d=ir(wi.current);if(o=n.type,e!==null&&n.stateNode!=null)Bd(e,n,o,u,d),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!u){if(n.stateNode===null)throw Error(i(166));return vt(n),null}if(e=ir(an.current),jo(n)){u=n.stateNode,o=n.type;var h=n.memoizedProps;switch(u[sn]=n,u[mi]=h,e=(n.mode&1)!==0,o){case"dialog":Qe("cancel",u),Qe("close",u);break;case"iframe":case"object":case"embed":Qe("load",u);break;case"video":case"audio":for(d=0;d<fi.length;d++)Qe(fi[d],u);break;case"source":Qe("error",u);break;case"img":case"image":case"link":Qe("error",u),Qe("load",u);break;case"details":Qe("toggle",u);break;case"input":ve(u,h),Qe("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!h.multiple},Qe("invalid",u);break;case"textarea":Nn(u,h),Qe("invalid",u)}pt(o,h),d=null;for(var w in h)if(h.hasOwnProperty(w)){var E=h[w];w==="children"?typeof E=="string"?u.textContent!==E&&(h.suppressHydrationWarning!==!0&&vo(u.textContent,E,e),d=["children",E]):typeof E=="number"&&u.textContent!==""+E&&(h.suppressHydrationWarning!==!0&&vo(u.textContent,E,e),d=["children",""+E]):s.hasOwnProperty(w)&&E!=null&&w==="onScroll"&&Qe("scroll",u)}switch(o){case"input":ye(u),$e(u,h,!0);break;case"textarea":ye(u),Xi(u);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(u.onclick=wo)}u=d,n.updateQueue=u,u!==null&&(n.flags|=4)}else{w=d.nodeType===9?d:d.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=q(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=w.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof u.is=="string"?e=w.createElement(o,{is:u.is}):(e=w.createElement(o),o==="select"&&(w=e,u.multiple?w.multiple=!0:u.size&&(w.size=u.size))):e=w.createElementNS(e,o),e[sn]=n,e[mi]=u,Ud(e,n,!1,!1),n.stateNode=e;e:{switch(w=on(o,u),o){case"dialog":Qe("cancel",e),Qe("close",e),d=u;break;case"iframe":case"object":case"embed":Qe("load",e),d=u;break;case"video":case"audio":for(d=0;d<fi.length;d++)Qe(fi[d],e);d=u;break;case"source":Qe("error",e),d=u;break;case"img":case"image":case"link":Qe("error",e),Qe("load",e),d=u;break;case"details":Qe("toggle",e),d=u;break;case"input":ve(e,u),d=we(e,u),Qe("invalid",e);break;case"option":d=u;break;case"select":e._wrapperState={wasMultiple:!!u.multiple},d=S({},u,{value:void 0}),Qe("invalid",e);break;case"textarea":Nn(e,u),d=at(e,u),Qe("invalid",e);break;default:d=u}pt(o,d),E=d;for(h in E)if(E.hasOwnProperty(h)){var P=E[h];h==="style"?jn(e,P):h==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,P!=null&&Re(e,P)):h==="children"?typeof P=="string"?(o!=="textarea"||P!=="")&&Me(e,P):typeof P=="number"&&Me(e,""+P):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(s.hasOwnProperty(h)?P!=null&&h==="onScroll"&&Qe("scroll",e):P!=null&&F(e,h,P,w))}switch(o){case"input":ye(e),$e(e,u,!1);break;case"textarea":ye(e),Xi(e);break;case"option":u.value!=null&&e.setAttribute("value",""+J(u.value));break;case"select":e.multiple=!!u.multiple,h=u.value,h!=null?gt(e,!!u.multiple,h,!1):u.defaultValue!=null&>(e,!!u.multiple,u.defaultValue,!0);break;default:typeof d.onClick=="function"&&(e.onclick=wo)}switch(o){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return vt(n),null;case 6:if(e&&n.stateNode!=null)Vd(e,n,e.memoizedProps,u);else{if(typeof u!="string"&&n.stateNode===null)throw Error(i(166));if(o=ir(wi.current),ir(an.current),jo(n)){if(u=n.stateNode,o=n.memoizedProps,u[sn]=n,(h=u.nodeValue!==o)&&(e=Mt,e!==null))switch(e.tag){case 3:vo(u.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vo(u.nodeValue,o,(e.mode&1)!==0)}h&&(n.flags|=4)}else u=(o.nodeType===9?o:o.ownerDocument).createTextNode(u),u[sn]=n,n.stateNode=u}return vt(n),null;case 13:if(Ge(Je),u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Xe&&Dt!==null&&(n.mode&1)!==0&&(n.flags&128)===0)qc(),Tr(),n.flags|=98560,h=!1;else if(h=jo(n),u!==null&&u.dehydrated!==null){if(e===null){if(!h)throw Error(i(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[sn]=n}else Tr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;vt(n),h=!1}else Jt!==null&&(ra(Jt),Jt=null),h=!0;if(!h)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(u=u!==null,u!==(e!==null&&e.memoizedState!==null)&&u&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Je.current&1)!==0?lt===0&&(lt=3):la())),n.updateQueue!==null&&(n.flags|=4),vt(n),null);case 4:return Or(),qs(e,n),e===null&&pi(n.stateNode.containerInfo),vt(n),null;case 10:return ws(n.type._context),vt(n),null;case 17:return jt(n.type)&&So(),vt(n),null;case 19:if(Ge(Je),h=n.memoizedState,h===null)return vt(n),null;if(u=(n.flags&128)!==0,w=h.rendering,w===null)if(u)Ei(h,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(w=Oo(e),w!==null){for(n.flags|=128,Ei(h,!1),u=w.updateQueue,u!==null&&(n.updateQueue=u,n.flags|=4),n.subtreeFlags=0,u=o,o=n.child;o!==null;)h=o,e=u,h.flags&=14680066,w=h.alternate,w===null?(h.childLanes=0,h.lanes=e,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=w.childLanes,h.lanes=w.lanes,h.child=w.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=w.memoizedProps,h.memoizedState=w.memoizedState,h.updateQueue=w.updateQueue,h.type=w.type,e=w.dependencies,h.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return We(Je,Je.current&1|2),n.child}e=e.sibling}h.tail!==null&&tt()>Mr&&(n.flags|=128,u=!0,Ei(h,!1),n.lanes=4194304)}else{if(!u)if(e=Oo(w),e!==null){if(n.flags|=128,u=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),Ei(h,!0),h.tail===null&&h.tailMode==="hidden"&&!w.alternate&&!Xe)return vt(n),null}else 2*tt()-h.renderingStartTime>Mr&&o!==1073741824&&(n.flags|=128,u=!0,Ei(h,!1),n.lanes=4194304);h.isBackwards?(w.sibling=n.child,n.child=w):(o=h.last,o!==null?o.sibling=w:n.child=w,h.last=w)}return h.tail!==null?(n=h.tail,h.rendering=n,h.tail=n.sibling,h.renderingStartTime=tt(),n.sibling=null,o=Je.current,We(Je,u?o&1|2:o&1),n):(vt(n),null);case 22:case 23:return oa(),u=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==u&&(n.flags|=8192),u&&(n.mode&1)!==0?(Ft&1073741824)!==0&&(vt(n),n.subtreeFlags&6&&(n.flags|=8192)):vt(n),null;case 24:return null;case 25:return null}throw Error(i(156,n.tag))}function _g(e,n){switch(hs(n),n.tag){case 1:return jt(n.type)&&So(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Or(),Ge(Nt),Ge(yt),js(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Es(n),null;case 13:if(Ge(Je),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));Tr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ge(Je),null;case 4:return Or(),null;case 10:return ws(n.type._context),null;case 22:case 23:return oa(),null;case 24:return null;default:return null}}var Bo=!1,wt=!1,Og=typeof WeakSet=="function"?WeakSet:Set,me=null;function zr(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(u){et(e,n,u)}else o.current=null}function Ks(e,n,o){try{o()}catch(u){et(e,n,u)}}var Hd=!1;function Rg(e,n){if(os=so,e=Sc(),Xl(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var d=u.anchorOffset,h=u.focusNode;u=u.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var w=0,E=-1,P=-1,M=0,te=0,ne=e,Z=null;t:for(;;){for(var he;ne!==o||d!==0&&ne.nodeType!==3||(E=w+d),ne!==h||u!==0&&ne.nodeType!==3||(P=w+u),ne.nodeType===3&&(w+=ne.nodeValue.length),(he=ne.firstChild)!==null;)Z=ne,ne=he;for(;;){if(ne===e)break t;if(Z===o&&++M===d&&(E=w),Z===h&&++te===u&&(P=w),(he=ne.nextSibling)!==null)break;ne=Z,Z=ne.parentNode}ne=he}o=E===-1||P===-1?null:{start:E,end:P}}else o=null}o=o||{start:0,end:0}}else o=null;for(ls={focusedElem:e,selectionRange:o},so=!1,me=n;me!==null;)if(n=me,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,me=e;else for(;me!==null;){n=me;try{var ge=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ge!==null){var xe=ge.memoizedProps,nt=ge.memoizedState,O=n.stateNode,L=O.getSnapshotBeforeUpdate(n.elementType===n.type?xe:Zt(n.type,xe),nt);O.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var z=n.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(se){et(n,n.return,se)}if(e=n.sibling,e!==null){e.return=n.return,me=e;break}me=n.return}return ge=Hd,Hd=!1,ge}function Ni(e,n,o){var u=n.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var d=u=u.next;do{if((d.tag&e)===e){var h=d.destroy;d.destroy=void 0,h!==void 0&&Ks(n,o,h)}d=d.next}while(d!==u)}}function Vo(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var u=o.create;o.destroy=u()}o=o.next}while(o!==n)}}function Qs(e){var n=e.ref;if(n!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof n=="function"?n(e):n.current=e}}function Wd(e){var n=e.alternate;n!==null&&(e.alternate=null,Wd(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[sn],delete n[mi],delete n[cs],delete n[gg],delete n[yg])),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 qd(e){return e.tag===5||e.tag===3||e.tag===4}function Kd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qd(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 Gs(e,n,o){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=wo));else if(u!==4&&(e=e.child,e!==null))for(Gs(e,n,o),e=e.sibling;e!==null;)Gs(e,n,o),e=e.sibling}function Ys(e,n,o){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(u!==4&&(e=e.child,e!==null))for(Ys(e,n,o),e=e.sibling;e!==null;)Ys(e,n,o),e=e.sibling}var ht=null,en=!1;function $n(e,n,o){for(o=o.child;o!==null;)Qd(e,n,o),o=o.sibling}function Qd(e,n,o){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(to,o)}catch{}switch(o.tag){case 5:wt||zr(o,n);case 6:var u=ht,d=en;ht=null,$n(e,n,o),ht=u,en=d,ht!==null&&(en?(e=ht,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):ht.removeChild(o.stateNode));break;case 18:ht!==null&&(en?(e=ht,o=o.stateNode,e.nodeType===8?us(e.parentNode,o):e.nodeType===1&&us(e,o),ii(e)):us(ht,o.stateNode));break;case 4:u=ht,d=en,ht=o.stateNode.containerInfo,en=!0,$n(e,n,o),ht=u,en=d;break;case 0:case 11:case 14:case 15:if(!wt&&(u=o.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){d=u=u.next;do{var h=d,w=h.destroy;h=h.tag,w!==void 0&&((h&2)!==0||(h&4)!==0)&&Ks(o,n,w),d=d.next}while(d!==u)}$n(e,n,o);break;case 1:if(!wt&&(zr(o,n),u=o.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=o.memoizedProps,u.state=o.memoizedState,u.componentWillUnmount()}catch(E){et(o,n,E)}$n(e,n,o);break;case 21:$n(e,n,o);break;case 22:o.mode&1?(wt=(u=wt)||o.memoizedState!==null,$n(e,n,o),wt=u):$n(e,n,o);break;default:$n(e,n,o)}}function Gd(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new Og),n.forEach(function(u){var d=Vg.bind(null,e,u);o.has(u)||(o.add(u),u.then(d,d))})}}function tn(e,n){var o=n.deletions;if(o!==null)for(var u=0;u<o.length;u++){var d=o[u];try{var h=e,w=n,E=w;e:for(;E!==null;){switch(E.tag){case 5:ht=E.stateNode,en=!1;break e;case 3:ht=E.stateNode.containerInfo,en=!0;break e;case 4:ht=E.stateNode.containerInfo,en=!0;break e}E=E.return}if(ht===null)throw Error(i(160));Qd(h,w,d),ht=null,en=!1;var P=d.alternate;P!==null&&(P.return=null),d.return=null}catch(M){et(d,n,M)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Yd(n,e),n=n.sibling}function Yd(e,n){var o=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(tn(n,e),cn(e),u&4){try{Ni(3,e,e.return),Vo(3,e)}catch(xe){et(e,e.return,xe)}try{Ni(5,e,e.return)}catch(xe){et(e,e.return,xe)}}break;case 1:tn(n,e),cn(e),u&512&&o!==null&&zr(o,o.return);break;case 5:if(tn(n,e),cn(e),u&512&&o!==null&&zr(o,o.return),e.flags&32){var d=e.stateNode;try{Me(d,"")}catch(xe){et(e,e.return,xe)}}if(u&4&&(d=e.stateNode,d!=null)){var h=e.memoizedProps,w=o!==null?o.memoizedProps:h,E=e.type,P=e.updateQueue;if(e.updateQueue=null,P!==null)try{E==="input"&&h.type==="radio"&&h.name!=null&&Ae(d,h),on(E,w);var M=on(E,h);for(w=0;w<P.length;w+=2){var te=P[w],ne=P[w+1];te==="style"?jn(d,ne):te==="dangerouslySetInnerHTML"?Re(d,ne):te==="children"?Me(d,ne):F(d,te,ne,M)}switch(E){case"input":Ve(d,h);break;case"textarea":Yi(d,h);break;case"select":var Z=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!h.multiple;var he=h.value;he!=null?gt(d,!!h.multiple,he,!1):Z!==!!h.multiple&&(h.defaultValue!=null?gt(d,!!h.multiple,h.defaultValue,!0):gt(d,!!h.multiple,h.multiple?[]:"",!1))}d[mi]=h}catch(xe){et(e,e.return,xe)}}break;case 6:if(tn(n,e),cn(e),u&4){if(e.stateNode===null)throw Error(i(162));d=e.stateNode,h=e.memoizedProps;try{d.nodeValue=h}catch(xe){et(e,e.return,xe)}}break;case 3:if(tn(n,e),cn(e),u&4&&o!==null&&o.memoizedState.isDehydrated)try{ii(n.containerInfo)}catch(xe){et(e,e.return,xe)}break;case 4:tn(n,e),cn(e);break;case 13:tn(n,e),cn(e),d=e.child,d.flags&8192&&(h=d.memoizedState!==null,d.stateNode.isHidden=h,!h||d.alternate!==null&&d.alternate.memoizedState!==null||(Zs=tt())),u&4&&Gd(e);break;case 22:if(te=o!==null&&o.memoizedState!==null,e.mode&1?(wt=(M=wt)||te,tn(n,e),wt=M):tn(n,e),cn(e),u&8192){if(M=e.memoizedState!==null,(e.stateNode.isHidden=M)&&!te&&(e.mode&1)!==0)for(me=e,te=e.child;te!==null;){for(ne=me=te;me!==null;){switch(Z=me,he=Z.child,Z.tag){case 0:case 11:case 14:case 15:Ni(4,Z,Z.return);break;case 1:zr(Z,Z.return);var ge=Z.stateNode;if(typeof ge.componentWillUnmount=="function"){u=Z,o=Z.return;try{n=u,ge.props=n.memoizedProps,ge.state=n.memoizedState,ge.componentWillUnmount()}catch(xe){et(u,o,xe)}}break;case 5:zr(Z,Z.return);break;case 22:if(Z.memoizedState!==null){Zd(ne);continue}}he!==null?(he.return=Z,me=he):Zd(ne)}te=te.sibling}e:for(te=null,ne=e;;){if(ne.tag===5){if(te===null){te=ne;try{d=ne.stateNode,M?(h=d.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(E=ne.stateNode,P=ne.memoizedProps.style,w=P!=null&&P.hasOwnProperty("display")?P.display:null,E.style.display=Bt("display",w))}catch(xe){et(e,e.return,xe)}}}else if(ne.tag===6){if(te===null)try{ne.stateNode.nodeValue=M?"":ne.memoizedProps}catch(xe){et(e,e.return,xe)}}else if((ne.tag!==22&&ne.tag!==23||ne.memoizedState===null||ne===e)&&ne.child!==null){ne.child.return=ne,ne=ne.child;continue}if(ne===e)break e;for(;ne.sibling===null;){if(ne.return===null||ne.return===e)break e;te===ne&&(te=null),ne=ne.return}te===ne&&(te=null),ne.sibling.return=ne.return,ne=ne.sibling}}break;case 19:tn(n,e),cn(e),u&4&&Gd(e);break;case 21:break;default:tn(n,e),cn(e)}}function cn(e){var n=e.flags;if(n&2){try{e:{for(var o=e.return;o!==null;){if(qd(o)){var u=o;break e}o=o.return}throw Error(i(160))}switch(u.tag){case 5:var d=u.stateNode;u.flags&32&&(Me(d,""),u.flags&=-33);var h=Kd(e);Ys(e,h,d);break;case 3:case 4:var w=u.stateNode.containerInfo,E=Kd(e);Gs(e,E,w);break;default:throw Error(i(161))}}catch(P){et(e,e.return,P)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function zg(e,n,o){me=e,Xd(e)}function Xd(e,n,o){for(var u=(e.mode&1)!==0;me!==null;){var d=me,h=d.child;if(d.tag===22&&u){var w=d.memoizedState!==null||Bo;if(!w){var E=d.alternate,P=E!==null&&E.memoizedState!==null||wt;E=Bo;var M=wt;if(Bo=w,(wt=P)&&!M)for(me=d;me!==null;)w=me,P=w.child,w.tag===22&&w.memoizedState!==null?ef(d):P!==null?(P.return=w,me=P):ef(d);for(;h!==null;)me=h,Xd(h),h=h.sibling;me=d,Bo=E,wt=M}Jd(e)}else(d.subtreeFlags&8772)!==0&&h!==null?(h.return=d,me=h):Jd(e)}}function Jd(e){for(;me!==null;){var n=me;if((n.flags&8772)!==0){var o=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:wt||Vo(5,n);break;case 1:var u=n.stateNode;if(n.flags&4&&!wt)if(o===null)u.componentDidMount();else{var d=n.elementType===n.type?o.memoizedProps:Zt(n.type,o.memoizedProps);u.componentDidUpdate(d,o.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var h=n.updateQueue;h!==null&&Zc(n,h,u);break;case 3:var w=n.updateQueue;if(w!==null){if(o=null,n.child!==null)switch(n.child.tag){case 5:o=n.child.stateNode;break;case 1:o=n.child.stateNode}Zc(n,w,o)}break;case 5:var E=n.stateNode;if(o===null&&n.flags&4){o=E;var P=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":P.autoFocus&&o.focus();break;case"img":P.src&&(o.src=P.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var M=n.alternate;if(M!==null){var te=M.memoizedState;if(te!==null){var ne=te.dehydrated;ne!==null&&ii(ne)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}wt||n.flags&512&&Qs(n)}catch(Z){et(n,n.return,Z)}}if(n===e){me=null;break}if(o=n.sibling,o!==null){o.return=n.return,me=o;break}me=n.return}}function Zd(e){for(;me!==null;){var n=me;if(n===e){me=null;break}var o=n.sibling;if(o!==null){o.return=n.return,me=o;break}me=n.return}}function ef(e){for(;me!==null;){var n=me;try{switch(n.tag){case 0:case 11:case 15:var o=n.return;try{Vo(4,n)}catch(P){et(n,o,P)}break;case 1:var u=n.stateNode;if(typeof u.componentDidMount=="function"){var d=n.return;try{u.componentDidMount()}catch(P){et(n,d,P)}}var h=n.return;try{Qs(n)}catch(P){et(n,h,P)}break;case 5:var w=n.return;try{Qs(n)}catch(P){et(n,w,P)}}}catch(P){et(n,n.return,P)}if(n===e){me=null;break}var E=n.sibling;if(E!==null){E.return=n.return,me=E;break}me=n.return}}var Ag=Math.ceil,Ho=U.ReactCurrentDispatcher,Xs=U.ReactCurrentOwner,Kt=U.ReactCurrentBatchConfig,De=0,ct=null,rt=null,mt=0,Ft=0,Ar=zn(0),lt=0,ji=null,lr=0,Wo=0,Js=0,Pi=null,Tt=null,Zs=0,Mr=1/0,bn=null,qo=!1,ea=null,Un=null,Ko=!1,Bn=null,Qo=0,Ti=0,ta=null,Go=-1,Yo=0;function Ct(){return(De&6)!==0?tt():Go!==-1?Go:Go=tt()}function Vn(e){return(e.mode&1)===0?1:(De&2)!==0&&mt!==0?mt&-mt:vg.transition!==null?(Yo===0&&(Yo=Ku()),Yo):(e=Be,e!==0||(e=window.event,e=e===void 0?16:nc(e.type)),e)}function nn(e,n,o,u){if(50<Ti)throw Ti=0,ta=null,Error(i(185));Zr(e,o,u),((De&2)===0||e!==ct)&&(e===ct&&((De&2)===0&&(Wo|=o),lt===4&&Hn(e,mt)),Lt(e,u),o===1&&De===0&&(n.mode&1)===0&&(Mr=tt()+500,bo&&Mn()))}function Lt(e,n){var o=e.callbackNode;vm(e,n);var u=io(e,e===ct?mt:0);if(u===0)o!==null&&Hu(o),e.callbackNode=null,e.callbackPriority=0;else if(n=u&-u,e.callbackPriority!==n){if(o!=null&&Hu(o),n===1)e.tag===0?xg(nf.bind(null,e)):Uc(nf.bind(null,e)),hg(function(){(De&6)===0&&Mn()}),o=null;else{switch(Qu(u)){case 1:o=Rl;break;case 4:o=Wu;break;case 16:o=eo;break;case 536870912:o=qu;break;default:o=eo}o=df(o,tf.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function tf(e,n){if(Go=-1,Yo=0,(De&6)!==0)throw Error(i(327));var o=e.callbackNode;if(Dr()&&e.callbackNode!==o)return null;var u=io(e,e===ct?mt:0);if(u===0)return null;if((u&30)!==0||(u&e.expiredLanes)!==0||n)n=Xo(e,u);else{n=u;var d=De;De|=2;var h=of();(ct!==e||mt!==n)&&(bn=null,Mr=tt()+500,ar(e,n));do try{Fg();break}catch(E){rf(e,E)}while(!0);vs(),Ho.current=h,De=d,rt!==null?n=0:(ct=null,mt=0,n=lt)}if(n!==0){if(n===2&&(d=zl(e),d!==0&&(u=d,n=na(e,d))),n===1)throw o=ji,ar(e,0),Hn(e,u),Lt(e,tt()),o;if(n===6)Hn(e,u);else{if(d=e.current.alternate,(u&30)===0&&!Mg(d)&&(n=Xo(e,u),n===2&&(h=zl(e),h!==0&&(u=h,n=na(e,h))),n===1))throw o=ji,ar(e,0),Hn(e,u),Lt(e,tt()),o;switch(e.finishedWork=d,e.finishedLanes=u,n){case 0:case 1:throw Error(i(345));case 2:ur(e,Tt,bn);break;case 3:if(Hn(e,u),(u&130023424)===u&&(n=Zs+500-tt(),10<n)){if(io(e,0)!==0)break;if(d=e.suspendedLanes,(d&u)!==u){Ct(),e.pingedLanes|=e.suspendedLanes&d;break}e.timeoutHandle=as(ur.bind(null,e,Tt,bn),n);break}ur(e,Tt,bn);break;case 4:if(Hn(e,u),(u&4194240)===u)break;for(n=e.eventTimes,d=-1;0<u;){var w=31-Yt(u);h=1<<w,w=n[w],w>d&&(d=w),u&=~h}if(u=d,u=tt()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*Ag(u/1960))-u,10<u){e.timeoutHandle=as(ur.bind(null,e,Tt,bn),u);break}ur(e,Tt,bn);break;case 5:ur(e,Tt,bn);break;default:throw Error(i(329))}}}return Lt(e,tt()),e.callbackNode===o?tf.bind(null,e):null}function na(e,n){var o=Pi;return e.current.memoizedState.isDehydrated&&(ar(e,n).flags|=256),e=Xo(e,n),e!==2&&(n=Tt,Tt=o,n!==null&&ra(n)),e}function ra(e){Tt===null?Tt=e:Tt.push.apply(Tt,e)}function Mg(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var u=0;u<o.length;u++){var d=o[u],h=d.getSnapshot;d=d.value;try{if(!Xt(h(),d))return!1}catch{return!1}}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Hn(e,n){for(n&=~Js,n&=~Wo,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-Yt(n),u=1<<o;e[o]=-1,n&=~u}}function nf(e){if((De&6)!==0)throw Error(i(327));Dr();var n=io(e,0);if((n&1)===0)return Lt(e,tt()),null;var o=Xo(e,n);if(e.tag!==0&&o===2){var u=zl(e);u!==0&&(n=u,o=na(e,u))}if(o===1)throw o=ji,ar(e,0),Hn(e,n),Lt(e,tt()),o;if(o===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,ur(e,Tt,bn),Lt(e,tt()),null}function ia(e,n){var o=De;De|=1;try{return e(n)}finally{De=o,De===0&&(Mr=tt()+500,bo&&Mn())}}function sr(e){Bn!==null&&Bn.tag===0&&(De&6)===0&&Dr();var n=De;De|=1;var o=Kt.transition,u=Be;try{if(Kt.transition=null,Be=1,e)return e()}finally{Be=u,Kt.transition=o,De=n,(De&6)===0&&Mn()}}function oa(){Ft=Ar.current,Ge(Ar)}function ar(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,pg(o)),rt!==null)for(o=rt.return;o!==null;){var u=o;switch(hs(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&So();break;case 3:Or(),Ge(Nt),Ge(yt),js();break;case 5:Es(u);break;case 4:Or();break;case 13:Ge(Je);break;case 19:Ge(Je);break;case 10:ws(u.type._context);break;case 22:case 23:oa()}o=o.return}if(ct=e,rt=e=Wn(e.current,null),mt=Ft=n,lt=0,ji=null,Js=Wo=lr=0,Tt=Pi=null,rr!==null){for(n=0;n<rr.length;n++)if(o=rr[n],u=o.interleaved,u!==null){o.interleaved=null;var d=u.next,h=o.pending;if(h!==null){var w=h.next;h.next=d,u.next=w}o.pending=u}rr=null}return e}function rf(e,n){do{var o=rt;try{if(vs(),Ro.current=Do,zo){for(var u=Ze.memoizedState;u!==null;){var d=u.queue;d!==null&&(d.pending=null),u=u.next}zo=!1}if(or=0,ut=ot=Ze=null,ki=!1,Si=0,Xs.current=null,o===null||o.return===null){lt=1,ji=n,rt=null;break}e:{var h=e,w=o.return,E=o,P=n;if(n=mt,E.flags|=32768,P!==null&&typeof P=="object"&&typeof P.then=="function"){var M=P,te=E,ne=te.tag;if((te.mode&1)===0&&(ne===0||ne===11||ne===15)){var Z=te.alternate;Z?(te.updateQueue=Z.updateQueue,te.memoizedState=Z.memoizedState,te.lanes=Z.lanes):(te.updateQueue=null,te.memoizedState=null)}var he=Pd(w);if(he!==null){he.flags&=-257,Td(he,w,E,h,n),he.mode&1&&jd(h,M,n),n=he,P=M;var ge=n.updateQueue;if(ge===null){var xe=new Set;xe.add(P),n.updateQueue=xe}else ge.add(P);break e}else{if((n&1)===0){jd(h,M,n),la();break e}P=Error(i(426))}}else if(Xe&&E.mode&1){var nt=Pd(w);if(nt!==null){(nt.flags&65536)===0&&(nt.flags|=256),Td(nt,w,E,h,n),ys(Rr(P,E));break e}}h=P=Rr(P,E),lt!==4&&(lt=2),Pi===null?Pi=[h]:Pi.push(h),h=w;do{switch(h.tag){case 3:h.flags|=65536,n&=-n,h.lanes|=n;var O=Ed(h,P,n);Jc(h,O);break e;case 1:E=P;var L=h.type,z=h.stateNode;if((h.flags&128)===0&&(typeof L.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(Un===null||!Un.has(z)))){h.flags|=65536,n&=-n,h.lanes|=n;var se=Nd(h,E,n);Jc(h,se);break e}}h=h.return}while(h!==null)}sf(o)}catch(ke){n=ke,rt===o&&o!==null&&(rt=o=o.return);continue}break}while(!0)}function of(){var e=Ho.current;return Ho.current=Do,e===null?Do:e}function la(){(lt===0||lt===3||lt===2)&&(lt=4),ct===null||(lr&268435455)===0&&(Wo&268435455)===0||Hn(ct,mt)}function Xo(e,n){var o=De;De|=2;var u=of();(ct!==e||mt!==n)&&(bn=null,ar(e,n));do try{Dg();break}catch(d){rf(e,d)}while(!0);if(vs(),De=o,Ho.current=u,rt!==null)throw Error(i(261));return ct=null,mt=0,lt}function Dg(){for(;rt!==null;)lf(rt)}function Fg(){for(;rt!==null&&!cm();)lf(rt)}function lf(e){var n=cf(e.alternate,e,Ft);e.memoizedProps=e.pendingProps,n===null?sf(e):rt=n,Xs.current=null}function sf(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=Ig(o,n,Ft),o!==null){rt=o;return}}else{if(o=_g(o,n),o!==null){o.flags&=32767,rt=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{lt=6,rt=null;return}}if(n=n.sibling,n!==null){rt=n;return}rt=n=e}while(n!==null);lt===0&&(lt=5)}function ur(e,n,o){var u=Be,d=Kt.transition;try{Kt.transition=null,Be=1,$g(e,n,o,u)}finally{Kt.transition=d,Be=u}return null}function $g(e,n,o,u){do Dr();while(Bn!==null);if((De&6)!==0)throw Error(i(327));o=e.finishedWork;var d=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var h=o.lanes|o.childLanes;if(wm(e,h),e===ct&&(rt=ct=null,mt=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Ko||(Ko=!0,df(eo,function(){return Dr(),null})),h=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||h){h=Kt.transition,Kt.transition=null;var w=Be;Be=1;var E=De;De|=4,Xs.current=null,Rg(e,o),Yd(o,e),lg(ls),so=!!os,ls=os=null,e.current=o,zg(o),dm(),De=E,Be=w,Kt.transition=h}else e.current=o;if(Ko&&(Ko=!1,Bn=e,Qo=d),h=e.pendingLanes,h===0&&(Un=null),hm(o.stateNode),Lt(e,tt()),n!==null)for(u=e.onRecoverableError,o=0;o<n.length;o++)d=n[o],u(d.value,{componentStack:d.stack,digest:d.digest});if(qo)throw qo=!1,e=ea,ea=null,e;return(Qo&1)!==0&&e.tag!==0&&Dr(),h=e.pendingLanes,(h&1)!==0?e===ta?Ti++:(Ti=0,ta=e):Ti=0,Mn(),null}function Dr(){if(Bn!==null){var e=Qu(Qo),n=Kt.transition,o=Be;try{if(Kt.transition=null,Be=16>e?16:e,Bn===null)var u=!1;else{if(e=Bn,Bn=null,Qo=0,(De&6)!==0)throw Error(i(331));var d=De;for(De|=4,me=e.current;me!==null;){var h=me,w=h.child;if((me.flags&16)!==0){var E=h.deletions;if(E!==null){for(var P=0;P<E.length;P++){var M=E[P];for(me=M;me!==null;){var te=me;switch(te.tag){case 0:case 11:case 15:Ni(8,te,h)}var ne=te.child;if(ne!==null)ne.return=te,me=ne;else for(;me!==null;){te=me;var Z=te.sibling,he=te.return;if(Wd(te),te===M){me=null;break}if(Z!==null){Z.return=he,me=Z;break}me=he}}}var ge=h.alternate;if(ge!==null){var xe=ge.child;if(xe!==null){ge.child=null;do{var nt=xe.sibling;xe.sibling=null,xe=nt}while(xe!==null)}}me=h}}if((h.subtreeFlags&2064)!==0&&w!==null)w.return=h,me=w;else e:for(;me!==null;){if(h=me,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:Ni(9,h,h.return)}var O=h.sibling;if(O!==null){O.return=h.return,me=O;break e}me=h.return}}var L=e.current;for(me=L;me!==null;){w=me;var z=w.child;if((w.subtreeFlags&2064)!==0&&z!==null)z.return=w,me=z;else e:for(w=L;me!==null;){if(E=me,(E.flags&2048)!==0)try{switch(E.tag){case 0:case 11:case 15:Vo(9,E)}}catch(ke){et(E,E.return,ke)}if(E===w){me=null;break e}var se=E.sibling;if(se!==null){se.return=E.return,me=se;break e}me=E.return}}if(De=d,Mn(),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(to,e)}catch{}u=!0}return u}finally{Be=o,Kt.transition=n}}return!1}function af(e,n,o){n=Rr(o,n),n=Ed(e,n,1),e=Fn(e,n,1),n=Ct(),e!==null&&(Zr(e,1,n),Lt(e,n))}function et(e,n,o){if(e.tag===3)af(e,e,o);else for(;n!==null;){if(n.tag===3){af(n,e,o);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Un===null||!Un.has(u))){e=Rr(o,e),e=Nd(n,e,1),n=Fn(n,e,1),e=Ct(),n!==null&&(Zr(n,1,e),Lt(n,e));break}}n=n.return}}function Ug(e,n,o){var u=e.pingCache;u!==null&&u.delete(n),n=Ct(),e.pingedLanes|=e.suspendedLanes&o,ct===e&&(mt&o)===o&&(lt===4||lt===3&&(mt&130023424)===mt&&500>tt()-Zs?ar(e,0):Js|=o),Lt(e,n)}function uf(e,n){n===0&&((e.mode&1)===0?n=1:(n=ro,ro<<=1,(ro&130023424)===0&&(ro=4194304)));var o=Ct();e=kn(e,n),e!==null&&(Zr(e,n,o),Lt(e,o))}function Bg(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),uf(e,o)}function Vg(e,n){var o=0;switch(e.tag){case 13:var u=e.stateNode,d=e.memoizedState;d!==null&&(o=d.retryLane);break;case 19:u=e.stateNode;break;default:throw Error(i(314))}u!==null&&u.delete(n),uf(e,o)}var cf;cf=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||Nt.current)Pt=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return Pt=!1,Lg(e,n,o);Pt=(e.flags&131072)!==0}else Pt=!1,Xe&&(n.flags&1048576)!==0&&Bc(n,No,n.index);switch(n.lanes=0,n.tag){case 2:var u=n.type;Uo(e,n),e=n.pendingProps;var d=Nr(n,yt.current);_r(n,o),d=Ls(null,n,u,e,d,o);var h=Is();return n.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,jt(u)?(h=!0,Co(n)):h=!1,n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Cs(n),d.updater=Fo,n.stateNode=d,d._reactInternals=n,Ms(n,u,e,o),n=Us(null,n,u,!0,h,o)):(n.tag=0,Xe&&h&&ps(n),St(null,n,d,o),n=n.child),n;case 16:u=n.elementType;e:{switch(Uo(e,n),e=n.pendingProps,d=u._init,u=d(u._payload),n.type=u,d=n.tag=Wg(u),e=Zt(u,e),d){case 0:n=$s(null,n,u,e,o);break e;case 1:n=zd(null,n,u,e,o);break e;case 11:n=Ld(null,n,u,e,o);break e;case 14:n=Id(null,n,u,Zt(u.type,e),o);break e}throw Error(i(306,u,""))}return n;case 0:return u=n.type,d=n.pendingProps,d=n.elementType===u?d:Zt(u,d),$s(e,n,u,d,o);case 1:return u=n.type,d=n.pendingProps,d=n.elementType===u?d:Zt(u,d),zd(e,n,u,d,o);case 3:e:{if(Ad(n),e===null)throw Error(i(387));u=n.pendingProps,h=n.memoizedState,d=h.element,Xc(e,n),_o(n,u,null,o);var w=n.memoizedState;if(u=w.element,h.isDehydrated)if(h={element:u,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){d=Rr(Error(i(423)),n),n=Md(e,n,u,o,d);break e}else if(u!==d){d=Rr(Error(i(424)),n),n=Md(e,n,u,o,d);break e}else for(Dt=Rn(n.stateNode.containerInfo.firstChild),Mt=n,Xe=!0,Jt=null,o=Gc(n,null,u,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Tr(),u===d){n=Cn(e,n,o);break e}St(e,n,u,o)}n=n.child}return n;case 5:return ed(n),e===null&&gs(n),u=n.type,d=n.pendingProps,h=e!==null?e.memoizedProps:null,w=d.children,ss(u,d)?w=null:h!==null&&ss(u,h)&&(n.flags|=32),Rd(e,n),St(e,n,w,o),n.child;case 6:return e===null&&gs(n),null;case 13:return Dd(e,n,o);case 4:return bs(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=Lr(n,null,u,o):St(e,n,u,o),n.child;case 11:return u=n.type,d=n.pendingProps,d=n.elementType===u?d:Zt(u,d),Ld(e,n,u,d,o);case 7:return St(e,n,n.pendingProps,o),n.child;case 8:return St(e,n,n.pendingProps.children,o),n.child;case 12:return St(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(u=n.type._context,d=n.pendingProps,h=n.memoizedProps,w=d.value,We(To,u._currentValue),u._currentValue=w,h!==null)if(Xt(h.value,w)){if(h.children===d.children&&!Nt.current){n=Cn(e,n,o);break e}}else for(h=n.child,h!==null&&(h.return=n);h!==null;){var E=h.dependencies;if(E!==null){w=h.child;for(var P=E.firstContext;P!==null;){if(P.context===u){if(h.tag===1){P=Sn(-1,o&-o),P.tag=2;var M=h.updateQueue;if(M!==null){M=M.shared;var te=M.pending;te===null?P.next=P:(P.next=te.next,te.next=P),M.pending=P}}h.lanes|=o,P=h.alternate,P!==null&&(P.lanes|=o),ks(h.return,o,n),E.lanes|=o;break}P=P.next}}else if(h.tag===10)w=h.type===n.type?null:h.child;else if(h.tag===18){if(w=h.return,w===null)throw Error(i(341));w.lanes|=o,E=w.alternate,E!==null&&(E.lanes|=o),ks(w,o,n),w=h.sibling}else w=h.child;if(w!==null)w.return=h;else for(w=h;w!==null;){if(w===n){w=null;break}if(h=w.sibling,h!==null){h.return=w.return,w=h;break}w=w.return}h=w}St(e,n,d.children,o),n=n.child}return n;case 9:return d=n.type,u=n.pendingProps.children,_r(n,o),d=Wt(d),u=u(d),n.flags|=1,St(e,n,u,o),n.child;case 14:return u=n.type,d=Zt(u,n.pendingProps),d=Zt(u.type,d),Id(e,n,u,d,o);case 15:return _d(e,n,n.type,n.pendingProps,o);case 17:return u=n.type,d=n.pendingProps,d=n.elementType===u?d:Zt(u,d),Uo(e,n),n.tag=1,jt(u)?(e=!0,Co(n)):e=!1,_r(n,o),Cd(n,u,d),Ms(n,u,d,o),Us(null,n,u,!0,e,o);case 19:return $d(e,n,o);case 22:return Od(e,n,o)}throw Error(i(156,n.tag))};function df(e,n){return Vu(e,n)}function Hg(e,n,o,u){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,n,o,u){return new Hg(e,n,o,u)}function sa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wg(e){if(typeof e=="function")return sa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===D)return 11;if(e===Q)return 14}return 2}function Wn(e,n){var o=e.alternate;return o===null?(o=Qt(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Jo(e,n,o,u,d,h){var w=2;if(u=e,typeof e=="function")sa(e)&&(w=1);else if(typeof e=="string")w=5;else e:switch(e){case W:return cr(o.children,d,h,n);case A:w=8,d|=8;break;case K:return e=Qt(12,o,n,d|2),e.elementType=K,e.lanes=h,e;case re:return e=Qt(13,o,n,d),e.elementType=re,e.lanes=h,e;case Y:return e=Qt(19,o,n,d),e.elementType=Y,e.lanes=h,e;case fe:return Zo(o,d,h,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case X:w=10;break e;case le:w=9;break e;case D:w=11;break e;case Q:w=14;break e;case de:w=16,u=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return n=Qt(w,o,n,d),n.elementType=e,n.type=u,n.lanes=h,n}function cr(e,n,o,u){return e=Qt(7,e,u,n),e.lanes=o,e}function Zo(e,n,o,u){return e=Qt(22,e,u,n),e.elementType=fe,e.lanes=o,e.stateNode={isHidden:!1},e}function aa(e,n,o){return e=Qt(6,e,null,n),e.lanes=o,e}function ua(e,n,o){return n=Qt(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function qg(e,n,o,u,d){this.tag=n,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=Al(0),this.expirationTimes=Al(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Al(0),this.identifierPrefix=u,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function ca(e,n,o,u,d,h,w,E,P){return e=new qg(e,n,o,E,P),n===1?(n=1,h===!0&&(n|=8)):n=0,h=Qt(3,null,null,n),e.current=h,h.stateNode=e,h.memoizedState={element:u,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cs(h),e}function Kg(e,n,o){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:u==null?null:""+u,children:e,containerInfo:n,implementation:o}}function ff(e){if(!e)return An;e=e._reactInternals;e:{if(Jn(e)!==e||e.tag!==1)throw Error(i(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(jt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(i(171))}if(e.tag===1){var o=e.type;if(jt(o))return Fc(e,o,n)}return n}function pf(e,n,o,u,d,h,w,E,P){return e=ca(o,u,!0,e,d,h,w,E,P),e.context=ff(null),o=e.current,u=Ct(),d=Vn(o),h=Sn(u,d),h.callback=n??null,Fn(o,h,d),e.current.lanes=d,Zr(e,d,u),Lt(e,u),e}function el(e,n,o,u){var d=n.current,h=Ct(),w=Vn(d);return o=ff(o),n.context===null?n.context=o:n.pendingContext=o,n=Sn(h,w),n.payload={element:e},u=u===void 0?null:u,u!==null&&(n.callback=u),e=Fn(d,n,w),e!==null&&(nn(e,d,w,h),Io(e,d,w)),w}function tl(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 hf(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function da(e,n){hf(e,n),(e=e.alternate)&&hf(e,n)}function Qg(){return null}var mf=typeof reportError=="function"?reportError:function(e){console.error(e)};function fa(e){this._internalRoot=e}nl.prototype.render=fa.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));el(e,n,null,null)},nl.prototype.unmount=fa.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;sr(function(){el(null,e,null,null)}),n[yn]=null}};function nl(e){this._internalRoot=e}nl.prototype.unstable_scheduleHydration=function(e){if(e){var n=Xu();e={blockedOn:null,target:e,priority:n};for(var o=0;o<In.length&&n!==0&&n<In[o].priority;o++);In.splice(o,0,e),o===0&&ec(e)}};function pa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function rl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function gf(){}function Gg(e,n,o,u,d){if(d){if(typeof u=="function"){var h=u;u=function(){var M=tl(w);h.call(M)}}var w=pf(n,u,e,0,null,!1,!1,"",gf);return e._reactRootContainer=w,e[yn]=w.current,pi(e.nodeType===8?e.parentNode:e),sr(),w}for(;d=e.lastChild;)e.removeChild(d);if(typeof u=="function"){var E=u;u=function(){var M=tl(P);E.call(M)}}var P=ca(e,0,!1,null,null,!1,!1,"",gf);return e._reactRootContainer=P,e[yn]=P.current,pi(e.nodeType===8?e.parentNode:e),sr(function(){el(n,P,o,u)}),P}function il(e,n,o,u,d){var h=o._reactRootContainer;if(h){var w=h;if(typeof d=="function"){var E=d;d=function(){var P=tl(w);E.call(P)}}el(n,w,e,d)}else w=Gg(o,n,e,d,u);return tl(w)}Gu=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var o=Jr(n.pendingLanes);o!==0&&(Ml(n,o|1),Lt(n,tt()),(De&6)===0&&(Mr=tt()+500,Mn()))}break;case 13:sr(function(){var u=kn(e,1);if(u!==null){var d=Ct();nn(u,e,1,d)}}),da(e,1)}},Dl=function(e){if(e.tag===13){var n=kn(e,134217728);if(n!==null){var o=Ct();nn(n,e,134217728,o)}da(e,134217728)}},Yu=function(e){if(e.tag===13){var n=Vn(e),o=kn(e,n);if(o!==null){var u=Ct();nn(o,e,n,u)}da(e,n)}},Xu=function(){return Be},Ju=function(e,n){var o=Be;try{return Be=e,n()}finally{Be=o}},Ll=function(e,n,o){switch(n){case"input":if(Ve(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var u=o[n];if(u!==e&&u.form===e.form){var d=ko(u);if(!d)throw Error(i(90));Le(u),Ve(u,d)}}}break;case"textarea":Yi(e,o);break;case"select":n=o.value,n!=null&>(e,!!o.multiple,n,!1)}},Au=ia,Mu=sr;var Yg={usingClientEntryPoint:!1,Events:[gi,br,ko,Ru,zu,ia]},Li={findFiberByHostInstance:Zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Xg={bundleType:Li.bundleType,version:Li.version,rendererPackageName:Li.rendererPackageName,rendererConfig:Li.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Uu(e),e===null?null:e.stateNode},findFiberByHostInstance:Li.findFiberByHostInstance||Qg,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 ol=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ol.isDisabled&&ol.supportsFiber)try{to=ol.inject(Xg),ln=ol}catch{}}return It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Yg,It.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!pa(n))throw Error(i(200));return Kg(e,n,null,o)},It.createRoot=function(e,n){if(!pa(e))throw Error(i(299));var o=!1,u="",d=mf;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(d=n.onRecoverableError)),n=ca(e,1,!1,null,null,o,!1,u,d),e[yn]=n.current,pi(e.nodeType===8?e.parentNode:e),new fa(n)},It.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=Uu(n),e=e===null?null:e.stateNode,e},It.flushSync=function(e){return sr(e)},It.hydrate=function(e,n,o){if(!rl(n))throw Error(i(200));return il(null,e,n,!0,o)},It.hydrateRoot=function(e,n,o){if(!pa(e))throw Error(i(405));var u=o!=null&&o.hydratedSources||null,d=!1,h="",w=mf;if(o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(w=o.onRecoverableError)),n=pf(n,null,e,1,o??null,d,!1,h,w),e[yn]=n.current,pi(e),u)for(e=0;e<u.length;e++)o=u[e],d=o._getVersion,d=d(o._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[o,d]:n.mutableSourceEagerHydrationData.push(o,d);return new nl(n)},It.render=function(e,n,o){if(!rl(n))throw Error(i(200));return il(null,e,n,!1,o)},It.unmountComponentAtNode=function(e){if(!rl(e))throw Error(i(40));return e._reactRootContainer?(sr(function(){il(null,null,e,!1,function(){e._reactRootContainer=null,e[yn]=null})}),!0):!1},It.unstable_batchedUpdates=ia,It.unstable_renderSubtreeIntoContainer=function(e,n,o,u){if(!rl(o))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return il(e,n,o,!1,u)},It.version="18.3.1-next-f1338f8080-20240426",It}var bf;function ly(){if(bf)return ga.exports;bf=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),ga.exports=oy(),ga.exports}var Ef;function sy(){if(Ef)return ll;Ef=1;var t=ly();return ll.createRoot=t.createRoot,ll.hydrateRoot=t.hydrateRoot,ll}var ay=sy();const uy=wl(ay),Te=t=>typeof t=="string",_i=()=>{let t,r;const i=new Promise((l,s)=>{t=l,r=s});return i.resolve=t,i.reject=r,i},Nf=t=>t==null?"":""+t,cy=(t,r,i)=>{t.forEach(l=>{r[l]&&(i[l]=r[l])})},dy=/###/g,jf=t=>t&&t.indexOf("###")>-1?t.replace(dy,"."):t,Pf=t=>!t||Te(t),$i=(t,r,i)=>{const l=Te(r)?r.split("."):r;let s=0;for(;s<l.length-1;){if(Pf(t))return{};const a=jf(l[s]);!t[a]&&i&&(t[a]=new i),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++s}return Pf(t)?{}:{obj:t,k:jf(l[s])}},Tf=(t,r,i)=>{const{obj:l,k:s}=$i(t,r,Object);if(l!==void 0||r.length===1){l[s]=i;return}let a=r[r.length-1],c=r.slice(0,r.length-1),f=$i(t,c,Object);for(;f.obj===void 0&&c.length;)a=`${c[c.length-1]}.${a}`,c=c.slice(0,c.length-1),f=$i(t,c,Object),f!=null&&f.obj&&typeof f.obj[`${f.k}.${a}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${a}`]=i},fy=(t,r,i,l)=>{const{obj:s,k:a}=$i(t,r,Object);s[a]=s[a]||[],s[a].push(i)},pl=(t,r)=>{const{obj:i,k:l}=$i(t,r);if(i&&Object.prototype.hasOwnProperty.call(i,l))return i[l]},py=(t,r,i)=>{const l=pl(t,i);return l!==void 0?l:pl(r,i)},Qp=(t,r,i)=>{for(const l in r)l!=="__proto__"&&l!=="constructor"&&(l in t?Te(t[l])||t[l]instanceof String||Te(r[l])||r[l]instanceof String?i&&(t[l]=r[l]):Qp(t[l],r[l],i):t[l]=r[l]);return t},Fr=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hy={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const my=t=>Te(t)?t.replace(/[&<>"'\/]/g,r=>hy[r]):t;class gy{constructor(r){this.capacity=r,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(r){const i=this.regExpMap.get(r);if(i!==void 0)return i;const l=new RegExp(r);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(r,l),this.regExpQueue.push(r),l}}const yy=[" ",",","?","!",";"],xy=new gy(20),vy=(t,r,i)=>{r=r||"",i=i||"";const l=yy.filter(c=>r.indexOf(c)<0&&i.indexOf(c)<0);if(l.length===0)return!0;const s=xy.getRegExp(`(${l.map(c=>c==="?"?"\\?":c).join("|")})`);let a=!s.test(t);if(!a){const c=t.indexOf(i);c>0&&!s.test(t.substring(0,c))&&(a=!0)}return a},Ua=(t,r,i=".")=>{if(!t)return;if(t[r])return Object.prototype.hasOwnProperty.call(t,r)?t[r]:void 0;const l=r.split(i);let s=t;for(let a=0;a<l.length;){if(!s||typeof s!="object")return;let c,f="";for(let p=a;p<l.length;++p)if(p!==a&&(f+=i),f+=l[p],c=s[f],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&p<l.length-1)continue;a+=p-a+1;break}s=c}return s},Wi=t=>t==null?void 0:t.replace("_","-"),wy={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,r){var i,l;(l=(i=console==null?void 0:console[t])==null?void 0:i.apply)==null||l.call(i,console,r)}};class hl{constructor(r,i={}){this.init(r,i)}init(r,i={}){this.prefix=i.prefix||"i18next:",this.logger=r||wy,this.options=i,this.debug=i.debug}log(...r){return this.forward(r,"log","",!0)}warn(...r){return this.forward(r,"warn","",!0)}error(...r){return this.forward(r,"error","")}deprecate(...r){return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(r,i,l,s){return s&&!this.debug?null:(Te(r[0])&&(r[0]=`${l}${this.prefix} ${r[0]}`),this.logger[i](r))}create(r){return new hl(this.logger,{prefix:`${this.prefix}:${r}:`,...this.options})}clone(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new hl(this.logger,r)}}var pn=new hl;class Sl{constructor(){this.observers={}}on(r,i){return r.split(" ").forEach(l=>{this.observers[l]||(this.observers[l]=new Map);const s=this.observers[l].get(i)||0;this.observers[l].set(i,s+1)}),this}off(r,i){if(this.observers[r]){if(!i){delete this.observers[r];return}this.observers[r].delete(i)}}emit(r,...i){this.observers[r]&&Array.from(this.observers[r].entries()).forEach(([s,a])=>{for(let c=0;c<a;c++)s(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let c=0;c<a;c++)s.apply(s,[r,...i])})}}class Lf extends Sl{constructor(r,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=r||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}removeNamespaces(r){const i=this.options.ns.indexOf(r);i>-1&&this.options.ns.splice(i,1)}getResource(r,i,l,s={}){var m,g;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;r.indexOf(".")>-1?f=r.split("."):(f=[r,i],l&&(Array.isArray(l)?f.push(...l):Te(l)&&a?f.push(...l.split(a)):f.push(l)));const p=pl(this.data,f);return!p&&!i&&!l&&r.indexOf(".")>-1&&(r=f[0],i=f[1],l=f.slice(2).join(".")),p||!c||!Te(l)?p:Ua((g=(m=this.data)==null?void 0:m[r])==null?void 0:g[i],l,a)}addResource(r,i,l,s,a={silent:!1}){const c=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let f=[r,i];l&&(f=f.concat(c?l.split(c):l)),r.indexOf(".")>-1&&(f=r.split("."),s=i,i=f[1]),this.addNamespaces(i),Tf(this.data,f,s),a.silent||this.emit("added",r,i,l,s)}addResources(r,i,l,s={silent:!1}){for(const a in l)(Te(l[a])||Array.isArray(l[a]))&&this.addResource(r,i,a,l[a],{silent:!0});s.silent||this.emit("added",r,i,l)}addResourceBundle(r,i,l,s,a,c={silent:!1,skipCopy:!1}){let f=[r,i];r.indexOf(".")>-1&&(f=r.split("."),s=l,l=i,i=f[1]),this.addNamespaces(i);let p=pl(this.data,f)||{};c.skipCopy||(l=JSON.parse(JSON.stringify(l))),s?Qp(p,l,a):p={...p,...l},Tf(this.data,f,p),c.silent||this.emit("added",r,i,l)}removeResourceBundle(r,i){this.hasResourceBundle(r,i)&&delete this.data[r][i],this.removeNamespaces(i),this.emit("removed",r,i)}hasResourceBundle(r,i){return this.getResource(r,i)!==void 0}getResourceBundle(r,i){return i||(i=this.options.defaultNS),this.getResource(r,i)}getDataByLanguage(r){return this.data[r]}hasLanguageSomeTranslations(r){const i=this.getDataByLanguage(r);return!!(i&&Object.keys(i)||[]).find(s=>i[s]&&Object.keys(i[s]).length>0)}toJSON(){return this.data}}var Gp={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,r,i,l,s){return t.forEach(a=>{var c;r=((c=this.processors[a])==null?void 0:c.process(r,i,l,s))??r}),r}};const Yp=Symbol("i18next/PATH_KEY");function ky(){const t=[],r=Object.create(null);let i;return r.get=(l,s)=>{var a;return(a=i==null?void 0:i.revoke)==null||a.call(i),s===Yp?t:(t.push(s),i=Proxy.revocable(l,r),i.proxy)},Proxy.revocable(Object.create(null),r).proxy}function Ba(t,r){const{[Yp]:i}=t(ky());return i.join((r==null?void 0:r.keySeparator)??".")}const If={},va=t=>!Te(t)&&typeof t!="boolean"&&typeof t!="number";class ml extends Sl{constructor(r,i={}){super(),cy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=pn.create("translator")}changeLanguage(r){r&&(this.language=r)}exists(r,i={interpolation:{}}){const l={...i};if(r==null)return!1;const s=this.resolve(r,l);if((s==null?void 0:s.res)===void 0)return!1;const a=va(s.res);return!(l.returnObjects===!1&&a)}extractFromKey(r,i){let l=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=i.ns||this.options.defaultNS||[];const c=l&&r.indexOf(l)>-1,f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!vy(r,l,s);if(c&&!f){const p=r.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:r,namespaces:Te(a)?[a]:a};const m=r.split(l);(l!==s||l===s&&this.options.ns.indexOf(m[0])>-1)&&(a=m.shift()),r=m.join(s)}return{key:r,namespaces:Te(a)?[a]:a}}translate(r,i,l){let s=typeof i=="object"?{...i}:i;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),r==null)return"";typeof r=="function"&&(r=Ba(r,{...this.options,...s})),Array.isArray(r)||(r=[String(r)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:f,namespaces:p}=this.extractFromKey(r[r.length-1],s),m=p[p.length-1];let g=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;g===void 0&&(g=":");const y=s.lng||this.language,k=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((y==null?void 0:y.toLowerCase())==="cimode")return k?a?{res:`${m}${g}${f}`,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:`${m}${g}${f}`:a?{res:f,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:f;const v=this.resolve(r,s);let N=v==null?void 0:v.res;const T=(v==null?void 0:v.usedKey)||f,_=(v==null?void 0:v.exactUsedKey)||f,b=["[object Number]","[object Function]","[object RegExp]"],$=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,F=!this.i18nFormat||this.i18nFormat.handleAsObject,U=s.count!==void 0&&!Te(s.count),H=ml.hasDefaultValue(s),R=U?this.pluralResolver.getSuffix(y,s.count,s):"",W=s.ordinal&&U?this.pluralResolver.getSuffix(y,s.count,{ordinal:!1}):"",A=U&&!s.ordinal&&s.count===0,K=A&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${R}`]||s[`defaultValue${W}`]||s.defaultValue;let X=N;F&&!N&&H&&(X=K);const le=va(X),D=Object.prototype.toString.apply(X);if(F&&X&&le&&b.indexOf(D)<0&&!(Te($)&&Array.isArray(X))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const re=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,X,{...s,ns:p}):`key '${f} (${this.language})' returned an object instead of string.`;return a?(v.res=re,v.usedParams=this.getUsedParamsDetails(s),v):re}if(c){const re=Array.isArray(X),Y=re?[]:{},Q=re?_:T;for(const de in X)if(Object.prototype.hasOwnProperty.call(X,de)){const fe=`${Q}${c}${de}`;H&&!N?Y[de]=this.translate(fe,{...s,defaultValue:va(K)?K[de]:void 0,joinArrays:!1,ns:p}):Y[de]=this.translate(fe,{...s,joinArrays:!1,ns:p}),Y[de]===fe&&(Y[de]=X[de])}N=Y}}else if(F&&Te($)&&Array.isArray(N))N=N.join($),N&&(N=this.extendTranslation(N,r,s,l));else{let re=!1,Y=!1;!this.isValidLookup(N)&&H&&(re=!0,N=K),this.isValidLookup(N)||(Y=!0,N=f);const de=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Y?void 0:N,fe=H&&K!==N&&this.options.updateMissing;if(Y||re||fe){if(this.logger.log(fe?"updateKey":"missingKey",y,m,f,fe?K:N),c){const j=this.resolve(f,{...s,keySeparator:!1});j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ee=[];const ce=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ce&&ce[0])for(let j=0;j<ce.length;j++)ee.push(ce[j]);else this.options.saveMissingTo==="all"?ee=this.languageUtils.toResolveHierarchy(s.lng||this.language):ee.push(s.lng||this.language);const S=(j,B,C)=>{var Ee;const Se=H&&C!==N?C:de;this.options.missingKeyHandler?this.options.missingKeyHandler(j,m,B,Se,fe,s):(Ee=this.backendConnector)!=null&&Ee.saveMissing&&this.backendConnector.saveMissing(j,m,B,Se,fe,s),this.emit("missingKey",j,m,B,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&U?ee.forEach(j=>{const B=this.pluralResolver.getSuffixes(j,s);A&&s[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(C=>{S([j],f+C,s[`defaultValue${C}`]||K)})}):S(ee,f,K))}N=this.extendTranslation(N,r,s,v,l),Y&&N===f&&this.options.appendNamespaceToMissingKey&&(N=`${m}${g}${f}`),(Y||re)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${g}${f}`:f,re?N:void 0,s))}return a?(v.res=N,v.usedParams=this.getUsedParamsDetails(s),v):N}extendTranslation(r,i,l,s,a){var p,m;if((p=this.i18nFormat)!=null&&p.parse)r=this.i18nFormat.parse(r,{...this.options.interpolation.defaultVariables,...l},l.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!l.skipInterpolation){l.interpolation&&this.interpolator.init({...l,interpolation:{...this.options.interpolation,...l.interpolation}});const g=Te(r)&&(((m=l==null?void 0:l.interpolation)==null?void 0:m.skipOnVariables)!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(g){const v=r.match(this.interpolator.nestingRegexp);y=v&&v.length}let k=l.replace&&!Te(l.replace)?l.replace:l;if(this.options.interpolation.defaultVariables&&(k={...this.options.interpolation.defaultVariables,...k}),r=this.interpolator.interpolate(r,k,l.lng||this.language||s.usedLng,l),g){const v=r.match(this.interpolator.nestingRegexp),N=v&&v.length;y<N&&(l.nest=!1)}!l.lng&&s&&s.res&&(l.lng=this.language||s.usedLng),l.nest!==!1&&(r=this.interpolator.nest(r,(...v)=>(a==null?void 0:a[0])===v[0]&&!l.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${i[0]}`),null):this.translate(...v,i),l)),l.interpolation&&this.interpolator.reset()}const c=l.postProcess||this.options.postProcess,f=Te(c)?[c]:c;return r!=null&&(f!=null&&f.length)&&l.applyPostProcessor!==!1&&(r=Gp.handle(f,r,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(l)},...l}:l,this)),r}resolve(r,i={}){let l,s,a,c,f;return Te(r)&&(r=[r]),r.forEach(p=>{if(this.isValidLookup(l))return;const m=this.extractFromKey(p,i),g=m.key;s=g;let y=m.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const k=i.count!==void 0&&!Te(i.count),v=k&&!i.ordinal&&i.count===0,N=i.context!==void 0&&(Te(i.context)||typeof i.context=="number")&&i.context!=="",T=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);y.forEach(_=>{var b,$;this.isValidLookup(l)||(f=_,!If[`${T[0]}-${_}`]&&((b=this.utils)!=null&&b.hasLoadedNamespace)&&!(($=this.utils)!=null&&$.hasLoadedNamespace(f))&&(If[`${T[0]}-${_}`]=!0,this.logger.warn(`key "${s}" for languages "${T.join(", ")}" won't get resolved as namespace "${f}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(F=>{var R;if(this.isValidLookup(l))return;c=F;const U=[g];if((R=this.i18nFormat)!=null&&R.addLookupKeys)this.i18nFormat.addLookupKeys(U,g,F,_,i);else{let W;k&&(W=this.pluralResolver.getSuffix(F,i.count,i));const A=`${this.options.pluralSeparator}zero`,K=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(k&&(i.ordinal&&W.indexOf(K)===0&&U.push(g+W.replace(K,this.options.pluralSeparator)),U.push(g+W),v&&U.push(g+A)),N){const X=`${g}${this.options.contextSeparator||"_"}${i.context}`;U.push(X),k&&(i.ordinal&&W.indexOf(K)===0&&U.push(X+W.replace(K,this.options.pluralSeparator)),U.push(X+W),v&&U.push(X+A))}}let H;for(;H=U.pop();)this.isValidLookup(l)||(a=H,l=this.getResource(F,_,H,i))}))})}),{res:l,usedKey:s,exactUsedKey:a,usedLng:c,usedNS:f}}isValidLookup(r){return r!==void 0&&!(!this.options.returnNull&&r===null)&&!(!this.options.returnEmptyString&&r==="")}getResource(r,i,l,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(r,i,l,s):this.resourceStore.getResource(r,i,l,s)}getUsedParamsDetails(r={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],l=r.replace&&!Te(r.replace);let s=l?r.replace:r;if(l&&typeof r.count<"u"&&(s.count=r.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!l){s={...s};for(const a of i)delete s[a]}return s}static hasDefaultValue(r){const i="defaultValue";for(const l in r)if(Object.prototype.hasOwnProperty.call(r,l)&&i===l.substring(0,i.length)&&r[l]!==void 0)return!0;return!1}}class _f{constructor(r){this.options=r,this.supportedLngs=this.options.supportedLngs||!1,this.logger=pn.create("languageUtils")}getScriptPartFromCode(r){if(r=Wi(r),!r||r.indexOf("-")<0)return null;const i=r.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(r){if(r=Wi(r),!r||r.indexOf("-")<0)return r;const i=r.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(r){if(Te(r)&&r.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(r)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?r.toLowerCase():r)}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}isSupportedCode(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}getBestMatchFromCodes(r){if(!r)return null;let i;return r.forEach(l=>{if(i)return;const s=this.formatLanguageCode(l);(!this.options.supportedLngs||this.isSupportedCode(s))&&(i=s)}),!i&&this.options.supportedLngs&&r.forEach(l=>{if(i)return;const s=this.getScriptPartFromCode(l);if(this.isSupportedCode(s))return i=s;const a=this.getLanguagePartFromCode(l);if(this.isSupportedCode(a))return i=a;i=this.options.supportedLngs.find(c=>{if(c===a)return c;if(!(c.indexOf("-")<0&&a.indexOf("-")<0)&&(c.indexOf("-")>0&&a.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===a||c.indexOf(a)===0&&a.length>1))return c})}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(r,i){if(!r)return[];if(typeof r=="function"&&(r=r(i)),Te(r)&&(r=[r]),Array.isArray(r))return r;if(!i)return r.default||[];let l=r[i];return l||(l=r[this.getScriptPartFromCode(i)]),l||(l=r[this.formatLanguageCode(i)]),l||(l=r[this.getLanguagePartFromCode(i)]),l||(l=r.default),l||[]}toResolveHierarchy(r,i){const l=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],r),s=[],a=c=>{c&&(this.isSupportedCode(c)?s.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return Te(r)&&(r.indexOf("-")>-1||r.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(r))):Te(r)&&a(this.formatLanguageCode(r)),l.forEach(c=>{s.indexOf(c)<0&&a(this.formatLanguageCode(c))}),s}}const Of={zero:0,one:1,two:2,few:3,many:4,other:5},Rf={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sy{constructor(r,i={}){this.languageUtils=r,this.options=i,this.logger=pn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(r,i={}){const l=Wi(r==="dev"?"en":r),s=i.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:l,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let c;try{c=new Intl.PluralRules(l,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Rf;if(!r.match(/-|_/))return Rf;const p=this.languageUtils.getLanguagePartFromCode(r);c=this.getRule(p,i)}return this.pluralRulesCache[a]=c,c}needsPlural(r,i={}){let l=this.getRule(r,i);return l||(l=this.getRule("dev",i)),(l==null?void 0:l.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(r,i,l={}){return this.getSuffixes(r,l).map(s=>`${i}${s}`)}getSuffixes(r,i={}){let l=this.getRule(r,i);return l||(l=this.getRule("dev",i)),l?l.resolvedOptions().pluralCategories.sort((s,a)=>Of[s]-Of[a]).map(s=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(r,i,l={}){const s=this.getRule(r,l);return s?`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${s.select(i)}`:(this.logger.warn(`no plural rule found for: ${r}`),this.getSuffix("dev",i,l))}}const zf=(t,r,i,l=".",s=!0)=>{let a=py(t,r,i);return!a&&s&&Te(i)&&(a=Ua(t,i,l),a===void 0&&(a=Ua(r,i,l))),a},wa=t=>t.replace(/\$/g,"$$$$");class Af{constructor(r={}){var i;this.logger=pn.create("interpolator"),this.options=r,this.format=((i=r==null?void 0:r.interpolation)==null?void 0:i.format)||(l=>l),this.init(r)}init(r={}){r.interpolation||(r.interpolation={escapeValue:!0});const{escape:i,escapeValue:l,useRawValueToEscape:s,prefix:a,prefixEscaped:c,suffix:f,suffixEscaped:p,formatSeparator:m,unescapeSuffix:g,unescapePrefix:y,nestingPrefix:k,nestingPrefixEscaped:v,nestingSuffix:N,nestingSuffixEscaped:T,nestingOptionsSeparator:_,maxReplaces:b,alwaysFormat:$}=r.interpolation;this.escape=i!==void 0?i:my,this.escapeValue=l!==void 0?l:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Fr(a):c||"{{",this.suffix=f?Fr(f):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=g?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=k?Fr(k):v||Fr("$t("),this.nestingSuffix=N?Fr(N):T||Fr(")"),this.nestingOptionsSeparator=_||",",this.maxReplaces=b||1e3,this.alwaysFormat=$!==void 0?$:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const r=(i,l)=>(i==null?void 0:i.source)===l?(i.lastIndex=0,i):new RegExp(l,"g");this.regexp=r(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=r(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=r(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(r,i,l,s){var v;let a,c,f;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=N=>{if(N.indexOf(this.formatSeparator)<0){const $=zf(i,p,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format($,void 0,l,{...s,...i,interpolationkey:N}):$}const T=N.split(this.formatSeparator),_=T.shift().trim(),b=T.join(this.formatSeparator).trim();return this.format(zf(i,p,_,this.options.keySeparator,this.options.ignoreJSONStructure),b,l,{...s,...i,interpolationkey:_})};this.resetRegExp();const g=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,y=((v=s==null?void 0:s.interpolation)==null?void 0:v.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>wa(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?wa(this.escape(N)):wa(N)}].forEach(N=>{for(f=0;a=N.regex.exec(r);){const T=a[1].trim();if(c=m(T),c===void 0)if(typeof g=="function"){const b=g(r,a,s);c=Te(b)?b:""}else if(s&&Object.prototype.hasOwnProperty.call(s,T))c="";else if(y){c=a[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${r}`),c="";else!Te(c)&&!this.useRawValueToEscape&&(c=Nf(c));const _=N.safeValue(c);if(r=r.replace(a[0],_),y?(N.regex.lastIndex+=c.length,N.regex.lastIndex-=a[0].length):N.regex.lastIndex=0,f++,f>=this.maxReplaces)break}}),r}nest(r,i,l={}){let s,a,c;const f=(p,m)=>{const g=this.nestingOptionsSeparator;if(p.indexOf(g)<0)return p;const y=p.split(new RegExp(`${g}[ ]*{`));let k=`{${y[1]}`;p=y[0],k=this.interpolate(k,c);const v=k.match(/'/g),N=k.match(/"/g);(((v==null?void 0:v.length)??0)%2===0&&!N||N.length%2!==0)&&(k=k.replace(/'/g,'"'));try{c=JSON.parse(k),m&&(c={...m,...c})}catch(T){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,T),`${p}${g}${k}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,p};for(;s=this.nestingRegexp.exec(r);){let p=[];c={...l},c=c.replace&&!Te(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const m=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(m!==-1&&(p=s[1].slice(m).split(this.formatSeparator).map(g=>g.trim()).filter(Boolean),s[1]=s[1].slice(0,m)),a=i(f.call(this,s[1].trim(),c),c),a&&s[0]===r&&!Te(a))return a;Te(a)||(a=Nf(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${r}`),a=""),p.length&&(a=p.reduce((g,y)=>this.format(g,y,l.lng,{...l,interpolationkey:s[1].trim()}),a.trim())),r=r.replace(s[0],a),this.regexp.lastIndex=0}return r}}const Cy=t=>{let r=t.toLowerCase().trim();const i={};if(t.indexOf("(")>-1){const l=t.split("(");r=l[0].toLowerCase().trim();const s=l[1].substring(0,l[1].length-1);r==="currency"&&s.indexOf(":")<0?i.currency||(i.currency=s.trim()):r==="relativetime"&&s.indexOf(":")<0?i.range||(i.range=s.trim()):s.split(";").forEach(c=>{if(c){const[f,...p]=c.split(":"),m=p.join(":").trim().replace(/^'+|'+$/g,""),g=f.trim();i[g]||(i[g]=m),m==="false"&&(i[g]=!1),m==="true"&&(i[g]=!0),isNaN(m)||(i[g]=parseInt(m,10))}})}return{formatName:r,formatOptions:i}},Mf=t=>{const r={};return(i,l,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const c=l+JSON.stringify(a);let f=r[c];return f||(f=t(Wi(l),s),r[c]=f),f(i)}},by=t=>(r,i,l)=>t(Wi(i),l)(r);class Ey{constructor(r={}){this.logger=pn.create("formatter"),this.options=r,this.init(r)}init(r,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const l=i.cacheInBuiltFormats?Mf:by;this.formats={number:l((s,a)=>{const c=new Intl.NumberFormat(s,{...a});return f=>c.format(f)}),currency:l((s,a)=>{const c=new Intl.NumberFormat(s,{...a,style:"currency"});return f=>c.format(f)}),datetime:l((s,a)=>{const c=new Intl.DateTimeFormat(s,{...a});return f=>c.format(f)}),relativetime:l((s,a)=>{const c=new Intl.RelativeTimeFormat(s,{...a});return f=>c.format(f,a.range||"day")}),list:l((s,a)=>{const c=new Intl.ListFormat(s,{...a});return f=>c.format(f)})}}add(r,i){this.formats[r.toLowerCase().trim()]=i}addCached(r,i){this.formats[r.toLowerCase().trim()]=Mf(i)}format(r,i,l,s={}){const a=i.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(f=>f.indexOf(")")>-1)){const f=a.findIndex(p=>p.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,f)].join(this.formatSeparator)}return a.reduce((f,p)=>{var y;const{formatName:m,formatOptions:g}=Cy(p);if(this.formats[m]){let k=f;try{const v=((y=s==null?void 0:s.formatParams)==null?void 0:y[s.interpolationkey])||{},N=v.locale||v.lng||s.locale||s.lng||l;k=this.formats[m](f,N,{...g,...s,...v})}catch(v){this.logger.warn(v)}return k}else this.logger.warn(`there was no format function for ${m}`);return f},r)}}const Ny=(t,r)=>{t.pending[r]!==void 0&&(delete t.pending[r],t.pendingCount--)};class jy extends Sl{constructor(r,i,l,s={}){var a,c;super(),this.backend=r,this.store=i,this.services=l,this.languageUtils=l.languageUtils,this.options=s,this.logger=pn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(c=(a=this.backend)==null?void 0:a.init)==null||c.call(a,l,s.backend,s)}queueLoad(r,i,l,s){const a={},c={},f={},p={};return r.forEach(m=>{let g=!0;i.forEach(y=>{const k=`${m}|${y}`;!l.reload&&this.store.hasResourceBundle(m,y)?this.state[k]=2:this.state[k]<0||(this.state[k]===1?c[k]===void 0&&(c[k]=!0):(this.state[k]=1,g=!1,c[k]===void 0&&(c[k]=!0),a[k]===void 0&&(a[k]=!0),p[y]===void 0&&(p[y]=!0)))}),g||(f[m]=!0)}),(Object.keys(a).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(p)}}loaded(r,i,l){const s=r.split("|"),a=s[0],c=s[1];i&&this.emit("failedLoading",a,c,i),!i&&l&&this.store.addResourceBundle(a,c,l,void 0,void 0,{skipCopy:!0}),this.state[r]=i?-1:2,i&&l&&(this.state[r]=0);const f={};this.queue.forEach(p=>{fy(p.loaded,[a],c),Ny(p,r),i&&p.errors.push(i),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{f[m]||(f[m]={});const g=p.loaded[m];g.length&&g.forEach(y=>{f[m][y]===void 0&&(f[m][y]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(p=>!p.done)}read(r,i,l,s=0,a=this.retryTimeout,c){if(!r.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:r,ns:i,fcName:l,tried:s,wait:a,callback:c});return}this.readingCalls++;const f=(m,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(m&&g&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,r,i,l,s+1,a*2,c)},a);return}c(m,g)},p=this.backend[l].bind(this.backend);if(p.length===2){try{const m=p(r,i);m&&typeof m.then=="function"?m.then(g=>f(null,g)).catch(f):f(null,m)}catch(m){f(m)}return}return p(r,i,f)}prepareLoading(r,i,l={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Te(r)&&(r=this.languageUtils.toResolveHierarchy(r)),Te(i)&&(i=[i]);const a=this.queueLoad(r,i,l,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(c=>{this.loadOne(c)})}load(r,i,l){this.prepareLoading(r,i,{},l)}reload(r,i,l){this.prepareLoading(r,i,{reload:!0},l)}loadOne(r,i=""){const l=r.split("|"),s=l[0],a=l[1];this.read(s,a,"read",void 0,void 0,(c,f)=>{c&&this.logger.warn(`${i}loading namespace ${a} for language ${s} failed`,c),!c&&f&&this.logger.log(`${i}loaded namespace ${a} for language ${s}`,f),this.loaded(r,c,f)})}saveMissing(r,i,l,s,a,c={},f=()=>{}){var p,m,g,y,k;if((m=(p=this.services)==null?void 0:p.utils)!=null&&m.hasLoadedNamespace&&!((y=(g=this.services)==null?void 0:g.utils)!=null&&y.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${l}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(l==null||l==="")){if((k=this.backend)!=null&&k.create){const v={...c,isUpdate:a},N=this.backend.create.bind(this.backend);if(N.length<6)try{let T;N.length===5?T=N(r,i,l,s,v):T=N(r,i,l,s),T&&typeof T.then=="function"?T.then(_=>f(null,_)).catch(f):f(null,T)}catch(T){f(T)}else N(r,i,l,s,f,v)}!r||!r[0]||this.store.addResource(r[0],i,l,s)}}}const ka=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let r={};if(typeof t[1]=="object"&&(r=t[1]),Te(t[1])&&(r.defaultValue=t[1]),Te(t[2])&&(r.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const i=t[3]||t[2];Object.keys(i).forEach(l=>{r[l]=i[l]})}return r},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Df=t=>{var r,i;return Te(t.ns)&&(t.ns=[t.ns]),Te(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Te(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((i=(r=t.supportedLngs)==null?void 0:r.indexOf)==null?void 0:i.call(r,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},sl=()=>{},Py=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(i=>{typeof t[i]=="function"&&(t[i]=t[i].bind(t))})};class Ui extends Sl{constructor(r={},i){if(super(),this.options=Df(r),this.services={},this.logger=pn,this.modules={external:[]},Py(this),i&&!this.isInitialized&&!r.isClone){if(!this.options.initAsync)return this.init(r,i),this;setTimeout(()=>{this.init(r,i)},0)}}init(r={},i){this.isInitializing=!0,typeof r=="function"&&(i=r,r={}),r.defaultNS==null&&r.ns&&(Te(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const l=ka();this.options={...l,...this.options,...Df(r)},this.options.interpolation={...l.interpolation,...this.options.interpolation},r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=l.overloadTranslationOptionHandler),this.options.debug===!0&&typeof console<"u"&&console.warn("i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com");const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?pn.init(s(this.modules.logger),this.options):pn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=Ey;const g=new _f(this.options);this.store=new Lf(this.options.resources,this.options);const y=this.services;y.logger=pn,y.resourceStore=this.store,y.languageUtils=g,y.pluralResolver=new Sy(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==l.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===l.interpolation.format)&&(y.formatter=s(m),y.formatter.init&&y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new Af(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new jy(s(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",(v,...N)=>{this.emit(v,...N)}),this.modules.languageDetector&&(y.languageDetector=s(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=s(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new ml(this.services,this.options),this.translator.on("*",(v,...N)=>{this.emit(v,...N)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,i||(i=sl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=(...g)=>this.store[m](...g)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...g)=>(this.store[m](...g),this)});const f=_i(),p=()=>{const m=(g,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(y),i(g,y)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),f}loadResources(r,i=sl){var a,c;let l=i;const s=Te(r)?r:this.language;if(typeof r=="function"&&(l=r),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return l();const f=[],p=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(y=>{y!=="cimode"&&f.indexOf(y)<0&&f.push(y)})};s?p(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>p(g)),(c=(a=this.options.preload)==null?void 0:a.forEach)==null||c.call(a,m=>p(m)),this.services.backendConnector.load(f,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),l(m)})}else l(null)}reloadResources(r,i,l){const s=_i();return typeof r=="function"&&(l=r,r=void 0),typeof i=="function"&&(l=i,i=void 0),r||(r=this.languages),i||(i=this.options.ns),l||(l=sl),this.services.backendConnector.reload(r,i,a=>{s.resolve(),l(a)}),s}use(r){if(!r)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!r.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&Gp.addPostProcessor(r),r.type==="formatter"&&(this.modules.formatter=r),r.type==="3rdParty"&&this.modules.external.push(r),this}setResolvedLanguage(r){if(!(!r||!this.languages)&&!(["cimode","dev"].indexOf(r)>-1)){for(let i=0;i<this.languages.length;i++){const l=this.languages[i];if(!(["cimode","dev"].indexOf(l)>-1)&&this.store.hasLanguageSomeTranslations(l)){this.resolvedLanguage=l;break}}!this.resolvedLanguage&&this.languages.indexOf(r)<0&&this.store.hasLanguageSomeTranslations(r)&&(this.resolvedLanguage=r,this.languages.unshift(r))}}changeLanguage(r,i){this.isLanguageChangingTo=r;const l=_i();this.emit("languageChanging",r);const s=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},a=(f,p)=>{p?this.isLanguageChangingTo===r&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,l.resolve((...m)=>this.t(...m)),i&&i(f,(...m)=>this.t(...m))},c=f=>{var g,y;!r&&!f&&this.services.languageDetector&&(f=[]);const p=Te(f)?f:f&&f[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Te(f)?[f]:f);m&&(this.language||s(m),this.translator.language||this.translator.changeLanguage(m),(y=(g=this.services.languageDetector)==null?void 0:g.cacheUserLanguage)==null||y.call(g,m)),this.loadResources(m,k=>{a(k,m)})};return!r&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(r),l}getFixedT(r,i,l){const s=(a,c,...f)=>{let p;typeof c!="object"?p=this.options.overloadTranslationOptionHandler([a,c].concat(f)):p={...c},p.lng=p.lng||s.lng,p.lngs=p.lngs||s.lngs,p.ns=p.ns||s.ns,p.keyPrefix!==""&&(p.keyPrefix=p.keyPrefix||l||s.keyPrefix);const m=this.options.keySeparator||".";let g;return p.keyPrefix&&Array.isArray(a)?g=a.map(y=>(typeof y=="function"&&(y=Ba(y,{...this.options,...c})),`${p.keyPrefix}${m}${y}`)):(typeof a=="function"&&(a=Ba(a,{...this.options,...c})),g=p.keyPrefix?`${p.keyPrefix}${m}${a}`:a),this.t(g,p)};return Te(r)?s.lng=r:s.lngs=r,s.ns=i,s.keyPrefix=l,s}t(...r){var i;return(i=this.translator)==null?void 0:i.translate(...r)}exists(...r){var i;return(i=this.translator)==null?void 0:i.exists(...r)}setDefaultNamespace(r){this.options.defaultNS=r}hasLoadedNamespace(r,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const l=i.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(l.toLowerCase()==="cimode")return!0;const c=(f,p)=>{const m=this.services.backendConnector.state[`${f}|${p}`];return m===-1||m===0||m===2};if(i.precheck){const f=i.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(l,r)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(l,r)&&(!s||c(a,r)))}loadNamespaces(r,i){const l=_i();return this.options.ns?(Te(r)&&(r=[r]),r.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{l.resolve(),i&&i(s)}),l):(i&&i(),Promise.resolve())}loadLanguages(r,i){const l=_i();Te(r)&&(r=[r]);const s=this.options.preload||[],a=r.filter(c=>s.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return a.length?(this.options.preload=s.concat(a),this.loadResources(c=>{l.resolve(),i&&i(c)}),l):(i&&i(),Promise.resolve())}dir(r){var s,a;if(r||(r=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!r)return"rtl";try{const c=new Intl.Locale(r);if(c&&c.getTextInfo){const f=c.getTextInfo();if(f&&f.direction)return f.direction}}catch{}const i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],l=((a=this.services)==null?void 0:a.languageUtils)||new _f(ka());return r.toLowerCase().indexOf("-latn")>1?"ltr":i.indexOf(l.getLanguagePartFromCode(r))>-1||r.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(r={},i){const l=new Ui(r,i);return l.createInstance=Ui.createInstance,l}cloneInstance(r={},i=sl){const l=r.forkResourceStore;l&&delete r.forkResourceStore;const s={...this.options,...r,isClone:!0},a=new Ui(s);if((r.debug!==void 0||r.prefix!==void 0)&&(a.logger=a.logger.clone(r)),["store","services","language"].forEach(f=>{a[f]=this[f]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},l){const f=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((g,y)=>(g[y]={...p[m][y]},g),p[m]),p),{});a.store=new Lf(f,s),a.services.resourceStore=a.store}if(r.interpolation){const p={...ka().interpolation,...this.options.interpolation,...r.interpolation},m={...s,interpolation:p};a.services.interpolator=new Af(m)}return a.translator=new ml(a.services,s),a.translator.on("*",(f,...p)=>{a.emit(f,...p)}),a.init(s,i),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const bt=Ui.createInstance();bt.createInstance;bt.dir;bt.init;bt.loadResources;bt.reloadResources;bt.use;bt.changeLanguage;bt.getFixedT;bt.t;bt.exists;bt.setDefaultNamespace;bt.hasLoadedNamespace;bt.loadNamespaces;bt.loadLanguages;const Ty=(t,r,i,l)=>{var a,c,f,p;const s=[i,{code:r,...l||{}}];if((c=(a=t==null?void 0:t.services)==null?void 0:a.logger)!=null&&c.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);dr(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(p=(f=t==null?void 0:t.services)==null?void 0:f.logger)!=null&&p.warn?t.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},Ff={},Xp=(t,r,i,l)=>{dr(i)&&Ff[i]||(dr(i)&&(Ff[i]=new Date),Ty(t,r,i,l))},Jp=(t,r)=>()=>{if(t.isInitialized)r();else{const i=()=>{setTimeout(()=>{t.off("initialized",i)},0),r()};t.on("initialized",i)}},Va=(t,r,i)=>{t.loadNamespaces(r,Jp(t,i))},$f=(t,r,i,l)=>{if(dr(i)&&(i=[i]),t.options.preload&&t.options.preload.indexOf(r)>-1)return Va(t,i,l);i.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(r,Jp(t,l))},Ly=(t,r,i={})=>!r.languages||!r.languages.length?(Xp(r,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:r.languages}),!0):r.hasLoadedNamespace(t,{lng:i.lng,precheck:(l,s)=>{if(i.bindI18n&&i.bindI18n.indexOf("languageChanging")>-1&&l.services.backendConnector.backend&&l.isLanguageChangingTo&&!s(l.isLanguageChangingTo,t))return!1}}),dr=t=>typeof t=="string",Iy=t=>typeof t=="object"&&t!==null,_y=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Oy={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Ry=t=>Oy[t],zy=t=>t.replace(_y,Ry);let Ha={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:zy,transDefaultProps:void 0};const Ay=(t={})=>{Ha={...Ha,...t}},My=()=>Ha;let Zp;const Dy=t=>{Zp=t},Fy=()=>Zp,$y={type:"3rdParty",init(t){Ay(t.options.react),Dy(t)}},Uy=I.createContext();class By{constructor(){this.usedNamespaces={}}addUsedNamespaces(r){r.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Sa={exports:{}},Ca={};/**
|
|
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 Uf;function Vy(){if(Uf)return Ca;Uf=1;var t=kl();function r(y,k){return y===k&&(y!==0||1/y===1/k)||y!==y&&k!==k}var i=typeof Object.is=="function"?Object.is:r,l=t.useState,s=t.useEffect,a=t.useLayoutEffect,c=t.useDebugValue;function f(y,k){var v=k(),N=l({inst:{value:v,getSnapshot:k}}),T=N[0].inst,_=N[1];return a(function(){T.value=v,T.getSnapshot=k,p(T)&&_({inst:T})},[y,v,k]),s(function(){return p(T)&&_({inst:T}),y(function(){p(T)&&_({inst:T})})},[y]),c(v),v}function p(y){var k=y.getSnapshot;y=y.value;try{var v=k();return!i(y,v)}catch{return!0}}function m(y,k){return k()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return Ca.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,Ca}var Bf;function Hy(){return Bf||(Bf=1,Sa.exports=Vy()),Sa.exports}var Wy=Hy();const qy=(t,r)=>dr(r)?r:Iy(r)&&dr(r.defaultValue)?r.defaultValue:Array.isArray(t)?t[t.length-1]:t,Ky={t:qy,ready:!1},Qy=()=>()=>{},Et=(t,r={})=>{var K,X,le;const{i18n:i}=r,{i18n:l,defaultNS:s}=I.useContext(Uy)||{},a=i||l||Fy();a&&!a.reportNamespaces&&(a.reportNamespaces=new By),a||Xp(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const c=I.useMemo(()=>{var D;return{...My(),...(D=a==null?void 0:a.options)==null?void 0:D.react,...r}},[a,r]),{useSuspense:f,keyPrefix:p}=c,m=s||((K=a==null?void 0:a.options)==null?void 0:K.defaultNS),g=dr(m)?[m]:m||["translation"],y=I.useMemo(()=>g,g);(le=(X=a==null?void 0:a.reportNamespaces)==null?void 0:X.addUsedNamespaces)==null||le.call(X,y);const k=I.useRef(0),v=I.useCallback(D=>{if(!a)return Qy;const{bindI18n:re,bindI18nStore:Y}=c,Q=()=>{k.current+=1,D()};return re&&a.on(re,Q),Y&&a.store.on(Y,Q),()=>{re&&re.split(" ").forEach(de=>a.off(de,Q)),Y&&Y.split(" ").forEach(de=>a.store.off(de,Q))}},[a,c]),N=I.useRef(),T=I.useCallback(()=>{if(!a)return Ky;const D=!!(a.isInitialized||a.initializedStoreOnce)&&y.every(ee=>Ly(ee,a,c)),re=r.lng||a.language,Y=k.current,Q=N.current;if(Q&&Q.ready===D&&Q.lng===re&&Q.keyPrefix===p&&Q.revision===Y)return Q;const fe={t:a.getFixedT(re,c.nsMode==="fallback"?y:y[0],p),ready:D,lng:re,keyPrefix:p,revision:Y};return N.current=fe,fe},[a,y,p,c,r.lng]),[_,b]=I.useState(0),{t:$,ready:F}=Wy.useSyncExternalStore(v,T,T);I.useEffect(()=>{if(a&&!F&&!f){const D=()=>b(re=>re+1);r.lng?$f(a,r.lng,y,D):Va(a,y,D)}},[a,r.lng,y,F,f,_]);const U=a||{},H=I.useRef(null),R=I.useRef(),W=D=>{const re=Object.getOwnPropertyDescriptors(D);re.__original&&delete re.__original;const Y=Object.create(Object.getPrototypeOf(D),re);if(!Object.prototype.hasOwnProperty.call(Y,"__original"))try{Object.defineProperty(Y,"__original",{value:D,writable:!1,enumerable:!1,configurable:!1})}catch{}return Y},A=I.useMemo(()=>{const D=U,re=D==null?void 0:D.language;let Y=D;D&&(H.current&&H.current.__original===D?R.current!==re?(Y=W(D),H.current=Y,R.current=re):Y=H.current:(Y=W(D),H.current=Y,R.current=re));const Q=[$,Y,F];return Q.t=$,Q.i18n=Y,Q.ready=F,Q},[$,U,F,U.resolvedLanguage,U.language,U.languages]);if(a&&f&&!F)throw new Promise(D=>{const re=()=>D();r.lng?$f(a,r.lng,y,re):Va(a,y,re)});return A},Gy="Claude Code uses its own tools and can't share chat history with other models",Yy="Delete chat history",Xy="This will permanently delete the chat history and remove all context from this session.",Jy="Collapse",Zy="Expand",ex="Start a conversation with the AI agent.",tx='Try: "What is this project about?"',nx="Thinking...",rx="Ask the agent to do something...",ix="Inspect element to attach",ox="Attach image",lx="attached elements",sx="attached image",ax="attached images",ux="see {{parts}}",cx="Select model",dx="Task completed",fx="Undone",px="Review",hx="Loading...",mx="Undo",gx="Undoing...",yx="Undo last file change",xx="Undo file changes",vx="This will revert {{count}} file to its previous state.",wx="This will revert {{count}} files to their previous state.",kx="Reverted: {{file}}",Sx="Reverted {{count}} files: {{files}}",Cx="Nothing to undo",bx="Undo failed",Ex="{{count}} turn",Nx="{{count}} turns",jx="Maximum turns reached",Px="Execution error",Tx="Budget limit exceeded",Lx="Output parsing failed",Ix="{{count}} file changed",_x="{{count}} files changed",Ox="No changes",Rx="Read Plan",zx="View Plan",Ax="Leave feedback to revise...",Mx="Send",Dx="Proceed with Plan",Fx="Questions answered",$x="Awel has questions",Ux="Select all that apply",Bx="Submit Answers",Vx="Next",Hx="{{count}} tool call",Wx="{{count}} tool calls",qx="+{{count}} more",Kx="Preview {{index}}",Qx="Confirm",Gx="Cancel",Yx="Conversation compacted",Xx="Session initialized",Jx="Attached {{index}}",Zx="Click to re-attach this {{level}}",e0="Toggle theme",t0="Open",n0="Editor",r0="Select editor",i0="What would you like to build?",o0="Describe your app and Awel will create it for you.",l0="Describe what you want to build...",s0="Your app is ready!",a0="Redirecting to your app...",u0="E-commerce store",c0="Blog platform",d0="Admin dashboard",f0="Portfolio site",p0={modelSwitchDisabled:Gy,deleteChatHistory:Yy,deleteChatHistoryDescription:Xy,delete:"Delete",collapse:Jy,expand:Zy,emptyState:ex,emptyStateHint:tx,thinking:nx,inputPlaceholder:rx,inspectElement:ix,attachImage:ox,attachedElements:lx,attachedImage:sx,attachedImages:ax,seeAttached:ux,selectModel:cx,taskCompleted:dx,undone:fx,review:px,loading:hx,undo:mx,undoing:gx,undoLastFileChange:yx,undoFileChanges:xx,undoConfirmDescription_one:vx,undoConfirmDescription_other:wx,revertedFile:kx,revertedFiles:Sx,nothingToUndo:Cx,undoFailed:bx,turn_one:Ex,turn_other:Nx,errorMaxTurns:jx,errorDuringExecution:Px,errorMaxBudget:Tx,errorOutputParsing:Lx,fileChanged_one:Ix,fileChanged_other:_x,noChanges:Ox,readPlan:Rx,viewPlan:zx,feedbackPlaceholder:Ax,send:Mx,proceedWithPlan:Dx,questionsAnswered:Fx,auraHasQuestions:$x,selectAllThatApply:Ux,submitAnswers:Bx,next:Vx,toolCall_one:Hx,toolCall_other:Wx,plusMore:qx,previewAlt:Kx,confirm:Qx,cancel:Gx,conversationCompacted:Yx,sessionInitialized:Xx,attachedAlt:Jx,clickToReattach:Zx,toggleTheme:e0,openInEditor:t0,editorLabel:n0,noEditorSelected:r0,creationHeading:i0,creationSubheading:o0,creationPlaceholder:l0,creationSuccess:s0,creationRedirecting:a0,creationChipEcommerce:u0,creationChipBlog:c0,creationChipDashboard:d0,creationChipPortfolio:f0},h0="Claude Code 使用独立的工具集,无法与其他模型共享聊天记录",m0="删除聊天记录",g0="此操作将永久删除聊天记录并清除当前会话的所有上下文。",y0="收起面板",x0="展开面板",v0="您的 AI 助手已就绪。",w0='您可以试着下达指令,例如:"帮我分析这个项目的架构"',k0="正在深度思考...",S0="给 Agent 下达指令或描述任务...",C0="选取元素并加入上下文",b0="添加图片参考",E0="已关联的元素",N0="已关联的图片",j0="已关联的图片",P0="查阅 {{parts}}",T0="切换模型",L0="目标任务已达成",I0="操作已撤回",_0="复核结果",O0="正在处理中...",R0="撤回操作",z0="正在执行撤回...",A0="撤回最近一次文件改动",M0="撤回文件改动",D0="此操作将把 {{count}} 个文件回滚至变动前的状态。",F0="此操作将把 {{count}} 个文件回滚至变动前的状态。",$0="已成功回滚:{{file}}",U0="已成功回滚 {{count}} 个文件:{{files}}",B0="暂无可撤回的操作记录",V0="撤回执行失败",H0="第 {{count}} 轮交互",W0="第 {{count}} 轮交互",q0="已触发交互轮次上限",K0="任务执行期间发生异常",Q0="算力消耗已超出预设上限",G0="结果解析异常",Y0="{{count}} 个文件发生变动",X0="{{count}} 个文件发生变动",J0="未监测到任何变动",Z0="审阅任务方案",e1="查看执行计划",t1="输入您的调整意见或反馈...",n1="发送指令",r1="批准并执行方案",i1="需求确认完毕",o1="Awel 需要与您进一步确认细节",l1="请勾选所有适用项",s1="提交确认信息",a1="下一步",u1="调用了 {{count}} 个工具",c1="调用了 {{count}} 个工具",d1="以及另外 {{count}} 项",f1="预览内容 {{index}}",p1="确认执行",h1="取消操作",m1="长对话已精简归档",g1="Agent 协作环境初始化完成",y1="附件资源 {{index}}",x1="点击以重新关联此 {{level}}",v1="切换主题",w1="打开",k1="编辑器",S1="选择编辑器",C1="你想构建什么?",b1="描述你的应用,Awel 将为你创建。",E1="描述你想构建的应用...",N1="你的应用已就绪!",j1="正在跳转到你的应用...",P1="电商平台",T1="博客平台",L1="管理后台",I1="个人作品集",_1={modelSwitchDisabled:h0,deleteChatHistory:m0,deleteChatHistoryDescription:g0,delete:"删除",collapse:y0,expand:x0,emptyState:v0,emptyStateHint:w0,thinking:k0,inputPlaceholder:S0,inspectElement:C0,attachImage:b0,attachedElements:E0,attachedImage:N0,attachedImages:j0,seeAttached:P0,selectModel:T0,taskCompleted:L0,undone:I0,review:_0,loading:O0,undo:R0,undoing:z0,undoLastFileChange:A0,undoFileChanges:M0,undoConfirmDescription_one:D0,undoConfirmDescription_other:F0,revertedFile:$0,revertedFiles:U0,nothingToUndo:B0,undoFailed:V0,turn_one:H0,turn_other:W0,errorMaxTurns:q0,errorDuringExecution:K0,errorMaxBudget:Q0,errorOutputParsing:G0,fileChanged_one:Y0,fileChanged_other:X0,noChanges:J0,readPlan:Z0,viewPlan:e1,feedbackPlaceholder:t1,send:n1,proceedWithPlan:r1,questionsAnswered:i1,auraHasQuestions:o1,selectAllThatApply:l1,submitAnswers:s1,next:a1,toolCall_one:u1,toolCall_other:c1,plusMore:d1,previewAlt:f1,confirm:p1,cancel:h1,conversationCompacted:m1,sessionInitialized:g1,attachedAlt:y1,clickToReattach:x1,toggleTheme:v1,openInEditor:w1,editorLabel:k1,noEditorSelected:S1,creationHeading:C1,creationSubheading:b1,creationPlaceholder:E1,creationSuccess:N1,creationRedirecting:j1,creationChipEcommerce:P1,creationChipBlog:T1,creationChipDashboard:L1,creationChipPortfolio:I1};bt.use($y).init({resources:{en:{translation:p0},zh:{translation:_1}},lng:navigator.language.startsWith("zh")?"zh":"en",fallbackLng:"en",interpolation:{escapeValue:!1}});/**
|
|
49
|
+
* @license lucide-react v0.469.0 - ISC
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the ISC license.
|
|
52
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/const O1=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eh=(...t)=>t.filter((r,i,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===i).join(" ").trim();/**
|
|
54
|
+
* @license lucide-react v0.469.0 - ISC
|
|
55
|
+
*
|
|
56
|
+
* This source code is licensed under the ISC license.
|
|
57
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
+
*/var R1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
59
|
+
* @license lucide-react v0.469.0 - ISC
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the ISC license.
|
|
62
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/const z1=I.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:s="",children:a,iconNode:c,...f},p)=>I.createElement("svg",{ref:p,...R1,width:r,height:r,stroke:t,strokeWidth:l?Number(i)*24/Number(r):i,className:eh("lucide",s),...f},[...c.map(([m,g])=>I.createElement(m,g)),...Array.isArray(a)?a:[a]]));/**
|
|
64
|
+
* @license lucide-react v0.469.0 - ISC
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the ISC license.
|
|
67
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/const Oe=(t,r)=>{const i=I.forwardRef(({className:l,...s},a)=>I.createElement(z1,{ref:a,iconNode:r,className:eh(`lucide-${O1(t)}`,l),...s}));return i.displayName=`${t}`,i};/**
|
|
69
|
+
* @license lucide-react v0.469.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/const A1=Oe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
74
|
+
* @license lucide-react v0.469.0 - ISC
|
|
75
|
+
*
|
|
76
|
+
* This source code is licensed under the ISC license.
|
|
77
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
+
*/const Cl=Oe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
79
|
+
* @license lucide-react v0.469.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the ISC license.
|
|
82
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/const M1=Oe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
84
|
+
* @license lucide-react v0.469.0 - ISC
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the ISC license.
|
|
87
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/const cu=Oe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
89
|
+
* @license lucide-react v0.469.0 - ISC
|
|
90
|
+
*
|
|
91
|
+
* This source code is licensed under the ISC license.
|
|
92
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
+
*/const D1=Oe("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
|
94
|
+
* @license lucide-react v0.469.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/const du=Oe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
99
|
+
* @license lucide-react v0.469.0 - ISC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the ISC license.
|
|
102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
+
*/const th=Oe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
104
|
+
* @license lucide-react v0.469.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/const fu=Oe("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
109
|
+
* @license lucide-react v0.469.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/const F1=Oe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
114
|
+
* @license lucide-react v0.469.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/const $1=Oe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
119
|
+
* @license lucide-react v0.469.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const U1=Oe("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
|
|
124
|
+
* @license lucide-react v0.469.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/const B1=Oe("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
|
|
129
|
+
* @license lucide-react v0.469.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const V1=Oe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
134
|
+
* @license lucide-react v0.469.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/const H1=Oe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
139
|
+
* @license lucide-react v0.469.0 - ISC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the ISC license.
|
|
142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/const nh=Oe("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
144
|
+
* @license lucide-react v0.469.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/const W1=Oe("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/**
|
|
149
|
+
* @license lucide-react v0.469.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/const q1=Oe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
154
|
+
* @license lucide-react v0.469.0 - ISC
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the ISC license.
|
|
157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const K1=Oe("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
|
|
159
|
+
* @license lucide-react v0.469.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/const Q1=Oe("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/**
|
|
164
|
+
* @license lucide-react v0.469.0 - ISC
|
|
165
|
+
*
|
|
166
|
+
* This source code is licensed under the ISC license.
|
|
167
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
+
*/const G1=Oe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
169
|
+
* @license lucide-react v0.469.0 - ISC
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the ISC license.
|
|
172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/const Y1=Oe("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
174
|
+
* @license lucide-react v0.469.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/const gl=Oe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
179
|
+
* @license lucide-react v0.469.0 - ISC
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the ISC license.
|
|
182
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
+
*/const Vf=Oe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
184
|
+
* @license lucide-react v0.469.0 - ISC
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the ISC license.
|
|
187
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
+
*/const X1=Oe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
189
|
+
* @license lucide-react v0.469.0 - ISC
|
|
190
|
+
*
|
|
191
|
+
* This source code is licensed under the ISC license.
|
|
192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
+
*/const J1=Oe("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
194
|
+
* @license lucide-react v0.469.0 - ISC
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the ISC license.
|
|
197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/const rh=Oe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
199
|
+
* @license lucide-react v0.469.0 - ISC
|
|
200
|
+
*
|
|
201
|
+
* This source code is licensed under the ISC license.
|
|
202
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
+
*/const Z1=Oe("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);/**
|
|
204
|
+
* @license lucide-react v0.469.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/const ev=Oe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
209
|
+
* @license lucide-react v0.469.0 - ISC
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the ISC license.
|
|
212
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
+
*/const Wa=Oe("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
214
|
+
* @license lucide-react v0.469.0 - ISC
|
|
215
|
+
*
|
|
216
|
+
* This source code is licensed under the ISC license.
|
|
217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
+
*/const tv=Oe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
219
|
+
* @license lucide-react v0.469.0 - ISC
|
|
220
|
+
*
|
|
221
|
+
* This source code is licensed under the ISC license.
|
|
222
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
+
*/const Hf=Oe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
224
|
+
* @license lucide-react v0.469.0 - ISC
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the ISC license.
|
|
227
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/const ih=Oe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
229
|
+
* @license lucide-react v0.469.0 - ISC
|
|
230
|
+
*
|
|
231
|
+
* This source code is licensed under the ISC license.
|
|
232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
+
*/const oh=Oe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
234
|
+
* @license lucide-react v0.469.0 - ISC
|
|
235
|
+
*
|
|
236
|
+
* This source code is licensed under the ISC license.
|
|
237
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
+
*/const lh=Oe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
239
|
+
* @license lucide-react v0.469.0 - ISC
|
|
240
|
+
*
|
|
241
|
+
* This source code is licensed under the ISC license.
|
|
242
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
+
*/const sh=Oe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
244
|
+
* @license lucide-react v0.469.0 - ISC
|
|
245
|
+
*
|
|
246
|
+
* This source code is licensed under the ISC license.
|
|
247
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
+
*/const pu=Oe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
249
|
+
* @license lucide-react v0.469.0 - ISC
|
|
250
|
+
*
|
|
251
|
+
* This source code is licensed under the ISC license.
|
|
252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
+
*/const Wf=Oe("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
254
|
+
* @license lucide-react v0.469.0 - ISC
|
|
255
|
+
*
|
|
256
|
+
* This source code is licensed under the ISC license.
|
|
257
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
+
*/const ah=Oe("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
259
|
+
* @license lucide-react v0.469.0 - ISC
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the ISC license.
|
|
262
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
+
*/const fr=Oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function uh(t){var r,i,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(i=uh(t[r]))&&(l&&(l+=" "),l+=i)}else for(i in t)t[i]&&(l&&(l+=" "),l+=i);return l}function ch(){for(var t,r,i=0,l="",s=arguments.length;i<s;i++)(t=arguments[i])&&(r=uh(t))&&(l&&(l+=" "),l+=r);return l}const qf=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Kf=ch,nv=(t,r)=>i=>{var l;if((r==null?void 0:r.variants)==null)return Kf(t,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:s,defaultVariants:a}=r,c=Object.keys(s).map(m=>{const g=i==null?void 0:i[m],y=a==null?void 0:a[m];if(g===null)return null;const k=qf(g)||qf(y);return s[m][k]}),f=i&&Object.entries(i).reduce((m,g)=>{let[y,k]=g;return k===void 0||(m[y]=k),m},{}),p=r==null||(l=r.compoundVariants)===null||l===void 0?void 0:l.reduce((m,g)=>{let{class:y,className:k,...v}=g;return Object.entries(v).every(N=>{let[T,_]=N;return Array.isArray(_)?_.includes({...a,...f}[T]):{...a,...f}[T]===_})?[...m,y,k]:m},[]);return Kf(t,c,p,i==null?void 0:i.class,i==null?void 0:i.className)},hu="-",rv=t=>{const r=ov(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:l}=t;return{getClassGroupId:c=>{const f=c.split(hu);return f[0]===""&&f.length!==1&&f.shift(),dh(f,r)||iv(c)},getConflictingClassGroupIds:(c,f)=>{const p=i[c]||[];return f&&l[c]?[...p,...l[c]]:p}}},dh=(t,r)=>{var c;if(t.length===0)return r.classGroupId;const i=t[0],l=r.nextPart.get(i),s=l?dh(t.slice(1),l):void 0;if(s)return s;if(r.validators.length===0)return;const a=t.join(hu);return(c=r.validators.find(({validator:f})=>f(a)))==null?void 0:c.classGroupId},Qf=/^\[(.+)\]$/,iv=t=>{if(Qf.test(t)){const r=Qf.exec(t)[1],i=r==null?void 0:r.substring(0,r.indexOf(":"));if(i)return"arbitrary.."+i}},ov=t=>{const{theme:r,prefix:i}=t,l={nextPart:new Map,validators:[]};return sv(Object.entries(t.classGroups),i).forEach(([a,c])=>{qa(c,l,a,r)}),l},qa=(t,r,i,l)=>{t.forEach(s=>{if(typeof s=="string"){const a=s===""?r:Gf(r,s);a.classGroupId=i;return}if(typeof s=="function"){if(lv(s)){qa(s(l),r,i,l);return}r.validators.push({validator:s,classGroupId:i});return}Object.entries(s).forEach(([a,c])=>{qa(c,Gf(r,a),i,l)})})},Gf=(t,r)=>{let i=t;return r.split(hu).forEach(l=>{i.nextPart.has(l)||i.nextPart.set(l,{nextPart:new Map,validators:[]}),i=i.nextPart.get(l)}),i},lv=t=>t.isThemeGetter,sv=(t,r)=>r?t.map(([i,l])=>{const s=l.map(a=>typeof a=="string"?r+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([c,f])=>[r+c,f])):a);return[i,s]}):t,av=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,i=new Map,l=new Map;const s=(a,c)=>{i.set(a,c),r++,r>t&&(r=0,l=i,i=new Map)};return{get(a){let c=i.get(a);if(c!==void 0)return c;if((c=l.get(a))!==void 0)return s(a,c),c},set(a,c){i.has(a)?i.set(a,c):s(a,c)}}},fh="!",uv=t=>{const{separator:r,experimentalParseClassName:i}=t,l=r.length===1,s=r[0],a=r.length,c=f=>{const p=[];let m=0,g=0,y;for(let _=0;_<f.length;_++){let b=f[_];if(m===0){if(b===s&&(l||f.slice(_,_+a)===r)){p.push(f.slice(g,_)),g=_+a;continue}if(b==="/"){y=_;continue}}b==="["?m++:b==="]"&&m--}const k=p.length===0?f:f.substring(g),v=k.startsWith(fh),N=v?k.substring(1):k,T=y&&y>g?y-g:void 0;return{modifiers:p,hasImportantModifier:v,baseClassName:N,maybePostfixModifierPosition:T}};return i?f=>i({className:f,parseClassName:c}):c},cv=t=>{if(t.length<=1)return t;const r=[];let i=[];return t.forEach(l=>{l[0]==="["?(r.push(...i.sort(),l),i=[]):i.push(l)}),r.push(...i.sort()),r},dv=t=>({cache:av(t.cacheSize),parseClassName:uv(t),...rv(t)}),fv=/\s+/,pv=(t,r)=>{const{parseClassName:i,getClassGroupId:l,getConflictingClassGroupIds:s}=r,a=[],c=t.trim().split(fv);let f="";for(let p=c.length-1;p>=0;p-=1){const m=c[p],{modifiers:g,hasImportantModifier:y,baseClassName:k,maybePostfixModifierPosition:v}=i(m);let N=!!v,T=l(N?k.substring(0,v):k);if(!T){if(!N){f=m+(f.length>0?" "+f:f);continue}if(T=l(k),!T){f=m+(f.length>0?" "+f:f);continue}N=!1}const _=cv(g).join(":"),b=y?_+fh:_,$=b+T;if(a.includes($))continue;a.push($);const F=s(T,N);for(let U=0;U<F.length;++U){const H=F[U];a.push(b+H)}f=m+(f.length>0?" "+f:f)}return f};function hv(){let t=0,r,i,l="";for(;t<arguments.length;)(r=arguments[t++])&&(i=ph(r))&&(l&&(l+=" "),l+=i);return l}const ph=t=>{if(typeof t=="string")return t;let r,i="";for(let l=0;l<t.length;l++)t[l]&&(r=ph(t[l]))&&(i&&(i+=" "),i+=r);return i};function mv(t,...r){let i,l,s,a=c;function c(p){const m=r.reduce((g,y)=>y(g),t());return i=dv(m),l=i.cache.get,s=i.cache.set,a=f,f(p)}function f(p){const m=l(p);if(m)return m;const g=pv(p,i);return s(p,g),g}return function(){return a(hv.apply(null,arguments))}}const Ye=t=>{const r=i=>i[t]||[];return r.isThemeGetter=!0,r},hh=/^\[(?:([a-z-]+):)?(.+)\]$/i,gv=/^\d+\/\d+$/,yv=new Set(["px","full","screen"]),xv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vv=/\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$/,wv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,En=t=>Vr(t)||yv.has(t)||gv.test(t),Kn=t=>qr(t,"length",Lv),Vr=t=>!!t&&!Number.isNaN(Number(t)),ba=t=>qr(t,"number",Vr),Oi=t=>!!t&&Number.isInteger(Number(t)),Cv=t=>t.endsWith("%")&&Vr(t.slice(0,-1)),Ie=t=>hh.test(t),Qn=t=>xv.test(t),bv=new Set(["length","size","percentage"]),Ev=t=>qr(t,bv,mh),Nv=t=>qr(t,"position",mh),jv=new Set(["image","url"]),Pv=t=>qr(t,jv,_v),Tv=t=>qr(t,"",Iv),Ri=()=>!0,qr=(t,r,i)=>{const l=hh.exec(t);return l?l[1]?typeof r=="string"?l[1]===r:r.has(l[1]):i(l[2]):!1},Lv=t=>vv.test(t)&&!wv.test(t),mh=()=>!1,Iv=t=>kv.test(t),_v=t=>Sv.test(t),Ov=()=>{const t=Ye("colors"),r=Ye("spacing"),i=Ye("blur"),l=Ye("brightness"),s=Ye("borderColor"),a=Ye("borderRadius"),c=Ye("borderSpacing"),f=Ye("borderWidth"),p=Ye("contrast"),m=Ye("grayscale"),g=Ye("hueRotate"),y=Ye("invert"),k=Ye("gap"),v=Ye("gradientColorStops"),N=Ye("gradientColorStopPositions"),T=Ye("inset"),_=Ye("margin"),b=Ye("opacity"),$=Ye("padding"),F=Ye("saturate"),U=Ye("scale"),H=Ye("sepia"),R=Ye("skew"),W=Ye("space"),A=Ye("translate"),K=()=>["auto","contain","none"],X=()=>["auto","hidden","clip","visible","scroll"],le=()=>["auto",Ie,r],D=()=>[Ie,r],re=()=>["",En,Kn],Y=()=>["auto",Vr,Ie],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],de=()=>["solid","dashed","dotted","double","none"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["start","end","center","between","around","evenly","stretch"],ce=()=>["","0",Ie],S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[Vr,Ie];return{cacheSize:500,separator:":",theme:{colors:[Ri],spacing:[En,Kn],blur:["none","",Qn,Ie],brightness:j(),borderColor:[t],borderRadius:["none","","full",Qn,Ie],borderSpacing:D(),borderWidth:re(),contrast:j(),grayscale:ce(),hueRotate:j(),invert:ce(),gap:D(),gradientColorStops:[t],gradientColorStopPositions:[Cv,Kn],inset:le(),margin:le(),opacity:j(),padding:D(),saturate:j(),scale:j(),sepia:ce(),skew:j(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],container:["container"],columns:[{columns:[Qn]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:[...Q(),Ie]}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[T]}],"inset-x":[{"inset-x":[T]}],"inset-y":[{"inset-y":[T]}],start:[{start:[T]}],end:[{end:[T]}],top:[{top:[T]}],right:[{right:[T]}],bottom:[{bottom:[T]}],left:[{left:[T]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Oi,Ie]}],basis:[{basis:le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ie]}],grow:[{grow:ce()}],shrink:[{shrink:ce()}],order:[{order:["first","last","none",Oi,Ie]}],"grid-cols":[{"grid-cols":[Ri]}],"col-start-end":[{col:["auto",{span:["full",Oi,Ie]},Ie]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[Ri]}],"row-start-end":[{row:["auto",{span:[Oi,Ie]},Ie]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ie]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[$]}],px:[{px:[$]}],py:[{py:[$]}],ps:[{ps:[$]}],pe:[{pe:[$]}],pt:[{pt:[$]}],pr:[{pr:[$]}],pb:[{pb:[$]}],pl:[{pl:[$]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ie,r]}],"min-w":[{"min-w":[Ie,r,"min","max","fit"]}],"max-w":[{"max-w":[Ie,r,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[Ie,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ie,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ie,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ie,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Kn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ba]}],"font-family":[{font:[Ri]}],"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",Ie]}],"line-clamp":[{"line-clamp":["none",Vr,ba]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",En,Ie]}],"list-image":[{"list-image":["none",Ie]}],"list-style-type":[{list:["none","disc","decimal",Ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",En,Kn]}],"underline-offset":[{"underline-offset":["auto",En,Ie]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie]}],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",Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),Nv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ev]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Pv]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...de(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:de()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...de()]}],"outline-offset":[{"outline-offset":[En,Ie]}],"outline-w":[{outline:[En,Kn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[En,Kn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Qn,Tv]}],"shadow-color":[{shadow:[Ri]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...fe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":fe()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[l]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",Qn,Ie]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[y]}],saturate:[{saturate:[F]}],sepia:[{sepia:[H]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[l]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ie]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[U]}],"scale-x":[{"scale-x":[U]}],"scale-y":[{"scale-y":[U]}],rotate:[{rotate:[Oi,Ie]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ie]}],accent:[{accent:["auto",t]}],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",Ie]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",Ie]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[En,Kn,ba]}],stroke:[{stroke:[t,"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"]}}},Rv=mv(Ov);function pr(...t){return Rv(ch(t))}const zv=nv("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-red-500 text-white hover:bg-red-500/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),rn=I.forwardRef(({className:t,variant:r,size:i,...l},s)=>x.jsx("button",{className:pr(zv({variant:r,size:i,className:t})),ref:s,...l}));rn.displayName="Button";function gh({title:t,description:r,confirmLabel:i,cancelLabel:l,variant:s="danger",onConfirm:a,onCancel:c}){const{t:f}=Et(),p=i??f("confirm"),m=l??f("cancel"),g=I.useCallback(k=>{k.key==="Escape"&&c()},[c]);I.useEffect(()=>(document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)),[g]);const y=s==="danger"?"bg-red-600 hover:bg-red-500 text-white":"bg-amber-600 hover:bg-amber-500 text-white";return x.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:k=>{k.stopPropagation(),k.target===k.currentTarget&&c()},children:x.jsxs("div",{className:"bg-card border border-border rounded-lg w-full max-w-sm shadow-xl mx-4 p-4",children:[x.jsx("h3",{className:"text-sm font-medium text-foreground",children:t}),x.jsx("p",{className:"mt-1.5 text-xs text-muted-foreground",children:r}),x.jsxs("div",{className:"mt-4 flex gap-2 justify-end",children:[x.jsx("button",{onClick:c,className:"text-xs px-3 py-1.5 rounded bg-muted text-muted-foreground hover:bg-accent transition-colors",children:m}),x.jsx("button",{onClick:a,className:`text-xs px-3 py-1.5 rounded transition-colors ${y}`,children:p})]})]})})}const Yf=80;function Av(t){return!t.sourceTrace||t.sourceTrace.length===0?null:t.sourceTrace.map(r=>` ${r.source}${r.line?`:${r.line}`:""}`).join(`
|
|
264
|
+
`)}function Mv({entries:t,onEntryClick:r,onDismiss:i,onClearAll:l}){const{t:s}=Et(),[a,c]=I.useState(!1),f=v=>{r(v),c(!1)},p=t.filter(v=>v.level==="error").length,m=t.filter(v=>v.level==="warning").length,g=t.length>0,y=t.slice(-5).reverse(),k=t.length-y.length;return x.jsxs("div",{className:"mx-4 my-1.5 flex flex-col-reverse gap-2",children:[x.jsxs("button",{onClick:()=>g&&c(v=>!v),className:`flex items-center gap-2 px-2.5 py-1.5 rounded-md border border-border bg-card/60 text-xs transition-colors ${g?"hover:bg-muted/60 cursor-pointer":"cursor-default"}`,children:[x.jsxs("span",{className:"flex items-center gap-1 text-red-600/60 dark:text-red-400/60 font-medium",children:[x.jsx(fu,{className:"w-3 h-3"}),p]}),x.jsxs("span",{className:"flex items-center gap-1 text-yellow-600 dark:text-yellow-400/60 font-medium",children:[x.jsx(pu,{className:"w-3 h-3"}),m]}),g&&x.jsxs(x.Fragment,{children:[x.jsx("span",{role:"button",onClick:v=>{v.stopPropagation(),l()},className:"flex items-center gap-1 ml-auto text-muted-foreground hover:text-foreground transition-colors",children:x.jsx(sh,{className:"w-3 h-3"})}),x.jsx(Cl,{className:`w-3 h-3 text-muted-foreground transition-transform ${a?"":"rotate-180"}`})]})]}),a&&x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("div",{className:"flex flex-col gap-1 max-h-[140px] overflow-y-auto",children:y.map(v=>x.jsx(Dv,{entry:v,onEntryClick:f,onDismiss:i},v.id))}),k>0&&x.jsx("span",{className:"text-[11px] text-muted-foreground px-1",children:s("plusMore",{count:k})})]})]})}function Dv({entry:t,onEntryClick:r,onDismiss:i}){const[l,s]=I.useState(!1),a=I.useRef(null),c=Av(t),f=()=>{if(!a.current)return;const p=a.current.getBoundingClientRect();return{position:"fixed",bottom:window.innerHeight-p.top+6,left:p.left}};return x.jsxs("div",{ref:a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[x.jsxs("button",{onClick:()=>r(t),className:`group flex items-start gap-1.5 px-2.5 py-2 rounded-md border text-left text-xs transition-colors cursor-pointer w-full ${t.level==="error"?"border-red-300/60 bg-red-100/60 text-red-800 hover:bg-red-200/60 dark:border-red-800/60 dark:bg-red-950/40 dark:text-red-200 dark:hover:bg-red-900/40":"border-yellow-300/60 bg-yellow-100/60 text-yellow-800 hover:bg-yellow-200/60 dark:border-yellow-800/60 dark:bg-yellow-950/40 dark:text-yellow-200 dark:hover:bg-yellow-900/40"}`,children:[t.level==="error"?x.jsx(fu,{className:"w-3.5 h-3.5 mt-0.5 shrink-0 text-red-600 dark:text-red-400"}):x.jsx(pu,{className:"w-3.5 h-3.5 mt-0.5 shrink-0 text-yellow-600 dark:text-yellow-400"}),x.jsx("span",{className:"flex-1 min-w-0 truncate",children:t.message.length>Yf?t.message.slice(0,Yf)+"…":t.message}),t.source&&x.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground font-mono",children:[t.source.split("/").pop(),t.line?`:${t.line}`:""]}),t.count>1&&x.jsx("span",{className:`shrink-0 px-1.5 py-0.5 rounded text-[10px] font-medium ${t.level==="error"?"bg-red-200/60 text-red-800 dark:bg-red-800/60 dark:text-red-200":"bg-yellow-200/60 text-yellow-800 dark:bg-yellow-800/60 dark:text-yellow-200"}`,children:t.count}),x.jsx("span",{role:"button",onClick:p=>{p.stopPropagation(),i(t.id)},className:"shrink-0 opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-foreground transition-opacity",children:x.jsx(fr,{className:"w-3.5 h-3.5"})})]}),l&&c&&x.jsxs("div",{style:f(),className:"z-[9999] w-72 max-h-48 overflow-y-auto rounded-md border border-border bg-card p-2.5 text-xs text-foreground shadow-lg whitespace-pre-wrap break-words font-mono pointer-events-none",children:[t.message,`
|
|
265
|
+
|
|
266
|
+
`,c]})]})}function Fv({images:t,currentIndex:r,onClose:i,onNavigate:l}){const{t:s}=Et(),a=t.length>1,c=I.useCallback(()=>{r<t.length-1&&l(r+1)},[r,t.length,l]),f=I.useCallback(()=>{r>0&&l(r-1)},[r,l]);return I.useEffect(()=>{const p=m=>{m.key==="Escape"&&i(),m.key==="ArrowRight"&&c(),m.key==="ArrowLeft"&&f()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[i,c,f]),x.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80",onClick:i,children:[x.jsx("button",{onClick:i,className:"absolute top-4 right-4 text-white/70 hover:text-white transition-colors",children:x.jsx(fr,{className:"w-6 h-6"})}),a&&r>0&&x.jsx("button",{onClick:p=>{p.stopPropagation(),f()},className:"absolute left-4 top-1/2 -translate-y-1/2 text-white/70 hover:text-white transition-colors",children:x.jsx(M1,{className:"w-8 h-8"})}),x.jsx("img",{src:t[r],alt:s("previewAlt",{index:r+1}),className:"max-w-[90vw] max-h-[90vh] object-contain rounded-lg",onClick:p=>p.stopPropagation()}),a&&r<t.length-1&&x.jsx("button",{onClick:p=>{p.stopPropagation(),c()},className:"absolute right-4 top-1/2 -translate-y-1/2 text-white/70 hover:text-white transition-colors",children:x.jsx(cu,{className:"w-8 h-8"})}),a&&x.jsxs("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 text-white/70 text-sm",children:[r+1," / ",t.length]})]})}function $v(t,r){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const Uv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vv={};function Xf(t,r){return(Vv.jsx?Bv:Uv).test(t)}const Hv=/[ \t\n\f\r]/g;function Wv(t){return typeof t=="object"?t.type==="text"?Jf(t.value):!1:Jf(t)}function Jf(t){return t.replace(Hv,"")===""}class Qi{constructor(r,i,l){this.normal=i,this.property=r,l&&(this.space=l)}}Qi.prototype.normal={};Qi.prototype.property={};Qi.prototype.space=void 0;function yh(t,r){const i={},l={};for(const s of t)Object.assign(i,s.property),Object.assign(l,s.normal);return new Qi(i,l,r)}function Ka(t){return t.toLowerCase()}class Rt{constructor(r,i){this.attribute=i,this.property=r}}Rt.prototype.attribute="";Rt.prototype.booleanish=!1;Rt.prototype.boolean=!1;Rt.prototype.commaOrSpaceSeparated=!1;Rt.prototype.commaSeparated=!1;Rt.prototype.defined=!1;Rt.prototype.mustUseProperty=!1;Rt.prototype.number=!1;Rt.prototype.overloadedBoolean=!1;Rt.prototype.property="";Rt.prototype.spaceSeparated=!1;Rt.prototype.space=void 0;let qv=0;const _e=hr(),it=hr(),Qa=hr(),oe=hr(),qe=hr(),Hr=hr(),$t=hr();function hr(){return 2**++qv}const Ga=Object.freeze(Object.defineProperty({__proto__:null,boolean:_e,booleanish:it,commaOrSpaceSeparated:$t,commaSeparated:Hr,number:oe,overloadedBoolean:Qa,spaceSeparated:qe},Symbol.toStringTag,{value:"Module"})),Ea=Object.keys(Ga);class mu extends Rt{constructor(r,i,l,s){let a=-1;if(super(r,i),Zf(this,"space",s),typeof l=="number")for(;++a<Ea.length;){const c=Ea[a];Zf(this,Ea[a],(l&Ga[c])===Ga[c])}}}mu.prototype.defined=!0;function Zf(t,r,i){i&&(t[r]=i)}function Kr(t){const r={},i={};for(const[l,s]of Object.entries(t.properties)){const a=new mu(l,t.transform(t.attributes||{},l),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(l)&&(a.mustUseProperty=!0),r[l]=a,i[Ka(l)]=l,i[Ka(a.attribute)]=l}return new Qi(r,i,t.space)}const xh=Kr({properties:{ariaActiveDescendant:null,ariaAtomic:it,ariaAutoComplete:null,ariaBusy:it,ariaChecked:it,ariaColCount:oe,ariaColIndex:oe,ariaColSpan:oe,ariaControls:qe,ariaCurrent:null,ariaDescribedBy:qe,ariaDetails:null,ariaDisabled:it,ariaDropEffect:qe,ariaErrorMessage:null,ariaExpanded:it,ariaFlowTo:qe,ariaGrabbed:it,ariaHasPopup:null,ariaHidden:it,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qe,ariaLevel:oe,ariaLive:null,ariaModal:it,ariaMultiLine:it,ariaMultiSelectable:it,ariaOrientation:null,ariaOwns:qe,ariaPlaceholder:null,ariaPosInSet:oe,ariaPressed:it,ariaReadOnly:it,ariaRelevant:null,ariaRequired:it,ariaRoleDescription:qe,ariaRowCount:oe,ariaRowIndex:oe,ariaRowSpan:oe,ariaSelected:it,ariaSetSize:oe,ariaSort:null,ariaValueMax:oe,ariaValueMin:oe,ariaValueNow:oe,ariaValueText:null,role:null},transform(t,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function vh(t,r){return r in t?t[r]:r}function wh(t,r){return vh(t,r.toLowerCase())}const Kv=Kr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Hr,acceptCharset:qe,accessKey:qe,action:null,allow:null,allowFullScreen:_e,allowPaymentRequest:_e,allowUserMedia:_e,alt:null,as:null,async:_e,autoCapitalize:null,autoComplete:qe,autoFocus:_e,autoPlay:_e,blocking:qe,capture:null,charSet:null,checked:_e,cite:null,className:qe,cols:oe,colSpan:null,content:null,contentEditable:it,controls:_e,controlsList:qe,coords:oe|Hr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_e,defer:_e,dir:null,dirName:null,disabled:_e,download:Qa,draggable:it,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_e,formTarget:null,headers:qe,height:oe,hidden:Qa,high:oe,href:null,hrefLang:null,htmlFor:qe,httpEquiv:qe,id:null,imageSizes:null,imageSrcSet:null,inert:_e,inputMode:null,integrity:null,is:null,isMap:_e,itemId:null,itemProp:qe,itemRef:qe,itemScope:_e,itemType:qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_e,low:oe,manifest:null,max:null,maxLength:oe,media:null,method:null,min:null,minLength:oe,multiple:_e,muted:_e,name:null,nonce:null,noModule:_e,noValidate:_e,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:_e,optimum:oe,pattern:null,ping:qe,placeholder:null,playsInline:_e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_e,referrerPolicy:null,rel:qe,required:_e,reversed:_e,rows:oe,rowSpan:oe,sandbox:qe,scope:null,scoped:_e,seamless:_e,selected:_e,shadowRootClonable:_e,shadowRootDelegatesFocus:_e,shadowRootMode:null,shape:null,size:oe,sizes:null,slot:null,span:oe,spellCheck:it,src:null,srcDoc:null,srcLang:null,srcSet:null,start:oe,step:null,style:null,tabIndex:oe,target:null,title:null,translate:null,type:null,typeMustMatch:_e,useMap:null,value:it,width:oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qe,axis:null,background:null,bgColor:null,border:oe,borderColor:null,bottomMargin:oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_e,declare:_e,event:null,face:null,frame:null,frameBorder:null,hSpace:oe,leftMargin:oe,link:null,longDesc:null,lowSrc:null,marginHeight:oe,marginWidth:oe,noResize:_e,noHref:_e,noShade:_e,noWrap:_e,object:null,profile:null,prompt:null,rev:null,rightMargin:oe,rules:null,scheme:null,scrolling:it,standby:null,summary:null,text:null,topMargin:oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_e,disableRemotePlayback:_e,prefix:null,property:null,results:oe,security:null,unselectable:null},space:"html",transform:wh}),Qv=Kr({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",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:$t,accentHeight:oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:oe,amplitude:oe,arabicForm:null,ascent:oe,attributeName:null,attributeType:null,azimuth:oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:oe,by:null,calcMode:null,capHeight:oe,className:qe,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:oe,diffuseConstant:oe,direction:null,display:null,dur:null,divisor:oe,dominantBaseline:null,download:_e,dx:null,dy:null,edgeMode:null,editable:null,elevation:oe,enableBackground:null,end:null,event:null,exponent:oe,externalResourcesRequired:null,fill:null,fillOpacity:oe,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:Hr,g2:Hr,glyphName:Hr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:oe,horizOriginX:oe,horizOriginY:oe,id:null,ideographic:oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:oe,k:oe,k1:oe,k2:oe,k3:oe,k4:oe,kernelMatrix:$t,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:oe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:oe,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:oe,overlineThickness:oe,paintOrder:null,panose1:null,path:null,pathLength:oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:oe,pointsAtY:oe,pointsAtZ:oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$t,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$t,rev:$t,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$t,requiredFeatures:$t,requiredFonts:$t,requiredFormats:$t,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:oe,specularExponent:oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:oe,strikethroughThickness:oe,string:null,stroke:null,strokeDashArray:$t,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:oe,strokeOpacity:oe,strokeWidth:null,style:null,surfaceScale:oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$t,tabIndex:oe,tableValues:null,target:null,targetX:oe,targetY:oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$t,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:oe,underlineThickness:oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:oe,values:null,vAlphabetic:oe,vMathematical:oe,vectorEffect:null,vHanging:oe,vIdeographic:oe,version:null,vertAdvY:oe,vertOriginX:oe,vertOriginY:oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vh}),kh=Kr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,r){return"xlink:"+r.slice(5).toLowerCase()}}),Sh=Kr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wh}),Ch=Kr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,r){return"xml:"+r.slice(3).toLowerCase()}}),Gv={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"},Yv=/[A-Z]/g,ep=/-[a-z]/g,Xv=/^data[-\w.:]+$/i;function Jv(t,r){const i=Ka(r);let l=r,s=Rt;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&Xv.test(r)){if(r.charAt(4)==="-"){const a=r.slice(5).replace(ep,ew);l="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=r.slice(4);if(!ep.test(a)){let c=a.replace(Yv,Zv);c.charAt(0)!=="-"&&(c="-"+c),r="data"+c}}s=mu}return new s(l,r)}function Zv(t){return"-"+t.toLowerCase()}function ew(t){return t.charAt(1).toUpperCase()}const tw=yh([xh,Kv,kh,Sh,Ch],"html"),gu=yh([xh,Qv,kh,Sh,Ch],"svg");function nw(t){return t.join(" ").trim()}var $r={},Na,tp;function rw(){if(tp)return Na;tp=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,p=`
|
|
267
|
+
`,m="/",g="*",y="",k="comment",v="declaration";function N(_,b){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];b=b||{};var $=1,F=1;function U(Y){var Q=Y.match(r);Q&&($+=Q.length);var de=Y.lastIndexOf(p);F=~de?Y.length-de:F+Y.length}function H(){var Y={line:$,column:F};return function(Q){return Q.position=new R(Y),K(),Q}}function R(Y){this.start=Y,this.end={line:$,column:F},this.source=b.source}R.prototype.content=_;function W(Y){var Q=new Error(b.source+":"+$+":"+F+": "+Y);if(Q.reason=Y,Q.filename=b.source,Q.line=$,Q.column=F,Q.source=_,!b.silent)throw Q}function A(Y){var Q=Y.exec(_);if(Q){var de=Q[0];return U(de),_=_.slice(de.length),Q}}function K(){A(i)}function X(Y){var Q;for(Y=Y||[];Q=le();)Q!==!1&&Y.push(Q);return Y}function le(){var Y=H();if(!(m!=_.charAt(0)||g!=_.charAt(1))){for(var Q=2;y!=_.charAt(Q)&&(g!=_.charAt(Q)||m!=_.charAt(Q+1));)++Q;if(Q+=2,y===_.charAt(Q-1))return W("End of comment missing");var de=_.slice(2,Q-2);return F+=2,U(de),_=_.slice(Q),F+=2,Y({type:k,comment:de})}}function D(){var Y=H(),Q=A(l);if(Q){if(le(),!A(s))return W("property missing ':'");var de=A(a),fe=Y({type:v,property:T(Q[0].replace(t,y)),value:de?T(de[0].replace(t,y)):y});return A(c),fe}}function re(){var Y=[];X(Y);for(var Q;Q=D();)Q!==!1&&(Y.push(Q),X(Y));return Y}return K(),re()}function T(_){return _?_.replace(f,y):y}return Na=N,Na}var np;function iw(){if(np)return $r;np=1;var t=$r&&$r.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty($r,"__esModule",{value:!0}),$r.default=i;const r=t(rw());function i(l,s){let a=null;if(!l||typeof l!="string")return a;const c=(0,r.default)(l),f=typeof s=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:g}=p;f?s(m,g,p):g&&(a=a||{},a[m]=g)}),a}return $r}var zi={},rp;function ow(){if(rp)return zi;rp=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(m){return!m||i.test(m)||t.test(m)},c=function(m,g){return g.toUpperCase()},f=function(m,g){return"".concat(g,"-")},p=function(m,g){return g===void 0&&(g={}),a(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(s,f):m=m.replace(l,f),m.replace(r,c))};return zi.camelCase=p,zi}var Ai,ip;function lw(){if(ip)return Ai;ip=1;var t=Ai&&Ai.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=t(iw()),i=ow();function l(s,a){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(f,p){f&&p&&(c[(0,i.camelCase)(f,a)]=p)}),c}return l.default=l,Ai=l,Ai}var sw=lw();const aw=wl(sw),bh=Eh("end"),yu=Eh("start");function Eh(t){return r;function r(i){const l=i&&i.position&&i.position[t]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function uw(t){const r=yu(t),i=bh(t);if(r&&i)return{start:r,end:i}}function Bi(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?op(t.position):"start"in t||"end"in t?op(t):"line"in t||"column"in t?Ya(t):""}function Ya(t){return lp(t&&t.line)+":"+lp(t&&t.column)}function op(t){return Ya(t&&t.start)+"-"+Ya(t&&t.end)}function lp(t){return t&&typeof t=="number"?t:1}class kt extends Error{constructor(r,i,l){super(),typeof i=="string"&&(l=i,i=void 0);let s="",a={},c=!1;if(i&&("line"in i&&"column"in i?a={place:i}:"start"in i&&"end"in i?a={place:i}:"type"in i?a={ancestors:[i],place:i.position}:a={...i}),typeof r=="string"?s=r:!a.cause&&r&&(c=!0,s=r.message,a.cause=r),!a.ruleId&&!a.source&&typeof l=="string"){const p=l.indexOf(":");p===-1?a.ruleId=l:(a.source=l.slice(0,p),a.ruleId=l.slice(p+1))}if(!a.place&&a.ancestors&&a.ancestors){const p=a.ancestors[a.ancestors.length-1];p&&(a.place=p.position)}const f=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Bi(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=c&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}kt.prototype.file="";kt.prototype.name="";kt.prototype.reason="";kt.prototype.message="";kt.prototype.stack="";kt.prototype.column=void 0;kt.prototype.line=void 0;kt.prototype.ancestors=void 0;kt.prototype.cause=void 0;kt.prototype.fatal=void 0;kt.prototype.place=void 0;kt.prototype.ruleId=void 0;kt.prototype.source=void 0;const xu={}.hasOwnProperty,cw=new Map,dw=/[A-Z]/g,fw=new Set(["table","tbody","thead","tfoot","tr"]),pw=new Set(["td","th"]),Nh="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hw(t,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=r.filePath||void 0;let l;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=Sw(i,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=kw(i,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:l,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?gu:tw,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},a=jh(s,t,void 0);return a&&typeof a!="string"?a:s.create(t,s.Fragment,{children:a||void 0},void 0)}function jh(t,r,i){if(r.type==="element")return mw(t,r,i);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return gw(t,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return xw(t,r,i);if(r.type==="mdxjsEsm")return yw(t,r);if(r.type==="root")return vw(t,r,i);if(r.type==="text")return ww(t,r)}function mw(t,r,i){const l=t.schema;let s=l;r.tagName.toLowerCase()==="svg"&&l.space==="html"&&(s=gu,t.schema=s),t.ancestors.push(r);const a=Th(t,r.tagName,!1),c=Cw(t,r);let f=wu(t,r);return fw.has(r.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!Wv(p):!0})),Ph(t,c,a,r),vu(c,f),t.ancestors.pop(),t.schema=l,t.create(r,a,c,i)}function gw(t,r){if(r.data&&r.data.estree&&t.evaluater){const l=r.data.estree.body[0];return l.type,t.evaluater.evaluateExpression(l.expression)}qi(t,r.position)}function yw(t,r){if(r.data&&r.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(r.data.estree);qi(t,r.position)}function xw(t,r,i){const l=t.schema;let s=l;r.name==="svg"&&l.space==="html"&&(s=gu,t.schema=s),t.ancestors.push(r);const a=r.name===null?t.Fragment:Th(t,r.name,!0),c=bw(t,r),f=wu(t,r);return Ph(t,c,a,r),vu(c,f),t.ancestors.pop(),t.schema=l,t.create(r,a,c,i)}function vw(t,r,i){const l={};return vu(l,wu(t,r)),t.create(r,t.Fragment,l,i)}function ww(t,r){return r.value}function Ph(t,r,i,l){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(r.node=l)}function vu(t,r){if(r.length>0){const i=r.length>1?r:r[0];i&&(t.children=i)}}function kw(t,r,i){return l;function l(s,a,c,f){const m=Array.isArray(c.children)?i:r;return f?m(a,c,f):m(a,c)}}function Sw(t,r){return i;function i(l,s,a,c){const f=Array.isArray(a.children),p=yu(l);return r(s,a,c,f,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function Cw(t,r){const i={};let l,s;for(s in r.properties)if(s!=="children"&&xu.call(r.properties,s)){const a=Ew(t,s,r.properties[s]);if(a){const[c,f]=a;t.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&pw.has(r.tagName)?l=f:i[c]=f}}if(l){const a=i.style||(i.style={});a[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return i}function bw(t,r){const i={};for(const l of r.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&t.evaluater){const a=l.data.estree.body[0];a.type;const c=a.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,t.evaluater.evaluateExpression(f.argument))}else qi(t,r.position);else{const s=l.name;let a;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&t.evaluater){const f=l.value.data.estree.body[0];f.type,a=t.evaluater.evaluateExpression(f.expression)}else qi(t,r.position);else a=l.value===null?!0:l.value;i[s]=a}return i}function wu(t,r){const i=[];let l=-1;const s=t.passKeys?new Map:cw;for(;++l<r.children.length;){const a=r.children[l];let c;if(t.passKeys){const p=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(p){const m=s.get(p)||0;c=p+"-"+m,s.set(p,m+1)}}const f=jh(t,a,c);f!==void 0&&i.push(f)}return i}function Ew(t,r,i){const l=Jv(t.schema,r);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=l.commaSeparated?$v(i):nw(i)),l.property==="style"){let s=typeof i=="object"?i:Nw(t,String(i));return t.stylePropertyNameCase==="css"&&(s=jw(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&l.space?Gv[l.property]||l.property:l.attribute,i]}}function Nw(t,r){try{return aw(r,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const l=i,s=new kt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=Nh+"#cannot-parse-style-attribute",s}}function Th(t,r,i){let l;if(!i)l={type:"Literal",value:r};else if(r.includes(".")){const s=r.split(".");let a=-1,c;for(;++a<s.length;){const f=Xf(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(a&&f.type==="Literal"),optional:!1}:f}l=c}else l=Xf(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(l.type==="Literal"){const s=l.value;return xu.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(l);qi(t)}function qi(t,r){const i=new kt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Nh+"#cannot-handle-mdx-estrees-without-createevaluater",i}function jw(t){const r={};let i;for(i in t)xu.call(t,i)&&(r[Pw(i)]=t[i]);return r}function Pw(t){let r=t.replace(dw,Tw);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function Tw(t){return"-"+t.toLowerCase()}const ja={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"]},Lw={};function Iw(t,r){const i=Lw,l=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return Lh(t,l,s)}function Lh(t,r,i){if(_w(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(r&&"alt"in t&&t.alt)return t.alt;if("children"in t)return sp(t.children,r,i)}return Array.isArray(t)?sp(t,r,i):""}function sp(t,r,i){const l=[];let s=-1;for(;++s<t.length;)l[s]=Lh(t[s],r,i);return l.join("")}function _w(t){return!!(t&&typeof t=="object")}const ap=document.createElement("i");function ku(t){const r="&"+t+";";ap.innerHTML=r;const i=ap.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===r?!1:i}function hn(t,r,i,l){const s=t.length;let a=0,c;if(r<0?r=-r>s?0:s+r:r=r>s?s:r,i=i>0?i:0,l.length<1e4)c=Array.from(l),c.unshift(r,i),t.splice(...c);else for(i&&t.splice(r,i);a<l.length;)c=l.slice(a,a+1e4),c.unshift(r,0),t.splice(...c),a+=1e4,r+=1e4}function Gt(t,r){return t.length>0?(hn(t,t.length,0,r),t):r}const up={}.hasOwnProperty;function Ow(t){const r={};let i=-1;for(;++i<t.length;)Rw(r,t[i]);return r}function Rw(t,r){let i;for(i in r){const s=(up.call(t,i)?t[i]:void 0)||(t[i]={}),a=r[i];let c;if(a)for(c in a){up.call(s,c)||(s[c]=[]);const f=a[c];zw(s[c],Array.isArray(f)?f:f?[f]:[])}}}function zw(t,r){let i=-1;const l=[];for(;++i<r.length;)(r[i].add==="after"?t:l).push(r[i]);hn(t,0,0,l)}function Ih(t,r){const i=Number.parseInt(t,r);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Wr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fn=Yn(/[A-Za-z]/),Ut=Yn(/[\dA-Za-z]/),Aw=Yn(/[#-'*+\--9=?A-Z^-~]/);function Xa(t){return t!==null&&(t<32||t===127)}const Ja=Yn(/\d/),Mw=Yn(/[\dA-Fa-f]/),Dw=Yn(/[!-/:-@[-`{-~]/);function Pe(t){return t!==null&&t<-2}function Ot(t){return t!==null&&(t<0||t===32)}function Ue(t){return t===-2||t===-1||t===32}const Fw=Yn(new RegExp("\\p{P}|\\p{S}","u")),$w=Yn(/\s/);function Yn(t){return r;function r(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Qr(t){const r=[];let i=-1,l=0,s=0;for(;++i<t.length;){const a=t.charCodeAt(i);let c="";if(a===37&&Ut(t.charCodeAt(i+1))&&Ut(t.charCodeAt(i+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(c=String.fromCharCode(a));else if(a>55295&&a<57344){const f=t.charCodeAt(i+1);a<56320&&f>56319&&f<57344?(c=String.fromCharCode(a,f),s=1):c="�"}else c=String.fromCharCode(a);c&&(r.push(t.slice(l,i),encodeURIComponent(c)),l=i+s+1,c=""),s&&(i+=s,s=0)}return r.join("")+t.slice(l)}function Ke(t,r,i,l){const s=l?l-1:Number.POSITIVE_INFINITY;let a=0;return c;function c(p){return Ue(p)?(t.enter(i),f(p)):r(p)}function f(p){return Ue(p)&&a++<s?(t.consume(p),f):(t.exit(i),r(p))}}const Uw={tokenize:Bw};function Bw(t){const r=t.attempt(this.parser.constructs.contentInitial,l,s);let i;return r;function l(f){if(f===null){t.consume(f);return}return t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Ke(t,r,"linePrefix")}function s(f){return t.enter("paragraph"),a(f)}function a(f){const p=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,c(f)}function c(f){if(f===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(f);return}return Pe(f)?(t.consume(f),t.exit("chunkText"),a):(t.consume(f),c)}}const Vw={tokenize:Hw},cp={tokenize:Ww};function Hw(t){const r=this,i=[];let l=0,s,a,c;return f;function f(F){if(l<i.length){const U=i[l];return r.containerState=U[1],t.attempt(U[0].continuation,p,m)(F)}return m(F)}function p(F){if(l++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,s&&$();const U=r.events.length;let H=U,R;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){R=r.events[H][1].end;break}b(l);let W=U;for(;W<r.events.length;)r.events[W][1].end={...R},W++;return hn(r.events,H+1,0,r.events.slice(U)),r.events.length=W,m(F)}return f(F)}function m(F){if(l===i.length){if(!s)return k(F);if(s.currentConstruct&&s.currentConstruct.concrete)return N(F);r.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return r.containerState={},t.check(cp,g,y)(F)}function g(F){return s&&$(),b(l),k(F)}function y(F){return r.parser.lazy[r.now().line]=l!==i.length,c=r.now().offset,N(F)}function k(F){return r.containerState={},t.attempt(cp,v,N)(F)}function v(F){return l++,i.push([r.currentConstruct,r.containerState]),k(F)}function N(F){if(F===null){s&&$(),b(0),t.consume(F);return}return s=s||r.parser.flow(r.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),T(F)}function T(F){if(F===null){_(t.exit("chunkFlow"),!0),b(0),t.consume(F);return}return Pe(F)?(t.consume(F),_(t.exit("chunkFlow")),l=0,r.interrupt=void 0,f):(t.consume(F),T)}function _(F,U){const H=r.sliceStream(F);if(U&&H.push(null),F.previous=a,a&&(a.next=F),a=F,s.defineSkip(F.start),s.write(H),r.parser.lazy[F.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<c&&(!s.events[R][1].end||s.events[R][1].end.offset>c))return;const W=r.events.length;let A=W,K,X;for(;A--;)if(r.events[A][0]==="exit"&&r.events[A][1].type==="chunkFlow"){if(K){X=r.events[A][1].end;break}K=!0}for(b(l),R=W;R<r.events.length;)r.events[R][1].end={...X},R++;hn(r.events,A+1,0,r.events.slice(W)),r.events.length=R}}function b(F){let U=i.length;for(;U-- >F;){const H=i[U];r.containerState=H[1],H[0].exit.call(r,t)}i.length=F}function $(){s.write([null]),a=void 0,s=void 0,r.containerState._closeFlow=void 0}}function Ww(t,r,i){return Ke(t,t.attempt(this.parser.constructs.document,r,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function dp(t){if(t===null||Ot(t)||$w(t))return 1;if(Fw(t))return 2}function Su(t,r,i){const l=[];let s=-1;for(;++s<t.length;){const a=t[s].resolveAll;a&&!l.includes(a)&&(r=a(r,i),l.push(a))}return r}const Za={name:"attention",resolveAll:qw,tokenize:Kw};function qw(t,r){let i=-1,l,s,a,c,f,p,m,g;for(;++i<t.length;)if(t[i][0]==="enter"&&t[i][1].type==="attentionSequence"&&t[i][1]._close){for(l=i;l--;)if(t[l][0]==="exit"&&t[l][1].type==="attentionSequence"&&t[l][1]._open&&r.sliceSerialize(t[l][1]).charCodeAt(0)===r.sliceSerialize(t[i][1]).charCodeAt(0)){if((t[l][1]._close||t[i][1]._open)&&(t[i][1].end.offset-t[i][1].start.offset)%3&&!((t[l][1].end.offset-t[l][1].start.offset+t[i][1].end.offset-t[i][1].start.offset)%3))continue;p=t[l][1].end.offset-t[l][1].start.offset>1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;const y={...t[l][1].end},k={...t[i][1].start};fp(y,-p),fp(k,p),c={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...t[l][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:k},a={type:p>1?"strongText":"emphasisText",start:{...t[l][1].end},end:{...t[i][1].start}},s={type:p>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},t[l][1].end={...c.start},t[i][1].start={...f.end},m=[],t[l][1].end.offset-t[l][1].start.offset&&(m=Gt(m,[["enter",t[l][1],r],["exit",t[l][1],r]])),m=Gt(m,[["enter",s,r],["enter",c,r],["exit",c,r],["enter",a,r]]),m=Gt(m,Su(r.parser.constructs.insideSpan.null,t.slice(l+1,i),r)),m=Gt(m,[["exit",a,r],["enter",f,r],["exit",f,r],["exit",s,r]]),t[i][1].end.offset-t[i][1].start.offset?(g=2,m=Gt(m,[["enter",t[i][1],r],["exit",t[i][1],r]])):g=0,hn(t,l-1,i-l+3,m),i=l+m.length-g-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function Kw(t,r){const i=this.parser.constructs.attentionMarkers.null,l=this.previous,s=dp(l);let a;return c;function c(p){return a=p,t.enter("attentionSequence"),f(p)}function f(p){if(p===a)return t.consume(p),f;const m=t.exit("attentionSequence"),g=dp(p),y=!g||g===2&&s||i.includes(p),k=!s||s===2&&g||i.includes(l);return m._open=!!(a===42?y:y&&(s||!k)),m._close=!!(a===42?k:k&&(g||!y)),r(p)}}function fp(t,r){t.column+=r,t.offset+=r,t._bufferIndex+=r}const Qw={name:"autolink",tokenize:Gw};function Gw(t,r,i){let l=0;return s;function s(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),a}function a(v){return fn(v)?(t.consume(v),c):v===64?i(v):m(v)}function c(v){return v===43||v===45||v===46||Ut(v)?(l=1,f(v)):m(v)}function f(v){return v===58?(t.consume(v),l=0,p):(v===43||v===45||v===46||Ut(v))&&l++<32?(t.consume(v),f):(l=0,m(v))}function p(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),r):v===null||v===32||v===60||Xa(v)?i(v):(t.consume(v),p)}function m(v){return v===64?(t.consume(v),g):Aw(v)?(t.consume(v),m):i(v)}function g(v){return Ut(v)?y(v):i(v)}function y(v){return v===46?(t.consume(v),l=0,g):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),r):k(v)}function k(v){if((v===45||Ut(v))&&l++<63){const N=v===45?k:y;return t.consume(v),N}return i(v)}}const bl={partial:!0,tokenize:Yw};function Yw(t,r,i){return l;function l(a){return Ue(a)?Ke(t,s,"linePrefix")(a):s(a)}function s(a){return a===null||Pe(a)?r(a):i(a)}}const _h={continuation:{tokenize:Jw},exit:Zw,name:"blockQuote",tokenize:Xw};function Xw(t,r,i){const l=this;return s;function s(c){if(c===62){const f=l.containerState;return f.open||(t.enter("blockQuote",{_container:!0}),f.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),a}return i(c)}function a(c){return Ue(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),r):(t.exit("blockQuotePrefix"),r(c))}}function Jw(t,r,i){const l=this;return s;function s(c){return Ue(c)?Ke(t,a,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):a(c)}function a(c){return t.attempt(_h,r,i)(c)}}function Zw(t){t.exit("blockQuote")}const Oh={name:"characterEscape",tokenize:ek};function ek(t,r,i){return l;function l(a){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(a),t.exit("escapeMarker"),s}function s(a){return Dw(a)?(t.enter("characterEscapeValue"),t.consume(a),t.exit("characterEscapeValue"),t.exit("characterEscape"),r):i(a)}}const Rh={name:"characterReference",tokenize:tk};function tk(t,r,i){const l=this;let s=0,a,c;return f;function f(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),p}function p(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),a=31,c=Ut,g(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),a=6,c=Mw,g):(t.enter("characterReferenceValue"),a=7,c=Ja,g(y))}function g(y){if(y===59&&s){const k=t.exit("characterReferenceValue");return c===Ut&&!ku(l.sliceSerialize(k))?i(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),r)}return c(y)&&s++<a?(t.consume(y),g):i(y)}}const pp={partial:!0,tokenize:rk},hp={concrete:!0,name:"codeFenced",tokenize:nk};function nk(t,r,i){const l=this,s={partial:!0,tokenize:H};let a=0,c=0,f;return p;function p(R){return m(R)}function m(R){const W=l.events[l.events.length-1];return a=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,f=R,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),g(R)}function g(R){return R===f?(c++,t.consume(R),g):c<3?i(R):(t.exit("codeFencedFenceSequence"),Ue(R)?Ke(t,y,"whitespace")(R):y(R))}function y(R){return R===null||Pe(R)?(t.exit("codeFencedFence"),l.interrupt?r(R):t.check(pp,T,U)(R)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),k(R))}function k(R){return R===null||Pe(R)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(R)):Ue(R)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ke(t,v,"whitespace")(R)):R===96&&R===f?i(R):(t.consume(R),k)}function v(R){return R===null||Pe(R)?y(R):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(R))}function N(R){return R===null||Pe(R)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(R)):R===96&&R===f?i(R):(t.consume(R),N)}function T(R){return t.attempt(s,U,_)(R)}function _(R){return t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),b}function b(R){return a>0&&Ue(R)?Ke(t,$,"linePrefix",a+1)(R):$(R)}function $(R){return R===null||Pe(R)?t.check(pp,T,U)(R):(t.enter("codeFlowValue"),F(R))}function F(R){return R===null||Pe(R)?(t.exit("codeFlowValue"),$(R)):(t.consume(R),F)}function U(R){return t.exit("codeFenced"),r(R)}function H(R,W,A){let K=0;return X;function X(Q){return R.enter("lineEnding"),R.consume(Q),R.exit("lineEnding"),le}function le(Q){return R.enter("codeFencedFence"),Ue(Q)?Ke(R,D,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):D(Q)}function D(Q){return Q===f?(R.enter("codeFencedFenceSequence"),re(Q)):A(Q)}function re(Q){return Q===f?(K++,R.consume(Q),re):K>=c?(R.exit("codeFencedFenceSequence"),Ue(Q)?Ke(R,Y,"whitespace")(Q):Y(Q)):A(Q)}function Y(Q){return Q===null||Pe(Q)?(R.exit("codeFencedFence"),W(Q)):A(Q)}}}function rk(t,r,i){const l=this;return s;function s(c){return c===null?i(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),a)}function a(c){return l.parser.lazy[l.now().line]?i(c):r(c)}}const Pa={name:"codeIndented",tokenize:ok},ik={partial:!0,tokenize:lk};function ok(t,r,i){const l=this;return s;function s(m){return t.enter("codeIndented"),Ke(t,a,"linePrefix",5)(m)}function a(m){const g=l.events[l.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):i(m)}function c(m){return m===null?p(m):Pe(m)?t.attempt(ik,c,p)(m):(t.enter("codeFlowValue"),f(m))}function f(m){return m===null||Pe(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),f)}function p(m){return t.exit("codeIndented"),r(m)}}function lk(t,r,i){const l=this;return s;function s(c){return l.parser.lazy[l.now().line]?i(c):Pe(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):Ke(t,a,"linePrefix",5)(c)}function a(c){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):Pe(c)?s(c):i(c)}}const sk={name:"codeText",previous:uk,resolve:ak,tokenize:ck};function ak(t){let r=t.length-4,i=3,l,s;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[r][1].type==="lineEnding"||t[r][1].type==="space")){for(l=i;++l<r;)if(t[l][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(l=i-1,r++;++l<=r;)s===void 0?l!==r&&t[l][1].type!=="lineEnding"&&(s=l):(l===r||t[l][1].type==="lineEnding")&&(t[s][1].type="codeTextData",l!==s+2&&(t[s][1].end=t[l-1][1].end,t.splice(s+2,l-s-2),r-=l-s-2,l=s+2),s=void 0);return t}function uk(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ck(t,r,i){let l=0,s,a;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),f(y)}function f(y){return y===96?(t.consume(y),l++,f):(t.exit("codeTextSequence"),p(y))}function p(y){return y===null?i(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),p):y===96?(a=t.enter("codeTextSequence"),s=0,g(y)):Pe(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||Pe(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function g(y){return y===96?(t.consume(y),s++,g):s===l?(t.exit("codeTextSequence"),t.exit("codeText"),r(y)):(a.type="codeTextData",m(y))}}class dk{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,i){const l=i??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(r,l):r>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(r,i,l){const s=i||0;this.setCursor(Math.trunc(r));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return l&&Mi(this.left,l),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Mi(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Mi(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const i=this.left.splice(r,Number.POSITIVE_INFINITY);Mi(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Mi(this.left,i.reverse())}}}function Mi(t,r){let i=0;if(r.length<1e4)t.push(...r);else for(;i<r.length;)t.push(...r.slice(i,i+1e4)),i+=1e4}function zh(t){const r={};let i=-1,l,s,a,c,f,p,m;const g=new dk(t);for(;++i<g.length;){for(;i in r;)i=r[i];if(l=g.get(i),i&&l[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(p=l[1]._tokenizer.events,a=0,a<p.length&&p[a][1].type==="lineEndingBlank"&&(a+=2),a<p.length&&p[a][1].type==="content"))for(;++a<p.length&&p[a][1].type!=="content";)p[a][1].type==="chunkText"&&(p[a][1]._isInFirstContentOfListItem=!0,a++);if(l[0]==="enter")l[1].contentType&&(Object.assign(r,fk(g,i)),i=r[i],m=!0);else if(l[1]._container){for(a=i,s=void 0;a--;)if(c=g.get(a),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=a);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(l[1].end={...g.get(s)[1].start},f=g.slice(s,i),f.unshift(l),g.splice(s,i-s+1,f))}}return hn(t,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function fk(t,r){const i=t.get(r)[1],l=t.get(r)[2];let s=r-1;const a=[];let c=i._tokenizer;c||(c=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,p=[],m={};let g,y,k=-1,v=i,N=0,T=0;const _=[T];for(;v;){for(;t.get(++s)[1]!==v;);a.push(s),v._tokenizer||(g=l.sliceStream(v),v.next||g.push(null),y&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=i;++k<f.length;)f[k][0]==="exit"&&f[k-1][0]==="enter"&&f[k][1].type===f[k-1][1].type&&f[k][1].start.line!==f[k][1].end.line&&(T=k+1,_.push(T),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):_.pop(),k=_.length;k--;){const b=f.slice(_[k],_[k+1]),$=a.pop();p.push([$,$+b.length-1]),t.splice($,2,b)}for(p.reverse(),k=-1;++k<p.length;)m[N+p[k][0]]=N+p[k][1],N+=p[k][1]-p[k][0]-1;return m}const pk={resolve:mk,tokenize:gk},hk={partial:!0,tokenize:yk};function mk(t){return zh(t),t}function gk(t,r){let i;return l;function l(f){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?a(f):Pe(f)?t.check(hk,c,a)(f):(t.consume(f),s)}function a(f){return t.exit("chunkContent"),t.exit("content"),r(f)}function c(f){return t.consume(f),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,s}}function yk(t,r,i){const l=this;return s;function s(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Ke(t,a,"linePrefix")}function a(c){if(c===null||Pe(c))return i(c);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):t.interrupt(l.parser.constructs.flow,i,r)(c)}}function Ah(t,r,i,l,s,a,c,f,p){const m=p||Number.POSITIVE_INFINITY;let g=0;return y;function y(b){return b===60?(t.enter(l),t.enter(s),t.enter(a),t.consume(b),t.exit(a),k):b===null||b===32||b===41||Xa(b)?i(b):(t.enter(l),t.enter(c),t.enter(f),t.enter("chunkString",{contentType:"string"}),T(b))}function k(b){return b===62?(t.enter(a),t.consume(b),t.exit(a),t.exit(s),t.exit(l),r):(t.enter(f),t.enter("chunkString",{contentType:"string"}),v(b))}function v(b){return b===62?(t.exit("chunkString"),t.exit(f),k(b)):b===null||b===60||Pe(b)?i(b):(t.consume(b),b===92?N:v)}function N(b){return b===60||b===62||b===92?(t.consume(b),v):v(b)}function T(b){return!g&&(b===null||b===41||Ot(b))?(t.exit("chunkString"),t.exit(f),t.exit(c),t.exit(l),r(b)):g<m&&b===40?(t.consume(b),g++,T):b===41?(t.consume(b),g--,T):b===null||b===32||b===40||Xa(b)?i(b):(t.consume(b),b===92?_:T)}function _(b){return b===40||b===41||b===92?(t.consume(b),T):T(b)}}function Mh(t,r,i,l,s,a){const c=this;let f=0,p;return m;function m(v){return t.enter(l),t.enter(s),t.consume(v),t.exit(s),t.enter(a),g}function g(v){return f>999||v===null||v===91||v===93&&!p||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(v):v===93?(t.exit(a),t.enter(s),t.consume(v),t.exit(s),t.exit(l),r):Pe(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),g):(t.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||Pe(v)||f++>999?(t.exit("chunkString"),g(v)):(t.consume(v),p||(p=!Ue(v)),v===92?k:y)}function k(v){return v===91||v===92||v===93?(t.consume(v),f++,y):y(v)}}function Dh(t,r,i,l,s,a){let c;return f;function f(k){return k===34||k===39||k===40?(t.enter(l),t.enter(s),t.consume(k),t.exit(s),c=k===40?41:k,p):i(k)}function p(k){return k===c?(t.enter(s),t.consume(k),t.exit(s),t.exit(l),r):(t.enter(a),m(k))}function m(k){return k===c?(t.exit(a),p(c)):k===null?i(k):Pe(k)?(t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),Ke(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===c||k===null||Pe(k)?(t.exit("chunkString"),m(k)):(t.consume(k),k===92?y:g)}function y(k){return k===c||k===92?(t.consume(k),g):g(k)}}function Vi(t,r){let i;return l;function l(s){return Pe(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i=!0,l):Ue(s)?Ke(t,l,i?"linePrefix":"lineSuffix")(s):r(s)}}const xk={name:"definition",tokenize:wk},vk={partial:!0,tokenize:kk};function wk(t,r,i){const l=this;let s;return a;function a(v){return t.enter("definition"),c(v)}function c(v){return Mh.call(l,t,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=Wr(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),p):i(v)}function p(v){return Ot(v)?Vi(t,m)(v):m(v)}function m(v){return Ah(t,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return t.attempt(vk,y,y)(v)}function y(v){return Ue(v)?Ke(t,k,"whitespace")(v):k(v)}function k(v){return v===null||Pe(v)?(t.exit("definition"),l.parser.defined.push(s),r(v)):i(v)}}function kk(t,r,i){return l;function l(f){return Ot(f)?Vi(t,s)(f):i(f)}function s(f){return Dh(t,a,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function a(f){return Ue(f)?Ke(t,c,"whitespace")(f):c(f)}function c(f){return f===null||Pe(f)?r(f):i(f)}}const Sk={name:"hardBreakEscape",tokenize:Ck};function Ck(t,r,i){return l;function l(a){return t.enter("hardBreakEscape"),t.consume(a),s}function s(a){return Pe(a)?(t.exit("hardBreakEscape"),r(a)):i(a)}}const bk={name:"headingAtx",resolve:Ek,tokenize:Nk};function Ek(t,r){let i=t.length-2,l=3,s,a;return t[l][1].type==="whitespace"&&(l+=2),i-2>l&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(l===i-1||i-4>l&&t[i-2][1].type==="whitespace")&&(i-=l+1===i?2:4),i>l&&(s={type:"atxHeadingText",start:t[l][1].start,end:t[i][1].end},a={type:"chunkText",start:t[l][1].start,end:t[i][1].end,contentType:"text"},hn(t,l,i-l+1,[["enter",s,r],["enter",a,r],["exit",a,r],["exit",s,r]])),t}function Nk(t,r,i){let l=0;return s;function s(g){return t.enter("atxHeading"),a(g)}function a(g){return t.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&l++<6?(t.consume(g),c):g===null||Ot(g)?(t.exit("atxHeadingSequence"),f(g)):i(g)}function f(g){return g===35?(t.enter("atxHeadingSequence"),p(g)):g===null||Pe(g)?(t.exit("atxHeading"),r(g)):Ue(g)?Ke(t,f,"whitespace")(g):(t.enter("atxHeadingText"),m(g))}function p(g){return g===35?(t.consume(g),p):(t.exit("atxHeadingSequence"),f(g))}function m(g){return g===null||g===35||Ot(g)?(t.exit("atxHeadingText"),f(g)):(t.consume(g),m)}}const jk=["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"],mp=["pre","script","style","textarea"],Pk={concrete:!0,name:"htmlFlow",resolveTo:Ik,tokenize:_k},Tk={partial:!0,tokenize:Rk},Lk={partial:!0,tokenize:Ok};function Ik(t){let r=t.length;for(;r--&&!(t[r][0]==="enter"&&t[r][1].type==="htmlFlow"););return r>1&&t[r-2][1].type==="linePrefix"&&(t[r][1].start=t[r-2][1].start,t[r+1][1].start=t[r-2][1].start,t.splice(r-2,2)),t}function _k(t,r,i){const l=this;let s,a,c,f,p;return m;function m(C){return g(C)}function g(C){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(C),y}function y(C){return C===33?(t.consume(C),k):C===47?(t.consume(C),a=!0,T):C===63?(t.consume(C),s=3,l.interrupt?r:S):fn(C)?(t.consume(C),c=String.fromCharCode(C),_):i(C)}function k(C){return C===45?(t.consume(C),s=2,v):C===91?(t.consume(C),s=5,f=0,N):fn(C)?(t.consume(C),s=4,l.interrupt?r:S):i(C)}function v(C){return C===45?(t.consume(C),l.interrupt?r:S):i(C)}function N(C){const Se="CDATA[";return C===Se.charCodeAt(f++)?(t.consume(C),f===Se.length?l.interrupt?r:D:N):i(C)}function T(C){return fn(C)?(t.consume(C),c=String.fromCharCode(C),_):i(C)}function _(C){if(C===null||C===47||C===62||Ot(C)){const Se=C===47,Ee=c.toLowerCase();return!Se&&!a&&mp.includes(Ee)?(s=1,l.interrupt?r(C):D(C)):jk.includes(c.toLowerCase())?(s=6,Se?(t.consume(C),b):l.interrupt?r(C):D(C)):(s=7,l.interrupt&&!l.parser.lazy[l.now().line]?i(C):a?$(C):F(C))}return C===45||Ut(C)?(t.consume(C),c+=String.fromCharCode(C),_):i(C)}function b(C){return C===62?(t.consume(C),l.interrupt?r:D):i(C)}function $(C){return Ue(C)?(t.consume(C),$):X(C)}function F(C){return C===47?(t.consume(C),X):C===58||C===95||fn(C)?(t.consume(C),U):Ue(C)?(t.consume(C),F):X(C)}function U(C){return C===45||C===46||C===58||C===95||Ut(C)?(t.consume(C),U):H(C)}function H(C){return C===61?(t.consume(C),R):Ue(C)?(t.consume(C),H):F(C)}function R(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(t.consume(C),p=C,W):Ue(C)?(t.consume(C),R):A(C)}function W(C){return C===p?(t.consume(C),p=null,K):C===null||Pe(C)?i(C):(t.consume(C),W)}function A(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Ot(C)?H(C):(t.consume(C),A)}function K(C){return C===47||C===62||Ue(C)?F(C):i(C)}function X(C){return C===62?(t.consume(C),le):i(C)}function le(C){return C===null||Pe(C)?D(C):Ue(C)?(t.consume(C),le):i(C)}function D(C){return C===45&&s===2?(t.consume(C),de):C===60&&s===1?(t.consume(C),fe):C===62&&s===4?(t.consume(C),j):C===63&&s===3?(t.consume(C),S):C===93&&s===5?(t.consume(C),ce):Pe(C)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Tk,B,re)(C)):C===null||Pe(C)?(t.exit("htmlFlowData"),re(C)):(t.consume(C),D)}function re(C){return t.check(Lk,Y,B)(C)}function Y(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),Q}function Q(C){return C===null||Pe(C)?re(C):(t.enter("htmlFlowData"),D(C))}function de(C){return C===45?(t.consume(C),S):D(C)}function fe(C){return C===47?(t.consume(C),c="",ee):D(C)}function ee(C){if(C===62){const Se=c.toLowerCase();return mp.includes(Se)?(t.consume(C),j):D(C)}return fn(C)&&c.length<8?(t.consume(C),c+=String.fromCharCode(C),ee):D(C)}function ce(C){return C===93?(t.consume(C),S):D(C)}function S(C){return C===62?(t.consume(C),j):C===45&&s===2?(t.consume(C),S):D(C)}function j(C){return C===null||Pe(C)?(t.exit("htmlFlowData"),B(C)):(t.consume(C),j)}function B(C){return t.exit("htmlFlow"),r(C)}}function Ok(t,r,i){const l=this;return s;function s(c){return Pe(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),a):i(c)}function a(c){return l.parser.lazy[l.now().line]?i(c):r(c)}}function Rk(t,r,i){return l;function l(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(bl,r,i)}}const zk={name:"htmlText",tokenize:Ak};function Ak(t,r,i){const l=this;let s,a,c;return f;function f(S){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(S),p}function p(S){return S===33?(t.consume(S),m):S===47?(t.consume(S),H):S===63?(t.consume(S),F):fn(S)?(t.consume(S),A):i(S)}function m(S){return S===45?(t.consume(S),g):S===91?(t.consume(S),a=0,N):fn(S)?(t.consume(S),$):i(S)}function g(S){return S===45?(t.consume(S),v):i(S)}function y(S){return S===null?i(S):S===45?(t.consume(S),k):Pe(S)?(c=y,fe(S)):(t.consume(S),y)}function k(S){return S===45?(t.consume(S),v):y(S)}function v(S){return S===62?de(S):S===45?k(S):y(S)}function N(S){const j="CDATA[";return S===j.charCodeAt(a++)?(t.consume(S),a===j.length?T:N):i(S)}function T(S){return S===null?i(S):S===93?(t.consume(S),_):Pe(S)?(c=T,fe(S)):(t.consume(S),T)}function _(S){return S===93?(t.consume(S),b):T(S)}function b(S){return S===62?de(S):S===93?(t.consume(S),b):T(S)}function $(S){return S===null||S===62?de(S):Pe(S)?(c=$,fe(S)):(t.consume(S),$)}function F(S){return S===null?i(S):S===63?(t.consume(S),U):Pe(S)?(c=F,fe(S)):(t.consume(S),F)}function U(S){return S===62?de(S):F(S)}function H(S){return fn(S)?(t.consume(S),R):i(S)}function R(S){return S===45||Ut(S)?(t.consume(S),R):W(S)}function W(S){return Pe(S)?(c=W,fe(S)):Ue(S)?(t.consume(S),W):de(S)}function A(S){return S===45||Ut(S)?(t.consume(S),A):S===47||S===62||Ot(S)?K(S):i(S)}function K(S){return S===47?(t.consume(S),de):S===58||S===95||fn(S)?(t.consume(S),X):Pe(S)?(c=K,fe(S)):Ue(S)?(t.consume(S),K):de(S)}function X(S){return S===45||S===46||S===58||S===95||Ut(S)?(t.consume(S),X):le(S)}function le(S){return S===61?(t.consume(S),D):Pe(S)?(c=le,fe(S)):Ue(S)?(t.consume(S),le):K(S)}function D(S){return S===null||S===60||S===61||S===62||S===96?i(S):S===34||S===39?(t.consume(S),s=S,re):Pe(S)?(c=D,fe(S)):Ue(S)?(t.consume(S),D):(t.consume(S),Y)}function re(S){return S===s?(t.consume(S),s=void 0,Q):S===null?i(S):Pe(S)?(c=re,fe(S)):(t.consume(S),re)}function Y(S){return S===null||S===34||S===39||S===60||S===61||S===96?i(S):S===47||S===62||Ot(S)?K(S):(t.consume(S),Y)}function Q(S){return S===47||S===62||Ot(S)?K(S):i(S)}function de(S){return S===62?(t.consume(S),t.exit("htmlTextData"),t.exit("htmlText"),r):i(S)}function fe(S){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),ee}function ee(S){return Ue(S)?Ke(t,ce,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ce(S)}function ce(S){return t.enter("htmlTextData"),c(S)}}const Cu={name:"labelEnd",resolveAll:$k,resolveTo:Uk,tokenize:Bk},Mk={tokenize:Vk},Dk={tokenize:Hk},Fk={tokenize:Wk};function $k(t){let r=-1;const i=[];for(;++r<t.length;){const l=t[r][1];if(i.push(t[r]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const s=l.type==="labelImage"?4:2;l.type="data",r+=s}}return t.length!==i.length&&hn(t,0,t.length,i),t}function Uk(t,r){let i=t.length,l=0,s,a,c,f;for(;i--;)if(s=t[i][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[i][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(t[i][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=i,s.type!=="labelLink")){l=2;break}}else s.type==="labelEnd"&&(c=i);const p={type:t[a][1].type==="labelLink"?"link":"image",start:{...t[a][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[a][1].start},end:{...t[c][1].end}},g={type:"labelText",start:{...t[a+l+2][1].end},end:{...t[c-2][1].start}};return f=[["enter",p,r],["enter",m,r]],f=Gt(f,t.slice(a+1,a+l+3)),f=Gt(f,[["enter",g,r]]),f=Gt(f,Su(r.parser.constructs.insideSpan.null,t.slice(a+l+4,c-3),r)),f=Gt(f,[["exit",g,r],t[c-2],t[c-1],["exit",m,r]]),f=Gt(f,t.slice(c+1)),f=Gt(f,[["exit",p,r]]),hn(t,a,t.length,f),t}function Bk(t,r,i){const l=this;let s=l.events.length,a,c;for(;s--;)if((l.events[s][1].type==="labelImage"||l.events[s][1].type==="labelLink")&&!l.events[s][1]._balanced){a=l.events[s][1];break}return f;function f(k){return a?a._inactive?y(k):(c=l.parser.defined.includes(Wr(l.sliceSerialize({start:a.end,end:l.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(k),t.exit("labelMarker"),t.exit("labelEnd"),p):i(k)}function p(k){return k===40?t.attempt(Mk,g,c?g:y)(k):k===91?t.attempt(Dk,g,c?m:y)(k):c?g(k):y(k)}function m(k){return t.attempt(Fk,g,y)(k)}function g(k){return r(k)}function y(k){return a._balanced=!0,i(k)}}function Vk(t,r,i){return l;function l(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return Ot(y)?Vi(t,a)(y):a(y)}function a(y){return y===41?g(y):Ah(t,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Ot(y)?Vi(t,p)(y):g(y)}function f(y){return i(y)}function p(y){return y===34||y===39||y===40?Dh(t,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function m(y){return Ot(y)?Vi(t,g)(y):g(y)}function g(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),r):i(y)}}function Hk(t,r,i){const l=this;return s;function s(f){return Mh.call(l,t,a,c,"reference","referenceMarker","referenceString")(f)}function a(f){return l.parser.defined.includes(Wr(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?r(f):i(f)}function c(f){return i(f)}}function Wk(t,r,i){return l;function l(a){return t.enter("reference"),t.enter("referenceMarker"),t.consume(a),t.exit("referenceMarker"),s}function s(a){return a===93?(t.enter("referenceMarker"),t.consume(a),t.exit("referenceMarker"),t.exit("reference"),r):i(a)}}const qk={name:"labelStartImage",resolveAll:Cu.resolveAll,tokenize:Kk};function Kk(t,r,i){const l=this;return s;function s(f){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(f),t.exit("labelImageMarker"),a}function a(f){return f===91?(t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(f):r(f)}}const Qk={name:"labelStartLink",resolveAll:Cu.resolveAll,tokenize:Gk};function Gk(t,r,i){const l=this;return s;function s(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),a}function a(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(c):r(c)}}const Ta={name:"lineEnding",tokenize:Yk};function Yk(t,r){return i;function i(l){return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),Ke(t,r,"linePrefix")}}const fl={name:"thematicBreak",tokenize:Xk};function Xk(t,r,i){let l=0,s;return a;function a(m){return t.enter("thematicBreak"),c(m)}function c(m){return s=m,f(m)}function f(m){return m===s?(t.enter("thematicBreakSequence"),p(m)):l>=3&&(m===null||Pe(m))?(t.exit("thematicBreak"),r(m)):i(m)}function p(m){return m===s?(t.consume(m),l++,p):(t.exit("thematicBreakSequence"),Ue(m)?Ke(t,f,"whitespace")(m):f(m))}}const _t={continuation:{tokenize:tS},exit:rS,name:"list",tokenize:eS},Jk={partial:!0,tokenize:iS},Zk={partial:!0,tokenize:nS};function eS(t,r,i){const l=this,s=l.events[l.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(v){const N=l.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!l.containerState.marker||v===l.containerState.marker:Ja(v)){if(l.containerState.type||(l.containerState.type=N,t.enter(N,{_container:!0})),N==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(fl,i,m)(v):m(v);if(!l.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(v)}return i(v)}function p(v){return Ja(v)&&++c<10?(t.consume(v),p):(!l.interrupt||c<2)&&(l.containerState.marker?v===l.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):i(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||v,t.check(bl,l.interrupt?i:g,t.attempt(Jk,k,y))}function g(v){return l.containerState.initialBlankLine=!0,a++,k(v)}function y(v){return Ue(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),k):i(v)}function k(v){return l.containerState.size=a+l.sliceSerialize(t.exit("listItemPrefix"),!0).length,r(v)}}function tS(t,r,i){const l=this;return l.containerState._closeFlow=void 0,t.check(bl,s,a);function s(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Ke(t,r,"listItemIndent",l.containerState.size+1)(f)}function a(f){return l.containerState.furtherBlankLines||!Ue(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,t.attempt(Zk,r,c)(f))}function c(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Ke(t,t.attempt(_t,r,i),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function nS(t,r,i){const l=this;return Ke(t,s,"listItemIndent",l.containerState.size+1);function s(a){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?r(a):i(a)}}function rS(t){t.exit(this.containerState.type)}function iS(t,r,i){const l=this;return Ke(t,s,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const c=l.events[l.events.length-1];return!Ue(a)&&c&&c[1].type==="listItemPrefixWhitespace"?r(a):i(a)}}const gp={name:"setextUnderline",resolveTo:oS,tokenize:lS};function oS(t,r){let i=t.length,l,s,a;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){l=i;break}t[i][1].type==="paragraph"&&(s=i)}else t[i][1].type==="content"&&t.splice(i,1),!a&&t[i][1].type==="definition"&&(a=i);const c={type:"setextHeading",start:{...t[l][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",a?(t.splice(s,0,["enter",c,r]),t.splice(a+1,0,["exit",t[l][1],r]),t[l][1].end={...t[a][1].end}):t[l][1]=c,t.push(["exit",c,r]),t}function lS(t,r,i){const l=this;let s;return a;function a(m){let g=l.events.length,y;for(;g--;)if(l.events[g][1].type!=="lineEnding"&&l.events[g][1].type!=="linePrefix"&&l.events[g][1].type!=="content"){y=l.events[g][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||y)?(t.enter("setextHeadingLine"),s=m,c(m)):i(m)}function c(m){return t.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===s?(t.consume(m),f):(t.exit("setextHeadingLineSequence"),Ue(m)?Ke(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Pe(m)?(t.exit("setextHeadingLine"),r(m)):i(m)}}const sS={tokenize:aS};function aS(t){const r=this,i=t.attempt(bl,l,t.attempt(this.parser.constructs.flowInitial,s,Ke(t,t.attempt(this.parser.constructs.flow,s,t.attempt(pk,s)),"linePrefix")));return i;function l(a){if(a===null){t.consume(a);return}return t.enter("lineEndingBlank"),t.consume(a),t.exit("lineEndingBlank"),r.currentConstruct=void 0,i}function s(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),r.currentConstruct=void 0,i}}const uS={resolveAll:$h()},cS=Fh("string"),dS=Fh("text");function Fh(t){return{resolveAll:$h(t==="text"?fS:void 0),tokenize:r};function r(i){const l=this,s=this.parser.constructs[t],a=i.attempt(s,c,f);return c;function c(g){return m(g)?a(g):f(g)}function f(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),p}function p(g){return m(g)?(i.exit("data"),a(g)):(i.consume(g),p)}function m(g){if(g===null)return!0;const y=s[g];let k=-1;if(y)for(;++k<y.length;){const v=y[k];if(!v.previous||v.previous.call(l,l.previous))return!0}return!1}}}function $h(t){return r;function r(i,l){let s=-1,a;for(;++s<=i.length;)a===void 0?i[s]&&i[s][1].type==="data"&&(a=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==a+2&&(i[a][1].end=i[s-1][1].end,i.splice(a+2,s-a-2),s=a+2),a=void 0);return t?t(i,l):i}}function fS(t,r){let i=0;for(;++i<=t.length;)if((i===t.length||t[i][1].type==="lineEnding")&&t[i-1][1].type==="data"){const l=t[i-1][1],s=r.sliceStream(l);let a=s.length,c=-1,f=0,p;for(;a--;){const m=s[a];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)p=!0,f++;else if(m!==-1){a++;break}}if(r._contentTypeTextTrailing&&i===t.length&&(f=0),f){const m={type:i===t.length||p||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?c:l.start._bufferIndex+c,_index:l.start._index+a,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...m.start},l.start.offset===l.end.offset?Object.assign(l,m):(t.splice(i,0,["enter",m,r],["exit",m,r]),i+=2)}i++}return t}const pS={42:_t,43:_t,45:_t,48:_t,49:_t,50:_t,51:_t,52:_t,53:_t,54:_t,55:_t,56:_t,57:_t,62:_h},hS={91:xk},mS={[-2]:Pa,[-1]:Pa,32:Pa},gS={35:bk,42:fl,45:[gp,fl],60:Pk,61:gp,95:fl,96:hp,126:hp},yS={38:Rh,92:Oh},xS={[-5]:Ta,[-4]:Ta,[-3]:Ta,33:qk,38:Rh,42:Za,60:[Qw,zk],91:Qk,92:[Sk,Oh],93:Cu,95:Za,96:sk},vS={null:[Za,uS]},wS={null:[42,95]},kS={null:[]},SS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:wS,contentInitial:hS,disable:kS,document:pS,flow:gS,flowInitial:mS,insideSpan:vS,string:yS,text:xS},Symbol.toStringTag,{value:"Module"}));function CS(t,r,i){let l={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const s={},a=[];let c=[],f=[];const p={attempt:W(H),check:W(R),consume:$,enter:F,exit:U,interrupt:W(R,{interrupt:!0})},m={code:null,containerState:{},defineSkip:T,events:[],now:N,parser:t,previous:null,sliceSerialize:k,sliceStream:v,write:y};let g=r.tokenize.call(m,p);return r.resolveAll&&a.push(r),m;function y(le){return c=Gt(c,le),_(),c[c.length-1]!==null?[]:(A(r,0),m.events=Su(a,m.events,m),m.events)}function k(le,D){return ES(v(le),D)}function v(le){return bS(c,le)}function N(){const{_bufferIndex:le,_index:D,line:re,column:Y,offset:Q}=l;return{_bufferIndex:le,_index:D,line:re,column:Y,offset:Q}}function T(le){s[le.line]=le.column,X()}function _(){let le;for(;l._index<c.length;){const D=c[l._index];if(typeof D=="string")for(le=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===le&&l._bufferIndex<D.length;)b(D.charCodeAt(l._bufferIndex));else b(D)}}function b(le){g=g(le)}function $(le){Pe(le)?(l.line++,l.column=1,l.offset+=le===-3?2:1,X()):le!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),m.previous=le}function F(le,D){const re=D||{};return re.type=le,re.start=N(),m.events.push(["enter",re,m]),f.push(re),re}function U(le){const D=f.pop();return D.end=N(),m.events.push(["exit",D,m]),D}function H(le,D){A(le,D.from)}function R(le,D){D.restore()}function W(le,D){return re;function re(Y,Q,de){let fe,ee,ce,S;return Array.isArray(Y)?B(Y):"tokenize"in Y?B([Y]):j(Y);function j(G){return V;function V(J){const pe=J!==null&&G[J],ae=J!==null&&G.null,ye=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return B(ye)(J)}}function B(G){return fe=G,ee=0,G.length===0?de:C(G[ee])}function C(G){return V;function V(J){return S=K(),ce=G,G.partial||(m.currentConstruct=G),G.name&&m.parser.constructs.disable.null.includes(G.name)?Ee():G.tokenize.call(D?Object.assign(Object.create(m),D):m,p,Se,Ee)(J)}}function Se(G){return le(ce,S),Q}function Ee(G){return S.restore(),++ee<fe.length?C(fe[ee]):de}}}function A(le,D){le.resolveAll&&!a.includes(le)&&a.push(le),le.resolve&&hn(m.events,D,m.events.length-D,le.resolve(m.events.slice(D),m)),le.resolveTo&&(m.events=le.resolveTo(m.events,m))}function K(){const le=N(),D=m.previous,re=m.currentConstruct,Y=m.events.length,Q=Array.from(f);return{from:Y,restore:de};function de(){l=le,m.previous=D,m.currentConstruct=re,m.events.length=Y,f=Q,X()}}function X(){l.line in s&&l.column<2&&(l.column=s[l.line],l.offset+=s[l.line]-1)}}function bS(t,r){const i=r.start._index,l=r.start._bufferIndex,s=r.end._index,a=r.end._bufferIndex;let c;if(i===s)c=[t[i].slice(l,a)];else{if(c=t.slice(i,s),l>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(l):c.shift()}a>0&&c.push(t[s].slice(0,a))}return c}function ES(t,r){let i=-1;const l=[];let s;for(;++i<t.length;){const a=t[i];let c;if(typeof a=="string")c=a;else switch(a){case-5:{c="\r";break}case-4:{c=`
|
|
268
|
+
`;break}case-3:{c=`\r
|
|
269
|
+
`;break}case-2:{c=r?" ":" ";break}case-1:{if(!r&&s)continue;c=" ";break}default:c=String.fromCharCode(a)}s=a===-2,l.push(c)}return l.join("")}function NS(t){const l={constructs:Ow([SS,...(t||{}).extensions||[]]),content:s(Uw),defined:[],document:s(Vw),flow:s(sS),lazy:{},string:s(cS),text:s(dS)};return l;function s(a){return c;function c(f){return CS(l,a,f)}}}function jS(t){for(;!zh(t););return t}const yp=/[\0\t\n\r]/g;function PS(){let t=1,r="",i=!0,l;return s;function s(a,c,f){const p=[];let m,g,y,k,v;for(a=r+(typeof a=="string"?a.toString():new TextDecoder(c||void 0).decode(a)),y=0,r="",i&&(a.charCodeAt(0)===65279&&y++,i=void 0);y<a.length;){if(yp.lastIndex=y,m=yp.exec(a),k=m&&m.index!==void 0?m.index:a.length,v=a.charCodeAt(k),!m){r=a.slice(y);break}if(v===10&&y===k&&l)p.push(-3),l=void 0;else switch(l&&(p.push(-5),l=void 0),y<k&&(p.push(a.slice(y,k)),t+=k-y),v){case 0:{p.push(65533),t++;break}case 9:{for(g=Math.ceil(t/4)*4,p.push(-2);t++<g;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:l=!0,t=1}y=k+1}return f&&(l&&p.push(-5),r&&p.push(r),p.push(null)),p}}const TS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function LS(t){return t.replace(TS,IS)}function IS(t,r,i){if(r)return r;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),a=s===120||s===88;return Ih(i.slice(a?2:1),a?16:10)}return ku(i)||t}const Uh={}.hasOwnProperty;function _S(t,r,i){return typeof r!="string"&&(i=r,r=void 0),OS(i)(jS(NS(i).document().write(PS()(t,r,!0))))}function OS(t){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(st),autolinkProtocol:K,autolinkEmail:K,atxHeading:a(ve),blockQuote:a(ae),characterEscape:K,characterReference:K,codeFenced:a(ye),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(ye,c),codeText:a(Le,c),codeTextData:K,data:K,codeFlowValue:K,definition:a(ie),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(we),hardBreakEscape:a(Ae),hardBreakTrailing:a(Ae),htmlFlow:a(Ve,c),htmlFlowData:K,htmlText:a(Ve,c),htmlTextData:K,image:a($e),label:c,link:a(st),listItem:a(gt),listItemValue:k,listOrdered:a(He,y),listUnordered:a(He),paragraph:a(at),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(ve),strong:a(Nn),thematicBreak:a(Xi)},exit:{atxHeading:p(),atxHeadingSequence:H,autolink:p(),autolinkEmail:pe,autolinkProtocol:J,blockQuote:p(),characterEscapeValue:X,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:G,characterReference:V,codeFenced:p(_),codeFencedFence:T,codeFencedFenceInfo:v,codeFencedFenceMeta:N,codeFlowValue:X,codeIndented:p(b),codeText:p(Q),codeTextData:X,data:X,definition:p(),definitionDestinationString:U,definitionLabelString:$,definitionTitleString:F,emphasis:p(),hardBreakEscape:p(D),hardBreakTrailing:p(D),htmlFlow:p(re),htmlFlowData:X,htmlText:p(Y),htmlTextData:X,image:p(fe),label:ce,labelText:ee,lineEnding:le,link:p(de),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:Se,resourceDestinationString:S,resourceTitleString:j,resource:B,setextHeading:p(A),setextHeadingLineSequence:W,setextHeadingText:R,strong:p(),thematicBreak:p()}};Bh(r,(t||{}).mdastExtensions||[]);const i={};return l;function l(q){let ue={type:"root",children:[]};const Ne={stack:[ue],tokenStack:[],config:r,enter:f,exit:m,buffer:c,resume:g,data:i},Re=[];let Me=-1;for(;++Me<q.length;)if(q[Me][1].type==="listOrdered"||q[Me][1].type==="listUnordered")if(q[Me][0]==="enter")Re.push(Me);else{const ft=Re.pop();Me=s(q,ft,Me)}for(Me=-1;++Me<q.length;){const ft=r[q[Me][0]];Uh.call(ft,q[Me][1].type)&&ft[q[Me][1].type].call(Object.assign({sliceSerialize:q[Me][2].sliceSerialize},Ne),q[Me][1])}if(Ne.tokenStack.length>0){const ft=Ne.tokenStack[Ne.tokenStack.length-1];(ft[1]||xp).call(Ne,void 0,ft[0])}for(ue.position={start:Gn(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Gn(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<r.transforms.length;)ue=r.transforms[Me](ue)||ue;return ue}function s(q,ue,Ne){let Re=ue-1,Me=-1,ft=!1,gn,Bt,jn,Xn;for(;++Re<=Ne;){const pt=q[Re];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?Me++:Me--,Xn=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(gn&&!Xn&&!Me&&!jn&&(jn=Re),Xn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xn=void 0}if(!Me&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||Me===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(gn){let on=Re;for(Bt=void 0;on--;){const zt=q[on];if(zt[1].type==="lineEnding"||zt[1].type==="lineEndingBlank"){if(zt[0]==="exit")continue;Bt&&(q[Bt][1].type="lineEndingBlank",ft=!0),zt[1].type="lineEnding",Bt=on}else if(!(zt[1].type==="linePrefix"||zt[1].type==="blockQuotePrefix"||zt[1].type==="blockQuotePrefixWhitespace"||zt[1].type==="blockQuoteMarker"||zt[1].type==="listItemIndent"))break}jn&&(!Bt||jn<Bt)&&(gn._spread=!0),gn.end=Object.assign({},Bt?q[Bt][1].start:pt[1].end),q.splice(Bt||Re,0,["exit",gn,pt[2]]),Re++,Ne++}if(pt[1].type==="listItemPrefix"){const on={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};gn=on,q.splice(Re,0,["enter",on,pt[2]]),Re++,Ne++,jn=void 0,Xn=!0}}}return q[ue][1]._spread=ft,Ne}function a(q,ue){return Ne;function Ne(Re){f.call(this,q(Re),Re),ue&&ue.call(this,Re)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(q,ue,Ne){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([ue,Ne||void 0]),q.position={start:Gn(ue.start),end:void 0}}function p(q){return ue;function ue(Ne){q&&q.call(this,Ne),m.call(this,Ne)}}function m(q,ue){const Ne=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==q.type&&(ue?ue.call(this,q,Re[0]):(Re[1]||xp).call(this,q,Re[0]));else throw new Error("Cannot close `"+q.type+"` ("+Bi({start:q.start,end:q.end})+"): it’s not open");Ne.position.end=Gn(q.end)}function g(){return Iw(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function k(q){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function v(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=q}function N(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=q}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=q.replace(/(\r?\n|\r)$/g,"")}function $(q){const ue=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ue,Ne.identifier=Wr(this.sliceSerialize(q)).toLowerCase()}function F(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.title=q}function U(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.url=q}function H(q){const ue=this.stack[this.stack.length-1];if(!ue.depth){const Ne=this.sliceSerialize(q).length;ue.depth=Ne}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function W(q){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function K(q){const Ne=this.stack[this.stack.length-1].children;let Re=Ne[Ne.length-1];(!Re||Re.type!=="text")&&(Re=Yi(),Re.position={start:Gn(q.start),end:void 0},Ne.push(Re)),this.stack.push(Re)}function X(q){const ue=this.stack.pop();ue.value+=this.sliceSerialize(q),ue.position.end=Gn(q.end)}function le(q){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ne=ue.children[ue.children.length-1];Ne.position.end=Gn(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(ue.type)&&(K.call(this,q),X.call(this,q))}function D(){this.data.atHardBreak=!0}function re(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=q}function Y(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=q}function Q(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=q}function de(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=ue,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function fe(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=ue,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function ee(q){const ue=this.sliceSerialize(q),Ne=this.stack[this.stack.length-2];Ne.label=LS(ue),Ne.identifier=Wr(ue).toLowerCase()}function ce(){const q=this.stack[this.stack.length-1],ue=this.resume(),Ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ne.type==="link"){const Re=q.children;Ne.children=Re}else Ne.alt=ue}function S(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.url=q}function j(){const q=this.resume(),ue=this.stack[this.stack.length-1];ue.title=q}function B(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function Se(q){const ue=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ue,Ne.identifier=Wr(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function Ee(q){this.data.characterReferenceType=q.type}function G(q){const ue=this.sliceSerialize(q),Ne=this.data.characterReferenceType;let Re;Ne?(Re=Ih(ue,Ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=ku(ue);const Me=this.stack[this.stack.length-1];Me.value+=Re}function V(q){const ue=this.stack.pop();ue.position.end=Gn(q.end)}function J(q){X.call(this,q);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(q)}function pe(q){X.call(this,q);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(q)}function ae(){return{type:"blockquote",children:[]}}function ye(){return{type:"code",lang:null,meta:null,value:""}}function Le(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function Ae(){return{type:"break"}}function Ve(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function st(){return{type:"link",title:null,url:"",children:[]}}function He(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function gt(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function at(){return{type:"paragraph",children:[]}}function Nn(){return{type:"strong",children:[]}}function Yi(){return{type:"text",value:""}}function Xi(){return{type:"thematicBreak"}}}function Gn(t){return{line:t.line,column:t.column,offset:t.offset}}function Bh(t,r){let i=-1;for(;++i<r.length;){const l=r[i];Array.isArray(l)?Bh(t,l):RS(t,l)}}function RS(t,r){let i;for(i in r)if(Uh.call(r,i))switch(i){case"canContainEols":{const l=r[i];l&&t[i].push(...l);break}case"transforms":{const l=r[i];l&&t[i].push(...l);break}case"enter":case"exit":{const l=r[i];l&&Object.assign(t[i],l);break}}}function xp(t,r){throw t?new Error("Cannot close `"+t.type+"` ("+Bi({start:t.start,end:t.end})+"): a different token (`"+r.type+"`, "+Bi({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Bi({start:r.start,end:r.end})+") is still open")}function zS(t){const r=this;r.parser=i;function i(l){return _S(l,{...r.data("settings"),...t,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function AS(t,r){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(r),!0)};return t.patch(r,i),t.applyData(r,i)}function MS(t,r){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(r,i),[t.applyData(r,i),{type:"text",value:`
|
|
270
|
+
`}]}function DS(t,r){const i=r.value?r.value+`
|
|
271
|
+
`:"",l={},s=r.lang?r.lang.split(/\s+/):[];s.length>0&&(l.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:l,children:[{type:"text",value:i}]};return r.meta&&(a.data={meta:r.meta}),t.patch(r,a),a=t.applyData(r,a),a={type:"element",tagName:"pre",properties:{},children:[a]},t.patch(r,a),a}function FS(t,r){const i={type:"element",tagName:"del",properties:{},children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}function $S(t,r){const i={type:"element",tagName:"em",properties:{},children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}function US(t,r){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",l=String(r.identifier).toUpperCase(),s=Qr(l.toLowerCase()),a=t.footnoteOrder.indexOf(l);let c,f=t.footnoteCounts.get(l);f===void 0?(f=0,t.footnoteOrder.push(l),c=t.footnoteOrder.length):c=a+1,f+=1,t.footnoteCounts.set(l,f);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+s,id:i+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(r,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(r,m),t.applyData(r,m)}function BS(t,r){const i={type:"element",tagName:"h"+r.depth,properties:{},children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}function VS(t,r){if(t.options.allowDangerousHtml){const i={type:"raw",value:r.value};return t.patch(r,i),t.applyData(r,i)}}function Vh(t,r){const i=r.referenceType;let l="]";if(i==="collapsed"?l+="[]":i==="full"&&(l+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+l}];const s=t.all(r),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=l:s.push({type:"text",value:l}),s}function HS(t,r){const i=String(r.identifier).toUpperCase(),l=t.definitionById.get(i);if(!l)return Vh(t,r);const s={src:Qr(l.url||""),alt:r.alt};l.title!==null&&l.title!==void 0&&(s.title=l.title);const a={type:"element",tagName:"img",properties:s,children:[]};return t.patch(r,a),t.applyData(r,a)}function WS(t,r){const i={src:Qr(r.url)};r.alt!==null&&r.alt!==void 0&&(i.alt=r.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return t.patch(r,l),t.applyData(r,l)}function qS(t,r){const i={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};t.patch(r,i);const l={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(r,l),t.applyData(r,l)}function KS(t,r){const i=String(r.identifier).toUpperCase(),l=t.definitionById.get(i);if(!l)return Vh(t,r);const s={href:Qr(l.url||"")};l.title!==null&&l.title!==void 0&&(s.title=l.title);const a={type:"element",tagName:"a",properties:s,children:t.all(r)};return t.patch(r,a),t.applyData(r,a)}function QS(t,r){const i={href:Qr(r.url)};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function GS(t,r,i){const l=t.all(r),s=i?YS(i):Hh(r),a={},c=[];if(typeof r.checked=="boolean"){const g=l[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},l.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const g=l[f];(s||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
272
|
+
`}),g.type==="element"&&g.tagName==="p"&&!s?c.push(...g.children):c.push(g)}const p=l[l.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
273
|
+
`});const m={type:"element",tagName:"li",properties:a,children:c};return t.patch(r,m),t.applyData(r,m)}function YS(t){let r=!1;if(t.type==="list"){r=t.spread||!1;const i=t.children;let l=-1;for(;!r&&++l<i.length;)r=Hh(i[l])}return r}function Hh(t){const r=t.spread;return r??t.children.length>1}function XS(t,r){const i={},l=t.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(i.start=r.start);++s<l.length;){const c=l[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const a={type:"element",tagName:r.ordered?"ol":"ul",properties:i,children:t.wrap(l,!0)};return t.patch(r,a),t.applyData(r,a)}function JS(t,r){const i={type:"element",tagName:"p",properties:{},children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}function ZS(t,r){const i={type:"root",children:t.wrap(t.all(r))};return t.patch(r,i),t.applyData(r,i)}function eC(t,r){const i={type:"element",tagName:"strong",properties:{},children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}function tC(t,r){const i=t.all(r),l=i.shift(),s=[];if(l){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([l],!0)};t.patch(r.children[0],c),s.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},f=yu(r.children[1]),p=bh(r.children[r.children.length-1]);f&&p&&(c.position={start:f,end:p}),s.push(c)}const a={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(r,a),t.applyData(r,a)}function nC(t,r,i){const l=i?i.children:void 0,a=(l?l.indexOf(r):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:r.children.length;let p=-1;const m=[];for(;++p<f;){const y=r.children[p],k={},v=c?c[p]:void 0;v&&(k.align=v);let N={type:"element",tagName:a,properties:k,children:[]};y&&(N.children=t.all(y),t.patch(y,N),N=t.applyData(y,N)),m.push(N)}const g={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(r,g),t.applyData(r,g)}function rC(t,r){const i={type:"element",tagName:"td",properties:{},children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}const vp=9,wp=32;function iC(t){const r=String(t),i=/\r?\n|\r/g;let l=i.exec(r),s=0;const a=[];for(;l;)a.push(kp(r.slice(s,l.index),s>0,!0),l[0]),s=l.index+l[0].length,l=i.exec(r);return a.push(kp(r.slice(s),s>0,!1)),a.join("")}function kp(t,r,i){let l=0,s=t.length;if(r){let a=t.codePointAt(l);for(;a===vp||a===wp;)l++,a=t.codePointAt(l)}if(i){let a=t.codePointAt(s-1);for(;a===vp||a===wp;)s--,a=t.codePointAt(s-1)}return s>l?t.slice(l,s):""}function oC(t,r){const i={type:"text",value:iC(String(r.value))};return t.patch(r,i),t.applyData(r,i)}function lC(t,r){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(r,i),t.applyData(r,i)}const sC={blockquote:AS,break:MS,code:DS,delete:FS,emphasis:$S,footnoteReference:US,heading:BS,html:VS,imageReference:HS,image:WS,inlineCode:qS,linkReference:KS,link:QS,listItem:GS,list:XS,paragraph:JS,root:ZS,strong:eC,table:tC,tableCell:rC,tableRow:nC,text:oC,thematicBreak:lC,toml:al,yaml:al,definition:al,footnoteDefinition:al};function al(){}const Wh=-1,El=0,Hi=1,yl=2,bu=3,Eu=4,Nu=5,ju=6,qh=7,Kh=8,Sp=typeof self=="object"?self:globalThis,aC=(t,r)=>{const i=(s,a)=>(t.set(a,s),s),l=s=>{if(t.has(s))return t.get(s);const[a,c]=r[s];switch(a){case El:case Wh:return i(c,s);case Hi:{const f=i([],s);for(const p of c)f.push(l(p));return f}case yl:{const f=i({},s);for(const[p,m]of c)f[l(p)]=l(m);return f}case bu:return i(new Date(c),s);case Eu:{const{source:f,flags:p}=c;return i(new RegExp(f,p),s)}case Nu:{const f=i(new Map,s);for(const[p,m]of c)f.set(l(p),l(m));return f}case ju:{const f=i(new Set,s);for(const p of c)f.add(l(p));return f}case qh:{const{name:f,message:p}=c;return i(new Sp[f](p),s)}case Kh:return i(BigInt(c),s);case"BigInt":return i(Object(BigInt(c)),s);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new Sp[a](c),s)};return l},Cp=t=>aC(new Map,t)(0),Ur="",{toString:uC}={},{keys:cC}=Object,Di=t=>{const r=typeof t;if(r!=="object"||!t)return[El,r];const i=uC.call(t).slice(8,-1);switch(i){case"Array":return[Hi,Ur];case"Object":return[yl,Ur];case"Date":return[bu,Ur];case"RegExp":return[Eu,Ur];case"Map":return[Nu,Ur];case"Set":return[ju,Ur];case"DataView":return[Hi,i]}return i.includes("Array")?[Hi,i]:i.includes("Error")?[qh,i]:[yl,i]},ul=([t,r])=>t===El&&(r==="function"||r==="symbol"),dC=(t,r,i,l)=>{const s=(c,f)=>{const p=l.push(c)-1;return i.set(f,p),p},a=c=>{if(i.has(c))return i.get(c);let[f,p]=Di(c);switch(f){case El:{let g=c;switch(p){case"bigint":f=Kh,g=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);g=null;break;case"undefined":return s([Wh],c)}return s([f,g],c)}case Hi:{if(p){let k=c;return p==="DataView"?k=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(k=new Uint8Array(c)),s([p,[...k]],c)}const g=[],y=s([f,g],c);for(const k of c)g.push(a(k));return y}case yl:{if(p)switch(p){case"BigInt":return s([p,c.toString()],c);case"Boolean":case"Number":case"String":return s([p,c.valueOf()],c)}if(r&&"toJSON"in c)return a(c.toJSON());const g=[],y=s([f,g],c);for(const k of cC(c))(t||!ul(Di(c[k])))&&g.push([a(k),a(c[k])]);return y}case bu:return s([f,c.toISOString()],c);case Eu:{const{source:g,flags:y}=c;return s([f,{source:g,flags:y}],c)}case Nu:{const g=[],y=s([f,g],c);for(const[k,v]of c)(t||!(ul(Di(k))||ul(Di(v))))&&g.push([a(k),a(v)]);return y}case ju:{const g=[],y=s([f,g],c);for(const k of c)(t||!ul(Di(k)))&&g.push(a(k));return y}}const{message:m}=c;return s([f,{name:p,message:m}],c)};return a},bp=(t,{json:r,lossy:i}={})=>{const l=[];return dC(!(r||i),!!r,new Map,l)(t),l},xl=typeof structuredClone=="function"?(t,r)=>r&&("json"in r||"lossy"in r)?Cp(bp(t,r)):structuredClone(t):(t,r)=>Cp(bp(t,r));function fC(t,r){const i=[{type:"text",value:"↩"}];return r>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),i}function pC(t,r){return"Back to reference "+(t+1)+(r>1?"-"+r:"")}function hC(t){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||fC,l=t.options.footnoteBackLabel||pC,s=t.options.footnoteLabel||"Footnotes",a=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const g=t.all(m),y=String(m.identifier).toUpperCase(),k=Qr(y.toLowerCase());let v=0;const N=[],T=t.footnoteCounts.get(y);for(;T!==void 0&&++v<=T;){N.length>0&&N.push({type:"text",value:" "});let $=typeof i=="string"?i:i(p,v);typeof $=="string"&&($={type:"text",value:$}),N.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+k+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(p,v),className:["data-footnote-backref"]},children:Array.isArray($)?$:[$]})}const _=g[g.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const $=_.children[_.children.length-1];$&&$.type==="text"?$.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...N)}else g.push(...N);const b={type:"element",tagName:"li",properties:{id:r+"fn-"+k},children:t.wrap(g,!0)};t.patch(m,b),f.push(b)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...xl(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
274
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(f,!0)},{type:"text",value:`
|
|
275
|
+
`}]}}const Qh=(function(t){if(t==null)return xC;if(typeof t=="function")return Nl(t);if(typeof t=="object")return Array.isArray(t)?mC(t):gC(t);if(typeof t=="string")return yC(t);throw new Error("Expected function, string, or object as test")});function mC(t){const r=[];let i=-1;for(;++i<t.length;)r[i]=Qh(t[i]);return Nl(l);function l(...s){let a=-1;for(;++a<r.length;)if(r[a].apply(this,s))return!0;return!1}}function gC(t){const r=t;return Nl(i);function i(l){const s=l;let a;for(a in t)if(s[a]!==r[a])return!1;return!0}}function yC(t){return Nl(r);function r(i){return i&&i.type===t}}function Nl(t){return r;function r(i,l,s){return!!(vC(i)&&t.call(this,i,typeof l=="number"?l:void 0,s||void 0))}}function xC(){return!0}function vC(t){return t!==null&&typeof t=="object"&&"type"in t}const Gh=[],wC=!0,Ep=!1,kC="skip";function SC(t,r,i,l){let s;typeof r=="function"&&typeof i!="function"?(l=i,i=r):s=r;const a=Qh(s),c=l?-1:1;f(t,void 0,[])();function f(p,m,g){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(p.type+(v?"<"+v+">":""))+")"})}return k;function k(){let v=Gh,N,T,_;if((!r||a(p,m,g[g.length-1]||void 0))&&(v=CC(i(p,g)),v[0]===Ep))return v;if("children"in p&&p.children){const b=p;if(b.children&&v[0]!==kC)for(T=(l?b.children.length:-1)+c,_=g.concat(b);T>-1&&T<b.children.length;){const $=b.children[T];if(N=f($,T,_)(),N[0]===Ep)return N;T=typeof N[1]=="number"?N[1]:T+c}}return v}}}function CC(t){return Array.isArray(t)?t:typeof t=="number"?[wC,t]:t==null?Gh:[t]}function Yh(t,r,i,l){let s,a,c;typeof r=="function"&&typeof i!="function"?(a=void 0,c=r,s=i):(a=r,c=i,s=l),SC(t,a,f,s);function f(p,m){const g=m[m.length-1],y=g?g.children.indexOf(p):void 0;return c(p,y,g)}}const eu={}.hasOwnProperty,bC={};function EC(t,r){const i=r||bC,l=new Map,s=new Map,a=new Map,c={...sC,...i.handlers},f={all:m,applyData:jC,definitionById:l,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:c,one:p,options:i,patch:NC,wrap:TC};return Yh(t,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?l:s,k=String(g.identifier).toUpperCase();y.has(k)||y.set(k,g)}}),f;function p(g,y){const k=g.type,v=f.handlers[k];if(eu.call(f.handlers,k)&&v)return v(f,g,y);if(f.options.passThrough&&f.options.passThrough.includes(k)){if("children"in g){const{children:T,..._}=g,b=xl(_);return b.children=f.all(g),b}return xl(g)}return(f.options.unknownHandler||PC)(f,g,y)}function m(g){const y=[];if("children"in g){const k=g.children;let v=-1;for(;++v<k.length;){const N=f.one(k[v],g);if(N){if(v&&k[v-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=Np(N.value)),!Array.isArray(N)&&N.type==="element")){const T=N.children[0];T&&T.type==="text"&&(T.value=Np(T.value))}Array.isArray(N)?y.push(...N):y.push(N)}}}return y}}function NC(t,r){t.position&&(r.position=uw(t))}function jC(t,r){let i=r;if(t&&t.data){const l=t.data.hName,s=t.data.hChildren,a=t.data.hProperties;if(typeof l=="string")if(i.type==="element")i.tagName=l;else{const c="children"in i?i.children:[i];i={type:"element",tagName:l,properties:{},children:c}}i.type==="element"&&a&&Object.assign(i.properties,xl(a)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function PC(t,r){const i=r.data||{},l="value"in r&&!(eu.call(i,"hProperties")||eu.call(i,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function TC(t,r){const i=[];let l=-1;for(r&&i.push({type:"text",value:`
|
|
276
|
+
`});++l<t.length;)l&&i.push({type:"text",value:`
|
|
277
|
+
`}),i.push(t[l]);return r&&t.length>0&&i.push({type:"text",value:`
|
|
278
|
+
`}),i}function Np(t){let r=0,i=t.charCodeAt(r);for(;i===9||i===32;)r++,i=t.charCodeAt(r);return t.slice(r)}function jp(t,r){const i=EC(t,r),l=i.one(t,void 0),s=hC(i),a=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
279
|
+
`},s),a}function LC(t,r){return t&&"run"in t?async function(i,l){const s=jp(i,{file:l,...r});await t.run(s,l)}:function(i,l){return jp(i,{file:l,...t||r})}}function Pp(t){if(t)throw t}var La,Tp;function IC(){if(Tp)return La;Tp=1;var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):r.call(m)==="[object Array]"},a=function(m){if(!m||r.call(m)!=="[object Object]")return!1;var g=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!y)return!1;var k;for(k in m);return typeof k>"u"||t.call(m,k)},c=function(m,g){i&&g.name==="__proto__"?i(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},f=function(m,g){if(g==="__proto__")if(t.call(m,g)){if(l)return l(m,g).value}else return;return m[g]};return La=function p(){var m,g,y,k,v,N,T=arguments[0],_=1,b=arguments.length,$=!1;for(typeof T=="boolean"&&($=T,T=arguments[1]||{},_=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});_<b;++_)if(m=arguments[_],m!=null)for(g in m)y=f(T,g),k=f(m,g),T!==k&&($&&k&&(a(k)||(v=s(k)))?(v?(v=!1,N=y&&s(y)?y:[]):N=y&&a(y)?y:{},c(T,{name:g,newValue:p($,N,k)})):typeof k<"u"&&c(T,{name:g,newValue:k}));return T},La}var _C=IC();const Ia=wl(_C);function tu(t){if(typeof t!="object"||t===null)return!1;const r=Object.getPrototypeOf(t);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function OC(){const t=[],r={run:i,use:l};return r;function i(...s){let a=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(p,...m){const g=t[++a];let y=-1;if(p){c(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,g?RC(g,f)(...m):c(null,...m)}}function l(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),r}}function RC(t,r){let i;return l;function l(...c){const f=t.length>c.length;let p;f&&c.push(s);try{p=t.apply(this,c)}catch(m){const g=m;if(f&&i)throw g;return s(g)}f||(p&&p.then&&typeof p.then=="function"?p.then(a,s):p instanceof Error?s(p):a(p))}function s(c,...f){i||(i=!0,r(c,...f))}function a(c){s(null,c)}}const dn={basename:zC,dirname:AC,extname:MC,join:DC,sep:"/"};function zC(t,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Gi(t);let i=0,l=-1,s=t.length,a;if(r===void 0||r.length===0||r.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(a){i=s+1;break}}else l<0&&(a=!0,l=s+1);return l<0?"":t.slice(i,l)}if(r===t)return"";let c=-1,f=r.length-1;for(;s--;)if(t.codePointAt(s)===47){if(a){i=s+1;break}}else c<0&&(a=!0,c=s+1),f>-1&&(t.codePointAt(s)===r.codePointAt(f--)?f<0&&(l=s):(f=-1,l=c));return i===l?l=c:l<0&&(l=t.length),t.slice(i,l)}function AC(t){if(Gi(t),t.length===0)return".";let r=-1,i=t.length,l;for(;--i;)if(t.codePointAt(i)===47){if(l){r=i;break}}else l||(l=!0);return r<0?t.codePointAt(0)===47?"/":".":r===1&&t.codePointAt(0)===47?"//":t.slice(0,r)}function MC(t){Gi(t);let r=t.length,i=-1,l=0,s=-1,a=0,c;for(;r--;){const f=t.codePointAt(r);if(f===47){if(c){l=r+1;break}continue}i<0&&(c=!0,i=r+1),f===46?s<0?s=r:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||i<0||a===0||a===1&&s===i-1&&s===l+1?"":t.slice(s,i)}function DC(...t){let r=-1,i;for(;++r<t.length;)Gi(t[r]),t[r]&&(i=i===void 0?t[r]:i+"/"+t[r]);return i===void 0?".":FC(i)}function FC(t){Gi(t);const r=t.codePointAt(0)===47;let i=$C(t,!r);return i.length===0&&!r&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),r?"/"+i:i}function $C(t,r){let i="",l=0,s=-1,a=0,c=-1,f,p;for(;++c<=t.length;){if(c<t.length)f=t.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||a===1))if(s!==c-1&&a===2){if(i.length<2||l!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",l=0):(i=i.slice(0,p),l=i.length-1-i.lastIndexOf("/")),s=c,a=0;continue}}else if(i.length>0){i="",l=0,s=c,a=0;continue}}r&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+t.slice(s+1,c):i=t.slice(s+1,c),l=c-s-1;s=c,a=0}else f===46&&a>-1?a++:a=-1}return i}function Gi(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const UC={cwd:BC};function BC(){return"/"}function nu(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function VC(t){if(typeof t=="string")t=new URL(t);else if(!nu(t)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(t.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return HC(t)}function HC(t){if(t.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const r=t.pathname;let i=-1;for(;++i<r.length;)if(r.codePointAt(i)===37&&r.codePointAt(i+1)===50){const l=r.codePointAt(i+2);if(l===70||l===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(r)}const _a=["history","path","basename","stem","extname","dirname"];class Xh{constructor(r){let i;r?nu(r)?i={path:r}:typeof r=="string"||WC(r)?i={value:r}:i=r:i={},this.cwd="cwd"in i?"":UC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<_a.length;){const a=_a[l];a in i&&i[a]!==void 0&&i[a]!==null&&(this[a]=a==="history"?[...i[a]]:i[a])}let s;for(s in i)_a.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?dn.basename(this.path):void 0}set basename(r){Ra(r,"basename"),Oa(r,"basename"),this.path=dn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?dn.dirname(this.path):void 0}set dirname(r){Lp(this.basename,"dirname"),this.path=dn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?dn.extname(this.path):void 0}set extname(r){if(Oa(r,"extname"),Lp(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=dn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){nu(r)&&(r=VC(r)),Ra(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?dn.basename(this.path,this.extname):void 0}set stem(r){Ra(r,"stem"),Oa(r,"stem"),this.path=dn.join(this.dirname||"",r+(this.extname||""))}fail(r,i,l){const s=this.message(r,i,l);throw s.fatal=!0,s}info(r,i,l){const s=this.message(r,i,l);return s.fatal=void 0,s}message(r,i,l){const s=new kt(r,i,l);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function Oa(t,r){if(t&&t.includes(dn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+dn.sep+"`")}function Ra(t,r){if(!t)throw new Error("`"+r+"` cannot be empty")}function Lp(t,r){if(!t)throw new Error("Setting `"+r+"` requires `path` to be set too")}function WC(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const qC=(function(t){const l=this.constructor.prototype,s=l[t],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,l),a}),KC={}.hasOwnProperty;class Pu extends qC{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=OC()}copy(){const r=new Pu;let i=-1;for(;++i<this.attachers.length;){const l=this.attachers[i];r.use(...l)}return r.data(Ia(!0,{},this.namespace)),r}data(r,i){return typeof r=="string"?arguments.length===2?(Ma("data",this.frozen),this.namespace[r]=i,this):KC.call(this.namespace,r)&&this.namespace[r]||void 0:r?(Ma("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const s=i.call(r,...l);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const i=cl(r),l=this.parser||this.Parser;return za("parse",l),l(String(i),i)}process(r,i){const l=this;return this.freeze(),za("process",this.parser||this.Parser),Aa("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(a,c){const f=cl(r),p=l.parse(f);l.run(p,f,function(g,y,k){if(g||!y||!k)return m(g);const v=y,N=l.stringify(v,k);YC(N)?k.value=N:k.result=N,m(g,k)});function m(g,y){g||!y?c(g):a?a(y):i(void 0,y)}}}processSync(r){let i=!1,l;return this.freeze(),za("processSync",this.parser||this.Parser),Aa("processSync",this.compiler||this.Compiler),this.process(r,s),_p("processSync","process",i),l;function s(a,c){i=!0,Pp(a),l=c}}run(r,i,l){Ip(r),this.freeze();const s=this.transformers;return!l&&typeof i=="function"&&(l=i,i=void 0),l?a(void 0,l):new Promise(a);function a(c,f){const p=cl(i);s.run(r,p,m);function m(g,y,k){const v=y||r;g?f(g):c?c(v):l(void 0,v,k)}}}runSync(r,i){let l=!1,s;return this.run(r,i,a),_p("runSync","run",l),s;function a(c,f){Pp(c),s=f,l=!0}}stringify(r,i){this.freeze();const l=cl(i),s=this.compiler||this.Compiler;return Aa("stringify",s),Ip(r),s(r,l)}use(r,...i){const l=this.attachers,s=this.namespace;if(Ma("use",this.frozen),r!=null)if(typeof r=="function")p(r,i);else if(typeof r=="object")Array.isArray(r)?f(r):c(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function a(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...y]=m;p(g,y)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))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");f(m.plugins),m.settings&&(s.settings=Ia(!0,s.settings,m.settings))}function f(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const y=m[g];a(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,g){let y=-1,k=-1;for(;++y<l.length;)if(l[y][0]===m){k=y;break}if(k===-1)l.push([m,...g]);else if(g.length>0){let[v,...N]=g;const T=l[k][1];tu(T)&&tu(v)&&(v=Ia(!0,T,v)),l[k]=[m,v,...N]}}}}const QC=new Pu().freeze();function za(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Aa(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Ma(t,r){if(r)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ip(t){if(!tu(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function _p(t,r,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+r+"` instead")}function cl(t){return GC(t)?t:new Xh(t)}function GC(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function YC(t){return typeof t=="string"||XC(t)}function XC(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const JC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Op=[],Rp={allowDangerousHtml:!0},ZC=/^(https?|ircs?|mailto|xmpp)$/i,eb=[{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 Jh(t){const r=tb(t),i=nb(t);return rb(r.runSync(r.parse(i),i),t)}function tb(t){const r=t.rehypePlugins||Op,i=t.remarkPlugins||Op,l=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Rp}:Rp;return QC().use(zS).use(i).use(LC,l).use(r)}function nb(t){const r=t.children||"",i=new Xh;return typeof r=="string"&&(i.value=r),i}function rb(t,r){const i=r.allowedElements,l=r.allowElement,s=r.components,a=r.disallowedElements,c=r.skipHtml,f=r.unwrapDisallowed,p=r.urlTransform||ib;for(const g of eb)Object.hasOwn(r,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+JC+g.id,void 0);return Yh(t,m),hw(t,{Fragment:x.Fragment,components:s,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function m(g,y,k){if(g.type==="raw"&&k&&typeof y=="number")return c?k.children.splice(y,1):k.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let v;for(v in ja)if(Object.hasOwn(ja,v)&&Object.hasOwn(g.properties,v)){const N=g.properties[v],T=ja[v];(T===null||T.includes(g.tagName))&&(g.properties[v]=p(String(N||""),v,g))}}if(g.type==="element"){let v=i?!i.includes(g.tagName):a?a.includes(g.tagName):!1;if(!v&&l&&typeof y=="number"&&(v=!l(g,y,k)),v&&k&&typeof y=="number")return f&&g.children?k.children.splice(y,1,...g.children):k.children.splice(y,1),y}}}function ib(t){const r=t.indexOf(":"),i=t.indexOf("?"),l=t.indexOf("#"),s=t.indexOf("/");return r===-1||s!==-1&&r>s||i!==-1&&r>i||l!==-1&&r>l||ZC.test(t.slice(0,r))?t:""}function ob({text:t}){return x.jsx("div",{className:"text-sm text-foreground",children:x.jsx(Jh,{components:{pre:({children:r})=>x.jsx("pre",{className:"bg-card rounded-lg p-2 overflow-x-auto text-xs my-2",children:r}),code:({className:r,children:i,...l})=>!r?x.jsx("code",{className:"bg-muted px-1 py-0.5 rounded text-muted-foreground text-xs",...l,children:i}):x.jsx("code",{className:r,...l,children:i}),a:({children:r,...i})=>x.jsx("a",{className:"text-muted-foreground hover:text-foreground underline",...i,children:r}),ul:({children:r})=>x.jsx("ul",{className:"list-disc list-inside space-y-0.5 my-1.5 text-sm",children:r}),ol:({children:r})=>x.jsx("ol",{className:"list-decimal list-inside space-y-0.5 my-1.5 text-sm",children:r}),p:({children:r})=>x.jsx("p",{className:"my-1.5 leading-relaxed text-sm",children:r}),h1:({children:r})=>x.jsx("h1",{className:"text-base font-semibold text-foreground mt-3 mb-1",children:r}),h2:({children:r})=>x.jsx("h2",{className:"text-sm font-semibold text-foreground mt-2 mb-1",children:r}),h3:({children:r})=>x.jsx("h3",{className:"text-sm font-medium text-foreground mt-1.5 mb-0.5",children:r}),blockquote:({children:r})=>x.jsx("blockquote",{className:"border-l-2 border-border pl-2 my-1.5 text-muted-foreground italic text-sm",children:r}),li:({children:r})=>x.jsx("li",{className:"text-sm",children:r})},children:t})})}function zp({el:t}){var s;const r=t.component||`<${t.tag}>`,i=((s=t.source)==null?void 0:s.split("/").pop())||null,l=i?t.line?`${i}:${t.line}`:i:null;return x.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-[11px] font-medium bg-rose-100 text-rose-800 dark:bg-rose-800/80 dark:text-rose-100 align-baseline mx-0.5",children:[r,l&&x.jsx("span",{className:"text-rose-600 dark:text-rose-200 font-mono",children:l})]})}function lb({content:t,imageUrls:r,consoleEntries:i,attachedElements:l,contentSegments:s,onConsoleEntryClick:a,onImageClick:c}){const{t:f}=Et(),p=r??[],m=s&&s.length>0&&l&&l.length>0;return x.jsxs("div",{className:"text-foreground bg-muted/50 rounded-lg px-3 py-2 text-sm self-end max-w-[85%]",children:[p.length>0&&x.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:p.map((g,y)=>x.jsx("img",{src:g,alt:f("attachedAlt",{index:y+1}),className:`max-w-[200px] max-h-[200px] rounded-lg border border-border/50 object-cover ${c?"cursor-pointer hover:opacity-80 transition-opacity":""}`,onClick:c?()=>c(p,y):void 0},y))}),i&&i.length>0&&x.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:i.map(g=>x.jsxs("button",{type:"button",onClick:()=>a==null?void 0:a(g),className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium transition-colors ${g.level==="error"?"bg-red-100 text-red-800 hover:bg-red-200 dark:bg-red-800/80 dark:text-red-100 dark:hover:bg-red-700/80":"bg-yellow-100 text-yellow-800 hover:bg-yellow-200 dark:bg-yellow-800/80 dark:text-yellow-100 dark:hover:bg-yellow-700/80"}`,title:f("clickToReattach",{level:g.level}),children:[g.level==="error"?x.jsx(fu,{className:"w-3 h-3"}):x.jsx(pu,{className:"w-3 h-3"}),x.jsx("span",{className:"truncate max-w-[180px]",children:g.message.length>40?g.message.slice(0,40)+"…":g.message})]},g.id))}),m?x.jsx("span",{children:s.map((g,y)=>{if(g.type==="text")return x.jsx("span",{children:g.text},y);const k=l[g.elementIndex];return k?x.jsx(zp,{el:k},y):null})}):x.jsxs(x.Fragment,{children:[l&&l.length>0&&x.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:l.map((g,y)=>x.jsx(zp,{el:g},`${g.tag}:${g.source}:${g.line}:${y}`))}),t]})]})}function sb({text:t}){return x.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-xs py-1",children:[x.jsx(gl,{className:"w-3 h-3 animate-spin"}),x.jsx("span",{children:t})]})}const ab={Read:q1,Write:Hf,Edit:Hf,Bash:lh,Grep:ev,Glob:K1,Ls:Y1},ub={Read:"text-blue-400 border-blue-500/50",Write:"text-foreground border-border/50",Edit:"text-foreground border-border/50",Bash:"text-purple-400 border-purple-500/50",Grep:"text-orange-400 border-orange-500/50",Glob:"text-cyan-400 border-cyan-500/50",Ls:"text-cyan-400 border-cyan-500/50"};function cb({toolName:t,input:r}){const[i,l]=I.useState(!1),s=ab[t]||ah,a=ub[t]||"text-amber-400 border-amber-500/50",c=I.useMemo(()=>{if(!r)return null;switch(t){case"Read":return r.file_path?`${r.file_path}`:null;case"Write":case"Edit":return r.file_path?`${r.file_path}`:null;case"Bash":return r.command?`${r.command}`:null;case"Grep":return r.pattern?`pattern: ${r.pattern}`:null;case"Glob":return r.pattern?`${r.pattern}`:null;case"Ls":return r.path?`${r.path}`:null;default:return r.file_path?`${r.file_path}`:r.command?`${r.command}`:r.pattern?`${r.pattern}`:null}},[r,t]),f=m=>{const g=m.split("/");return g.length<=2?m:`.../${g.slice(-2).join("/")}`},p=c&&typeof c=="string"&&c.includes("/")?f(c):c;return x.jsxs("div",{className:`border-l-2 ${a.split(" ")[1]} pl-3 py-1.5 my-1`,children:[x.jsxs("div",{className:`flex items-center gap-2 text-xs cursor-pointer transition-colors ${a.split(" ")[0]} hover:brightness-125`,onClick:()=>l(!i),children:[x.jsx(s,{className:"w-3.5 h-3.5"}),x.jsx("span",{className:"font-medium",children:t}),p&&x.jsx("span",{className:"text-muted-foreground truncate max-w-[250px] font-mono text-[11px]",children:p}),x.jsx("span",{className:"text-muted-foreground text-[10px] ml-auto",children:i?"▼":"▶"})]}),i&&r&&x.jsx("pre",{className:"text-muted-foreground text-[11px] mt-2 overflow-x-auto max-h-48 overflow-y-auto bg-card/50 rounded p-2 font-mono",children:JSON.stringify(r,null,2)})]})}function db({toolName:t,output:r,isError:i}){const[l,s]=I.useState(!1),a=I.useMemo(()=>r?/^\s*\d+[→:]/.test(r)||r.includes(`
|
|
280
|
+
1→`):!1,[r]),c=I.useMemo(()=>{if(!r)return!1;const m=r.trim().split(`
|
|
281
|
+
`);return m.length>0&&m.every(g=>g.startsWith("/")||g.startsWith("./")||g.match(/^[a-zA-Z0-9_.-]+$/))},[r]),f=I.useMemo(()=>{if(!r)return"";if(c){const g=r.trim().split(`
|
|
282
|
+
`);return g.length<=3?g.join(", "):`${g.length} files found`}if(a)return`${r.trim().split(`
|
|
283
|
+
`).length} lines`;const m=r.split(`
|
|
284
|
+
`)[0];return m.length>60?m.slice(0,60)+"...":m},[r,c,a]),p=((r==null?void 0:r.length)||0)>80||((r==null?void 0:r.split(`
|
|
285
|
+
`).length)||0)>1;return x.jsxs("div",{className:`border-l-2 ${i?"border-red-500/50":"border-border/50"} pl-3 py-1 my-0.5`,children:[x.jsxs("div",{className:`flex items-center gap-2 text-xs cursor-pointer transition-colors ${i?"text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300":"text-muted-foreground hover:text-foreground"}`,onClick:()=>s(!l),children:[i?x.jsx(du,{className:"w-3 h-3"}):a?x.jsx(nh,{className:"w-3 h-3"}):x.jsx(th,{className:"w-3 h-3"}),x.jsx("span",{className:"text-muted-foreground",children:t?`← ${t}`:"← result"}),f&&x.jsx("span",{className:"text-muted-foreground truncate max-w-[200px] font-mono text-[11px]",children:f}),p&&x.jsx("span",{className:"text-muted-foreground ml-auto",children:l?x.jsx(Cl,{className:"w-3 h-3"}):x.jsx(cu,{className:"w-3 h-3"})})]}),l&&r&&x.jsx("pre",{className:`text-[11px] mt-2 overflow-x-auto max-h-64 overflow-y-auto rounded p-2 font-mono ${i?"text-red-700 bg-red-100/50 dark:text-red-300 dark:bg-red-950/30":"text-muted-foreground bg-card/50"}`,children:r})]})}function fb({model:t,tools:r}){const{t:i}=Et(),[l,s]=I.useState(!1);return x.jsxs("div",{className:"flex items-start gap-2 text-muted-foreground text-xs py-1 cursor-pointer hover:text-foreground transition-colors",onClick:()=>s(!l),children:[x.jsx(G1,{className:"w-3 h-3 mt-0.5 shrink-0"}),x.jsxs("div",{children:[x.jsx("span",{children:i("sessionInitialized")}),t&&x.jsxs("span",{className:"text-muted-foreground",children:[" · ",t]}),l&&r&&r.length>0&&x.jsxs("div",{className:"mt-1 text-muted-foreground",children:["Tools: ",r.join(", ")]})]})]})}function pb({text:t}){return x.jsxs("div",{className:"flex items-start gap-2 text-red-600 dark:text-red-400 text-xs py-1",children:[x.jsx(du,{className:"w-3 h-3 mt-0.5 shrink-0"}),x.jsx("span",{className:"whitespace-pre-wrap",children:t})]})}function hb({trigger:t,preTokens:r}){const{t:i}=Et();return x.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-xs py-2 my-1 border-t border-b border-border/50",children:[x.jsx(Z1,{className:"w-3 h-3"}),x.jsxs("span",{children:[i("conversationCompacted"),t&&x.jsxs("span",{className:"text-muted-foreground",children:[" (",t,")"]}),r&&x.jsxs("span",{className:"text-muted-foreground",children:[" · ",r.toLocaleString()," tokens"]})]})]})}const mb={error_max_turns:"errorMaxTurns",error_during_execution:"errorDuringExecution",error_max_budget_usd:"errorMaxBudget",error_max_structured_output_retries:"errorOutputParsing"};function gb({msgId:t,subtype:r,result:i,errors:l,numTurns:s,durationMs:a,totalCostUsd:c,fileStats:f,undone:p,isLatest:m,onReviewDiffs:g,onUndone:y}){const{t:k}=Et(),[v,N]=I.useState(!1),[T,_]=I.useState("idle"),[b,$]=I.useState(""),[F,U]=I.useState(!1),[H,R]=I.useState(!1),[W,A]=I.useState(!1),K=I.useRef(),X=I.useCallback(()=>{K.current=setTimeout(()=>R(!0),300)},[]),le=I.useCallback(()=>{clearTimeout(K.current),R(!1)},[]);if(r==="waiting_for_input")return null;const D=r!=="success",re=mb[r],Y=re?k(re):"Error",Q=a?(a/1e3).toFixed(1):null,de=f&&f.length>0,fe=S=>{S.stopPropagation(),!(T==="loading"||T==="undone")&&A(!0)},ee=async()=>{A(!1),_("loading");try{const j=await(await fetch("/api/undo",{method:"POST"})).json();if(j.success){_("undone");const B=j.restored;B.length===1?$(k("revertedFile",{file:B[0]})):$(k("revertedFiles",{count:B.length,files:B.join(", ")})),y==null||y(t)}else _("error"),$(j.error||k("nothingToUndo"))}catch{_("error"),$(k("undoFailed"))}},ce=async S=>{var j;if(S.stopPropagation(),!F){U(!0);try{const C=await(await fetch("/api/undo/diff")).json();C.success&&((j=C.diffs)==null?void 0:j.length)>0&&(g==null||g(C.diffs))}catch{}finally{U(!1)}}};return x.jsxs("div",{className:`border-l-2 ${D?"border-red-500/50":"border-border/50"} pl-3 py-2 my-2`,children:[x.jsxs("div",{className:`flex items-center gap-2 text-xs cursor-pointer transition-colors ${D?"text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300":"text-foreground hover:text-foreground"}`,onClick:()=>N(!v),children:[D?x.jsx(du,{className:"w-3 h-3"}):x.jsx(th,{className:"w-3 h-3"}),x.jsx("span",{className:"font-medium",children:D?Y:k("taskCompleted")}),de&&p&&x.jsxs("span",{className:"ml-auto flex items-center gap-1 text-muted-foreground",children:[x.jsx(Wf,{className:"w-3 h-3"}),k("undone")]}),m&&!D&&de&&!p&&T==="idle"&&x.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[x.jsxs("div",{className:"relative",onMouseEnter:X,onMouseLeave:le,children:[x.jsxs("button",{onClick:ce,className:"flex items-center gap-1 px-2 py-0.5 rounded bg-blue-100/60 text-blue-700 hover:bg-blue-200/60 hover:text-blue-800 dark:bg-blue-900/40 dark:text-blue-300 dark:hover:bg-blue-800/50 dark:hover:text-blue-200 transition-colors",disabled:F,children:[x.jsx(H1,{className:"w-3 h-3"}),x.jsx("span",{children:k(F?"loading":"review")})]}),H&&x.jsx("div",{className:"absolute bottom-full right-0 mb-1.5 w-max max-w-xs bg-card border border-border rounded-md shadow-lg py-1.5 px-2 z-50",children:f.map(S=>x.jsxs("div",{className:"flex items-center gap-2 text-[11px] leading-5 whitespace-nowrap",children:[x.jsx("span",{className:"text-muted-foreground truncate max-w-[180px]",children:S.relativePath}),x.jsxs("span",{className:"text-green-600 dark:text-green-400",children:["+",S.additions]}),x.jsxs("span",{className:"text-red-600 dark:text-red-400",children:["-",S.deletions]})]},S.relativePath))})]}),x.jsxs("button",{onClick:fe,className:"flex items-center gap-1 px-2 py-0.5 rounded bg-amber-100/60 text-amber-700 hover:bg-amber-200/60 hover:text-amber-800 dark:bg-amber-900/40 dark:text-amber-300 dark:hover:bg-amber-800/50 dark:hover:text-amber-200 transition-colors",title:k("undoLastFileChange"),children:[x.jsx(Wf,{className:"w-3 h-3"}),x.jsx("span",{children:k("undo")})]})]}),T==="loading"&&x.jsx("span",{className:"ml-auto text-muted-foreground animate-pulse",children:k("undoing")}),T==="error"&&x.jsx("span",{className:"ml-auto text-muted-foreground",children:b})]}),x.jsxs("div",{className:"flex items-center gap-3 mt-1 text-muted-foreground text-xs",children:[s&&x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(F1,{className:"w-3 h-3"}),k("turn",{count:s})]}),Q&&x.jsxs("span",{children:[Q,"s"]}),c!==void 0&&c>0&&x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsx(B1,{className:"w-3 h-3"}),c.toFixed(4)]})]}),D&&l&&l.length>0&&v&&x.jsx("div",{className:"mt-2 text-red-700 dark:text-red-300 text-xs whitespace-pre-wrap",children:l.join(`
|
|
286
|
+
`)}),!D&&i&&v&&x.jsx("div",{className:"mt-2 text-muted-foreground text-xs whitespace-pre-wrap max-h-32 overflow-y-auto",children:i}),W&&x.jsx(gh,{title:k("undoFileChanges"),description:k("undoConfirmDescription",{count:(f==null?void 0:f.length)??0}),confirmLabel:k("undo"),variant:"warning",onConfirm:ee,onCancel:()=>A(!1)})]})}const Tu=I.forwardRef(({className:t,...r},i)=>x.jsx("div",{ref:i,className:pr("rounded-lg border bg-card text-card-foreground shadow-sm",t),...r}));Tu.displayName="Card";const Lu=I.forwardRef(({className:t,...r},i)=>x.jsx("div",{ref:i,className:pr("flex flex-col space-y-1.5 p-6",t),...r}));Lu.displayName="CardHeader";const Iu=I.forwardRef(({className:t,...r},i)=>x.jsx("h3",{ref:i,className:pr("text-2xl font-semibold leading-none tracking-tight",t),...r}));Iu.displayName="CardTitle";const yb=I.forwardRef(({className:t,...r},i)=>x.jsx("p",{ref:i,className:pr("text-sm text-muted-foreground",t),...r}));yb.displayName="CardDescription";const Zh=I.forwardRef(({className:t,...r},i)=>x.jsx("div",{ref:i,className:pr("p-6 pt-0",t),...r}));Zh.displayName="CardContent";const _u=I.forwardRef(({className:t,...r},i)=>x.jsx("div",{ref:i,className:pr("flex items-center p-6 pt-0",t),...r}));_u.displayName="CardFooter";function xb({planId:t,title:r,content:i,onApprove:l,onComment:s,disabled:a}){const{t:c}=Et(),[f,p]=I.useState(!1),[m,g]=I.useState(!1),[y,k]=I.useState("");I.useEffect(()=>{if(!f)return;const b=$=>{$.key==="Escape"&&p(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[f]);const v=()=>{g(!0),p(!1),l(t)},N=()=>{const b=y.trim();b&&(p(!1),s(t,b),k(""))},T=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),N())},_={pre:({children:b})=>x.jsx("pre",{className:"bg-card rounded-lg p-2 overflow-x-auto text-xs my-2",children:b}),code:({className:b,children:$,...F})=>!b?x.jsx("code",{className:"bg-muted px-1 py-0.5 rounded text-muted-foreground text-xs",...F,children:$}):x.jsx("code",{className:b,...F,children:$}),a:({children:b,...$})=>x.jsx("a",{className:"text-muted-foreground hover:text-foreground underline",...$,children:b}),ul:({children:b})=>x.jsx("ul",{className:"list-disc list-inside space-y-0.5 my-1.5 text-sm",children:b}),ol:({children:b})=>x.jsx("ol",{className:"list-decimal list-inside space-y-0.5 my-1.5 text-sm",children:b}),p:({children:b})=>x.jsx("p",{className:"my-1.5 leading-relaxed text-sm",children:b}),h1:({children:b})=>x.jsx("h1",{className:"text-base font-semibold text-foreground mt-3 mb-1",children:b}),h2:({children:b})=>x.jsx("h2",{className:"text-sm font-semibold text-foreground mt-2 mb-1",children:b}),h3:({children:b})=>x.jsx("h3",{className:"text-sm font-medium text-foreground mt-1.5 mb-0.5",children:b}),blockquote:({children:b})=>x.jsx("blockquote",{className:"border-l-2 border-border pl-2 my-1.5 text-muted-foreground italic text-sm",children:b}),li:({children:b})=>x.jsx("li",{className:"text-sm",children:b})};return x.jsxs(x.Fragment,{children:[x.jsxs(Tu,{className:"border-border/50 bg-card/80",children:[x.jsx(Lu,{className:"p-3 pb-1",children:x.jsxs(Iu,{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[x.jsx("svg",{className:"w-4 h-4 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),r]})}),x.jsx(_u,{className:"p-3 pt-2",children:x.jsx("button",{onClick:()=>p(!0),className:`w-full text-xs font-medium px-4 py-2 rounded transition-colors ${m?"bg-muted text-muted-foreground hover:bg-accent":"bg-primary text-primary-foreground hover:bg-primary/90"}`,children:c(m?"readPlan":"viewPlan")})})]}),f&&x.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:b=>{b.target===b.currentTarget&&p(!1)},children:x.jsxs("div",{className:"bg-card border border-border rounded-lg w-full max-w-2xl max-h-[80vh] flex flex-col shadow-xl mx-4",children:[x.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border shrink-0",children:[x.jsxs("h2",{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[x.jsx("svg",{className:"w-4 h-4 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),r]}),x.jsx("button",{onClick:()=>p(!1),className:"text-muted-foreground hover:text-foreground transition-colors p-1",children:x.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),x.jsx("div",{className:"flex-1 overflow-y-auto p-4 text-sm text-foreground min-h-0",children:x.jsx(Jh,{components:_,children:i})}),!m&&!a&&x.jsxs("div",{className:"p-4 border-t border-border flex flex-col gap-2 shrink-0",children:[x.jsxs("div",{className:"flex gap-2",children:[x.jsx("input",{type:"text",value:y,onChange:b=>k(b.target.value),onKeyDown:T,placeholder:c("feedbackPlaceholder"),className:"flex-1 bg-muted text-foreground text-xs rounded px-3 py-1.5 border border-border focus:border-ring focus:outline-none placeholder:text-muted-foreground"}),x.jsx("button",{onClick:N,disabled:!y.trim(),className:"text-xs px-3 py-1.5 rounded bg-muted text-muted-foreground hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:c("send")})]}),x.jsx("button",{onClick:v,className:"w-full text-xs font-medium px-4 py-2 rounded bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",children:c("proceedWithPlan")})]})]})})]})}function vb({questionId:t,questions:r,onAnswer:i,disabled:l,answered:s}){var R;const{t:a}=Et(),[c,f]=I.useState(!!s),p=c||!!l,[m,g]=I.useState(0),[y,k]=I.useState(()=>{const W={};for(let A=0;A<r.length;A++)W[A]=[];return W}),[v,N]=I.useState(()=>{const W={};for(let A=0;A<r.length;A++)W[A]="";return W}),T=(W,A,K)=>{p||k(X=>{const le=X[W]||[];if(K){const D=le.includes(A)?le.filter(re=>re!==A):[...le,A];return{...X,[W]:D}}return{...X,[W]:[A]}})},_=()=>{if(p)return;f(!0);const W={};r.forEach((A,K)=>{var le;const X=(y[K]||[]).map(D=>A.options[D].label);(le=v[K])!=null&&le.trim()&&X.push(v[K].trim()),W[A.header]=X}),i(t,W)},b=r.length>1,$=m===r.length-1,F=r[m],U=m,H=()=>{$?_():g(W=>W+1)};return x.jsxs(Tu,{className:`border-violet-700/50 bg-card/80 ${p?"opacity-80":""}`,children:[x.jsx(Lu,{className:"p-3 pb-1",children:x.jsxs(Iu,{className:"text-sm font-medium text-violet-400 flex items-center gap-2",children:[x.jsx("svg",{className:"w-4 h-4 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),a(p?"questionsAnswered":"auraHasQuestions")]})}),b&&x.jsx("div",{className:"flex gap-1 px-3 pt-1 border-b border-border/60",children:r.map((W,A)=>{var le;const K=A===m,X=(y[A]||[]).length>0||((le=v[A])==null?void 0:le.trim().length)>0;return x.jsxs("button",{type:"button",onClick:()=>g(A),className:`relative px-2.5 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5 ${K?"text-violet-300 border-b-2 border-violet-500":"text-muted-foreground hover:text-foreground"}`,children:[W.header,X&&x.jsx("svg",{className:"w-3 h-3 text-violet-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]},A)})}),x.jsx(Zh,{className:"p-3 pt-1 space-y-4",children:x.jsxs("div",{className:"space-y-2",children:[x.jsxs("div",{className:"flex items-start gap-2",children:[!b&&x.jsx("span",{className:"shrink-0 mt-0.5 text-[10px] font-medium uppercase tracking-wider bg-violet-900/50 text-violet-300 px-1.5 py-0.5 rounded",children:F.header}),x.jsx("p",{className:"text-xs text-foreground leading-relaxed",children:F.question})]}),F.multiSelect&&!p&&x.jsx("p",{className:"text-[10px] text-muted-foreground ml-0.5",children:a("selectAllThatApply")}),x.jsxs("div",{className:"space-y-1.5",children:[F.options.map((W,A)=>{const K=(y[U]||[]).includes(A);return x.jsx("button",{type:"button",disabled:p,onClick:()=>T(U,A,F.multiSelect),className:`w-full text-left rounded-md border px-3 py-2 transition-colors ${p?K?"border-violet-600/60 bg-violet-950/40":"border-border bg-card/50 opacity-50":K?"border-violet-500/70 bg-violet-950/50":"border-border/50 bg-muted/40 hover:border-ring"}`,children:x.jsxs("div",{className:"flex items-start gap-2",children:[x.jsx("span",{className:`shrink-0 mt-0.5 w-3.5 h-3.5 flex items-center justify-center border ${F.multiSelect?"rounded-sm":"rounded-full"} ${K?"border-violet-400 bg-violet-500":"border-border"}`,children:K&&(F.multiSelect?x.jsx("svg",{className:"w-2.5 h-2.5 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):x.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-white"}))}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("p",{className:`text-xs font-medium ${K?"text-violet-200":"text-foreground"}`,children:W.label}),x.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug mt-0.5",children:W.description})]})]})},A)}),!p&&x.jsx("input",{type:"text",value:v[U]||"",onChange:W=>N(A=>({...A,[U]:W.target.value})),placeholder:a("additionalContext","Add additional context..."),className:"w-full text-xs bg-muted/60 border border-border/50 rounded-md px-3 py-2 text-foreground placeholder-muted-foreground outline-none focus:border-violet-500/70 transition-colors"}),p&&((R=v[U])==null?void 0:R.trim())&&x.jsx("div",{className:"text-xs text-muted-foreground border border-border rounded-md px-3 py-2 bg-card/50",children:v[U].trim()})]})]})}),!p&&x.jsx(_u,{className:"p-3 pt-0",children:x.jsx("button",{onClick:H,className:"w-full text-xs font-medium px-4 py-2 rounded bg-violet-600 text-white hover:bg-violet-500 transition-colors",children:a($?"submitAnswers":"next")})})]})}function wb({toolCount:t,children:r}){const{t:i}=Et(),[l,s]=I.useState(!1),a=i("toolCall",{count:t});return x.jsxs("div",{className:"my-1",children:[x.jsxs("button",{onClick:()=>s(!l),className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors py-1 px-2 rounded hover:bg-muted/50 w-full",children:[x.jsx(ah,{className:"w-3 h-3"}),x.jsx("span",{children:a}),l?x.jsx(Cl,{className:"w-3 h-3 ml-auto"}):x.jsx(cu,{className:"w-3 h-3 ml-auto"})]}),l&&x.jsx("div",{className:"mt-1 space-y-0.5",children:r})]})}function Br(t){if(typeof t=="string")return t;if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch{return String(t)}}function Ap(t,r){var i,l,s,a,c,f;try{const p=JSON.parse(r);switch(t){case"user":return{type:"user",text:p.text};case"status":return{type:"status",text:p.message};case"text":return p.type==="assistant"&&((i=p.message)!=null&&i.content)?{type:"text",text:p.message.content.filter(g=>g.type==="text").map(g=>g.text).join(""),model:(l=p.message)==null?void 0:l.model}:{type:"text",text:Br(p.message||p.text||r)};case"tool_use":return{type:"tool_use",toolName:p.tool||p.name,toolInput:p.input};case"tool_result":{const m=p.content||p.result,g=typeof m=="string"?m:JSON.stringify(m);return{type:"tool_result",toolName:p.tool,toolOutput:g,isError:p.is_error||((s=p.subtype)==null?void 0:s.startsWith("error"))}}case"result":{const m=Array.isArray(p.errors)?p.errors.map(Br):p.errors?[Br(p.errors)]:void 0;return{type:"result",resultSubtype:p.subtype,resultText:p.result,resultErrors:m,numTurns:p.num_turns,durationMs:p.duration_ms,totalCostUsd:p.total_cost_usd,fileStats:p.file_stats,isError:p.is_error||p.subtype!=="success"}}case"message":{if(p.type==="system"&&p.subtype==="init")return{type:"system",model:p.model,tools:p.tools};if(p.type==="system"&&p.subtype==="compact_boundary")return{type:"compact_boundary",compactTrigger:(a=p.compact_metadata)==null?void 0:a.trigger,preTokens:(c=p.compact_metadata)==null?void 0:c.pre_tokens};if(p.type==="result"){const m=Array.isArray(p.errors)?p.errors.map(Br):p.errors?[Br(p.errors)]:void 0;return{type:"result",resultSubtype:p.subtype,resultText:p.result,resultErrors:m,numTurns:p.num_turns,durationMs:p.duration_ms,totalCostUsd:p.total_cost_usd,fileStats:p.file_stats,isError:p.is_error||p.subtype!=="success"}}if((f=p.message)!=null&&f.content){const m=p.message.content.filter(g=>g.type==="text").map(g=>g.text).join("");if(m)return{type:"text",text:m}}return null}case"plan":return{type:"plan",planId:p.planId,planTitle:p.planTitle,planContent:p.planContent};case"question":return{type:"question",questionId:p.questionId,questions:p.questions};case"done":return{type:"done",text:p.message};case"error":return{type:"error",text:Br(p.message||"Unknown error")};default:return null}}catch{return{type:"text",text:r}}}function kb(t){const r=[];if(t.attributes)for(const[i,l]of Object.entries(t.attributes))r.push(l?`${i}="${l}"`:i);return r.length>0?`<${t.tag} ${r.join(" ")}>`:`<${t.tag}>`}function Sb(t){return t.length===1?ru(t[0]):t.map((r,i)=>{const l=r.component||`<${r.tag}>`;return`[Component ${i+1}: ${l}]
|
|
287
|
+
${ru(r)}`}).join(`
|
|
288
|
+
|
|
289
|
+
`)}function ru(t){const r=["[Inspector Context]"];if(r.push(""),r.push("## Selected Tag"),r.push(`Rendered HTML: ${kb(t)}`),t.text&&r.push(`Text content: "${t.text}"`),r.push(""),r.push("IMPORTANT: The user selected this specific <"+t.tag+"> tag. Any changes must target ONLY this element, not the entire parent component."),t.component){if(r.push(""),r.push("## Parent Component Context"),r.push(`Component: ${t.component}`),t.source){let i=`Source: ${t.source}`;t.line&&(i+=`:${t.line}`),t.column&&(i+=`:${t.column}`),r.push(i)}t.propsTypeDefinition&&(r.push(""),r.push("Props type definition:"),r.push("```tsx"),r.push(t.propsTypeDefinition),r.push("```")),t.sourceSnippet&&(r.push(""),r.push(`Source code around line ${t.line} (find the <${t.tag}> within this snippet):`),r.push("```tsx"),r.push(t.sourceSnippet),r.push("```"))}else{if(t.source){r.push(""),r.push("## Source Context");let i=`Source: ${t.source}`;t.line&&(i+=`:${t.line}`),t.column&&(i+=`:${t.column}`),r.push(i)}t.sourceSnippet&&(r.push(""),r.push(`Source code around line ${t.line}:`),r.push("```tsx"),r.push(t.sourceSnippet),r.push("```"))}return r.join(`
|
|
290
|
+
`)}function em(t,r){const[i,l]=I.useState([]),[s,a]=I.useState(!1),[c,f]=I.useState(!1),[p,m]=I.useState(!1),[g,y]=I.useState([]),[k,v]=I.useState([]),[N,T]=I.useState([]),_=I.useRef(null),b=I.useRef(null),$=I.useRef(void 0),F=I.useRef(null),U=I.useRef(null),H=I.useRef([]),R=I.useRef(null);I.useEffect(()=>{var G;(G=_.current)==null||G.scrollIntoView({behavior:"smooth"})},[i]),I.useEffect(()=>{const G=document.documentElement.scrollHeight;window.parent.postMessage({type:"AWEL_RESIZE",height:G},"*")},[i,s,g]),I.useEffect(()=>()=>{var G;(G=b.current)==null||G.close()},[]),I.useEffect(()=>{async function G(){try{const J=await(await fetch("/api/chat/history")).json();if(J.history&&Array.isArray(J.history)){const pe=[];let ae;for(const Le of J.history){const ie=Ap(Le.eventType,Le.data);ie&&(ie.toolName&&(ae=ie.toolName),ie.type==="tool_result"&&!ie.toolName&&(ie.toolName=ae),pe.push({id:Le.id||crypto.randomUUID(),type:ie.type||"text",timestamp:new Date(Le.timestamp||Date.now()),...ie}))}const ye=new Set;for(const Le of J.history)if(Le.eventType==="question_answered")try{const ie=JSON.parse(Le.data);ie.questionId&&ye.add(ie.questionId)}catch{}for(const Le of pe)Le.type==="question"&&Le.questionId&&ye.has(Le.questionId)&&(Le.answered=!0);l(pe)}}catch{}}G()},[]),I.useEffect(()=>{function G(V){var J;if(((J=V.data)==null?void 0:J.type)==="AWEL_CONSOLE_ENTRIES"){const pe=V.data.entries;y(pe),window.parent.postMessage({type:"AWEL_CONSOLE_VIEWED"},"*")}}return window.addEventListener("message",G),()=>window.removeEventListener("message",G)},[]),I.useEffect(()=>{function G(V){var J;((J=V.data)==null?void 0:J.type)==="AWEL_PAGE_CONTEXT"&&(R.current=V.data.context)}return window.addEventListener("message",G),window.parent.postMessage({type:"AWEL_REQUEST_PAGE_CONTEXT"},"*"),()=>window.removeEventListener("message",G)},[]);const W=I.useCallback(G=>{v(V=>V.some(J=>J.id===G.id)?V:[...V,G]),y(V=>V.filter(J=>J.id!==G.id)),window.parent.postMessage({type:"AWEL_CONSOLE_DISMISS",id:G.id},"*")},[]),A=I.useCallback(G=>{v(V=>{const J=V.find(pe=>pe.id===G);return J&&y(pe=>[...pe,J]),V.filter(pe=>pe.id!==G)})},[]),K=I.useCallback(G=>{v(V=>V.some(J=>J.id===G.id)?V:[...V,G])},[]),X=I.useCallback(G=>{y(V=>V.filter(J=>J.id!==G)),window.parent.postMessage({type:"AWEL_CONSOLE_DISMISS",id:G},"*")},[]),le=I.useCallback(()=>{y([]),window.parent.postMessage({type:"AWEL_CONSOLE_CLEAR"},"*")},[]);I.useEffect(()=>{H.current=k},[k]);const D=I.useCallback(G=>{const V=crypto.randomUUID();return l(J=>[...J,{id:V,type:G.type||"text",timestamp:new Date,...G}]),V},[]),re=I.useCallback((G,V)=>(fetch("/api/chat/history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({eventType:"user",data:JSON.stringify({type:"user",text:G})})}).catch(()=>{}),D({type:"user",text:G,imageUrls:V==null?void 0:V.imageUrls,consoleEntries:V==null?void 0:V.consoleEntries,attachedElements:V==null?void 0:V.attachedElements,contentSegments:V==null?void 0:V.contentSegments})),[D]),Y=I.useCallback(G=>V=>{const J=Ap(G,V.data||"");if(J){J.toolName&&($.current=J.toolName),J.type==="tool_result"&&!J.toolName&&(J.toolName=$.current),(J.type==="plan"||J.type==="question")&&f(!0);const pe=J.type&&["text","tool_use","tool_result","result","plan","question"].includes(J.type);l(ae=>{const ye=pe?ae.filter(Le=>Le.type!=="status"):ae;if(J.type==="text"&&J.text){const Le=ye[ye.length-1];if(Le&&Le.type==="text"){const ie=[...ye];return ie[ie.length-1]={...Le,text:(Le.text||"")+J.text},ie}}return[...ye,{id:crypto.randomUUID(),type:J.type||"text",timestamp:new Date,...J}]})}},[]),Q=I.useCallback(G=>{G instanceof MessageEvent?D({type:"error",text:G.data||"Connection error"}):D({type:"error",text:"Connection lost"}),a(!1)},[D]),de=["text","tool_use","tool_result","status","plan","question","result","message"],fe=I.useCallback((G,V,J)=>{var ae;a(!0),f(!1),m(!1),(ae=b.current)==null||ae.close();const pe=new EventSource("/api/stream");b.current=pe;for(const ye of de)pe.addEventListener(ye,Y(ye));pe.addEventListener("done",ye=>{Y("done")(ye),pe.close(),b.current=null,a(!1)}),pe.addEventListener("error",ye=>{ye instanceof MessageEvent?Y("error")(ye):(pe.close(),b.current=null,Q(ye))}),pe.onopen=()=>{const ye={prompt:G,model:t};V&&V.length>0&&(ye.consoleEntries=V),J&&J.length>0&&(ye.images=J),R.current&&(ye.pageContext=R.current),fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ye)}).catch(()=>{pe.close(),b.current=null,Q(new Event("error"))})}},[t,Y,Q]);I.useEffect(()=>{const G=new EventSource("/api/inspector/events");return G.addEventListener("selection",V=>{var J,pe,ae;try{const ye=JSON.parse(V.data);if(ye.mode==="attach")(J=F.current)==null||J.call(F,{element:ye});else if((pe=ye.comment)!=null&&pe.trim()){const ie=ru(ye)+`
|
|
291
|
+
|
|
292
|
+
`+ye.comment;re(ye.comment,{attachedElements:[ye]}),fe(ie)}else{const Le=ye.component||`<${ye.tag}>`,we=ye.props&&Object.values(ye.props).some(ve=>ve==="undefined"||ve==="null")?`Why is ${Le} receiving undefined props?`:`Explain what ${Le} does and how I can modify it.`;(ae=F.current)==null||ae.call(F,{element:ye,suggestedText:we,clearExisting:!0})}}catch{}}),()=>G.close()},[re,fe]);const ee=I.useCallback(()=>{var G;fetch("/api/stream/abort",{method:"POST"}).catch(()=>{}),(G=b.current)==null||G.close(),b.current=null,a(!1),f(!1),m(!0),l(V=>V.filter(J=>J.type!=="status"))},[]),ce=I.useCallback(G=>{T(V=>V.filter((J,pe)=>pe!==G))},[]),S=I.useCallback((G,V)=>{const J=H.current.length>0?[...H.current]:void 0;J&&v([]),V!=null&&V.imageDataUrls&&V.imageDataUrls.length>0&&T([]);let pe=G;V!=null&&V.elements&&V.elements.length>0&&(pe=Sb(V.elements)+`
|
|
293
|
+
|
|
294
|
+
`+pe),re(G,{imageUrls:V==null?void 0:V.imageDataUrls,consoleEntries:J,attachedElements:V==null?void 0:V.elements,contentSegments:V==null?void 0:V.contentSegments}),fe(pe,J,V==null?void 0:V.imageDataUrls)},[re,fe]),j=I.useCallback(async G=>{await fetch("/api/plan/approve",{method:"POST"});const pe=(await(await fetch("/api/plan/active")).json()).plan;if(!pe)return;const ae=`The user has approved the following plan. Execute it now.
|
|
295
|
+
|
|
296
|
+
## ${pe.plan.title}
|
|
297
|
+
|
|
298
|
+
${pe.plan.content}
|
|
299
|
+
|
|
300
|
+
Original request: ${pe.originalPrompt}`;fe(ae)},[fe]),B=I.useCallback(async(G,V)=>{await fetch("/api/plan/comment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:G,comment:V})}),re(V);const J=`The user provided feedback on your proposed plan. Please revise the plan based on their feedback and call ProposePlan again with the updated plan.
|
|
301
|
+
|
|
302
|
+
User feedback: ${V}`;fe(J)},[fe,re]),C=I.useCallback((G,V)=>{l(ye=>ye.map(Le=>Le.type==="question"&&Le.questionId===G?{...Le,answered:!0}:Le)),fetch("/api/chat/history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({eventType:"question_answered",data:JSON.stringify({questionId:G})})}).catch(()=>{});const ae=`The user answered your clarifying questions. Here are their selections:
|
|
303
|
+
|
|
304
|
+
${Object.entries(V).map(([ye,Le])=>`**${ye}**: ${Le.join(", ")}`).join(`
|
|
305
|
+
`)}
|
|
306
|
+
|
|
307
|
+
Please proceed based on these answers.`;fe(ae)},[fe]),Se=I.useCallback(G=>{l(V=>V.map(J=>J.id===G?{...J,undone:!0}:J))},[]),Ee=I.useMemo(()=>{var pe;const G=[];let V=0,J=-1;for(let ae=i.length-1;ae>=0;ae--)if(i[ae].type==="result"&&((pe=i[ae].fileStats)!=null&&pe.length)&&!i[ae].undone){J=ae;break}for(;V<i.length;){const ae=i[V];if(ae.type==="tool_use"||ae.type==="tool_result"){const Le=[];for(;V<i.length&&(i[V].type==="tool_use"||i[V].type==="tool_result");)Le.push(i[V]),V++;const ie=Le.filter(ve=>ve.type==="tool_use").length,we=Le.map(ve=>ve.type==="tool_use"?I.createElement(cb,{key:ve.id,toolName:ve.toolName||"Tool",input:ve.toolInput}):I.createElement(db,{key:ve.id,toolName:ve.toolName,output:ve.toolOutput,isError:ve.isError}));G.push(I.createElement(wb,{key:`tool-group-${Le[0].id}`,toolCount:ie,children:we}));continue}let ye=null;switch(ae.type){case"user":ye=I.createElement(lb,{key:ae.id,content:ae.text||"",imageUrls:ae.imageUrls,consoleEntries:ae.consoleEntries,attachedElements:ae.attachedElements,contentSegments:ae.contentSegments,onConsoleEntryClick:K,onImageClick:(Le,ie)=>{var we;return(we=U.current)==null?void 0:we.call(U,Le,ie)}});break;case"status":ye=I.createElement(sb,{key:ae.id,text:ae.text||""});break;case"text":ye=ae.text?I.createElement(ob,{key:ae.id,text:ae.text}):null;break;case"system":ye=I.createElement(fb,{key:ae.id,model:ae.model,tools:ae.tools});break;case"compact_boundary":ye=I.createElement(hb,{key:ae.id,trigger:ae.compactTrigger,preTokens:ae.preTokens});break;case"plan":ye=I.createElement(xb,{key:ae.id,planId:ae.planId||"",title:ae.planTitle||"Plan",content:ae.planContent||"",onApprove:j,onComment:B,disabled:p});break;case"question":ye=ae.questions?I.createElement(vb,{key:ae.id,questionId:ae.questionId||"",questions:ae.questions,onAnswer:C,disabled:p,answered:ae.answered}):null;break;case"result":ye=I.createElement(gb,{key:ae.id,msgId:ae.id,subtype:ae.resultSubtype||"success",result:ae.resultText,errors:ae.resultErrors,numTurns:ae.numTurns,durationMs:ae.durationMs,totalCostUsd:ae.totalCostUsd,fileStats:ae.fileStats,undone:ae.undone,isLatest:V===J,onReviewDiffs:r,onUndone:Se});break;case"error":ye=I.createElement(pb,{key:ae.id,text:ae.text||"Unknown error"});break}ye&&G.push(ye),V++}return G},[i,j,B,C,K,r,p]);return{messages:i,isLoading:s,waitingForInput:c,onElementAttachedRef:F,onImageClickRef:U,submitMessage:S,stopStream:ee,messagesEndRef:_,renderedMessages:Ee,consoleEntries:g,handleConsoleEntryClick:W,dismissConsoleEntry:X,clearConsoleEntries:le,attachedConsoleEntries:k,removeAttachedConsoleEntry:A,imageAttachments:N,setImageAttachments:T,removeImageAttachment:ce}}function Mp({text:t,children:r}){return x.jsxs("div",{className:"relative group/tip",children:[r,x.jsx("div",{className:`invisible group-hover/tip:visible opacity-0 group-hover/tip:opacity-100 transition-opacity duration-100
|
|
308
|
+
absolute z-[60] px-2 py-1 text-[10px] leading-tight text-muted-foreground bg-card border border-border rounded shadow-lg
|
|
309
|
+
whitespace-nowrap pointer-events-none bottom-full mb-1.5 right-0`,children:t})]})}function Cb({selectedModel:t,onHasMessagesChange:r,onStreamingChange:i,onReviewDiffs:l}){const{t:s}=Et(),{messages:a,isLoading:c,waitingForInput:f,onElementAttachedRef:p,onImageClickRef:m,submitMessage:g,stopStream:y,messagesEndRef:k,renderedMessages:v,consoleEntries:N,handleConsoleEntryClick:T,dismissConsoleEntry:_,clearConsoleEntries:b,attachedConsoleEntries:$,removeAttachedConsoleEntry:F,imageAttachments:U,setImageAttachments:H,removeImageAttachment:R}=em(t,l),W=I.useRef(null),A=I.useRef(null),K=I.useRef(new Map),X=I.useRef(0),[le,D]=I.useState(!0),[re,Y]=I.useState(null),[Q,de]=I.useState(0),fe=()=>{var ie;(ie=W.current)==null||ie.click()},ee=ie=>{const we=ie.target.files;if(!(!we||we.length===0)){for(const ve of Array.from(we)){const Ae=new FileReader;Ae.onload=()=>{const Ve=Ae.result;H($e=>[...$e,{dataUrl:Ve,mediaType:ve.type,name:ve.name}])},Ae.readAsDataURL(ve)}ie.target.value=""}};I.useEffect(()=>{r==null||r(a.length>0)},[a.length,r]),I.useEffect(()=>{i==null||i(c)},[c,i]),I.useEffect(()=>{const ie=we=>{var ve;((ve=we.data)==null?void 0:ve.type)==="AWEL_SCREENSHOT_ANNOTATION"&&we.data.dataUrl&&H(Ae=>[...Ae,{dataUrl:we.data.dataUrl,mediaType:"image/png",name:"screenshot.png"}])};return window.addEventListener("message",ie),()=>window.removeEventListener("message",ie)},[H]);const ce=I.useCallback(()=>{const ie=A.current;if(!ie)return"";let we="";const ve=Ae=>{var Ve;if(Ae.nodeType===Node.TEXT_NODE)we+=Ae.textContent||"";else if(!((Ve=Ae.dataset)!=null&&Ve.chipId))for(const $e of Array.from(Ae.childNodes))ve($e)};for(const Ae of Array.from(ie.childNodes))ve(Ae);return we.trim()},[]),S=I.useCallback(()=>{const ie=A.current;if(!ie)return[];const we=[];return ie.querySelectorAll("[data-chip-id]").forEach(ve=>{const Ae=ve.dataset.chipId,Ve=K.current.get(Ae);Ve&&we.push(Ve)}),we},[]),j=I.useCallback(()=>{const ie=A.current;if(!ie)return;const we=new Set;ie.querySelectorAll("[data-chip-id]").forEach(ve=>{we.add(ve.dataset.chipId)});for(const ve of K.current.keys())we.has(ve)||K.current.delete(ve)},[]),B=I.useCallback(()=>{if(!A.current){D(!0);return}const we=ce(),ve=K.current.size>0;D(!we&&!ve)},[ce]),C=I.useCallback(()=>{A.current&&(A.current.innerHTML="",K.current.clear(),D(!0))},[]),Se=I.useCallback(()=>{const ie=A.current;if(!ie)return;const we=document.createRange();we.selectNodeContents(ie),we.collapse(!1);const ve=window.getSelection();ve==null||ve.removeAllRanges(),ve==null||ve.addRange(we)},[]),Ee=I.useCallback(ie=>{const we=A.current;if(!we)return;const ve=`${ie.tag}:${ie.source}:${ie.line}`;for(const[,at]of K.current)if(`${at.tag}:${at.source}:${at.line}`===ve)return;const Ae=`chip-${++X.current}`;K.current.set(Ae,ie);const Ve=ie.component||`<${ie.tag}>`,$e=document.createElement("span");$e.dataset.chipId=Ae,$e.contentEditable="false",$e.style.cssText=["display:inline-flex","align-items:center","gap:3px","padding:1px 6px","margin:0 2px","border-radius:4px","background:rgba(136,19,57,0.75)","color:#ffe4e6","font-size:11px","font-weight:500","line-height:18px","white-space:nowrap","user-select:all","vertical-align:baseline"].join(";");const st=document.createElement("span");st.textContent=Ve,$e.appendChild(st);const He=document.createElement("span");He.dataset.removeChip=Ae,He.textContent="×",He.style.cssText="cursor:pointer;opacity:0.6;font-size:13px;line-height:1;",He.onmouseenter=()=>{He.style.opacity="1"},He.onmouseleave=()=>{He.style.opacity="0.6"},$e.appendChild(He);const gt=window.getSelection();if(gt&>.rangeCount>0&&we.contains(gt.anchorNode)){const at=gt.getRangeAt(0);at.deleteContents(),at.insertNode($e),at.setStartAfter($e),at.collapse(!0),gt.removeAllRanges(),gt.addRange(at)}else we.appendChild($e);(!$e.nextSibling||$e.nextSibling.nodeType===Node.TEXT_NODE&&!$e.nextSibling.textContent)&&$e.after(document.createTextNode(" ")),B()},[B]);I.useEffect(()=>(p.current=ie=>{const we=A.current;we&&(ie.clearExisting&&(we.innerHTML="",K.current.clear()),Ee(ie.element),ie.suggestedText&&(ce().trim()||we.appendChild(document.createTextNode(ie.suggestedText))),B(),we.focus(),Se())},()=>{p.current=null}),[p,Ee,ce,B,Se]),I.useEffect(()=>(m.current=(ie,we)=>{Y(ie),de(we)},()=>{m.current=null}),[m]);const G=I.useCallback(()=>{j(),B();const ie=A.current;ie&&(ie.scrollTop=ie.scrollHeight)},[j,B]),V=I.useCallback(()=>{const ie=A.current;if(!ie)return;const we=[];let ve=!1;const Ae=Ve=>{var $e;if(Ve.nodeType===Node.TEXT_NODE){const st=Ve.textContent||"";st&&we.push({type:"text",text:st})}else if(($e=Ve.dataset)!=null&&$e.chipId){ve=!0;const st=Ve.dataset.chipId,He=K.current.get(st);if(He){const at=S().findIndex(Nn=>`${Nn.tag}:${Nn.source}:${Nn.line}`==`${He.tag}:${He.source}:${He.line}`);we.push({type:"element",elementIndex:at>=0?at:0})}}else for(const st of Array.from(Ve.childNodes))Ae(st)};for(const Ve of Array.from(ie.childNodes))Ae(Ve);return ve?we:void 0},[S]),J=I.useCallback(ie=>{ie==null||ie.preventDefault();const we=ce(),ve=S(),Ae=U.length>0;if(!(!!we||ve.length>0||Ae)||c)return;let $e=we;if(!$e){const He=[];ve.length>0&&He.push(s("attachedElements")),Ae&&He.push(U.length===1?s("attachedImage"):s("attachedImages")),$e=`(${s("seeAttached",{parts:He.join(" & ")})})`}const st=V();g($e,{elements:ve.length>0?ve:void 0,imageDataUrls:Ae?U.map(He=>He.dataUrl):void 0,contentSegments:st}),C()},[ce,S,V,U,c,g,C,s]),pe=I.useCallback(ie=>{ie.key==="Enter"&&!ie.shiftKey&&(ie.preventDefault(),J())},[J]),ae=I.useCallback(ie=>{ie.preventDefault();const we=ie.clipboardData.getData("text/plain");document.execCommand("insertText",!1,we)},[]),ye=I.useCallback(ie=>{var Ae;const ve=ie.target.closest("[data-remove-chip]");if(ve){const Ve=ve.dataset.removeChip,$e=(Ae=A.current)==null?void 0:Ae.querySelector(`[data-chip-id="${Ve}"]`);$e&&($e.remove(),K.current.delete(Ve),B())}},[B]),Le=I.useCallback(()=>{window.parent.postMessage({type:"AWEL_INSPECT_FOR_ATTACH"},"*")},[]);return x.jsxs("div",{className:"flex flex-col relative h-full min-h-0 overflow-hidden",children:[x.jsxs("div",{className:"overflow-y-auto p-4 space-y-3 flex-1 min-h-0 break-words",children:[a.length===0?x.jsxs("div",{className:"flex flex-col items-center justify-center min-h-full gap-4 text-muted-foreground text-center",children:[x.jsx(lh,{className:"w-8 h-8 opacity-50"}),x.jsx("p",{className:"text-sm",children:s("emptyState")}),x.jsx("p",{className:"text-xs mt-1 text-muted-foreground",children:s("emptyStateHint")})]}):v,c&&x.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-xs",children:[x.jsx(gl,{className:"w-3 h-3 animate-spin"}),x.jsx("span",{children:s("thinking")})]}),x.jsx("div",{ref:k})]}),U.length>0&&x.jsx("div",{className:"mx-4 mt-2 mb-2 flex flex-wrap gap-2",children:U.map((ie,we)=>x.jsxs("div",{className:"relative group",title:ie.name,children:[x.jsx("img",{src:ie.dataUrl,alt:ie.name,className:"w-10 h-10 rounded-lg border border-border/50 object-cover cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>{Y(U.map(ve=>ve.dataUrl)),de(we)}}),x.jsx("button",{onClick:()=>R(we),className:"absolute -top-1.5 -right-1.5 hidden group-hover:flex items-center justify-center w-4 h-4 rounded-full bg-muted text-muted-foreground hover:bg-accent hover:text-foreground transition-colors",children:x.jsx(fr,{className:"w-2.5 h-2.5"})})]},we))}),x.jsxs("div",{className:"border-t border-border flex items-end",children:[x.jsx("div",{className:"flex-1 min-w-0",children:x.jsx(Mv,{entries:N,onEntryClick:T,onDismiss:_,onClearAll:b})}),x.jsxs("div",{className:"flex items-center gap-0.5 mr-4 mb-1.5",children:[x.jsx(Mp,{text:s("inspectElement"),children:x.jsx("button",{type:"button",onClick:Le,className:`shrink-0 p-1 rounded transition-colors ${le?"text-muted-foreground hover:text-foreground":"text-rose-600 dark:text-rose-400"}`,children:x.jsx(U1,{className:"w-4 h-4"})})}),x.jsx(Mp,{text:s("attachImage"),children:x.jsx("button",{type:"button",onClick:fe,className:`shrink-0 p-1 rounded transition-colors ${U.length>0?"text-blue-600 dark:text-blue-400":"text-muted-foreground hover:text-foreground"}`,children:x.jsx(Q1,{className:"w-4 h-4"})})})]})]}),x.jsx("input",{ref:W,type:"file",accept:"image/*",multiple:!0,onChange:ee,className:"hidden"}),x.jsxs("form",{onSubmit:J,children:[$.length>0&&x.jsx("div",{className:"px-4 pt-3 pb-0 flex items-center gap-1.5 flex-wrap",children:$.map(ie=>x.jsx(bb,{entry:ie,onRemove:F},ie.id))}),x.jsxs("div",{className:"flex gap-2 p-4 pt-1.5 items-end",children:[x.jsxs("div",{className:"flex-1 bg-card border border-border rounded-lg focus-within:ring-2 focus-within:ring-ring/50 focus-within:border-ring relative min-h-[36px]",children:[x.jsx("div",{ref:A,contentEditable:!c&&!f,suppressContentEditableWarning:!0,onInput:G,onKeyDown:pe,onPaste:ae,onClick:ye,className:`px-4 py-2 text-sm text-foreground focus:outline-none min-w-0 ${c||f?"opacity-50 cursor-not-allowed":""}`,style:{whiteSpace:"pre-wrap",wordBreak:"break-word",minHeight:"20px",maxHeight:"80px",overflowY:"auto"}}),le&&x.jsx("div",{className:"absolute left-4 top-2 text-sm text-muted-foreground pointer-events-none",children:s("inputPlaceholder")})]}),c||f?x.jsx(rn,{type:"button",onClick:y,className:"bg-red-600 hover:bg-red-700 text-white",children:x.jsx(ih,{className:"w-3.5 h-3.5"})}):x.jsx(rn,{type:"submit",disabled:le&&U.length===0,className:"bg-primary hover:bg-primary/90 text-primary-foreground",children:x.jsx(Wa,{className:"w-4 h-4"})})]})]}),re&&x.jsx(Fv,{images:re,currentIndex:Q,onClose:()=>Y(null),onNavigate:de})]})}function bb({entry:t,onRemove:r}){const[i,l]=I.useState(!1),s=t.level==="error",a=(()=>{const c=[t.message];if(t.sourceTrace&&t.sourceTrace.length>0){c.push("");for(const f of t.sourceTrace)c.push(` ${f.source}${f.line?`:${f.line}`:""}`)}else if(t.source){let f=t.source;t.line&&(f+=`:${t.line}`),t.column&&(f+=`:${t.column}`),c.push(`Source: ${f}`)}return t.count>1&&(c.push(""),c.push(`Occurred ${t.count} times`)),c.join(`
|
|
310
|
+
`)})();return x.jsxs("div",{className:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[x.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold cursor-default ${s?"bg-red-100 text-red-800 dark:bg-red-800 dark:text-red-100":"bg-yellow-100 text-yellow-800 dark:bg-yellow-800 dark:text-yellow-100"}`,children:[s?"error":"warning",x.jsx("span",{className:`font-normal text-[11px] truncate max-w-[160px] ${s?"text-red-600 dark:text-red-200":"text-yellow-600 dark:text-yellow-200"}`,children:t.message.length>40?t.message.slice(0,40)+"…":t.message}),x.jsx("button",{type:"button",onClick:()=>r(t.id),className:"text-current opacity-60 hover:opacity-100 transition-opacity",children:x.jsx(fr,{className:"w-3 h-3"})})]}),i&&x.jsx("div",{className:"absolute bottom-full left-0 mb-1.5 z-50 w-72 max-h-48 overflow-y-auto rounded-md border border-border bg-card p-2.5 text-xs text-foreground shadow-lg whitespace-pre-wrap break-words font-mono",children:a})]})}const Da={"claude-code":"text-orange-600 dark:text-orange-400",anthropic:"text-orange-600 dark:text-orange-400",openai:"text-green-600 dark:text-green-400","google-ai":"text-blue-600 dark:text-blue-400","vercel-gateway":"text-purple-600 dark:text-purple-400",qwen:"text-cyan-600 dark:text-cyan-400",minimax:"text-pink-600 dark:text-pink-400"},Fa={"claude-code":"Claude Code",anthropic:"Anthropic",openai:"OpenAI","google-ai":"Google AI","vercel-gateway":"Vercel AI Gateway",qwen:"Qwen",minimax:"MiniMax"},Eb={anthropic:"ANTHROPIC_API_KEY",openai:"OPENAI_API_KEY","google-ai":"GOOGLE_GENERATIVE_AI_API_KEY","vercel-gateway":"AI_GATEWAY_API_KEY",qwen:"DASHSCOPE_API_KEY",minimax:"MINIMAX_API_KEY"};function Dp({text:t,children:r,position:i="bottom"}){return x.jsxs("div",{className:"relative group/tip",children:[r,x.jsx("div",{className:`invisible group-hover/tip:visible opacity-0 group-hover/tip:opacity-100 transition-opacity duration-100
|
|
311
|
+
absolute z-[60] px-2 py-1 text-[10px] leading-tight text-muted-foreground bg-card border border-border rounded shadow-lg
|
|
312
|
+
whitespace-nowrap pointer-events-none
|
|
313
|
+
${i==="bottom"?"top-full mt-1.5 left-1/2 -translate-x-1/2":"bottom-full mb-1.5 left-1/2 -translate-x-1/2"}`,children:t})]})}function Nb({provider:t}){const[r,i]=I.useState(!1),l=Eb[t];if(!l)return null;const s=`export ${l}=your-key-here`,a=async c=>{c.stopPropagation();try{await navigator.clipboard.writeText(s),i(!0),setTimeout(()=>i(!1),1500)}catch{}};return x.jsxs("button",{onClick:a,className:"flex items-center gap-1.5 mt-1 px-1.5 py-0.5 rounded bg-muted/80 hover:bg-accent/80 transition-colors text-[10px] font-mono text-muted-foreground hover:text-foreground w-fit",children:[x.jsx("span",{className:"truncate max-w-[220px]",children:s}),r?x.jsx(A1,{className:"w-2.5 h-2.5 text-emerald-600 dark:text-emerald-400 flex-shrink-0"}):x.jsx($1,{className:"w-2.5 h-2.5 flex-shrink-0"})]})}function tm({selectedModel:t,onModelChange:r,chatHasMessages:i}){const{t:l}=Et(),[s,a]=I.useState([]),[c,f]=I.useState(!1),[p,m]=I.useState("all"),g=s.find(H=>H.id===t),y=(g==null?void 0:g.provider)==="claude-code",k=i&&y;I.useEffect(()=>{async function H(){try{const W=await(await fetch("/api/models")).json();if(W.models&&Array.isArray(W.models)){a(W.models);const A=W.models.find(K=>K.id===t);if(W.models.length>0&&(!A||!A.available)){const K=W.models.find(X=>X.available);K&&r(K.id)}}}catch{}}H()},[]);const v=I.useCallback(H=>{H.key==="Escape"&&f(!1)},[]);I.useEffect(()=>{if(c)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[c,v]);const N=s.filter(H=>H.available),T=s.filter(H=>!H.available),_=N.reduce((H,R)=>(H[R.provider]||(H[R.provider]=[]),H[R.provider].push(R),H),{}),b=[...new Set(T.map(H=>H.provider))],$=Object.keys(_),F=p==="all"?_:{[p]:_[p]||[]};if(s.length===0)return null;const U=x.jsxs("button",{onClick:()=>{k||(m("all"),f(!0))},disabled:k,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md border text-xs transition-colors max-w-[10rem] ${k?"bg-muted/50 border-muted/50 cursor-default text-muted-foreground":"bg-muted/80 hover:bg-accent/80 border-border/50 text-foreground"}`,children:[g&&x.jsx("span",{className:`truncate ${k?"text-muted-foreground":Da[g.provider]}`,children:g.label}),!g&&x.jsx("span",{children:l("selectModel")}),!k&&x.jsx(D1,{className:"w-3 h-3 text-muted-foreground flex-shrink-0"})]});return x.jsxs("div",{className:"relative",children:[k?x.jsx(Dp,{text:l("modelSwitchDisabled"),children:U}):U,c&&!k&&x.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:H=>{H.target===H.currentTarget&&f(!1)},children:x.jsxs("div",{className:"bg-card border border-border rounded-lg w-full max-w-md shadow-xl mx-4 flex flex-col max-h-[70vh]",children:[x.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[x.jsx("h3",{className:"text-sm font-medium text-foreground",children:l("selectModel")}),x.jsx("button",{onClick:()=>f(!1),className:"text-muted-foreground hover:text-foreground transition-colors",children:x.jsx(fr,{className:"w-4 h-4"})})]}),x.jsx("div",{className:"px-4 py-2.5 border-b border-border",children:x.jsxs("div",{className:"relative",children:[x.jsxs("select",{value:p,onChange:H=>m(H.target.value),className:"w-full text-xs bg-muted border border-border rounded-md px-2.5 py-1.5 pr-7 text-foreground outline-none focus:border-ring transition-colors appearance-none",children:[x.jsx("option",{value:"all",children:l("allProviders","All Providers")}),$.map(H=>x.jsx("option",{value:H,children:Fa[H]||H},H))]}),x.jsx(Cl,{className:"w-3.5 h-3.5 text-muted-foreground absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"})]})}),x.jsxs("div",{className:"overflow-y-auto flex-1",children:[Object.entries(F).map(([H,R])=>x.jsxs("div",{children:[x.jsx("div",{className:`px-4 py-1.5 text-[10px] font-medium uppercase tracking-wider bg-card/50 sticky top-0 ${Da[H]||"text-muted-foreground"}`,children:Fa[H]||H}),R.map(W=>{const A=i&&!y&&W.provider==="claude-code",K=x.jsxs("button",{disabled:A,onClick:()=>{A||(r(W.id),f(!1))},className:`w-full text-left px-4 py-2 text-xs transition-colors ${A?"text-muted-foreground cursor-not-allowed":W.id===t?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,children:[x.jsx("span",{className:A?"text-muted-foreground":Da[W.provider],children:W.label}),A&&x.jsx(Vf,{className:"w-3 h-3 text-muted-foreground inline ml-1.5"}),W.id===t&&x.jsx("span",{className:"ml-2 text-[10px] text-muted-foreground",children:"✓"})]},W.id);return A?x.jsx(Dp,{text:l("modelSwitchDisabled"),position:"top",children:K},W.id):K})]},H)),p==="all"&&b.length>0&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-2 px-4 py-2",children:[x.jsx("div",{className:"flex-1 border-t border-border"}),x.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Unavailable"}),x.jsx("div",{className:"flex-1 border-t border-border"})]}),b.map(H=>x.jsxs("div",{className:"px-4 py-2 text-xs text-muted-foreground",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Vf,{className:"w-3 h-3 text-muted-foreground"}),x.jsx("span",{children:Fa[H]||H}),x.jsx("span",{className:"text-[10px] text-muted-foreground",children:H==="claude-code"?"CLI not installed":"API key required"})]}),x.jsx(Nb,{provider:H})]},H))]})]})]})})]})}function mn(){}mn.prototype={diff:function(r,i){var l,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.callback;typeof s=="function"&&(a=s,s={});var c=this;function f(U){return U=c.postProcess(U,s),a?(setTimeout(function(){a(U)},0),!0):U}r=this.castInput(r,s),i=this.castInput(i,s),r=this.removeEmpty(this.tokenize(r,s)),i=this.removeEmpty(this.tokenize(i,s));var p=i.length,m=r.length,g=1,y=p+m;s.maxEditLength!=null&&(y=Math.min(y,s.maxEditLength));var k=(l=s.timeout)!==null&&l!==void 0?l:1/0,v=Date.now()+k,N=[{oldPos:-1,lastComponent:void 0}],T=this.extractCommon(N[0],i,r,0,s);if(N[0].oldPos+1>=m&&T+1>=p)return f(Fp(c,N[0].lastComponent,i,r,c.useLongestToken));var _=-1/0,b=1/0;function $(){for(var U=Math.max(_,-g);U<=Math.min(b,g);U+=2){var H=void 0,R=N[U-1],W=N[U+1];R&&(N[U-1]=void 0);var A=!1;if(W){var K=W.oldPos-U;A=W&&0<=K&&K<p}var X=R&&R.oldPos+1<m;if(!A&&!X){N[U]=void 0;continue}if(!X||A&&R.oldPos<W.oldPos?H=c.addToPath(W,!0,!1,0,s):H=c.addToPath(R,!1,!0,1,s),T=c.extractCommon(H,i,r,U,s),H.oldPos+1>=m&&T+1>=p)return f(Fp(c,H.lastComponent,i,r,c.useLongestToken));N[U]=H,H.oldPos+1>=m&&(b=Math.min(b,U-1)),T+1>=p&&(_=Math.max(_,U+1))}g++}if(a)(function U(){setTimeout(function(){if(g>y||Date.now()>v)return a();$()||U()},0)})();else for(;g<=y&&Date.now()<=v;){var F=$();if(F)return F}},addToPath:function(r,i,l,s,a){var c=r.lastComponent;return c&&!a.oneChangePerToken&&c.added===i&&c.removed===l?{oldPos:r.oldPos+s,lastComponent:{count:c.count+1,added:i,removed:l,previousComponent:c.previousComponent}}:{oldPos:r.oldPos+s,lastComponent:{count:1,added:i,removed:l,previousComponent:c}}},extractCommon:function(r,i,l,s,a){for(var c=i.length,f=l.length,p=r.oldPos,m=p-s,g=0;m+1<c&&p+1<f&&this.equals(l[p+1],i[m+1],a);)m++,p++,g++,a.oneChangePerToken&&(r.lastComponent={count:1,previousComponent:r.lastComponent,added:!1,removed:!1});return g&&!a.oneChangePerToken&&(r.lastComponent={count:g,previousComponent:r.lastComponent,added:!1,removed:!1}),r.oldPos=p,m},equals:function(r,i,l){return l.comparator?l.comparator(r,i):r===i||l.ignoreCase&&r.toLowerCase()===i.toLowerCase()},removeEmpty:function(r){for(var i=[],l=0;l<r.length;l++)r[l]&&i.push(r[l]);return i},castInput:function(r){return r},tokenize:function(r){return Array.from(r)},join:function(r){return r.join("")},postProcess:function(r){return r}};function Fp(t,r,i,l,s){for(var a=[],c;r;)a.push(r),c=r.previousComponent,delete r.previousComponent,r=c;a.reverse();for(var f=0,p=a.length,m=0,g=0;f<p;f++){var y=a[f];if(y.removed)y.value=t.join(l.slice(g,g+y.count)),g+=y.count;else{if(!y.added&&s){var k=i.slice(m,m+y.count);k=k.map(function(v,N){var T=l[g+N];return T.length>v.length?T:v}),y.value=t.join(k)}else y.value=t.join(i.slice(m,m+y.count));m+=y.count,y.added||(g+=y.count)}}return a}function $p(t,r){var i;for(i=0;i<t.length&&i<r.length;i++)if(t[i]!=r[i])return t.slice(0,i);return t.slice(0,i)}function Up(t,r){var i;if(!t||!r||t[t.length-1]!=r[r.length-1])return"";for(i=0;i<t.length&&i<r.length;i++)if(t[t.length-(i+1)]!=r[r.length-(i+1)])return t.slice(-i);return t.slice(-i)}function iu(t,r,i){if(t.slice(0,r.length)!=r)throw Error("string ".concat(JSON.stringify(t)," doesn't start with prefix ").concat(JSON.stringify(r),"; this is a bug"));return i+t.slice(r.length)}function ou(t,r,i){if(!r)return t+i;if(t.slice(-r.length)!=r)throw Error("string ".concat(JSON.stringify(t)," doesn't end with suffix ").concat(JSON.stringify(r),"; this is a bug"));return t.slice(0,-r.length)+i}function Fi(t,r){return iu(t,r,"")}function dl(t,r){return ou(t,r,"")}function Bp(t,r){return r.slice(0,jb(t,r))}function jb(t,r){var i=0;t.length>r.length&&(i=t.length-r.length);var l=r.length;t.length<r.length&&(l=t.length);var s=Array(l),a=0;s[0]=0;for(var c=1;c<l;c++){for(r[c]==r[a]?s[c]=s[a]:s[c]=a;a>0&&r[c]!=r[a];)a=s[a];r[c]==r[a]&&a++}a=0;for(var f=i;f<t.length;f++){for(;a>0&&t[f]!=r[a];)a=s[a];t[f]==r[a]&&a++}return a}var vl="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Pb=new RegExp("[".concat(vl,"]+|\\s+|[^").concat(vl,"]"),"ug"),jl=new mn;jl.equals=function(t,r,i){return i.ignoreCase&&(t=t.toLowerCase(),r=r.toLowerCase()),t.trim()===r.trim()};jl.tokenize=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i;if(r.intlSegmenter){if(r.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=Array.from(r.intlSegmenter.segment(t),function(a){return a.segment})}else i=t.match(Pb)||[];var l=[],s=null;return i.forEach(function(a){/\s/.test(a)?s==null?l.push(a):l.push(l.pop()+a):/\s/.test(s)?l[l.length-1]==s?l.push(l.pop()+a):l.push(s+a):l.push(a),s=a}),l};jl.join=function(t){return t.map(function(r,i){return i==0?r:r.replace(/^\s+/,"")}).join("")};jl.postProcess=function(t,r){if(!t||r.oneChangePerToken)return t;var i=null,l=null,s=null;return t.forEach(function(a){a.added?l=a:a.removed?s=a:((l||s)&&Vp(i,s,l,a),i=a,l=null,s=null)}),(l||s)&&Vp(i,s,l,null),t};function Vp(t,r,i,l){if(r&&i){var s=r.value.match(/^\s*/)[0],a=r.value.match(/\s*$/)[0],c=i.value.match(/^\s*/)[0],f=i.value.match(/\s*$/)[0];if(t){var p=$p(s,c);t.value=ou(t.value,c,p),r.value=Fi(r.value,p),i.value=Fi(i.value,p)}if(l){var m=Up(a,f);l.value=iu(l.value,f,m),r.value=dl(r.value,m),i.value=dl(i.value,m)}}else if(i)t&&(i.value=i.value.replace(/^\s*/,"")),l&&(l.value=l.value.replace(/^\s*/,""));else if(t&&l){var g=l.value.match(/^\s*/)[0],y=r.value.match(/^\s*/)[0],k=r.value.match(/\s*$/)[0],v=$p(g,y);r.value=Fi(r.value,v);var N=Up(Fi(g,v),k);r.value=dl(r.value,N),l.value=iu(l.value,g,N),t.value=ou(t.value,g,g.slice(0,g.length-N.length))}else if(l){var T=l.value.match(/^\s*/)[0],_=r.value.match(/\s*$/)[0],b=Bp(_,T);r.value=dl(r.value,b)}else if(t){var $=t.value.match(/\s*$/)[0],F=r.value.match(/^\s*/)[0],U=Bp($,F);r.value=Fi(r.value,U)}}var Tb=new mn;Tb.tokenize=function(t){var r=new RegExp("(\\r?\\n)|[".concat(vl,"]+|[^\\S\\n\\r]+|[^").concat(vl,"]"),"ug");return t.match(r)||[]};var Pl=new mn;Pl.tokenize=function(t,r){r.stripTrailingCr&&(t=t.replace(/\r\n/g,`
|
|
314
|
+
`));var i=[],l=t.split(/(\n|\r\n)/);l[l.length-1]||l.pop();for(var s=0;s<l.length;s++){var a=l[s];s%2&&!r.newlineIsToken?i[i.length-1]+=a:i.push(a)}return i};Pl.equals=function(t,r,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
|
|
315
|
+
`))&&(t=t.trim()),(!i.newlineIsToken||!r.includes(`
|
|
316
|
+
`))&&(r=r.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
|
|
317
|
+
`)&&(t=t.slice(0,-1)),r.endsWith(`
|
|
318
|
+
`)&&(r=r.slice(0,-1))),mn.prototype.equals.call(this,t,r,i)};function Hp(t,r,i){return Pl.diff(t,r,i)}var Lb=new mn;Lb.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var Ib=new mn;Ib.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function Wp(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);r&&(l=l.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),i.push.apply(i,l)}return i}function qp(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?Wp(Object(i),!0).forEach(function(l){Rb(t,l,i[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Wp(Object(i)).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(i,l))})}return t}function _b(t,r){if(typeof t!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var l=i.call(t,r);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Ob(t){var r=_b(t,"string");return typeof r=="symbol"?r:r+""}function lu(t){"@babel/helpers - typeof";return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lu(t)}function Rb(t,r,i){return r=Ob(r),r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function $a(t){return zb(t)||Ab(t)||Mb(t)||Db()}function zb(t){if(Array.isArray(t))return su(t)}function Ab(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Mb(t,r){if(t){if(typeof t=="string")return su(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return su(t,r)}}function su(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,l=new Array(r);i<r;i++)l[i]=t[i];return l}function Db(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
319
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ki=new mn;Ki.useLongestToken=!0;Ki.tokenize=Pl.tokenize;Ki.castInput=function(t,r){var i=r.undefinedReplacement,l=r.stringifyReplacer,s=l===void 0?function(a,c){return typeof c>"u"?i:c}:l;return typeof t=="string"?t:JSON.stringify(au(t,null,null,s),s," ")};Ki.equals=function(t,r,i){return mn.prototype.equals.call(Ki,t.replace(/,([\r\n])/g,"$1"),r.replace(/,([\r\n])/g,"$1"),i)};function au(t,r,i,l,s){r=r||[],i=i||[],l&&(t=l(s,t));var a;for(a=0;a<r.length;a+=1)if(r[a]===t)return i[a];var c;if(Object.prototype.toString.call(t)==="[object Array]"){for(r.push(t),c=new Array(t.length),i.push(c),a=0;a<t.length;a+=1)c[a]=au(t[a],r,i,l,s);return r.pop(),i.pop(),c}if(t&&t.toJSON&&(t=t.toJSON()),lu(t)==="object"&&t!==null){r.push(t),c={},i.push(c);var f=[],p;for(p in t)Object.prototype.hasOwnProperty.call(t,p)&&f.push(p);for(f.sort(),a=0;a<f.length;a+=1)p=f[a],c[p]=au(t[p],r,i,l,p);r.pop(),i.pop()}else c=t;return c}var uu=new mn;uu.tokenize=function(t){return t.slice()};uu.join=uu.removeEmpty=function(t){return t};function Fb(t,r,i,l,s,a,c){if(c||(c={}),typeof c=="function"&&(c={callback:c}),typeof c.context>"u"&&(c.context=4),c.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(c.callback){var f=c,p=f.callback;Hp(i,l,qp(qp({},c),{},{callback:function(y){var k=m(y);p(k)}}))}else return m(Hp(i,l,c));function m(g){if(!g)return;g.push({value:"",lines:[]});function y(A){return A.map(function(K){return" "+K})}for(var k=[],v=0,N=0,T=[],_=1,b=1,$=function(){var K=g[F],X=K.lines||$b(K.value);if(K.lines=X,K.added||K.removed){var le;if(!v){var D=g[F-1];v=_,N=b,D&&(T=c.context>0?y(D.lines.slice(-c.context)):[],v-=T.length,N-=T.length)}(le=T).push.apply(le,$a(X.map(function(fe){return(K.added?"+":"-")+fe}))),K.added?b+=X.length:_+=X.length}else{if(v)if(X.length<=c.context*2&&F<g.length-2){var re;(re=T).push.apply(re,$a(y(X)))}else{var Y,Q=Math.min(X.length,c.context);(Y=T).push.apply(Y,$a(y(X.slice(0,Q))));var de={oldStart:v,oldLines:_-v+Q,newStart:N,newLines:b-N+Q,lines:T};k.push(de),v=0,N=0,T=[]}_+=X.length,b+=X.length}},F=0;F<g.length;F++)$();for(var U=0,H=k;U<H.length;U++)for(var R=H[U],W=0;W<R.lines.length;W++)R.lines[W].endsWith(`
|
|
320
|
+
`)?R.lines[W]=R.lines[W].slice(0,-1):(R.lines.splice(W+1,0,"\"),W++);return{oldFileName:t,newFileName:r,oldHeader:s,newHeader:a,hunks:k}}}function $b(t){var r=t.endsWith(`
|
|
321
|
+
`),i=t.split(`
|
|
322
|
+
`).map(function(l){return l+`
|
|
323
|
+
`});return r?i.pop():i.push(i.pop().slice(0,-1)),i}const Kp=[{id:"vscode",name:"VS Code",url:t=>`vscode://file/${t}`},{id:"cursor",name:"Cursor",url:t=>`cursor://file/${t}`},{id:"windsurf",name:"Windsurf",url:t=>`windsurf://file/${t}`},{id:"zed",name:"Zed",url:t=>`zed://file/${t}`},{id:"sublime",name:"Sublime Text",url:t=>`subl://open?url=file:///${t}`},{id:"jetbrains",name:"JetBrains",url:t=>`jetbrains://open?file=${t}`}],nm="awel-preferred-editor";function Ub(){try{return localStorage.getItem(nm)??""}catch{return""}}function Bb(t){try{localStorage.setItem(nm,t)}catch{}}function Vb({diffs:t,onClose:r}){const{t:i}=Et(),[l,s]=I.useState(0),[a,c]=I.useState(Ub),[f,p]=I.useState(null);I.useEffect(()=>{fetch("/api/project-info").then(b=>b.json()).then(b=>p(b.projectCwd)).catch(()=>{})},[]);const m=I.useCallback(b=>{c(b),Bb(b)},[]),g=I.useCallback(()=>{if(!f||!a)return;const b=Kp.find(F=>F.id===a);if(!b)return;const $=`${f}/${t[l].relativePath}`;window.open(b.url($),"_self")},[f,a,t,l]),y=t[l],k=Fb(y.relativePath,y.relativePath,y.originalContent,y.currentContent,"","",{context:3}),v=I.useCallback(b=>{b.key==="Escape"?r():b.key==="ArrowDown"?(b.preventDefault(),s($=>Math.min($+1,t.length-1))):b.key==="ArrowUp"&&(b.preventDefault(),s($=>Math.max($-1,0)))},[r,t.length]);I.useEffect(()=>(document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)),[v]);const N=b=>{const $=b.split("/");return $[$.length-1]},T=b=>{const $=b.split("/");return $.length>1?$.slice(0,-1).join("/"):""},_=b=>!b.existed&&b.existsNow;return x.jsx("div",{className:"fixed inset-0 z-50",onClick:b=>{b.stopPropagation(),r()},children:x.jsxs("div",{className:"absolute inset-0 bg-background overflow-hidden flex flex-col",onClick:b=>b.stopPropagation(),children:[x.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[x.jsx("span",{className:"text-sm text-foreground",children:i("fileChanged",{count:t.length})}),x.jsx("button",{onClick:r,className:"text-muted-foreground hover:text-foreground transition-colors",children:x.jsx(fr,{className:"w-4 h-4"})})]}),x.jsxs("div",{className:"flex flex-1 min-h-0",children:[x.jsx("div",{className:"w-64 border-r border-border overflow-y-auto flex-shrink-0",children:t.map((b,$)=>x.jsx("button",{onClick:()=>s($),className:`w-full text-left px-3 py-2 text-xs border-b border-border/50 transition-colors ${$===l?"bg-muted text-foreground":"text-muted-foreground hover:bg-card hover:text-foreground"}`,children:x.jsxs("div",{className:"flex items-center gap-2",children:[_(b)?x.jsx(W1,{className:"w-3.5 h-3.5 text-green-600 dark:text-green-400 flex-shrink-0"}):x.jsx(nh,{className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400 flex-shrink-0"}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("div",{className:"font-medium truncate",children:N(b.relativePath)}),T(b.relativePath)&&x.jsx("div",{className:"text-muted-foreground truncate",children:T(b.relativePath)})]}),x.jsx("span",{className:`ml-auto text-[10px] px-1.5 py-0.5 rounded flex-shrink-0 ${_(b)?"bg-green-100/60 text-green-700 dark:bg-green-900/40 dark:text-green-400":"bg-blue-100/60 text-blue-700 dark:bg-blue-900/40 dark:text-blue-400"}`,children:_(b)?"New":"Modified"})]})},b.relativePath))}),x.jsxs("div",{className:"flex-1 overflow-auto flex flex-col",children:[x.jsxs("div",{className:"flex items-center justify-between px-4 py-1.5 border-b border-border/50 bg-muted/30 flex-shrink-0",children:[x.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate mr-4",children:y.relativePath}),x.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[x.jsxs("select",{value:a,onChange:b=>m(b.target.value),className:"text-xs bg-background border border-border rounded px-1.5 py-0.5 text-foreground outline-none",children:[x.jsx("option",{value:"",disabled:!0,children:i("noEditorSelected")}),Kp.map(b=>x.jsx("option",{value:b.id,children:b.name},b.id))]}),x.jsxs("button",{onClick:g,disabled:!a||!f,className:"flex items-center gap-1 text-xs px-2 py-0.5 rounded border border-border bg-background text-foreground hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[x.jsx(V1,{className:"w-3 h-3"}),i("openInEditor")]})]})]}),x.jsx("div",{className:"font-mono text-xs leading-5 overflow-auto flex-1",children:k.hunks.length===0?x.jsx("div",{className:"p-4 text-muted-foreground",children:i("noChanges")}):k.hunks.map((b,$)=>x.jsxs("div",{children:[x.jsxs("div",{className:"bg-muted/50 text-muted-foreground px-4 py-1 select-none border-y border-border/50",children:["@@ -",b.oldStart,",",b.oldLines," +",b.newStart,",",b.newLines," @@"]}),Hb(b)]},$))})]})]})]})})}function Hb(t){let r=t.oldStart,i=t.newStart;return t.lines.map((l,s)=>{const a=l[0],c=l.slice(1);let f="",p="text-muted-foreground",m="",g="";return a==="-"?(f="bg-red-100/50 dark:bg-red-900/20",p="text-red-700 dark:text-red-300",m=String(r++),g=""):a==="+"?(f="bg-green-100/50 dark:bg-green-900/20",p="text-green-700 dark:text-green-300",m="",g=String(i++)):(m=String(r++),g=String(i++)),x.jsxs("div",{className:`flex ${f}`,children:[x.jsx("span",{className:"w-10 text-right pr-1 text-muted-foreground select-none flex-shrink-0",children:m}),x.jsx("span",{className:"w-10 text-right pr-1 text-muted-foreground select-none flex-shrink-0",children:g}),x.jsx("span",{className:`w-6 text-center select-none flex-shrink-0 ${a==="+"?"text-green-500":a==="-"?"text-red-500":"text-muted-foreground"}`,children:a===" "?"":a}),x.jsx("span",{className:`flex-1 whitespace-pre ${p}`,children:c})]},s)})}const rm="awel-theme";function Wb(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function qb(){const t=localStorage.getItem(rm);return t==="light"||t==="dark"||t==="system"?t:"system"}function im(){const[t,r]=I.useState(qb),[i,l]=I.useState(Wb),s=t==="system"?i:t,a=I.useCallback(c=>{r(c),localStorage.setItem(rm,c)},[]);return I.useEffect(()=>{const c=document.documentElement;s==="dark"?c.classList.add("dark"):c.classList.remove("dark"),window.parent.postMessage({type:"AWEL_THEME",theme:s},"*")},[s]),I.useEffect(()=>{const c=window.matchMedia("(prefers-color-scheme: dark)"),f=p=>{l(p.matches?"dark":"light")};return c.addEventListener("change",f),()=>c.removeEventListener("change",f)},[]),{theme:t,resolvedTheme:s,setTheme:a}}const Kb=[{labelKey:"creationChipEcommerce",fallback:"E-commerce store"},{labelKey:"creationChipBlog",fallback:"Blog platform"},{labelKey:"creationChipDashboard",fallback:"Admin dashboard"},{labelKey:"creationChipPortfolio",fallback:"Portfolio site"}];function Qb({initialModel:t,onModelChange:r}){const{t:i}=Et(),{resolvedTheme:l,setTheme:s}=im(),[a,c]=I.useState(t),[f,p]=I.useState(""),[m,g]=I.useState("initial"),y=I.useRef(null),k=I.useRef(null),{messages:v,isLoading:N,renderedMessages:T,submitMessage:_,stopStream:b,waitingForInput:$}=em(a);I.useEffect(()=>{var A;(A=y.current)==null||A.focus()},[]),I.useEffect(()=>{v.length>0&&m==="initial"&&g("building")},[v.length,m]),I.useEffect(()=>{if(m!=="building")return;const A=[...v].reverse().find(K=>K.type==="result");A&&A.resultSubtype==="success"&&(fetch("/api/project/mark-ready",{method:"POST"}).catch(()=>{}),g("success"),setTimeout(()=>{window.location.href="/"},3e3))},[v,m]),I.useEffect(()=>{var A;(A=k.current)==null||A.scrollIntoView({behavior:"smooth"})},[v]);const F=I.useCallback(A=>{c(A),r(A),localStorage.setItem("awel-model",A)},[r]),U=I.useCallback(A=>{const K=A||f.trim();!K||N||(p(""),_(K))},[f,N,_]),H=I.useCallback(A=>{A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),U())},[U]),R=I.useCallback(A=>{U(A)},[U]),W=()=>{s(l==="dark"?"light":"dark")};return m==="success"?x.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:x.jsxs("div",{className:"text-center space-y-4 animate-in fade-in duration-500",children:[x.jsx("div",{className:"w-16 h-16 mx-auto rounded-full bg-emerald-100 dark:bg-emerald-900/30 flex items-center justify-center",children:x.jsx(tv,{className:"w-8 h-8 text-emerald-600 dark:text-emerald-400"})}),x.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:i("creationSuccess","Your app is ready!")}),x.jsx("p",{className:"text-sm text-muted-foreground",children:i("creationRedirecting","Redirecting to your app...")}),x.jsx("div",{className:"flex items-center justify-center gap-2 text-muted-foreground",children:x.jsx(gl,{className:"w-4 h-4 animate-spin"})})]})}):x.jsxs("div",{className:"h-screen bg-background flex flex-col overflow-hidden",children:[x.jsxs("header",{className:"flex items-center justify-between px-6 py-3 border-b border-border shrink-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-sm leading-none",children:"🌸"}),x.jsx("span",{className:"text-sm font-semibold text-foreground",children:"Awel"}),N&&x.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(tm,{selectedModel:a,onModelChange:F,chatHasMessages:v.length>0}),x.jsx(rn,{variant:"ghost",size:"icon",onClick:W,className:"h-7 w-7 hover:bg-muted",title:i("toggleTheme"),children:l==="dark"?x.jsx(oh,{className:"w-3.5 h-3.5"}):x.jsx(rh,{className:"w-3.5 h-3.5"})})]})]}),x.jsx("div",{className:"flex-1 flex flex-col items-center min-h-0",children:m==="initial"?x.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full max-w-2xl px-6",children:[x.jsxs("div",{className:"text-center mb-8 space-y-3",children:[x.jsx("h1",{className:"text-3xl font-semibold text-foreground tracking-tight",children:i("creationHeading","What would you like to build?")}),x.jsx("p",{className:"text-sm text-muted-foreground",children:i("creationSubheading","Describe your app and Awel will create it for you.")})]}),x.jsx("div",{className:"flex flex-wrap justify-center gap-2 mb-8",children:Kb.map(A=>x.jsx("button",{onClick:()=>R(i(A.labelKey,A.fallback)),className:"px-4 py-2 text-sm rounded-full border border-border bg-card hover:bg-accent hover:text-accent-foreground transition-colors text-muted-foreground",children:i(A.labelKey,A.fallback)},A.labelKey))}),x.jsx("div",{className:"w-full",children:x.jsxs("div",{className:"flex gap-2 items-end",children:[x.jsx("div",{className:"flex-1 bg-card border border-border rounded-xl focus-within:ring-2 focus-within:ring-ring/50 focus-within:border-ring",children:x.jsx("textarea",{ref:y,value:f,onChange:A=>p(A.target.value),onKeyDown:H,placeholder:i("creationPlaceholder","Describe what you want to build..."),className:"w-full px-4 py-3 text-sm bg-transparent text-foreground placeholder:text-muted-foreground focus:outline-none resize-none",rows:3,style:{minHeight:"48px",maxHeight:"160px"}})}),x.jsx(rn,{onClick:()=>U(),disabled:!f.trim(),className:"bg-primary hover:bg-primary/90 text-primary-foreground h-12 w-12 rounded-xl",children:x.jsx(Wa,{className:"w-5 h-5"})})]})})]}):x.jsxs("div",{className:"flex-1 flex flex-col w-full max-w-3xl min-h-0",children:[x.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-3 min-h-0 break-words",children:[T,N&&!$&&x.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-xs",children:[x.jsx(gl,{className:"w-3 h-3 animate-spin"}),x.jsx("span",{children:i("thinking")})]}),x.jsx("div",{ref:k})]}),x.jsx("div",{className:"border-t border-border p-4",children:x.jsxs("div",{className:"flex gap-2 items-end",children:[x.jsx("div",{className:"flex-1 bg-card border border-border rounded-lg focus-within:ring-2 focus-within:ring-ring/50 focus-within:border-ring",children:x.jsx("textarea",{ref:y,value:f,onChange:A=>p(A.target.value),onKeyDown:H,placeholder:i("inputPlaceholder"),disabled:N&&!$,className:`w-full px-4 py-2 text-sm bg-transparent text-foreground placeholder:text-muted-foreground focus:outline-none resize-none ${N&&!$?"opacity-50 cursor-not-allowed":""}`,rows:1,style:{minHeight:"36px",maxHeight:"120px"}})}),N||$?x.jsx(rn,{onClick:b,className:"bg-red-600 hover:bg-red-700 text-white",children:x.jsx(ih,{className:"w-3.5 h-3.5"})}):x.jsx(rn,{onClick:()=>U(),disabled:!f.trim(),className:"bg-primary hover:bg-primary/90 text-primary-foreground",children:x.jsx(Wa,{className:"w-4 h-4"})})]})})]})})]})}const Gb=!!window.__AWEL_CREATION_MODE__;function Yb(){const{t}=Et(),{resolvedTheme:r,setTheme:i}=im(),[l,s]=I.useState(()=>localStorage.getItem("awel-model")||"sonnet"),[a,c]=I.useState(!1),[f,p]=I.useState(0),[m,g]=I.useState(!1),[y,k]=I.useState(!1),[v,N]=I.useState(null),[T,_]=I.useState(!1),b=I.useCallback(X=>{N(X),window.parent.postMessage({type:"AWEL_HIDE_CONTROLS"},"*")},[]),$=I.useCallback(()=>{N(null),window.parent.postMessage({type:"AWEL_SHOW_CONTROLS"},"*")},[]),F=async()=>{_(!1),await fetch("/api/chat/history",{method:"DELETE"}),p(X=>X+1)},U=X=>{s(X),localStorage.setItem("awel-model",X)},H=I.useCallback(X=>{g(X)},[]),R=()=>{window.parent.postMessage({type:"AWEL_CLOSE"},"*")},W=()=>{c(X=>!X)},A=()=>{window.parent.postMessage({type:"AWEL_CLOSE"},"*")},K=()=>{i(r==="dark"?"light":"dark")};return Gb?x.jsx(Qb,{initialModel:l,onModelChange:U}):x.jsxs("div",{className:"fixed inset-0",onClick:A,children:[x.jsxs("div",{className:`absolute top-6 right-6 bottom-20 bg-background rounded-xl shadow-2xl flex flex-col overflow-hidden border border-border ${a?"left-6":"w-[380px]"}`,onClick:X=>X.stopPropagation(),children:[x.jsxs("header",{className:"flex items-center justify-between px-4 py-2.5 border-b border-border shrink-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-sm leading-none",children:"🌸"}),x.jsx("span",{className:"text-sm font-semibold text-foreground",children:"Awel"}),y&&x.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(tm,{selectedModel:l,onModelChange:U,chatHasMessages:m}),x.jsx(rn,{variant:"ghost",size:"icon",onClick:K,className:"h-7 w-7 hover:bg-muted",title:t("toggleTheme"),children:r==="dark"?x.jsx(oh,{className:"w-3.5 h-3.5"}):x.jsx(rh,{className:"w-3.5 h-3.5"})}),x.jsx(rn,{variant:"ghost",size:"icon",onClick:()=>_(!0),className:"h-7 w-7 hover:bg-muted",title:t("deleteChatHistory"),children:x.jsx(sh,{className:"w-3.5 h-3.5"})}),x.jsx(rn,{variant:"ghost",size:"icon",onClick:W,className:"h-7 w-7 hover:bg-muted",title:t(a?"collapse":"expand"),children:a?x.jsx(J1,{className:"w-3.5 h-3.5"}):x.jsx(X1,{className:"w-3.5 h-3.5"})}),x.jsx(rn,{variant:"ghost",size:"icon",onClick:R,className:"h-7 w-7 hover:bg-muted",children:x.jsx(fr,{className:"w-3.5 h-3.5"})})]})]}),x.jsx(Cb,{selectedModel:l,onHasMessagesChange:H,onStreamingChange:k,onReviewDiffs:b},f)]}),v&&x.jsx(Vb,{diffs:v,onClose:$}),T&&x.jsx(gh,{title:t("deleteChatHistory"),description:t("deleteChatHistoryDescription"),confirmLabel:t("delete"),variant:"danger",onConfirm:F,onCancel:()=>_(!1)})]})}uy.createRoot(document.getElementById("root")).render(x.jsx(ny.StrictMode,{children:x.jsx(Yb,{})}));
|