intlayer-editor 5.5.2 → 5.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/client/dist/assets/index-Yc-vRZFR.js +290 -0
  2. package/client/dist/index.html +1 -1
  3. package/package.json +28 -25
  4. package/server/dist/controllers/configuration.controller.cjs +4 -1
  5. package/server/dist/controllers/configuration.controller.cjs.map +1 -1
  6. package/server/dist/controllers/configuration.controller.d.ts +9 -0
  7. package/server/dist/controllers/configuration.controller.d.ts.map +1 -0
  8. package/server/dist/controllers/configuration.controller.mjs +4 -1
  9. package/server/dist/controllers/configuration.controller.mjs.map +1 -1
  10. package/server/dist/controllers/dictionary.controller.cjs +42 -2
  11. package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
  12. package/server/dist/controllers/dictionary.controller.d.ts +23 -0
  13. package/server/dist/controllers/dictionary.controller.d.ts.map +1 -0
  14. package/server/dist/controllers/dictionary.controller.mjs +32 -3
  15. package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
  16. package/server/dist/export.cjs +2 -0
  17. package/server/dist/export.cjs.map +1 -1
  18. package/server/dist/export.d.ts +3 -0
  19. package/server/dist/export.d.ts.map +1 -0
  20. package/server/dist/export.mjs +1 -0
  21. package/server/dist/export.mjs.map +1 -1
  22. package/server/dist/index.d.ts +2 -0
  23. package/server/dist/index.d.ts.map +1 -0
  24. package/server/dist/routes/config.routes.d.ts +10 -0
  25. package/server/dist/routes/config.routes.d.ts.map +1 -0
  26. package/server/dist/routes/dictionary.routes.cjs +9 -0
  27. package/server/dist/routes/dictionary.routes.cjs.map +1 -1
  28. package/server/dist/routes/dictionary.routes.d.ts +15 -0
  29. package/server/dist/routes/dictionary.routes.d.ts.map +1 -0
  30. package/server/dist/routes/dictionary.routes.mjs +13 -1
  31. package/server/dist/routes/dictionary.routes.mjs.map +1 -1
  32. package/server/dist/types/Routes.d.ts +7 -0
  33. package/server/dist/types/Routes.d.ts.map +1 -0
  34. package/server/dist/utils/checkPortAvailability.d.ts +2 -0
  35. package/server/dist/utils/checkPortAvailability.d.ts.map +1 -0
  36. package/server/dist/utils/httpStatusCodes.d.ts +395 -0
  37. package/server/dist/utils/httpStatusCodes.d.ts.map +1 -0
  38. package/server/dist/utils/responseData.d.ts +64 -0
  39. package/server/dist/utils/responseData.d.ts.map +1 -0
  40. package/client/dist/assets/index-A_u6piFE.js +0 -290
@@ -0,0 +1,290 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-Bbf3ZyxA.js","assets/html-B8pBdPMQ.js","assets/javascript-BMMyXqK5.js","assets/css-DPfMkruS.js","assets/angular-ts-C26w9mnW.js","assets/scss-OYdSNvt2.js","assets/apl-e980N3t4.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-DAp1zUbp.js","assets/typescript-DlfHMoPT.js","assets/postcss-CXtECtnM.js","assets/blade-DGJDb2eD.js","assets/html-derivative-ZQ8onl8Z.js","assets/sql-B9xm8XSJ.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-CCPHrsME.js","assets/coffee-JUOWOZUj.js","assets/cpp-ChttZZSa.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-CfkhwHAQ.js","assets/shellscript-Yzrsuije.js","assets/edge-CKszZCnI.js","assets/elixir-Cc7HHYVZ.js","assets/elm-DbKCFpqz.js","assets/erb-D3EuUlpm.js","assets/ruby-C5MNRm7z.js","assets/haml-AZXGPtNI.js","assets/graphql-Caa12_AY.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-DQy8In2x.js","assets/markdown-RrBGtqGR.js","assets/gdresource-BSDf9Pz1.js","assets/gdshader-DkwncUOv.js","assets/gdscript-Bty6elJm.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Dz9X99Cm.js","assets/glimmer-ts-aQ3p29eY.js","assets/hack-C1oSbnf3.js","assets/handlebars-YebKLiTq.js","assets/http-C38VWM-o.js","assets/hxml-B2Z6b3nn.js","assets/haxe-BP3HzMA6.js","assets/jinja-BJmZiE_F.js","assets/jison-BCRtk9Os.js","assets/julia-Db79kMu7.js","assets/r-C2tOF0e5.js","assets/latex-okZ41ve_.js","assets/tex-mQPFytnq.js","assets/liquid-C1lUkxsO.js","assets/marko-C0z8HR23.js","assets/less-B1dDrJ26.js","assets/mdc-02rxpBA4.js","assets/nginx-DknmC5AR.js","assets/nim-ANgMEeb1.js","assets/perl-EWVMYlR0.js","assets/php-9PMsNEzE.js","assets/pug-Ch9lOoSd.js","assets/qml-CHzV51_b.js","assets/razor-CNXmhs1n.js","assets/csharp-CHadp7IV.js","assets/rst-DHpKpUMA.js","assets/cmake-D1j8_8rp.js","assets/sas-Dlf3BogE.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-B_7ge1HE.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-C5TGba-T.js","assets/svelte-CXAE1zBs.js","assets/templ-kZcegUSt.js","assets/go-PEFJdsE-.js","assets/ts-tags-CHnADXob.js","assets/twig-febACT8g.js","assets/vue-xz9K_ZKN.js","assets/vue-html-dOMv_FQ0.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
+ var eM=Object.defineProperty;var tM=(e,t,n)=>t in e?eM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ce=(e,t,n)=>tM(e,typeof t!="symbol"?t+"":t,n);function nM(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function ah(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yp={exports:{}},Zl={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var KE;function rM(){if(KE)return Zl;KE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return Zl.Fragment=t,Zl.jsx=n,Zl.jsxs=n,Zl}var WE;function iM(){return WE||(WE=1,Yp.exports=rM()),Yp.exports}var b=iM(),Zp={exports:{}},Ye={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var YE;function aM(){if(YE)return Ye;YE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function g(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function A(P,X,H){this.props=P,this.context=X,this.refs=S,this.updater=H||v}A.prototype.isReactComponent={},A.prototype.setState=function(P,X){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,X,"setState")},A.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function w(){}w.prototype=A.prototype;function T(P,X,H){this.props=P,this.context=X,this.refs=S,this.updater=H||v}var R=T.prototype=new w;R.constructor=T,x(R,A.prototype),R.isPureReactComponent=!0;var D=Array.isArray,N={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function O(P,X,H,Q,re,he){return H=he.ref,{$$typeof:e,type:P,key:X,ref:H!==void 0?H:null,props:he}}function M(P,X){return O(P.type,X,void 0,void 0,void 0,P.props)}function B(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function U(P){var X={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(H){return X[H]})}var ue=/\/+/g;function ie(P,X){return typeof P=="object"&&P!==null&&P.key!=null?U(""+P.key):X.toString(36)}function fe(){}function Z(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(fe,fe):(P.status="pending",P.then(function(X){P.status==="pending"&&(P.status="fulfilled",P.value=X)},function(X){P.status==="pending"&&(P.status="rejected",P.reason=X)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function ee(P,X,H,Q,re){var he=typeof P;(he==="undefined"||he==="boolean")&&(P=null);var xe=!1;if(P===null)xe=!0;else switch(he){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(P.$$typeof){case e:case t:xe=!0;break;case m:return xe=P._init,ee(xe(P._payload),X,H,Q,re)}}if(xe)return re=re(P),xe=Q===""?"."+ie(P,0):Q,D(re)?(H="",xe!=null&&(H=xe.replace(ue,"$&/")+"/"),ee(re,X,H,"",function(De){return De})):re!=null&&(B(re)&&(re=M(re,H+(re.key==null||P&&P.key===re.key?"":(""+re.key).replace(ue,"$&/")+"/")+xe)),X.push(re)),1;xe=0;var le=Q===""?".":Q+":";if(D(P))for(var Ee=0;Ee<P.length;Ee++)Q=P[Ee],he=le+ie(Q,Ee),xe+=ee(Q,X,H,he,re);else if(Ee=g(P),typeof Ee=="function")for(P=Ee.call(P),Ee=0;!(Q=P.next()).done;)Q=Q.value,he=le+ie(Q,Ee++),xe+=ee(Q,X,H,he,re);else if(he==="object"){if(typeof P.then=="function")return ee(Z(P),X,H,Q,re);throw X=String(P),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return xe}function F(P,X,H){if(P==null)return P;var Q=[],re=0;return ee(P,Q,"","",function(he){return X.call(H,he,re++)}),Q}function ne(P){if(P._status===-1){var X=P._result;X=X(),X.then(function(H){(P._status===0||P._status===-1)&&(P._status=1,P._result=H)},function(H){(P._status===0||P._status===-1)&&(P._status=2,P._result=H)}),P._status===-1&&(P._status=0,P._result=X)}if(P._status===1)return P._result.default;throw P._result}var q=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)};function ge(){}return Ye.Children={map:F,forEach:function(P,X,H){F(P,function(){X.apply(this,arguments)},H)},count:function(P){var X=0;return F(P,function(){X++}),X},toArray:function(P){return F(P,function(X){return X})||[]},only:function(P){if(!B(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ye.Component=A,Ye.Fragment=n,Ye.Profiler=a,Ye.PureComponent=T,Ye.StrictMode=r,Ye.Suspense=d,Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Ye.act=function(){throw Error("act(...) is not supported in production builds of React.")},Ye.cache=function(P){return function(){return P.apply(null,arguments)}},Ye.cloneElement=function(P,X,H){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var Q=x({},P.props),re=P.key,he=void 0;if(X!=null)for(xe in X.ref!==void 0&&(he=void 0),X.key!==void 0&&(re=""+X.key),X)!L.call(X,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&X.ref===void 0||(Q[xe]=X[xe]);var xe=arguments.length-2;if(xe===1)Q.children=H;else if(1<xe){for(var le=Array(xe),Ee=0;Ee<xe;Ee++)le[Ee]=arguments[Ee+2];Q.children=le}return O(P.type,re,void 0,void 0,he,Q)},Ye.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:o,_context:P},P},Ye.createElement=function(P,X,H){var Q,re={},he=null;if(X!=null)for(Q in X.key!==void 0&&(he=""+X.key),X)L.call(X,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(re[Q]=X[Q]);var xe=arguments.length-2;if(xe===1)re.children=H;else if(1<xe){for(var le=Array(xe),Ee=0;Ee<xe;Ee++)le[Ee]=arguments[Ee+2];re.children=le}if(P&&P.defaultProps)for(Q in xe=P.defaultProps,xe)re[Q]===void 0&&(re[Q]=xe[Q]);return O(P,he,void 0,void 0,null,re)},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(P){return{$$typeof:u,render:P}},Ye.isValidElement=B,Ye.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:ne}},Ye.memo=function(P,X){return{$$typeof:f,type:P,compare:X===void 0?null:X}},Ye.startTransition=function(P){var X=N.T,H={};N.T=H;try{var Q=P(),re=N.S;re!==null&&re(H,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(ge,q)}catch(he){q(he)}finally{N.T=X}},Ye.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Ye.use=function(P){return N.H.use(P)},Ye.useActionState=function(P,X,H){return N.H.useActionState(P,X,H)},Ye.useCallback=function(P,X){return N.H.useCallback(P,X)},Ye.useContext=function(P){return N.H.useContext(P)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(P,X){return N.H.useDeferredValue(P,X)},Ye.useEffect=function(P,X){return N.H.useEffect(P,X)},Ye.useId=function(){return N.H.useId()},Ye.useImperativeHandle=function(P,X,H){return N.H.useImperativeHandle(P,X,H)},Ye.useInsertionEffect=function(P,X){return N.H.useInsertionEffect(P,X)},Ye.useLayoutEffect=function(P,X){return N.H.useLayoutEffect(P,X)},Ye.useMemo=function(P,X){return N.H.useMemo(P,X)},Ye.useOptimistic=function(P,X){return N.H.useOptimistic(P,X)},Ye.useReducer=function(P,X,H){return N.H.useReducer(P,X,H)},Ye.useRef=function(P){return N.H.useRef(P)},Ye.useState=function(P){return N.H.useState(P)},Ye.useSyncExternalStore=function(P,X,H){return N.H.useSyncExternalStore(P,X,H)},Ye.useTransition=function(){return N.H.useTransition()},Ye.version="19.0.0",Ye}var ZE;function Yc(){return ZE||(ZE=1,Zp.exports=aM()),Zp.exports}var E=Yc();const Ge=ah(E),UT=nM({__proto__:null,default:Ge},[E]);var Xp={exports:{}},Xl={},Qp={exports:{}},Jp={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var XE;function sM(){return XE||(XE=1,function(e){function t(F,ne){var q=F.length;F.push(ne);e:for(;0<q;){var ge=q-1>>>1,P=F[ge];if(0<a(P,ne))F[ge]=ne,F[q]=P,q=ge;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var ne=F[0],q=F.pop();if(q!==ne){F[0]=q;e:for(var ge=0,P=F.length,X=P>>>1;ge<X;){var H=2*(ge+1)-1,Q=F[H],re=H+1,he=F[re];if(0>a(Q,q))re<P&&0>a(he,Q)?(F[ge]=he,F[re]=q,ge=re):(F[ge]=Q,F[H]=q,ge=H);else if(re<P&&0>a(he,q))F[ge]=he,F[re]=q,ge=re;else break e}}return ne}function a(F,ne){var q=F.sortIndex-ne.sortIndex;return q!==0?q:F.id-ne.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],m=1,y=null,g=3,v=!1,x=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R(F){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=F)r(f),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(f)}}function D(F){if(S=!1,R(F),!x)if(n(d)!==null)x=!0,Z();else{var ne=n(f);ne!==null&&ee(D,ne.startTime-F)}}var N=!1,L=-1,O=5,M=-1;function B(){return!(e.unstable_now()-M<O)}function U(){if(N){var F=e.unstable_now();M=F;var ne=!0;try{e:{x=!1,S&&(S=!1,w(L),L=-1),v=!0;var q=g;try{t:{for(R(F),y=n(d);y!==null&&!(y.expirationTime>F&&B());){var ge=y.callback;if(typeof ge=="function"){y.callback=null,g=y.priorityLevel;var P=ge(y.expirationTime<=F);if(F=e.unstable_now(),typeof P=="function"){y.callback=P,R(F),ne=!0;break t}y===n(d)&&r(d),R(F)}else r(d);y=n(d)}if(y!==null)ne=!0;else{var X=n(f);X!==null&&ee(D,X.startTime-F),ne=!1}}break e}finally{y=null,g=q,v=!1}ne=void 0}}finally{ne?ue():N=!1}}}var ue;if(typeof T=="function")ue=function(){T(U)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,fe=ie.port2;ie.port1.onmessage=U,ue=function(){fe.postMessage(null)}}else ue=function(){A(U,0)};function Z(){N||(N=!0,ue())}function ee(F,ne){L=A(function(){F(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){x||v||(x=!0,Z())},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var ne=3;break;default:ne=g}var q=g;g=ne;try{return F()}finally{g=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,ne){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var q=g;g=F;try{return ne()}finally{g=q}},e.unstable_scheduleCallback=function(F,ne,q){var ge=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?ge+q:ge):q=ge,F){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=q+P,F={id:m++,callback:ne,priorityLevel:F,startTime:q,expirationTime:P,sortIndex:-1},q>ge?(F.sortIndex=q,t(f,F),n(d)===null&&F===n(f)&&(S?(w(L),L=-1):S=!0,ee(D,q-ge))):(F.sortIndex=P,t(d,F),x||v||(x=!0,Z())),F},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(F){var ne=g;return function(){var q=g;g=ne;try{return F.apply(this,arguments)}finally{g=q}}}}(Jp)),Jp}var QE;function oM(){return QE||(QE=1,Qp.exports=sM()),Qp.exports}var eg={exports:{}},mn={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var JE;function lM(){if(JE)return mn;JE=1;var e=Yc();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(d,f,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return mn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,mn.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(d,f,null,m)},mn.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},mn.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},mn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},mn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,y=u(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:y,integrity:g,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:y,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},mn.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},mn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,y=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},mn.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},mn.requestFormReset=function(d){r.d.r(d)},mn.unstable_batchedUpdates=function(d,f){return d(f)},mn.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},mn.useFormStatus=function(){return l.H.useHostTransitionStatus()},mn.version="19.0.0",mn}var eS;function HT(){if(eS)return eg.exports;eS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),eg.exports=lM(),eg.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var tS;function cM(){if(tS)return Xl;tS=1;var e=oM(),t=Yc(),n=HT();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}var o=Symbol.for("react.element"),l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),g=Symbol.for("react.consumer"),v=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),D=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function L(i){return i===null||typeof i!="object"?null:(i=N&&i[N]||i["@@iterator"],typeof i=="function"?i:null)}var O=Symbol.for("react.client.reference");function M(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===O?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case d:return"Fragment";case u:return"Portal";case m:return"Profiler";case f:return"StrictMode";case S:return"Suspense";case A:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case v:return(i.displayName||"Context")+".Provider";case g:return(i._context.displayName||"Context")+".Consumer";case x:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case w:return s=i.displayName||null,s!==null?s:M(i.type)||"Memo";case T:s=i._payload,i=i._init;try{return M(i(s))}catch{}}return null}var B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.assign,ue,ie;function fe(i){if(ue===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ue=s&&s[1]||"",ie=-1<c.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+ue+i+ie}var Z=!1;function ee(i,s){if(!i||Z)return"";Z=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ae){var te=ae}Reflect.construct(i,[],me)}else{try{me.call()}catch(ae){te=ae}i.call(me.prototype)}}else{try{throw Error()}catch(ae){te=ae}(me=i())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ae){if(ae&&te&&typeof ae.stack=="string")return[ae.stack,te.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=h.DetermineComponentFrameRoot(),C=_[0],k=_[1];if(C&&k){var j=C.split(`
45
+ `),$=k.split(`
46
+ `);for(p=h=0;h<j.length&&!j[h].includes("DetermineComponentFrameRoot");)h++;for(;p<$.length&&!$[p].includes("DetermineComponentFrameRoot");)p++;if(h===j.length||p===$.length)for(h=j.length-1,p=$.length-1;1<=h&&0<=p&&j[h]!==$[p];)p--;for(;1<=h&&0<=p;h--,p--)if(j[h]!==$[p]){if(h!==1||p!==1)do if(h--,p--,0>p||j[h]!==$[p]){var se=`
47
+ `+j[h].replace(" at new "," at ");return i.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",i.displayName)),se}while(1<=h&&0<=p);break}}}finally{Z=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?fe(c):""}function F(i){switch(i.tag){case 26:case 27:case 5:return fe(i.type);case 16:return fe("Lazy");case 13:return fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return i=ee(i.type,!1),i;case 11:return i=ee(i.type.render,!1),i;case 1:return i=ee(i.type,!0),i;default:return""}}function ne(i){try{var s="";do s+=F(i),i=i.return;while(i);return s}catch(c){return`
48
+ Error generating stack: `+c.message+`
49
+ `+c.stack}}function q(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function ge(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function P(i){if(q(i)!==i)throw Error(r(188))}function X(i){var s=i.alternate;if(!s){if(s=q(i),s===null)throw Error(r(188));return s!==i?null:i}for(var c=i,h=s;;){var p=c.return;if(p===null)break;var _=p.alternate;if(_===null){if(h=p.return,h!==null){c=h;continue}break}if(p.child===_.child){for(_=p.child;_;){if(_===c)return P(p),i;if(_===h)return P(p),s;_=_.sibling}throw Error(r(188))}if(c.return!==h.return)c=p,h=_;else{for(var C=!1,k=p.child;k;){if(k===c){C=!0,c=p,h=_;break}if(k===h){C=!0,h=p,c=_;break}k=k.sibling}if(!C){for(k=_.child;k;){if(k===c){C=!0,c=_,h=p;break}if(k===h){C=!0,h=_,c=p;break}k=k.sibling}if(!C)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:s}function H(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=H(i),s!==null)return s;i=i.sibling}return null}var Q=Array.isArray,re=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},xe=[],le=-1;function Ee(i){return{current:i}}function De(i){0>le||(i.current=xe[le],xe[le]=null,le--)}function Ce(i,s){le++,xe[le]=i.current,i.current=s}var Fe=Ee(null),Ke=Ee(null),Et=Ee(null),Yt=Ee(null);function Ln(i,s){switch(Ce(Et,s),Ce(Ke,i),Ce(Fe,null),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)&&(s=s.namespaceURI)?EE(s):0;break;default:if(i=i===8?s.parentNode:s,s=i.tagName,i=i.namespaceURI)i=EE(i),s=SE(i,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}De(Fe),Ce(Fe,s)}function Cn(){De(Fe),De(Ke),De(Et)}function pr(i){i.memoizedState!==null&&Ce(Yt,i);var s=Fe.current,c=SE(s,i.type);s!==c&&(Ce(Ke,i),Ce(Fe,c))}function Na(i){Ke.current===i&&(De(Fe),De(Ke)),Yt.current===i&&(De(Yt),$l._currentValue=he)}var gr=Object.prototype.hasOwnProperty,z=e.unstable_scheduleCallback,J=e.unstable_cancelCallback,oe=e.unstable_shouldYield,we=e.unstable_requestPaint,be=e.unstable_now,_e=e.unstable_getCurrentPriorityLevel,Pe=e.unstable_ImmediatePriority,ct=e.unstable_UserBlockingPriority,ht=e.unstable_NormalPriority,Rn=e.unstable_LowPriority,ka=e.unstable_IdlePriority,Or=e.log,Hh=e.unstable_setDisableYieldValue,ei=null,rn=null;function Fh(i){if(rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(ei,i,void 0,(i.current.flags&128)===128)}catch{}}function yr(i){if(typeof Or=="function"&&Hh(i),rn&&typeof rn.setStrictMode=="function")try{rn.setStrictMode(ei,i)}catch{}}var _n=Math.clz32?Math.clz32:UD,yu=Math.log,zD=Math.LN2;function UD(i){return i>>>=0,i===0?32:31-(yu(i)/zD|0)|0}var vu=128,bu=4194304;function Oa(i){var s=i&42;if(s!==0)return s;switch(i&-i){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:return 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 i&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function _u(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,p=i.suspendedLanes,_=i.pingedLanes,C=i.warmLanes;i=i.finishedLanes!==0;var k=c&134217727;return k!==0?(c=k&~p,c!==0?h=Oa(c):(_&=k,_!==0?h=Oa(_):i||(C=k&~C,C!==0&&(h=Oa(C))))):(k=c&~p,k!==0?h=Oa(k):_!==0?h=Oa(_):i||(C=c&~C,C!==0&&(h=Oa(C)))),h===0?0:s!==0&&s!==h&&(s&p)===0&&(p=h&-h,C=s&-s,p>=C||p===32&&(C&4194176)!==0)?s:h}function tl(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function HD(i,s){switch(i){case 1:case 2:case 4:case 8:return s+250;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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function m_(){var i=vu;return vu<<=1,(vu&4194176)===0&&(vu=128),i}function p_(){var i=bu;return bu<<=1,(bu&62914560)===0&&(bu=4194304),i}function Gh(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function nl(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function FD(i,s,c,h,p,_){var C=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var k=i.entanglements,j=i.expirationTimes,$=i.hiddenUpdates;for(c=C&~c;0<c;){var se=31-_n(c),me=1<<se;k[se]=0,j[se]=-1;var te=$[se];if(te!==null)for($[se]=null,se=0;se<te.length;se++){var ae=te[se];ae!==null&&(ae.lane&=-536870913)}c&=~me}h!==0&&g_(i,h,0),_!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=_&~(C&~s))}function g_(i,s,c){i.pendingLanes|=s,i.suspendedLanes&=~s;var h=31-_n(s);i.entangledLanes|=s,i.entanglements[h]=i.entanglements[h]|1073741824|c&4194218}function y_(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-_n(c),p=1<<h;p&s|i[h]&s&&(i[h]|=s),c&=~p}}function v_(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function b_(){var i=re.p;return i!==0?i:(i=window.event,i===void 0?32:UE(i.type))}function GD(i,s){var c=re.p;try{return re.p=i,s()}finally{re.p=c}}var Li=Math.random().toString(36).slice(2),fn="__reactFiber$"+Li,Nn="__reactProps$"+Li,Ss="__reactContainer$"+Li,$h="__reactEvents$"+Li,$D="__reactListeners$"+Li,qD="__reactHandles$"+Li,__="__reactResources$"+Li,rl="__reactMarker$"+Li;function qh(i){delete i[fn],delete i[Nn],delete i[$h],delete i[$D],delete i[qD]}function Da(i){var s=i[fn];if(s)return s;for(var c=i.parentNode;c;){if(s=c[Ss]||c[fn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=TE(i);i!==null;){if(c=i[fn])return c;i=TE(i)}return s}i=c,c=i.parentNode}return null}function As(i){if(i=i[fn]||i[Ss]){var s=i.tag;if(s===5||s===6||s===13||s===26||s===27||s===3)return i}return null}function il(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function ws(i){var s=i[__];return s||(s=i[__]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Zt(i){i[rl]=!0}var x_=new Set,E_={};function Ia(i,s){Ts(i,s),Ts(i+"Capture",s)}function Ts(i,s){for(E_[i]=s,i=0;i<s.length;i++)x_.add(s[i])}var ti=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),KD=RegExp("^[: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]*$"),S_={},A_={};function WD(i){return gr.call(A_,i)?!0:gr.call(S_,i)?!1:KD.test(i)?A_[i]=!0:(S_[i]=!0,!1)}function xu(i,s,c){if(WD(s))if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+c)}}function Eu(i,s,c){if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+c)}}function ni(i,s,c,h){if(h===null)i.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(s,c,""+h)}}function Kn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function w_(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function YD(i){var s=w_(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,_=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return p.call(this)},set:function(C){h=""+C,_.call(this,C)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(C){h=""+C},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Su(i){i._valueTracker||(i._valueTracker=YD(i))}function T_(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=w_(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function Au(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var ZD=/[\n"\\]/g;function Wn(i){return i.replace(ZD,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Kh(i,s,c,h,p,_,C,k){i.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?i.type=C:i.removeAttribute("type"),s!=null?C==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+Kn(s)):i.value!==""+Kn(s)&&(i.value=""+Kn(s)):C!=="submit"&&C!=="reset"||i.removeAttribute("value"),s!=null?Wh(i,C,Kn(s)):c!=null?Wh(i,C,Kn(c)):h!=null&&i.removeAttribute("value"),p==null&&_!=null&&(i.defaultChecked=!!_),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+Kn(k):i.removeAttribute("name")}function C_(i,s,c,h,p,_,C,k){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.type=_),s!=null||c!=null){if(!(_!=="submit"&&_!=="reset"||s!=null))return;c=c!=null?""+Kn(c):"",s=s!=null?""+Kn(s):c,k||s===i.value||(i.value=s),i.defaultValue=s}h=h??p,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=k?i.checked:!!h,i.defaultChecked=!!h,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(i.name=C)}function Wh(i,s,c){s==="number"&&Au(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function Cs(i,s,c,h){if(i=i.options,s){s={};for(var p=0;p<c.length;p++)s["$"+c[p]]=!0;for(c=0;c<i.length;c++)p=s.hasOwnProperty("$"+i[c].value),i[c].selected!==p&&(i[c].selected=p),p&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Kn(c),s=null,p=0;p<i.length;p++){if(i[p].value===c){i[p].selected=!0,h&&(i[p].defaultSelected=!0);return}s!==null||i[p].disabled||(s=i[p])}s!==null&&(s.selected=!0)}}function R_(i,s,c){if(s!=null&&(s=""+Kn(s),s!==i.value&&(i.value=s),c==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=c!=null?""+Kn(c):""}function N_(i,s,c,h){if(s==null){if(h!=null){if(c!=null)throw Error(r(92));if(Q(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),s=c}c=Kn(s),i.defaultValue=c,h=i.textContent,h===c&&h!==""&&h!==null&&(i.value=h)}function Rs(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var XD=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function k_(i,s,c){var h=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":h?i.setProperty(s,c):typeof c!="number"||c===0||XD.has(s)?s==="float"?i.cssFloat=c:i[s]=(""+c).trim():i[s]=c+"px"}function O_(i,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,c!=null){for(var h in c)!c.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var p in s)h=s[p],s.hasOwnProperty(p)&&c[p]!==h&&k_(i,p,h)}else for(var _ in s)s.hasOwnProperty(_)&&k_(i,_,s[_])}function Yh(i){if(i.indexOf("-")===-1)return!1;switch(i){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 QD=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),JD=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wu(i){return JD.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var Zh=null;function Xh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ns=null,ks=null;function D_(i){var s=As(i);if(s&&(i=s.stateNode)){var c=i[Nn]||null;e:switch(i=s.stateNode,s.type){case"input":if(Kh(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Wn(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var p=h[Nn]||null;if(!p)throw Error(r(90));Kh(h,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(s=0;s<c.length;s++)h=c[s],h.form===i.form&&T_(h)}break e;case"textarea":R_(i,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Cs(i,!!c.multiple,s,!1)}}}var Qh=!1;function I_(i,s,c){if(Qh)return i(s,c);Qh=!0;try{var h=i(s);return h}finally{if(Qh=!1,(Ns!==null||ks!==null)&&(ld(),Ns&&(s=Ns,i=ks,ks=Ns=null,D_(s),i)))for(s=0;s<i.length;s++)D_(i[s])}}function al(i,s){var c=i.stateNode;if(c===null)return null;var h=c[Nn]||null;if(h===null)return null;c=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var Jh=!1;if(ti)try{var sl={};Object.defineProperty(sl,"passive",{get:function(){Jh=!0}}),window.addEventListener("test",sl,sl),window.removeEventListener("test",sl,sl)}catch{Jh=!1}var Mi=null,em=null,Tu=null;function L_(){if(Tu)return Tu;var i,s=em,c=s.length,h,p="value"in Mi?Mi.value:Mi.textContent,_=p.length;for(i=0;i<c&&s[i]===p[i];i++);var C=c-i;for(h=1;h<=C&&s[c-h]===p[_-h];h++);return Tu=p.slice(i,1<h?1-h:void 0)}function Cu(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Ru(){return!0}function M_(){return!1}function kn(i){function s(c,h,p,_,C){this._reactName=c,this._targetInst=p,this.type=h,this.nativeEvent=_,this.target=C,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(c=i[k],this[k]=c?c(_):_[k]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Ru:M_,this.isPropagationStopped=M_,this}return U(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Ru)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Ru)},persist:function(){},isPersistent:Ru}),s}var La={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nu=kn(La),ol=U({},La,{view:0,detail:0}),eI=kn(ol),tm,nm,ll,ku=U({},ol,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:im,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==ll&&(ll&&i.type==="mousemove"?(tm=i.screenX-ll.screenX,nm=i.screenY-ll.screenY):nm=tm=0,ll=i),tm)},movementY:function(i){return"movementY"in i?i.movementY:nm}}),j_=kn(ku),tI=U({},ku,{dataTransfer:0}),nI=kn(tI),rI=U({},ol,{relatedTarget:0}),rm=kn(rI),iI=U({},La,{animationName:0,elapsedTime:0,pseudoElement:0}),aI=kn(iI),sI=U({},La,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),oI=kn(sI),lI=U({},La,{data:0}),P_=kn(lI),cI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uI={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"},dI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fI(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=dI[i])?!!s[i]:!1}function im(){return fI}var hI=U({},ol,{key:function(i){if(i.key){var s=cI[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Cu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?uI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:im,charCode:function(i){return i.type==="keypress"?Cu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Cu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),mI=kn(hI),pI=U({},ku,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),V_=kn(pI),gI=U({},ol,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:im}),yI=kn(gI),vI=U({},La,{propertyName:0,elapsedTime:0,pseudoElement:0}),bI=kn(vI),_I=U({},ku,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),xI=kn(_I),EI=U({},La,{newState:0,oldState:0}),SI=kn(EI),AI=[9,13,27,32],am=ti&&"CompositionEvent"in window,cl=null;ti&&"documentMode"in document&&(cl=document.documentMode);var wI=ti&&"TextEvent"in window&&!cl,B_=ti&&(!am||cl&&8<cl&&11>=cl),z_=" ",U_=!1;function H_(i,s){switch(i){case"keyup":return AI.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Os=!1;function TI(i,s){switch(i){case"compositionend":return F_(s);case"keypress":return s.which!==32?null:(U_=!0,z_);case"textInput":return i=s.data,i===z_&&U_?null:i;default:return null}}function CI(i,s){if(Os)return i==="compositionend"||!am&&H_(i,s)?(i=L_(),Tu=em=Mi=null,Os=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return B_&&s.locale!=="ko"?null:s.data;default:return null}}var RI={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 G_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!RI[i.type]:s==="textarea"}function $_(i,s,c,h){Ns?ks?ks.push(h):ks=[h]:Ns=h,s=hd(s,"onChange"),0<s.length&&(c=new Nu("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var ul=null,dl=null;function NI(i){yE(i,0)}function Ou(i){var s=il(i);if(T_(s))return i}function q_(i,s){if(i==="change")return s}var K_=!1;if(ti){var sm;if(ti){var om="oninput"in document;if(!om){var W_=document.createElement("div");W_.setAttribute("oninput","return;"),om=typeof W_.oninput=="function"}sm=om}else sm=!1;K_=sm&&(!document.documentMode||9<document.documentMode)}function Y_(){ul&&(ul.detachEvent("onpropertychange",Z_),dl=ul=null)}function Z_(i){if(i.propertyName==="value"&&Ou(dl)){var s=[];$_(s,dl,i,Xh(i)),I_(NI,s)}}function kI(i,s,c){i==="focusin"?(Y_(),ul=s,dl=c,ul.attachEvent("onpropertychange",Z_)):i==="focusout"&&Y_()}function OI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ou(dl)}function DI(i,s){if(i==="click")return Ou(s)}function II(i,s){if(i==="input"||i==="change")return Ou(s)}function LI(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Mn=typeof Object.is=="function"?Object.is:LI;function fl(i,s){if(Mn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var p=c[h];if(!gr.call(s,p)||!Mn(i[p],s[p]))return!1}return!0}function X_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Q_(i,s){var c=X_(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=s&&h>=s)return{node:c,offset:s-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=X_(c)}}function J_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?J_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function e0(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Au(i.document);s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=Au(i.document)}return s}function lm(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function MI(i,s){var c=e0(s);s=i.focusedElem;var h=i.selectionRange;if(c!==s&&s&&s.ownerDocument&&J_(s.ownerDocument.documentElement,s)){if(h!==null&&lm(s)){if(i=h.start,c=h.end,c===void 0&&(c=i),"selectionStart"in s)s.selectionStart=i,s.selectionEnd=Math.min(c,s.value.length);else if(c=(i=s.ownerDocument||document)&&i.defaultView||window,c.getSelection){c=c.getSelection();var p=s.textContent.length,_=Math.min(h.start,p);h=h.end===void 0?_:Math.min(h.end,p),!c.extend&&_>h&&(p=h,h=_,_=p),p=Q_(s,_);var C=Q_(s,h);p&&C&&(c.rangeCount!==1||c.anchorNode!==p.node||c.anchorOffset!==p.offset||c.focusNode!==C.node||c.focusOffset!==C.offset)&&(i=i.createRange(),i.setStart(p.node,p.offset),c.removeAllRanges(),_>h?(c.addRange(i),c.extend(C.node,C.offset)):(i.setEnd(C.node,C.offset),c.addRange(i)))}}for(i=[],c=s;c=c.parentNode;)c.nodeType===1&&i.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<i.length;s++)c=i[s],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var jI=ti&&"documentMode"in document&&11>=document.documentMode,Ds=null,cm=null,hl=null,um=!1;function t0(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;um||Ds==null||Ds!==Au(h)||(h=Ds,"selectionStart"in h&&lm(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),hl&&fl(hl,h)||(hl=h,h=hd(cm,"onSelect"),0<h.length&&(s=new Nu("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Ds)))}function Ma(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Is={animationend:Ma("Animation","AnimationEnd"),animationiteration:Ma("Animation","AnimationIteration"),animationstart:Ma("Animation","AnimationStart"),transitionrun:Ma("Transition","TransitionRun"),transitionstart:Ma("Transition","TransitionStart"),transitioncancel:Ma("Transition","TransitionCancel"),transitionend:Ma("Transition","TransitionEnd")},dm={},n0={};ti&&(n0=document.createElement("div").style,"AnimationEvent"in window||(delete Is.animationend.animation,delete Is.animationiteration.animation,delete Is.animationstart.animation),"TransitionEvent"in window||delete Is.transitionend.transition);function ja(i){if(dm[i])return dm[i];if(!Is[i])return i;var s=Is[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in n0)return dm[i]=s[c];return i}var r0=ja("animationend"),i0=ja("animationiteration"),a0=ja("animationstart"),PI=ja("transitionrun"),VI=ja("transitionstart"),BI=ja("transitioncancel"),s0=ja("transitionend"),o0=new Map,l0="abort auxClick beforeToggle 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 scrollEnd toggle touchMove waiting wheel".split(" ");function vr(i,s){o0.set(i,s),Ia(s,[i])}var Yn=[],Ls=0,fm=0;function Du(){for(var i=Ls,s=fm=Ls=0;s<i;){var c=Yn[s];Yn[s++]=null;var h=Yn[s];Yn[s++]=null;var p=Yn[s];Yn[s++]=null;var _=Yn[s];if(Yn[s++]=null,h!==null&&p!==null){var C=h.pending;C===null?p.next=p:(p.next=C.next,C.next=p),h.pending=p}_!==0&&c0(c,p,_)}}function Iu(i,s,c,h){Yn[Ls++]=i,Yn[Ls++]=s,Yn[Ls++]=c,Yn[Ls++]=h,fm|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function hm(i,s,c,h){return Iu(i,s,c,h),Lu(i)}function ji(i,s){return Iu(i,null,null,s),Lu(i)}function c0(i,s,c){i.lanes|=c;var h=i.alternate;h!==null&&(h.lanes|=c);for(var p=!1,_=i.return;_!==null;)_.childLanes|=c,h=_.alternate,h!==null&&(h.childLanes|=c),_.tag===22&&(i=_.stateNode,i===null||i._visibility&1||(p=!0)),i=_,_=_.return;p&&s!==null&&i.tag===3&&(_=i.stateNode,p=31-_n(c),_=_.hiddenUpdates,i=_[p],i===null?_[p]=[s]:i.push(s),s.lane=c|536870912)}function Lu(i){if(50<Vl)throw Vl=0,bp=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var Ms={},u0=new WeakMap;function Zn(i,s){if(typeof i=="object"&&i!==null){var c=u0.get(i);return c!==void 0?c:(s={value:i,source:s,stack:ne(s)},u0.set(i,s),s)}return{value:i,source:s,stack:ne(s)}}var js=[],Ps=0,Mu=null,ju=0,Xn=[],Qn=0,Pa=null,ri=1,ii="";function Va(i,s){js[Ps++]=ju,js[Ps++]=Mu,Mu=i,ju=s}function d0(i,s,c){Xn[Qn++]=ri,Xn[Qn++]=ii,Xn[Qn++]=Pa,Pa=i;var h=ri;i=ii;var p=32-_n(h)-1;h&=~(1<<p),c+=1;var _=32-_n(s)+p;if(30<_){var C=p-p%5;_=(h&(1<<C)-1).toString(32),h>>=C,p-=C,ri=1<<32-_n(s)+p|c<<p|h,ii=_+i}else ri=1<<_|c<<p|h,ii=i}function mm(i){i.return!==null&&(Va(i,1),d0(i,1,0))}function pm(i){for(;i===Mu;)Mu=js[--Ps],js[Ps]=null,ju=js[--Ps],js[Ps]=null;for(;i===Pa;)Pa=Xn[--Qn],Xn[Qn]=null,ii=Xn[--Qn],Xn[Qn]=null,ri=Xn[--Qn],Xn[Qn]=null}var xn=null,an=null,ut=!1,br=null,Dr=!1,gm=Error(r(519));function Ba(i){var s=Error(r(418,""));throw gl(Zn(s,i)),gm}function f0(i){var s=i.stateNode,c=i.type,h=i.memoizedProps;switch(s[fn]=i,s[Nn]=h,c){case"dialog":at("cancel",s),at("close",s);break;case"iframe":case"object":case"embed":at("load",s);break;case"video":case"audio":for(c=0;c<zl.length;c++)at(zl[c],s);break;case"source":at("error",s);break;case"img":case"image":case"link":at("error",s),at("load",s);break;case"details":at("toggle",s);break;case"input":at("invalid",s),C_(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0),Su(s);break;case"select":at("invalid",s);break;case"textarea":at("invalid",s),N_(s,h.value,h.defaultValue,h.children),Su(s)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||h.suppressHydrationWarning===!0||xE(s.textContent,c)?(h.popover!=null&&(at("beforetoggle",s),at("toggle",s)),h.onScroll!=null&&at("scroll",s),h.onScrollEnd!=null&&at("scrollend",s),h.onClick!=null&&(s.onclick=md),s=!0):s=!1,s||Ba(i)}function h0(i){for(xn=i.return;xn;)switch(xn.tag){case 3:case 27:Dr=!0;return;case 5:case 13:Dr=!1;return;default:xn=xn.return}}function ml(i){if(i!==xn)return!1;if(!ut)return h0(i),ut=!0,!1;var s=!1,c;if((c=i.tag!==3&&i.tag!==27)&&((c=i.tag===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||jp(i.type,i.memoizedProps)),c=!c),c&&(s=!0),s&&an&&Ba(i),h0(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8)if(c=i.data,c==="/$"){if(s===0){an=xr(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++;i=i.nextSibling}an=null}}else an=xn?xr(i.stateNode.nextSibling):null;return!0}function pl(){an=xn=null,ut=!1}function gl(i){br===null?br=[i]:br.push(i)}var yl=Error(r(460)),m0=Error(r(474)),ym={then:function(){}};function p0(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Pu(){}function g0(i,s,c){switch(c=i[c],c===void 0?i.push(s):c!==s&&(s.then(Pu,Pu),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,i===yl?Error(r(483)):i;default:if(typeof s.status=="string")s.then(Pu,Pu);else{if(i=bt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(h){if(s.status==="pending"){var p=s;p.status="fulfilled",p.value=h}},function(h){if(s.status==="pending"){var p=s;p.status="rejected",p.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,i===yl?Error(r(483)):i}throw vl=s,yl}}var vl=null;function y0(){if(vl===null)throw Error(r(459));var i=vl;return vl=null,i}var Vs=null,bl=0;function Vu(i){var s=bl;return bl+=1,Vs===null&&(Vs=[]),g0(Vs,i,s)}function _l(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function Bu(i,s){throw s.$$typeof===o?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function v0(i){var s=i._init;return s(i._payload)}function b0(i){function s(W,G){if(i){var Y=W.deletions;Y===null?(W.deletions=[G],W.flags|=16):Y.push(G)}}function c(W,G){if(!i)return null;for(;G!==null;)s(W,G),G=G.sibling;return null}function h(W){for(var G=new Map;W!==null;)W.key!==null?G.set(W.key,W):G.set(W.index,W),W=W.sibling;return G}function p(W,G){return W=Wi(W,G),W.index=0,W.sibling=null,W}function _(W,G,Y){return W.index=Y,i?(Y=W.alternate,Y!==null?(Y=Y.index,Y<G?(W.flags|=33554434,G):Y):(W.flags|=33554434,G)):(W.flags|=1048576,G)}function C(W){return i&&W.alternate===null&&(W.flags|=33554434),W}function k(W,G,Y,de){return G===null||G.tag!==6?(G=dp(Y,W.mode,de),G.return=W,G):(G=p(G,Y),G.return=W,G)}function j(W,G,Y,de){var Re=Y.type;return Re===d?se(W,G,Y.props.children,de,Y.key):G!==null&&(G.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===T&&v0(Re)===G.type)?(G=p(G,Y.props),_l(G,Y),G.return=W,G):(G=rd(Y.type,Y.key,Y.props,null,W.mode,de),_l(G,Y),G.return=W,G)}function $(W,G,Y,de){return G===null||G.tag!==4||G.stateNode.containerInfo!==Y.containerInfo||G.stateNode.implementation!==Y.implementation?(G=fp(Y,W.mode,de),G.return=W,G):(G=p(G,Y.children||[]),G.return=W,G)}function se(W,G,Y,de,Re){return G===null||G.tag!==7?(G=Ya(Y,W.mode,de,Re),G.return=W,G):(G=p(G,Y),G.return=W,G)}function me(W,G,Y){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=dp(""+G,W.mode,Y),G.return=W,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case l:return Y=rd(G.type,G.key,G.props,null,W.mode,Y),_l(Y,G),Y.return=W,Y;case u:return G=fp(G,W.mode,Y),G.return=W,G;case T:var de=G._init;return G=de(G._payload),me(W,G,Y)}if(Q(G)||L(G))return G=Ya(G,W.mode,Y,null),G.return=W,G;if(typeof G.then=="function")return me(W,Vu(G),Y);if(G.$$typeof===v)return me(W,ed(W,G),Y);Bu(W,G)}return null}function te(W,G,Y,de){var Re=G!==null?G.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Re!==null?null:k(W,G,""+Y,de);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case l:return Y.key===Re?j(W,G,Y,de):null;case u:return Y.key===Re?$(W,G,Y,de):null;case T:return Re=Y._init,Y=Re(Y._payload),te(W,G,Y,de)}if(Q(Y)||L(Y))return Re!==null?null:se(W,G,Y,de,null);if(typeof Y.then=="function")return te(W,G,Vu(Y),de);if(Y.$$typeof===v)return te(W,G,ed(W,Y),de);Bu(W,Y)}return null}function ae(W,G,Y,de,Re){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return W=W.get(Y)||null,k(G,W,""+de,Re);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case l:return W=W.get(de.key===null?Y:de.key)||null,j(G,W,de,Re);case u:return W=W.get(de.key===null?Y:de.key)||null,$(G,W,de,Re);case T:var nt=de._init;return de=nt(de._payload),ae(W,G,Y,de,Re)}if(Q(de)||L(de))return W=W.get(Y)||null,se(G,W,de,Re,null);if(typeof de.then=="function")return ae(W,G,Y,Vu(de),Re);if(de.$$typeof===v)return ae(W,G,Y,ed(G,de),Re);Bu(G,de)}return null}function Me(W,G,Y,de){for(var Re=null,nt=null,Ve=G,Be=G=0,Jt=null;Ve!==null&&Be<Y.length;Be++){Ve.index>Be?(Jt=Ve,Ve=null):Jt=Ve.sibling;var dt=te(W,Ve,Y[Be],de);if(dt===null){Ve===null&&(Ve=Jt);break}i&&Ve&&dt.alternate===null&&s(W,Ve),G=_(dt,G,Be),nt===null?Re=dt:nt.sibling=dt,nt=dt,Ve=Jt}if(Be===Y.length)return c(W,Ve),ut&&Va(W,Be),Re;if(Ve===null){for(;Be<Y.length;Be++)Ve=me(W,Y[Be],de),Ve!==null&&(G=_(Ve,G,Be),nt===null?Re=Ve:nt.sibling=Ve,nt=Ve);return ut&&Va(W,Be),Re}for(Ve=h(Ve);Be<Y.length;Be++)Jt=ae(Ve,W,Be,Y[Be],de),Jt!==null&&(i&&Jt.alternate!==null&&Ve.delete(Jt.key===null?Be:Jt.key),G=_(Jt,G,Be),nt===null?Re=Jt:nt.sibling=Jt,nt=Jt);return i&&Ve.forEach(function(ta){return s(W,ta)}),ut&&Va(W,Be),Re}function $e(W,G,Y,de){if(Y==null)throw Error(r(151));for(var Re=null,nt=null,Ve=G,Be=G=0,Jt=null,dt=Y.next();Ve!==null&&!dt.done;Be++,dt=Y.next()){Ve.index>Be?(Jt=Ve,Ve=null):Jt=Ve.sibling;var ta=te(W,Ve,dt.value,de);if(ta===null){Ve===null&&(Ve=Jt);break}i&&Ve&&ta.alternate===null&&s(W,Ve),G=_(ta,G,Be),nt===null?Re=ta:nt.sibling=ta,nt=ta,Ve=Jt}if(dt.done)return c(W,Ve),ut&&Va(W,Be),Re;if(Ve===null){for(;!dt.done;Be++,dt=Y.next())dt=me(W,dt.value,de),dt!==null&&(G=_(dt,G,Be),nt===null?Re=dt:nt.sibling=dt,nt=dt);return ut&&Va(W,Be),Re}for(Ve=h(Ve);!dt.done;Be++,dt=Y.next())dt=ae(Ve,W,Be,dt.value,de),dt!==null&&(i&&dt.alternate!==null&&Ve.delete(dt.key===null?Be:dt.key),G=_(dt,G,Be),nt===null?Re=dt:nt.sibling=dt,nt=dt);return i&&Ve.forEach(function(JL){return s(W,JL)}),ut&&Va(W,Be),Re}function Dt(W,G,Y,de){if(typeof Y=="object"&&Y!==null&&Y.type===d&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case l:e:{for(var Re=Y.key;G!==null;){if(G.key===Re){if(Re=Y.type,Re===d){if(G.tag===7){c(W,G.sibling),de=p(G,Y.props.children),de.return=W,W=de;break e}}else if(G.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===T&&v0(Re)===G.type){c(W,G.sibling),de=p(G,Y.props),_l(de,Y),de.return=W,W=de;break e}c(W,G);break}else s(W,G);G=G.sibling}Y.type===d?(de=Ya(Y.props.children,W.mode,de,Y.key),de.return=W,W=de):(de=rd(Y.type,Y.key,Y.props,null,W.mode,de),_l(de,Y),de.return=W,W=de)}return C(W);case u:e:{for(Re=Y.key;G!==null;){if(G.key===Re)if(G.tag===4&&G.stateNode.containerInfo===Y.containerInfo&&G.stateNode.implementation===Y.implementation){c(W,G.sibling),de=p(G,Y.children||[]),de.return=W,W=de;break e}else{c(W,G);break}else s(W,G);G=G.sibling}de=fp(Y,W.mode,de),de.return=W,W=de}return C(W);case T:return Re=Y._init,Y=Re(Y._payload),Dt(W,G,Y,de)}if(Q(Y))return Me(W,G,Y,de);if(L(Y)){if(Re=L(Y),typeof Re!="function")throw Error(r(150));return Y=Re.call(Y),$e(W,G,Y,de)}if(typeof Y.then=="function")return Dt(W,G,Vu(Y),de);if(Y.$$typeof===v)return Dt(W,G,ed(W,Y),de);Bu(W,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,G!==null&&G.tag===6?(c(W,G.sibling),de=p(G,Y),de.return=W,W=de):(c(W,G),de=dp(Y,W.mode,de),de.return=W,W=de),C(W)):c(W,G)}return function(W,G,Y,de){try{bl=0;var Re=Dt(W,G,Y,de);return Vs=null,Re}catch(Ve){if(Ve===yl)throw Ve;var nt=nr(29,Ve,null,W.mode);return nt.lanes=de,nt.return=W,nt}finally{}}}var za=b0(!0),_0=b0(!1),Bs=Ee(null),zu=Ee(0);function x0(i,s){i=pi,Ce(zu,i),Ce(Bs,s),pi=i|s.baseLanes}function vm(){Ce(zu,pi),Ce(Bs,Bs.current)}function bm(){pi=zu.current,De(Bs),De(zu)}var Jn=Ee(null),Ir=null;function Pi(i){var s=i.alternate;Ce(Ft,Ft.current&1),Ce(Jn,i),Ir===null&&(s===null||Bs.current!==null||s.memoizedState!==null)&&(Ir=i)}function E0(i){if(i.tag===22){if(Ce(Ft,Ft.current),Ce(Jn,i),Ir===null){var s=i.alternate;s!==null&&s.memoizedState!==null&&(Ir=i)}}else Vi()}function Vi(){Ce(Ft,Ft.current),Ce(Jn,Jn.current)}function ai(i){De(Jn),Ir===i&&(Ir=null),De(Ft)}var Ft=Ee(0);function Uu(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var zI=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(c,h){i.push(h)}};this.abort=function(){s.aborted=!0,i.forEach(function(c){return c()})}},UI=e.unstable_scheduleCallback,HI=e.unstable_NormalPriority,Gt={$$typeof:v,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _m(){return{controller:new zI,data:new Map,refCount:0}}function xl(i){i.refCount--,i.refCount===0&&UI(HI,function(){i.controller.abort()})}var El=null,xm=0,zs=0,Us=null;function FI(i,s){if(El===null){var c=El=[];xm=0,zs=Cp(),Us={status:"pending",value:void 0,then:function(h){c.push(h)}}}return xm++,s.then(S0,S0),s}function S0(){if(--xm===0&&El!==null){Us!==null&&(Us.status="fulfilled");var i=El;El=null,zs=0,Us=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function GI(i,s){var c=[],h={status:"pending",value:null,reason:null,then:function(p){c.push(p)}};return i.then(function(){h.status="fulfilled",h.value=s;for(var p=0;p<c.length;p++)(0,c[p])(s)},function(p){for(h.status="rejected",h.reason=p,p=0;p<c.length;p++)(0,c[p])(void 0)}),h}var A0=B.S;B.S=function(i,s){typeof s=="object"&&s!==null&&typeof s.then=="function"&&FI(i,s),A0!==null&&A0(i,s)};var Ua=Ee(null);function Em(){var i=Ua.current;return i!==null?i:bt.pooledCache}function Hu(i,s){s===null?Ce(Ua,Ua.current):Ce(Ua,s.pool)}function w0(){var i=Em();return i===null?null:{parent:Gt._currentValue,pool:i}}var Bi=0,Je=null,pt=null,Vt=null,Fu=!1,Hs=!1,Ha=!1,Gu=0,Sl=0,Fs=null,$I=0;function Lt(){throw Error(r(321))}function Sm(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!Mn(i[c],s[c]))return!1;return!0}function Am(i,s,c,h,p,_){return Bi=_,Je=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=i===null||i.memoizedState===null?Fa:zi,Ha=!1,_=c(h,p),Ha=!1,Hs&&(_=C0(s,c,h,p)),T0(i),_}function T0(i){B.H=Lr;var s=pt!==null&&pt.next!==null;if(Bi=0,Vt=pt=Je=null,Fu=!1,Sl=0,Fs=null,s)throw Error(r(300));i===null||Xt||(i=i.dependencies,i!==null&&Ju(i)&&(Xt=!0))}function C0(i,s,c,h){Je=i;var p=0;do{if(Hs&&(Fs=null),Sl=0,Hs=!1,25<=p)throw Error(r(301));if(p+=1,Vt=pt=null,i.updateQueue!=null){var _=i.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}B.H=Ga,_=s(c,h)}while(Hs);return _}function qI(){var i=B.H,s=i.useState()[0];return s=typeof s.then=="function"?Al(s):s,i=i.useState()[0],(pt!==null?pt.memoizedState:null)!==i&&(Je.flags|=1024),s}function wm(){var i=Gu!==0;return Gu=0,i}function Tm(i,s,c){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~c}function Cm(i){if(Fu){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}Fu=!1}Bi=0,Vt=pt=Je=null,Hs=!1,Sl=Gu=0,Fs=null}function On(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Je.memoizedState=Vt=i:Vt=Vt.next=i,Vt}function Bt(){if(pt===null){var i=Je.alternate;i=i!==null?i.memoizedState:null}else i=pt.next;var s=Vt===null?Je.memoizedState:Vt.next;if(s!==null)Vt=s,pt=i;else{if(i===null)throw Je.alternate===null?Error(r(467)):Error(r(310));pt=i,i={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},Vt===null?Je.memoizedState=Vt=i:Vt=Vt.next=i}return Vt}var $u;$u=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Al(i){var s=Sl;return Sl+=1,Fs===null&&(Fs=[]),i=g0(Fs,i,s),s=Je,(Vt===null?s.memoizedState:Vt.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?Fa:zi),i}function qu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Al(i);if(i.$$typeof===v)return hn(i)}throw Error(r(438,String(i)))}function Rm(i){var s=null,c=Je.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var h=Je.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(p){return p.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=$u(),Je.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(i),h=0;h<i;h++)c[h]=D;return s.index++,c}function si(i,s){return typeof s=="function"?s(i):s}function Ku(i){var s=Bt();return Nm(s,pt,i)}function Nm(i,s,c){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;var p=i.baseQueue,_=h.pending;if(_!==null){if(p!==null){var C=p.next;p.next=_.next,_.next=C}s.baseQueue=p=_,h.pending=null}if(_=i.baseState,p===null)i.memoizedState=_;else{s=p.next;var k=C=null,j=null,$=s,se=!1;do{var me=$.lane&-536870913;if(me!==$.lane?(ot&me)===me:(Bi&me)===me){var te=$.revertLane;if(te===0)j!==null&&(j=j.next={lane:0,revertLane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),me===zs&&(se=!0);else if((Bi&te)===te){$=$.next,te===zs&&(se=!0);continue}else me={lane:0,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},j===null?(k=j=me,C=_):j=j.next=me,Je.lanes|=te,Yi|=te;me=$.action,Ha&&c(_,me),_=$.hasEagerState?$.eagerState:c(_,me)}else te={lane:me,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},j===null?(k=j=te,C=_):j=j.next=te,Je.lanes|=me,Yi|=me;$=$.next}while($!==null&&$!==s);if(j===null?C=_:j.next=k,!Mn(_,i.memoizedState)&&(Xt=!0,se&&(c=Us,c!==null)))throw c;i.memoizedState=_,i.baseState=C,i.baseQueue=j,h.lastRenderedState=_}return p===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function km(i){var s=Bt(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var h=c.dispatch,p=c.pending,_=s.memoizedState;if(p!==null){c.pending=null;var C=p=p.next;do _=i(_,C.action),C=C.next;while(C!==p);Mn(_,s.memoizedState)||(Xt=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),c.lastRenderedState=_}return[_,h]}function R0(i,s,c){var h=Je,p=Bt(),_=ut;if(_){if(c===void 0)throw Error(r(407));c=c()}else c=s();var C=!Mn((pt||p).memoizedState,c);if(C&&(p.memoizedState=c,Xt=!0),p=p.queue,Im(O0.bind(null,h,p,i),[i]),p.getSnapshot!==s||C||Vt!==null&&Vt.memoizedState.tag&1){if(h.flags|=2048,Gs(9,k0.bind(null,h,p,c,s),{destroy:void 0},null),bt===null)throw Error(r(349));_||(Bi&60)!==0||N0(h,s,c)}return c}function N0(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Je.updateQueue,s===null?(s=$u(),Je.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function k0(i,s,c,h){s.value=c,s.getSnapshot=h,D0(s)&&I0(i)}function O0(i,s,c){return c(function(){D0(s)&&I0(i)})}function D0(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Mn(i,c)}catch{return!0}}function I0(i){var s=ji(i,2);s!==null&&En(s,i,2)}function Om(i){var s=On();if(typeof i=="function"){var c=i;if(i=c(),Ha){yr(!0);try{c()}finally{yr(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:i},s}function L0(i,s,c,h){return i.baseState=c,Nm(i,pt,typeof h=="function"?h:si)}function KI(i,s,c,h,p){if(Zu(i))throw Error(r(485));if(i=s.action,i!==null){var _={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){_.listeners.push(C)}};B.T!==null?c(!0):_.isTransition=!1,h(_),c=s.pending,c===null?(_.next=s.pending=_,M0(s,_)):(_.next=c.next,s.pending=c.next=_)}}function M0(i,s){var c=s.action,h=s.payload,p=i.state;if(s.isTransition){var _=B.T,C={};B.T=C;try{var k=c(p,h),j=B.S;j!==null&&j(C,k),j0(i,s,k)}catch($){Dm(i,s,$)}finally{B.T=_}}else try{_=c(p,h),j0(i,s,_)}catch($){Dm(i,s,$)}}function j0(i,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){P0(i,s,h)},function(h){return Dm(i,s,h)}):P0(i,s,c)}function P0(i,s,c){s.status="fulfilled",s.value=c,V0(s),i.state=c,s=i.pending,s!==null&&(c=s.next,c===s?i.pending=null:(c=c.next,s.next=c,M0(i,c)))}function Dm(i,s,c){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=c,V0(s),s=s.next;while(s!==h)}i.action=null}function V0(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function B0(i,s){return s}function z0(i,s){if(ut){var c=bt.formState;if(c!==null){e:{var h=Je;if(ut){if(an){t:{for(var p=an,_=Dr;p.nodeType!==8;){if(!_){p=null;break t}if(p=xr(p.nextSibling),p===null){p=null;break t}}_=p.data,p=_==="F!"||_==="F"?p:null}if(p){an=xr(p.nextSibling),h=p.data==="F!";break e}}Ba(h)}h=!1}h&&(s=c[0])}}return c=On(),c.memoizedState=c.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:B0,lastRenderedState:s},c.queue=h,c=ix.bind(null,Je,h),h.dispatch=c,h=Om(!1),_=Vm.bind(null,Je,!1,h.queue),h=On(),p={state:s,dispatch:null,action:i,pending:null},h.queue=p,c=KI.bind(null,Je,p,_,c),p.dispatch=c,h.memoizedState=i,[s,c,!1]}function U0(i){var s=Bt();return H0(s,pt,i)}function H0(i,s,c){s=Nm(i,s,B0)[0],i=Ku(si)[0],s=typeof s=="object"&&s!==null&&typeof s.then=="function"?Al(s):s;var h=Bt(),p=h.queue,_=p.dispatch;return c!==h.memoizedState&&(Je.flags|=2048,Gs(9,WI.bind(null,p,c),{destroy:void 0},null)),[s,_,i]}function WI(i,s){i.action=s}function F0(i){var s=Bt(),c=pt;if(c!==null)return H0(s,c,i);Bt(),s=s.memoizedState,c=Bt();var h=c.queue.dispatch;return c.memoizedState=i,[s,h,!1]}function Gs(i,s,c,h){return i={tag:i,create:s,inst:c,deps:h,next:null},s=Je.updateQueue,s===null&&(s=$u(),Je.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,s.lastEffect=i),i}function G0(){return Bt().memoizedState}function Wu(i,s,c,h){var p=On();Je.flags|=i,p.memoizedState=Gs(1|s,c,{destroy:void 0},h===void 0?null:h)}function Yu(i,s,c,h){var p=Bt();h=h===void 0?null:h;var _=p.memoizedState.inst;pt!==null&&h!==null&&Sm(h,pt.memoizedState.deps)?p.memoizedState=Gs(s,c,_,h):(Je.flags|=i,p.memoizedState=Gs(1|s,c,_,h))}function $0(i,s){Wu(8390656,8,i,s)}function Im(i,s){Yu(2048,8,i,s)}function q0(i,s){return Yu(4,2,i,s)}function K0(i,s){return Yu(4,4,i,s)}function W0(i,s){if(typeof s=="function"){i=i();var c=s(i);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Y0(i,s,c){c=c!=null?c.concat([i]):null,Yu(4,4,W0.bind(null,s,i),c)}function Lm(){}function Z0(i,s){var c=Bt();s=s===void 0?null:s;var h=c.memoizedState;return s!==null&&Sm(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function X0(i,s){var c=Bt();s=s===void 0?null:s;var h=c.memoizedState;if(s!==null&&Sm(s,h[1]))return h[0];if(h=i(),Ha){yr(!0);try{i()}finally{yr(!1)}}return c.memoizedState=[h,s],h}function Mm(i,s,c){return c===void 0||(Bi&1073741824)!==0?i.memoizedState=s:(i.memoizedState=c,i=Jx(),Je.lanes|=i,Yi|=i,c)}function Q0(i,s,c,h){return Mn(c,s)?c:Bs.current!==null?(i=Mm(i,c,h),Mn(i,s)||(Xt=!0),i):(Bi&42)===0?(Xt=!0,i.memoizedState=c):(i=Jx(),Je.lanes|=i,Yi|=i,s)}function J0(i,s,c,h,p){var _=re.p;re.p=_!==0&&8>_?_:8;var C=B.T,k={};B.T=k,Vm(i,!1,s,c);try{var j=p(),$=B.S;if($!==null&&$(k,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var se=GI(j,h);wl(i,s,se,Bn(i))}else wl(i,s,h,Bn(i))}catch(me){wl(i,s,{then:function(){},status:"rejected",reason:me},Bn())}finally{re.p=_,B.T=C}}function YI(){}function jm(i,s,c,h){if(i.tag!==5)throw Error(r(476));var p=ex(i).queue;J0(i,p,s,he,c===null?YI:function(){return tx(i),c(h)})}function ex(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:he},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:c},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function tx(i){var s=ex(i).next.queue;wl(i,s,{},Bn())}function Pm(){return hn($l)}function nx(){return Bt().memoizedState}function rx(){return Bt().memoizedState}function ZI(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var c=Bn();i=Fi(c);var h=Gi(s,i,c);h!==null&&(En(h,s,c),Rl(h,s,c)),s={cache:_m()},i.payload=s;return}s=s.return}}function XI(i,s,c){var h=Bn();c={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},Zu(i)?ax(s,c):(c=hm(i,s,c,h),c!==null&&(En(c,i,h),sx(c,s,h)))}function ix(i,s,c){var h=Bn();wl(i,s,c,h)}function wl(i,s,c,h){var p={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(Zu(i))ax(s,p);else{var _=i.alternate;if(i.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var C=s.lastRenderedState,k=_(C,c);if(p.hasEagerState=!0,p.eagerState=k,Mn(k,C))return Iu(i,s,p,0),bt===null&&Du(),!1}catch{}finally{}if(c=hm(i,s,p,h),c!==null)return En(c,i,h),sx(c,s,h),!0}return!1}function Vm(i,s,c,h){if(h={lane:2,revertLane:Cp(),action:h,hasEagerState:!1,eagerState:null,next:null},Zu(i)){if(s)throw Error(r(479))}else s=hm(i,c,h,2),s!==null&&En(s,i,2)}function Zu(i){var s=i.alternate;return i===Je||s!==null&&s===Je}function ax(i,s){Hs=Fu=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function sx(i,s,c){if((c&4194176)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,y_(i,c)}}var Lr={readContext:hn,use:qu,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useLayoutEffect:Lt,useInsertionEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useSyncExternalStore:Lt,useId:Lt};Lr.useCacheRefresh=Lt,Lr.useMemoCache=Lt,Lr.useHostTransitionStatus=Lt,Lr.useFormState=Lt,Lr.useActionState=Lt,Lr.useOptimistic=Lt;var Fa={readContext:hn,use:qu,useCallback:function(i,s){return On().memoizedState=[i,s===void 0?null:s],i},useContext:hn,useEffect:$0,useImperativeHandle:function(i,s,c){c=c!=null?c.concat([i]):null,Wu(4194308,4,W0.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Wu(4194308,4,i,s)},useInsertionEffect:function(i,s){Wu(4,2,i,s)},useMemo:function(i,s){var c=On();s=s===void 0?null:s;var h=i();if(Ha){yr(!0);try{i()}finally{yr(!1)}}return c.memoizedState=[h,s],h},useReducer:function(i,s,c){var h=On();if(c!==void 0){var p=c(s);if(Ha){yr(!0);try{c(s)}finally{yr(!1)}}}else p=s;return h.memoizedState=h.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},h.queue=i,i=i.dispatch=XI.bind(null,Je,i),[h.memoizedState,i]},useRef:function(i){var s=On();return i={current:i},s.memoizedState=i},useState:function(i){i=Om(i);var s=i.queue,c=ix.bind(null,Je,s);return s.dispatch=c,[i.memoizedState,c]},useDebugValue:Lm,useDeferredValue:function(i,s){var c=On();return Mm(c,i,s)},useTransition:function(){var i=Om(!1);return i=J0.bind(null,Je,i.queue,!0,!1),On().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,c){var h=Je,p=On();if(ut){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),bt===null)throw Error(r(349));(ot&60)!==0||N0(h,s,c)}p.memoizedState=c;var _={value:c,getSnapshot:s};return p.queue=_,$0(O0.bind(null,h,_,i),[i]),h.flags|=2048,Gs(9,k0.bind(null,h,_,c,s),{destroy:void 0},null),c},useId:function(){var i=On(),s=bt.identifierPrefix;if(ut){var c=ii,h=ri;c=(h&~(1<<32-_n(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Gu++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=$I++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},useCacheRefresh:function(){return On().memoizedState=ZI.bind(null,Je)}};Fa.useMemoCache=Rm,Fa.useHostTransitionStatus=Pm,Fa.useFormState=z0,Fa.useActionState=z0,Fa.useOptimistic=function(i){var s=On();s.memoizedState=s.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=Vm.bind(null,Je,!0,c),c.dispatch=s,[i,s]};var zi={readContext:hn,use:qu,useCallback:Z0,useContext:hn,useEffect:Im,useImperativeHandle:Y0,useInsertionEffect:q0,useLayoutEffect:K0,useMemo:X0,useReducer:Ku,useRef:G0,useState:function(){return Ku(si)},useDebugValue:Lm,useDeferredValue:function(i,s){var c=Bt();return Q0(c,pt.memoizedState,i,s)},useTransition:function(){var i=Ku(si)[0],s=Bt().memoizedState;return[typeof i=="boolean"?i:Al(i),s]},useSyncExternalStore:R0,useId:nx};zi.useCacheRefresh=rx,zi.useMemoCache=Rm,zi.useHostTransitionStatus=Pm,zi.useFormState=U0,zi.useActionState=U0,zi.useOptimistic=function(i,s){var c=Bt();return L0(c,pt,i,s)};var Ga={readContext:hn,use:qu,useCallback:Z0,useContext:hn,useEffect:Im,useImperativeHandle:Y0,useInsertionEffect:q0,useLayoutEffect:K0,useMemo:X0,useReducer:km,useRef:G0,useState:function(){return km(si)},useDebugValue:Lm,useDeferredValue:function(i,s){var c=Bt();return pt===null?Mm(c,i,s):Q0(c,pt.memoizedState,i,s)},useTransition:function(){var i=km(si)[0],s=Bt().memoizedState;return[typeof i=="boolean"?i:Al(i),s]},useSyncExternalStore:R0,useId:nx};Ga.useCacheRefresh=rx,Ga.useMemoCache=Rm,Ga.useHostTransitionStatus=Pm,Ga.useFormState=F0,Ga.useActionState=F0,Ga.useOptimistic=function(i,s){var c=Bt();return pt!==null?L0(c,pt,i,s):(c.baseState=i,[i,c.queue.dispatch])};function Bm(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:U({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var zm={isMounted:function(i){return(i=i._reactInternals)?q(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=Bn(),p=Fi(h);p.payload=s,c!=null&&(p.callback=c),s=Gi(i,p,h),s!==null&&(En(s,i,h),Rl(s,i,h))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=Bn(),p=Fi(h);p.tag=1,p.payload=s,c!=null&&(p.callback=c),s=Gi(i,p,h),s!==null&&(En(s,i,h),Rl(s,i,h))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=Bn(),h=Fi(c);h.tag=2,s!=null&&(h.callback=s),s=Gi(i,h,c),s!==null&&(En(s,i,c),Rl(s,i,c))}};function ox(i,s,c,h,p,_,C){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,_,C):s.prototype&&s.prototype.isPureReactComponent?!fl(c,h)||!fl(p,_):!0}function lx(i,s,c,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==i&&zm.enqueueReplaceState(s,s.state,null)}function $a(i,s){var c=s;if("ref"in s){c={};for(var h in s)h!=="ref"&&(c[h]=s[h])}if(i=i.defaultProps){c===s&&(c=U({},c));for(var p in i)c[p]===void 0&&(c[p]=i[p])}return c}var Xu=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function cx(i){Xu(i)}function ux(i){console.error(i)}function dx(i){Xu(i)}function Qu(i,s){try{var c=i.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function fx(i,s,c){try{var h=i.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Um(i,s,c){return c=Fi(c),c.tag=3,c.payload={element:null},c.callback=function(){Qu(i,s)},c}function hx(i){return i=Fi(i),i.tag=3,i}function mx(i,s,c,h){var p=c.type.getDerivedStateFromError;if(typeof p=="function"){var _=h.value;i.payload=function(){return p(_)},i.callback=function(){fx(s,c,h)}}var C=c.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(i.callback=function(){fx(s,c,h),typeof p!="function"&&(Zi===null?Zi=new Set([this]):Zi.add(this));var k=h.stack;this.componentDidCatch(h.value,{componentStack:k!==null?k:""})})}function QI(i,s,c,h,p){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=c.alternate,s!==null&&Cl(s,c,p,!0),c=Jn.current,c!==null){switch(c.tag){case 13:return Ir===null?Ep():c.alternate===null&&Ot===0&&(Ot=3),c.flags&=-257,c.flags|=65536,c.lanes=p,h===ym?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([h]):s.add(h),Ap(i,h,p)),!1;case 22:return c.flags|=65536,h===ym?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([h]):c.add(h)),Ap(i,h,p)),!1}throw Error(r(435,c.tag))}return Ap(i,h,p),Ep(),!1}if(ut)return s=Jn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=p,h!==gm&&(i=Error(r(422),{cause:h}),gl(Zn(i,c)))):(h!==gm&&(s=Error(r(423),{cause:h}),gl(Zn(s,c))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,h=Zn(h,c),p=Um(i.stateNode,h,p),np(i,p),Ot!==4&&(Ot=2)),!1;var _=Error(r(520),{cause:h});if(_=Zn(_,c),jl===null?jl=[_]:jl.push(_),Ot!==4&&(Ot=2),s===null)return!0;h=Zn(h,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,i=p&-p,c.lanes|=i,i=Um(c.stateNode,h,i),np(c,i),!1;case 1:if(s=c.type,_=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Zi===null||!Zi.has(_))))return c.flags|=65536,p&=-p,c.lanes|=p,p=hx(p),mx(p,i,c,h),np(c,p),!1}c=c.return}while(c!==null);return!1}var px=Error(r(461)),Xt=!1;function sn(i,s,c,h){s.child=i===null?_0(s,null,c,h):za(s,i.child,c,h)}function gx(i,s,c,h,p){c=c.render;var _=s.ref;if("ref"in h){var C={};for(var k in h)k!=="ref"&&(C[k]=h[k])}else C=h;return Ka(s),h=Am(i,s,c,C,_,p),k=wm(),i!==null&&!Xt?(Tm(i,s,p),oi(i,s,p)):(ut&&k&&mm(s),s.flags|=1,sn(i,s,h,p),s.child)}function yx(i,s,c,h,p){if(i===null){var _=c.type;return typeof _=="function"&&!up(_)&&_.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=_,vx(i,s,_,h,p)):(i=rd(c.type,null,h,s,s.mode,p),i.ref=s.ref,i.return=s,s.child=i)}if(_=i.child,!Zm(i,p)){var C=_.memoizedProps;if(c=c.compare,c=c!==null?c:fl,c(C,h)&&i.ref===s.ref)return oi(i,s,p)}return s.flags|=1,i=Wi(_,h),i.ref=s.ref,i.return=s,s.child=i}function vx(i,s,c,h,p){if(i!==null){var _=i.memoizedProps;if(fl(_,h)&&i.ref===s.ref)if(Xt=!1,s.pendingProps=h=_,Zm(i,p))(i.flags&131072)!==0&&(Xt=!0);else return s.lanes=i.lanes,oi(i,s,p)}return Hm(i,s,c,h,p)}function bx(i,s,c){var h=s.pendingProps,p=h.children,_=(s.stateNode._pendingVisibility&2)!==0,C=i!==null?i.memoizedState:null;if(Tl(i,s),h.mode==="hidden"||_){if((s.flags&128)!==0){if(h=C!==null?C.baseLanes|c:c,i!==null){for(p=s.child=i.child,_=0;p!==null;)_=_|p.lanes|p.childLanes,p=p.sibling;s.childLanes=_&~h}else s.childLanes=0,s.child=null;return _x(i,s,h,c)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&Hu(s,C!==null?C.cachePool:null),C!==null?x0(s,C):vm(),E0(s);else return s.lanes=s.childLanes=536870912,_x(i,s,C!==null?C.baseLanes|c:c,c)}else C!==null?(Hu(s,C.cachePool),x0(s,C),Vi(),s.memoizedState=null):(i!==null&&Hu(s,null),vm(),Vi());return sn(i,s,p,c),s.child}function _x(i,s,c,h){var p=Em();return p=p===null?null:{parent:Gt._currentValue,pool:p},s.memoizedState={baseLanes:c,cachePool:p},i!==null&&Hu(s,null),vm(),E0(s),i!==null&&Cl(i,s,h,!0),null}function Tl(i,s){var c=s.ref;if(c===null)i!==null&&i.ref!==null&&(s.flags|=2097664);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(s.flags|=2097664)}}function Hm(i,s,c,h,p){return Ka(s),c=Am(i,s,c,h,void 0,p),h=wm(),i!==null&&!Xt?(Tm(i,s,p),oi(i,s,p)):(ut&&h&&mm(s),s.flags|=1,sn(i,s,c,p),s.child)}function xx(i,s,c,h,p,_){return Ka(s),s.updateQueue=null,c=C0(s,h,c,p),T0(i),h=wm(),i!==null&&!Xt?(Tm(i,s,_),oi(i,s,_)):(ut&&h&&mm(s),s.flags|=1,sn(i,s,c,_),s.child)}function Ex(i,s,c,h,p){if(Ka(s),s.stateNode===null){var _=Ms,C=c.contextType;typeof C=="object"&&C!==null&&(_=hn(C)),_=new c(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=zm,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},ep(s),C=c.contextType,_.context=typeof C=="object"&&C!==null?hn(C):Ms,_.state=s.memoizedState,C=c.getDerivedStateFromProps,typeof C=="function"&&(Bm(s,c,C,h),_.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(C=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),C!==_.state&&zm.enqueueReplaceState(_,_.state,null),kl(s,h,_,p),Nl(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(i===null){_=s.stateNode;var k=s.memoizedProps,j=$a(c,k);_.props=j;var $=_.context,se=c.contextType;C=Ms,typeof se=="object"&&se!==null&&(C=hn(se));var me=c.getDerivedStateFromProps;se=typeof me=="function"||typeof _.getSnapshotBeforeUpdate=="function",k=s.pendingProps!==k,se||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k||$!==C)&&lx(s,_,h,C),Hi=!1;var te=s.memoizedState;_.state=te,kl(s,h,_,p),Nl(),$=s.memoizedState,k||te!==$||Hi?(typeof me=="function"&&(Bm(s,c,me,h),$=s.memoizedState),(j=Hi||ox(s,c,j,h,te,$,C))?(se||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=$),_.props=h,_.state=$,_.context=C,h=j):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,tp(i,s),C=s.memoizedProps,se=$a(c,C),_.props=se,me=s.pendingProps,te=_.context,$=c.contextType,j=Ms,typeof $=="object"&&$!==null&&(j=hn($)),k=c.getDerivedStateFromProps,($=typeof k=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(C!==me||te!==j)&&lx(s,_,h,j),Hi=!1,te=s.memoizedState,_.state=te,kl(s,h,_,p),Nl();var ae=s.memoizedState;C!==me||te!==ae||Hi||i!==null&&i.dependencies!==null&&Ju(i.dependencies)?(typeof k=="function"&&(Bm(s,c,k,h),ae=s.memoizedState),(se=Hi||ox(s,c,se,h,te,ae,j)||i!==null&&i.dependencies!==null&&Ju(i.dependencies))?($||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ae,j),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ae,j)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||C===i.memoizedProps&&te===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&te===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ae),_.props=h,_.state=ae,_.context=j,h=se):(typeof _.componentDidUpdate!="function"||C===i.memoizedProps&&te===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&te===i.memoizedState||(s.flags|=1024),h=!1)}return _=h,Tl(i,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,i!==null&&h?(s.child=za(s,i.child,null,p),s.child=za(s,null,c,p)):sn(i,s,c,p),s.memoizedState=_.state,i=s.child):i=oi(i,s,p),i}function Sx(i,s,c,h){return pl(),s.flags|=256,sn(i,s,c,h),s.child}var Fm={dehydrated:null,treeContext:null,retryLane:0};function Gm(i){return{baseLanes:i,cachePool:w0()}}function $m(i,s,c){return i=i!==null?i.childLanes&~c:0,s&&(i|=rr),i}function Ax(i,s,c){var h=s.pendingProps,p=!1,_=(s.flags&128)!==0,C;if((C=_)||(C=i!==null&&i.memoizedState===null?!1:(Ft.current&2)!==0),C&&(p=!0,s.flags&=-129),C=(s.flags&32)!==0,s.flags&=-33,i===null){if(ut){if(p?Pi(s):Vi(),ut){var k=an,j;if(j=k){e:{for(j=k,k=Dr;j.nodeType!==8;){if(!k){k=null;break e}if(j=xr(j.nextSibling),j===null){k=null;break e}}k=j}k!==null?(s.memoizedState={dehydrated:k,treeContext:Pa!==null?{id:ri,overflow:ii}:null,retryLane:536870912},j=nr(18,null,null,0),j.stateNode=k,j.return=s,s.child=j,xn=s,an=null,j=!0):j=!1}j||Ba(s)}if(k=s.memoizedState,k!==null&&(k=k.dehydrated,k!==null))return k.data==="$!"?s.lanes=16:s.lanes=536870912,null;ai(s)}return k=h.children,h=h.fallback,p?(Vi(),p=s.mode,k=Km({mode:"hidden",children:k},p),h=Ya(h,p,c,null),k.return=s,h.return=s,k.sibling=h,s.child=k,p=s.child,p.memoizedState=Gm(c),p.childLanes=$m(i,C,c),s.memoizedState=Fm,h):(Pi(s),qm(s,k))}if(j=i.memoizedState,j!==null&&(k=j.dehydrated,k!==null)){if(_)s.flags&256?(Pi(s),s.flags&=-257,s=Wm(i,s,c)):s.memoizedState!==null?(Vi(),s.child=i.child,s.flags|=128,s=null):(Vi(),p=h.fallback,k=s.mode,h=Km({mode:"visible",children:h.children},k),p=Ya(p,k,c,null),p.flags|=2,h.return=s,p.return=s,h.sibling=p,s.child=h,za(s,i.child,null,c),h=s.child,h.memoizedState=Gm(c),h.childLanes=$m(i,C,c),s.memoizedState=Fm,s=p);else if(Pi(s),k.data==="$!"){if(C=k.nextSibling&&k.nextSibling.dataset,C)var $=C.dgst;C=$,h=Error(r(419)),h.stack="",h.digest=C,gl({value:h,source:null,stack:null}),s=Wm(i,s,c)}else if(Xt||Cl(i,s,c,!1),C=(c&i.childLanes)!==0,Xt||C){if(C=bt,C!==null){if(h=c&-c,(h&42)!==0)h=1;else switch(h){case 2:h=1;break;case 8:h=4;break;case 32:h=16;break;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:h=64;break;case 268435456:h=134217728;break;default:h=0}if(h=(h&(C.suspendedLanes|c))!==0?0:h,h!==0&&h!==j.retryLane)throw j.retryLane=h,ji(i,h),En(C,i,h),px}k.data==="$?"||Ep(),s=Wm(i,s,c)}else k.data==="$?"?(s.flags|=128,s.child=i.child,s=hL.bind(null,i),k._reactRetry=s,s=null):(i=j.treeContext,an=xr(k.nextSibling),xn=s,ut=!0,br=null,Dr=!1,i!==null&&(Xn[Qn++]=ri,Xn[Qn++]=ii,Xn[Qn++]=Pa,ri=i.id,ii=i.overflow,Pa=s),s=qm(s,h.children),s.flags|=4096);return s}return p?(Vi(),p=h.fallback,k=s.mode,j=i.child,$=j.sibling,h=Wi(j,{mode:"hidden",children:h.children}),h.subtreeFlags=j.subtreeFlags&31457280,$!==null?p=Wi($,p):(p=Ya(p,k,c,null),p.flags|=2),p.return=s,h.return=s,h.sibling=p,s.child=h,h=p,p=s.child,k=i.child.memoizedState,k===null?k=Gm(c):(j=k.cachePool,j!==null?($=Gt._currentValue,j=j.parent!==$?{parent:$,pool:$}:j):j=w0(),k={baseLanes:k.baseLanes|c,cachePool:j}),p.memoizedState=k,p.childLanes=$m(i,C,c),s.memoizedState=Fm,h):(Pi(s),c=i.child,i=c.sibling,c=Wi(c,{mode:"visible",children:h.children}),c.return=s,c.sibling=null,i!==null&&(C=s.deletions,C===null?(s.deletions=[i],s.flags|=16):C.push(i)),s.child=c,s.memoizedState=null,c)}function qm(i,s){return s=Km({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function Km(i,s){return Zx(i,s,0,null)}function Wm(i,s,c){return za(s,i.child,null,c),i=qm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function wx(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Qm(i.return,s,c)}function Ym(i,s,c,h,p){var _=i.memoizedState;_===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:p}:(_.isBackwards=s,_.rendering=null,_.renderingStartTime=0,_.last=h,_.tail=c,_.tailMode=p)}function Tx(i,s,c){var h=s.pendingProps,p=h.revealOrder,_=h.tail;if(sn(i,s,h.children,c),h=Ft.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&wx(i,c,s);else if(i.tag===19)wx(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}switch(Ce(Ft,h),p){case"forwards":for(c=s.child,p=null;c!==null;)i=c.alternate,i!==null&&Uu(i)===null&&(p=c),c=c.sibling;c=p,c===null?(p=s.child,s.child=null):(p=c.sibling,c.sibling=null),Ym(s,!1,p,c,_);break;case"backwards":for(c=null,p=s.child,s.child=null;p!==null;){if(i=p.alternate,i!==null&&Uu(i)===null){s.child=p;break}i=p.sibling,p.sibling=c,c=p,p=i}Ym(s,!0,c,null,_);break;case"together":Ym(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function oi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Yi|=s.lanes,(c&s.childLanes)===0)if(i!==null){if(Cl(i,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,c=Wi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Wi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function Zm(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&Ju(i)))}function JI(i,s,c){switch(s.tag){case 3:Ln(s,s.stateNode.containerInfo),Ui(s,Gt,i.memoizedState.cache),pl();break;case 27:case 5:pr(s);break;case 4:Ln(s,s.stateNode.containerInfo);break;case 10:Ui(s,s.type,s.memoizedProps.value);break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(Pi(s),s.flags|=128,null):(c&s.child.childLanes)!==0?Ax(i,s,c):(Pi(s),i=oi(i,s,c),i!==null?i.sibling:null);Pi(s);break;case 19:var p=(i.flags&128)!==0;if(h=(c&s.childLanes)!==0,h||(Cl(i,s,c,!1),h=(c&s.childLanes)!==0),p){if(h)return Tx(i,s,c);s.flags|=128}if(p=s.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Ce(Ft,Ft.current),h)break;return null;case 22:case 23:return s.lanes=0,bx(i,s,c);case 24:Ui(s,Gt,i.memoizedState.cache)}return oi(i,s,c)}function Cx(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps)Xt=!0;else{if(!Zm(i,c)&&(s.flags&128)===0)return Xt=!1,JI(i,s,c);Xt=(i.flags&131072)!==0}else Xt=!1,ut&&(s.flags&1048576)!==0&&d0(s,ju,s.index);switch(s.lanes=0,s.tag){case 16:e:{i=s.pendingProps;var h=s.elementType,p=h._init;if(h=p(h._payload),s.type=h,typeof h=="function")up(h)?(i=$a(h,i),s.tag=1,s=Ex(null,s,h,i,c)):(s.tag=0,s=Hm(null,s,h,i,c));else{if(h!=null){if(p=h.$$typeof,p===x){s.tag=11,s=gx(null,s,h,i,c);break e}else if(p===w){s.tag=14,s=yx(null,s,h,i,c);break e}}throw s=M(h)||h,Error(r(306,s,""))}}return s;case 0:return Hm(i,s,s.type,s.pendingProps,c);case 1:return h=s.type,p=$a(h,s.pendingProps),Ex(i,s,h,p,c);case 3:e:{if(Ln(s,s.stateNode.containerInfo),i===null)throw Error(r(387));var _=s.pendingProps;p=s.memoizedState,h=p.element,tp(i,s),kl(s,_,null,c);var C=s.memoizedState;if(_=C.cache,Ui(s,Gt,_),_!==p.cache&&Jm(s,[Gt],c,!0),Nl(),_=C.element,p.isDehydrated)if(p={element:_,isDehydrated:!1,cache:C.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=Sx(i,s,_,c);break e}else if(_!==h){h=Zn(Error(r(424)),s),gl(h),s=Sx(i,s,_,c);break e}else for(an=xr(s.stateNode.containerInfo.firstChild),xn=s,ut=!0,br=null,Dr=!0,c=_0(s,null,_,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(pl(),_===h){s=oi(i,s,c);break e}sn(i,s,_,c)}s=s.child}return s;case 26:return Tl(i,s),i===null?(c=kE(s.type,null,s.pendingProps,null))?s.memoizedState=c:ut||(c=s.type,i=s.pendingProps,h=pd(Et.current).createElement(c),h[fn]=s,h[Nn]=i,on(h,c,i),Zt(h),s.stateNode=h):s.memoizedState=kE(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return pr(s),i===null&&ut&&(h=s.stateNode=CE(s.type,s.pendingProps,Et.current),xn=s,Dr=!0,an=xr(h.firstChild)),h=s.pendingProps.children,i!==null||ut?sn(i,s,h,c):s.child=za(s,null,h,c),Tl(i,s),s.child;case 5:return i===null&&ut&&((p=h=an)&&(h=NL(h,s.type,s.pendingProps,Dr),h!==null?(s.stateNode=h,xn=s,an=xr(h.firstChild),Dr=!1,p=!0):p=!1),p||Ba(s)),pr(s),p=s.type,_=s.pendingProps,C=i!==null?i.memoizedProps:null,h=_.children,jp(p,_)?h=null:C!==null&&jp(p,C)&&(s.flags|=32),s.memoizedState!==null&&(p=Am(i,s,qI,null,null,c),$l._currentValue=p),Tl(i,s),sn(i,s,h,c),s.child;case 6:return i===null&&ut&&((i=c=an)&&(c=kL(c,s.pendingProps,Dr),c!==null?(s.stateNode=c,xn=s,an=null,i=!0):i=!1),i||Ba(s)),null;case 13:return Ax(i,s,c);case 4:return Ln(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=za(s,null,h,c):sn(i,s,h,c),s.child;case 11:return gx(i,s,s.type,s.pendingProps,c);case 7:return sn(i,s,s.pendingProps,c),s.child;case 8:return sn(i,s,s.pendingProps.children,c),s.child;case 12:return sn(i,s,s.pendingProps.children,c),s.child;case 10:return h=s.pendingProps,Ui(s,s.type,h.value),sn(i,s,h.children,c),s.child;case 9:return p=s.type._context,h=s.pendingProps.children,Ka(s),p=hn(p),h=h(p),s.flags|=1,sn(i,s,h,c),s.child;case 14:return yx(i,s,s.type,s.pendingProps,c);case 15:return vx(i,s,s.type,s.pendingProps,c);case 19:return Tx(i,s,c);case 22:return bx(i,s,c);case 24:return Ka(s),h=hn(Gt),i===null?(p=Em(),p===null&&(p=bt,_=_m(),p.pooledCache=_,_.refCount++,_!==null&&(p.pooledCacheLanes|=c),p=_),s.memoizedState={parent:h,cache:p},ep(s),Ui(s,Gt,p)):((i.lanes&c)!==0&&(tp(i,s),kl(s,null,null,c),Nl()),p=i.memoizedState,_=s.memoizedState,p.parent!==h?(p={parent:h,cache:h},s.memoizedState=p,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=p),Ui(s,Gt,h)):(h=_.cache,Ui(s,Gt,h),h!==p.cache&&Jm(s,[Gt],c,!0))),sn(i,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}var Xm=Ee(null),qa=null,li=null;function Ui(i,s,c){Ce(Xm,s._currentValue),s._currentValue=c}function ci(i){i._currentValue=Xm.current,De(Xm)}function Qm(i,s,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===c)break;i=i.return}}function Jm(i,s,c,h){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var _=p.dependencies;if(_!==null){var C=p.child;_=_.firstContext;e:for(;_!==null;){var k=_;_=p;for(var j=0;j<s.length;j++)if(k.context===s[j]){_.lanes|=c,k=_.alternate,k!==null&&(k.lanes|=c),Qm(_.return,c,i),h||(C=null);break e}_=k.next}}else if(p.tag===18){if(C=p.return,C===null)throw Error(r(341));C.lanes|=c,_=C.alternate,_!==null&&(_.lanes|=c),Qm(C,c,i),C=null}else C=p.child;if(C!==null)C.return=p;else for(C=p;C!==null;){if(C===i){C=null;break}if(p=C.sibling,p!==null){p.return=C.return,C=p;break}C=C.return}p=C}}function Cl(i,s,c,h){i=null;for(var p=s,_=!1;p!==null;){if(!_){if((p.flags&524288)!==0)_=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var C=p.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var k=p.type;Mn(p.pendingProps.value,C.value)||(i!==null?i.push(k):i=[k])}}else if(p===Yt.current){if(C=p.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push($l):i=[$l])}p=p.return}i!==null&&Jm(s,i,c,h),s.flags|=262144}function Ju(i){for(i=i.firstContext;i!==null;){if(!Mn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ka(i){qa=i,li=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function hn(i){return Rx(qa,i)}function ed(i,s){return qa===null&&Ka(i),Rx(i,s)}function Rx(i,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},li===null){if(i===null)throw Error(r(308));li=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else li=li.next=s;return c}var Hi=!1;function ep(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tp(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Fi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Gi(i,s,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(wt&2)!==0){var p=h.pending;return p===null?s.next=s:(s.next=p.next,p.next=s),h.pending=s,s=Lu(i),c0(i,null,c),s}return Iu(i,h,s,c),Lu(i)}function Rl(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194176)!==0)){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,y_(i,c)}}function np(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var p=null,_=null;if(c=c.firstBaseUpdate,c!==null){do{var C={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};_===null?p=_=C:_=_.next=C,c=c.next}while(c!==null);_===null?p=_=s:_=_.next=s}else p=_=s;c={baseState:h.baseState,firstBaseUpdate:p,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}var rp=!1;function Nl(){if(rp){var i=Us;if(i!==null)throw i}}function kl(i,s,c,h){rp=!1;var p=i.updateQueue;Hi=!1;var _=p.firstBaseUpdate,C=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var j=k,$=j.next;j.next=null,C===null?_=$:C.next=$,C=j;var se=i.alternate;se!==null&&(se=se.updateQueue,k=se.lastBaseUpdate,k!==C&&(k===null?se.firstBaseUpdate=$:k.next=$,se.lastBaseUpdate=j))}if(_!==null){var me=p.baseState;C=0,se=$=j=null,k=_;do{var te=k.lane&-536870913,ae=te!==k.lane;if(ae?(ot&te)===te:(h&te)===te){te!==0&&te===zs&&(rp=!0),se!==null&&(se=se.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Me=i,$e=k;te=s;var Dt=c;switch($e.tag){case 1:if(Me=$e.payload,typeof Me=="function"){me=Me.call(Dt,me,te);break e}me=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=$e.payload,te=typeof Me=="function"?Me.call(Dt,me,te):Me,te==null)break e;me=U({},me,te);break e;case 2:Hi=!0}}te=k.callback,te!==null&&(i.flags|=64,ae&&(i.flags|=8192),ae=p.callbacks,ae===null?p.callbacks=[te]:ae.push(te))}else ae={lane:te,tag:k.tag,payload:k.payload,callback:k.callback,next:null},se===null?($=se=ae,j=me):se=se.next=ae,C|=te;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,p.lastBaseUpdate=ae,p.shared.pending=null}}while(!0);se===null&&(j=me),p.baseState=j,p.firstBaseUpdate=$,p.lastBaseUpdate=se,_===null&&(p.shared.lanes=0),Yi|=C,i.lanes=C,i.memoizedState=me}}function Nx(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function kx(i,s){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Nx(c[i],s)}function Ol(i,s){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var p=h.next;c=p;do{if((c.tag&i)===i){h=void 0;var _=c.create,C=c.inst;h=_(),C.destroy=h}c=c.next}while(c!==p)}}catch(k){vt(s,s.return,k)}}function $i(i,s,c){try{var h=s.updateQueue,p=h!==null?h.lastEffect:null;if(p!==null){var _=p.next;h=_;do{if((h.tag&i)===i){var C=h.inst,k=C.destroy;if(k!==void 0){C.destroy=void 0,p=s;var j=c;try{k()}catch($){vt(p,j,$)}}}h=h.next}while(h!==_)}}catch($){vt(s,s.return,$)}}function Ox(i){var s=i.updateQueue;if(s!==null){var c=i.stateNode;try{kx(s,c)}catch(h){vt(i,i.return,h)}}}function Dx(i,s,c){c.props=$a(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(h){vt(i,s,h)}}function Wa(i,s){try{var c=i.ref;if(c!==null){var h=i.stateNode;switch(i.tag){case 26:case 27:case 5:var p=h;break;default:p=h}typeof c=="function"?i.refCleanup=c(p):c.current=p}}catch(_){vt(i,s,_)}}function jn(i,s){var c=i.ref,h=i.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(p){vt(i,s,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(p){vt(i,s,p)}else c.current=null}function Ix(i){var s=i.type,c=i.memoizedProps,h=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(p){vt(i,i.return,p)}}function Lx(i,s,c){try{var h=i.stateNode;AL(h,i.type,c,s),h[Nn]=s}catch(p){vt(i,i.return,p)}}function Mx(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27||i.tag===4}function ip(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Mx(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==27&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ap(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=md));else if(h!==4&&h!==27&&(i=i.child,i!==null))for(ap(i,s,c),i=i.sibling;i!==null;)ap(i,s,c),i=i.sibling}function td(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(h!==4&&h!==27&&(i=i.child,i!==null))for(td(i,s,c),i=i.sibling;i!==null;)td(i,s,c),i=i.sibling}var ui=!1,kt=!1,sp=!1,jx=typeof WeakSet=="function"?WeakSet:Set,Qt=null,Px=!1;function eL(i,s){if(i=i.containerInfo,Lp=xd,i=e0(i),lm(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var p=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var C=0,k=-1,j=-1,$=0,se=0,me=i,te=null;t:for(;;){for(var ae;me!==c||p!==0&&me.nodeType!==3||(k=C+p),me!==_||h!==0&&me.nodeType!==3||(j=C+h),me.nodeType===3&&(C+=me.nodeValue.length),(ae=me.firstChild)!==null;)te=me,me=ae;for(;;){if(me===i)break t;if(te===c&&++$===p&&(k=C),te===_&&++se===h&&(j=C),(ae=me.nextSibling)!==null)break;me=te,te=me.parentNode}me=ae}c=k===-1||j===-1?null:{start:k,end:j}}else c=null}c=c||{start:0,end:0}}else c=null;for(Mp={focusedElem:i,selectionRange:c},xd=!1,Qt=s;Qt!==null;)if(s=Qt,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Qt=i;else for(;Qt!==null;){switch(s=Qt,_=s.alternate,i=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&_!==null){i=void 0,c=s,p=_.memoizedProps,_=_.memoizedState,h=c.stateNode;try{var Me=$a(c.type,p,c.elementType===c.type);i=h.getSnapshotBeforeUpdate(Me,_),h.__reactInternalSnapshotBeforeUpdate=i}catch($e){vt(c,c.return,$e)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,c=i.nodeType,c===9)Bp(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Bp(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=s.sibling,i!==null){i.return=s.return,Qt=i;break}Qt=s.return}return Me=Px,Px=!1,Me}function Vx(i,s,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:fi(i,c),h&4&&Ol(5,c);break;case 1:if(fi(i,c),h&4)if(i=c.stateNode,s===null)try{i.componentDidMount()}catch(k){vt(c,c.return,k)}else{var p=$a(c.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(p,s,i.__reactInternalSnapshotBeforeUpdate)}catch(k){vt(c,c.return,k)}}h&64&&Ox(c),h&512&&Wa(c,c.return);break;case 3:if(fi(i,c),h&64&&(h=c.updateQueue,h!==null)){if(i=null,c.child!==null)switch(c.child.tag){case 27:case 5:i=c.child.stateNode;break;case 1:i=c.child.stateNode}try{kx(h,i)}catch(k){vt(c,c.return,k)}}break;case 26:fi(i,c),h&512&&Wa(c,c.return);break;case 27:case 5:fi(i,c),s===null&&h&4&&Ix(c),h&512&&Wa(c,c.return);break;case 12:fi(i,c);break;case 13:fi(i,c),h&4&&Ux(i,c);break;case 22:if(p=c.memoizedState!==null||ui,!p){s=s!==null&&s.memoizedState!==null||kt;var _=ui,C=kt;ui=p,(kt=s)&&!C?qi(i,c,(c.subtreeFlags&8772)!==0):fi(i,c),ui=_,kt=C}h&512&&(c.memoizedProps.mode==="manual"?Wa(c,c.return):jn(c,c.return));break;default:fi(i,c)}}function Bx(i){var s=i.alternate;s!==null&&(i.alternate=null,Bx(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&qh(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var zt=null,Pn=!1;function di(i,s,c){for(c=c.child;c!==null;)zx(i,s,c),c=c.sibling}function zx(i,s,c){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(ei,c)}catch{}switch(c.tag){case 26:kt||jn(c,s),di(i,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:kt||jn(c,s);var h=zt,p=Pn;for(zt=c.stateNode,di(i,s,c),c=c.stateNode,s=c.attributes;s.length;)c.removeAttributeNode(s[0]);qh(c),zt=h,Pn=p;break;case 5:kt||jn(c,s);case 6:p=zt;var _=Pn;if(zt=null,di(i,s,c),zt=p,Pn=_,zt!==null)if(Pn)try{i=zt,h=c.stateNode,i.nodeType===8?i.parentNode.removeChild(h):i.removeChild(h)}catch(C){vt(c,s,C)}else try{zt.removeChild(c.stateNode)}catch(C){vt(c,s,C)}break;case 18:zt!==null&&(Pn?(s=zt,c=c.stateNode,s.nodeType===8?Vp(s.parentNode,c):s.nodeType===1&&Vp(s,c),Yl(s)):Vp(zt,c.stateNode));break;case 4:h=zt,p=Pn,zt=c.stateNode.containerInfo,Pn=!0,di(i,s,c),zt=h,Pn=p;break;case 0:case 11:case 14:case 15:kt||$i(2,c,s),kt||$i(4,c,s),di(i,s,c);break;case 1:kt||(jn(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"&&Dx(c,s,h)),di(i,s,c);break;case 21:di(i,s,c);break;case 22:kt||jn(c,s),kt=(h=kt)||c.memoizedState!==null,di(i,s,c),kt=h;break;default:di(i,s,c)}}function Ux(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Yl(i)}catch(c){vt(s,s.return,c)}}function tL(i){switch(i.tag){case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new jx),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new jx),s;default:throw Error(r(435,i.tag))}}function op(i,s){var c=tL(i);s.forEach(function(h){var p=mL.bind(null,i,h);c.has(h)||(c.add(h),h.then(p,p))})}function er(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var p=c[h],_=i,C=s,k=C;e:for(;k!==null;){switch(k.tag){case 27:case 5:zt=k.stateNode,Pn=!1;break e;case 3:zt=k.stateNode.containerInfo,Pn=!0;break e;case 4:zt=k.stateNode.containerInfo,Pn=!0;break e}k=k.return}if(zt===null)throw Error(r(160));zx(_,C,p),zt=null,Pn=!1,_=p.alternate,_!==null&&(_.return=null),p.return=null}if(s.subtreeFlags&13878)for(s=s.child;s!==null;)Hx(s,i),s=s.sibling}var _r=null;function Hx(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:er(s,i),tr(i),h&4&&($i(3,i,i.return),Ol(3,i),$i(5,i,i.return));break;case 1:er(s,i),tr(i),h&512&&(kt||c===null||jn(c,c.return)),h&64&&ui&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var p=_r;if(er(s,i),tr(i),h&512&&(kt||c===null||jn(c,c.return)),h&4){var _=c!==null?c.memoizedState:null;if(h=i.memoizedState,c===null)if(h===null)if(i.stateNode===null){e:{h=i.type,c=i.memoizedProps,p=p.ownerDocument||p;t:switch(h){case"title":_=p.getElementsByTagName("title")[0],(!_||_[rl]||_[fn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=p.createElement(h),p.head.insertBefore(_,p.querySelector("head > title"))),on(_,h,c),_[fn]=i,Zt(_),h=_;break e;case"link":var C=IE("link","href",p).get(h+(c.href||""));if(C){for(var k=0;k<C.length;k++)if(_=C[k],_.getAttribute("href")===(c.href==null?null:c.href)&&_.getAttribute("rel")===(c.rel==null?null:c.rel)&&_.getAttribute("title")===(c.title==null?null:c.title)&&_.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){C.splice(k,1);break t}}_=p.createElement(h),on(_,h,c),p.head.appendChild(_);break;case"meta":if(C=IE("meta","content",p).get(h+(c.content||""))){for(k=0;k<C.length;k++)if(_=C[k],_.getAttribute("content")===(c.content==null?null:""+c.content)&&_.getAttribute("name")===(c.name==null?null:c.name)&&_.getAttribute("property")===(c.property==null?null:c.property)&&_.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&_.getAttribute("charset")===(c.charSet==null?null:c.charSet)){C.splice(k,1);break t}}_=p.createElement(h),on(_,h,c),p.head.appendChild(_);break;default:throw Error(r(468,h))}_[fn]=i,Zt(_),h=_}i.stateNode=h}else LE(p,i.type,i.stateNode);else i.stateNode=DE(p,h,i.memoizedProps);else _!==h?(_===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):_.count--,h===null?LE(p,i.type,i.stateNode):DE(p,h,i.memoizedProps)):h===null&&i.stateNode!==null&&Lx(i,i.memoizedProps,c.memoizedProps)}break;case 27:if(h&4&&i.alternate===null){p=i.stateNode,_=i.memoizedProps;try{for(var j=p.firstChild;j;){var $=j.nextSibling,se=j.nodeName;j[rl]||se==="HEAD"||se==="BODY"||se==="SCRIPT"||se==="STYLE"||se==="LINK"&&j.rel.toLowerCase()==="stylesheet"||p.removeChild(j),j=$}for(var me=i.type,te=p.attributes;te.length;)p.removeAttributeNode(te[0]);on(p,me,_),p[fn]=i,p[Nn]=_}catch(Me){vt(i,i.return,Me)}}case 5:if(er(s,i),tr(i),h&512&&(kt||c===null||jn(c,c.return)),i.flags&32){p=i.stateNode;try{Rs(p,"")}catch(Me){vt(i,i.return,Me)}}h&4&&i.stateNode!=null&&(p=i.memoizedProps,Lx(i,p,c!==null?c.memoizedProps:p)),h&1024&&(sp=!0);break;case 6:if(er(s,i),tr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,c=i.stateNode;try{c.nodeValue=h}catch(Me){vt(i,i.return,Me)}}break;case 3:if(vd=null,p=_r,_r=gd(s.containerInfo),er(s,i),_r=p,tr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Yl(s.containerInfo)}catch(Me){vt(i,i.return,Me)}sp&&(sp=!1,Fx(i));break;case 4:h=_r,_r=gd(i.stateNode.containerInfo),er(s,i),tr(i),_r=h;break;case 12:er(s,i),tr(i);break;case 13:er(s,i),tr(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(gp=be()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,op(i,h)));break;case 22:if(h&512&&(kt||c===null||jn(c,c.return)),j=i.memoizedState!==null,$=c!==null&&c.memoizedState!==null,se=ui,me=kt,ui=se||j,kt=me||$,er(s,i),kt=me,ui=se,tr(i),s=i.stateNode,s._current=i,s._visibility&=-3,s._visibility|=s._pendingVisibility&2,h&8192&&(s._visibility=j?s._visibility&-2:s._visibility|1,j&&(s=ui||kt,c===null||$||s||$s(i)),i.memoizedProps===null||i.memoizedProps.mode!=="manual"))e:for(c=null,s=i;;){if(s.tag===5||s.tag===26||s.tag===27){if(c===null){$=c=s;try{if(p=$.stateNode,j)_=p.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{C=$.stateNode,k=$.memoizedProps.style;var ae=k!=null&&k.hasOwnProperty("display")?k.display:null;C.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(Me){vt($,$.return,Me)}}}else if(s.tag===6){if(c===null){$=s;try{$.stateNode.nodeValue=j?"":$.memoizedProps}catch(Me){vt($,$.return,Me)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=i.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,op(i,c))));break;case 19:er(s,i),tr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,op(i,h)));break;case 21:break;default:er(s,i),tr(i)}}function tr(i){var s=i.flags;if(s&2){try{if(i.tag!==27){e:{for(var c=i.return;c!==null;){if(Mx(c)){var h=c;break e}c=c.return}throw Error(r(160))}switch(h.tag){case 27:var p=h.stateNode,_=ip(i);td(i,_,p);break;case 5:var C=h.stateNode;h.flags&32&&(Rs(C,""),h.flags&=-33);var k=ip(i);td(i,k,C);break;case 3:case 4:var j=h.stateNode.containerInfo,$=ip(i);ap(i,$,j);break;default:throw Error(r(161))}}}catch(se){vt(i,i.return,se)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function Fx(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;Fx(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function fi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Vx(i,s.alternate,s),s=s.sibling}function $s(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:$i(4,s,s.return),$s(s);break;case 1:jn(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&Dx(s,s.return,c),$s(s);break;case 26:case 27:case 5:jn(s,s.return),$s(s);break;case 22:jn(s,s.return),s.memoizedState===null&&$s(s);break;default:$s(s)}i=i.sibling}}function qi(i,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,p=i,_=s,C=_.flags;switch(_.tag){case 0:case 11:case 15:qi(p,_,c),Ol(4,_);break;case 1:if(qi(p,_,c),h=_,p=h.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch($){vt(h,h.return,$)}if(h=_,p=h.updateQueue,p!==null){var k=h.stateNode;try{var j=p.shared.hiddenCallbacks;if(j!==null)for(p.shared.hiddenCallbacks=null,p=0;p<j.length;p++)Nx(j[p],k)}catch($){vt(h,h.return,$)}}c&&C&64&&Ox(_),Wa(_,_.return);break;case 26:case 27:case 5:qi(p,_,c),c&&h===null&&C&4&&Ix(_),Wa(_,_.return);break;case 12:qi(p,_,c);break;case 13:qi(p,_,c),c&&C&4&&Ux(p,_);break;case 22:_.memoizedState===null&&qi(p,_,c),Wa(_,_.return);break;default:qi(p,_,c)}s=s.sibling}}function lp(i,s){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&xl(c))}function cp(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&xl(i))}function Ki(i,s,c,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Gx(i,s,c,h),s=s.sibling}function Gx(i,s,c,h){var p=s.flags;switch(s.tag){case 0:case 11:case 15:Ki(i,s,c,h),p&2048&&Ol(9,s);break;case 3:Ki(i,s,c,h),p&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&xl(i)));break;case 12:if(p&2048){Ki(i,s,c,h),i=s.stateNode;try{var _=s.memoizedProps,C=_.id,k=_.onPostCommit;typeof k=="function"&&k(C,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(j){vt(s,s.return,j)}}else Ki(i,s,c,h);break;case 23:break;case 22:_=s.stateNode,s.memoizedState!==null?_._visibility&4?Ki(i,s,c,h):Dl(i,s):_._visibility&4?Ki(i,s,c,h):(_._visibility|=4,qs(i,s,c,h,(s.subtreeFlags&10256)!==0)),p&2048&&lp(s.alternate,s);break;case 24:Ki(i,s,c,h),p&2048&&cp(s.alternate,s);break;default:Ki(i,s,c,h)}}function qs(i,s,c,h,p){for(p=p&&(s.subtreeFlags&10256)!==0,s=s.child;s!==null;){var _=i,C=s,k=c,j=h,$=C.flags;switch(C.tag){case 0:case 11:case 15:qs(_,C,k,j,p),Ol(8,C);break;case 23:break;case 22:var se=C.stateNode;C.memoizedState!==null?se._visibility&4?qs(_,C,k,j,p):Dl(_,C):(se._visibility|=4,qs(_,C,k,j,p)),p&&$&2048&&lp(C.alternate,C);break;case 24:qs(_,C,k,j,p),p&&$&2048&&cp(C.alternate,C);break;default:qs(_,C,k,j,p)}s=s.sibling}}function Dl(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=i,h=s,p=h.flags;switch(h.tag){case 22:Dl(c,h),p&2048&&lp(h.alternate,h);break;case 24:Dl(c,h),p&2048&&cp(h.alternate,h);break;default:Dl(c,h)}s=s.sibling}}var Il=8192;function Ks(i){if(i.subtreeFlags&Il)for(i=i.child;i!==null;)$x(i),i=i.sibling}function $x(i){switch(i.tag){case 26:Ks(i),i.flags&Il&&i.memoizedState!==null&&FL(_r,i.memoizedState,i.memoizedProps);break;case 5:Ks(i);break;case 3:case 4:var s=_r;_r=gd(i.stateNode.containerInfo),Ks(i),_r=s;break;case 22:i.memoizedState===null&&(s=i.alternate,s!==null&&s.memoizedState!==null?(s=Il,Il=16777216,Ks(i),Il=s):Ks(i));break;default:Ks(i)}}function qx(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function Ll(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Qt=h,Wx(h,i)}qx(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Kx(i),i=i.sibling}function Kx(i){switch(i.tag){case 0:case 11:case 15:Ll(i),i.flags&2048&&$i(9,i,i.return);break;case 3:Ll(i);break;case 12:Ll(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&4&&(i.return===null||i.return.tag!==13)?(s._visibility&=-5,nd(i)):Ll(i);break;default:Ll(i)}}function nd(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Qt=h,Wx(h,i)}qx(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:$i(8,s,s.return),nd(s);break;case 22:c=s.stateNode,c._visibility&4&&(c._visibility&=-5,nd(s));break;default:nd(s)}i=i.sibling}}function Wx(i,s){for(;Qt!==null;){var c=Qt;switch(c.tag){case 0:case 11:case 15:$i(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:xl(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,Qt=h;else e:for(c=i;Qt!==null;){h=Qt;var p=h.sibling,_=h.return;if(Bx(h),h===c){Qt=null;break e}if(p!==null){p.return=_,Qt=p;break e}Qt=_}}}function nL(i,s,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(i,s,c,h){return new nL(i,s,c,h)}function up(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Wi(i,s){var c=i.alternate;return c===null?(c=nr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&31457280,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function Yx(i,s){i.flags&=31457282;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,s=c.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function rd(i,s,c,h,p,_){var C=0;if(h=i,typeof i=="function")up(i)&&(C=1);else if(typeof i=="string")C=UL(i,c,Fe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case d:return Ya(c.children,p,_,s);case f:C=8,p|=24;break;case m:return i=nr(12,c,s,p|2),i.elementType=m,i.lanes=_,i;case S:return i=nr(13,c,s,p),i.elementType=S,i.lanes=_,i;case A:return i=nr(19,c,s,p),i.elementType=A,i.lanes=_,i;case R:return Zx(c,p,_,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case y:case v:C=10;break e;case g:C=9;break e;case x:C=11;break e;case w:C=14;break e;case T:C=16,h=null;break e}C=29,c=Error(r(130,i===null?"null":typeof i,"")),h=null}return s=nr(C,c,s,p),s.elementType=i,s.type=h,s.lanes=_,s}function Ya(i,s,c,h){return i=nr(7,i,h,s),i.lanes=c,i}function Zx(i,s,c,h){i=nr(22,i,h,s),i.elementType=R,i.lanes=c;var p={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var _=p._current;if(_===null)throw Error(r(456));if((p._pendingVisibility&2)===0){var C=ji(_,2);C!==null&&(p._pendingVisibility|=2,En(C,_,2))}},attach:function(){var _=p._current;if(_===null)throw Error(r(456));if((p._pendingVisibility&2)!==0){var C=ji(_,2);C!==null&&(p._pendingVisibility&=-3,En(C,_,2))}}};return i.stateNode=p,i}function dp(i,s,c){return i=nr(6,i,null,s),i.lanes=c,i}function fp(i,s,c){return s=nr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function hi(i){i.flags|=4}function Xx(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!ME(s)){if(s=Jn.current,s!==null&&((ot&4194176)===ot?Ir!==null:(ot&62914560)!==ot&&(ot&536870912)===0||s!==Ir))throw vl=ym,m0;i.flags|=8192}}function id(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?p_():536870912,i.lanes|=s,Ys|=s)}function Ml(i,s){if(!ut)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function At(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(s)for(var p=i.child;p!==null;)c|=p.lanes|p.childLanes,h|=p.subtreeFlags&31457280,h|=p.flags&31457280,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)c|=p.lanes|p.childLanes,h|=p.subtreeFlags,h|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=h,i.childLanes=c,s}function rL(i,s,c){var h=s.pendingProps;switch(pm(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(s),null;case 1:return At(s),null;case 3:return c=s.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),ci(Gt),Cn(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(ml(s)?hi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,br!==null&&(_p(br),br=null))),At(s),null;case 26:return c=s.memoizedState,i===null?(hi(s),c!==null?(At(s),Xx(s,c)):(At(s),s.flags&=-16777217)):c?c!==i.memoizedState?(hi(s),At(s),Xx(s,c)):(At(s),s.flags&=-16777217):(i.memoizedProps!==h&&hi(s),At(s),s.flags&=-16777217),null;case 27:Na(s),c=Et.current;var p=s.type;if(i!==null&&s.stateNode!=null)i.memoizedProps!==h&&hi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}i=Fe.current,ml(s)?f0(s):(i=CE(p,h,c),s.stateNode=i,hi(s))}return At(s),null;case 5:if(Na(s),c=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==h&&hi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}if(i=Fe.current,ml(s))f0(s);else{switch(p=pd(Et.current),i){case 1:i=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:i=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":i=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":i=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":i=p.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof h.is=="string"?p.createElement("select",{is:h.is}):p.createElement("select"),h.multiple?i.multiple=!0:h.size&&(i.size=h.size);break;default:i=typeof h.is=="string"?p.createElement(c,{is:h.is}):p.createElement(c)}}i[fn]=s,i[Nn]=h;e:for(p=s.child;p!==null;){if(p.tag===5||p.tag===6)i.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===s)break e;for(;p.sibling===null;){if(p.return===null||p.return===s)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}s.stateNode=i;e:switch(on(i,c,h),c){case"button":case"input":case"select":case"textarea":i=!!h.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&hi(s)}}return At(s),s.flags&=-16777217,null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==h&&hi(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(i=Et.current,ml(s)){if(i=s.stateNode,c=s.memoizedProps,h=null,p=xn,p!==null)switch(p.tag){case 27:case 5:h=p.memoizedProps}i[fn]=s,i=!!(i.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||xE(i.nodeValue,c)),i||Ba(s)}else i=pd(i).createTextNode(h),i[fn]=s,s.stateNode=i}return At(s),null;case 13:if(h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=ml(s),h!==null&&h.dehydrated!==null){if(i===null){if(!p)throw Error(r(318));if(p=s.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[fn]=s}else pl(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),p=!1}else br!==null&&(_p(br),br=null),p=!0;if(!p)return s.flags&256?(ai(s),s):(ai(s),null)}if(ai(s),(s.flags&128)!==0)return s.lanes=c,s;if(c=h!==null,i=i!==null&&i.memoizedState!==null,c){h=s.child,p=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(p=h.alternate.memoizedState.cachePool.pool);var _=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==p&&(h.flags|=2048)}return c!==i&&c&&(s.child.flags|=8192),id(s,s.updateQueue),At(s),null;case 4:return Cn(),i===null&&Op(s.stateNode.containerInfo),At(s),null;case 10:return ci(s.type),At(s),null;case 19:if(De(Ft),p=s.memoizedState,p===null)return At(s),null;if(h=(s.flags&128)!==0,_=p.rendering,_===null)if(h)Ml(p,!1);else{if(Ot!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=Uu(i),_!==null){for(s.flags|=128,Ml(p,!1),i=_.updateQueue,s.updateQueue=i,id(s,i),s.subtreeFlags=0,i=c,c=s.child;c!==null;)Yx(c,i),c=c.sibling;return Ce(Ft,Ft.current&1|2),s.child}i=i.sibling}p.tail!==null&&be()>ad&&(s.flags|=128,h=!0,Ml(p,!1),s.lanes=4194304)}else{if(!h)if(i=Uu(_),i!==null){if(s.flags|=128,h=!0,i=i.updateQueue,s.updateQueue=i,id(s,i),Ml(p,!0),p.tail===null&&p.tailMode==="hidden"&&!_.alternate&&!ut)return At(s),null}else 2*be()-p.renderingStartTime>ad&&c!==536870912&&(s.flags|=128,h=!0,Ml(p,!1),s.lanes=4194304);p.isBackwards?(_.sibling=s.child,s.child=_):(i=p.last,i!==null?i.sibling=_:s.child=_,p.last=_)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=be(),s.sibling=null,i=Ft.current,Ce(Ft,h?i&1|2:i&1),s):(At(s),null);case 22:case 23:return ai(s),bm(),h=s.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(c&536870912)!==0&&(s.flags&128)===0&&(At(s),s.subtreeFlags&6&&(s.flags|=8192)):At(s),c=s.updateQueue,c!==null&&id(s,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==c&&(s.flags|=2048),i!==null&&De(Ua),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),ci(Gt),At(s),null;case 25:return null}throw Error(r(156,s.tag))}function iL(i,s){switch(pm(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ci(Gt),Cn(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return Na(s),null;case 13:if(ai(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));pl()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return De(Ft),null;case 4:return Cn(),null;case 10:return ci(s.type),null;case 22:case 23:return ai(s),bm(),i!==null&&De(Ua),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return ci(Gt),null;case 25:return null;default:return null}}function Qx(i,s){switch(pm(s),s.tag){case 3:ci(Gt),Cn();break;case 26:case 27:case 5:Na(s);break;case 4:Cn();break;case 13:ai(s);break;case 19:De(Ft);break;case 10:ci(s.type);break;case 22:case 23:ai(s),bm(),i!==null&&De(Ua);break;case 24:ci(Gt)}}var aL={getCacheForType:function(i){var s=hn(Gt),c=s.data.get(i);return c===void 0&&(c=i(),s.data.set(i,c)),c}},sL=typeof WeakMap=="function"?WeakMap:Map,wt=0,bt=null,it=null,ot=0,_t=0,Vn=null,mi=!1,Ws=!1,hp=!1,pi=0,Ot=0,Yi=0,Za=0,mp=0,rr=0,Ys=0,jl=null,Mr=null,pp=!1,gp=0,ad=1/0,sd=null,Zi=null,od=!1,Xa=null,Pl=0,yp=0,vp=null,Vl=0,bp=null;function Bn(){if((wt&2)!==0&&ot!==0)return ot&-ot;if(B.T!==null){var i=zs;return i!==0?i:Cp()}return b_()}function Jx(){rr===0&&(rr=(ot&536870912)===0||ut?m_():536870912);var i=Jn.current;return i!==null&&(i.flags|=32),rr}function En(i,s,c){(i===bt&&_t===2||i.cancelPendingCommit!==null)&&(Zs(i,0),gi(i,ot,rr,!1)),nl(i,c),((wt&2)===0||i!==bt)&&(i===bt&&((wt&2)===0&&(Za|=c),Ot===4&&gi(i,ot,rr,!1)),jr(i))}function eE(i,s,c){if((wt&6)!==0)throw Error(r(327));var h=!c&&(s&60)===0&&(s&i.expiredLanes)===0||tl(i,s),p=h?cL(i,s):Sp(i,s,!0),_=h;do{if(p===0){Ws&&!h&&gi(i,s,0,!1);break}else if(p===6)gi(i,s,0,!mi);else{if(c=i.current.alternate,_&&!oL(c)){p=Sp(i,s,!1),_=!1;continue}if(p===2){if(_=s,i.errorRecoveryDisabledLanes&_)var C=0;else C=i.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){s=C;e:{var k=i;p=jl;var j=k.current.memoizedState.isDehydrated;if(j&&(Zs(k,C).flags|=256),C=Sp(k,C,!1),C!==2){if(hp&&!j){k.errorRecoveryDisabledLanes|=_,Za|=_,p=4;break e}_=Mr,Mr=p,_!==null&&_p(_)}p=C}if(_=!1,p!==2)continue}}if(p===1){Zs(i,0),gi(i,s,0,!0);break}e:{switch(h=i,p){case 0:case 1:throw Error(r(345));case 4:if((s&4194176)===s){gi(h,s,rr,!mi);break e}break;case 2:Mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=c,h.finishedLanes=s,(s&62914560)===s&&(_=gp+300-be(),10<_)){if(gi(h,s,rr,!mi),_u(h,0)!==0)break e;h.timeoutHandle=AE(tE.bind(null,h,c,Mr,sd,pp,s,rr,Za,Ys,mi,2,-0,0),_);break e}tE(h,c,Mr,sd,pp,s,rr,Za,Ys,mi,0,-0,0)}}break}while(!0);jr(i)}function _p(i){Mr===null?Mr=i:Mr.push.apply(Mr,i)}function tE(i,s,c,h,p,_,C,k,j,$,se,me,te){var ae=s.subtreeFlags;if((ae&8192||(ae&16785408)===16785408)&&(Gl={stylesheets:null,count:0,unsuspend:HL},$x(s),s=GL(),s!==null)){i.cancelPendingCommit=s(lE.bind(null,i,c,h,p,C,k,j,1,me,te)),gi(i,_,C,!$);return}lE(i,c,h,p,C,k,j,se,me,te)}function oL(i){for(var s=i;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var p=c[h],_=p.getSnapshot;p=p.value;try{if(!Mn(_(),p))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function gi(i,s,c,h){s&=~mp,s&=~Za,i.suspendedLanes|=s,i.pingedLanes&=~s,h&&(i.warmLanes|=s),h=i.expirationTimes;for(var p=s;0<p;){var _=31-_n(p),C=1<<_;h[_]=-1,p&=~C}c!==0&&g_(i,c,s)}function ld(){return(wt&6)===0?(Bl(0),!1):!0}function xp(){if(it!==null){if(_t===0)var i=it.return;else i=it,li=qa=null,Cm(i),Vs=null,bl=0,i=it;for(;i!==null;)Qx(i.alternate,i),i=i.return;it=null}}function Zs(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,TL(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),xp(),bt=i,it=c=Wi(i.current,null),ot=s,_t=0,Vn=null,mi=!1,Ws=tl(i,s),hp=!1,Ys=rr=mp=Za=Yi=Ot=0,Mr=jl=null,pp=!1,(s&8)!==0&&(s|=s&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=s;0<h;){var p=31-_n(h),_=1<<p;s|=i[p],h&=~_}return pi=s,Du(),c}function nE(i,s){Je=null,B.H=Lr,s===yl?(s=y0(),_t=3):s===m0?(s=y0(),_t=4):_t=s===px?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Vn=s,it===null&&(Ot=1,Qu(i,Zn(s,i.current)))}function rE(){var i=B.H;return B.H=Lr,i===null?Lr:i}function iE(){var i=B.A;return B.A=aL,i}function Ep(){Ot=4,mi||(ot&4194176)!==ot&&Jn.current!==null||(Ws=!0),(Yi&134217727)===0&&(Za&134217727)===0||bt===null||gi(bt,ot,rr,!1)}function Sp(i,s,c){var h=wt;wt|=2;var p=rE(),_=iE();(bt!==i||ot!==s)&&(sd=null,Zs(i,s)),s=!1;var C=Ot;e:do try{if(_t!==0&&it!==null){var k=it,j=Vn;switch(_t){case 8:xp(),C=6;break e;case 3:case 2:case 6:Jn.current===null&&(s=!0);var $=_t;if(_t=0,Vn=null,Xs(i,k,j,$),c&&Ws){C=0;break e}break;default:$=_t,_t=0,Vn=null,Xs(i,k,j,$)}}lL(),C=Ot;break}catch(se){nE(i,se)}while(!0);return s&&i.shellSuspendCounter++,li=qa=null,wt=h,B.H=p,B.A=_,it===null&&(bt=null,ot=0,Du()),C}function lL(){for(;it!==null;)aE(it)}function cL(i,s){var c=wt;wt|=2;var h=rE(),p=iE();bt!==i||ot!==s?(sd=null,ad=be()+500,Zs(i,s)):Ws=tl(i,s);e:do try{if(_t!==0&&it!==null){s=it;var _=Vn;t:switch(_t){case 1:_t=0,Vn=null,Xs(i,s,_,1);break;case 2:if(p0(_)){_t=0,Vn=null,sE(s);break}s=function(){_t===2&&bt===i&&(_t=7),jr(i)},_.then(s,s);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:p0(_)?(_t=0,Vn=null,sE(s)):(_t=0,Vn=null,Xs(i,s,_,7));break;case 5:var C=null;switch(it.tag){case 26:C=it.memoizedState;case 5:case 27:var k=it;if(!C||ME(C)){_t=0,Vn=null;var j=k.sibling;if(j!==null)it=j;else{var $=k.return;$!==null?(it=$,cd($)):it=null}break t}}_t=0,Vn=null,Xs(i,s,_,5);break;case 6:_t=0,Vn=null,Xs(i,s,_,6);break;case 8:xp(),Ot=6;break e;default:throw Error(r(462))}}uL();break}catch(se){nE(i,se)}while(!0);return li=qa=null,B.H=h,B.A=p,wt=c,it!==null?0:(bt=null,ot=0,Du(),Ot)}function uL(){for(;it!==null&&!oe();)aE(it)}function aE(i){var s=Cx(i.alternate,i,pi);i.memoizedProps=i.pendingProps,s===null?cd(i):it=s}function sE(i){var s=i,c=s.alternate;switch(s.tag){case 15:case 0:s=xx(c,s,s.pendingProps,s.type,void 0,ot);break;case 11:s=xx(c,s,s.pendingProps,s.type.render,s.ref,ot);break;case 5:Cm(s);default:Qx(c,s),s=it=Yx(s,pi),s=Cx(c,s,pi)}i.memoizedProps=i.pendingProps,s===null?cd(i):it=s}function Xs(i,s,c,h){li=qa=null,Cm(s),Vs=null,bl=0;var p=s.return;try{if(QI(i,p,s,c,ot)){Ot=1,Qu(i,Zn(c,i.current)),it=null;return}}catch(_){if(p!==null)throw it=p,_;Ot=1,Qu(i,Zn(c,i.current)),it=null;return}s.flags&32768?(ut||h===1?i=!0:Ws||(ot&536870912)!==0?i=!1:(mi=i=!0,(h===2||h===3||h===6)&&(h=Jn.current,h!==null&&h.tag===13&&(h.flags|=16384))),oE(s,i)):cd(s)}function cd(i){var s=i;do{if((s.flags&32768)!==0){oE(s,mi);return}i=s.return;var c=rL(s.alternate,s,pi);if(c!==null){it=c;return}if(s=s.sibling,s!==null){it=s;return}it=s=i}while(s!==null);Ot===0&&(Ot=5)}function oE(i,s){do{var c=iL(i.alternate,i);if(c!==null){c.flags&=32767,it=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(i=i.sibling,i!==null)){it=i;return}it=i=c}while(i!==null);Ot=6,it=null}function lE(i,s,c,h,p,_,C,k,j,$){var se=B.T,me=re.p;try{re.p=2,B.T=null,dL(i,s,c,h,me,p,_,C,k,j,$)}finally{B.T=se,re.p=me}}function dL(i,s,c,h,p,_,C,k){do Qs();while(Xa!==null);if((wt&6)!==0)throw Error(r(327));var j=i.finishedWork;if(h=i.finishedLanes,j===null)return null;if(i.finishedWork=null,i.finishedLanes=0,j===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0,i.cancelPendingCommit=null;var $=j.lanes|j.childLanes;if($|=fm,FD(i,h,$,_,C,k),i===bt&&(it=bt=null,ot=0),(j.subtreeFlags&10256)===0&&(j.flags&10256)===0||od||(od=!0,yp=$,vp=c,pL(ht,function(){return Qs(),null})),c=(j.flags&15990)!==0,(j.subtreeFlags&15990)!==0||c?(c=B.T,B.T=null,_=re.p,re.p=2,C=wt,wt|=4,eL(i,j),Hx(j,i),MI(Mp,i.containerInfo),xd=!!Lp,Mp=Lp=null,i.current=j,Vx(i,j.alternate,j),we(),wt=C,re.p=_,B.T=c):i.current=j,od?(od=!1,Xa=i,Pl=h):cE(i,$),$=i.pendingLanes,$===0&&(Zi=null),Fh(j.stateNode),jr(i),s!==null)for(p=i.onRecoverableError,j=0;j<s.length;j++)$=s[j],p($.value,{componentStack:$.stack});return(Pl&3)!==0&&Qs(),$=i.pendingLanes,(h&4194218)!==0&&($&42)!==0?i===bp?Vl++:(Vl=0,bp=i):Vl=0,Bl(0),null}function cE(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,xl(s)))}function Qs(){if(Xa!==null){var i=Xa,s=yp;yp=0;var c=v_(Pl),h=B.T,p=re.p;try{if(re.p=32>c?32:c,B.T=null,Xa===null)var _=!1;else{c=vp,vp=null;var C=Xa,k=Pl;if(Xa=null,Pl=0,(wt&6)!==0)throw Error(r(331));var j=wt;if(wt|=4,Kx(C.current),Gx(C,C.current,k,c),wt=j,Bl(0,!1),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(ei,C)}catch{}_=!0}return _}finally{re.p=p,B.T=h,cE(i,s)}}return!1}function uE(i,s,c){s=Zn(c,s),s=Um(i.stateNode,s,2),i=Gi(i,s,2),i!==null&&(nl(i,2),jr(i))}function vt(i,s,c){if(i.tag===3)uE(i,i,c);else for(;s!==null;){if(s.tag===3){uE(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Zi===null||!Zi.has(h))){i=Zn(c,i),c=hx(2),h=Gi(s,c,2),h!==null&&(mx(c,h,s,i),nl(h,2),jr(h));break}}s=s.return}}function Ap(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new sL;var p=new Set;h.set(s,p)}else p=h.get(s),p===void 0&&(p=new Set,h.set(s,p));p.has(c)||(hp=!0,p.add(c),i=fL.bind(null,i,s,c),s.then(i,i))}function fL(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,bt===i&&(ot&c)===c&&(Ot===4||Ot===3&&(ot&62914560)===ot&&300>be()-gp?(wt&2)===0&&Zs(i,0):mp|=c,Ys===ot&&(Ys=0)),jr(i)}function dE(i,s){s===0&&(s=p_()),i=ji(i,s),i!==null&&(nl(i,s),jr(i))}function hL(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),dE(i,c)}function mL(i,s){var c=0;switch(i.tag){case 13:var h=i.stateNode,p=i.memoizedState;p!==null&&(c=p.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),dE(i,c)}function pL(i,s){return z(i,s)}var ud=null,Js=null,wp=!1,dd=!1,Tp=!1,Qa=0;function jr(i){i!==Js&&i.next===null&&(Js===null?ud=Js=i:Js=Js.next=i),dd=!0,wp||(wp=!0,yL(gL))}function Bl(i,s){if(!Tp&&dd){Tp=!0;do for(var c=!1,h=ud;h!==null;){if(i!==0){var p=h.pendingLanes;if(p===0)var _=0;else{var C=h.suspendedLanes,k=h.pingedLanes;_=(1<<31-_n(42|i)+1)-1,_&=p&~(C&~k),_=_&201326677?_&201326677|1:_?_|2:0}_!==0&&(c=!0,mE(h,_))}else _=ot,_=_u(h,h===bt?_:0),(_&3)===0||tl(h,_)||(c=!0,mE(h,_));h=h.next}while(c);Tp=!1}}function gL(){dd=wp=!1;var i=0;Qa!==0&&(wL()&&(i=Qa),Qa=0);for(var s=be(),c=null,h=ud;h!==null;){var p=h.next,_=fE(h,s);_===0?(h.next=null,c===null?ud=p:c.next=p,p===null&&(Js=c)):(c=h,(i!==0||(_&3)!==0)&&(dd=!0)),h=p}Bl(i)}function fE(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,p=i.expirationTimes,_=i.pendingLanes&-62914561;0<_;){var C=31-_n(_),k=1<<C,j=p[C];j===-1?((k&c)===0||(k&h)!==0)&&(p[C]=HD(k,s)):j<=s&&(i.expiredLanes|=k),_&=~k}if(s=bt,c=ot,c=_u(i,i===s?c:0),h=i.callbackNode,c===0||i===s&&_t===2||i.cancelPendingCommit!==null)return h!==null&&h!==null&&J(h),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||tl(i,c)){if(s=c&-c,s===i.callbackPriority)return s;switch(h!==null&&J(h),v_(c)){case 2:case 8:c=ct;break;case 32:c=ht;break;case 268435456:c=ka;break;default:c=ht}return h=hE.bind(null,i),c=z(c,h),i.callbackPriority=s,i.callbackNode=c,s}return h!==null&&h!==null&&J(h),i.callbackPriority=2,i.callbackNode=null,2}function hE(i,s){var c=i.callbackNode;if(Qs()&&i.callbackNode!==c)return null;var h=ot;return h=_u(i,i===bt?h:0),h===0?null:(eE(i,h,s),fE(i,be()),i.callbackNode!=null&&i.callbackNode===c?hE.bind(null,i):null)}function mE(i,s){if(Qs())return null;eE(i,s,!0)}function yL(i){CL(function(){(wt&6)!==0?z(Pe,i):i()})}function Cp(){return Qa===0&&(Qa=m_()),Qa}function pE(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:wu(""+i)}function gE(i,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,i.id&&c.setAttribute("form",i.id),s.parentNode.insertBefore(c,s),i=new FormData(i),c.parentNode.removeChild(c),i}function vL(i,s,c,h,p){if(s==="submit"&&c&&c.stateNode===p){var _=pE((p[Nn]||null).action),C=h.submitter;C&&(s=(s=C[Nn]||null)?pE(s.formAction):C.getAttribute("formAction"),s!==null&&(_=s,C=null));var k=new Nu("action","action",null,h,p);i.push({event:k,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(Qa!==0){var j=C?gE(p,C):new FormData(p);jm(c,{pending:!0,data:j,method:p.method,action:_},null,j)}}else typeof _=="function"&&(k.preventDefault(),j=C?gE(p,C):new FormData(p),jm(c,{pending:!0,data:j,method:p.method,action:_},_,j))},currentTarget:p}]})}}for(var Rp=0;Rp<l0.length;Rp++){var Np=l0[Rp],bL=Np.toLowerCase(),_L=Np[0].toUpperCase()+Np.slice(1);vr(bL,"on"+_L)}vr(r0,"onAnimationEnd"),vr(i0,"onAnimationIteration"),vr(a0,"onAnimationStart"),vr("dblclick","onDoubleClick"),vr("focusin","onFocus"),vr("focusout","onBlur"),vr(PI,"onTransitionRun"),vr(VI,"onTransitionStart"),vr(BI,"onTransitionCancel"),vr(s0,"onTransitionEnd"),Ts("onMouseEnter",["mouseout","mouseover"]),Ts("onMouseLeave",["mouseout","mouseover"]),Ts("onPointerEnter",["pointerout","pointerover"]),Ts("onPointerLeave",["pointerout","pointerover"]),Ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zl="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(" "),xL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zl));function yE(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],p=h.event;h=h.listeners;e:{var _=void 0;if(s)for(var C=h.length-1;0<=C;C--){var k=h[C],j=k.instance,$=k.currentTarget;if(k=k.listener,j!==_&&p.isPropagationStopped())break e;_=k,p.currentTarget=$;try{_(p)}catch(se){Xu(se)}p.currentTarget=null,_=j}else for(C=0;C<h.length;C++){if(k=h[C],j=k.instance,$=k.currentTarget,k=k.listener,j!==_&&p.isPropagationStopped())break e;_=k,p.currentTarget=$;try{_(p)}catch(se){Xu(se)}p.currentTarget=null,_=j}}}}function at(i,s){var c=s[$h];c===void 0&&(c=s[$h]=new Set);var h=i+"__bubble";c.has(h)||(vE(s,i,2,!1),c.add(h))}function kp(i,s,c){var h=0;s&&(h|=4),vE(c,i,h,s)}var fd="_reactListening"+Math.random().toString(36).slice(2);function Op(i){if(!i[fd]){i[fd]=!0,x_.forEach(function(c){c!=="selectionchange"&&(xL.has(c)||kp(c,!1,i),kp(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[fd]||(s[fd]=!0,kp("selectionchange",!1,s))}}function vE(i,s,c,h){switch(UE(s)){case 2:var p=KL;break;case 8:p=WL;break;default:p=Gp}c=p.bind(null,s,c,i),p=void 0,!Jh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(p=!0),h?p!==void 0?i.addEventListener(s,c,{capture:!0,passive:p}):i.addEventListener(s,c,!0):p!==void 0?i.addEventListener(s,c,{passive:p}):i.addEventListener(s,c,!1)}function Dp(i,s,c,h,p){var _=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var C=h.tag;if(C===3||C===4){var k=h.stateNode.containerInfo;if(k===p||k.nodeType===8&&k.parentNode===p)break;if(C===4)for(C=h.return;C!==null;){var j=C.tag;if((j===3||j===4)&&(j=C.stateNode.containerInfo,j===p||j.nodeType===8&&j.parentNode===p))return;C=C.return}for(;k!==null;){if(C=Da(k),C===null)return;if(j=C.tag,j===5||j===6||j===26||j===27){h=_=C;continue e}k=k.parentNode}}h=h.return}I_(function(){var $=_,se=Xh(c),me=[];e:{var te=o0.get(i);if(te!==void 0){var ae=Nu,Me=i;switch(i){case"keypress":if(Cu(c)===0)break e;case"keydown":case"keyup":ae=mI;break;case"focusin":Me="focus",ae=rm;break;case"focusout":Me="blur",ae=rm;break;case"beforeblur":case"afterblur":ae=rm;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=j_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=nI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=yI;break;case r0:case i0:case a0:ae=aI;break;case s0:ae=bI;break;case"scroll":case"scrollend":ae=eI;break;case"wheel":ae=xI;break;case"copy":case"cut":case"paste":ae=oI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=V_;break;case"toggle":case"beforetoggle":ae=SI}var $e=(s&4)!==0,Dt=!$e&&(i==="scroll"||i==="scrollend"),W=$e?te!==null?te+"Capture":null:te;$e=[];for(var G=$,Y;G!==null;){var de=G;if(Y=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||Y===null||W===null||(de=al(G,W),de!=null&&$e.push(Ul(G,de,Y))),Dt)break;G=G.return}0<$e.length&&(te=new ae(te,Me,null,c,se),me.push({event:te,listeners:$e}))}}if((s&7)===0){e:{if(te=i==="mouseover"||i==="pointerover",ae=i==="mouseout"||i==="pointerout",te&&c!==Zh&&(Me=c.relatedTarget||c.fromElement)&&(Da(Me)||Me[Ss]))break e;if((ae||te)&&(te=se.window===se?se:(te=se.ownerDocument)?te.defaultView||te.parentWindow:window,ae?(Me=c.relatedTarget||c.toElement,ae=$,Me=Me?Da(Me):null,Me!==null&&(Dt=q(Me),$e=Me.tag,Me!==Dt||$e!==5&&$e!==27&&$e!==6)&&(Me=null)):(ae=null,Me=$),ae!==Me)){if($e=j_,de="onMouseLeave",W="onMouseEnter",G="mouse",(i==="pointerout"||i==="pointerover")&&($e=V_,de="onPointerLeave",W="onPointerEnter",G="pointer"),Dt=ae==null?te:il(ae),Y=Me==null?te:il(Me),te=new $e(de,G+"leave",ae,c,se),te.target=Dt,te.relatedTarget=Y,de=null,Da(se)===$&&($e=new $e(W,G+"enter",Me,c,se),$e.target=Y,$e.relatedTarget=Dt,de=$e),Dt=de,ae&&Me)t:{for($e=ae,W=Me,G=0,Y=$e;Y;Y=eo(Y))G++;for(Y=0,de=W;de;de=eo(de))Y++;for(;0<G-Y;)$e=eo($e),G--;for(;0<Y-G;)W=eo(W),Y--;for(;G--;){if($e===W||W!==null&&$e===W.alternate)break t;$e=eo($e),W=eo(W)}$e=null}else $e=null;ae!==null&&bE(me,te,ae,$e,!1),Me!==null&&Dt!==null&&bE(me,Dt,Me,$e,!0)}}e:{if(te=$?il($):window,ae=te.nodeName&&te.nodeName.toLowerCase(),ae==="select"||ae==="input"&&te.type==="file")var Re=q_;else if(G_(te))if(K_)Re=II;else{Re=OI;var nt=kI}else ae=te.nodeName,!ae||ae.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?$&&Yh($.elementType)&&(Re=q_):Re=DI;if(Re&&(Re=Re(i,$))){$_(me,Re,c,se);break e}nt&&nt(i,te,$),i==="focusout"&&$&&te.type==="number"&&$.memoizedProps.value!=null&&Wh(te,"number",te.value)}switch(nt=$?il($):window,i){case"focusin":(G_(nt)||nt.contentEditable==="true")&&(Ds=nt,cm=$,hl=null);break;case"focusout":hl=cm=Ds=null;break;case"mousedown":um=!0;break;case"contextmenu":case"mouseup":case"dragend":um=!1,t0(me,c,se);break;case"selectionchange":if(jI)break;case"keydown":case"keyup":t0(me,c,se)}var Ve;if(am)e:{switch(i){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Os?H_(i,c)&&(Be="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Be="onCompositionStart");Be&&(B_&&c.locale!=="ko"&&(Os||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Os&&(Ve=L_()):(Mi=se,em="value"in Mi?Mi.value:Mi.textContent,Os=!0)),nt=hd($,Be),0<nt.length&&(Be=new P_(Be,i,null,c,se),me.push({event:Be,listeners:nt}),Ve?Be.data=Ve:(Ve=F_(c),Ve!==null&&(Be.data=Ve)))),(Ve=wI?TI(i,c):CI(i,c))&&(Be=hd($,"onBeforeInput"),0<Be.length&&(nt=new P_("onBeforeInput","beforeinput",null,c,se),me.push({event:nt,listeners:Be}),nt.data=Ve)),vL(me,i,$,c,se)}yE(me,s)})}function Ul(i,s,c){return{instance:i,listener:s,currentTarget:c}}function hd(i,s){for(var c=s+"Capture",h=[];i!==null;){var p=i,_=p.stateNode;p=p.tag,p!==5&&p!==26&&p!==27||_===null||(p=al(i,c),p!=null&&h.unshift(Ul(i,p,_)),p=al(i,s),p!=null&&h.push(Ul(i,p,_))),i=i.return}return h}function eo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function bE(i,s,c,h,p){for(var _=s._reactName,C=[];c!==null&&c!==h;){var k=c,j=k.alternate,$=k.stateNode;if(k=k.tag,j!==null&&j===h)break;k!==5&&k!==26&&k!==27||$===null||(j=$,p?($=al(c,_),$!=null&&C.unshift(Ul(c,$,j))):p||($=al(c,_),$!=null&&C.push(Ul(c,$,j)))),c=c.return}C.length!==0&&i.push({event:s,listeners:C})}var EL=/\r\n?/g,SL=/\u0000|\uFFFD/g;function _E(i){return(typeof i=="string"?i:""+i).replace(EL,`
50
+ `).replace(SL,"")}function xE(i,s){return s=_E(s),_E(i)===s}function md(){}function gt(i,s,c,h,p,_){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Rs(i,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Rs(i,""+h);break;case"className":Eu(i,"class",h);break;case"tabIndex":Eu(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Eu(i,c,h);break;case"style":O_(i,h,_);break;case"data":if(s!=="object"){Eu(i,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||c!=="href")){i.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=wu(""+h),i.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(c==="formAction"?(s!=="input"&&gt(i,s,"name",p.name,p,null),gt(i,s,"formEncType",p.formEncType,p,null),gt(i,s,"formMethod",p.formMethod,p,null),gt(i,s,"formTarget",p.formTarget,p,null)):(gt(i,s,"encType",p.encType,p,null),gt(i,s,"method",p.method,p,null),gt(i,s,"target",p.target,p,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=wu(""+h),i.setAttribute(c,h);break;case"onClick":h!=null&&(i.onclick=md);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}c=wu(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""+h):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":h===!0?i.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,h):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(c,h):i.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(c):i.setAttribute(c,h);break;case"popover":at("beforetoggle",i),at("toggle",i),xu(i,"popover",h);break;case"xlinkActuate":ni(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ni(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ni(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ni(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ni(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ni(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ni(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ni(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ni(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":xu(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=QD.get(c)||c,xu(i,c,h))}}function Ip(i,s,c,h,p,_){switch(c){case"style":O_(i,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof h=="string"?Rs(i,h):(typeof h=="number"||typeof h=="bigint")&&Rs(i,""+h);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"onClick":h!=null&&(i.onclick=md);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!E_.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(p=c.endsWith("Capture"),s=c.slice(2,p?c.length-7:void 0),_=i[Nn]||null,_=_!=null?_[c]:null,typeof _=="function"&&i.removeEventListener(s,_,p),typeof h=="function")){typeof _!="function"&&_!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(s,h,p);break e}c in i?i[c]=h:h===!0?i.setAttribute(c,""):xu(i,c,h)}}}function on(i,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",i),at("load",i);var h=!1,p=!1,_;for(_ in c)if(c.hasOwnProperty(_)){var C=c[_];if(C!=null)switch(_){case"src":h=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:gt(i,s,_,C,c,null)}}p&&gt(i,s,"srcSet",c.srcSet,c,null),h&&gt(i,s,"src",c.src,c,null);return;case"input":at("invalid",i);var k=_=C=p=null,j=null,$=null;for(h in c)if(c.hasOwnProperty(h)){var se=c[h];if(se!=null)switch(h){case"name":p=se;break;case"type":C=se;break;case"checked":j=se;break;case"defaultChecked":$=se;break;case"value":_=se;break;case"defaultValue":k=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:gt(i,s,h,se,c,null)}}C_(i,_,k,j,$,C,p,!1),Su(i);return;case"select":at("invalid",i),h=C=_=null;for(p in c)if(c.hasOwnProperty(p)&&(k=c[p],k!=null))switch(p){case"value":_=k;break;case"defaultValue":C=k;break;case"multiple":h=k;default:gt(i,s,p,k,c,null)}s=_,c=C,i.multiple=!!h,s!=null?Cs(i,!!h,s,!1):c!=null&&Cs(i,!!h,c,!0);return;case"textarea":at("invalid",i),_=p=h=null;for(C in c)if(c.hasOwnProperty(C)&&(k=c[C],k!=null))switch(C){case"value":h=k;break;case"defaultValue":p=k;break;case"children":_=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:gt(i,s,C,k,c,null)}N_(i,h,p,_),Su(i);return;case"option":for(j in c)if(c.hasOwnProperty(j)&&(h=c[j],h!=null))switch(j){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:gt(i,s,j,h,c,null)}return;case"dialog":at("cancel",i),at("close",i);break;case"iframe":case"object":at("load",i);break;case"video":case"audio":for(h=0;h<zl.length;h++)at(zl[h],i);break;case"image":at("error",i),at("load",i);break;case"details":at("toggle",i);break;case"embed":case"source":case"link":at("error",i),at("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in c)if(c.hasOwnProperty($)&&(h=c[$],h!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:gt(i,s,$,h,c,null)}return;default:if(Yh(s)){for(se in c)c.hasOwnProperty(se)&&(h=c[se],h!==void 0&&Ip(i,s,se,h,c,void 0));return}}for(k in c)c.hasOwnProperty(k)&&(h=c[k],h!=null&&gt(i,s,k,h,c,null))}function AL(i,s,c,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,_=null,C=null,k=null,j=null,$=null,se=null;for(ae in c){var me=c[ae];if(c.hasOwnProperty(ae)&&me!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":j=me;default:h.hasOwnProperty(ae)||gt(i,s,ae,null,h,me)}}for(var te in h){var ae=h[te];if(me=c[te],h.hasOwnProperty(te)&&(ae!=null||me!=null))switch(te){case"type":_=ae;break;case"name":p=ae;break;case"checked":$=ae;break;case"defaultChecked":se=ae;break;case"value":C=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,s));break;default:ae!==me&&gt(i,s,te,ae,h,me)}}Kh(i,C,k,j,$,se,_,p);return;case"select":ae=C=k=te=null;for(_ in c)if(j=c[_],c.hasOwnProperty(_)&&j!=null)switch(_){case"value":break;case"multiple":ae=j;default:h.hasOwnProperty(_)||gt(i,s,_,null,h,j)}for(p in h)if(_=h[p],j=c[p],h.hasOwnProperty(p)&&(_!=null||j!=null))switch(p){case"value":te=_;break;case"defaultValue":k=_;break;case"multiple":C=_;default:_!==j&&gt(i,s,p,_,h,j)}s=k,c=C,h=ae,te!=null?Cs(i,!!c,te,!1):!!h!=!!c&&(s!=null?Cs(i,!!c,s,!0):Cs(i,!!c,c?[]:"",!1));return;case"textarea":ae=te=null;for(k in c)if(p=c[k],c.hasOwnProperty(k)&&p!=null&&!h.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:gt(i,s,k,null,h,p)}for(C in h)if(p=h[C],_=c[C],h.hasOwnProperty(C)&&(p!=null||_!=null))switch(C){case"value":te=p;break;case"defaultValue":ae=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==_&&gt(i,s,C,p,h,_)}R_(i,te,ae);return;case"option":for(var Me in c)if(te=c[Me],c.hasOwnProperty(Me)&&te!=null&&!h.hasOwnProperty(Me))switch(Me){case"selected":i.selected=!1;break;default:gt(i,s,Me,null,h,te)}for(j in h)if(te=h[j],ae=c[j],h.hasOwnProperty(j)&&te!==ae&&(te!=null||ae!=null))switch(j){case"selected":i.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:gt(i,s,j,te,h,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var $e in c)te=c[$e],c.hasOwnProperty($e)&&te!=null&&!h.hasOwnProperty($e)&&gt(i,s,$e,null,h,te);for($ in h)if(te=h[$],ae=c[$],h.hasOwnProperty($)&&te!==ae&&(te!=null||ae!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,s));break;default:gt(i,s,$,te,h,ae)}return;default:if(Yh(s)){for(var Dt in c)te=c[Dt],c.hasOwnProperty(Dt)&&te!==void 0&&!h.hasOwnProperty(Dt)&&Ip(i,s,Dt,void 0,h,te);for(se in h)te=h[se],ae=c[se],!h.hasOwnProperty(se)||te===ae||te===void 0&&ae===void 0||Ip(i,s,se,te,h,ae);return}}for(var W in c)te=c[W],c.hasOwnProperty(W)&&te!=null&&!h.hasOwnProperty(W)&&gt(i,s,W,null,h,te);for(me in h)te=h[me],ae=c[me],!h.hasOwnProperty(me)||te===ae||te==null&&ae==null||gt(i,s,me,te,h,ae)}var Lp=null,Mp=null;function pd(i){return i.nodeType===9?i:i.ownerDocument}function EE(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function SE(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function jp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Pp=null;function wL(){var i=window.event;return i&&i.type==="popstate"?i===Pp?!1:(Pp=i,!0):(Pp=null,!1)}var AE=typeof setTimeout=="function"?setTimeout:void 0,TL=typeof clearTimeout=="function"?clearTimeout:void 0,wE=typeof Promise=="function"?Promise:void 0,CL=typeof queueMicrotask=="function"?queueMicrotask:typeof wE<"u"?function(i){return wE.resolve(null).then(i).catch(RL)}:AE;function RL(i){setTimeout(function(){throw i})}function Vp(i,s){var c=s,h=0;do{var p=c.nextSibling;if(i.removeChild(c),p&&p.nodeType===8)if(c=p.data,c==="/$"){if(h===0){i.removeChild(p),Yl(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=p}while(c);Yl(s)}function Bp(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Bp(c),qh(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function NL(i,s,c,h){for(;i.nodeType===1;){var p=c;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[rl])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(_=i.getAttribute("rel"),_==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(_!==p.rel||i.getAttribute("href")!==(p.href==null?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(_=i.getAttribute("src"),(_!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&_&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var _=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===_)return i}else return i;if(i=xr(i.nextSibling),i===null)break}return null}function kL(i,s,c){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=xr(i.nextSibling),i===null))return null;return i}function xr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="F!"||s==="F")break;if(s==="/$")return null}}return i}function TE(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}function CE(i,s,c){switch(s=pd(c),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}var ir=new Map,RE=new Set;function gd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.ownerDocument}var yi=re.d;re.d={f:OL,r:DL,D:IL,C:LL,L:ML,m:jL,X:VL,S:PL,M:BL};function OL(){var i=yi.f(),s=ld();return i||s}function DL(i){var s=As(i);s!==null&&s.tag===5&&s.type==="form"?tx(s):yi.r(i)}var to=typeof document>"u"?null:document;function NE(i,s,c){var h=to;if(h&&typeof s=="string"&&s){var p=Wn(s);p='link[rel="'+i+'"][href="'+p+'"]',typeof c=="string"&&(p+='[crossorigin="'+c+'"]'),RE.has(p)||(RE.add(p),i={rel:i,crossOrigin:c,href:s},h.querySelector(p)===null&&(s=h.createElement("link"),on(s,"link",i),Zt(s),h.head.appendChild(s)))}}function IL(i){yi.D(i),NE("dns-prefetch",i,null)}function LL(i,s){yi.C(i,s),NE("preconnect",i,s)}function ML(i,s,c){yi.L(i,s,c);var h=to;if(h&&i&&s){var p='link[rel="preload"][as="'+Wn(s)+'"]';s==="image"&&c&&c.imageSrcSet?(p+='[imagesrcset="'+Wn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(p+='[imagesizes="'+Wn(c.imageSizes)+'"]')):p+='[href="'+Wn(i)+'"]';var _=p;switch(s){case"style":_=no(i);break;case"script":_=ro(i)}ir.has(_)||(i=U({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:i,as:s},c),ir.set(_,i),h.querySelector(p)!==null||s==="style"&&h.querySelector(Hl(_))||s==="script"&&h.querySelector(Fl(_))||(s=h.createElement("link"),on(s,"link",i),Zt(s),h.head.appendChild(s)))}}function jL(i,s){yi.m(i,s);var c=to;if(c&&i){var h=s&&typeof s.as=="string"?s.as:"script",p='link[rel="modulepreload"][as="'+Wn(h)+'"][href="'+Wn(i)+'"]',_=p;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=ro(i)}if(!ir.has(_)&&(i=U({rel:"modulepreload",href:i},s),ir.set(_,i),c.querySelector(p)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Fl(_)))return}h=c.createElement("link"),on(h,"link",i),Zt(h),c.head.appendChild(h)}}}function PL(i,s,c){yi.S(i,s,c);var h=to;if(h&&i){var p=ws(h).hoistableStyles,_=no(i);s=s||"default";var C=p.get(_);if(!C){var k={loading:0,preload:null};if(C=h.querySelector(Hl(_)))k.loading=5;else{i=U({rel:"stylesheet",href:i,"data-precedence":s},c),(c=ir.get(_))&&zp(i,c);var j=C=h.createElement("link");Zt(j),on(j,"link",i),j._p=new Promise(function($,se){j.onload=$,j.onerror=se}),j.addEventListener("load",function(){k.loading|=1}),j.addEventListener("error",function(){k.loading|=2}),k.loading|=4,yd(C,s,h)}C={type:"stylesheet",instance:C,count:1,state:k},p.set(_,C)}}}function VL(i,s){yi.X(i,s);var c=to;if(c&&i){var h=ws(c).hoistableScripts,p=ro(i),_=h.get(p);_||(_=c.querySelector(Fl(p)),_||(i=U({src:i,async:!0},s),(s=ir.get(p))&&Up(i,s),_=c.createElement("script"),Zt(_),on(_,"link",i),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(p,_))}}function BL(i,s){yi.M(i,s);var c=to;if(c&&i){var h=ws(c).hoistableScripts,p=ro(i),_=h.get(p);_||(_=c.querySelector(Fl(p)),_||(i=U({src:i,async:!0,type:"module"},s),(s=ir.get(p))&&Up(i,s),_=c.createElement("script"),Zt(_),on(_,"link",i),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(p,_))}}function kE(i,s,c,h){var p=(p=Et.current)?gd(p):null;if(!p)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=no(c.href),c=ws(p).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=no(c.href);var _=ws(p).hoistableStyles,C=_.get(i);if(C||(p=p.ownerDocument||p,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(i,C),(_=p.querySelector(Hl(i)))&&!_._p&&(C.instance=_,C.state.loading=5),ir.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},ir.set(i,c),_||zL(p,i,c,C.state))),s&&h===null)throw Error(r(528,""));return C}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ro(c),c=ws(p).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function no(i){return'href="'+Wn(i)+'"'}function Hl(i){return'link[rel="stylesheet"]['+i+"]"}function OE(i){return U({},i,{"data-precedence":i.precedence,precedence:null})}function zL(i,s,c,h){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=i.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),on(s,"link",c),Zt(s),i.head.appendChild(s))}function ro(i){return'[src="'+Wn(i)+'"]'}function Fl(i){return"script[async]"+i}function DE(i,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=i.querySelector('style[data-href~="'+Wn(c.href)+'"]');if(h)return s.instance=h,Zt(h),h;var p=U({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),Zt(h),on(h,"style",p),yd(h,c.precedence,i),s.instance=h;case"stylesheet":p=no(c.href);var _=i.querySelector(Hl(p));if(_)return s.state.loading|=4,s.instance=_,Zt(_),_;h=OE(c),(p=ir.get(p))&&zp(h,p),_=(i.ownerDocument||i).createElement("link"),Zt(_);var C=_;return C._p=new Promise(function(k,j){C.onload=k,C.onerror=j}),on(_,"link",h),s.state.loading|=4,yd(_,c.precedence,i),s.instance=_;case"script":return _=ro(c.src),(p=i.querySelector(Fl(_)))?(s.instance=p,Zt(p),p):(h=c,(p=ir.get(_))&&(h=U({},c),Up(h,p)),i=i.ownerDocument||i,p=i.createElement("script"),Zt(p),on(p,"link",h),i.head.appendChild(p),s.instance=p);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,yd(h,c.precedence,i));return s.instance}function yd(i,s,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=h.length?h[h.length-1]:null,_=p,C=0;C<h.length;C++){var k=h[C];if(k.dataset.precedence===s)_=k;else if(_!==p)break}_?_.parentNode.insertBefore(i,_.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(i,s.firstChild))}function zp(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function Up(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var vd=null;function IE(i,s,c){if(vd===null){var h=new Map,p=vd=new Map;p.set(c,h)}else p=vd,h=p.get(c),h||(h=new Map,p.set(c,h));if(h.has(i))return h;for(h.set(i,null),c=c.getElementsByTagName(i),p=0;p<c.length;p++){var _=c[p];if(!(_[rl]||_[fn]||i==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var C=_.getAttribute(s)||"";C=i+C;var k=h.get(C);k?k.push(_):h.set(C,[_])}}return h}function LE(i,s,c){i=i.ownerDocument||i,i.head.insertBefore(c,s==="title"?i.querySelector("head > title"):null)}function UL(i,s,c){if(c===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return i=s.disabled,typeof s.precedence=="string"&&i==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function ME(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var Gl=null;function HL(){}function FL(i,s,c){if(Gl===null)throw Error(r(475));var h=Gl;if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=no(c.href),_=i.querySelector(Hl(p));if(_){i=_._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=bd.bind(h),i.then(h,h)),s.state.loading|=4,s.instance=_,Zt(_);return}_=i.ownerDocument||i,c=OE(c),(p=ir.get(p))&&zp(c,p),_=_.createElement("link"),Zt(_);var C=_;C._p=new Promise(function(k,j){C.onload=k,C.onerror=j}),on(_,"link",c),s.instance=_}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(h.count++,s=bd.bind(h),i.addEventListener("load",s),i.addEventListener("error",s))}}function GL(){if(Gl===null)throw Error(r(475));var i=Gl;return i.stylesheets&&i.count===0&&Hp(i,i.stylesheets),0<i.count?function(s){var c=setTimeout(function(){if(i.stylesheets&&Hp(i,i.stylesheets),i.unsuspend){var h=i.unsuspend;i.unsuspend=null,h()}},6e4);return i.unsuspend=s,function(){i.unsuspend=null,clearTimeout(c)}}:null}function bd(){if(this.count--,this.count===0){if(this.stylesheets)Hp(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var _d=null;function Hp(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,_d=new Map,s.forEach($L,i),_d=null,bd.call(i))}function $L(i,s){if(!(s.state.loading&4)){var c=_d.get(i);if(c)var h=c.get(null);else{c=new Map,_d.set(i,c);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<p.length;_++){var C=p[_];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(c.set(C.dataset.precedence,C),h=C)}h&&c.set(null,h)}p=s.instance,C=p.getAttribute("data-precedence"),_=c.get(C)||h,_===h&&c.set(null,p),c.set(C,p),this.count++,h=bd.bind(this),p.addEventListener("load",h),p.addEventListener("error",h),_?_.parentNode.insertBefore(p,_.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),s.state.loading|=4}}var $l={$$typeof:v,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function qL(i,s,c,h,p,_,C,k){this.tag=1,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Gh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gh(0),this.hiddenUpdates=Gh(null),this.identifierPrefix=h,this.onUncaughtError=p,this.onCaughtError=_,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function jE(i,s,c,h,p,_,C,k,j,$,se,me){return i=new qL(i,s,c,C,k,j,$,me),s=1,_===!0&&(s|=24),_=nr(3,null,null,s),i.current=_,_.stateNode=i,s=_m(),s.refCount++,i.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:c,cache:s},ep(_),i}function PE(i){return i?(i=Ms,i):Ms}function VE(i,s,c,h,p,_){p=PE(p),h.context===null?h.context=p:h.pendingContext=p,h=Fi(s),h.payload={element:c},_=_===void 0?null:_,_!==null&&(h.callback=_),c=Gi(i,h,s),c!==null&&(En(c,i,s),Rl(c,i,s))}function BE(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Fp(i,s){BE(i,s),(i=i.alternate)&&BE(i,s)}function zE(i){if(i.tag===13){var s=ji(i,67108864);s!==null&&En(s,i,67108864),Fp(i,67108864)}}var xd=!0;function KL(i,s,c,h){var p=B.T;B.T=null;var _=re.p;try{re.p=2,Gp(i,s,c,h)}finally{re.p=_,B.T=p}}function WL(i,s,c,h){var p=B.T;B.T=null;var _=re.p;try{re.p=8,Gp(i,s,c,h)}finally{re.p=_,B.T=p}}function Gp(i,s,c,h){if(xd){var p=$p(h);if(p===null)Dp(i,s,h,Ed,c),HE(i,h);else if(ZL(p,i,s,c,h))h.stopPropagation();else if(HE(i,h),s&4&&-1<YL.indexOf(i)){for(;p!==null;){var _=As(p);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var C=Oa(_.pendingLanes);if(C!==0){var k=_;for(k.pendingLanes|=2,k.entangledLanes|=2;C;){var j=1<<31-_n(C);k.entanglements[1]|=j,C&=~j}jr(_),(wt&6)===0&&(ad=be()+500,Bl(0))}}break;case 13:k=ji(_,2),k!==null&&En(k,_,2),ld(),Fp(_,2)}if(_=$p(h),_===null&&Dp(i,s,h,Ed,c),_===p)break;p=_}p!==null&&h.stopPropagation()}else Dp(i,s,h,null,c)}}function $p(i){return i=Xh(i),qp(i)}var Ed=null;function qp(i){if(Ed=null,i=Da(i),i!==null){var s=q(i);if(s===null)i=null;else{var c=s.tag;if(c===13){if(i=ge(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Ed=i,null}function UE(i){switch(i){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(_e()){case Pe:return 2;case ct:return 8;case ht:case Rn:return 32;case ka:return 268435456;default:return 32}default:return 32}}var Kp=!1,Xi=null,Qi=null,Ji=null,ql=new Map,Kl=new Map,ea=[],YL="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".split(" ");function HE(i,s){switch(i){case"focusin":case"focusout":Xi=null;break;case"dragenter":case"dragleave":Qi=null;break;case"mouseover":case"mouseout":Ji=null;break;case"pointerover":case"pointerout":ql.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kl.delete(s.pointerId)}}function Wl(i,s,c,h,p,_){return i===null||i.nativeEvent!==_?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:_,targetContainers:[p]},s!==null&&(s=As(s),s!==null&&zE(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,p!==null&&s.indexOf(p)===-1&&s.push(p),i)}function ZL(i,s,c,h,p){switch(s){case"focusin":return Xi=Wl(Xi,i,s,c,h,p),!0;case"dragenter":return Qi=Wl(Qi,i,s,c,h,p),!0;case"mouseover":return Ji=Wl(Ji,i,s,c,h,p),!0;case"pointerover":var _=p.pointerId;return ql.set(_,Wl(ql.get(_)||null,i,s,c,h,p)),!0;case"gotpointercapture":return _=p.pointerId,Kl.set(_,Wl(Kl.get(_)||null,i,s,c,h,p)),!0}return!1}function FE(i){var s=Da(i.target);if(s!==null){var c=q(s);if(c!==null){if(s=c.tag,s===13){if(s=ge(c),s!==null){i.blockedOn=s,GD(i.priority,function(){if(c.tag===13){var h=Bn(),p=ji(c,h);p!==null&&En(p,c,h),Fp(c,h)}});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Sd(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=$p(i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Zh=h,c.target.dispatchEvent(h),Zh=null}else return s=As(c),s!==null&&zE(s),i.blockedOn=c,!1;s.shift()}return!0}function GE(i,s,c){Sd(i)&&c.delete(s)}function XL(){Kp=!1,Xi!==null&&Sd(Xi)&&(Xi=null),Qi!==null&&Sd(Qi)&&(Qi=null),Ji!==null&&Sd(Ji)&&(Ji=null),ql.forEach(GE),Kl.forEach(GE)}function Ad(i,s){i.blockedOn===s&&(i.blockedOn=null,Kp||(Kp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,XL)))}var wd=null;function $E(i){wd!==i&&(wd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){wd===i&&(wd=null);for(var s=0;s<i.length;s+=3){var c=i[s],h=i[s+1],p=i[s+2];if(typeof h!="function"){if(qp(h||c)===null)continue;break}var _=As(c);_!==null&&(i.splice(s,3),s-=3,jm(_,{pending:!0,data:p,method:c.method,action:h},h,p))}}))}function Yl(i){function s(j){return Ad(j,i)}Xi!==null&&Ad(Xi,i),Qi!==null&&Ad(Qi,i),Ji!==null&&Ad(Ji,i),ql.forEach(s),Kl.forEach(s);for(var c=0;c<ea.length;c++){var h=ea[c];h.blockedOn===i&&(h.blockedOn=null)}for(;0<ea.length&&(c=ea[0],c.blockedOn===null);)FE(c),c.blockedOn===null&&ea.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var p=c[h],_=c[h+1],C=p[Nn]||null;if(typeof _=="function")C||$E(c);else if(C){var k=null;if(_&&_.hasAttribute("formAction")){if(p=_,C=_[Nn]||null)k=C.formAction;else if(qp(p)!==null)continue}else k=C.action;typeof k=="function"?c[h+1]=k:(c.splice(h,3),h-=3),$E(c)}}}function Wp(i){this._internalRoot=i}Td.prototype.render=Wp.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=Bn();VE(c,h,i,s,null,null)},Td.prototype.unmount=Wp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;i.tag===0&&Qs(),VE(i.current,2,null,i,null,null),ld(),s[Ss]=null}};function Td(i){this._internalRoot=i}Td.prototype.unstable_scheduleHydration=function(i){if(i){var s=b_();i={blockedOn:null,target:i,priority:s};for(var c=0;c<ea.length&&s!==0&&s<ea[c].priority;c++);ea.splice(c,0,i),c===0&&FE(i)}};var qE=t.version;if(qE!=="19.0.0")throw Error(r(527,qE,"19.0.0"));re.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=X(s),i=i!==null?H(i):null,i=i===null?null:i.stateNode,i};var QL={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:B,findFiberByHostInstance:Da,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cd.isDisabled&&Cd.supportsFiber)try{ei=Cd.inject(QL),rn=Cd}catch{}}return Xl.createRoot=function(i,s){if(!a(i))throw Error(r(299));var c=!1,h="",p=cx,_=ux,C=dx,k=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(k=s.unstable_transitionCallbacks)),s=jE(i,1,!1,null,null,c,h,p,_,C,k,null),i[Ss]=s.current,Op(i.nodeType===8?i.parentNode:i),new Wp(s)},Xl.hydrateRoot=function(i,s,c){if(!a(i))throw Error(r(299));var h=!1,p="",_=cx,C=ux,k=dx,j=null,$=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(p=c.identifierPrefix),c.onUncaughtError!==void 0&&(_=c.onUncaughtError),c.onCaughtError!==void 0&&(C=c.onCaughtError),c.onRecoverableError!==void 0&&(k=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(j=c.unstable_transitionCallbacks),c.formState!==void 0&&($=c.formState)),s=jE(i,1,!0,s,c??null,h,p,_,C,k,j,$),s.context=PE(null),c=s.current,h=Bn(),p=Fi(h),p.callback=null,Gi(c,p,h),s.current.lanes=h,nl(s,h),jr(s),i[Ss]=s.current,Op(i),new Td(s)},Xl.version="19.0.0",Xl}var nS;function uM(){if(nS)return Xp.exports;nS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Xp.exports=cM(),Xp.exports}var dM=uM();const fM={locales:["en","en-GB","fr","es","de","ja","ko","zh","it","pt","hi","ar","ru"],defaultLocale:"en"},hM={cookieName:"INTLAYER_LOCALE",prefixDefault:!1},mM={applicationURL:"http://localhost:5173/",editorURL:"http://localhost:8000",cmsURL:"https://intlayer.org",backendURL:"https://back.intlayer.org",port:8e3,enabled:!0,dictionaryPriorityStrategy:"local_first",hotReload:!1},tt={internationalization:fM,middleware:hM,editor:mM};var V=(e=>(e.AFRIKAANS="af",e.AFRIKAANS_SOUTH_AFRICA="af-ZA",e.ARABIC="ar",e.ARABIC_UNITED_ARAB_EMIRATES="ar-AE",e.ARABIC_BAHRAIN="ar-BH",e.ARABIC_ALGERIA="ar-DZ",e.ARABIC_EGYPT="ar-EG",e.ARABIC_IRAQ="ar-IQ",e.ARABIC_JORDAN="ar-JO",e.ARABIC_KUWAIT="ar-KW",e.ARABIC_LEBANON="ar-LB",e.ARABIC_LIBYA="ar-LY",e.ARABIC_MOROCCO="ar-MA",e.ARABIC_OMAN="ar-OM",e.ARABIC_QATAR="ar-QA",e.ARABIC_SAUDI_ARABIA="ar-SA",e.ARABIC_SYRIA="ar-SY",e.ARABIC_TUNISIA="ar-TN",e.ARABIC_YEMEN="ar-YE",e.AZERI_LATIN="az",e.AZERI_LATIN_AZERBAIJAN="az-AZ",e.BELARUSIAN="be",e.BELARUSIAN_BELARUS="be-BY",e.BULGARIAN="bg",e.BULGARIAN_BULGARIA="bg-BG",e.BOSNIAN="bs",e.BOSNIAN_BOSNIA_AND_HERZEGOVINA="bs-BA",e.CATALAN="ca",e.CATALAN_SPAIN="ca-ES",e.CZECH="cs",e.CZECH_CZECH_REPUBLIC="cs-CZ",e.WELSH="cy",e.WELSH_UNITED_KINGDOM="cy-GB",e.DANISH="da",e.DANISH_DENMARK="da-DK",e.GERMAN="de",e.GERMAN_AUSTRIA="de-AT",e.GERMAN_SWITZERLAND="de-CH",e.GERMAN_GERMANY="de-DE",e.GERMAN_LIECHTENSTEIN="de-LI",e.GERMAN_LUXEMBOURG="de-LU",e.DIVEHI="dv",e.DIVEHI_MALDIVES="dv-MV",e.GREEK="el",e.GREEK_GREECE="el-GR",e.ENGLISH="en",e.ENGLISH_AUSTRALIA="en-AU",e.ENGLISH_BELIZE="en-BZ",e.ENGLISH_CANADA="en-CA",e.ENGLISH_CARIBBEAN="en-CB",e.ENGLISH_UNITED_KINGDOM="en-GB",e.ENGLISH_IRELAND="en-IE",e.ENGLISH_JAMAICA="en-JM",e.ENGLISH_NEW_ZEALAND="en-NZ",e.ENGLISH_PHILIPPINES="en-PH",e.ENGLISH_TRINIDAD_AND_TOBAGO="en-TT",e.ENGLISH_UNITED_STATES="en-US",e.ENGLISH_SOUTH_AFRICA="en-ZA",e.ENGLISH_ZIMBABWE="en-ZW",e.ESPERANTO="eo",e.SPANISH="es",e.SPANISH_ARGENTINA="es-AR",e.SPANISH_BOLIVIA="es-BO",e.SPANISH_CHILE="es-CL",e.SPANISH_COLOMBIA="es-CO",e.SPANISH_COSTA_RICA="es-CR",e.SPANISH_DOMINICAN_REPUBLIC="es-DO",e.SPANISH_ECUADOR="es-EC",e.SPANISH_SPAIN="es-ES",e.SPANISH_GUATEMALA="es-GT",e.SPANISH_HONDURAS="es-HN",e.SPANISH_MEXICO="es-MX",e.SPANISH_NICARAGUA="es-NI",e.SPANISH_PANAMA="es-PA",e.SPANISH_PERU="es-PE",e.SPANISH_PUERTO_RICO="es-PR",e.SPANISH_PARAGUAY="es-PY",e.SPANISH_EL_SALVADOR="es-SV",e.SPANISH_URUGUAY="es-UY",e.SPANISH_VENEZUELA="es-VE",e.ESTONIAN="et",e.ESTONIAN_ESTONIA="et-EE",e.BASQUE="eu",e.BASQUE_SPAIN="eu-ES",e.FARSI="fa",e.FARSI_IRAN="fa-IR",e.FINNISH="fi",e.FINNISH_FINLAND="fi-FI",e.FAROESE="fo",e.FAROESE_FAROE_ISLANDS="fo-FO",e.FRENCH="fr",e.FRENCH_BELGIUM="fr-BE",e.FRENCH_CANADA="fr-CA",e.FRENCH_SWITZERLAND="fr-CH",e.FRENCH_FRANCE="fr-FR",e.FRENCH_LUXEMBOURG="fr-LU",e.FRENCH_PRINCIPALITY_OF_MONACO="fr-MC",e.GALICIAN="gl",e.GALICIAN_SPAIN="gl-ES",e.GUJARATI="gu",e.GUJARATI_INDIA="gu-IN",e.HEBREW="he",e.HEBREW_ISRAEL="he-IL",e.HINDI="hi",e.HINDI_INDIA="hi-IN",e.CROATIAN="hr",e.CROATIAN_BOSNIA_AND_HERZEGOVINA="hr-BA",e.CROATIAN_CROATIA="hr-HR",e.HUNGARIAN="hu",e.HUNGARIAN_HUNGARY="hu-HU",e.ARMENIAN="hy",e.ARMENIAN_ARMENIA="hy-AM",e.INDONESIAN="id",e.INDONESIAN_INDONESIA="id-ID",e.ICELANDIC="is",e.ICELANDIC_ICELAND="is-IS",e.ITALIAN="it",e.ITALIAN_SWITZERLAND="it-CH",e.ITALIAN_ITALY="it-IT",e.JAPANESE="ja",e.JAPANESE_JAPAN="ja-JP",e.GEORGIAN="ka",e.GEORGIAN_GEORGIA="ka-GE",e.KAZAKH="kk",e.KAZAKH_KAZAKHSTAN="kk-KZ",e.KANNADA="kn",e.KANNADA_INDIA="kn-IN",e.KOREAN="ko",e.KOREAN_KOREA="ko-KR",e.KONKANI="kok",e.KONKANI_INDIA="kok-IN",e.KYRGYZ="ky",e.KYRGYZ_KYRGYZSTAN="ky-KG",e.LITHUANIAN="lt",e.LITHUANIAN_LITHUANIA="lt-LT",e.LATVIAN="lv",e.LATVIAN_LATVIA="lv-LV",e.MAORI="mi",e.MAORI_NEW_ZEALAND="mi-NZ",e.FYRO_MACEDONIAN="mk",e.FYRO_MACEDONIAN_MACEDONIA="mk-MK",e.MONGOLIAN="mn",e.MONGOLIAN_MONGOLIA="mn-MN",e.MARATHI="mr",e.MARATHI_INDIA="mr-IN",e.MALAY="ms",e.MALAY_BRUNEI_DARUSSALAM="ms-BN",e.MALAY_MALAYSIA="ms-MY",e.MALTESE="mt",e.MALTESE_MALTA="mt-MT",e.NORWEGIAN_BOKMAL="nb",e.NORWEGIAN_BOKMAL_NORWAY="nb-NO",e.DUTCH="nl",e.DUTCH_BELGIUM="nl-BE",e.DUTCH_NETHERLANDS="nl-NL",e.NORWEGIAN_NYNORSK_NORWAY="nn-NO",e.NORTHERN_SOTHO="ns",e.NORTHERN_SOTHO_SOUTH_AFRICA="ns-ZA",e.PUNJABI="pa",e.PUNJABI_INDIA="pa-IN",e.POLISH="pl",e.POLISH_POLAND="pl-PL",e.PASHTO="ps",e.PASHTO_AFGHANISTAN="ps-AR",e.PORTUGUESE="pt",e.PORTUGUESE_BRAZIL="pt-BR",e.PORTUGUESE_PORTUGAL="pt-PT",e.QUECHUA="qu",e.QUECHUA_BOLIVIA="qu-BO",e.QUECHUA_ECUADOR="qu-EC",e.QUECHUA_PERU="qu-PE",e.ROMANIAN="ro",e.ROMANIAN_ROMANIA="ro-RO",e.RUSSIAN="ru",e.RUSSIAN_RUSSIA="ru-RU",e.SANSKRIT="sa",e.SANSKRIT_INDIA="sa-IN",e.SAMI_NORTHERN="se",e.SAMI_NORTHERN_FINLAND="se-FI",e.SAMI_NORTHERN_NORWAY="se-NO",e.SAMI_NORTHERN_SWEDEN="se-SE",e.SLOVAK="sk",e.SLOVAK_SLOVAKIA="sk-SK",e.SLOVENIAN="sl",e.SLOVENIAN_SLOVENIA="sl-SI",e.ALBANIAN="sq",e.ALBANIAN_ALBANIA="sq-AL",e.SERBIAN_LATIN="sr",e.SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA="sr-BA",e.SERBIAN_LATIN_SERBIA_AND_MONTENEGRO="sr-SP",e.SWEDISH="sv",e.SWEDISH_FINLAND="sv-FI",e.SWEDISH_SWEDEN="sv-SE",e.SWAHILI="sw",e.SWAHILI_KENYA="sw-KE",e.SYRIAC="syr",e.SYRIAC_SYRIA="syr-SY",e.TAMIL="ta",e.TAMIL_INDIA="ta-IN",e.TELUGU="te",e.TELUGU_INDIA="te-IN",e.THAI="th",e.THAI_THAILAND="th-TH",e.TAGALOG="tl",e.TAGALOG_PHILIPPINES="tl-PH",e.TSWANA="tn",e.TSWANA_SOUTH_AFRICA="tn-ZA",e.TURKISH="tr",e.TURKISH_TURKEY="tr-TR",e.TATAR="tt",e.TATAR_RUSSIA="tt-RU",e.TSOGA="ts",e.UKRAINIAN="uk",e.UKRAINIAN_UKRAINE="uk-UA",e.URDU="ur",e.URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN="ur-PK",e.UZBEK_LATIN="uz",e.UZBEK_LATIN_UZBEKISTAN="uz-UZ",e.VIETNAMESE="vi",e.VIETNAMESE_VIET_NAM="vi-VN",e.XHOSA="xh",e.XHOSA_SOUTH_AFRICA="xh-ZA",e.CHINESE="zh",e.CHINESE_SIMPLIFIED="zh-Hans",e.CHINESE_SIMPLIFIED_CHINA="zh-CN",e.CHINESE_HONG_KONG="zh-HK",e.CHINESE_MACAU="zh-MO",e.CHINESE_SINGAPORE="zh-SG",e.CHINESE_TRADITIONAL="zh-Hant",e.ZULU="zu",e.ZULU_SOUTH_AFRICA="zu-ZA",e))(V||{}),K=(e=>(e.Translation="translation",e.Enumeration="enumeration",e.Condition="condition",e.Insertion="insertion",e.File="file",e.Object="object",e.Array="array",e.Nested="nested",e.ReactNode="reactNode",e.Markdown="markdown",e.Text="text",e.Number="number",e.Boolean="boolean",e.Unknown="unknown",e))(K||{});const pM=(e,t,n)=>({...n,nodeType:e,[e]:t}),rS=(e,t,n)=>{let r=e,a=null,o=[];if(t.length===0)return n;for(let l=0;l<t.length;l++){const u=t[l];if(a=r,(u.type===K.Object||u.type===K.Array)&&(o=[u.key],(!r[u.key]||typeof r[u.key]!="object")&&(r[u.key]={}),r=r[u.key]),(u.type===K.Translation||u.type===K.Enumeration)&&(o=[u.type,u.key],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]={}),(!r[u.type][u.key]||typeof r[u.type][u.key]!="object")&&(r[u.type][u.key]={}),r=r[u.type][u.key]),(u.type===K.Enumeration||u.type===K.Condition)&&(o=[u.type,u.key],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]={}),(!r[u.type][u.key]||typeof r[u.type][u.key]!="object")&&(r[u.type][u.key]={}),r=r[u.type][u.key]),(u.type===K.Markdown||u.type===K.Insertion)&&(o=[u.type],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]=""),r=r[u.type]),u.type===K.File&&(o=["content"],r=r.content),u.type&&(r=r),l===t.length-1&&a&&o.length>0){let d=a;for(const f of o.slice(0,-1))d=d[f];typeof n>"u"?delete d[o[o.length-1]]:d[o[o.length-1]]=n}}return e},Hr=(e,t)=>{let n=structuredClone(e);for(const r of t)r.type===K.Object||r.type===K.Array?n=n==null?void 0:n[r.key]:r.type===K.Translation||r.type===K.Condition||r.type===K.Enumeration?n=n==null?void 0:n[r.type][r.key]:(r.type===K.Markdown||r.type===K.Insertion||r.type===K.File)&&(n=n==null?void 0:n[r.type]);return n},FT=e=>{if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof(e==null?void 0:e.nodeType)=="string"){const t=e,n=t[t.nodeType];if(t.nodeType===K.Translation||t.nodeType===K.Enumeration||t.nodeType===K.Condition||t.nodeType===K.Insertion||t.nodeType===K.File){const r=Object.keys(n)[0];return n[r]}return t.nodeType===K.Nested?void 0:n}return!e||typeof e!="object"?e:Array.isArray(e)?e[0]:e},gM=(e,t,n)=>{let r=e,a=null,o=null;for(const l of n)a=r,(l.type===K.Object||l.type===K.Array)&&(o=l.key,r=r[l.key]),(l.type===K.Translation||l.type===K.Enumeration||l.type===K.Condition)&&(o=l.type,r=r[l.type][l.key]),(l.type===K.Markdown||l.type===K.ReactNode||l.type===K.Insertion||l.type===K.File)&&(o=l.type,r=r[l.type]);if(a&&o!==null)if(Array.isArray(a))a[o]=r;else{const l={};for(const u of Object.keys(a))u===o&&typeof t<"u"?l[t]=r:l[u]=a[u];Object.keys(a).forEach(u=>delete a[u]),Object.assign(a,l)}return e},yM=e=>typeof e=="object"&&typeof(e==null?void 0:e.key)<"u"&&typeof(e==null?void 0:e.props)<"u",Vo=e=>typeof e=="string"?K.Text:typeof(e==null?void 0:e.nodeType)=="string"?e.nodeType:Array.isArray(e)?K.Array:yM(e)?K.ReactNode:typeof e=="number"?K.Number:typeof e=="boolean"?K.Boolean:e&&typeof e=="object"?K.Object:K.Unknown,Ql=(e,t,n)=>{const r=structuredClone(n);switch(e){case K.Translation:return{nodeType:K.Translation,[K.Translation]:Object.assign({},...t.map(a=>({[a]:structuredClone(r)??""})))};case K.Enumeration:return{nodeType:K.Enumeration,[K.Enumeration]:{1:r??""}};case K.Condition:return{nodeType:K.Condition,[K.Condition]:{true:r??"",false:r??""}};case K.Insertion:return{nodeType:K.Insertion,[K.Insertion]:{insertion:r??""}};case K.Nested:return{nodeType:K.Nested,[K.Nested]:{dictionaryKey:""}};case K.Markdown:return{nodeType:K.Markdown,[K.Markdown]:r??""};case K.File:return{nodeType:K.File,[K.File]:r??""};case K.Object:return{newKey:r??""};case K.Array:return[r??""];case K.Text:return r??"";case K.Number:return r??0;case K.Boolean:return r??!0;default:return r??""}},cr=e=>{if(typeof e=="string")return"";if(typeof e=="number")return 0;if(typeof e=="boolean")return!0;if(typeof(e==null?void 0:e.nodeType)=="string"){const r=e,a=r[r.nodeType];return r.nodeType===K.Translation||r.nodeType===K.Enumeration||r.nodeType===K.Condition||r.nodeType===K.Insertion?cr(a):r.nodeType===K.Nested?"dictionary-key":r.nodeType===K.File?"file/path":r.nodeType===K.Markdown?cr(r):a}if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(cr);const t=Object.entries(e).map(([r,a])=>[r,cr(a)]);return Object.fromEntries(t)},Jd=(e,t)=>{for(const r of t.plugins??[])if(r.canHandle(e))return r.transform(e,t,(a,o)=>Jd(a,o));if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map((r,a)=>{const o={...t,children:r,keyPath:[...t.keyPath,{type:K.Array,key:a}]};return Jd(r,o)});const n={};for(const r in e){const a={...t,children:e[r],keyPath:[...t.keyPath,{type:K.Object,key:r}]};n[r]=Jd(e[r],a)}return n},vM=(e,t)=>{const n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},bM=(e,t)=>{const n=Object.keys(e);for(const r of n){const a=!r.startsWith(">")&&!r.startsWith("<")&&!r.startsWith("=")&&parseFloat(r)===t||r.startsWith("=")&&parseFloat(r.slice(1))===t,o=r.startsWith(">")&&t>parseFloat(r.slice(1)),l=r.startsWith(">=")&&t>=parseFloat(r.slice(2)),u=r.startsWith("<")&&t<parseFloat(r.slice(1)),d=r.startsWith("<=")&&t<=parseFloat(r.slice(2));if(a||o||l||u||d)return r}},_M=(e,t)=>{const n=bM(e,t)??"fallback";return e[n]},xM=(e,t)=>e.replace(/\{\{(.*?)\}\}/g,(n,r)=>(t[r]??"").toString()),iS={},GT=(e,t,n)=>{const r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return wv(e.content,r,t)},EM=(e,t,n)=>{const r=iS[e];if(!r)throw new Error(`Dictionary ${e} not found`,iS);return GT(r,t,n)},SM=(e,t,n)=>{const r=EM(e,n==null?void 0:n.locale,n==null?void 0:n.plugins);if(typeof t=="string"){const a=t.split(".");let o=r;for(const l of a)if(o=o==null?void 0:o[l],o===void 0)return r;return o}return r},AM=(e,t,n=!0)=>{const{defaultLocale:r}=tt==null?void 0:tt.internationalization;let a=e[t??r];return n&&!a&&(a=e[r]),a},wM=(e,t=!0)=>({id:"translation-plugin",canHandle:n=>typeof n=="object"&&(n==null?void 0:n.nodeType)===K.Translation,transform:(n,r,a)=>{const o=structuredClone(n[K.Translation]);for(const l in o){const u={...r,children:o[l],keyPath:[...r.keyPath,{type:K.Translation,key:l}]};o[l]=a(o[l],u)}return AM(o,e,t)}}),TM={id:"enumeration-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Enumeration,transform:(e,t,n)=>{const r=structuredClone(e[K.Enumeration]);for(const a in r){const o=r[a],l={...t,children:o,keyPath:[...t.keyPath,{type:K.Enumeration,key:a}]};r[a]=n(o,l)}return a=>_M(r,a)}},CM={id:"condition-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Condition,transform:(e,t,n)=>{const r=structuredClone(e[K.Condition]);for(const a in r){const o=r[a],l={...t,children:o,keyPath:[...t.keyPath,{type:K.Condition,key:a}]};r[a]=n(o,l)}return a=>vM(r,a)}},RM={id:"insertion-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Insertion,transform:(e,t,n)=>{const r=[...t.keyPath,{type:K.Insertion}],a=e[K.Insertion];return n(a,{...t,children:a,keyPath:r,plugins:[{id:"insertion-string-plugin",canHandle:l=>typeof l=="string",transform:(l,u,d)=>{const f=d(l,{...u,children:l,plugins:[...(t.plugins??[]).filter(m=>m.id!=="intlayer-node-plugin")]});return m=>{const y=xM(f,m);return d(y,{...u,plugins:t.plugins,children:y})}}},...t.plugins??[]]})}},NM={id:"nested-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Nested,transform:(e,t)=>SM(e.nested.dictionaryKey,e.nested.path,t)},kM={id:"file-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.File,transform:(e,t,n)=>n(e.content,{...t,children:e.content})},wv=(e,t,n=tt.internationalization.defaultLocale)=>{const r=[RM,wM(n),TM,CM,NM,kM,...t.plugins??[]];return Jd(e,{...t,plugins:r})},aS={method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"},OM=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),Rd=e=>e.reduce((t,n)=>{const r=t??{},a=OM(n??{});return typeof r=="object"&&typeof a=="object"?{...r,...a}:a??r},{}),Oe=async(e,...t)=>{const{signal:n}=new AbortController;let r="",a;const o=t.map(({body:v,params:x,headers:S,...A})=>A),l=Rd([aS,...o]),u=Rd([aS.headers,...t.map(v=>v.headers)]),d=Rd(t.map(v=>v.params)),f=l.method;if(f!=="GET"&&f!=="HEAD"){const v=Rd(t.map(x=>x.body));(u==null?void 0:u["Content-Type"])==="application/x-www-form-urlencoded"?a=new URLSearchParams(v).toString():a=JSON.stringify(v)}Object.entries(d).length>0&&(r=`?${new URLSearchParams(d).toString()}`);const m={...l,headers:u,body:a,signal:n},y=`${e}${r}`,g=await fetch(y,m);if(!g.ok){const v=await g.json();throw new Error(JSON.stringify(v.error)??"An error occurred")}return await g.json()},DM=(e={},t)=>{var N,L;const n=((N=t==null?void 0:t.editor)==null?void 0:N.backendURL)??((L=tt.editor)==null?void 0:L.backendURL),{clientId:r,clientSecret:a}=(t==null?void 0:t.editor)??{};if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const o=`${n}/api/auth`;return{login:async(O,M={})=>await Oe(`${o}/login`,e,M,{method:"POST",body:O}),getLoginWithGitHubURL:O=>{const M=new URLSearchParams(O);return`${o}/login/github?${M.toString()}`},getLoginWithGoogleURL:O=>{const M=new URLSearchParams(O);return`${o}/login/google?${M.toString()}`},register:async(O,M={},B={})=>await Oe(`${o}/register`,e,B,{method:"POST",body:O,params:M}),logout:async(O={})=>await Oe(`${o}/logout`,e,O,{method:"POST"}),defineNewPassword:async(O,M={})=>await Oe(`${o}/password/define`,e,M,{method:"POST",body:O}),askResetPassword:async(O,M={})=>await Oe(`${o}/password/reset`,e,M,{method:"POST",body:{email:O}}),checkIfUserHasPassword:async(O={})=>await Oe(`${o}/password/has`,e,O,{method:"GET"}),verifyEmail:async({userId:O,secret:M},B={})=>await Oe(`${o}/active/${O}/${M}`,e,B,{method:"PUT"}),getVerifyEmailStatusURL:O=>`${o}/verify-email-status/${String(O)}`,changePassword:async(O,M={})=>await Oe(`${o}/password`,e,M,{method:"PUT",body:O}),createSession:async(O,M={})=>await Oe(`${o}/session`,e,M,{method:"POST",body:O}),getSession:async(O,M={})=>await Oe(`${n}/session`,e,M,{params:{session_token:O}}),getCSRFToken:async(O={})=>await Oe(`${n}/csrf-token`,e,O),getOAuth2AccessToken:async(O={})=>await Oe(`${n}/oauth2/token`,e,O,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:{grant_type:"client_credentials",client_id:r,client_secret:a}})}},IM=(e={},t)=>{var y,g;const n=((y=t==null?void 0:t.editor)==null?void 0:y.backendURL)??((g=tt.editor)==null?void 0:g.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/dictionary`;return{getDictionaries:async(v,x={})=>await Oe(r,e,x,{params:v}),getDictionariesKeys:async(v={})=>await Oe(`${r}/keys`,e,v),getDictionary:async(v,x,S={})=>await Oe(`${r}/${v}`,e,S,{params:x?{version:x.toString()}:void 0}),pushDictionaries:async(v,x={})=>await Oe(`${r}`,e,x,{method:"PATCH",body:{dictionaries:v}}),addDictionary:async(v,x={})=>await Oe(`${r}`,e,x,{method:"POST",body:v}),updateDictionary:async(v,x,S={})=>await Oe(`${r}/${v}`,e,S,{method:"PUT",body:x}),deleteDictionary:async(v,x={})=>await Oe(`${r}/${v}`,e,x,{method:"DELETE"})}},LM=(e={},t)=>{var y,g;const n=((y=t==null?void 0:t.editor)==null?void 0:y.backendURL)??((g=tt.editor)==null?void 0:g.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/ai`;return{translateJSON:async(v,x={})=>await Oe(`${r}/translate/json`,e,x,{method:"POST",body:v}),auditContentDeclaration:async(v,x={})=>await Oe(`${r}/audit/dictionary`,e,x,{method:"POST",body:v}),auditContentDeclarationField:async(v,x={})=>await Oe(`${r}/audit/dictionary/field`,e,x,{method:"POST",body:v}),auditContentDeclarationMetadata:async(v,x={})=>await Oe(`${r}/audit/dictionary/metadata`,e,x,{method:"POST",body:v}),auditTag:async(v,x={})=>await Oe(`${r}/audit/tag`,e,x,{method:"POST",body:v}),askDocQuestion:async(v,x={})=>{var R;if(!v)return;const{onMessage:S,onDone:A,...w}=v,T=new AbortController;try{const D=await fetch(`${r}/ask`,{method:"POST",headers:{"Content-Type":"application/json",...e.headers,...x.headers},body:JSON.stringify(w),signal:T.signal});if(!D.ok){const M=await D.json().catch(()=>({}));throw new Error(M.message||"Failed to fetch response")}const N=(R=D.body)==null?void 0:R.getReader();if(!N)throw new Error("No reader available");const L=new TextDecoder;let O="";for(;;){const{done:M,value:B}=await N.read();if(M)break;O+=L.decode(B,{stream:!0});const U=O.split(`
51
+ `);O=U.pop()??"";for(const ue of U)if(ue.startsWith("data: "))try{const ie=JSON.parse(ue.slice(6));ie.chunk&&(S==null||S(ie.chunk)),ie.done&&ie.response&&(A==null||A(ie.response))}catch(ie){console.error("Failed to parse SSE data:",ie)}}}catch(D){throw console.error("Error in askDocQuestion:",D),D}},autocomplete:async(v,x={})=>await Oe(`${r}/autocomplete`,e,x,{method:"POST",body:v})}},MM=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.editorURL)??((d=tt.editor)==null?void 0:d.editorURL);if(!n)throw new Error("Editor URL is not defined in the Intlayer configuration.");const r=`${n}/api`;return{getDictionaries:async(f={})=>(await Oe(`${r}/dictionary`,e,f)).data,getConfiguration:async(f={})=>(await Oe(`${r}/config`,e,f)).data,writeDictionary:async(f,m={})=>await Oe(`${r}/dictionary`,e,m,{method:"POST",body:{dictionary:f}})}},jM=(e={},t)=>{var v,x;const n=((v=t==null?void 0:t.editor)==null?void 0:v.backendURL)??((x=tt.editor)==null?void 0:x.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration--.");const r=`${n}/api/organization`;return{getOrganizations:async(S,A={})=>await Oe(r,e,A,{params:S}),getOrganization:async(S,A={})=>await Oe(`${r}/${String(S)}`,e,A),addOrganization:async(S,A={})=>await Oe(r,e,A,{method:"POST",body:S}),addOrganizationMember:async(S,A={})=>Oe(`${r}/member`,e,A,{method:"POST",body:S}),updateOrganization:async(S,A={})=>Oe(r,e,A,{method:"PUT",body:S}),updateOrganizationMembers:async(S,A={})=>Oe(`${r}/members`,e,A,{method:"PUT",body:S}),deleteOrganization:async(S={})=>await Oe(r,e,S,{method:"DELETE"}),selectOrganization:async(S,A={})=>await Oe(`${r}/${String(S)}`,e,A,{method:"PUT"}),unselectOrganization:async(S={})=>await Oe(`${r}/logout`,e,S,{method:"POST"})}},PM=(e={},t)=>{var S,A;const n=((S=t==null?void 0:t.editor)==null?void 0:S.backendURL)??((A=tt.editor)==null?void 0:A.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/project`;return{getProjects:async(w,T={})=>await Oe(r,e,T,{params:w}),addProject:async(w,T={})=>await Oe(`${r}`,e,T,{method:"POST",body:w}),updateProject:async(w,T={})=>await Oe(`${r}`,e,T,{method:"PUT",body:w}),updateProjectMembers:async(w,T={})=>await Oe(`${r}/members`,e,T,{method:"PUT",body:w}),pushProjectConfiguration:async(w,T={})=>await Oe(`${r}/configuration`,e,T,{method:"PUT",body:w}),deleteProject:async(w={})=>await Oe(`${r}`,e,w,{method:"DELETE"}),selectProject:async(w,T={})=>await Oe(`${r}/${String(w)}`,e,T,{method:"PUT"}),unselectProject:async(w={})=>await Oe(`${r}/logout`,e,w,{method:"POST"}),addNewAccessKey:async(w,T={})=>await Oe(`${r}/access_key`,e,T,{method:"POST",body:w}),deleteAccessKey:async(w,T={})=>await Oe(`${r}/access_key`,e,T,{method:"DELETE",body:{clientId:w}}),refreshAccessKey:async(w,T={})=>await Oe(`${r}/access_key`,e,T,{method:"PATCH",body:{clientId:w}})}},VM=(e={},t)=>{var o,l;const n=((o=t==null?void 0:t.editor)==null?void 0:o.backendURL)??((l=tt.editor)==null?void 0:l.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/search`;return{searchDoc:async(u,d={})=>await Oe(`${r}/doc`,e,d,{method:"GET",params:u})}},BM=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.backendURL)??((d=tt.editor)==null?void 0:d.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/stripe`;return{getPricing:async(f,m={})=>await Oe(`${r}/pricing`,e,m,{method:"POST",body:f}),getSubscription:async(f,m={})=>await Oe(`${r}/create-subscription`,e,m,{method:"POST",body:f}),cancelSubscription:async(f={})=>await Oe(`${r}/cancel-subscription`,e,f,{method:"POST"})}},zM=(e={},t)=>{var d,f;const n=((d=t==null?void 0:t.editor)==null?void 0:d.backendURL)??((f=tt.editor)==null?void 0:f.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/tag`;return{getTags:async(m,y={})=>await Oe(r,e,y,{params:m}),addTag:async(m,y={})=>await Oe(`${r}`,e,y,{method:"POST",body:m}),updateTag:async(m,y,g={})=>await Oe(`${r}/${m}`,e,g,{method:"PUT",body:y}),deleteTag:async(m,y={})=>await Oe(`${r}/${m}`,e,y,{method:"DELETE"})}},UM=(e={},t)=>{var y,g;const n=((y=t==null?void 0:t.editor)==null?void 0:y.backendURL)??((g=tt.editor)==null?void 0:g.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/user`;return{createUser:async(v,x={})=>await Oe(`${r}/`,e,x,{method:"POST",body:v}),getUsers:async(v,x={})=>await Oe(r,e,x,{params:v}),getUserById:async(v,x={})=>await Oe(`${r}/${v}`,e,x),getUserByAccount:async(v,x,S={})=>await Oe(`${r}/account/${x}/${v}`,e,S),getUserByEmail:async(v,x={})=>await Oe(`${r}/email/${v}`,e,x),updateUser:async(v,x={})=>await Oe(`${r}`,e,x,{method:"PUT",body:v}),deleteUser:async(v,x={})=>await Oe(`${r}/${v}`,e,x,{method:"DELETE"})}},sh=(e={},t)=>({organization:jM(e,t),project:PM(e,t),user:UM(e,t),auth:DM(e,t),dictionary:IM(e,t),stripe:BM(e,t),ai:LM(e,t),tag:zM(e,t),search:VM(e,t),editor:MM(e,t)}),HM=e=>{switch(e){case V.ENGLISH:case V.FRENCH:case V.SPANISH:case V.PORTUGUESE:case V.GERMAN:case V.AFRIKAANS:case V.AZERI_LATIN:case V.BELARUSIAN:case V.BULGARIAN:case V.BOSNIAN:case V.CATALAN:case V.CZECH:case V.WELSH:case V.DANISH:case V.ESPERANTO:case V.ESTONIAN:case V.BASQUE:case V.FINNISH:case V.FAROESE:case V.GALICIAN:case V.GREEK:case V.CROATIAN:case V.HUNGARIAN:case V.ARMENIAN:case V.INDONESIAN:case V.ICELANDIC:case V.ITALIAN:case V.JAPANESE:case V.GEORGIAN:case V.KAZAKH:case V.KANNADA:case V.KOREAN:case V.KONKANI:case V.KYRGYZ:case V.LITHUANIAN:case V.LATVIAN:case V.MAORI:case V.FYRO_MACEDONIAN:case V.MONGOLIAN:case V.MARATHI:case V.MALAY:case V.MALTESE:case V.NORWEGIAN_BOKMAL:case V.DUTCH:case V.NORTHERN_SOTHO:case V.PUNJABI:case V.POLISH:case V.QUECHUA:case V.ROMANIAN:case V.RUSSIAN:case V.SANSKRIT:case V.SAMI_NORTHERN:case V.SLOVAK:case V.SLOVENIAN:case V.ALBANIAN:case V.SERBIAN_LATIN:case V.SWEDISH:case V.SWAHILI:case V.TAMIL:case V.TELUGU:case V.THAI:case V.TAGALOG:case V.TSWANA:case V.TURKISH:case V.UKRAINIAN:case V.UZBEK_LATIN:case V.VIETNAMESE:case V.XHOSA:case V.CHINESE_SIMPLIFIED:case V.CHINESE_TRADITIONAL:case V.ZULU:case V.AFRIKAANS_SOUTH_AFRICA:case V.AZERI_LATIN_AZERBAIJAN:case V.BELARUSIAN_BELARUS:case V.BULGARIAN_BULGARIA:case V.BOSNIAN_BOSNIA_AND_HERZEGOVINA:case V.CATALAN_SPAIN:case V.CZECH_CZECH_REPUBLIC:case V.WELSH_UNITED_KINGDOM:case V.DANISH_DENMARK:case V.GERMAN_AUSTRIA:case V.GERMAN_SWITZERLAND:case V.GERMAN_GERMANY:case V.GERMAN_LIECHTENSTEIN:case V.GERMAN_LUXEMBOURG:case V.GREEK_GREECE:case V.ENGLISH_AUSTRALIA:case V.ENGLISH_BELIZE:case V.ENGLISH_CANADA:case V.ENGLISH_CARIBBEAN:case V.ENGLISH_UNITED_KINGDOM:case V.ENGLISH_IRELAND:case V.ENGLISH_JAMAICA:case V.ENGLISH_NEW_ZEALAND:case V.ENGLISH_PHILIPPINES:case V.ENGLISH_TRINIDAD_AND_TOBAGO:case V.ENGLISH_UNITED_STATES:case V.ENGLISH_SOUTH_AFRICA:case V.ENGLISH_ZIMBABWE:case V.SPANISH_ARGENTINA:case V.SPANISH_BOLIVIA:case V.SPANISH_CHILE:case V.SPANISH_COLOMBIA:case V.SPANISH_COSTA_RICA:case V.SPANISH_DOMINICAN_REPUBLIC:case V.SPANISH_ECUADOR:case V.SPANISH_SPAIN:case V.SPANISH_GUATEMALA:case V.SPANISH_HONDURAS:case V.SPANISH_MEXICO:case V.SPANISH_NICARAGUA:case V.SPANISH_PANAMA:case V.SPANISH_PERU:case V.SPANISH_PUERTO_RICO:case V.SPANISH_PARAGUAY:case V.SPANISH_EL_SALVADOR:case V.SPANISH_URUGUAY:case V.SPANISH_VENEZUELA:case V.ESTONIAN_ESTONIA:case V.BASQUE_SPAIN:case V.FINNISH_FINLAND:case V.FAROESE_FAROE_ISLANDS:case V.FRENCH_BELGIUM:case V.FRENCH_CANADA:case V.FRENCH_SWITZERLAND:case V.FRENCH_FRANCE:case V.FRENCH_LUXEMBOURG:case V.FRENCH_PRINCIPALITY_OF_MONACO:case V.GALICIAN_SPAIN:case V.GUJARATI_INDIA:case V.HEBREW_ISRAEL:case V.HINDI_INDIA:case V.CROATIAN_BOSNIA_AND_HERZEGOVINA:case V.CROATIAN_CROATIA:case V.HUNGARIAN_HUNGARY:case V.ARMENIAN_ARMENIA:case V.INDONESIAN_INDONESIA:case V.ICELANDIC_ICELAND:case V.ITALIAN_SWITZERLAND:case V.ITALIAN_ITALY:case V.JAPANESE_JAPAN:case V.GEORGIAN_GEORGIA:case V.KAZAKH_KAZAKHSTAN:case V.KANNADA_INDIA:case V.KOREAN_KOREA:case V.KONKANI_INDIA:case V.KYRGYZ_KYRGYZSTAN:case V.LITHUANIAN_LITHUANIA:case V.LATVIAN_LATVIA:case V.MAORI_NEW_ZEALAND:case V.FYRO_MACEDONIAN_MACEDONIA:case V.MONGOLIAN_MONGOLIA:case V.MARATHI_INDIA:case V.MALAY_BRUNEI_DARUSSALAM:case V.MALAY_MALAYSIA:case V.MALTESE_MALTA:case V.NORWEGIAN_BOKMAL_NORWAY:case V.DUTCH_BELGIUM:case V.DUTCH_NETHERLANDS:case V.NORWEGIAN_NYNORSK_NORWAY:case V.NORTHERN_SOTHO_SOUTH_AFRICA:case V.PUNJABI_INDIA:case V.POLISH_POLAND:case V.PORTUGUESE_BRAZIL:case V.PORTUGUESE_PORTUGAL:case V.QUECHUA_BOLIVIA:case V.QUECHUA_ECUADOR:case V.QUECHUA_PERU:case V.ROMANIAN_ROMANIA:case V.RUSSIAN_RUSSIA:case V.SANSKRIT_INDIA:case V.SAMI_NORTHERN_FINLAND:case V.SAMI_NORTHERN_NORWAY:case V.SAMI_NORTHERN_SWEDEN:case V.SLOVAK_SLOVAKIA:case V.SLOVENIAN_SLOVENIA:case V.ALBANIAN_ALBANIA:case V.SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA:case V.SERBIAN_LATIN_SERBIA_AND_MONTENEGRO:case V.SWAHILI_KENYA:case V.TAMIL_INDIA:case V.TELUGU_INDIA:case V.THAI_THAILAND:case V.TAGALOG_PHILIPPINES:case V.TSWANA_SOUTH_AFRICA:case V.TURKISH_TURKEY:case V.TATAR_RUSSIA:case V.TSOGA:case V.UKRAINIAN_UKRAINE:case V.UZBEK_LATIN_UZBEKISTAN:case V.VIETNAMESE_VIET_NAM:case V.XHOSA_SOUTH_AFRICA:case V.CHINESE_HONG_KONG:case V.CHINESE_MACAU:case V.CHINESE_SINGAPORE:case V.ZULU_SOUTH_AFRICA:return"ltr";case V.ARABIC:case V.FARSI:case V.URDU:case V.PASHTO:case V.SYRIAC:case V.ARABIC_UNITED_ARAB_EMIRATES:case V.ARABIC_BAHRAIN:case V.ARABIC_ALGERIA:case V.ARABIC_EGYPT:case V.ARABIC_IRAQ:case V.ARABIC_JORDAN:case V.ARABIC_KUWAIT:case V.ARABIC_LEBANON:case V.ARABIC_LIBYA:case V.ARABIC_MOROCCO:case V.ARABIC_OMAN:case V.ARABIC_QATAR:case V.ARABIC_SAUDI_ARABIA:case V.ARABIC_SYRIA:case V.ARABIC_TUNISIA:case V.ARABIC_YEMEN:case V.FARSI_IRAN:case V.URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN:case V.PASHTO_AFGHANISTAN:case V.SYRIAC_SYRIA:return"rtl";default:return"auto"}},$T=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),sS=new Map,ef=(e,t=e)=>{if(typeof(Intl==null?void 0:Intl.DisplayNames)!="function")return e;let n=sS.get(t);return n||(n=new Intl.DisplayNames([t],{type:"language"}),sS.set(t,n)),n.of(e)??"Unknown locale"},FM=(e,t=tt.internationalization.locales)=>{const n=$T(e);let r=e;e.endsWith("/")&&(r=e.slice(0,-1));const a=n?new URL(r):new URL(r,"http://example.com"),o=a.pathname;o.startsWith("/")||(a.pathname=`/${o}`);const l=o.split("/"),u=l[1];if(t.includes(u)){l.splice(1,1);const d=l.join("/")??"/";a.pathname=d}return n?a.toString():a.toString().replace("http://example.com","")},GM=(e,t=tt.internationalization.locales,n=tt.internationalization.defaultLocale,r=tt.middleware.prefixDefault)=>{const a=FM(e,t),o=$T(a),l=o?new URL(a):new URL(a,"http://example.com");let u=l.pathname;u.startsWith("/")||(u=`/${u}`);const d=o?`${l.protocol}//${l.host}`:"";return t.reduce((m,y)=>{const g=y.toString()===n.toString();let x=r||!g?`/${y}${u}`:u;x.length>1&&x.endsWith("/")&&(x=x.slice(0,-1));const S=o?`${d}${x}${l.search}${l.hash}`:`${x}${l.search}${l.hash}`;return m[y]=S,m},{})},$M=(e,t,n=tt.internationalization.locales,r=tt.internationalization.defaultLocale,a=tt.middleware.prefixDefault)=>GM(e,n,r,a)[t],qM=(e,t=tt.internationalization.locales,n=tt.internationalization.defaultLocale)=>{const r=[e].flat(),a=o=>o.trim().toLowerCase();try{for(const o of r){const l=a(o),u=t.find(m=>a(m)===l);if(u)return u;const[d]=l.split("-"),f=t.find(m=>a(m).split("-")[0]===d);if(f)return f}}catch{}return n},pe=e=>pM(K.Translation,e),KM=e=>{let t=e.trim().replace(/^\[/,"[").replace(/^\{/,"{").replace(/\]$/,"]").replace(/\}$/,"}").replace(/([\w\d_]+)\s*:/g,'"$1":').replace(/:\s*([a-zA-Z_][\w\d_]*)/g,': "$1"');return t=t.replace(/\[([^\[\]]+?)\]/g,(n,r)=>`[${r.split(",").map(o=>{const l=o.trim();return l.startsWith('"')&&l.endsWith('"')||!isNaN(Number(l))?l:`"${l}"`}).join(", ")}]`),JSON.parse(t)},qT=e=>{try{const t=e.split(/\r?\n/),n=t.find(o=>o.trim()!=="");if(!n||n.trim()!=="---")return{};const r={};let a=!1;for(const o of t){if(o.trim()==="---"){if(a)break;a=!0;continue}if(a){const u=o.match(/^([^:]+)\s*:\s*(.*)$/);if(u){const d=u[1].trim(),f=u[2].trim();try{r[d]=KM(f)}catch{r[d]=f}}}}return r}catch{return}},Zc=(e,t)=>e.every((n,r)=>t[r]&&t[r].key===n.key&&t[r].type===n.type),WM=(e,t)=>{try{const n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;const a=n.pathname.replace(/\/$/,""),o=r.pathname.replace(/\/$/,"");return!(a!==""&&o!==""&&a!==o)}catch(n){return console.error("Invalid URL(s)",n),!1}},YM=e=>{const t=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window}),n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});Object.assign(n,{iframeData:e}),Object.assign(t,{iframeData:e}),window.dispatchEvent(n),window.dispatchEvent(t)};var fr=(e=>(e.INTLAYER_CONFIGURATION="INTLAYER_CONFIGURATION",e.INTLAYER_CURRENT_LOCALE="INTLAYER_CURRENT_LOCALE",e.INTLAYER_EDITOR_ENABLED="INTLAYER_EDITOR_ENABLED",e.INTLAYER_URL_CHANGE="INTLAYER_URL_CHANGE",e.INTLAYER_FOCUSED_CONTENT_CHANGED="INTLAYER_FOCUSED_CONTENT_CHANGED",e.INTLAYER_LOCALE_DICTIONARIES_CHANGED="INTLAYER_LOCALE_DICTIONARIES_CHANGED",e.INTLAYER_DISTANT_DICTIONARIES_CHANGED="INTLAYER_DISTANT_DICTIONARIES_CHANGED",e.INTLAYER_EDITED_CONTENT_CHANGED="INTLAYER_EDITED_CONTENT_CHANGED",e.INTLAYER_IFRAME_CLICKED="INTLAYER_IFRAME_CLICKED",e))(fr||{});const KT=E.createContext(void 0),WT=E.createContext(void 0),ZM=({children:e})=>{const[t,n]=E.useState({}),r=(a,o)=>{n(l=>({...l,[a]:{...l==null?void 0:l[a],content:o}}))};return b.jsx(KT.Provider,{value:{changedContent:t},children:b.jsx(WT.Provider,{value:{setChangedContent:r},children:e})})},XM=()=>E.useContext(WT),QM=()=>{const e=E.useContext(KT),t=XM();return{...e,...t}},ln=[];for(let e=0;e<256;++e)ln.push((e+256).toString(16).slice(1));function JM(e,t=0){return(ln[e[t+0]]+ln[e[t+1]]+ln[e[t+2]]+ln[e[t+3]]+"-"+ln[e[t+4]]+ln[e[t+5]]+"-"+ln[e[t+6]]+ln[e[t+7]]+"-"+ln[e[t+8]]+ln[e[t+9]]+"-"+ln[e[t+10]]+ln[e[t+11]]+ln[e[t+12]]+ln[e[t+13]]+ln[e[t+14]]+ln[e[t+15]]).toLowerCase()}let tg;const ej=new Uint8Array(16);function tj(){if(!tg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");tg=crypto.getRandomValues.bind(crypto)}return tg(ej)}const nj=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),oS={randomUUID:nj};function rj(e,t,n){var a;if(oS.randomUUID&&!e)return oS.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??tj();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,JM(r)}const{editor:vi}=tt,YT=E.createContext({postMessage:()=>null,allowedOrigins:[vi==null?void 0:vi.applicationURL,vi==null?void 0:vi.editorURL,vi==null?void 0:vi.cmsURL],senderId:""}),lS=({children:e,allowedOrigins:t,postMessage:n})=>{const r=E.useRef(rj()),a=E.useMemo(()=>({postMessage:n,allowedOrigins:t,senderId:r.current}),[n,t,r.current]);return b.jsx(YT.Provider,{value:a,children:e})},ZT=()=>E.useContext(YT),To=(e,t,n)=>{const{allowedOrigins:r,postMessage:a,senderId:o}=ZT();return E.useEffect(()=>{if(t){const u=d=>{const{type:f,data:m,senderId:y}=d.data;f===e&&y!==o&&(typeof r>"u"||r!=null&&r.some(g=>WM(g,d.origin))||r!=null&&r.includes("*"))&&t(m)};return window.addEventListener("message",u),()=>window.removeEventListener("message",u)}},[r,a,o,n]),u=>{a({type:e,data:u,senderId:o})}},ij=(e,t)=>typeof e=="function"?e(t):e,vs=(e,t,n)=>{const{postMessage:r,senderId:a}=ZT(),{emit:o,receive:l}=n??{emit:!0,receive:!0},u=(v,x)=>{const S=ij(v,x);return o&&typeof r=="function"&&typeof S<"u"&&r({type:`${e}/post`,data:S,senderId:a}),S},d=()=>{typeof r=="function"&&r({type:`${e}/post`,data:f,senderId:a})},[f,m]=E.useState(()=>u(t)),y=v=>m(x=>u(v,x));To(`${e}/post`,l?v=>{m(v)}:void 0);const g=(v,x)=>{o&&typeof r=="function"&&x!==a&&(typeof f>"u"||r({type:`${e}/post`,data:f,senderId:a}))};return To(`${e}/get`,o?g:void 0,f),E.useEffect(()=>{l&&typeof r=="function"&&typeof f>"u"&&r({type:`${e}/get`,senderId:a})},[]),[f,y,d]},XT=E.createContext(void 0),aj=({children:e,configuration:t})=>b.jsx(XT.Provider,{value:t,children:e}),Zr=()=>E.useContext(XT),QT=E.createContext(void 0),JT=E.createContext(void 0),sj=({children:e})=>{const[t,n]=vs(fr.INTLAYER_LOCALE_DICTIONARIES_CHANGED,void 0),r=E.useMemo(()=>({localeDictionaries:t??{}}),[t]),a=E.useMemo(()=>({setLocaleDictionaries:n,setLocaleDictionary:o=>{n(l=>({...l,[o.key]:o}))}}),[n]);return b.jsx(QT.Provider,{value:r,children:b.jsx(JT.Provider,{value:a,children:e})})},oh=()=>E.useContext(JT),e1=()=>{const e=oh(),t=E.useContext(QT);if(!t)throw new Error("useDictionariesRecordStates must be used within a DictionariesRecordProvider");return{...t,...e}},t1=E.createContext(void 0),oj=e=>To(`${fr.INTLAYER_EDITED_CONTENT_CHANGED}/get`,e),n1=E.createContext(void 0),cS=(e,t)=>typeof e=="function"?e(t):e,lj=({children:e})=>{const{localeDictionaries:t}=e1(),[n,r]=vs(fr.INTLAYER_EDITED_CONTENT_CHANGED),a=v=>{let x=cS(v);return r(S=>(x=cS(v,S==null?void 0:S[x.key]),{...S,[x.key]:x})),x},o=(v,x)=>{r(S=>({...S,[v]:{...S==null?void 0:S[v],content:x}}))},l=(v,x,S=[],A=!0)=>{r(w=>{var L,O;const T=(L=t[v])==null?void 0:L.content,R=structuredClone(((O=w==null?void 0:w[v])==null?void 0:O.content)??T);let D=S;if(!A){let M=0;const B=S.slice(0,-1),U=S[S.length-1];let ue=U.key;for(;typeof Hr(R,D)<"u";)M++,ue=M===0?U.key:`${U.key} (${M})`,D=[...B,{...U,key:ue}]}const N=rS(R,D,x);return{...w,[v]:{...w==null?void 0:w[v],content:N}}})},u=(v,x,S=[])=>{r(A=>{var D,N;const w=(D=t[v])==null?void 0:D.content,T=structuredClone(((N=A==null?void 0:A[v])==null?void 0:N.content)??w),R=gM(T,x,S);return{...A,[v]:{...A==null?void 0:A[v],content:R}}})},d=(v,x)=>{r(S=>{var D,N;const A=(D=t[v])==null?void 0:D.content,w=structuredClone(((N=S==null?void 0:S[v])==null?void 0:N.content)??A),T=Hr(A,x),R=rS(w,x,T);return{...S,[v]:{...S==null?void 0:S[v],content:R}}})},f=v=>{r(x=>{const S={...x};return delete S[v],S})},m=v=>{r(x=>Object.entries(x).reduce((A,[w,T])=>w===v?A:{...A,[w]:T},{}))},y=()=>{r({})},g=(v,x)=>{var A;const S=((A=n==null?void 0:n[v])==null?void 0:A.content)??{};return Hr(S,x)};return b.jsx(t1.Provider,{value:{editedContent:n},children:b.jsx(n1.Provider,{value:{setEditedContentState:r,setEditedDictionary:a,setEditedContent:o,addEditedContent:l,renameEditedContent:u,removeEditedContent:d,restoreEditedContent:f,clearEditedDictionaryContent:m,clearEditedContent:y,getEditedContentValue:g},children:e})})},Bo=()=>E.useContext(n1),Tn=()=>{const e=E.useContext(t1),t=Bo();return{...e,...t}},r1=E.createContext({enabled:!1}),cj=e=>vs(fr.INTLAYER_EDITOR_ENABLED,!1,e),uj=e=>To(`${fr.INTLAYER_EDITOR_ENABLED}/post`,e),i1=e=>To(`${fr.INTLAYER_EDITOR_ENABLED}/get`,e),dj=({children:e})=>{const[t]=cj({emit:!1,receive:!0});return b.jsx(r1.Provider,{value:{enabled:t},children:e})},a1=()=>E.useContext(r1),s1=E.createContext(void 0),o1=E.createContext(void 0),fj=({children:e})=>{const[t,n]=vs(fr.INTLAYER_FOCUSED_CONTENT_CHANGED,null),r=a=>{n(o=>o&&{...o,keyPath:a})};return b.jsx(s1.Provider,{value:{focusedContent:t},children:b.jsx(o1.Provider,{value:{setFocusedContent:n,setFocusedContentKeyPath:r},children:e})})},Tv=()=>{const e=E.useContext(o1);if(e===void 0)throw new Error("useFocusDictionaryActions must be used within a FocusDictionaryProvider");return e},ba=()=>{const e=Tv(),t=E.useContext(s1);if(t===void 0)throw new Error("useFocusDictionaryState must be used within a FocusDictionaryProvider");return{...t,...e}},uS=({children:e})=>{const t=oj();return E.useEffect(()=>{t()},[]),b.jsx(sj,{children:b.jsx(lj,{children:b.jsx(fj,{children:e})})})},hj=({children:e,fallback:t})=>{const n=i1(),{enabled:r}=a1();return E.useEffect(()=>{r||n()},[r]),r?e:t},mj=({children:e,fallback:t})=>{const[n,r]=E.useState(!1);return E.useEffect(()=>{r(window.self!==window.top)},[]),n?e:t},pj=({children:e,configuration:t,...n})=>b.jsx(ZM,{children:b.jsx(dj,{children:b.jsx(aj,{configuration:t,children:n.mode==="editor"?b.jsx(lS,{...n,children:b.jsx(uS,{children:e})}):b.jsx(mj,{fallback:e,children:b.jsx(lS,{...n,children:b.jsx(hj,{fallback:e,children:b.jsx(uS,{children:e})})})})})})}),gj=(e,t)=>vs(fr.INTLAYER_URL_CHANGE,e,t),yj=()=>To(fr.INTLAYER_IFRAME_CLICKED,YM);/*! js-cookie v3.0.5 | MIT */function Nd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var vj={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function oy(e,t){function n(a,o,l){if(!(typeof document>"u")){l=Nd({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var d in l)l[d]&&(u+="; "+d,l[d]!==!0&&(u+="="+l[d].split(";")[0]));return document.cookie=a+"="+e.write(o,a)+u}}function r(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var o=document.cookie?document.cookie.split("; "):[],l={},u=0;u<o.length;u++){var d=o[u].split("="),f=d.slice(1).join("=");try{var m=decodeURIComponent(d[0]);if(l[m]=e.read(f,m),a===m)break}catch{}}return a?l[a]:l}}return Object.create({set:n,get:r,remove:function(a,o){n(a,"",Nd({},o,{expires:-1}))},withAttributes:function(a){return oy(this.converter,Nd({},this.attributes,a))},withConverter:function(a){return oy(Nd({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var l1=oy(vj,{path:"/"});const{cookieName:c1}=tt.middleware,bj={path:"/",expires:void 0,domain:void 0,secure:!1,sameSite:"strict"},Cv=l1.get(c1),u1=e=>{l1.set(c1,e,bj)},_j=()=>({localeCookie:Cv,setLocaleCookie:u1});var zT;const lh=E.createContext({locale:Cv??((zT=tt==null?void 0:tt.internationalization)==null?void 0:zT.defaultLocale),setLocale:()=>null,disableEditor:!1}),xj=()=>E.useContext(lh),Ej=({locale:e,defaultLocale:t,children:n,setLocale:r,disableEditor:a})=>{const{internationalization:o}=tt??{},{defaultLocale:l,locales:u}=o??{},d=e??Cv??t??l,[f,m]=vs(fr.INTLAYER_CURRENT_LOCALE,d),g=r??(x=>{if(f.toString()!==x.toString()){if(!(u!=null&&u.map(String).includes(x))){console.error(`Locale ${x} is not available`);return}m(x),u1(x)}}),v=qM(e??f);return b.jsx(lh.Provider,{value:{locale:v,setLocale:g,disableEditor:a},children:n})},vf=({children:e,value:t,additionalProps:n})=>{const r=E.isValidElement(e)?e:b.jsx(b.Fragment,{children:e});return new Proxy(r,{get(a,o,l){return o==="value"?t:n&&Object.keys(n).includes(o)?n[o]:Reflect.get(a,o,l)}})},Sj=250,Aj=({children:e,onPress:t,onClickOutside:n,pressDuration:r=Sj,isSelecting:a,...o})=>{const l=E.useRef(null),[u,d]=E.useState(!1),[f,m]=E.useState(a),y=E.useRef(null),g=typeof e=="string",v=()=>{m(!0),t()},x=()=>{y.current=setTimeout(()=>{v()},r)},S=()=>{y.current&&(clearTimeout(y.current),y.current=null)},A=()=>{S(),x()},w=()=>{d(!0)},T=()=>{d(!1),S()},R=E.useCallback(L=>{l.current&&!l.current.contains(L.target)&&(m(!1),n==null||n())},[n]);E.useEffect(()=>(document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}),[R]);const D=L=>{f&&(L.preventDefault(),L.stopPropagation())},N=()=>{m(!1)};return b.jsx("span",{style:{display:g?"inline":"inline-block",cursor:"pointer",userSelect:"none",borderRadius:"0.375rem",outlineWidth:"2px",outlineOffset:"4px",outlineStyle:"solid",outlineColor:a||f||u?"inherit":"transparent",transition:"all 100ms 50ms ease-in-out"},role:"button",tabIndex:0,onKeyUp:()=>null,onClick:D,onMouseDown:A,onMouseUp:T,onMouseLeave:T,onTouchStart:A,onTouchEnd:T,onTouchCancel:T,onBlur:N,onMouseEnter:w,ref:l,...o,children:e})},wj=({children:e,dictionaryKey:t,keyPath:n})=>{const{focusedContent:r,setFocusedContent:a}=ba(),o=E.useCallback(()=>a({dictionaryKey:t,keyPath:n}),[t,n]),l=E.useMemo(()=>{var u;return((r==null?void 0:r.dictionaryKey)===t&&(((u=r==null?void 0:r.keyPath)==null?void 0:u.length)??0)>0&&Zc((r==null?void 0:r.keyPath)??[],n))??!1},[r,n,t]);return b.jsx(Aj,{onPress:o,isSelecting:l,children:e})},bf=({children:e,...t})=>{const{enabled:n}=a1(),{disableEditor:r}=xj();return n&&!r?b.jsx(wj,{...t,children:e}):e},Rv=({dictionaryKey:e,keyPath:t,children:n})=>{const r=Bo();return r?r.getEditedContentValue(e,t)??n:n},Tj=e=>{const t=Rv(e);if(typeof t=="object"){const n=wv(t,e,e.locale);return typeof n!="string"?(console.error(`Incorrect edited content format. Content type: ${typeof n}. Expected string. Value ${JSON.stringify(n)}`),e.children):n}return t},Cj=E.createContext({renderMarkdown:e=>e}),Rj=()=>E.useContext(Cj),Nj=({dictionaryKey:e,keyPath:t,children:n,locale:r})=>{const{renderMarkdown:a}=Rj(),o=Rv({dictionaryKey:e,keyPath:t,children:n});if(typeof o!="string"){const l=wv(o,{dictionaryKey:e,keyPath:t},r);return typeof l!="string"?(console.error(`Incorrect Markdown content. Edited Markdown content type: ${typeof l}. Expected string. Value ${JSON.stringify(l)}`),a(n)):a(l)}return a(o)},kj=({dictionaryKey:e,keyPath:t,children:n,metadataKeyPath:r})=>{const a=Rv({dictionaryKey:e,keyPath:t,children:n}),o=qT(a);return Hr(o,r)},d1=e=>{if(typeof e=="string")return e;const n=(o=>{var l;if(o!=null&&o.props&&typeof o.props.children=="object"){const u=[],{children:d}=o.props;return Object.keys(d??{}).forEach(f=>{u.push(d1((d??{})[f]))}),{...o,props:{...o.props,children:u}}}return{...o,props:{...o.props,children:((l=o.props)==null?void 0:l.children)??[]}}})(e),{type:r,props:a}=n;return E.createElement(r??"span",a,...a.children)},Oj={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{plugins:t,...n})=>vf({...n,value:n.children,children:E.createElement(bf,{...n,key:n.children},b.jsx(Tj,{...n,children:n.children}))})},Dj={id:"react-node-plugin",canHandle:e=>typeof e=="object"&&typeof e.props<"u"&&typeof e.key<"u",transform:(e,{plugins:t,...n})=>vf({...n,value:"[[react-element]]",children:b.jsx(bf,{...n,children:d1(e)})})},Ij={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,t,n)=>{const{plugins:r,...a}=t,o=qT(e),u=n(o,{plugins:[{id:"markdown-metadata-plugin",canHandle:d=>typeof d=="string"||typeof d=="number"||typeof d=="boolean"||!d,transform:(d,f)=>vf({...f,value:d,children:b.jsx(bf,{...a,children:b.jsx(kj,{...a,metadataKeyPath:f.keyPath,children:e})})})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return vf({...t,value:e,children:b.jsx(bf,{...a,children:b.jsx(Nj,{...a,children:e})}),additionalProps:{metadata:u}})}},Lj={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Markdown,transform:(e,t,n)=>{const r=[...t.keyPath,{type:K.Markdown}],a=e[K.Markdown];return n(a,{...t,children:a,keyPath:r,plugins:[Ij,...t.plugins??[]]})}},dS=(e,t,n)=>GT(e,t,[Oj,Dj,Lj]),nn=(e,t)=>{const{locale:n}=E.useContext(lh),r=n,{changedContent:a}=QM();return a!=null&&a[e.key]?dS(a==null?void 0:a[e.key],r):dS(e,r)},Nv=({onLocaleChange:e}={})=>{const{defaultLocale:t,locales:n}=(tt==null?void 0:tt.internationalization)??{},{locale:r,setLocale:a}=E.useContext(lh),{setLocaleCookie:o}=_j();return{locale:r,defaultLocale:t,availableLocales:n,setLocale:u=>{if(!(n!=null&&n.map(String).includes(u))){console.error(`Locale ${u} is not available`);return}a(u),o(u),e==null||e(u)}}};var Jl={},fS;function Mj(){if(fS)return Jl;fS=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.parse=l,Jl.serialize=f;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,o=(()=>{const g=function(){};return g.prototype=Object.create(null),g})();function l(g,v){const x=new o,S=g.length;if(S<2)return x;const A=(v==null?void 0:v.decode)||m;let w=0;do{const T=g.indexOf("=",w);if(T===-1)break;const R=g.indexOf(";",w),D=R===-1?S:R;if(T>D){w=g.lastIndexOf(";",T-1)+1;continue}const N=u(g,w,T),L=d(g,T,N),O=g.slice(N,L);if(x[O]===void 0){let M=u(g,T+1,D),B=d(g,D,M);const U=A(g.slice(M,B));x[O]=U}w=D+1}while(w<S);return x}function u(g,v,x){do{const S=g.charCodeAt(v);if(S!==32&&S!==9)return v}while(++v<x);return x}function d(g,v,x){for(;v>x;){const S=g.charCodeAt(--v);if(S!==32&&S!==9)return v+1}return x}function f(g,v,x){const S=(x==null?void 0:x.encode)||encodeURIComponent;if(!e.test(g))throw new TypeError(`argument name is invalid: ${g}`);const A=S(v);if(!t.test(A))throw new TypeError(`argument val is invalid: ${v}`);let w=g+"="+A;if(!x)return w;if(x.maxAge!==void 0){if(!Number.isInteger(x.maxAge))throw new TypeError(`option maxAge is invalid: ${x.maxAge}`);w+="; Max-Age="+x.maxAge}if(x.domain){if(!n.test(x.domain))throw new TypeError(`option domain is invalid: ${x.domain}`);w+="; Domain="+x.domain}if(x.path){if(!r.test(x.path))throw new TypeError(`option path is invalid: ${x.path}`);w+="; Path="+x.path}if(x.expires){if(!y(x.expires)||!Number.isFinite(x.expires.valueOf()))throw new TypeError(`option expires is invalid: ${x.expires}`);w+="; Expires="+x.expires.toUTCString()}if(x.httpOnly&&(w+="; HttpOnly"),x.secure&&(w+="; Secure"),x.partitioned&&(w+="; Partitioned"),x.priority)switch(typeof x.priority=="string"?x.priority.toLowerCase():void 0){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${x.priority}`)}if(x.sameSite)switch(typeof x.sameSite=="string"?x.sameSite.toLowerCase():x.sameSite){case!0:case"strict":w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"none":w+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${x.sameSite}`)}return w}function m(g){if(g.indexOf("%")===-1)return g;try{return decodeURIComponent(g)}catch{return g}}function y(g){return a.call(g)==="[object Date]"}return Jl}Mj();var hS="popstate";function jj(e={}){function t(r,a){let{pathname:o,search:l,hash:u}=r.location;return ly("",{pathname:o,search:l,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:Nc(a)}return Vj(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Wr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Pj(){return Math.random().toString(36).substring(2,10)}function mS(e,t){return{usr:e.state,key:e.key,idx:t}}function ly(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?zo(t):t,state:n,key:t&&t.key||r||Pj()}}function Nc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function zo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Vj(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,u="POP",d=null,f=m();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function m(){return(l.state||{idx:null}).idx}function y(){u="POP";let A=m(),w=A==null?null:A-f;f=A,d&&d({action:u,location:S.location,delta:w})}function g(A,w){u="PUSH";let T=ly(S.location,A,w);f=m()+1;let R=mS(T,f),D=S.createHref(T);try{l.pushState(R,"",D)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(D)}o&&d&&d({action:u,location:S.location,delta:1})}function v(A,w){u="REPLACE";let T=ly(S.location,A,w);f=m();let R=mS(T,f),D=S.createHref(T);l.replaceState(R,"",D),o&&d&&d({action:u,location:S.location,delta:0})}function x(A){return Bj(A)}let S={get action(){return u},get location(){return e(a,l)},listen(A){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(hS,y),d=A,()=>{a.removeEventListener(hS,y),d=null}},createHref(A){return t(a,A)},createURL:x,encodeLocation(A){let w=x(A);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:v,go(A){return l.go(A)}};return S}function Bj(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Nc(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function f1(e,t,n="/"){return zj(e,t,n,!1)}function zj(e,t,n,r){let a=typeof t=="string"?zo(t):t,o=wi(a.pathname||"/",n);if(o==null)return null;let l=h1(e);Uj(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let f=Qj(o);u=Zj(l[d],f,r)}return u}function h1(e,t=[],n=[],r=""){let a=(o,l,u)=>{let d={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};d.relativePath.startsWith("/")&&(Ct(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length));let f=Si([r,d.relativePath]),m=n.concat(d);o.children&&o.children.length>0&&(Ct(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),h1(o.children,t,m,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:Wj(f,o.index),routesMeta:m})};return e.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))a(o,l);else for(let d of m1(o.path))a(o,l,d)}),t}function m1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let l=m1(r.join("/")),u=[];return u.push(...l.map(d=>d===""?o:[o,d].join("/"))),a&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function Uj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Yj(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Hj=/^:[\w-]+$/,Fj=3,Gj=2,$j=1,qj=10,Kj=-2,pS=e=>e==="*";function Wj(e,t){let n=e.split("/"),r=n.length;return n.some(pS)&&(r+=Kj),t&&(r+=Gj),n.filter(a=>!pS(a)).reduce((a,o)=>a+(Hj.test(o)?Fj:o===""?$j:qj),r)}function Yj(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Zj(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",y=_f({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},m),g=d.route;if(!y&&f&&n&&!r[r.length-1].route.index&&(y=_f({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!y)return null;Object.assign(a,y.params),l.push({params:a,pathname:Si([o,y.pathname]),pathnameBase:nP(Si([o,y.pathnameBase])),route:g}),y.pathnameBase!=="/"&&(o=Si([o,y.pathnameBase]))}return l}function _f(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Xj(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((f,{paramName:m,isOptional:y},g)=>{if(m==="*"){let x=u[g]||"";l=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const v=u[g];return y&&!v?f[m]=void 0:f[m]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:l,pattern:e}}function Xj(e,t=!1,n=!0){Wr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Qj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Wr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function wi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Jj(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?zo(e):e;return{pathname:n?n.startsWith("/")?n:eP(n,t):t,search:rP(r),hash:iP(a)}}function eP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function ng(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function tP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function p1(e){let t=tP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function g1(e,t,n,r=!1){let a;typeof e=="string"?a=zo(e):(a={...e},Ct(!a.pathname||!a.pathname.includes("?"),ng("?","pathname","search",a)),Ct(!a.pathname||!a.pathname.includes("#"),ng("#","pathname","hash",a)),Ct(!a.search||!a.search.includes("#"),ng("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=n;else{let y=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),y-=1;a.pathname=g.join("/")}u=y>=0?t[y]:"/"}let d=Jj(a,u),f=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var Si=e=>e.join("/").replace(/\/\/+/g,"/"),nP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,iP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function aP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var y1=["POST","PUT","PATCH","DELETE"];new Set(y1);var sP=["GET",...y1];new Set(sP);var Uo=E.createContext(null);Uo.displayName="DataRouter";var ch=E.createContext(null);ch.displayName="DataRouterState";var v1=E.createContext({isTransitioning:!1});v1.displayName="ViewTransition";var oP=E.createContext(new Map);oP.displayName="Fetchers";var lP=E.createContext(null);lP.displayName="Await";var Xr=E.createContext(null);Xr.displayName="Navigation";var Xc=E.createContext(null);Xc.displayName="Location";var Di=E.createContext({outlet:null,matches:[],isDataRoute:!1});Di.displayName="Route";var kv=E.createContext(null);kv.displayName="RouteError";function cP(e,{relative:t}={}){Ct(Qc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=E.useContext(Xr),{hash:a,pathname:o,search:l}=Jc(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Si([n,o])),r.createHref({pathname:u,search:l,hash:a})}function Qc(){return E.useContext(Xc)!=null}function _a(){return Ct(Qc(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Xc).location}var b1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _1(e){E.useContext(Xr).static||E.useLayoutEffect(e)}function uP(){let{isDataRoute:e}=E.useContext(Di);return e?SP():dP()}function dP(){Ct(Qc(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(Uo),{basename:t,navigator:n}=E.useContext(Xr),{matches:r}=E.useContext(Di),{pathname:a}=_a(),o=JSON.stringify(p1(r)),l=E.useRef(!1);return _1(()=>{l.current=!0}),E.useCallback((d,f={})=>{if(Wr(l.current,b1),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=g1(d,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Si([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,o,a,e])}E.createContext(null);function Jc(e,{relative:t}={}){let{matches:n}=E.useContext(Di),{pathname:r}=_a(),a=JSON.stringify(p1(n));return E.useMemo(()=>g1(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function fP(e,t){return x1(e,t)}function x1(e,t,n,r){var T;Ct(Qc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a,static:o}=E.useContext(Xr),{matches:l}=E.useContext(Di),u=l[l.length-1],d=u?u.params:{},f=u?u.pathname:"/",m=u?u.pathnameBase:"/",y=u&&u.route;{let R=y&&y.path||"";E1(f,!y||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
52
+
53
+ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let g=_a(),v;if(t){let R=typeof t=="string"?zo(t):t;Ct(m==="/"||((T=R.pathname)==null?void 0:T.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${R.pathname}" was given in the \`location\` prop.`),v=R}else v=g;let x=v.pathname||"/",S=x;if(m!=="/"){let R=m.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(R.length).join("/")}let A=!o&&n&&n.matches&&n.matches.length>0?n.matches:f1(e,{pathname:S});Wr(y||A!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Wr(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=yP(A&&A.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:Si([m,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?m:Si([m,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),l,n,r);return t&&w?E.createElement(Xc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},w):w}function hP(){let e=EP(),t=aP(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:o},"ErrorBoundary")," or"," ",E.createElement("code",{style:o},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:a},n):null,l)}var mP=E.createElement(hP,null),pP=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?E.createElement(Di.Provider,{value:this.props.routeContext},E.createElement(kv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function gP({routeContext:e,match:t,children:n}){let r=E.useContext(Uo);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Di.Provider,{value:e},n)}function yP(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let d=a.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);Ct(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,u=-1;if(n)for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:y}=n,g=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!y||y[f.route.id]===void 0);if(f.route.lazy||g){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,f,m)=>{let y,g=!1,v=null,x=null;n&&(y=o&&f.route.id?o[f.route.id]:void 0,v=f.route.errorElement||mP,l&&(u<0&&m===0?(E1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,x=null):u===m&&(g=!0,x=f.route.hydrateFallbackElement||null)));let S=t.concat(a.slice(0,m+1)),A=()=>{let w;return y?w=v:g?w=x:f.route.Component?w=E.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,E.createElement(gP,{match:f,routeContext:{outlet:d,matches:S,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?E.createElement(pP,{location:n.location,revalidation:n.revalidation,component:v,error:y,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):A()},null)}function Ov(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vP(e){let t=E.useContext(Uo);return Ct(t,Ov(e)),t}function bP(e){let t=E.useContext(ch);return Ct(t,Ov(e)),t}function _P(e){let t=E.useContext(Di);return Ct(t,Ov(e)),t}function Dv(e){let t=_P(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function xP(){return Dv("useRouteId")}function EP(){var r;let e=E.useContext(kv),t=bP("useRouteError"),n=Dv("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function SP(){let{router:e}=vP("useNavigate"),t=Dv("useNavigate"),n=E.useRef(!1);return _1(()=>{n.current=!0}),E.useCallback(async(a,o={})=>{Wr(n.current,b1),n.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var gS={};function E1(e,t,n){!t&&!gS[e]&&(gS[e]=!0,Wr(!1,n))}E.memo(AP);function AP({routes:e,future:t,state:n}){return x1(e,void 0,n,t)}function S1(e){Ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function wP({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1}){Ct(!Qc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:l,navigator:a,static:o,future:{}}),[l,a,o]);typeof n=="string"&&(n=zo(n));let{pathname:d="/",search:f="",hash:m="",state:y=null,key:g="default"}=n,v=E.useMemo(()=>{let x=wi(d,l);return x==null?null:{location:{pathname:x,search:f,hash:m,state:y,key:g},navigationType:r}},[l,d,f,m,y,g,r]);return Wr(v!=null,`<Router basename="${l}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:E.createElement(Xr.Provider,{value:u},E.createElement(Xc.Provider,{children:t,value:v}))}function TP({children:e,location:t}){return fP(cy(e),t)}function cy(e,t=[]){let n=[];return E.Children.forEach(e,(r,a)=>{if(!E.isValidElement(r))return;let o=[...t,a];if(r.type===E.Fragment){n.push.apply(n,cy(r.props.children,o));return}Ct(r.type===S1,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ct(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=cy(r.props.children,o)),n.push(l)}),n}var tf="get",nf="application/x-www-form-urlencoded";function uh(e){return e!=null&&typeof e.tagName=="string"}function CP(e){return uh(e)&&e.tagName.toLowerCase()==="button"}function RP(e){return uh(e)&&e.tagName.toLowerCase()==="form"}function NP(e){return uh(e)&&e.tagName.toLowerCase()==="input"}function kP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function OP(e,t){return e.button===0&&(!t||t==="_self")&&!kP(e)}var kd=null;function DP(){if(kd===null)try{new FormData(document.createElement("form"),0),kd=!1}catch{kd=!0}return kd}var IP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rg(e){return e!=null&&!IP.has(e)?(Wr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nf}"`),null):e}function LP(e,t){let n,r,a,o,l;if(RP(e)){let u=e.getAttribute("action");r=u?wi(u,t):null,n=e.getAttribute("method")||tf,a=rg(e.getAttribute("enctype"))||nf,o=new FormData(e)}else if(CP(e)||NP(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?wi(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||tf,a=rg(e.getAttribute("formenctype"))||rg(u.getAttribute("enctype"))||nf,o=new FormData(u,e),!DP()){let{name:f,type:m,value:y}=e;if(m==="image"){let g=f?`${f}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else f&&o.append(f,y)}}else{if(uh(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=tf,r=null,a=nf,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:l}}function Iv(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function MP(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jP(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function PP(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await MP(o,n);return l.links?l.links():[]}return[]}));return UP(r.flat(1).filter(jP).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function yS(e,t,n,r,a,o){let l=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>{var m;return n[f].pathname!==d.pathname||((m=n[f].route.path)==null?void 0:m.endsWith("*"))&&n[f].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,f)=>l(d,f)||u(d,f)):o==="data"?t.filter((d,f)=>{var y;let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let g=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((y=n[0])==null?void 0:y.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function VP(e,t,{includeHydrateFallback:n}={}){return BP(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function BP(e){return[...new Set(e)]}function zP(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function UP(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(zP(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var HP=new Set([100,101,204,205]);function FP(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&wi(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function A1(){let e=E.useContext(Uo);return Iv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function GP(){let e=E.useContext(ch);return Iv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Lv=E.createContext(void 0);Lv.displayName="FrameworkContext";function w1(){let e=E.useContext(Lv);return Iv(e,"You must render this element inside a <HydratedRouter> element"),e}function $P(e,t){let n=E.useContext(Lv),[r,a]=E.useState(!1),[o,l]=E.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:y}=t,g=E.useRef(null);E.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=w=>{w.forEach(T=>{l(T.isIntersecting)})},A=new IntersectionObserver(S,{threshold:.5});return g.current&&A.observe(g.current),()=>{A.disconnect()}}},[e]),E.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let v=()=>{a(!0)},x=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:ec(u,v),onBlur:ec(d,x),onMouseEnter:ec(f,v),onMouseLeave:ec(m,x),onTouchStart:ec(y,v)}]:[!1,g,{}]}function ec(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function qP({page:e,...t}){let{router:n}=A1(),r=E.useMemo(()=>f1(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?E.createElement(WP,{page:e,matches:r,...t}):null}function KP(e){let{manifest:t,routeModules:n}=w1(),[r,a]=E.useState([]);return E.useEffect(()=>{let o=!1;return PP(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function WP({page:e,matches:t,...n}){let r=_a(),{manifest:a,routeModules:o}=w1(),{basename:l}=A1(),{loaderData:u,matches:d}=GP(),f=E.useMemo(()=>yS(e,t,d,a,r,"data"),[e,t,d,a,r]),m=E.useMemo(()=>yS(e,t,d,a,r,"assets"),[e,t,d,a,r]),y=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let x=new Set,S=!1;if(t.forEach(w=>{var R;let T=a.routes[w.route.id];!T||!T.hasLoader||(!f.some(D=>D.route.id===w.route.id)&&w.route.id in u&&((R=o[w.route.id])!=null&&R.shouldRevalidate)||T.hasClientLoader?S=!0:x.add(w.route.id))}),x.size===0)return[];let A=FP(e,l);return S&&x.size>0&&A.searchParams.set("_routes",t.filter(w=>x.has(w.route.id)).map(w=>w.route.id).join(",")),[A.pathname+A.search]},[l,u,r,a,f,t,e,o]),g=E.useMemo(()=>VP(m,a),[m,a]),v=KP(m);return E.createElement(E.Fragment,null,y.map(x=>E.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),g.map(x=>E.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),v.map(({key:x,link:S})=>E.createElement("link",{key:x,...S})))}function YP(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var T1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{T1&&(window.__reactRouterVersion="7.6.0")}catch{}function ZP({basename:e,children:t,window:n}){let r=E.useRef();r.current==null&&(r.current=jj({window:n,v5Compat:!0}));let a=r.current,[o,l]=E.useState({action:a.action,location:a.location}),u=E.useCallback(d=>{E.startTransition(()=>l(d))},[l]);return E.useLayoutEffect(()=>a.listen(u),[a,u]),E.createElement(wP,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a})}var C1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,R1=E.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:o,replace:l,state:u,target:d,to:f,preventScrollReset:m,viewTransition:y,...g},v){let{basename:x}=E.useContext(Xr),S=typeof f=="string"&&C1.test(f),A,w=!1;if(typeof f=="string"&&S&&(A=f,T1))try{let B=new URL(window.location.href),U=f.startsWith("//")?new URL(B.protocol+f):new URL(f),ue=wi(U.pathname,x);U.origin===B.origin&&ue!=null?f=ue+U.search+U.hash:w=!0}catch{Wr(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let T=cP(f,{relative:a}),[R,D,N]=$P(r,g),L=eV(f,{replace:l,state:u,target:d,preventScrollReset:m,relative:a,viewTransition:y});function O(B){t&&t(B),B.defaultPrevented||L(B)}let M=E.createElement("a",{...g,...N,href:A||T,onClick:w||o?t:O,ref:YP(v,D),target:d,"data-discover":!S&&n==="render"?"true":void 0});return R&&!S?E.createElement(E.Fragment,null,M,E.createElement(qP,{page:T})):M});R1.displayName="Link";var XP=E.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:l,viewTransition:u,children:d,...f},m){let y=Jc(l,{relative:f.relative}),g=_a(),v=E.useContext(ch),{navigator:x,basename:S}=E.useContext(Xr),A=v!=null&&aV(y)&&u===!0,w=x.encodeLocation?x.encodeLocation(y).pathname:y.pathname,T=g.pathname,R=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(T=T.toLowerCase(),R=R?R.toLowerCase():null,w=w.toLowerCase()),R&&S&&(R=wi(R,S)||R);const D=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let N=T===w||!a&&T.startsWith(w)&&T.charAt(D)==="/",L=R!=null&&(R===w||!a&&R.startsWith(w)&&R.charAt(w.length)==="/"),O={isActive:N,isPending:L,isTransitioning:A},M=N?t:void 0,B;typeof r=="function"?B=r(O):B=[r,N?"active":null,L?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(O):o;return E.createElement(R1,{...f,"aria-current":M,className:B,ref:m,style:U,to:l,viewTransition:u},typeof d=="function"?d(O):d)});XP.displayName="NavLink";var QP=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=tf,action:u,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:y,...g},v)=>{let x=rV(),S=iV(u,{relative:f}),A=l.toLowerCase()==="get"?"get":"post",w=typeof u=="string"&&C1.test(u),T=R=>{if(d&&d(R),R.defaultPrevented)return;R.preventDefault();let D=R.nativeEvent.submitter,N=(D==null?void 0:D.getAttribute("formmethod"))||l;x(D||R.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:o,relative:f,preventScrollReset:m,viewTransition:y})};return E.createElement("form",{ref:v,method:A,action:S,onSubmit:r?d:T,...g,"data-discover":!w&&e==="render"?"true":void 0})});QP.displayName="Form";function JP(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function N1(e){let t=E.useContext(Uo);return Ct(t,JP(e)),t}function eV(e,{target:t,replace:n,state:r,preventScrollReset:a,relative:o,viewTransition:l}={}){let u=uP(),d=_a(),f=Jc(e,{relative:o});return E.useCallback(m=>{if(OP(m,t)){m.preventDefault();let y=n!==void 0?n:Nc(d)===Nc(f);u(e,{replace:y,state:r,preventScrollReset:a,relative:o,viewTransition:l})}},[d,u,f,n,r,t,e,a,o,l])}var tV=0,nV=()=>`__${String(++tV)}__`;function rV(){let{router:e}=N1("useSubmit"),{basename:t}=E.useContext(Xr),n=xP();return E.useCallback(async(r,a={})=>{let{action:o,method:l,encType:u,formData:d,body:f}=LP(r,t);if(a.navigate===!1){let m=a.fetcherKey||nV();await e.fetch(m,n,a.action||o,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,n])}function iV(e,{relative:t}={}){let{basename:n}=E.useContext(Xr),r=E.useContext(Di);Ct(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...Jc(e||".",{relative:t})},l=_a();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),d=u.getAll("index");if(d.some(m=>m==="")){u.delete("index"),d.filter(y=>y).forEach(y=>u.append("index",y));let m=u.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Si([n,o.pathname])),Nc(o)}function aV(e,t={}){let n=E.useContext(v1);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=N1("useViewTransitionState"),a=Jc(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=wi(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=wi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return _f(a.pathname,l)!=null||_f(a.pathname,o)!=null}[...HP];var bs=HT();const sV=ah(bs);/**
54
+ * @license lucide-react v0.488.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
+ */const oV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lV=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),vS=e=>{const t=lV(e);return t.charAt(0).toUpperCase()+t.slice(1)},k1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
59
+ * @license lucide-react v0.488.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
+ */var cV={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"};/**
64
+ * @license lucide-react v0.488.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 uV=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...u},d)=>E.createElement("svg",{ref:d,...cV,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:k1("lucide",a),...u},[...l.map(([f,m])=>E.createElement(f,m)),...Array.isArray(o)?o:[o]]));/**
69
+ * @license lucide-react v0.488.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 St=(e,t)=>{const n=E.forwardRef(({className:r,...a},o)=>E.createElement(uV,{ref:o,iconNode:t,className:k1(`lucide-${oV(vS(e))}`,`lucide-${e}`,r),...a}));return n.displayName=vS(e),n};/**
74
+ * @license lucide-react v0.488.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 dV=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],fV=St("arrow-left",dV);/**
79
+ * @license lucide-react v0.488.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 hV=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],mV=St("arrow-up-from-line",hV);/**
84
+ * @license lucide-react v0.488.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 pV=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ho=St("check",pV);/**
89
+ * @license lucide-react v0.488.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 gV=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],O1=St("chevron-down",gV);/**
94
+ * @license lucide-react v0.488.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 yV=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],vV=St("chevron-left",yV);/**
99
+ * @license lucide-react v0.488.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 bV=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],xf=St("chevron-right",bV);/**
104
+ * @license lucide-react v0.488.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 _V=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xV=St("chevron-up",_V);/**
109
+ * @license lucide-react v0.488.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 EV=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],SV=St("chevrons-up-down",EV);/**
114
+ * @license lucide-react v0.488.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 AV=[["path",{d:"m12 15 2 2 4-4",key:"2c609p"}],["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"}]],wV=St("copy-check",AV);/**
119
+ * @license lucide-react v0.488.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 TV=[["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"}]],CV=St("copy",TV);/**
124
+ * @license lucide-react v0.488.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 RV=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],NV=St("download",RV);/**
129
+ * @license lucide-react v0.488.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 kV=[["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"}]],OV=St("external-link",kV);/**
134
+ * @license lucide-react v0.488.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 DV=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],IV=St("eye-off",DV);/**
139
+ * @license lucide-react v0.488.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 LV=[["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"}]],MV=St("eye",LV);/**
144
+ * @license lucide-react v0.488.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 jV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],PV=St("globe",jV);/**
149
+ * @license lucide-react v0.488.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 VV=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]],BV=St("move-vertical",VV);/**
154
+ * @license lucide-react v0.488.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 zV=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],D1=St("pencil",zV);/**
159
+ * @license lucide-react v0.488.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 UV=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],dh=St("plus",UV);/**
164
+ * @license lucide-react v0.488.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 HV=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],FV=St("rotate-ccw",HV);/**
169
+ * @license lucide-react v0.488.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 GV=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],bS=St("save",GV);/**
174
+ * @license lucide-react v0.488.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 $V=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],qV=St("search",$V);/**
179
+ * @license lucide-react v0.488.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 KV=[["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"}]],fh=St("trash",KV);/**
184
+ * @license lucide-react v0.488.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 WV=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],I1=St("wand-sparkles",WV);/**
189
+ * @license lucide-react v0.488.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 YV=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_s=St("x",YV);function L1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=L1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function hh(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=L1(e))&&(r&&(r+=" "),r+=t);return r}const Mv="-",ZV=e=>{const t=QV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Mv);return u[0]===""&&u.length!==1&&u.shift(),M1(u,t)||XV(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},M1=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?M1(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(Mv);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},_S=/^\[(.+)\]$/,XV=e=>{if(_S.test(e)){const t=_S.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},QV=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)uy(n[a],r,a,t);return r},uy=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:xS(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(JV(a)){uy(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,l])=>{uy(l,xS(t,o),n,r)})})},xS=(e,t)=>{let n=e;return t.split(Mv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},JV=e=>e.isThemeGetter,eB=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return a(o,l),l},set(o,l){n.has(o)?n.set(o,l):a(o,l)}}},dy="!",fy=":",tB=fy.length,nB=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const o=[];let l=0,u=0,d=0,f;for(let x=0;x<a.length;x++){let S=a[x];if(l===0&&u===0){if(S===fy){o.push(a.slice(d,x)),d=x+tB;continue}if(S==="/"){f=x;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const m=o.length===0?a:a.substring(d),y=rB(m),g=y!==m,v=f&&f>d?f-d:void 0;return{modifiers:o,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:v}};if(t){const a=t+fy,o=r;r=l=>l.startsWith(a)?o(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const a=r;r=o=>n({className:o,parseClassName:a})}return r},rB=e=>e.endsWith(dy)?e.substring(0,e.length-1):e.startsWith(dy)?e.substring(1):e,iB=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const a=[];let o=[];return r.forEach(l=>{l[0]==="["||t[l]?(a.push(...o.sort(),l),o=[]):o.push(l)}),a.push(...o.sort()),a}},aB=e=>({cache:eB(e.cacheSize),parseClassName:nB(e),sortModifiers:iB(e),...ZV(e)}),sB=/\s+/,oB=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:o}=t,l=[],u=e.trim().split(sB);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:y,modifiers:g,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:S}=n(m);if(y){d=m+(d.length>0?" "+d:d);continue}let A=!!S,w=r(A?x.substring(0,S):x);if(!w){if(!A){d=m+(d.length>0?" "+d:d);continue}if(w=r(x),!w){d=m+(d.length>0?" "+d:d);continue}A=!1}const T=o(g).join(":"),R=v?T+dy:T,D=R+w;if(l.includes(D))continue;l.push(D);const N=a(w,A);for(let L=0;L<N.length;++L){const O=N[L];l.push(R+O)}d=m+(d.length>0?" "+d:d)}return d};function lB(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=j1(t))&&(r&&(r+=" "),r+=n);return r}const j1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=j1(e[r]))&&(n&&(n+=" "),n+=t);return n};function cB(e,...t){let n,r,a,o=l;function l(d){const f=t.reduce((m,y)=>y(m),e());return n=aB(f),r=n.cache.get,a=n.cache.set,o=u,u(d)}function u(d){const f=r(d);if(f)return f;const m=oB(d,n);return a(d,m),m}return function(){return o(lB.apply(null,arguments))}}const $t=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},P1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,V1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,uB=/^\d+\/\d+$/,dB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fB=/\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$/,hB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,mB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,io=e=>uB.test(e),et=e=>!!e&&!Number.isNaN(Number(e)),na=e=>!!e&&Number.isInteger(Number(e)),ig=e=>e.endsWith("%")&&et(e.slice(0,-1)),bi=e=>dB.test(e),gB=()=>!0,yB=e=>fB.test(e)&&!hB.test(e),B1=()=>!1,vB=e=>mB.test(e),bB=e=>pB.test(e),_B=e=>!Ne(e)&&!ke(e),xB=e=>Fo(e,H1,B1),Ne=e=>P1.test(e),Ja=e=>Fo(e,F1,yB),ag=e=>Fo(e,TB,et),ES=e=>Fo(e,z1,B1),EB=e=>Fo(e,U1,bB),Od=e=>Fo(e,G1,vB),ke=e=>V1.test(e),tc=e=>Go(e,F1),SB=e=>Go(e,CB),SS=e=>Go(e,z1),AB=e=>Go(e,H1),wB=e=>Go(e,U1),Dd=e=>Go(e,G1,!0),Fo=(e,t,n)=>{const r=P1.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Go=(e,t,n=!1)=>{const r=V1.exec(e);return r?r[1]?t(r[1]):n:!1},z1=e=>e==="position"||e==="percentage",U1=e=>e==="image"||e==="url",H1=e=>e==="length"||e==="size"||e==="bg-size",F1=e=>e==="length",TB=e=>e==="number",CB=e=>e==="family-name",G1=e=>e==="shadow",RB=()=>{const e=$t("color"),t=$t("font"),n=$t("text"),r=$t("font-weight"),a=$t("tracking"),o=$t("leading"),l=$t("breakpoint"),u=$t("container"),d=$t("spacing"),f=$t("radius"),m=$t("shadow"),y=$t("inset-shadow"),g=$t("text-shadow"),v=$t("drop-shadow"),x=$t("blur"),S=$t("perspective"),A=$t("aspect"),w=$t("ease"),T=$t("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...D(),ke,Ne],L=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],M=()=>[ke,Ne,d],B=()=>[io,"full","auto",...M()],U=()=>[na,"none","subgrid",ke,Ne],ue=()=>["auto",{span:["full",na,ke,Ne]},na,ke,Ne],ie=()=>[na,"auto",ke,Ne],fe=()=>["auto","min","max","fr",ke,Ne],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...M()],ne=()=>[io,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],q=()=>[e,ke,Ne],ge=()=>[...D(),SS,ES,{position:[ke,Ne]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",AB,xB,{size:[ke,Ne]}],H=()=>[ig,tc,Ja],Q=()=>["","none","full",f,ke,Ne],re=()=>["",et,tc,Ja],he=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[et,ig,SS,ES],Ee=()=>["","none",x,ke,Ne],De=()=>["none",et,ke,Ne],Ce=()=>["none",et,ke,Ne],Fe=()=>[et,ke,Ne],Ke=()=>[io,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bi],breakpoint:[bi],color:[gB],container:[bi],"drop-shadow":[bi],ease:["in","out","in-out"],font:[_B],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bi],shadow:[bi],spacing:["px",et],text:[bi],"text-shadow":[bi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",io,Ne,ke,A]}],container:["container"],columns:[{columns:[et,Ne,ke,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[na,"auto",ke,Ne]}],basis:[{basis:[io,"full","auto",u,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[et,io,"auto","initial","none",Ne]}],grow:[{grow:["",et,ke,Ne]}],shrink:[{shrink:["",et,ke,Ne]}],order:[{order:[na,"first","last","none",ke,Ne]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":fe()}],"auto-rows":[{"auto-rows":fe()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],w:[{w:[u,"screen",...ne()]}],"min-w":[{"min-w":[u,"screen","none",...ne()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",n,tc,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ke,ag]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ig,Ne]}],"font-family":[{font:[SB,Ne,t]}],"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:[a,ke,Ne]}],"line-clamp":[{"line-clamp":[et,"none",ke,ag]}],leading:[{leading:[o,...M()]}],"list-image":[{"list-image":["none",ke,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[et,"from-font","auto",ke,Ja]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[et,"auto",ke,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ge()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},na,ke,Ne],radial:["",ke,Ne],conic:[na,ke,Ne]},wB,EB]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[et,ke,Ne]}],"outline-w":[{outline:["",et,tc,Ja]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",m,Dd,Od]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",y,Dd,Od]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[et,Ja]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",g,Dd,Od]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[et,ke,Ne]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[et]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[ke,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[et]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ge()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,Ne]}],filter:[{filter:["","none",ke,Ne]}],blur:[{blur:Ee()}],brightness:[{brightness:[et,ke,Ne]}],contrast:[{contrast:[et,ke,Ne]}],"drop-shadow":[{"drop-shadow":["","none",v,Dd,Od]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",et,ke,Ne]}],"hue-rotate":[{"hue-rotate":[et,ke,Ne]}],invert:[{invert:["",et,ke,Ne]}],saturate:[{saturate:[et,ke,Ne]}],sepia:[{sepia:["",et,ke,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,Ne]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[et,ke,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[et,ke,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",et,ke,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[et,ke,Ne]}],"backdrop-invert":[{"backdrop-invert":["",et,ke,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[et,ke,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[et,ke,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",et,ke,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[et,"initial",ke,Ne]}],ease:[{ease:["linear","initial",w,ke,Ne]}],delay:[{delay:[et,ke,Ne]}],animate:[{animate:["none",T,ke,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ke,Ne]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:Fe()}],"skew-x":[{"skew-x":Fe()}],"skew-y":[{"skew-y":Fe()}],transform:[{transform:[ke,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ke()}],"translate-x":[{"translate-x":Ke()}],"translate-y":[{"translate-y":Ke()}],"translate-z":[{"translate-z":Ke()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ke,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,Ne]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[et,tc,Ja,ag]}],stroke:[{stroke:["none",...q()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},$1=cB(RB),Ae=(...e)=>$1(hh(e)),AS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wS=hh,hr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return wS(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(f=>{const m=n==null?void 0:n[f],y=o==null?void 0:o[f];if(m===null)return null;const g=AS(m)||AS(y);return a[f][g]}),u=n&&Object.entries(n).reduce((f,m)=>{let[y,g]=m;return g===void 0||(f[y]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:y,className:g,...v}=m;return Object.entries(v).every(x=>{let[S,A]=x;return Array.isArray(A)?A.includes({...o,...u}[S]):{...o,...u}[S]===A})?[...f,y,g]:f},[]);return wS(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},NB=({className:e,strokeWidth:t=4})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"44",viewBox:"0 0 44 44",stroke:"currentColor",className:Ae("size-full",e),children:b.jsxs("g",{fill:"none",fillRule:"evenodd",strokeWidth:t,children:[b.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[b.jsx("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),b.jsx("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]}),b.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[b.jsx("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),b.jsx("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]})]})}),Co=({children:e,isLoading:t=!0,className:n,...r})=>b.jsx(b.Fragment,{children:t?b.jsx("div",{className:Ae("flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center",n),role:"status","aria-label":"Animated icon, meaning that the website is processing",...r,children:b.jsx(NB,{className:"size-10 max-h-full max-w-full"})}):e??b.jsx(b.Fragment,{})}),sg=hr("",{variants:{size:{sm:"size-3 absolute top-1/2 -translate-y-1/2",md:"size-4 absolute top-1/2 -translate-y-1/2",lg:"size-5 absolute top-1/2 -translate-y-1/2",xl:"size-6 absolute top-1/2 -translate-y-1/2","icon-sm":"size-3","icon-md":"size-4","icon-lg":"size-5","icon-xl":"size-6"},position:{left:"left-3",right:"right-3"}},defaultVariants:{size:"md"}}),kB=hr("relative cursor-pointer truncate whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"min-h-7 px-3 max-md:py-1 text-xs",md:"min-h-8 px-6 max-md:py-2 text-sm",lg:"min-h-10 px-8 max-md:py-3 text-lg",xl:"min-h-11 px-10 max-md:py-4 text-xl","icon-sm":"p-1.5","icon-md":"p-1.5","icon-lg":"p-2","icon-xl":"p-3"},color:{primary:"text-primary *:text-text-light",secondary:"text-secondary *:text-text-light",destructive:"text-destructive *:text-text-light",neutral:"text-neutral *:text-text-light",light:"text-white *:text-text-light",dark:"text-neutral-800 *:text-text-light",text:"text-text *:text-text-opposite","text-inverse":"text-text-opposite *:text-text",error:"text-error *:text-text-light",success:"text-success *:text-text-light",custom:""},variant:{default:"rounded-lg bg-current",none:"border-none bg-current/0 text-inherit hover:bg-current/0",outline:"*:!text-current rounded-lg border-[1.5px] bg-current/0 hover:bg-current/30",link:"*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline","invisible-link":"*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent",hoverable:"*:!text-current rounded-lg border-none bg-current/0 transition hover:bg-current/10 aria-[current]:bg-current/5",input:["*:!text-current w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error","disabled:opacity-50"]},textAlign:{left:"text-left",center:"text-center",right:"text-right"},isFullWidth:{true:"w-full",false:""},hasIconLeft:{true:"px-12",false:""},hasIconRight:{true:"pr-8",false:""}},defaultVariants:{variant:"default",size:"md",color:"primary",textAlign:"center",isFullWidth:!1,hasIconRight:!1,hasIconLeft:!1}}),yt=({variant:e,size:t,color:n,children:r,Icon:a,IconRight:o,iconClassName:l,isLoading:u,isActive:d,isFullWidth:f=!1,textAlign:m,disabled:y,label:g,className:v,type:x="button",...S})=>{const A=e==="link"||e==="invisible-link";return b.jsxs("button",{disabled:u||y,"aria-current":d?"page":void 0,"aria-label":g,"aria-busy":u,role:A?"link":void 0,type:x,className:kB({variant:e,size:t,color:n,isFullWidth:f,textAlign:m??(o?"left":"center"),hasIconLeft:typeof r<"u"&&(typeof a<"u"||typeof u<"u"),hasIconRight:typeof r<"u"&&typeof o<"u",className:v}),...S,children:[a&&!u&&b.jsx(a,{className:sg({size:t,className:l,position:"left"})}),b.jsx(Co,{className:sg({size:t,className:l,position:"left"}),isLoading:u??!1}),b.jsx("span",{children:r}),o&&b.jsx(o,{className:sg({size:t,className:l,position:"right"})})]})},q1=({children:e,isHidden:t,className:n="",isOverable:r=!1,isFocusable:a=!1,minHeight:o=0,...l})=>b.jsx("div",{"aria-hidden":a?t:void 0,tabIndex:a?0:void 0,role:a?"button":"none",className:Ae("group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-all duration-700 ease-in-out",typeof t<"u"&&!t&&"grid-rows-[1fr] overflow-x-auto",r&&"hover:grid-rows-[1fr] hover:overflow-x-auto",a&&"focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto",n),...l,children:b.jsx("div",{style:{minHeight:`${o}px`},className:Ae(r&&"group-hover/height-smoother:visible",a&&"group-focus/height-smoother:visible",n),children:e})}),K1=({children:e,header:t,isOpen:n=!1,onClick:r,...a})=>{const[o,l]=E.useState(n),u=o==null?void 0:!o;return E.useEffect(()=>{n!=null&&l(n)},[n]),b.jsxs("div",{className:"w-full",children:[b.jsx(yt,{variant:"hoverable",color:"text",onClick:d=>{l(f=>!f),r==null||r(d)},isFullWidth:!0,className:"flex items-center justify-between gap-2",IconRight:O1,iconClassName:Ae("transform transition-transform duration-500 ease-in-out",o?"rotate-0":"-rotate-180"),...a,children:t}),b.jsx(q1,{tabIndex:u!==!1?void 0:-1,isHidden:u,children:e})]})},OB={},TS=e=>{let t;const n=new Set,r=(m,y)=>{const g=typeof m=="function"?m(t):m;if(!Object.is(g,t)){const v=t;t=y??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(x=>x(t,v))}},a=()=>t,d={setState:r,getState:a,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(OB?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,a,d);return d},DB=e=>e?TS(e):TS;var og={exports:{}},lg={},cg={exports:{}},ug={};/**
194
+ * @license React
195
+ * use-sync-external-store-shim.production.js
196
+ *
197
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
198
+ *
199
+ * This source code is licensed under the MIT license found in the
200
+ * LICENSE file in the root directory of this source tree.
201
+ */var CS;function IB(){if(CS)return ug;CS=1;var e=Yc();function t(y,g){return y===g&&(y!==0||1/y===1/g)||y!==y&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(y,g){var v=g(),x=r({inst:{value:v,getSnapshot:g}}),S=x[0].inst,A=x[1];return o(function(){S.value=v,S.getSnapshot=g,d(S)&&A({inst:S})},[y,v,g]),a(function(){return d(S)&&A({inst:S}),y(function(){d(S)&&A({inst:S})})},[y]),l(v),v}function d(y){var g=y.getSnapshot;y=y.value;try{var v=g();return!n(y,v)}catch{return!0}}function f(y,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return ug.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,ug}var RS;function LB(){return RS||(RS=1,cg.exports=IB()),cg.exports}/**
202
+ * @license React
203
+ * use-sync-external-store-shim/with-selector.production.js
204
+ *
205
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
206
+ *
207
+ * This source code is licensed under the MIT license found in the
208
+ * LICENSE file in the root directory of this source tree.
209
+ */var NS;function MB(){if(NS)return lg;NS=1;var e=Yc(),t=LB();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return lg.useSyncExternalStoreWithSelector=function(f,m,y,g,v){var x=o(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=u(function(){function w(L){if(!T){if(T=!0,R=L,L=g(L),v!==void 0&&S.hasValue){var O=S.value;if(v(O,L))return D=O}return D=L}if(O=D,r(R,L))return O;var M=g(L);return v!==void 0&&v(O,M)?(R=L,O):(R=L,D=M)}var T=!1,R,D,N=y===void 0?null:y;return[function(){return w(m())},N===null?void 0:function(){return w(N())}]},[m,y,g,v]);var A=a(f,x[0],x[1]);return l(function(){S.hasValue=!0,S.value=A},[A]),d(A),A},lg}var kS;function jB(){return kS||(kS=1,og.exports=MB()),og.exports}var PB=jB();const VB=ah(PB),W1={},{useDebugValue:BB}=Ge,{useSyncExternalStoreWithSelector:zB}=VB;let OS=!1;const UB=e=>e;function HB(e,t=UB,n){(W1?"production":void 0)!=="production"&&n&&!OS&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),OS=!0);const r=zB(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return BB(r),r}const DS=e=>{(W1?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?DB(e):e,n=(r,a)=>HB(t,r,a);return Object.assign(n,t),n},Y1=e=>e?DS(e):DS,FB=Y1((e,t)=>({scrollBlockers:[],addBlockage:(n,r)=>e(a=>{const o=a.scrollBlockers,l=o.find(u=>u.element===r);if(l){const d=l.blockers.includes(n)?l.blockers:[...l.blockers,n];return{scrollBlockers:o.map(f=>f.element===r?{...f,blockers:d}:f)}}return r.style.overflowY="hidden",r.style.overflowX="hidden",{scrollBlockers:[...o,{element:r,blockers:[n]}]}}),removeBlockage:(n,r)=>e(a=>{const o=a.scrollBlockers,l=o.find(u=>u.element===r);return l?l.blockers.length>1?{scrollBlockers:o.map(u=>u.element===r?{...u,blockers:u.blockers.filter(d=>d!==n)}:u)}:(r.style.overflowY="auto",{scrollBlockers:o.filter(u=>u.element!==r)}):{scrollBlockers:o}}),isElementScrollBlocked:n=>t().scrollBlockers.some(r=>r.element===n)})),co=()=>({isFetched:!1,fetchedDateTime:null,isLoading:!1,isInvalidated:!1,error:null,isSuccess:!1,data:null,errorCount:0,isEnabled:!0}),dg=(e,t)=>t.filter(n=>e.includes(n.split("/")[0])),GB=(e,t)=>{var n;switch(t.type){case"SET_QUERY_STATE":{const{key:r,value:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??co(),...a}}}}case"MAKE_QUERY_IN_ERROR":{const{key:r,error:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??co(),error:a,isFetched:!0,isSuccess:!1,errorCount:(((n=e.states[r])==null?void 0:n.errorCount)??0)+1,isLoading:!1,isInvalidated:!1}}}}case"SET_QUERIES_STATE":{const{keys:r,value:a}=t,o=[r].flat(),l=Object.keys(e.states),u=dg(o,l);if(u.length===0)return e;const d=structuredClone(e.states);return u.forEach(f=>{d[f]={...e.states[f]??co(),...a}}),{...e,states:d}}case"RESET_KEY_STATE":{const{keys:r}=t,a=[r].flat();if(a.length===0)return e;const o=Object.keys(e.states),l=dg(a,o);if(l.length===0)return e;const u={...e.states};return l.forEach(d=>{u[d]=co()}),{...e,states:u}}case"RESET_STATE":{const r=[t.excludeKeys].flat(),a=Object.keys(e.states),o=dg(r,a),l={};return a.forEach(u=>{l[u]=o.includes(u)?e.states[u]:co()}),{...e,states:l}}default:return e}},Z1=E.createContext(null),$B=({children:e})=>{const[t,n]=E.useReducer(GB,{states:{}}),r=f=>t.states[f]??co(),a=(f,m)=>{n({type:"SET_QUERY_STATE",key:f,value:m})},o=(f,m)=>{n({type:"SET_QUERIES_STATE",keys:f,value:m})},l=(f,m)=>{n({type:"MAKE_QUERY_IN_ERROR",key:f,error:m})},u=f=>{n({type:"RESET_KEY_STATE",keys:f})},d=f=>{n({type:"RESET_STATE",excludeKeys:f})};return b.jsx(Z1.Provider,{value:{getStates:r,setQueryState:a,setQueriesState:o,makeQueryInError:l,resetKeyState:u,resetState:d},children:e})},qB=()=>{const e=E.useContext(Z1);if(!e)throw new Error("useAsyncState must be used within an AsyncStateProvider");return e},Id=new Map,KB=!1,WB=!1,YB=!0,ZB=!1,XB=1,QB=!1,JB=5*60*1e3,ez=5*60*1e3,hy=e=>e?Array.isArray(e)?e:[e]:[],IS=(e,t)=>hy(t).length>0?`${e}/${JSON.stringify(t)}`:e,eu=(e,t,n)=>{const r=(n==null?void 0:n.retryLimit)??XB,a=(n==null?void 0:n.autoFetch)??ZB,o=(n==null?void 0:n.retryTime)??ez,l=(n==null?void 0:n.cache)??KB,u=(n==null?void 0:n.store)??WB,d=(n==null?void 0:n.enable)??YB,f=(n==null?void 0:n.revalidation)??QB,m=(n==null?void 0:n.revalidateTime)??JB,y=(n==null?void 0:n.updateQueries)??[],g=(n==null?void 0:n.invalidateQueries)??[],v=n==null?void 0:n.onSuccess,x=n==null?void 0:n.onError,S=hy((n==null?void 0:n.args)??[]),{getStates:A,setQueryState:w,setQueriesState:T,makeQueryInError:R}=qB(),D=E.useRef(S),N=E.useRef(null),L=IS(e,D.current),{isFetched:O,fetchedDateTime:M,isLoading:B,isEnabled:U,error:ue,isSuccess:ie,isInvalidated:fe,data:Z,errorCount:ee}=A(L),F=async(...H)=>{const Q=IS(e,H);N.current&&N.current.abort();const re=new AbortController;if(N.current=re,Id.has(Q))return Id.get(Q);const he=(async()=>{w(Q,{isLoading:!0});let xe=null;return await t(...H).then(le=>{xe=le,w(Q,{data:le,errorCount:0,isLoading:!1,isFetched:!0,fetchedDateTime:new Date,isSuccess:!0,isInvalidated:!1,error:null}),v==null||v(le),g.length>0&&T(g,{isInvalidated:!0}),y.length>0&&T(y,{data:le}),u&&localStorage.setItem(Q,JSON.stringify(le))}).catch(le=>{console.error({error:le});const Ee=le instanceof Error?le.message:String(le);R(Q,Ee),x==null||x(le.message)}).finally(()=>{Id.delete(Q)}),xe})();return Id.set(Q,he),await he},ne=async(...H)=>{if(!(!U||!d))return H&&(D.current=hy(H)),await F(...D.current)},q=async(...H)=>!U||!d||B?void 0:!fe&&ie&&l&&Z?Z:await ne(...H);E.useEffect(()=>{d!==U&&w(L,{isEnabled:U})},[d,U,L]),E.useEffect(()=>{if(!U||!d||!u||fe||O||Z)return;const H=localStorage.getItem(L);try{H&&w(L,{data:JSON.parse(H)})}catch(Q){console.error(Q)}},[u,L,O,fe,U,d,Z]),E.useEffect(()=>{a&&(!U||!d||O&&!fe||B||F(...D.current))},[a,U,d,O,fe,B,F]),E.useEffect(()=>{const H=ee>0&&r>0,Q=ee>r;if(!U||!d||!H||Q||!(l||u)||B||ie)return;const re=setTimeout(()=>{F(...D.current)},o);return()=>clearTimeout(re)},[U,ee,r,d,o,l,u,ie,B,F]),E.useEffect(()=>{if(!f||m<=0||!U||!d||B||!ie||!M||!(l||u))return;const H=setTimeout(()=>{F(...D.current)},m);return()=>clearTimeout(H)},[f,m,l,u,ie,M,B,U,d,F]);const ge=H=>{w(L,{data:H})},P=()=>{N.current&&N.current.abort()},X={isFetched:O,isInvalidated:fe,error:ue,data:Z,errorCount:ee,isSuccess:ie,isEnabled:U,isDisabled:!U,isLoading:B,isWaitingData:B&&!O&&!Z,isRevalidating:B&&O,[e]:q,revalidate:ne,setData:ge,abort:P};return E.useEffect(()=>()=>{N.current&&N.current.abort()},[]),X},tz=e=>{var u;const t=Zr(),r=sh(void 0,e??t??tt),{data:a,isFetched:o}=eu("getCSRFToken",r.auth.getCSRFToken,{cache:!0,autoFetch:!0});return{csrfToken:(u=a==null?void 0:a.data)==null?void 0:u.csrf_token,csrfTokenFetched:o}},nz=e=>{const t=Zr(),n=e??t??tt,r=sh(void 0,n),{data:a}=eu("getOAuth2AccessToken",r.auth.getOAuth2AccessToken,{cache:!0,autoFetch:!0,enable:!!(n.editor.clientId&&n.editor.clientSecret)});return{oAuth2AccessToken:a==null?void 0:a.data}},rz=(e,t)=>{const n=Zr(),a=sh(void 0,t??n??tt),{getSession:o,revalidate:l,data:u,setData:d,isFetched:f}=eu("getSession",async()=>{try{const y=await a.auth.getSession();if(y.data){const{user:g,organization:v,project:x}=y.data;return{user:g,organization:v,isOrganizationAdmin:(g&&((v==null?void 0:v.adminsIds)??[]).includes(g._id))??!1,project:x,isProjectAdmin:(g&&((x==null?void 0:x.adminsIds)??[]).includes(g._id))??!1}}}catch(y){console.error(y)}return null},{cache:!0,store:!0,autoFetch:!0,enable:!e,invalidateQueries:["getOrganizations","getProjects","getUsers","getDictionaries"]});return{session:E.useMemo(()=>u??(f?null:void 0),[u,f]),fetchSession:o,revalidateSession:l,setSession:d}},tu=({session:e,intlayerConfiguration:t}={})=>{const{csrfToken:n,csrfTokenFetched:r}=tz(t),{session:a,fetchSession:o,revalidateSession:l,setSession:u}=rz(e,t),{oAuth2AccessToken:d}=nz(t);return{session:a,fetchSession:o,setSession:u,revalidateSession:l,csrfToken:n,csrfTokenFetched:r,oAuth2AccessToken:d,isAuthenticated:!!(a!=null&&a.user||d),isProjectAdmin:a==null?void 0:a.isProjectAdmin,isOrganizationAdmin:a==null?void 0:a.isOrganizationAdmin}};function st(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function LS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ds(...e){return t=>{let n=!1;const r=e.map(a=>{const o=LS(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():LS(e[a],null)}}}}function Nt(...e){return E.useCallback(ds(...e),e)}function iz(e,t){const n=E.createContext(t),r=o=>{const{children:l,...u}=o,d=E.useMemo(()=>u,Object.values(u));return b.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function a(o){const l=E.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function nu(e,t=[]){let n=[];function r(o,l){const u=E.createContext(l),d=n.length;n=[...n,l];const f=y=>{var w;const{scope:g,children:v,...x}=y,S=((w=g==null?void 0:g[e])==null?void 0:w[d])||u,A=E.useMemo(()=>x,Object.values(x));return b.jsx(S.Provider,{value:A,children:v})};f.displayName=o+"Provider";function m(y,g){var S;const v=((S=g==null?void 0:g[e])==null?void 0:S[d])||u,x=E.useContext(v);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${y}\` must be used within \`${o}\``)}return[f,m]}const a=()=>{const o=n.map(l=>E.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,az(a,...t)]}function az(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const y=d(o)[`__scope${f}`];return{...u,...y}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Ro(e){const t=oz(e),n=E.forwardRef((r,a)=>{const{children:o,...l}=r,u=E.Children.toArray(o),d=u.find(cz);if(d){const f=d.props.children,m=u.map(y=>y===d?E.Children.count(f)>1?E.Children.only(null):E.isValidElement(f)?f.props.children:null:y);return b.jsx(t,{...l,ref:a,children:E.isValidElement(f)?E.cloneElement(f,void 0,m):null})}return b.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var sz=Ro("Slot");function oz(e){const t=E.forwardRef((n,r)=>{const{children:a,...o}=n;if(E.isValidElement(a)){const l=dz(a),u=uz(o,a.props);return a.type!==E.Fragment&&(u.ref=r?ds(r,l):l),E.cloneElement(a,u)}return E.Children.count(a)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lz=Symbol("radix.slottable");function cz(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lz}function uz(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function dz(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function X1(e){const t=e+"CollectionProvider",[n,r]=nu(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:A,children:w}=S,T=Ge.useRef(null),R=Ge.useRef(new Map).current;return b.jsx(a,{scope:A,itemMap:R,collectionRef:T,children:w})};l.displayName=t;const u=e+"CollectionSlot",d=Ro(u),f=Ge.forwardRef((S,A)=>{const{scope:w,children:T}=S,R=o(u,w),D=Nt(A,R.collectionRef);return b.jsx(d,{ref:D,children:T})});f.displayName=u;const m=e+"CollectionItemSlot",y="data-radix-collection-item",g=Ro(m),v=Ge.forwardRef((S,A)=>{const{scope:w,children:T,...R}=S,D=Ge.useRef(null),N=Nt(A,D),L=o(m,w);return Ge.useEffect(()=>(L.itemMap.set(D,{ref:D,...R}),()=>void L.itemMap.delete(D))),b.jsx(g,{[y]:"",ref:N,children:T})});v.displayName=m;function x(S){const A=o(e+"CollectionConsumer",S);return Ge.useCallback(()=>{const T=A.collectionRef.current;if(!T)return[];const R=Array.from(T.querySelectorAll(`[${y}]`));return Array.from(A.itemMap.values()).sort((L,O)=>R.indexOf(L.ref.current)-R.indexOf(O.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:l,Slot:f,ItemSlot:v},x,r]}var fz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qe=fz.reduce((e,t)=>{const n=Ro(`Primitive.${t}`),r=E.forwardRef((a,o)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Q1(e,t){e&&bs.flushSync(()=>e.dispatchEvent(t))}function Tr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function hz(e,t=globalThis==null?void 0:globalThis.document){const n=Tr(e);E.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var mz="DismissableLayer",my="dismissableLayer.update",pz="dismissableLayer.pointerDownOutside",gz="dismissableLayer.focusOutside",MS,J1=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mh=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=E.useContext(J1),[m,y]=E.useState(null),g=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=E.useState({}),x=Nt(t,O=>y(O)),S=Array.from(f.layers),[A]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=S.indexOf(A),T=m?S.indexOf(m):-1,R=f.layersWithOutsidePointerEventsDisabled.size>0,D=T>=w,N=vz(O=>{const M=O.target,B=[...f.branches].some(U=>U.contains(M));!D||B||(a==null||a(O),l==null||l(O),O.defaultPrevented||u==null||u())},g),L=bz(O=>{const M=O.target;[...f.branches].some(U=>U.contains(M))||(o==null||o(O),l==null||l(O),O.defaultPrevented||u==null||u())},g);return hz(O=>{T===f.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&u&&(O.preventDefault(),u()))},g),E.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(MS=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),jS(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=MS)}},[m,g,n,f]),E.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),jS())},[m,f]),E.useEffect(()=>{const O=()=>v({});return document.addEventListener(my,O),()=>document.removeEventListener(my,O)},[]),b.jsx(Qe.div,{...d,ref:x,style:{pointerEvents:R?D?"auto":"none":void 0,...e.style},onFocusCapture:st(e.onFocusCapture,L.onFocusCapture),onBlurCapture:st(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:st(e.onPointerDownCapture,N.onPointerDownCapture)})});mh.displayName=mz;var yz="DismissableLayerBranch",eC=E.forwardRef((e,t)=>{const n=E.useContext(J1),r=E.useRef(null),a=Nt(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),b.jsx(Qe.div,{...e,ref:a})});eC.displayName=yz;function vz(e,t=globalThis==null?void 0:globalThis.document){const n=Tr(e),r=E.useRef(!1),a=E.useRef(()=>{});return E.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){tC(pz,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function bz(e,t=globalThis==null?void 0:globalThis.document){const n=Tr(e),r=E.useRef(!1);return E.useEffect(()=>{const a=o=>{o.target&&!r.current&&tC(gz,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function jS(){const e=new CustomEvent(my);document.dispatchEvent(e)}function tC(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Q1(a,o):a.dispatchEvent(o)}var _z=mh,xz=eC,dn=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},Ez="Portal",ph=E.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[a,o]=E.useState(!1);dn(()=>o(!0),[]);const l=n||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?sV.createPortal(b.jsx(Qe.div,{...r,ref:t}),l):null});ph.displayName=Ez;function Sz(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var ru=e=>{const{present:t,children:n}=e,r=Az(t),a=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=Nt(r.ref,wz(a));return typeof n=="function"||r.isPresent?E.cloneElement(a,{ref:o}):null};ru.displayName="Presence";function Az(e){const[t,n]=E.useState(),r=E.useRef(null),a=E.useRef(e),o=E.useRef("none"),l=e?"mounted":"unmounted",[u,d]=Sz(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const f=Ld(r.current);o.current=u==="mounted"?f:"none"},[u]),dn(()=>{const f=r.current,m=a.current;if(m!==e){const g=o.current,v=Ld(f);e?d("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),dn(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,y=v=>{const S=Ld(r.current).includes(v.animationName);if(v.target===t&&S&&(d("ANIMATION_END"),!a.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},g=v=>{v.target===t&&(o.current=Ld(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:E.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Ld(e){return(e==null?void 0:e.animationName)||"none"}function wz(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Tz=UT[" useInsertionEffect ".trim().toString()]||dn;function Ef({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,l]=Cz({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:a;{const m=E.useRef(e!==void 0);E.useEffect(()=>{const y=m.current;y!==u&&console.warn(`${r} is changing from ${y?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const f=E.useCallback(m=>{var y;if(u){const g=Rz(m)?m(e):m;g!==e&&((y=l.current)==null||y.call(l,g))}else o(m)},[u,e,o,l]);return[d,f]}function Cz({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),a=E.useRef(n),o=E.useRef(t);return Tz(()=>{o.current=t},[t]),E.useEffect(()=>{var l;a.current!==n&&((l=o.current)==null||l.call(o,n),a.current=n)},[n,a]),[n,r,o]}function Rz(e){return typeof e=="function"}var nC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Nz="VisuallyHidden",jv=E.forwardRef((e,t)=>b.jsx(Qe.span,{...e,ref:t,style:{...nC,...e.style}}));jv.displayName=Nz;var Pv="ToastProvider",[Vv,kz,Oz]=X1("Toast"),[rC,Dz]=nu("Toast",[Oz]),[Iz,gh]=rC(Pv),Bv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:l}=e,[u,d]=E.useState(null),[f,m]=E.useState(0),y=E.useRef(!1),g=E.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Pv}\`. Expected non-empty \`string\`.`),b.jsx(Vv.Provider,{scope:t,children:b.jsx(Iz,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:o,toastCount:f,viewport:u,onViewportChange:d,onToastAdd:E.useCallback(()=>m(v=>v+1),[]),onToastRemove:E.useCallback(()=>m(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:g,children:l})})};Bv.displayName=Pv;var iC="ToastViewport",Lz=["F8"],py="toast.viewportPause",gy="toast.viewportResume",zv=E.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Lz,label:a="Notifications ({hotkey})",...o}=e,l=gh(iC,n),u=kz(n),d=E.useRef(null),f=E.useRef(null),m=E.useRef(null),y=E.useRef(null),g=Nt(t,y,l.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=l.toastCount>0;E.useEffect(()=>{const A=w=>{var R;r.length!==0&&r.every(D=>w[D]||w.code===D)&&((R=y.current)==null||R.focus())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[r]),E.useEffect(()=>{const A=d.current,w=y.current;if(x&&A&&w){const T=()=>{if(!l.isClosePausedRef.current){const L=new CustomEvent(py);w.dispatchEvent(L),l.isClosePausedRef.current=!0}},R=()=>{if(l.isClosePausedRef.current){const L=new CustomEvent(gy);w.dispatchEvent(L),l.isClosePausedRef.current=!1}},D=L=>{!A.contains(L.relatedTarget)&&R()},N=()=>{A.contains(document.activeElement)||R()};return A.addEventListener("focusin",T),A.addEventListener("focusout",D),A.addEventListener("pointermove",T),A.addEventListener("pointerleave",N),window.addEventListener("blur",T),window.addEventListener("focus",R),()=>{A.removeEventListener("focusin",T),A.removeEventListener("focusout",D),A.removeEventListener("pointermove",T),A.removeEventListener("pointerleave",N),window.removeEventListener("blur",T),window.removeEventListener("focus",R)}}},[x,l.isClosePausedRef]);const S=E.useCallback(({tabbingDirection:A})=>{const T=u().map(R=>{const D=R.ref.current,N=[D,...Kz(D)];return A==="forwards"?N:N.reverse()});return(A==="forwards"?T.reverse():T).flat()},[u]);return E.useEffect(()=>{const A=y.current;if(A){const w=T=>{var N,L,O;const R=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!R){const M=document.activeElement,B=T.shiftKey;if(T.target===A&&B){(N=f.current)==null||N.focus();return}const ie=S({tabbingDirection:B?"backwards":"forwards"}),fe=ie.findIndex(Z=>Z===M);fg(ie.slice(fe+1))?T.preventDefault():B?(L=f.current)==null||L.focus():(O=m.current)==null||O.focus()}};return A.addEventListener("keydown",w),()=>A.removeEventListener("keydown",w)}},[u,S]),b.jsxs(xz,{ref:d,role:"region","aria-label":a.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&b.jsx(yy,{ref:f,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"forwards"});fg(A)}}),b.jsx(Vv.Slot,{scope:n,children:b.jsx(Qe.ol,{tabIndex:-1,...o,ref:g})}),x&&b.jsx(yy,{ref:m,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"backwards"});fg(A)}})]})});zv.displayName=iC;var aC="ToastFocusProxy",yy=E.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=gh(aC,n);return b.jsx(jv,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{var f;const u=l.relatedTarget;!((f=o.viewport)!=null&&f.contains(u))&&r()}})});yy.displayName=aC;var iu="Toast",Mz="toast.swipeStart",jz="toast.swipeMove",Pz="toast.swipeCancel",Vz="toast.swipeEnd",Uv=E.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...l}=e,[u,d]=Ef({prop:r,defaultProp:a??!0,onChange:o,caller:iu});return b.jsx(ru,{present:n||u,children:b.jsx(Uz,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:Tr(e.onPause),onResume:Tr(e.onResume),onSwipeStart:st(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:st(e.onSwipeMove,f=>{const{x:m,y}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:st(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:st(e.onSwipeEnd,f=>{const{x:m,y}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),d(!1)})})})});Uv.displayName=iu;var[Bz,zz]=rC(iu,{onClose(){}}),Uz=E.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:o,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:f,onSwipeStart:m,onSwipeMove:y,onSwipeCancel:g,onSwipeEnd:v,...x}=e,S=gh(iu,n),[A,w]=E.useState(null),T=Nt(t,Z=>w(Z)),R=E.useRef(null),D=E.useRef(null),N=a||S.duration,L=E.useRef(0),O=E.useRef(N),M=E.useRef(0),{onToastAdd:B,onToastRemove:U}=S,ue=Tr(()=>{var ee;(A==null?void 0:A.contains(document.activeElement))&&((ee=S.viewport)==null||ee.focus()),l()}),ie=E.useCallback(Z=>{!Z||Z===1/0||(window.clearTimeout(M.current),L.current=new Date().getTime(),M.current=window.setTimeout(ue,Z))},[ue]);E.useEffect(()=>{const Z=S.viewport;if(Z){const ee=()=>{ie(O.current),f==null||f()},F=()=>{const ne=new Date().getTime()-L.current;O.current=O.current-ne,window.clearTimeout(M.current),d==null||d()};return Z.addEventListener(py,F),Z.addEventListener(gy,ee),()=>{Z.removeEventListener(py,F),Z.removeEventListener(gy,ee)}}},[S.viewport,N,d,f,ie]),E.useEffect(()=>{o&&!S.isClosePausedRef.current&&ie(N)},[o,N,S.isClosePausedRef,ie]),E.useEffect(()=>(B(),()=>U()),[B,U]);const fe=E.useMemo(()=>A?cC(A):null,[A]);return S.viewport?b.jsxs(b.Fragment,{children:[fe&&b.jsx(Hz,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:fe}),b.jsx(Bz,{scope:n,onClose:ue,children:bs.createPortal(b.jsx(Vv.ItemSlot,{scope:n,children:b.jsx(_z,{asChild:!0,onEscapeKeyDown:st(u,()=>{S.isFocusedToastEscapeKeyDownRef.current||ue(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(Qe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":S.swipeDirection,...x,ref:T,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:st(e.onKeyDown,Z=>{Z.key==="Escape"&&(u==null||u(Z.nativeEvent),Z.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,ue()))}),onPointerDown:st(e.onPointerDown,Z=>{Z.button===0&&(R.current={x:Z.clientX,y:Z.clientY})}),onPointerMove:st(e.onPointerMove,Z=>{if(!R.current)return;const ee=Z.clientX-R.current.x,F=Z.clientY-R.current.y,ne=!!D.current,q=["left","right"].includes(S.swipeDirection),ge=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,P=q?ge(0,ee):0,X=q?0:ge(0,F),H=Z.pointerType==="touch"?10:2,Q={x:P,y:X},re={originalEvent:Z,delta:Q};ne?(D.current=Q,Md(jz,y,re,{discrete:!1})):PS(Q,S.swipeDirection,H)?(D.current=Q,Md(Mz,m,re,{discrete:!1}),Z.target.setPointerCapture(Z.pointerId)):(Math.abs(ee)>H||Math.abs(F)>H)&&(R.current=null)}),onPointerUp:st(e.onPointerUp,Z=>{const ee=D.current,F=Z.target;if(F.hasPointerCapture(Z.pointerId)&&F.releasePointerCapture(Z.pointerId),D.current=null,R.current=null,ee){const ne=Z.currentTarget,q={originalEvent:Z,delta:ee};PS(ee,S.swipeDirection,S.swipeThreshold)?Md(Vz,v,q,{discrete:!0}):Md(Pz,g,q,{discrete:!0}),ne.addEventListener("click",ge=>ge.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),Hz=e=>{const{__scopeToast:t,children:n,...r}=e,a=gh(iu,t),[o,l]=E.useState(!1),[u,d]=E.useState(!1);return $z(()=>l(!0)),E.useEffect(()=>{const f=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(f)},[]),u?null:b.jsx(ph,{asChild:!0,children:b.jsx(jv,{...r,children:o&&b.jsxs(b.Fragment,{children:[a.label," ",n]})})})},Fz="ToastTitle",Hv=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(Qe.div,{...r,ref:t})});Hv.displayName=Fz;var Gz="ToastDescription",Fv=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(Qe.div,{...r,ref:t})});Fv.displayName=Gz;var sC="ToastAction",Gv=E.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(lC,{altText:n,asChild:!0,children:b.jsx(yh,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${sC}\`. Expected non-empty \`string\`.`),null)});Gv.displayName=sC;var oC="ToastClose",yh=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=zz(oC,n);return b.jsx(lC,{asChild:!0,children:b.jsx(Qe.button,{type:"button",...r,ref:t,onClick:st(e.onClick,a.onClose)})})});yh.displayName=oC;var lC=E.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return b.jsx(Qe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function cC(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),qz(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...cC(r))}}),t}function Md(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Q1(a,o):a.dispatchEvent(o)}var PS=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),o=r>a;return t==="left"||t==="right"?o&&r>n:!o&&a>n};function $z(e=()=>{}){const t=Tr(e);dn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function qz(e){return e.nodeType===e.ELEMENT_NODE}function Kz(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fg(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Wz=Bv,uC=zv,dC=Uv,fC=Hv,hC=Fv,Yz=Gv,mC=yh;const Zz=Object.freeze(Object.defineProperty({__proto__:null,Action:Yz,Close:mC,Description:hC,Provider:Wz,Root:dC,Title:fC,Toast:Uv,ToastAction:Gv,ToastClose:yh,ToastDescription:Fv,ToastProvider:Bv,ToastTitle:Hv,ToastViewport:zv,Viewport:uC,createToastScope:Dz},Symbol.toStringTag,{value:"Module"})),Xz=Zz,Qz=({className:e,...t})=>b.jsx(uC,{className:Ae("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}),Jz=hr("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md p-4 pr-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{error:"bg-error/40 text-text",success:"bg-success/30 text-text",default:"bg-card/80 text-text"}},defaultVariants:{variant:"default"}}),e2=({className:e,variant:t,...n})=>b.jsx(dC,{className:Ae(Jz({variant:t}),e),...n}),t2=({className:e,...t})=>b.jsx(mC,{className:Ae("text-text/50 hover:text-text/80 focus:outline-hidden absolute right-1 top-1 rounded-md p-1 opacity-0 transition-opacity focus:opacity-100 focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:b.jsx(_s,{className:"size-5"})}),n2=({className:e,...t})=>b.jsx(fC,{className:Ae("text-sm font-semibold [&+div]:text-xs",e),...t}),r2=({className:e,...t})=>b.jsx(hC,{className:Ae("text-sm opacity-90",e),...t}),i2=1,a2=15*60*1e3;let hg=0;const s2=()=>(hg=(hg+1)%Number.MAX_SAFE_INTEGER,hg.toString()),mg=new Map,VS=e=>{if(mg.has(e))return;const t=setTimeout(()=>{mg.delete(e),yc({type:"REMOVE_TOAST",toastId:e})},a2);mg.set(e,t)},o2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,i2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?VS(n):e.toasts.forEach(r=>{VS(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},rf=[];let af={toasts:[]};const yc=e=>{af=o2(af,e),rf.forEach(t=>{t(af)})},l2=({...e})=>{const t=s2(),n=a=>yc({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>yc({type:"DISMISS_TOAST",toastId:t});return yc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}},pC=()=>{const[e,t]=E.useState(af);return E.useEffect(()=>(rf.push(t),()=>{const n=rf.indexOf(t);n>-1&&rf.splice(n,1)}),[e]),{...e,toast:l2,dismiss:n=>yc({type:"DISMISS_TOAST",toastId:n})}},Nr=e=>{const t=Zr(),{csrfToken:n,oAuth2AccessToken:r}=tu(),a=r!=null&&r.accessToken?{Authorization:`Bearer ${r.accessToken}`}:void 0;return sh({headers:a,body:n?{csrf_token:n}:void 0},t)};var c2={};const gC=e=>{const{toast:t}=pC();return{...e,onError:n=>{var a;let r;try{if(typeof n>"u")return;r=JSON.parse(n)}catch{r=n}[r].flatMap(o=>o).forEach(o=>t({title:(c2.NODE_ENV==="production"?o.title:o.code)??"Error",description:o.message??n??"An error occurred",variant:"error"})),(a=e.onError)==null||a.call(e,n)},onSuccess:n=>{var r;n!=null&&n.message&&t({title:n.message,description:n.description,variant:"success"}),(r=e.onSuccess)==null||r.call(e,n)}}},u2=(e,{requireUser:t,requireProject:n,requireOrganization:r}={})=>{const a=Zr(),{csrfToken:o,oAuth2AccessToken:l,session:u}=tu({intlayerConfiguration:a}),d=(e==null?void 0:e.enable)??!0,f=u?u.user:l==null?void 0:l.user,m=u?u.organization:l==null?void 0:l.organization,y=u?u.project:l==null?void 0:l.project;return{...e,enable:d&&(t?!!f:!0)&&(n?!!y:!0)&&(r?!!m:!0)&&(!!o||!u&&!!l)}},Ii=(e,t,n,r)=>{const a=u2(n??{},r),o=gC(a);return eu(e,t,o)},yC=(e,t,n)=>{const r=gC(n??{});return eu(e,t,r)},d2=e=>Ii("logout",Nr().auth.logout,{invalidateQueries:["getSession"],...e}),f2=e=>Ii("getProjects",Nr().project.getProjects,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),h2=e=>Ii("getDictionaries",Nr().dictionary.getDictionaries,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0,requireProject:!0}),m2=e=>Ii("pushDictionaries",Nr().dictionary.pushDictionaries,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),p2=e=>Ii("deleteDictionary",Nr().dictionary.deleteDictionary,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),g2=e=>Ii("getTags",Nr().tag.getTags,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),y2=e=>Ii("auditContentDeclaration",Nr().ai.auditContentDeclarationMetadata,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),v2=e=>Ii("auditContentDeclarationField",Nr().ai.auditContentDeclarationField,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),b2=e=>Ii("autocomplete",Nr().ai.autocomplete,e),_2=e=>yC("writeDictionary",Nr().editor.writeDictionary,e),x2=e=>yC("getDictionaries",Nr().editor.getDictionaries,{store:!0,cache:!0,...e});var pg,BS;function E2(){if(BS)return pg;BS=1;var e=function(T){return t(T)&&!n(T)};function t(w){return!!w&&typeof w=="object"}function n(w){var T=Object.prototype.toString.call(w);return T==="[object RegExp]"||T==="[object Date]"||o(w)}var r=typeof Symbol=="function"&&Symbol.for,a=r?Symbol.for("react.element"):60103;function o(w){return w.$$typeof===a}function l(w){return Array.isArray(w)?[]:{}}function u(w,T){return T.clone!==!1&&T.isMergeableObject(w)?S(l(w),w,T):w}function d(w,T,R){return w.concat(T).map(function(D){return u(D,R)})}function f(w,T){if(!T.customMerge)return S;var R=T.customMerge(w);return typeof R=="function"?R:S}function m(w){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(w).filter(function(T){return Object.propertyIsEnumerable.call(w,T)}):[]}function y(w){return Object.keys(w).concat(m(w))}function g(w,T){try{return T in w}catch{return!1}}function v(w,T){return g(w,T)&&!(Object.hasOwnProperty.call(w,T)&&Object.propertyIsEnumerable.call(w,T))}function x(w,T,R){var D={};return R.isMergeableObject(w)&&y(w).forEach(function(N){D[N]=u(w[N],R)}),y(T).forEach(function(N){v(w,N)||(g(w,N)&&R.isMergeableObject(T[N])?D[N]=f(N,R)(w[N],T[N],R):D[N]=u(T[N],R))}),D}function S(w,T,R){R=R||{},R.arrayMerge=R.arrayMerge||d,R.isMergeableObject=R.isMergeableObject||e,R.cloneUnlessOtherwiseSpecified=u;var D=Array.isArray(T),N=Array.isArray(w),L=D===N;return L?D?R.arrayMerge(w,T,R):x(w,T,R):u(T,R)}S.all=function(T,R){if(!Array.isArray(T))throw new Error("first argument should be an array");return T.reduce(function(D,N){return S(D,N,R)},{})};var A=S;return pg=A,pg}var S2=E2();const A2=ah(S2),w2=()=>{const{session:e,revalidateSession:t,setSession:n}=tu(),{logout:r}=d2(),a=e!=null&&e.user?"authenticated":"unauthenticated",o=a==="authenticated",l=a==="unauthenticated",u=e==null?void 0:e.user;return{isAuthenticated:o,isUnauthenticated:l,user:u,revalidateSession:t,logout:async()=>{n(null),await r()}}};var au=e=>e.type==="checkbox",is=e=>e instanceof Date,An=e=>e==null;const vC=e=>typeof e=="object";var Pt=e=>!An(e)&&!Array.isArray(e)&&vC(e)&&!is(e),bC=e=>Pt(e)&&e.target?au(e.target)?e.target.checked:e.target.value:e,T2=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,_C=(e,t)=>e.has(T2(t)),C2=e=>{const t=e.constructor&&e.constructor.prototype;return Pt(t)&&t.hasOwnProperty("isPrototypeOf")},$v=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cn(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!($v&&(e instanceof Blob||r))&&(n||Pt(e)))if(t=n?[]:{},!n&&!C2(e))t=e;else for(const a in e)e.hasOwnProperty(a)&&(t[a]=cn(e[a]));else return e;return t}var vh=e=>Array.isArray(e)?e.filter(Boolean):[],jt=e=>e===void 0,Se=(e,t,n)=>{if(!t||!Pt(e))return n;const r=vh(t.split(/[,[\].]+?/)).reduce((a,o)=>An(a)?a:a[o],e);return jt(r)||r===e?jt(e[t])?n:e[t]:r},Un=e=>typeof e=="boolean",qv=e=>/^\w*$/.test(e),xC=e=>vh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),mt=(e,t,n)=>{let r=-1;const a=qv(t)?[t]:xC(t),o=a.length,l=o-1;for(;++r<o;){const u=a[r];let d=n;if(r!==l){const f=e[u];d=Pt(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Sf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ar={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},_i={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},EC=Ge.createContext(null),xa=()=>Ge.useContext(EC),R2=e=>{const{children:t,...n}=e;return Ge.createElement(EC.Provider,{value:n},t)};var SC=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(a,o,{get:()=>{const l=o;return t._proxyFormState[l]!==Ar.all&&(t._proxyFormState[l]=!r||Ar.all),n&&(n[l]=!0),e[l]}});return a};const Kv=typeof window<"u"?E.useLayoutEffect:E.useEffect;function N2(e){const t=xa(),{control:n=t.control,disabled:r,name:a,exact:o}=e||{},[l,u]=Ge.useState(n._formState),d=Ge.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Kv(()=>n._subscribe({name:a,formState:d.current,exact:o,callback:f=>{!r&&u({...n._formState,...f})}}),[a,r,o]),Ge.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),Ge.useMemo(()=>SC(l,n,d.current,!1),[l,n])}var zr=e=>typeof e=="string",AC=(e,t,n,r,a)=>zr(e)?(r&&t.watch.add(e),Se(n,e,a)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Se(n,o))):(r&&(t.watchAll=!0),n);function k2(e){const t=xa(),{control:n=t.control,name:r,defaultValue:a,disabled:o,exact:l}=e||{},u=Ge.useRef(a),[d,f]=Ge.useState(n._getWatch(r,u.current));return Kv(()=>n._subscribe({name:r,formState:{values:!0},exact:l,callback:m=>!o&&f(AC(r,n._names,m.values||n._formValues,!1,u.current))}),[r,n,o,l]),Ge.useEffect(()=>n._removeUnmounted()),d}function O2(e){const t=xa(),{name:n,disabled:r,control:a=t.control,shouldUnregister:o}=e,l=_C(a._names.array,n),u=k2({control:a,name:n,defaultValue:Se(a._formValues,n,Se(a._defaultValues,n,e.defaultValue)),exact:!0}),d=N2({control:a,name:n,exact:!0}),f=Ge.useRef(e),m=Ge.useRef(a.register(n,{...e.rules,value:u,...Un(e.disabled)?{disabled:e.disabled}:{}})),y=Ge.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Se(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Se(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Se(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Se(d.validatingFields,n)},error:{enumerable:!0,get:()=>Se(d.errors,n)}}),[d,n]),g=Ge.useCallback(A=>m.current.onChange({target:{value:bC(A),name:n},type:Sf.CHANGE}),[n]),v=Ge.useCallback(()=>m.current.onBlur({target:{value:Se(a._formValues,n),name:n},type:Sf.BLUR}),[n,a._formValues]),x=Ge.useCallback(A=>{const w=Se(a._fields,n);w&&A&&(w._f.ref={focus:()=>A.focus(),select:()=>A.select(),setCustomValidity:T=>A.setCustomValidity(T),reportValidity:()=>A.reportValidity()})},[a._fields,n]),S=Ge.useMemo(()=>({name:n,value:u,...Un(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:g,onBlur:v,ref:x}),[n,r,d.disabled,g,v,x,u]);return Ge.useEffect(()=>{const A=a._options.shouldUnregister||o;a.register(n,{...f.current.rules,...Un(f.current.disabled)?{disabled:f.current.disabled}:{}});const w=(T,R)=>{const D=Se(a._fields,T);D&&D._f&&(D._f.mount=R)};if(w(n,!0),A){const T=cn(Se(a._options.defaultValues,n));mt(a._defaultValues,n,T),jt(Se(a._formValues,n))&&mt(a._formValues,n,T)}return!l&&a.register(n),()=>{(l?A&&!a._state.action:A)?a.unregister(n):w(n,!1)}},[n,a,l,o]),Ge.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),Ge.useMemo(()=>({field:S,formState:d,fieldState:y}),[S,d,y])}const D2=e=>e.render(O2(e));var wC=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},vc=e=>Array.isArray(e)?e:[e],zS=()=>{let e=[];return{get observers(){return e},next:a=>{for(const o of e)o.next&&o.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(o=>o!==a)}}),unsubscribe:()=>{e=[]}}},vy=e=>An(e)||!vC(e);function la(e,t){if(vy(e)||vy(t))return e===t;if(is(e)&&is(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const o=e[a];if(!r.includes(a))return!1;if(a!=="ref"){const l=t[a];if(is(o)&&is(l)||Pt(o)&&Pt(l)||Array.isArray(o)&&Array.isArray(l)?!la(o,l):o!==l)return!1}}return!0}var Sn=e=>Pt(e)&&!Object.keys(e).length,Wv=e=>e.type==="file",wr=e=>typeof e=="function",Af=e=>{if(!$v)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},TC=e=>e.type==="select-multiple",Yv=e=>e.type==="radio",I2=e=>Yv(e)||au(e),gg=e=>Af(e)&&e.isConnected;function L2(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=jt(e)?r++:e[t[r++]];return e}function M2(e){for(const t in e)if(e.hasOwnProperty(t)&&!jt(e[t]))return!1;return!0}function qt(e,t){const n=Array.isArray(t)?t:qv(t)?[t]:xC(t),r=n.length===1?e:L2(e,n),a=n.length-1,o=n[a];return r&&delete r[o],a!==0&&(Pt(r)&&Sn(r)||Array.isArray(r)&&M2(r))&&qt(e,n.slice(0,-1)),e}var CC=e=>{for(const t in e)if(wr(e[t]))return!0;return!1};function wf(e,t={}){const n=Array.isArray(e);if(Pt(e)||n)for(const r in e)Array.isArray(e[r])||Pt(e[r])&&!CC(e[r])?(t[r]=Array.isArray(e[r])?[]:{},wf(e[r],t[r])):An(e[r])||(t[r]=!0);return t}function RC(e,t,n){const r=Array.isArray(e);if(Pt(e)||r)for(const a in e)Array.isArray(e[a])||Pt(e[a])&&!CC(e[a])?jt(t)||vy(n[a])?n[a]=Array.isArray(e[a])?wf(e[a],[]):{...wf(e[a])}:RC(e[a],An(t)?{}:t[a],n[a]):n[a]=!la(e[a],t[a]);return n}var nc=(e,t)=>RC(e,t,wf(t));const US={value:!1,isValid:!1},HS={value:!0,isValid:!0};var NC=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!jt(e[0].attributes.value)?jt(e[0].value)||e[0].value===""?HS:{value:e[0].value,isValid:!0}:HS:US}return US},kC=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>jt(e)?e:t?e===""?NaN:e&&+e:n&&zr(e)?new Date(e):r?r(e):e;const FS={isValid:!1,value:null};var OC=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,FS):FS;function GS(e){const t=e.ref;return Wv(t)?t.files:Yv(t)?OC(e.refs).value:TC(t)?[...t.selectedOptions].map(({value:n})=>n):au(t)?NC(e.refs).value:kC(jt(t.value)?e.ref.value:t.value,e)}var j2=(e,t,n,r)=>{const a={};for(const o of e){const l=Se(t,o);l&&mt(a,o,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},Tf=e=>e instanceof RegExp,rc=e=>jt(e)?e:Tf(e)?e.source:Pt(e)?Tf(e.value)?e.value.source:e.value:e,$S=e=>({isOnSubmit:!e||e===Ar.onSubmit,isOnBlur:e===Ar.onBlur,isOnChange:e===Ar.onChange,isOnAll:e===Ar.all,isOnTouch:e===Ar.onTouched});const qS="AsyncFunction";var P2=e=>!!e&&!!e.validate&&!!(wr(e.validate)&&e.validate.constructor.name===qS||Pt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===qS)),V2=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),KS=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const bc=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const o=Se(e,a);if(o){const{_f:l,...u}=o;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],a)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(bc(u,t))break}else if(Pt(u)&&bc(u,t))break}}};function WS(e,t,n){const r=Se(e,n);if(r||qv(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const o=a.join("."),l=Se(t,o),u=Se(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(u&&u.type)return{name:o,error:u};a.pop()}return{name:n}}var B2=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return Sn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(l=>t[l]===(!r||Ar.all))},z2=(e,t,n)=>!e||!t||e===t||vc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),U2=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,H2=(e,t)=>!vh(Se(e,t)).length&&qt(e,t),F2=(e,t,n)=>{const r=vc(Se(e,n));return mt(r,"root",t[n]),mt(e,n,r),e},sf=e=>zr(e);function YS(e,t,n="validate"){if(sf(e)||Array.isArray(e)&&e.every(sf)||Un(e)&&!e)return{type:n,message:sf(e)?e:"",ref:t}}var ao=e=>Pt(e)&&!Tf(e)?e:{value:e,message:""},ZS=async(e,t,n,r,a,o)=>{const{ref:l,refs:u,required:d,maxLength:f,minLength:m,min:y,max:g,pattern:v,validate:x,name:S,valueAsNumber:A,mount:w}=e._f,T=Se(n,S);if(!w||t.has(S))return{};const R=u?u[0]:l,D=ie=>{a&&R.reportValidity&&(R.setCustomValidity(Un(ie)?"":ie||""),R.reportValidity())},N={},L=Yv(l),O=au(l),M=L||O,B=(A||Wv(l))&&jt(l.value)&&jt(T)||Af(l)&&l.value===""||T===""||Array.isArray(T)&&!T.length,U=wC.bind(null,S,r,N),ue=(ie,fe,Z,ee=_i.maxLength,F=_i.minLength)=>{const ne=ie?fe:Z;N[S]={type:ie?ee:F,message:ne,ref:l,...U(ie?ee:F,ne)}};if(o?!Array.isArray(T)||!T.length:d&&(!M&&(B||An(T))||Un(T)&&!T||O&&!NC(u).isValid||L&&!OC(u).isValid)){const{value:ie,message:fe}=sf(d)?{value:!!d,message:d}:ao(d);if(ie&&(N[S]={type:_i.required,message:fe,ref:R,...U(_i.required,fe)},!r))return D(fe),N}if(!B&&(!An(y)||!An(g))){let ie,fe;const Z=ao(g),ee=ao(y);if(!An(T)&&!isNaN(T)){const F=l.valueAsNumber||T&&+T;An(Z.value)||(ie=F>Z.value),An(ee.value)||(fe=F<ee.value)}else{const F=l.valueAsDate||new Date(T),ne=P=>new Date(new Date().toDateString()+" "+P),q=l.type=="time",ge=l.type=="week";zr(Z.value)&&T&&(ie=q?ne(T)>ne(Z.value):ge?T>Z.value:F>new Date(Z.value)),zr(ee.value)&&T&&(fe=q?ne(T)<ne(ee.value):ge?T<ee.value:F<new Date(ee.value))}if((ie||fe)&&(ue(!!ie,Z.message,ee.message,_i.max,_i.min),!r))return D(N[S].message),N}if((f||m)&&!B&&(zr(T)||o&&Array.isArray(T))){const ie=ao(f),fe=ao(m),Z=!An(ie.value)&&T.length>+ie.value,ee=!An(fe.value)&&T.length<+fe.value;if((Z||ee)&&(ue(Z,ie.message,fe.message),!r))return D(N[S].message),N}if(v&&!B&&zr(T)){const{value:ie,message:fe}=ao(v);if(Tf(ie)&&!T.match(ie)&&(N[S]={type:_i.pattern,message:fe,ref:l,...U(_i.pattern,fe)},!r))return D(fe),N}if(x){if(wr(x)){const ie=await x(T,n),fe=YS(ie,R);if(fe&&(N[S]={...fe,...U(_i.validate,fe.message)},!r))return D(fe.message),N}else if(Pt(x)){let ie={};for(const fe in x){if(!Sn(ie)&&!r)break;const Z=YS(await x[fe](T,n),R,fe);Z&&(ie={...Z,...U(fe,Z.message)},D(Z.message),r&&(N[S]=ie))}if(!Sn(ie)&&(N[S]={ref:R,...ie},!r))return N}}return D(!0),N};const G2={mode:Ar.onSubmit,reValidateMode:Ar.onChange,shouldFocusError:!0};function $2(e={}){let t={...G2,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:wr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let a=Pt(t.defaultValues)||Pt(t.values)?cn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:cn(a),l={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let y={...m};const g={array:zS(),state:zS()},v=t.criteriaMode===Ar.all,x=z=>J=>{clearTimeout(f),f=setTimeout(z,J)},S=async z=>{if(!t.disabled&&(m.isValid||y.isValid||z)){const J=t.resolver?Sn((await O()).errors):await B(r,!0);J!==n.isValid&&g.state.next({isValid:J})}},A=(z,J)=>{!t.disabled&&(m.isValidating||m.validatingFields||y.isValidating||y.validatingFields)&&((z||Array.from(u.mount)).forEach(oe=>{oe&&(J?mt(n.validatingFields,oe,J):qt(n.validatingFields,oe))}),g.state.next({validatingFields:n.validatingFields,isValidating:!Sn(n.validatingFields)}))},w=(z,J=[],oe,we,be=!0,_e=!0)=>{if(we&&oe&&!t.disabled){if(l.action=!0,_e&&Array.isArray(Se(r,z))){const Pe=oe(Se(r,z),we.argA,we.argB);be&&mt(r,z,Pe)}if(_e&&Array.isArray(Se(n.errors,z))){const Pe=oe(Se(n.errors,z),we.argA,we.argB);be&&mt(n.errors,z,Pe),H2(n.errors,z)}if((m.touchedFields||y.touchedFields)&&_e&&Array.isArray(Se(n.touchedFields,z))){const Pe=oe(Se(n.touchedFields,z),we.argA,we.argB);be&&mt(n.touchedFields,z,Pe)}(m.dirtyFields||y.dirtyFields)&&(n.dirtyFields=nc(a,o)),g.state.next({name:z,isDirty:ue(z,J),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else mt(o,z,J)},T=(z,J)=>{mt(n.errors,z,J),g.state.next({errors:n.errors})},R=z=>{n.errors=z,g.state.next({errors:n.errors,isValid:!1})},D=(z,J,oe,we)=>{const be=Se(r,z);if(be){const _e=Se(o,z,jt(oe)?Se(a,z):oe);jt(_e)||we&&we.defaultChecked||J?mt(o,z,J?_e:GS(be._f)):Z(z,_e),l.mount&&S()}},N=(z,J,oe,we,be)=>{let _e=!1,Pe=!1;const ct={name:z};if(!t.disabled){if(!oe||we){(m.isDirty||y.isDirty)&&(Pe=n.isDirty,n.isDirty=ct.isDirty=ue(),_e=Pe!==ct.isDirty);const ht=la(Se(a,z),J);Pe=!!Se(n.dirtyFields,z),ht?qt(n.dirtyFields,z):mt(n.dirtyFields,z,!0),ct.dirtyFields=n.dirtyFields,_e=_e||(m.dirtyFields||y.dirtyFields)&&Pe!==!ht}if(oe){const ht=Se(n.touchedFields,z);ht||(mt(n.touchedFields,z,oe),ct.touchedFields=n.touchedFields,_e=_e||(m.touchedFields||y.touchedFields)&&ht!==oe)}_e&&be&&g.state.next(ct)}return _e?ct:{}},L=(z,J,oe,we)=>{const be=Se(n.errors,z),_e=(m.isValid||y.isValid)&&Un(J)&&n.isValid!==J;if(t.delayError&&oe?(d=x(()=>T(z,oe)),d(t.delayError)):(clearTimeout(f),d=null,oe?mt(n.errors,z,oe):qt(n.errors,z)),(oe?!la(be,oe):be)||!Sn(we)||_e){const Pe={...we,..._e&&Un(J)?{isValid:J}:{},errors:n.errors,name:z};n={...n,...Pe},g.state.next(Pe)}},O=async z=>{A(z,!0);const J=await t.resolver(o,t.context,j2(z||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return A(z),J},M=async z=>{const{errors:J}=await O(z);if(z)for(const oe of z){const we=Se(J,oe);we?mt(n.errors,oe,we):qt(n.errors,oe)}else n.errors=J;return J},B=async(z,J,oe={valid:!0})=>{for(const we in z){const be=z[we];if(be){const{_f:_e,...Pe}=be;if(_e){const ct=u.array.has(_e.name),ht=be._f&&P2(be._f);ht&&m.validatingFields&&A([we],!0);const Rn=await ZS(be,u.disabled,o,v,t.shouldUseNativeValidation&&!J,ct);if(ht&&m.validatingFields&&A([we]),Rn[_e.name]&&(oe.valid=!1,J))break;!J&&(Se(Rn,_e.name)?ct?F2(n.errors,Rn,_e.name):mt(n.errors,_e.name,Rn[_e.name]):qt(n.errors,_e.name))}!Sn(Pe)&&await B(Pe,J,oe)}}return oe.valid},U=()=>{for(const z of u.unMount){const J=Se(r,z);J&&(J._f.refs?J._f.refs.every(oe=>!gg(oe)):!gg(J._f.ref))&&le(z)}u.unMount=new Set},ue=(z,J)=>!t.disabled&&(z&&J&&mt(o,z,J),!la(P(),a)),ie=(z,J,oe)=>AC(z,u,{...l.mount?o:jt(J)?a:zr(z)?{[z]:J}:J},oe,J),fe=z=>vh(Se(l.mount?o:a,z,t.shouldUnregister?Se(a,z,[]):[])),Z=(z,J,oe={})=>{const we=Se(r,z);let be=J;if(we){const _e=we._f;_e&&(!_e.disabled&&mt(o,z,kC(J,_e)),be=Af(_e.ref)&&An(J)?"":J,TC(_e.ref)?[..._e.ref.options].forEach(Pe=>Pe.selected=be.includes(Pe.value)):_e.refs?au(_e.ref)?_e.refs.forEach(Pe=>{(!Pe.defaultChecked||!Pe.disabled)&&(Array.isArray(be)?Pe.checked=!!be.find(ct=>ct===Pe.value):Pe.checked=be===Pe.value||!!be)}):_e.refs.forEach(Pe=>Pe.checked=Pe.value===be):Wv(_e.ref)?_e.ref.value="":(_e.ref.value=be,_e.ref.type||g.state.next({name:z,values:cn(o)})))}(oe.shouldDirty||oe.shouldTouch)&&N(z,be,oe.shouldTouch,oe.shouldDirty,!0),oe.shouldValidate&&ge(z)},ee=(z,J,oe)=>{for(const we in J){if(!J.hasOwnProperty(we))return;const be=J[we],_e=`${z}.${we}`,Pe=Se(r,_e);(u.array.has(z)||Pt(be)||Pe&&!Pe._f)&&!is(be)?ee(_e,be,oe):Z(_e,be,oe)}},F=(z,J,oe={})=>{const we=Se(r,z),be=u.array.has(z),_e=cn(J);mt(o,z,_e),be?(g.array.next({name:z,values:cn(o)}),(m.isDirty||m.dirtyFields||y.isDirty||y.dirtyFields)&&oe.shouldDirty&&g.state.next({name:z,dirtyFields:nc(a,o),isDirty:ue(z,_e)})):we&&!we._f&&!An(_e)?ee(z,_e,oe):Z(z,_e,oe),KS(z,u)&&g.state.next({...n}),g.state.next({name:l.mount?z:void 0,values:cn(o)})},ne=async z=>{l.mount=!0;const J=z.target;let oe=J.name,we=!0;const be=Se(r,oe),_e=ht=>{we=Number.isNaN(ht)||is(ht)&&isNaN(ht.getTime())||la(ht,Se(o,oe,ht))},Pe=$S(t.mode),ct=$S(t.reValidateMode);if(be){let ht,Rn;const ka=J.type?GS(be._f):bC(z),Or=z.type===Sf.BLUR||z.type===Sf.FOCUS_OUT,Hh=!V2(be._f)&&!t.resolver&&!Se(n.errors,oe)&&!be._f.deps||U2(Or,Se(n.touchedFields,oe),n.isSubmitted,ct,Pe),ei=KS(oe,u,Or);mt(o,oe,ka),Or?(be._f.onBlur&&be._f.onBlur(z),d&&d(0)):be._f.onChange&&be._f.onChange(z);const rn=N(oe,ka,Or),Fh=!Sn(rn)||ei;if(!Or&&g.state.next({name:oe,type:z.type,values:cn(o)}),Hh)return(m.isValid||y.isValid)&&(t.mode==="onBlur"?Or&&S():Or||S()),Fh&&g.state.next({name:oe,...ei?{}:rn});if(!Or&&ei&&g.state.next({...n}),t.resolver){const{errors:yr}=await O([oe]);if(_e(ka),we){const _n=WS(n.errors,r,oe),yu=WS(yr,r,_n.name||oe);ht=yu.error,oe=yu.name,Rn=Sn(yr)}}else A([oe],!0),ht=(await ZS(be,u.disabled,o,v,t.shouldUseNativeValidation))[oe],A([oe]),_e(ka),we&&(ht?Rn=!1:(m.isValid||y.isValid)&&(Rn=await B(r,!0)));we&&(be._f.deps&&ge(be._f.deps),L(oe,Rn,ht,rn))}},q=(z,J)=>{if(Se(n.errors,J)&&z.focus)return z.focus(),1},ge=async(z,J={})=>{let oe,we;const be=vc(z);if(t.resolver){const _e=await M(jt(z)?z:be);oe=Sn(_e),we=z?!be.some(Pe=>Se(_e,Pe)):oe}else z?(we=(await Promise.all(be.map(async _e=>{const Pe=Se(r,_e);return await B(Pe&&Pe._f?{[_e]:Pe}:Pe)}))).every(Boolean),!(!we&&!n.isValid)&&S()):we=oe=await B(r);return g.state.next({...!zr(z)||(m.isValid||y.isValid)&&oe!==n.isValid?{}:{name:z},...t.resolver||!z?{isValid:oe}:{},errors:n.errors}),J.shouldFocus&&!we&&bc(r,q,z?be:u.mount),we},P=z=>{const J={...l.mount?o:a};return jt(z)?J:zr(z)?Se(J,z):z.map(oe=>Se(J,oe))},X=(z,J)=>({invalid:!!Se((J||n).errors,z),isDirty:!!Se((J||n).dirtyFields,z),error:Se((J||n).errors,z),isValidating:!!Se(n.validatingFields,z),isTouched:!!Se((J||n).touchedFields,z)}),H=z=>{z&&vc(z).forEach(J=>qt(n.errors,J)),g.state.next({errors:z?n.errors:{}})},Q=(z,J,oe)=>{const we=(Se(r,z,{_f:{}})._f||{}).ref,be=Se(n.errors,z)||{},{ref:_e,message:Pe,type:ct,...ht}=be;mt(n.errors,z,{...ht,...J,ref:we}),g.state.next({name:z,errors:n.errors,isValid:!1}),oe&&oe.shouldFocus&&we&&we.focus&&we.focus()},re=(z,J)=>wr(z)?g.state.subscribe({next:oe=>z(ie(void 0,J),oe)}):ie(z,J,!0),he=z=>g.state.subscribe({next:J=>{z2(z.name,J.name,z.exact)&&B2(J,z.formState||m,pr,z.reRenderRoot)&&z.callback({values:{...o},...n,...J})}}).unsubscribe,xe=z=>(l.mount=!0,y={...y,...z.formState},he({...z,formState:y})),le=(z,J={})=>{for(const oe of z?vc(z):u.mount)u.mount.delete(oe),u.array.delete(oe),J.keepValue||(qt(r,oe),qt(o,oe)),!J.keepError&&qt(n.errors,oe),!J.keepDirty&&qt(n.dirtyFields,oe),!J.keepTouched&&qt(n.touchedFields,oe),!J.keepIsValidating&&qt(n.validatingFields,oe),!t.shouldUnregister&&!J.keepDefaultValue&&qt(a,oe);g.state.next({values:cn(o)}),g.state.next({...n,...J.keepDirty?{isDirty:ue()}:{}}),!J.keepIsValid&&S()},Ee=({disabled:z,name:J})=>{(Un(z)&&l.mount||z||u.disabled.has(J))&&(z?u.disabled.add(J):u.disabled.delete(J))},De=(z,J={})=>{let oe=Se(r,z);const we=Un(J.disabled)||Un(t.disabled);return mt(r,z,{...oe||{},_f:{...oe&&oe._f?oe._f:{ref:{name:z}},name:z,mount:!0,...J}}),u.mount.add(z),oe?Ee({disabled:Un(J.disabled)?J.disabled:t.disabled,name:z}):D(z,!0,J.value),{...we?{disabled:J.disabled||t.disabled}:{},...t.progressive?{required:!!J.required,min:rc(J.min),max:rc(J.max),minLength:rc(J.minLength),maxLength:rc(J.maxLength),pattern:rc(J.pattern)}:{},name:z,onChange:ne,onBlur:ne,ref:be=>{if(be){De(z,J),oe=Se(r,z);const _e=jt(be.value)&&be.querySelectorAll&&be.querySelectorAll("input,select,textarea")[0]||be,Pe=I2(_e),ct=oe._f.refs||[];if(Pe?ct.find(ht=>ht===_e):_e===oe._f.ref)return;mt(r,z,{_f:{...oe._f,...Pe?{refs:[...ct.filter(gg),_e,...Array.isArray(Se(a,z))?[{}]:[]],ref:{type:_e.type,name:z}}:{ref:_e}}}),D(z,!1,void 0,_e)}else oe=Se(r,z,{}),oe._f&&(oe._f.mount=!1),(t.shouldUnregister||J.shouldUnregister)&&!(_C(u.array,z)&&l.action)&&u.unMount.add(z)}}},Ce=()=>t.shouldFocusError&&bc(r,q,u.mount),Fe=z=>{Un(z)&&(g.state.next({disabled:z}),bc(r,(J,oe)=>{const we=Se(r,oe);we&&(J.disabled=we._f.disabled||z,Array.isArray(we._f.refs)&&we._f.refs.forEach(be=>{be.disabled=we._f.disabled||z}))},0,!1))},Ke=(z,J)=>async oe=>{let we;oe&&(oe.preventDefault&&oe.preventDefault(),oe.persist&&oe.persist());let be=cn(o);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:_e,values:Pe}=await O();n.errors=_e,be=Pe}else await B(r);if(u.disabled.size)for(const _e of u.disabled)mt(be,_e,void 0);if(qt(n.errors,"root"),Sn(n.errors)){g.state.next({errors:{}});try{await z(be,oe)}catch(_e){we=_e}}else J&&await J({...n.errors},oe),Ce(),setTimeout(Ce);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sn(n.errors)&&!we,submitCount:n.submitCount+1,errors:n.errors}),we)throw we},Et=(z,J={})=>{Se(r,z)&&(jt(J.defaultValue)?F(z,cn(Se(a,z))):(F(z,J.defaultValue),mt(a,z,cn(J.defaultValue))),J.keepTouched||qt(n.touchedFields,z),J.keepDirty||(qt(n.dirtyFields,z),n.isDirty=J.defaultValue?ue(z,cn(Se(a,z))):ue()),J.keepError||(qt(n.errors,z),m.isValid&&S()),g.state.next({...n}))},Yt=(z,J={})=>{const oe=z?cn(z):a,we=cn(oe),be=Sn(z),_e=be?a:we;if(J.keepDefaultValues||(a=oe),!J.keepValues){if(J.keepDirtyValues){const Pe=new Set([...u.mount,...Object.keys(nc(a,o))]);for(const ct of Array.from(Pe))Se(n.dirtyFields,ct)?mt(_e,ct,Se(o,ct)):F(ct,Se(_e,ct))}else{if($v&&jt(z))for(const Pe of u.mount){const ct=Se(r,Pe);if(ct&&ct._f){const ht=Array.isArray(ct._f.refs)?ct._f.refs[0]:ct._f.ref;if(Af(ht)){const Rn=ht.closest("form");if(Rn){Rn.reset();break}}}}for(const Pe of u.mount)F(Pe,Se(_e,Pe))}o=cn(_e),g.array.next({values:{..._e}}),g.state.next({values:{..._e}})}u={mount:J.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!m.isValid||!!J.keepIsValid||!!J.keepDirtyValues,l.watch=!!t.shouldUnregister,g.state.next({submitCount:J.keepSubmitCount?n.submitCount:0,isDirty:be?!1:J.keepDirty?n.isDirty:!!(J.keepDefaultValues&&!la(z,a)),isSubmitted:J.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:be?{}:J.keepDirtyValues?J.keepDefaultValues&&o?nc(a,o):n.dirtyFields:J.keepDefaultValues&&z?nc(a,z):J.keepDirty?n.dirtyFields:{},touchedFields:J.keepTouched?n.touchedFields:{},errors:J.keepErrors?n.errors:{},isSubmitSuccessful:J.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ln=(z,J)=>Yt(wr(z)?z(o):z,J),Cn=(z,J={})=>{const oe=Se(r,z),we=oe&&oe._f;if(we){const be=we.refs?we.refs[0]:we.ref;be.focus&&(be.focus(),J.shouldSelect&&wr(be.select)&&be.select())}},pr=z=>{n={...n,...z}},gr={control:{register:De,unregister:le,getFieldState:X,handleSubmit:Ke,setError:Q,_subscribe:he,_runSchema:O,_getWatch:ie,_getDirty:ue,_setValid:S,_setFieldArray:w,_setDisabledField:Ee,_setErrors:R,_getFieldArray:fe,_reset:Yt,_resetDefaultValues:()=>wr(t.defaultValues)&&t.defaultValues().then(z=>{Ln(z,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:Fe,_subjects:g,_proxyFormState:m,get _fields(){return r},get _formValues(){return o},get _state(){return l},set _state(z){l=z},get _defaultValues(){return a},get _names(){return u},set _names(z){u=z},get _formState(){return n},get _options(){return t},set _options(z){t={...t,...z}}},subscribe:xe,trigger:ge,register:De,handleSubmit:Ke,watch:re,setValue:F,getValues:P,reset:Ln,resetField:Et,clearErrors:H,unregister:le,setError:Q,setFocus:Cn,getFieldState:X};return{...gr,formControl:gr}}function q2(e={}){const t=Ge.useRef(void 0),n=Ge.useRef(void 0),[r,a]=Ge.useState({isDirty:!1,isValidating:!1,isLoading:wr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:wr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e.formControl?e.formControl:$2(e),formState:r},e.formControl&&e.defaultValues&&!wr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const o=t.current.control;return o._options=e,Kv(()=>{const l=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),o._formState.isReady=!0,l},[o]),Ge.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Ge.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode),e.errors&&!Sn(e.errors)&&o._setErrors(e.errors)},[o,e.errors,e.mode,e.reValidateMode]),Ge.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),Ge.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==r.isDirty&&o._subjects.state.next({isDirty:l})}},[o,r.isDirty]),Ge.useEffect(()=>{e.values&&!la(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,a(l=>({...l}))):o._resetDefaultValues()},[o,e.values]),Ge.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=SC(r,o),t.current}const XS=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Se(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},DC=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?XS(r.ref,n,e):r.refs&&r.refs.forEach(a=>XS(a,n,e))}},K2=(e,t)=>{t.shouldUseNativeValidation&&DC(e,t);const n={};for(const r in e){const a=Se(t.fields,r),o=Object.assign(e[r]||{},{ref:a&&a.ref});if(W2(t.names||Object.keys(e),r)){const l=Object.assign({},Se(n,r));mt(l,"root",o),mt(n,r,l)}else mt(n,r,o)}return n},W2=(e,t)=>e.some(n=>n.startsWith(t+"."));var Y2=function(e,t){for(var n={};e.length;){var r=e[0],a=r.code,o=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[l]={message:u.message,type:u.code}}else n[l]={message:o,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(y){return e.push(y)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=wC(l,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n},Z2=function(e,t,n){return n===void 0&&(n={}),function(r,a,o){try{return Promise.resolve(function(l,u){try{var d=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(f){return o.shouldUseNativeValidation&&DC({},o),{errors:{},values:n.raw?r:f}})}catch(f){return u(f)}return d&&d.then?d.then(void 0,u):d}(0,function(l){if(function(u){return Array.isArray(u==null?void 0:u.errors)}(l))return{values:{},errors:K2(Y2(l.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}}};const yg=async e=>e&&typeof e.then=="function"?await e:e,X2=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:a,children:o,autoComplete:l,...u})=>{const d=async f=>{const m=(e==null?void 0:e.safeParse(f))??{success:!0,data:void 0};await yg(t==null?void 0:t(f)),m.success?await yg(n==null?void 0:n(m.data)):await yg(r==null?void 0:r(new Error(m.error.errors.map(y=>y.message).join(", "))))};return b.jsx(R2,{...u,children:b.jsx("form",{className:Ae("flex size-full flex-col gap-y-6",a),onSubmit:u.handleSubmit(d),autoComplete:l?"on":"off",children:o})})},Q2=(e,t)=>{const n=q2({resolver:Z2(e),...t}),r=n.formState.isSubmitting,a=n.formState.isSubmitted,o=n.formState.isLoading,l=n.formState.isValid;return{form:n,isSubmitting:r,isSubmitted:a,isLoading:o,isValid:l}},J2=e=>{const t=E.useId(),n=E.useMemo(()=>({id:t}),[t]);return b.jsx(IC,{value:n,children:b.jsx("div",{className:"flex flex-col gap-2 p-2",...e})})},IC=E.createContext({}),LC=E.createContext({}),eU=({...e})=>{const t=E.useMemo(()=>({name:e.name}),[e.name]);return b.jsx(LC,{value:t,children:b.jsx(D2,{...e})})},Ea=()=>{const e=E.useContext(LC),t=E.useContext(IC),{getFieldState:n,formState:r}=xa(),a=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...a}},MC=hr("",{variants:{variant:{default:["w-full select-text resize-none rounded-xl border-2 bg-input-background text-base md:text-sm text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error","disabled:opacity-50"],invisible:["w-full border-none bg-inherit text-inherit outline-hidden ring-0"]},size:{md:"px-2 md:py-1 py-3",lg:"p-4 md:py-2"},validationStyleEnabled:{disabled:"",enabled:"valid:border-success invalid:border-error"}},defaultVariants:{variant:"default",size:"md",validationStyleEnabled:"disabled"}}),$o=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...a})=>b.jsx("input",{className:MC({variant:t,size:n,validationStyleEnabled:e?"enabled":"disabled",className:r}),...a}),tU=hr("",{variants:{variant:{default:["pointer rounded border-2 bg-input-background text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","checked:bg-checkbox-checked checked:border-checkbox-checked-border","disabled:opacity-50"]},size:{sm:"size-4",md:"size-5",lg:"size-6"},color:{primary:"accent-primary",secondary:"accent-secondary",destructive:"accent-destructive",neutral:"accent-neutral",light:"accent-light",text:"accent-text",dark:"accent-dark",error:"accent-error",success:"accent-success",custom:"accent-custom"},validationStyleEnabled:{disabled:"",enabled:"valid:border-success invalid:border-error"}},defaultVariants:{variant:"default",color:"primary",validationStyleEnabled:"disabled",size:"md"}}),nU=({validationStyleEnabled:e=!1,label:t,size:n,color:r,variant:a,className:o,...l})=>{const u=E.useId();return b.jsxs(b.Fragment,{children:[b.jsx("input",{type:"checkbox",className:tU({variant:a,size:n,color:r,validationStyleEnabled:e?"enabled":"disabled",className:o}),id:u,...l}),b.jsx("label",{htmlFor:u,children:t})]})},rU=e=>{const[t,n]=E.useState(!1),r=o=>{o.preventDefault(),o.stopPropagation(),n(l=>!l)},a=t?MV:IV;return b.jsxs("div",{className:"relative",children:[b.jsx($o,{...e,"aria-label":"password",type:t?"text":"password"}),b.jsx("button",{"data-testid":"eye-icon",className:"absolute right-2 h-full flex-row items-center",onClick:r,"aria-label":t?"Hide password":"Show password",children:b.jsx(a,{className:"text-neutral mr-2 inline-block",size:20})})]})},jC=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>b.jsx("textarea",{className:Ae("resize-none",MC({variant:t,validationStyleEnabled:n?"enabled":"disabled",className:e})),...r}),PC=({value:e="",onCancel:t,onSave:n,onClick:r,children:a,isDisabled:o,...l})=>{const[u,d]=E.useState(!1),f=E.useRef(null),m=x=>{x.stopPropagation(),d(!1),n()},y=x=>{x.stopPropagation(),d(!1),t()},g=!e||e===""?"-":e,v=E.useCallback(x=>{const S=window.getSelection();S&&S.toString().trim()!==""||f.current&&!f.current.contains(x.target)&&(d(!1),n())},[n]);return E.useEffect(()=>(u?document.addEventListener("click",v):document.removeEventListener("click",v),()=>document.removeEventListener("click",v)),[v,u]),b.jsxs("span",{className:"group/editable-field flex gap-2",role:"button",tabIndex:0,onClick:x=>{d(!0),r==null||r(x)},ref:f,...l,children:[b.jsxs("div",{className:Ae("flex flex-1 gap-2",u?"display":"hidden"),children:[a,b.jsx(yt,{label:"Save",variant:"hoverable",size:"icon-sm",color:"text",Icon:Ho,onClick:m,disabled:o,className:"!text-current"}),b.jsx(yt,{label:"Cancel",color:"text",variant:"hoverable",className:"!text-current",size:"icon-sm",Icon:_s,onClick:y,disabled:o})]},String(u)),b.jsxs("div",{className:Ae("flex flex-1 gap-2",u?"hidden":"display"),children:[b.jsx("span",{className:"ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6",children:g}),b.jsx(yt,{label:"Edit",Icon:D1,color:"text",variant:"hoverable",size:"icon-sm",className:"invisible !text-current group-hover/editable-field:visible",disabled:o,onClick:x=>{x.stopPropagation(),d(!0)}})]})]})},VC=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=E.useRef(null),o=()=>{var f;e==null||e(((f=a.current)==null?void 0:f.value)??"")},l=()=>{a.current&&(a.current.value=a.current.defaultValue??""),t==null||t()};E.useImperativeHandle(n,()=>a.current);const u=E.useMemo(()=>{var f;return r.value??((f=a.current)==null?void 0:f.value)??r.defaultValue},[r.value,r.defaultValue,(d=a.current)==null?void 0:d.value]);return b.jsx(PC,{value:u,onCancel:l,onSave:o,children:b.jsx($o,{ref:a,...r})})},QS=24,JS=12,Zv=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:a,...o})=>{const l=E.useRef(null);E.useImperativeHandle(a,()=>l.current);const u=()=>{const m=l.current;if(!m||!t)return;const y=m.style;y.height="auto";const g=m.scrollHeight,v=QS*r+JS,x=QS+JS;y.height=Math.max(Math.min(g,v),x)+"px"};E.useEffect(()=>{u()},[o.value,o.defaultValue,u]);const d=m=>{n==null||n(m),u()},f=m=>{l.current=m,m&&u()};return b.jsx(jC,{ref:f,onChange:d,className:Ae("overflow-y-scroll",t?"resize-none":"",e),...o})},BC=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=E.useRef(null);E.useImperativeHandle(n,()=>a.current);const o=()=>{var f;e==null||e(((f=a.current)==null?void 0:f.value)??"")},l=()=>{a.current&&(a.current.value=a.current.defaultValue??""),t==null||t()},u=r.value??((d=a.current)==null?void 0:d.value)??r.defaultValue??"";return b.jsx(PC,{value:u,onCancel:l,onSave:o,onClick:f=>{f.preventDefault(),f.stopPropagation()},children:b.jsx(Zv,{className:"leading-6",ref:a,onClick:f=>{f.preventDefault(),f.stopPropagation()},...r})})},iU=hr("focus:ring-ring inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-offset-2",{variants:{color:{primary:"border-primary bg-primary text-primary hover:bg-primary-500",secondary:"border-secondary bg-secondary text-secondary hover:bg-secondary-300",destructive:"border-destructive bg-destructive text-destructive hover:bg-destructive-500",neutral:"border-neutral bg-neutral text-neutral hover:bg-neutral-600",light:"border-white bg-white text-white hover:bg-neutral-500",dark:"border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900",text:"border-text bg-text text-text hover:opacity-80",custom:""},variant:{default:"rounded-lg text-text-opposite",none:"border-none bg-opacity-0 text-inherit hover:bg-opacity-0",outline:"rounded-lg border-[1.5px] bg-opacity-0 hover:bg-opacity-30",hoverable:"rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10"}},defaultVariants:{variant:"default",color:"primary"}}),aU=({className:e,variant:t,color:n,...r})=>b.jsx("div",{className:Ae(iU({variant:t,color:n}),e),...r});var sU=UT[" useId ".trim().toString()]||(()=>{}),oU=0;function ur(e){const[t,n]=E.useState(sU());return dn(()=>{n(r=>r??String(oU++))},[e]),t?`radix-${t}`:""}var vg="focusScope.autoFocusOnMount",bg="focusScope.autoFocusOnUnmount",eA={bubbles:!1,cancelable:!0},lU="FocusScope",Xv=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[u,d]=E.useState(null),f=Tr(a),m=Tr(o),y=E.useRef(null),g=Nt(t,S=>d(S)),v=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let S=function(R){if(v.paused||!u)return;const D=R.target;u.contains(D)?y.current=D:aa(y.current,{select:!0})},A=function(R){if(v.paused||!u)return;const D=R.relatedTarget;D!==null&&(u.contains(D)||aa(y.current,{select:!0}))},w=function(R){if(document.activeElement===document.body)for(const N of R)N.removedNodes.length>0&&aa(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",A);const T=new MutationObserver(w);return u&&T.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",A),T.disconnect()}}},[r,u,v.paused]),E.useEffect(()=>{if(u){nA.add(v);const S=document.activeElement;if(!u.contains(S)){const w=new CustomEvent(vg,eA);u.addEventListener(vg,f),u.dispatchEvent(w),w.defaultPrevented||(cU(mU(zC(u)),{select:!0}),document.activeElement===S&&aa(u))}return()=>{u.removeEventListener(vg,f),setTimeout(()=>{const w=new CustomEvent(bg,eA);u.addEventListener(bg,m),u.dispatchEvent(w),w.defaultPrevented||aa(S??document.body,{select:!0}),u.removeEventListener(bg,m),nA.remove(v)},0)}}},[u,f,m,v]);const x=E.useCallback(S=>{if(!n&&!r||v.paused)return;const A=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,w=document.activeElement;if(A&&w){const T=S.currentTarget,[R,D]=uU(T);R&&D?!S.shiftKey&&w===D?(S.preventDefault(),n&&aa(R,{select:!0})):S.shiftKey&&w===R&&(S.preventDefault(),n&&aa(D,{select:!0})):w===T&&S.preventDefault()}},[n,r,v.paused]);return b.jsx(Qe.div,{tabIndex:-1,...l,ref:g,onKeyDown:x})});Xv.displayName=lU;function cU(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(aa(r,{select:t}),document.activeElement!==n)return}function uU(e){const t=zC(e),n=tA(t,e),r=tA(t.reverse(),e);return[n,r]}function zC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function tA(e,t){for(const n of e)if(!dU(n,{upTo:t}))return n}function dU(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fU(e){return e instanceof HTMLInputElement&&"select"in e}function aa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fU(e)&&t&&e.select()}}var nA=hU();function hU(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=rA(e,t),e.unshift(t)},remove(t){var n;e=rA(e,t),(n=e[0])==null||n.resume()}}}function rA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function mU(e){return e.filter(t=>t.tagName!=="A")}var _g=0;function UC(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??iA()),document.body.insertAdjacentElement("beforeend",e[1]??iA()),_g++,()=>{_g===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_g--}},[])}function iA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Br=function(){return Br=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Br.apply(this,arguments)};function HC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function pU(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var of="right-scroll-bar-position",lf="width-before-scroll-bar",gU="with-scroll-bars-hidden",yU="--removed-body-scroll-bar-size";function xg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vU(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var bU=typeof window<"u"?E.useLayoutEffect:E.useEffect,aA=new WeakMap;function _U(e,t){var n=vU(null,function(r){return e.forEach(function(a){return xg(a,r)})});return bU(function(){var r=aA.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(u){o.has(u)||xg(u,null)}),o.forEach(function(u){a.has(u)||xg(u,l)})}aA.set(n,e)},[e]),n}function xU(e){return e}function EU(e,t){t===void 0&&(t=xU);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var d=function(){var m=l;l=[],m.forEach(o)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return a}function SU(e){e===void 0&&(e={});var t=EU(null);return t.options=Br({async:!0,ssr:!1},e),t}var FC=function(e){var t=e.sideCar,n=HC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,Br({},n))};FC.isSideCarExport=!0;function AU(e,t){return e.useMedium(t),FC}var GC=SU(),Eg=function(){},bh=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:Eg,onWheelCapture:Eg,onTouchMoveCapture:Eg}),a=r[0],o=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,y=e.shards,g=e.sideCar,v=e.noRelative,x=e.noIsolation,S=e.inert,A=e.allowPinchZoom,w=e.as,T=w===void 0?"div":w,R=e.gapMode,D=HC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,L=_U([n,t]),O=Br(Br({},D),a);return E.createElement(E.Fragment,null,m&&E.createElement(N,{sideCar:GC,removeScrollBar:f,shards:y,noRelative:v,noIsolation:x,inert:S,setCallbacks:o,allowPinchZoom:!!A,lockRef:n,gapMode:R}),l?E.cloneElement(E.Children.only(u),Br(Br({},O),{ref:L})):E.createElement(T,Br({},O,{className:d,ref:L}),u))});bh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bh.classNames={fullWidth:lf,zeroRight:of};var wU=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function TU(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wU();return t&&e.setAttribute("nonce",t),e}function CU(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function RU(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var NU=function(){var e=0,t=null;return{add:function(n){e==0&&(t=TU())&&(CU(t,n),RU(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kU=function(){var e=NU();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$C=function(){var e=kU(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},OU={left:0,top:0,right:0,gap:0},Sg=function(e){return parseInt(e||"",10)||0},DU=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Sg(n),Sg(r),Sg(a)]},IU=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return OU;var t=DU(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},LU=$C(),Eo="data-scroll-locked",MU=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
210
+ .`.concat(gU,` {
211
+ overflow: hidden `).concat(r,`;
212
+ padding-right: `).concat(u,"px ").concat(r,`;
213
+ }
214
+ body[`).concat(Eo,`] {
215
+ overflow: hidden `).concat(r,`;
216
+ overscroll-behavior: contain;
217
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
218
+ padding-left: `.concat(a,`px;
219
+ padding-top: `).concat(o,`px;
220
+ padding-right: `).concat(l,`px;
221
+ margin-left:0;
222
+ margin-top:0;
223
+ margin-right: `).concat(u,"px ").concat(r,`;
224
+ `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
225
+ }
226
+
227
+ .`).concat(of,` {
228
+ right: `).concat(u,"px ").concat(r,`;
229
+ }
230
+
231
+ .`).concat(lf,` {
232
+ margin-right: `).concat(u,"px ").concat(r,`;
233
+ }
234
+
235
+ .`).concat(of," .").concat(of,` {
236
+ right: 0 `).concat(r,`;
237
+ }
238
+
239
+ .`).concat(lf," .").concat(lf,` {
240
+ margin-right: 0 `).concat(r,`;
241
+ }
242
+
243
+ body[`).concat(Eo,`] {
244
+ `).concat(yU,": ").concat(u,`px;
245
+ }
246
+ `)},sA=function(){var e=parseInt(document.body.getAttribute(Eo)||"0",10);return isFinite(e)?e:0},jU=function(){E.useEffect(function(){return document.body.setAttribute(Eo,(sA()+1).toString()),function(){var e=sA()-1;e<=0?document.body.removeAttribute(Eo):document.body.setAttribute(Eo,e.toString())}},[])},PU=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;jU();var o=E.useMemo(function(){return IU(a)},[a]);return E.createElement(LU,{styles:MU(o,!t,a,n?"":"!important")})},by=!1;if(typeof window<"u")try{var jd=Object.defineProperty({},"passive",{get:function(){return by=!0,!0}});window.addEventListener("test",jd,jd),window.removeEventListener("test",jd,jd)}catch{by=!1}var so=by?{passive:!1}:!1,VU=function(e){return e.tagName==="TEXTAREA"},qC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!VU(e)&&n[t]==="visible")},BU=function(e){return qC(e,"overflowY")},zU=function(e){return qC(e,"overflowX")},oA=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=KC(e,r);if(a){var o=WC(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},UU=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},HU=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},KC=function(e,t){return e==="v"?BU(t):zU(t)},WC=function(e,t){return e==="v"?UU(t):HU(t)},FU=function(e,t){return e==="h"&&t==="rtl"?-1:1},GU=function(e,t,n,r,a){var o=FU(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),f=!1,m=l>0,y=0,g=0;do{var v=WC(e,u),x=v[0],S=v[1],A=v[2],w=S-A-o*x;(x||w)&&KC(e,u)&&(y+=w,g+=x),u=u.parentNode.host||u.parentNode}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(y)<1||!m&&Math.abs(g)<1)&&(f=!0),f},Pd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lA=function(e){return[e.deltaX,e.deltaY]},cA=function(e){return e&&"current"in e?e.current:e},$U=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qU=function(e){return`
247
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
248
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
249
+ `)},KU=0,oo=[];function WU(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),a=E.useState(KU++)[0],o=E.useState($C)[0],l=E.useRef(e);E.useEffect(function(){l.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=pU([e.lockRef.current],(e.shards||[]).map(cA),!0).filter(Boolean);return S.forEach(function(A){return A.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=E.useCallback(function(S,A){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var w=Pd(S),T=n.current,R="deltaX"in S?S.deltaX:T[0]-w[0],D="deltaY"in S?S.deltaY:T[1]-w[1],N,L=S.target,O=Math.abs(R)>Math.abs(D)?"h":"v";if("touches"in S&&O==="h"&&L.type==="range")return!1;var M=oA(O,L);if(!M)return!0;if(M?N=O:(N=O==="v"?"h":"v",M=oA(O,L)),!M)return!1;if(!r.current&&"changedTouches"in S&&(R||D)&&(r.current=N),!N)return!0;var B=r.current||N;return GU(B,A,S,B==="h"?R:D)},[]),d=E.useCallback(function(S){var A=S;if(!(!oo.length||oo[oo.length-1]!==o)){var w="deltaY"in A?lA(A):Pd(A),T=t.current.filter(function(N){return N.name===A.type&&(N.target===A.target||A.target===N.shadowParent)&&$U(N.delta,w)})[0];if(T&&T.should){A.cancelable&&A.preventDefault();return}if(!T){var R=(l.current.shards||[]).map(cA).filter(Boolean).filter(function(N){return N.contains(A.target)}),D=R.length>0?u(A,R[0]):!l.current.noIsolation;D&&A.cancelable&&A.preventDefault()}}},[]),f=E.useCallback(function(S,A,w,T){var R={name:S,delta:A,target:w,should:T,shadowParent:YU(w)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(D){return D!==R})},1)},[]),m=E.useCallback(function(S){n.current=Pd(S),r.current=void 0},[]),y=E.useCallback(function(S){f(S.type,lA(S),S.target,u(S,e.lockRef.current))},[]),g=E.useCallback(function(S){f(S.type,Pd(S),S.target,u(S,e.lockRef.current))},[]);E.useEffect(function(){return oo.push(o),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:g}),document.addEventListener("wheel",d,so),document.addEventListener("touchmove",d,so),document.addEventListener("touchstart",m,so),function(){oo=oo.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,so),document.removeEventListener("touchmove",d,so),document.removeEventListener("touchstart",m,so)}},[]);var v=e.removeScrollBar,x=e.inert;return E.createElement(E.Fragment,null,x?E.createElement(o,{styles:qU(a)}):null,v?E.createElement(PU,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function YU(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ZU=AU(GC,WU);var Qv=E.forwardRef(function(e,t){return E.createElement(bh,Br({},e,{ref:t,sideCar:ZU}))});Qv.classNames=bh.classNames;var XU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},lo=new WeakMap,Vd=new WeakMap,Bd={},Ag=0,YC=function(e){return e&&(e.host||YC(e.parentNode))},QU=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=YC(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},JU=function(e,t,n,r){var a=QU(t,Array.isArray(e)?e:[e]);Bd[n]||(Bd[n]=new WeakMap);var o=Bd[n],l=[],u=new Set,d=new Set(a),f=function(y){!y||u.has(y)||(u.add(y),f(y.parentNode))};a.forEach(f);var m=function(y){!y||d.has(y)||Array.prototype.forEach.call(y.children,function(g){if(u.has(g))m(g);else try{var v=g.getAttribute(r),x=v!==null&&v!=="false",S=(lo.get(g)||0)+1,A=(o.get(g)||0)+1;lo.set(g,S),o.set(g,A),l.push(g),S===1&&x&&Vd.set(g,!0),A===1&&g.setAttribute(n,"true"),x||g.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return m(t),u.clear(),Ag++,function(){l.forEach(function(y){var g=lo.get(y)-1,v=o.get(y)-1;lo.set(y,g),o.set(y,v),g||(Vd.has(y)||y.removeAttribute(r),Vd.delete(y)),v||y.removeAttribute(n)}),Ag--,Ag||(lo=new WeakMap,lo=new WeakMap,Vd=new WeakMap,Bd={})}},ZC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=XU(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),JU(r,a,n,"aria-hidden")):function(){return null}},_h="Dialog",[XC,oQ]=nu(_h),[eH,kr]=XC(_h),QC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,u=E.useRef(null),d=E.useRef(null),[f,m]=Ef({prop:r,defaultProp:a??!1,onChange:o,caller:_h});return b.jsx(eH,{scope:t,triggerRef:u,contentRef:d,contentId:ur(),titleId:ur(),descriptionId:ur(),open:f,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(y=>!y),[m]),modal:l,children:n})};QC.displayName=_h;var JC="DialogTrigger",tH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=kr(JC,n),o=Nt(t,a.triggerRef);return b.jsx(Qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":tb(a.open),...r,ref:o,onClick:st(e.onClick,a.onOpenToggle)})});tH.displayName=JC;var Jv="DialogPortal",[nH,eR]=XC(Jv,{forceMount:void 0}),tR=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=kr(Jv,t);return b.jsx(nH,{scope:t,forceMount:n,children:E.Children.map(r,l=>b.jsx(ru,{present:n||o.open,children:b.jsx(ph,{asChild:!0,container:a,children:l})}))})};tR.displayName=Jv;var Cf="DialogOverlay",nR=E.forwardRef((e,t)=>{const n=eR(Cf,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=kr(Cf,e.__scopeDialog);return o.modal?b.jsx(ru,{present:r||o.open,children:b.jsx(iH,{...a,ref:t})}):null});nR.displayName=Cf;var rH=Ro("DialogOverlay.RemoveScroll"),iH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=kr(Cf,n);return b.jsx(Qv,{as:rH,allowPinchZoom:!0,shards:[a.contentRef],children:b.jsx(Qe.div,{"data-state":tb(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),fs="DialogContent",rR=E.forwardRef((e,t)=>{const n=eR(fs,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=kr(fs,e.__scopeDialog);return b.jsx(ru,{present:r||o.open,children:o.modal?b.jsx(aH,{...a,ref:t}):b.jsx(sH,{...a,ref:t})})});rR.displayName=fs;var aH=E.forwardRef((e,t)=>{const n=kr(fs,e.__scopeDialog),r=E.useRef(null),a=Nt(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return ZC(o)},[]),b.jsx(iR,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:st(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:st(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:st(e.onFocusOutside,o=>o.preventDefault())})}),sH=E.forwardRef((e,t)=>{const n=kr(fs,e.__scopeDialog),r=E.useRef(!1),a=E.useRef(!1);return b.jsx(iR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),iR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,u=kr(fs,n),d=E.useRef(null),f=Nt(t,d);return UC(),b.jsxs(b.Fragment,{children:[b.jsx(Xv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:b.jsx(mh,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":tb(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(uH,{titleId:u.titleId}),b.jsx(fH,{contentRef:d,descriptionId:u.descriptionId})]})]})}),eb="DialogTitle",oH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=kr(eb,n);return b.jsx(Qe.h2,{id:a.titleId,...r,ref:t})});oH.displayName=eb;var aR="DialogDescription",lH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=kr(aR,n);return b.jsx(Qe.p,{id:a.descriptionId,...r,ref:t})});lH.displayName=aR;var sR="DialogClose",cH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=kr(sR,n);return b.jsx(Qe.button,{type:"button",...r,ref:t,onClick:st(e.onClick,()=>a.onOpenChange(!1))})});cH.displayName=sR;function tb(e){return e?"open":"closed"}var oR="DialogTitleWarning",[lQ,lR]=iz(oR,{contentName:fs,titleName:eb,docsSlug:"dialog"}),uH=({titleId:e})=>{const t=lR(oR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
250
+
251
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
252
+
253
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},dH="DialogDescriptionWarning",fH=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lR(dH).contentName}}.`;return E.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},hH=QC,mH=tR,pH=nR,gH=rR,uA=1,yH=.9,vH=.8,bH=.17,wg=.1,Tg=.999,_H=.9999,xH=.99,EH=/[\\\/_+.#"@\[\(\{&]/,SH=/[\\\/_+.#"@\[\(\{&]/g,AH=/[\s-]/,cR=/[\s-]/g;function _y(e,t,n,r,a,o,l){if(o===t.length)return a===e.length?uA:xH;var u=`${a},${o}`;if(l[u]!==void 0)return l[u];for(var d=r.charAt(o),f=n.indexOf(d,a),m=0,y,g,v,x;f>=0;)y=_y(e,t,n,r,f+1,o+1,l),y>m&&(f===a?y*=uA:EH.test(e.charAt(f-1))?(y*=vH,v=e.slice(a,f-1).match(SH),v&&a>0&&(y*=Math.pow(Tg,v.length))):AH.test(e.charAt(f-1))?(y*=yH,x=e.slice(a,f-1).match(cR),x&&a>0&&(y*=Math.pow(Tg,x.length))):(y*=bH,a>0&&(y*=Math.pow(Tg,f-a))),e.charAt(f)!==t.charAt(o)&&(y*=_H)),(y<wg&&n.charAt(f-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(f-1)!==r.charAt(o))&&(g=_y(e,t,n,r,f+1,o+2,l),g*wg>y&&(y=g*wg)),y>m&&(m=y),f=n.indexOf(d,f+1);return l[u]=m,m}function dA(e){return e.toLowerCase().replace(cR," ")}function wH(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,_y(e,t,dA(e),dA(t),0,0,{})}var ic='[cmdk-group=""]',Cg='[cmdk-group-items=""]',TH='[cmdk-group-heading=""]',uR='[cmdk-item=""]',fA=`${uR}:not([aria-disabled="true"])`,xy="cmdk-item-select",uo="data-value",CH=(e,t,n)=>wH(e,t,n),dR=E.createContext(void 0),su=()=>E.useContext(dR),fR=E.createContext(void 0),nb=()=>E.useContext(fR),hR=E.createContext(void 0),mR=E.forwardRef((e,t)=>{let n=fo(()=>{var H,Q;return{search:"",value:(Q=(H=e.value)!=null?H:e.defaultValue)!=null?Q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=fo(()=>new Set),a=fo(()=>new Map),o=fo(()=>new Map),l=fo(()=>new Set),u=pR(e),{label:d,children:f,value:m,onValueChange:y,filter:g,shouldFilter:v,loop:x,disablePointerSelection:S=!1,vimBindings:A=!0,...w}=e,T=ur(),R=ur(),D=ur(),N=E.useRef(null),L=VH();hs(()=>{if(m!==void 0){let H=m.trim();n.current.value=H,O.emit()}},[m]),hs(()=>{L(6,fe)},[]);let O=E.useMemo(()=>({subscribe:H=>(l.current.add(H),()=>l.current.delete(H)),snapshot:()=>n.current,setState:(H,Q,re)=>{var he,xe,le,Ee;if(!Object.is(n.current[H],Q)){if(n.current[H]=Q,H==="search")ie(),U(),L(1,ue);else if(H==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let De=document.getElementById(D);De?De.focus():(he=document.getElementById(T))==null||he.focus()}if(L(7,()=>{var De;n.current.selectedItemId=(De=Z())==null?void 0:De.id,O.emit()}),re||L(5,fe),((xe=u.current)==null?void 0:xe.value)!==void 0){let De=Q??"";(Ee=(le=u.current).onValueChange)==null||Ee.call(le,De);return}}O.emit()}},emit:()=>{l.current.forEach(H=>H())}}),[]),M=E.useMemo(()=>({value:(H,Q,re)=>{var he;Q!==((he=o.current.get(H))==null?void 0:he.value)&&(o.current.set(H,{value:Q,keywords:re}),n.current.filtered.items.set(H,B(Q,re)),L(2,()=>{U(),O.emit()}))},item:(H,Q)=>(r.current.add(H),Q&&(a.current.has(Q)?a.current.get(Q).add(H):a.current.set(Q,new Set([H]))),L(3,()=>{ie(),U(),n.current.value||ue(),O.emit()}),()=>{o.current.delete(H),r.current.delete(H),n.current.filtered.items.delete(H);let re=Z();L(4,()=>{ie(),(re==null?void 0:re.getAttribute("id"))===H&&ue(),O.emit()})}),group:H=>(a.current.has(H)||a.current.set(H,new Set),()=>{o.current.delete(H),a.current.delete(H)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:T,inputId:D,labelId:R,listInnerRef:N}),[]);function B(H,Q){var re,he;let xe=(he=(re=u.current)==null?void 0:re.filter)!=null?he:CH;return H?xe(H,n.current.search,Q):0}function U(){if(!n.current.search||u.current.shouldFilter===!1)return;let H=n.current.filtered.items,Q=[];n.current.filtered.groups.forEach(he=>{let xe=a.current.get(he),le=0;xe.forEach(Ee=>{let De=H.get(Ee);le=Math.max(De,le)}),Q.push([he,le])});let re=N.current;ee().sort((he,xe)=>{var le,Ee;let De=he.getAttribute("id"),Ce=xe.getAttribute("id");return((le=H.get(Ce))!=null?le:0)-((Ee=H.get(De))!=null?Ee:0)}).forEach(he=>{let xe=he.closest(Cg);xe?xe.appendChild(he.parentElement===xe?he:he.closest(`${Cg} > *`)):re.appendChild(he.parentElement===re?he:he.closest(`${Cg} > *`))}),Q.sort((he,xe)=>xe[1]-he[1]).forEach(he=>{var xe;let le=(xe=N.current)==null?void 0:xe.querySelector(`${ic}[${uo}="${encodeURIComponent(he[0])}"]`);le==null||le.parentElement.appendChild(le)})}function ue(){let H=ee().find(re=>re.getAttribute("aria-disabled")!=="true"),Q=H==null?void 0:H.getAttribute(uo);O.setState("value",Q||void 0)}function ie(){var H,Q,re,he;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let xe=0;for(let le of r.current){let Ee=(Q=(H=o.current.get(le))==null?void 0:H.value)!=null?Q:"",De=(he=(re=o.current.get(le))==null?void 0:re.keywords)!=null?he:[],Ce=B(Ee,De);n.current.filtered.items.set(le,Ce),Ce>0&&xe++}for(let[le,Ee]of a.current)for(let De of Ee)if(n.current.filtered.items.get(De)>0){n.current.filtered.groups.add(le);break}n.current.filtered.count=xe}function fe(){var H,Q,re;let he=Z();he&&(((H=he.parentElement)==null?void 0:H.firstChild)===he&&((re=(Q=he.closest(ic))==null?void 0:Q.querySelector(TH))==null||re.scrollIntoView({block:"nearest"})),he.scrollIntoView({block:"nearest"}))}function Z(){var H;return(H=N.current)==null?void 0:H.querySelector(`${uR}[aria-selected="true"]`)}function ee(){var H;return Array.from(((H=N.current)==null?void 0:H.querySelectorAll(fA))||[])}function F(H){let Q=ee()[H];Q&&O.setState("value",Q.getAttribute(uo))}function ne(H){var Q;let re=Z(),he=ee(),xe=he.findIndex(Ee=>Ee===re),le=he[xe+H];(Q=u.current)!=null&&Q.loop&&(le=xe+H<0?he[he.length-1]:xe+H===he.length?he[0]:he[xe+H]),le&&O.setState("value",le.getAttribute(uo))}function q(H){let Q=Z(),re=Q==null?void 0:Q.closest(ic),he;for(;re&&!he;)re=H>0?jH(re,ic):PH(re,ic),he=re==null?void 0:re.querySelector(fA);he?O.setState("value",he.getAttribute(uo)):ne(H)}let ge=()=>F(ee().length-1),P=H=>{H.preventDefault(),H.metaKey?ge():H.altKey?q(1):ne(1)},X=H=>{H.preventDefault(),H.metaKey?F(0):H.altKey?q(-1):ne(-1)};return E.createElement(Qe.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:H=>{var Q;(Q=w.onKeyDown)==null||Q.call(w,H);let re=H.nativeEvent.isComposing||H.keyCode===229;if(!(H.defaultPrevented||re))switch(H.key){case"n":case"j":{A&&H.ctrlKey&&P(H);break}case"ArrowDown":{P(H);break}case"p":case"k":{A&&H.ctrlKey&&X(H);break}case"ArrowUp":{X(H);break}case"Home":{H.preventDefault(),F(0);break}case"End":{H.preventDefault(),ge();break}case"Enter":{H.preventDefault();let he=Z();if(he){let xe=new Event(xy);he.dispatchEvent(xe)}}}}},E.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:zH},d),xh(e,H=>E.createElement(fR.Provider,{value:O},E.createElement(dR.Provider,{value:M},H))))}),RH=E.forwardRef((e,t)=>{var n,r;let a=ur(),o=E.useRef(null),l=E.useContext(hR),u=su(),d=pR(e),f=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;hs(()=>{if(!f)return u.item(a,l==null?void 0:l.id)},[f]);let m=gR(a,o,[e.value,e.children,o],e.keywords),y=nb(),g=fa(L=>L.value&&L.value===m.current),v=fa(L=>f||u.filter()===!1?!0:L.search?L.filtered.items.get(a)>0:!0);E.useEffect(()=>{let L=o.current;if(!(!L||e.disabled))return L.addEventListener(xy,x),()=>L.removeEventListener(xy,x)},[v,e.onSelect,e.disabled]);function x(){var L,O;S(),(O=(L=d.current).onSelect)==null||O.call(L,m.current)}function S(){y.setState("value",m.current,!0)}if(!v)return null;let{disabled:A,value:w,onSelect:T,forceMount:R,keywords:D,...N}=e;return E.createElement(Qe.div,{ref:ds(o,t),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!g,"data-disabled":!!A,"data-selected":!!g,onPointerMove:A||u.getDisablePointerSelection()?void 0:S,onClick:A?void 0:x},e.children)}),NH=E.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,l=ur(),u=E.useRef(null),d=E.useRef(null),f=ur(),m=su(),y=fa(v=>a||m.filter()===!1?!0:v.search?v.filtered.groups.has(l):!0);hs(()=>m.group(l),[]),gR(l,u,[e.value,e.heading,d]);let g=E.useMemo(()=>({id:l,forceMount:a}),[a]);return E.createElement(Qe.div,{ref:ds(u,t),...o,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},n&&E.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),xh(e,v=>E.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},E.createElement(hR.Provider,{value:g},v))))}),kH=E.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=E.useRef(null),o=fa(l=>!l.search);return!n&&!o?null:E.createElement(Qe.div,{ref:ds(a,t),...r,"cmdk-separator":"",role:"separator"})}),OH=E.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=nb(),l=fa(f=>f.search),u=fa(f=>f.selectedItemId),d=su();return E.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),E.createElement(Qe.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":u,id:d.inputId,type:"text",value:a?e.value:l,onChange:f=>{a||o.setState("search",f.target.value),n==null||n(f.target.value)}})}),DH=E.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=E.useRef(null),l=E.useRef(null),u=fa(f=>f.selectedItemId),d=su();return E.useEffect(()=>{if(l.current&&o.current){let f=l.current,m=o.current,y,g=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let v=f.offsetHeight;m.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return g.observe(f),()=>{cancelAnimationFrame(y),g.unobserve(f)}}},[]),E.createElement(Qe.div,{ref:ds(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:d.listId},xh(e,f=>E.createElement("div",{ref:ds(l,d.listInnerRef),"cmdk-list-sizer":""},f)))}),IH=E.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:l,...u}=e;return E.createElement(hH,{open:n,onOpenChange:r},E.createElement(mH,{container:l},E.createElement(pH,{"cmdk-overlay":"",className:a}),E.createElement(gH,{"aria-label":e.label,"cmdk-dialog":"",className:o},E.createElement(mR,{ref:t,...u}))))}),LH=E.forwardRef((e,t)=>fa(n=>n.filtered.count===0)?E.createElement(Qe.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),MH=E.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return E.createElement(Qe.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},xh(e,l=>E.createElement("div",{"aria-hidden":!0},l)))}),ou=Object.assign(mR,{List:DH,Item:RH,Input:OH,Group:NH,Separator:kH,Dialog:IH,Empty:LH,Loading:MH});function jH(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function PH(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function pR(e){let t=E.useRef(e);return hs(()=>{t.current=e}),t}var hs=typeof window>"u"?E.useEffect:E.useLayoutEffect;function fo(e){let t=E.useRef();return t.current===void 0&&(t.current=e()),t}function fa(e){let t=nb(),n=()=>e(t.snapshot());return E.useSyncExternalStore(t.subscribe,n,n)}function gR(e,t,n,r=[]){let a=E.useRef(),o=su();return hs(()=>{var l;let u=(()=>{var f;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(f=m.current.textContent)==null?void 0:f.trim():a.current}})(),d=r.map(f=>f.trim());o.value(e,u,d),(l=t.current)==null||l.setAttribute(uo,u),a.current=u}),a}var VH=()=>{let[e,t]=E.useState(),n=fo(()=>new Map);return hs(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function BH(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function xh({asChild:e,children:t},n){return e&&E.isValidElement(t)?E.cloneElement(BH(t),{ref:t.ref},n(t.props.children)):n(t)}var zH={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const yR=({className:e,...t})=>b.jsx(ou,{className:Ae("flex size-full flex-col overflow-hidden rounded-md",e),...t}),UH=({className:e,...t})=>b.jsxs("div",{className:"flex w-full items-center","cmdk-input-wrapper":"",children:[b.jsx(qV,{className:"mr-2 size-4 shrink-0 opacity-50"}),b.jsx(ou.Input,{className:Ae("placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}),HH=({className:e,...t})=>b.jsx(ou.List,{className:Ae("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}),FH=e=>b.jsx(ou.Empty,{className:"py-6 text-center text-sm",...e}),GH=({className:e,...t})=>b.jsx(ou.Item,{className:Ae("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}),Rf={...yR,Input:UH,List:HH,Empty:FH,Item:GH},vR=E.createContext(null),Eh=()=>{const e=E.useContext(vR);if(!e)throw new Error("useMultiSelect must be used within MultiSelectProvider");return e},$H=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,className:a,children:o,dir:l,...u})=>{const[d,f]=E.useState(t??[]),[m,y]=E.useState(""),[g,v]=E.useState(!1),[x,S]=E.useState(-1),A=E.useRef(null),[w,T]=E.useState(!1),[R,D]=E.useState("");E.useEffect(()=>{e&&f(e)},[e]);const N=E.useCallback(B=>{if(d.includes(B)){const U=d.filter(ue=>ue!==B);f(U),n==null||n(U)}else{const U=[...d,B];f(U),n==null||n(U)}},[d]),L=E.useCallback(B=>{B.preventDefault();const U=B.currentTarget,ue=U.value.substring(U.selectionStart??0,U.selectionEnd??0);D(ue),T(ue===m)},[m]),O=E.useCallback(B=>{B.stopPropagation();const U=A.current;if(!U)return;const ue=()=>{const Z=x+1;S(Z>d.length-1?r?0:-1:Z)},ie=()=>{const Z=x-1;S(Z<0?d.length-1:Z)},fe=()=>{const Z=x-1<=0?d.length-1===0?-1:0:x-1;S(Z)};switch(B.key){case"ArrowLeft":l==="rtl"?d.length>0&&(x!==-1||r)&&ue():d.length>0&&U.selectionStart===0&&ie();break;case"ArrowRight":l==="rtl"?d.length>0&&U.selectionStart===0&&ie():d.length>0&&(x!==-1||r)&&ue();break;case"Backspace":case"Delete":d.length>0&&(x!==-1&&x<d.length?(N(d[x]),fe()):(U.selectionStart===0&&R===m||w)&&N(d[d.length-1]));break;case"Enter":v(!0);break;case"Escape":x!==-1?S(-1):g&&v(!1);break}},[d,m,x,r]),M=E.useMemo(()=>({value:d,onValueChange:N,open:g,setOpen:v,inputValue:m,setInputValue:y,activeIndex:x,setActiveIndex:S,ref:A,handleSelect:L}),[d,N,g,v,m,y,x,S,A,L]);return b.jsx(vR,{value:M,children:b.jsx(yR,{onKeyDown:O,className:Ae("flex w-full flex-col gap-2 overflow-visible bg-transparent",a),dir:l,...u,children:o})})},qH=({className:e,getBadgeValue:t=o=>o,validationStyleEnabled:n=!1,children:r,...a})=>{const{value:o,onValueChange:l,activeIndex:u}=Eh(),d=E.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]);return b.jsxs("div",{className:Ae("flex w-full flex-col gap-3 rounded-lg p-1 py-2","border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",n&&"valid:border-success invalid:border-error",e),...a,children:[o.length>0&&b.jsx("div",{className:"flex w-full flex-wrap gap-1",children:o.map((f,m)=>b.jsxs(aU,{className:Ae("flex items-center gap-1 rounded-xl px-1",u===m&&"ring-muted-foreground ring-2"),color:"text",children:[b.jsx("span",{className:"text-xs",children:t(f)}),b.jsxs("button",{"aria-label":`Remove ${f} option`,"aria-roledescription":"button to remove option",onMouseDown:d,onClick:()=>l(f),children:[b.jsxs("span",{className:"sr-only",children:["Remove ",f," option"]}),b.jsx(_s,{className:"size-4 cursor-pointer"})]})]},f))}),r]})},KH=({className:e,...t})=>{const{setOpen:n,inputValue:r,setInputValue:a,activeIndex:o,setActiveIndex:l,handleSelect:u,ref:d}=Eh();return b.jsx(Rf.Input,{...t,tabIndex:0,ref:d,value:r,onValueChange:o===-1?a:void 0,onSelect:u,onBlur:()=>n(!1),onFocus:()=>n(!0),onClick:()=>l(-1),className:Ae("outline-hidden ml-2 flex-1 cursor-pointer",e,o!==-1&&"caret-transparent")})},WH=({children:e})=>{const{open:t}=Eh();return b.jsx("div",{className:"relative",children:t&&e})},YH=({className:e,children:t})=>b.jsxs(Rf.List,{className:Ae("border-muted bg-input-background absolute top-0 z-10 flex w-full flex-col gap-2 rounded-lg border p-2 shadow-md transition-colors",e),children:[t,b.jsx(Rf.Empty,{children:b.jsx("span",{className:"text-muted-foreground",children:"No results found"})})]}),ZH=({className:e,value:t,children:n,...r})=>{const{value:a,onValueChange:o,setInputValue:l}=Eh(),u=E.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]),d=a.includes(t);return b.jsxs(Rf.Item,{...r,onSelect:()=>{o(t),l("")},className:Ae("flex cursor-pointer justify-between rounded-lg px-2 py-1 transition-colors","hover:bg-neutral/10",e,d&&"opacity-50",r.disabled&&"cursor-not-allowed opacity-50"),onMouseDown:u,children:[n,d&&b.jsx(Ho,{className:"size-4"})]})},gn=$H;gn.Trigger=qH;gn.Input=KH;gn.Content=WH;gn.List=YH;gn.Item=ZH;const XH=({className:e,children:t,...n})=>b.jsxs("i",{className:Ae("text-xs text-neutral-400",e),...n,children:["ⓘ ",t]}),Ey=({htmlFor:e,...t})=>b.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",htmlFor:e,...t}),QH=({className:e,...t})=>{const{error:n,formItemId:r}=Ea();return b.jsx(Ey,{className:Ae("mb-2",n&&"text-error",e),htmlFor:r,...t})},JH=({isRequired:e})=>e?b.jsx("span",{"aria-label":"Asterisk meaning the field is required",children:"*"}):b.jsx(b.Fragment,{}),bR=({children:e,isRequired:t,info:n,htmlFor:r,className:a})=>b.jsxs("div",{className:"ml-1 flex gap-1 align-middle text-base leading-none",children:[e&&b.jsxs(QH,{htmlFor:r,id:`${r}-label`,className:hh("font-bold",a),children:[e,b.jsx(JH,{isRequired:t})]}),n&&b.jsx(XH,{content:n})]});function hA(e,[t,n]){return Math.min(n,Math.max(t,e))}var eF=E.createContext(void 0);function tF(e){const t=E.useContext(eF);return e||t||"ltr"}const nF=["top","right","bottom","left"],ha=Math.min,Fn=Math.max,Nf=Math.round,zd=Math.floor,Fr=e=>({x:e,y:e}),rF={left:"right",right:"left",bottom:"top",top:"bottom"},iF={start:"end",end:"start"};function Sy(e,t,n){return Fn(e,ha(t,n))}function Ti(e,t){return typeof e=="function"?e(t):e}function Ci(e){return e.split("-")[0]}function qo(e){return e.split("-")[1]}function rb(e){return e==="x"?"y":"x"}function ib(e){return e==="y"?"height":"width"}function Ai(e){return["top","bottom"].includes(Ci(e))?"y":"x"}function ab(e){return rb(Ai(e))}function aF(e,t,n){n===void 0&&(n=!1);const r=qo(e),a=ab(e),o=ib(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=kf(l)),[l,kf(l)]}function sF(e){const t=kf(e);return[Ay(e),t,Ay(t)]}function Ay(e){return e.replace(/start|end/g,t=>iF[t])}function oF(e,t,n){const r=["left","right"],a=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?o:l;default:return[]}}function lF(e,t,n,r){const a=qo(e);let o=oF(Ci(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(Ay)))),o}function kf(e){return e.replace(/left|right|bottom|top/g,t=>rF[t])}function cF(e){return{top:0,right:0,bottom:0,left:0,...e}}function _R(e){return typeof e!="number"?cF(e):{top:e,right:e,bottom:e,left:e}}function Of(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function mA(e,t,n){let{reference:r,floating:a}=e;const o=Ai(t),l=ab(t),u=ib(l),d=Ci(t),f=o==="y",m=r.x+r.width/2-a.width/2,y=r.y+r.height/2-a.height/2,g=r[u]/2-a[u]/2;let v;switch(d){case"top":v={x:m,y:r.y-a.height};break;case"bottom":v={x:m,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y};break;case"left":v={x:r.x-a.width,y};break;default:v={x:r.x,y:r.y}}switch(qo(t)){case"start":v[l]-=g*(n&&f?-1:1);break;case"end":v[l]+=g*(n&&f?-1:1);break}return v}const uF=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y}=mA(f,r,d),g=r,v={},x=0;for(let S=0;S<u.length;S++){const{name:A,fn:w}=u[S],{x:T,y:R,data:D,reset:N}=await w({x:m,y,initialPlacement:r,placement:g,strategy:a,middlewareData:v,rects:f,platform:l,elements:{reference:e,floating:t}});m=T??m,y=R??y,v={...v,[A]:{...v[A],...D}},N&&x<=50&&(x++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:m,y}=mA(f,g,d)),S=-1)}return{x:m,y,placement:g,strategy:a,middlewareData:v}};async function kc(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:g=!1,padding:v=0}=Ti(t,e),x=_R(v),A=u[g?y==="floating"?"reference":"floating":y],w=Of(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(A)))==null||n?A:A.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),T=y==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),D=await(o.isElement==null?void 0:o.isElement(R))?await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1}:{x:1,y:1},N=Of(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:T,offsetParent:R,strategy:d}):T);return{top:(w.top-N.top+x.top)/D.y,bottom:(N.bottom-w.bottom+x.bottom)/D.y,left:(w.left-N.left+x.left)/D.x,right:(N.right-w.right+x.right)/D.x}}const dF=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Ti(e,t)||{};if(f==null)return{};const y=_R(m),g={x:n,y:r},v=ab(a),x=ib(v),S=await l.getDimensions(f),A=v==="y",w=A?"top":"left",T=A?"bottom":"right",R=A?"clientHeight":"clientWidth",D=o.reference[x]+o.reference[v]-g[v]-o.floating[x],N=g[v]-o.reference[v],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let O=L?L[R]:0;(!O||!await(l.isElement==null?void 0:l.isElement(L)))&&(O=u.floating[R]||o.floating[x]);const M=D/2-N/2,B=O/2-S[x]/2-1,U=ha(y[w],B),ue=ha(y[T],B),ie=U,fe=O-S[x]-ue,Z=O/2-S[x]/2+M,ee=Sy(ie,Z,fe),F=!d.arrow&&qo(a)!=null&&Z!==ee&&o.reference[x]/2-(Z<ie?U:ue)-S[x]/2<0,ne=F?Z<ie?Z-ie:Z-fe:0;return{[v]:g[v]+ne,data:{[v]:ee,centerOffset:Z-ee-ne,...F&&{alignmentOffset:ne}},reset:F}}}),fF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,...A}=Ti(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Ci(a),T=Ai(u),R=Ci(u)===u,D=await(d.isRTL==null?void 0:d.isRTL(f.floating)),N=g||(R||!S?[kf(u)]:sF(u)),L=x!=="none";!g&&L&&N.push(...lF(u,S,x,D));const O=[u,...N],M=await kc(t,A),B=[];let U=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&B.push(M[w]),y){const ee=aF(a,l,D);B.push(M[ee[0]],M[ee[1]])}if(U=[...U,{placement:a,overflows:B}],!B.every(ee=>ee<=0)){var ue,ie;const ee=(((ue=o.flip)==null?void 0:ue.index)||0)+1,F=O[ee];if(F){var fe;const q=y==="alignment"?T!==Ai(F):!1,ge=((fe=U[0])==null?void 0:fe.overflows[0])>0;if(!q||ge)return{data:{index:ee,overflows:U},reset:{placement:F}}}let ne=(ie=U.filter(q=>q.overflows[0]<=0).sort((q,ge)=>q.overflows[1]-ge.overflows[1])[0])==null?void 0:ie.placement;if(!ne)switch(v){case"bestFit":{var Z;const q=(Z=U.filter(ge=>{if(L){const P=Ai(ge.placement);return P===T||P==="y"}return!0}).map(ge=>[ge.placement,ge.overflows.filter(P=>P>0).reduce((P,X)=>P+X,0)]).sort((ge,P)=>ge[1]-P[1])[0])==null?void 0:Z[0];q&&(ne=q);break}case"initialPlacement":ne=u;break}if(a!==ne)return{reset:{placement:ne}}}return{}}}};function pA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gA(e){return nF.some(t=>e[t]>=0)}const hF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Ti(e,t);switch(r){case"referenceHidden":{const o=await kc(t,{...a,elementContext:"reference"}),l=pA(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:gA(l)}}}case"escaped":{const o=await kc(t,{...a,altBoundary:!0}),l=pA(o,n.floating);return{data:{escapedOffsets:l,escaped:gA(l)}}}default:return{}}}}};async function mF(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ci(n),u=qo(n),d=Ai(n)==="y",f=["left","top"].includes(l)?-1:1,m=o&&d?-1:1,y=Ti(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:x}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return u&&typeof x=="number"&&(v=u==="end"?x*-1:x),d?{x:v*m,y:g*f}:{x:g*f,y:v*m}}const pF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:l,middlewareData:u}=t,d=await mF(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:o+d.y,data:{...d,placement:l}}}}},gF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:w,y:T}=A;return{x:w,y:T}}},...d}=Ti(e,t),f={x:n,y:r},m=await kc(t,d),y=Ai(Ci(a)),g=rb(y);let v=f[g],x=f[y];if(o){const A=g==="y"?"top":"left",w=g==="y"?"bottom":"right",T=v+m[A],R=v-m[w];v=Sy(T,v,R)}if(l){const A=y==="y"?"top":"left",w=y==="y"?"bottom":"right",T=x+m[A],R=x-m[w];x=Sy(T,x,R)}const S=u.fn({...t,[g]:v,[y]:x});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[g]:o,[y]:l}}}}}},yF=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Ti(e,t),m={x:n,y:r},y=Ai(a),g=rb(y);let v=m[g],x=m[y];const S=Ti(u,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const R=g==="y"?"height":"width",D=o.reference[g]-o.floating[R]+A.mainAxis,N=o.reference[g]+o.reference[R]-A.mainAxis;v<D?v=D:v>N&&(v=N)}if(f){var w,T;const R=g==="y"?"width":"height",D=["top","left"].includes(Ci(a)),N=o.reference[y]-o.floating[R]+(D&&((w=l.offset)==null?void 0:w[y])||0)+(D?0:A.crossAxis),L=o.reference[y]+o.reference[R]+(D?0:((T=l.offset)==null?void 0:T[y])||0)-(D?A.crossAxis:0);x<N?x=N:x>L&&(x=L)}return{[g]:v,[y]:x}}}},vF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Ti(e,t),m=await kc(t,f),y=Ci(a),g=qo(a),v=Ai(a)==="y",{width:x,height:S}=o.floating;let A,w;y==="top"||y==="bottom"?(A=y,w=g===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(w=y,A=g==="end"?"top":"bottom");const T=S-m.top-m.bottom,R=x-m.left-m.right,D=ha(S-m[A],T),N=ha(x-m[w],R),L=!t.middlewareData.shift;let O=D,M=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=T),L&&!g){const U=Fn(m.left,0),ue=Fn(m.right,0),ie=Fn(m.top,0),fe=Fn(m.bottom,0);v?M=x-2*(U!==0||ue!==0?U+ue:Fn(m.left,m.right)):O=S-2*(ie!==0||fe!==0?ie+fe:Fn(m.top,m.bottom))}await d({...t,availableWidth:M,availableHeight:O});const B=await l.getDimensions(u.floating);return x!==B.width||S!==B.height?{reset:{rects:!0}}:{}}}};function Sh(){return typeof window<"u"}function Ko(e){return xR(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(xR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xR(e){return Sh()?e instanceof Node||e instanceof $n(e).Node:!1}function Cr(e){return Sh()?e instanceof Element||e instanceof $n(e).Element:!1}function Yr(e){return Sh()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function yA(e){return!Sh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function lu(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function bF(e){return["table","td","th"].includes(Ko(e))}function Ah(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function sb(e){const t=ob(),n=Cr(e)?Rr(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function _F(e){let t=ma(e);for(;Yr(t)&&!No(t);){if(sb(t))return t;if(Ah(t))return null;t=ma(t)}return null}function ob(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function No(e){return["html","body","#document"].includes(Ko(e))}function Rr(e){return $n(e).getComputedStyle(e)}function wh(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ma(e){if(Ko(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yA(e)&&e.host||Qr(e);return yA(t)?t.host:t}function ER(e){const t=ma(e);return No(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yr(t)&&lu(t)?t:ER(t)}function Oc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=ER(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=$n(a);if(o){const u=wy(l);return t.concat(l,l.visualViewport||[],lu(a)?a:[],u&&n?Oc(u):[])}return t.concat(a,Oc(a,[],n))}function wy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SR(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Yr(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=Nf(n)!==o||Nf(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function lb(e){return Cr(e)?e:e.contextElement}function So(e){const t=lb(e);if(!Yr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=SR(t);let l=(o?Nf(n.width):n.width)/r,u=(o?Nf(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const xF=Fr(0);function AR(e){const t=$n(e);return!ob()||!t.visualViewport?xF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function EF(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function ms(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=lb(e);let l=Fr(1);t&&(r?Cr(r)&&(l=So(r)):l=So(e));const u=EF(o,n,r)?AR(o):Fr(0);let d=(a.left+u.x)/l.x,f=(a.top+u.y)/l.y,m=a.width/l.x,y=a.height/l.y;if(o){const g=$n(o),v=r&&Cr(r)?$n(r):r;let x=g,S=wy(x);for(;S&&r&&v!==x;){const A=So(S),w=S.getBoundingClientRect(),T=Rr(S),R=w.left+(S.clientLeft+parseFloat(T.paddingLeft))*A.x,D=w.top+(S.clientTop+parseFloat(T.paddingTop))*A.y;d*=A.x,f*=A.y,m*=A.x,y*=A.y,d+=R,f+=D,x=$n(S),S=wy(x)}}return Of({width:m,height:y,x:d,y:f})}function cb(e,t){const n=wh(e).scrollLeft;return t?t.left+n:ms(Qr(e)).left+n}function wR(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:cb(e,r)),o=r.top+t.scrollTop;return{x:a,y:o}}function SF(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=Qr(r),u=t?Ah(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const m=Fr(0),y=Yr(r);if((y||!y&&!o)&&((Ko(r)!=="body"||lu(l))&&(d=wh(r)),Yr(r))){const v=ms(r);f=So(r),m.x=v.x+r.clientLeft,m.y=v.y+r.clientTop}const g=l&&!y&&!o?wR(l,d,!0):Fr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+g.x,y:n.y*f.y-d.scrollTop*f.y+m.y+g.y}}function AF(e){return Array.from(e.getClientRects())}function wF(e){const t=Qr(e),n=wh(e),r=e.ownerDocument.body,a=Fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+cb(e);const u=-n.scrollTop;return Rr(r).direction==="rtl"&&(l+=Fn(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:u}}function TF(e,t){const n=$n(e),r=Qr(e),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){o=a.width,l=a.height;const f=ob();(!f||f&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}return{width:o,height:l,x:u,y:d}}function CF(e,t){const n=ms(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Yr(e)?So(e):Fr(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,d=a*o.x,f=r*o.y;return{width:l,height:u,x:d,y:f}}function vA(e,t,n){let r;if(t==="viewport")r=TF(e,n);else if(t==="document")r=wF(Qr(e));else if(Cr(t))r=CF(t,n);else{const a=AR(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Of(r)}function TR(e,t){const n=ma(e);return n===t||!Cr(n)||No(n)?!1:Rr(n).position==="fixed"||TR(n,t)}function RF(e,t){const n=t.get(e);if(n)return n;let r=Oc(e,[],!1).filter(u=>Cr(u)&&Ko(u)!=="body"),a=null;const o=Rr(e).position==="fixed";let l=o?ma(e):e;for(;Cr(l)&&!No(l);){const u=Rr(l),d=sb(l);!d&&u.position==="fixed"&&(a=null),(o?!d&&!a:!d&&u.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||lu(l)&&!d&&TR(e,l))?r=r.filter(m=>m!==l):a=u,l=ma(l)}return t.set(e,r),r}function NF(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?Ah(t)?[]:RF(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const y=vA(t,m,a);return f.top=Fn(y.top,f.top),f.right=ha(y.right,f.right),f.bottom=ha(y.bottom,f.bottom),f.left=Fn(y.left,f.left),f},vA(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function kF(e){const{width:t,height:n}=SR(e);return{width:t,height:n}}function OF(e,t,n){const r=Yr(t),a=Qr(t),o=n==="fixed",l=ms(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=cb(a)}if(r||!r&&!o)if((Ko(t)!=="body"||lu(a))&&(u=wh(t)),r){const v=ms(t,!0,o,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else a&&f();o&&!r&&a&&f();const m=a&&!r&&!o?wR(a,u):Fr(0),y=l.left+u.scrollLeft-d.x-m.x,g=l.top+u.scrollTop-d.y-m.y;return{x:y,y:g,width:l.width,height:l.height}}function Rg(e){return Rr(e).position==="static"}function bA(e,t){if(!Yr(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qr(e)===n&&(n=n.ownerDocument.body),n}function CR(e,t){const n=$n(e);if(Ah(e))return n;if(!Yr(e)){let a=ma(e);for(;a&&!No(a);){if(Cr(a)&&!Rg(a))return a;a=ma(a)}return n}let r=bA(e,t);for(;r&&bF(r)&&Rg(r);)r=bA(r,t);return r&&No(r)&&Rg(r)&&!sb(r)?n:r||_F(e)||n}const DF=async function(e){const t=this.getOffsetParent||CR,n=this.getDimensions,r=await n(e.floating);return{reference:OF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function IF(e){return Rr(e).direction==="rtl"}const LF={convertOffsetParentRelativeRectToViewportRelativeRect:SF,getDocumentElement:Qr,getClippingRect:NF,getOffsetParent:CR,getElementRects:DF,getClientRects:AF,getDimensions:kF,getScale:So,isElement:Cr,isRTL:IF};function RR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function MF(e,t){let n=null,r;const a=Qr(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),o();const f=e.getBoundingClientRect(),{left:m,top:y,width:g,height:v}=f;if(u||t(),!g||!v)return;const x=zd(y),S=zd(a.clientWidth-(m+g)),A=zd(a.clientHeight-(y+v)),w=zd(m),R={rootMargin:-x+"px "+-S+"px "+-A+"px "+-w+"px",threshold:Fn(0,ha(1,d))||1};let D=!0;function N(L){const O=L[0].intersectionRatio;if(O!==d){if(!D)return l();O?l(!1,O):r=setTimeout(()=>{l(!1,1e-7)},1e3)}O===1&&!RR(f,e.getBoundingClientRect())&&l(),D=!1}try{n=new IntersectionObserver(N,{...R,root:a.ownerDocument})}catch{n=new IntersectionObserver(N,R)}n.observe(e)}return l(!0),o}function jF(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=lb(e),m=a||o?[...f?Oc(f):[],...Oc(t)]:[];m.forEach(w=>{a&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const y=f&&u?MF(f,n):null;let g=-1,v=null;l&&(v=new ResizeObserver(w=>{let[T]=w;T&&T.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var R;(R=v)==null||R.observe(t)})),n()}),f&&!d&&v.observe(f),v.observe(t));let x,S=d?ms(e):null;d&&A();function A(){const w=ms(e);S&&!RR(S,w)&&n(),S=w,x=requestAnimationFrame(A)}return n(),()=>{var w;m.forEach(T=>{a&&T.removeEventListener("scroll",n),o&&T.removeEventListener("resize",n)}),y==null||y(),(w=v)==null||w.disconnect(),v=null,d&&cancelAnimationFrame(x)}}const PF=pF,VF=gF,BF=fF,zF=vF,UF=hF,_A=dF,HF=yF,FF=(e,t,n)=>{const r=new Map,a={platform:LF,...n},o={...a.platform,_c:r};return uF(e,t,{...a,platform:o})};var cf=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Df(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Df(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!Df(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function NR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xA(e,t){const n=NR(e);return Math.round(t*n)/n}function Ng(e){const t=E.useRef(e);return cf(()=>{t.current=e}),t}function GF(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,y]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=E.useState(r);Df(g,r)||v(r);const[x,S]=E.useState(null),[A,w]=E.useState(null),T=E.useCallback(q=>{q!==L.current&&(L.current=q,S(q))},[]),R=E.useCallback(q=>{q!==O.current&&(O.current=q,w(q))},[]),D=o||x,N=l||A,L=E.useRef(null),O=E.useRef(null),M=E.useRef(m),B=d!=null,U=Ng(d),ue=Ng(a),ie=Ng(f),fe=E.useCallback(()=>{if(!L.current||!O.current)return;const q={placement:t,strategy:n,middleware:g};ue.current&&(q.platform=ue.current),FF(L.current,O.current,q).then(ge=>{const P={...ge,isPositioned:ie.current!==!1};Z.current&&!Df(M.current,P)&&(M.current=P,bs.flushSync(()=>{y(P)}))})},[g,t,n,ue,ie]);cf(()=>{f===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,y(q=>({...q,isPositioned:!1})))},[f]);const Z=E.useRef(!1);cf(()=>(Z.current=!0,()=>{Z.current=!1}),[]),cf(()=>{if(D&&(L.current=D),N&&(O.current=N),D&&N){if(U.current)return U.current(D,N,fe);fe()}},[D,N,fe,U,B]);const ee=E.useMemo(()=>({reference:L,floating:O,setReference:T,setFloating:R}),[T,R]),F=E.useMemo(()=>({reference:D,floating:N}),[D,N]),ne=E.useMemo(()=>{const q={position:n,left:0,top:0};if(!F.floating)return q;const ge=xA(F.floating,m.x),P=xA(F.floating,m.y);return u?{...q,transform:"translate("+ge+"px, "+P+"px)",...NR(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ge,top:P}},[n,u,F.floating,m.x,m.y]);return E.useMemo(()=>({...m,update:fe,refs:ee,elements:F,floatingStyles:ne}),[m,fe,ee,F,ne])}const $F=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?_A({element:r.current,padding:a}).fn(n):{}:r?_A({element:r,padding:a}).fn(n):{}}}},qF=(e,t)=>({...PF(e),options:[e,t]}),KF=(e,t)=>({...VF(e),options:[e,t]}),WF=(e,t)=>({...HF(e),options:[e,t]}),YF=(e,t)=>({...BF(e),options:[e,t]}),ZF=(e,t)=>({...zF(e),options:[e,t]}),XF=(e,t)=>({...UF(e),options:[e,t]}),QF=(e,t)=>({...$F(e),options:[e,t]});var JF="Arrow",kR=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return b.jsx(Qe.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});kR.displayName=JF;var e4=kR;function t4(e){const[t,n]=E.useState(void 0);return dn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ub="Popper",[OR,DR]=nu(ub),[n4,IR]=OR(ub),LR=e=>{const{__scopePopper:t,children:n}=e,[r,a]=E.useState(null);return b.jsx(n4,{scope:t,anchor:r,onAnchorChange:a,children:n})};LR.displayName=ub;var MR="PopperAnchor",jR=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=IR(MR,n),l=E.useRef(null),u=Nt(t,l);return E.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:b.jsx(Qe.div,{...a,ref:u})});jR.displayName=MR;var db="PopperContent",[r4,i4]=OR(db),PR=E.forwardRef((e,t)=>{var le,Ee,De,Ce,Fe,Ke;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:x,...S}=e,A=IR(db,n),[w,T]=E.useState(null),R=Nt(t,Et=>T(Et)),[D,N]=E.useState(null),L=t4(D),O=(L==null?void 0:L.width)??0,M=(L==null?void 0:L.height)??0,B=r+(o!=="center"?"-"+o:""),U=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},ue=Array.isArray(f)?f:[f],ie=ue.length>0,fe={padding:U,boundary:ue.filter(s4),altBoundary:ie},{refs:Z,floatingStyles:ee,placement:F,isPositioned:ne,middlewareData:q}=GF({strategy:"fixed",placement:B,whileElementsMounted:(...Et)=>jF(...Et,{animationFrame:v==="always"}),elements:{reference:A.anchor},middleware:[qF({mainAxis:a+M,alignmentAxis:l}),d&&KF({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?WF():void 0,...fe}),d&&YF({...fe}),ZF({...fe,apply:({elements:Et,rects:Yt,availableWidth:Ln,availableHeight:Cn})=>{const{width:pr,height:Na}=Yt.reference,gr=Et.floating.style;gr.setProperty("--radix-popper-available-width",`${Ln}px`),gr.setProperty("--radix-popper-available-height",`${Cn}px`),gr.setProperty("--radix-popper-anchor-width",`${pr}px`),gr.setProperty("--radix-popper-anchor-height",`${Na}px`)}}),D&&QF({element:D,padding:u}),o4({arrowWidth:O,arrowHeight:M}),g&&XF({strategy:"referenceHidden",...fe})]}),[ge,P]=zR(F),X=Tr(x);dn(()=>{ne&&(X==null||X())},[ne,X]);const H=(le=q.arrow)==null?void 0:le.x,Q=(Ee=q.arrow)==null?void 0:Ee.y,re=((De=q.arrow)==null?void 0:De.centerOffset)!==0,[he,xe]=E.useState();return dn(()=>{w&&xe(window.getComputedStyle(w).zIndex)},[w]),b.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:ne?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[(Ce=q.transformOrigin)==null?void 0:Ce.x,(Fe=q.transformOrigin)==null?void 0:Fe.y].join(" "),...((Ke=q.hide)==null?void 0:Ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(r4,{scope:n,placedSide:ge,onArrowChange:N,arrowX:H,arrowY:Q,shouldHideArrow:re,children:b.jsx(Qe.div,{"data-side":ge,"data-align":P,...S,ref:R,style:{...S.style,animation:ne?void 0:"none"}})})})});PR.displayName=db;var VR="PopperArrow",a4={top:"bottom",right:"left",bottom:"top",left:"right"},BR=E.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=i4(VR,r),l=a4[o.placedSide];return b.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:b.jsx(e4,{...a,ref:n,style:{...a.style,display:"block"}})})});BR.displayName=VR;function s4(e){return e!==null}var o4=e=>({name:"transformOrigin",options:e,fn(t){var A,w,T;const{placement:n,rects:r,middlewareData:a}=t,l=((A=a.arrow)==null?void 0:A.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=zR(n),y={start:"0%",center:"50%",end:"100%"}[m],g=(((w=a.arrow)==null?void 0:w.x)??0)+u/2,v=(((T=a.arrow)==null?void 0:T.y)??0)+d/2;let x="",S="";return f==="bottom"?(x=l?y:`${g}px`,S=`${-d}px`):f==="top"?(x=l?y:`${g}px`,S=`${r.floating.height+d}px`):f==="right"?(x=`${-d}px`,S=l?y:`${v}px`):f==="left"&&(x=`${r.floating.width+d}px`,S=l?y:`${v}px`),{data:{x,y:S}}}});function zR(e){const[t,n="center"]=e.split("-");return[t,n]}var l4=LR,c4=jR,u4=PR,d4=BR;function f4(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var h4=[" ","Enter","ArrowUp","ArrowDown"],m4=[" ","Enter"],ps="Select",[Th,Ch,p4]=X1(ps),[Wo,cQ]=nu(ps,[p4,DR]),Rh=DR(),[g4,Sa]=Wo(ps),[y4,v4]=Wo(ps),UR=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:f,name:m,autoComplete:y,disabled:g,required:v,form:x}=e,S=Rh(t),[A,w]=E.useState(null),[T,R]=E.useState(null),[D,N]=E.useState(!1),L=tF(f),[O,M]=Ef({prop:r,defaultProp:a??!1,onChange:o,caller:ps}),[B,U]=Ef({prop:l,defaultProp:u,onChange:d,caller:ps}),ue=E.useRef(null),ie=A?x||!!A.closest("form"):!0,[fe,Z]=E.useState(new Set),ee=Array.from(fe).map(F=>F.props.value).join(";");return b.jsx(l4,{...S,children:b.jsxs(g4,{required:v,scope:t,trigger:A,onTriggerChange:w,valueNode:T,onValueNodeChange:R,valueNodeHasChildren:D,onValueNodeHasChildrenChange:N,contentId:ur(),value:B,onValueChange:U,open:O,onOpenChange:M,dir:L,triggerPointerDownPosRef:ue,disabled:g,children:[b.jsx(Th.Provider,{scope:t,children:b.jsx(y4,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(F=>{Z(ne=>new Set(ne).add(F))},[]),onNativeOptionRemove:E.useCallback(F=>{Z(ne=>{const q=new Set(ne);return q.delete(F),q})},[]),children:n})}),ie?b.jsxs(fN,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:y,value:B,onChange:F=>U(F.target.value),disabled:g,form:x,children:[B===void 0?b.jsx("option",{value:""}):null,Array.from(fe)]},ee):null]})})};UR.displayName=ps;var HR="SelectTrigger",FR=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=Rh(n),l=Sa(HR,n),u=l.disabled||r,d=Nt(t,l.onTriggerChange),f=Ch(n),m=E.useRef("touch"),[y,g,v]=mN(S=>{const A=f().filter(R=>!R.disabled),w=A.find(R=>R.value===l.value),T=pN(A,S,w);T!==void 0&&l.onValueChange(T.value)}),x=S=>{u||(l.onOpenChange(!0),v()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return b.jsx(c4,{asChild:!0,...o,children:b.jsx(Qe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":hN(l.value)?"":void 0,...a,ref:d,onClick:st(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&x(S)}),onPointerDown:st(a.onPointerDown,S=>{m.current=S.pointerType;const A=S.target;A.hasPointerCapture(S.pointerId)&&A.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(x(S),S.preventDefault())}),onKeyDown:st(a.onKeyDown,S=>{const A=y.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(A&&S.key===" ")&&h4.includes(S.key)&&(x(),S.preventDefault())})})})});FR.displayName=HR;var GR="SelectValue",$R=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:l="",...u}=e,d=Sa(GR,n),{onValueNodeHasChildrenChange:f}=d,m=o!==void 0,y=Nt(t,d.onValueNodeChange);return dn(()=>{f(m)},[f,m]),b.jsx(Qe.span,{...u,ref:y,style:{pointerEvents:"none"},children:hN(d.value)?b.jsx(b.Fragment,{children:l}):o})});$R.displayName=GR;var b4="SelectIcon",qR=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return b.jsx(Qe.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});qR.displayName=b4;var _4="SelectPortal",KR=e=>b.jsx(ph,{asChild:!0,...e});KR.displayName=_4;var gs="SelectContent",WR=E.forwardRef((e,t)=>{const n=Sa(gs,e.__scopeSelect),[r,a]=E.useState();if(dn(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?bs.createPortal(b.jsx(YR,{scope:e.__scopeSelect,children:b.jsx(Th.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),o):null}return b.jsx(ZR,{...e,ref:t})});WR.displayName=gs;var Er=10,[YR,Aa]=Wo(gs),x4="SelectContentImpl",E4=Ro("SelectContent.RemoveScroll"),ZR=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:y,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:S,avoidCollisions:A,...w}=e,T=Sa(gs,n),[R,D]=E.useState(null),[N,L]=E.useState(null),O=Nt(t,le=>D(le)),[M,B]=E.useState(null),[U,ue]=E.useState(null),ie=Ch(n),[fe,Z]=E.useState(!1),ee=E.useRef(!1);E.useEffect(()=>{if(R)return ZC(R)},[R]),UC();const F=E.useCallback(le=>{const[Ee,...De]=ie().map(Ke=>Ke.ref.current),[Ce]=De.slice(-1),Fe=document.activeElement;for(const Ke of le)if(Ke===Fe||(Ke==null||Ke.scrollIntoView({block:"nearest"}),Ke===Ee&&N&&(N.scrollTop=0),Ke===Ce&&N&&(N.scrollTop=N.scrollHeight),Ke==null||Ke.focus(),document.activeElement!==Fe))return},[ie,N]),ne=E.useCallback(()=>F([M,R]),[F,M,R]);E.useEffect(()=>{fe&&ne()},[fe,ne]);const{onOpenChange:q,triggerPointerDownPosRef:ge}=T;E.useEffect(()=>{if(R){let le={x:0,y:0};const Ee=Ce=>{var Fe,Ke;le={x:Math.abs(Math.round(Ce.pageX)-(((Fe=ge.current)==null?void 0:Fe.x)??0)),y:Math.abs(Math.round(Ce.pageY)-(((Ke=ge.current)==null?void 0:Ke.y)??0))}},De=Ce=>{le.x<=10&&le.y<=10?Ce.preventDefault():R.contains(Ce.target)||q(!1),document.removeEventListener("pointermove",Ee),ge.current=null};return ge.current!==null&&(document.addEventListener("pointermove",Ee),document.addEventListener("pointerup",De,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ee),document.removeEventListener("pointerup",De,{capture:!0})}}},[R,q,ge]),E.useEffect(()=>{const le=()=>q(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[q]);const[P,X]=mN(le=>{const Ee=ie().filter(Fe=>!Fe.disabled),De=Ee.find(Fe=>Fe.ref.current===document.activeElement),Ce=pN(Ee,le,De);Ce&&setTimeout(()=>Ce.ref.current.focus())}),H=E.useCallback((le,Ee,De)=>{const Ce=!ee.current&&!De;(T.value!==void 0&&T.value===Ee||Ce)&&(B(le),Ce&&(ee.current=!0))},[T.value]),Q=E.useCallback(()=>R==null?void 0:R.focus(),[R]),re=E.useCallback((le,Ee,De)=>{const Ce=!ee.current&&!De;(T.value!==void 0&&T.value===Ee||Ce)&&ue(le)},[T.value]),he=r==="popper"?Ty:XR,xe=he===Ty?{side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:y,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:S,avoidCollisions:A}:{};return b.jsx(YR,{scope:n,content:R,viewport:N,onViewportChange:L,itemRefCallback:H,selectedItem:M,onItemLeave:Q,itemTextRefCallback:re,focusSelectedItem:ne,selectedItemText:U,position:r,isPositioned:fe,searchRef:P,children:b.jsx(Qv,{as:E4,allowPinchZoom:!0,children:b.jsx(Xv,{asChild:!0,trapped:T.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:st(a,le=>{var Ee;(Ee=T.trigger)==null||Ee.focus({preventScroll:!0}),le.preventDefault()}),children:b.jsx(mh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:b.jsx(he,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:le=>le.preventDefault(),...w,...xe,onPlaced:()=>Z(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:st(w.onKeyDown,le=>{const Ee=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!Ee&&le.key.length===1&&X(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let Ce=ie().filter(Fe=>!Fe.disabled).map(Fe=>Fe.ref.current);if(["ArrowUp","End"].includes(le.key)&&(Ce=Ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Fe=le.target,Ke=Ce.indexOf(Fe);Ce=Ce.slice(Ke+1)}setTimeout(()=>F(Ce)),le.preventDefault()}})})})})})})});ZR.displayName=x4;var S4="SelectItemAlignedPosition",XR=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=Sa(gs,n),l=Aa(gs,n),[u,d]=E.useState(null),[f,m]=E.useState(null),y=Nt(t,O=>m(O)),g=Ch(n),v=E.useRef(!1),x=E.useRef(!0),{viewport:S,selectedItem:A,selectedItemText:w,focusSelectedItem:T}=l,R=E.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&f&&S&&A&&w){const O=o.trigger.getBoundingClientRect(),M=f.getBoundingClientRect(),B=o.valueNode.getBoundingClientRect(),U=w.getBoundingClientRect();if(o.dir!=="rtl"){const Fe=U.left-M.left,Ke=B.left-Fe,Et=O.left-Ke,Yt=O.width+Et,Ln=Math.max(Yt,M.width),Cn=window.innerWidth-Er,pr=hA(Ke,[Er,Math.max(Er,Cn-Ln)]);u.style.minWidth=Yt+"px",u.style.left=pr+"px"}else{const Fe=M.right-U.right,Ke=window.innerWidth-B.right-Fe,Et=window.innerWidth-O.right-Ke,Yt=O.width+Et,Ln=Math.max(Yt,M.width),Cn=window.innerWidth-Er,pr=hA(Ke,[Er,Math.max(Er,Cn-Ln)]);u.style.minWidth=Yt+"px",u.style.right=pr+"px"}const ue=g(),ie=window.innerHeight-Er*2,fe=S.scrollHeight,Z=window.getComputedStyle(f),ee=parseInt(Z.borderTopWidth,10),F=parseInt(Z.paddingTop,10),ne=parseInt(Z.borderBottomWidth,10),q=parseInt(Z.paddingBottom,10),ge=ee+F+fe+q+ne,P=Math.min(A.offsetHeight*5,ge),X=window.getComputedStyle(S),H=parseInt(X.paddingTop,10),Q=parseInt(X.paddingBottom,10),re=O.top+O.height/2-Er,he=ie-re,xe=A.offsetHeight/2,le=A.offsetTop+xe,Ee=ee+F+le,De=ge-Ee;if(Ee<=re){const Fe=ue.length>0&&A===ue[ue.length-1].ref.current;u.style.bottom="0px";const Ke=f.clientHeight-S.offsetTop-S.offsetHeight,Et=Math.max(he,xe+(Fe?Q:0)+Ke+ne),Yt=Ee+Et;u.style.height=Yt+"px"}else{const Fe=ue.length>0&&A===ue[0].ref.current;u.style.top="0px";const Et=Math.max(re,ee+S.offsetTop+(Fe?H:0)+xe)+De;u.style.height=Et+"px",S.scrollTop=Ee-re+S.offsetTop}u.style.margin=`${Er}px 0`,u.style.minHeight=P+"px",u.style.maxHeight=ie+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[g,o.trigger,o.valueNode,u,f,S,A,w,o.dir,r]);dn(()=>R(),[R]);const[D,N]=E.useState();dn(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const L=E.useCallback(O=>{O&&x.current===!0&&(R(),T==null||T(),x.current=!1)},[R,T]);return b.jsx(w4,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:L,children:b.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:b.jsx(Qe.div,{...a,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});XR.displayName=S4;var A4="SelectPopperPosition",Ty=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=Er,...o}=e,l=Rh(n);return b.jsx(u4,{...l,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ty.displayName=A4;var[w4,fb]=Wo(gs,{}),Cy="SelectViewport",QR=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=Aa(Cy,n),l=fb(Cy,n),u=Nt(t,o.onViewportChange),d=E.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),b.jsx(Th.Slot,{scope:n,children:b.jsx(Qe.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:st(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&y){const v=Math.abs(d.current-m.scrollTop);if(v>0){const x=window.innerHeight-Er*2,S=parseFloat(y.style.minHeight),A=parseFloat(y.style.height),w=Math.max(S,A);if(w<x){const T=w+v,R=Math.min(x,T),D=T-R;y.style.height=R+"px",y.style.bottom==="0px"&&(m.scrollTop=D>0?D:0,y.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});QR.displayName=Cy;var JR="SelectGroup",[T4,C4]=Wo(JR),eN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=ur();return b.jsx(T4,{scope:n,id:a,children:b.jsx(Qe.div,{role:"group","aria-labelledby":a,...r,ref:t})})});eN.displayName=JR;var tN="SelectLabel",nN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=C4(tN,n);return b.jsx(Qe.div,{id:a.id,...r,ref:t})});nN.displayName=tN;var If="SelectItem",[R4,rN]=Wo(If),iN=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...l}=e,u=Sa(If,n),d=Aa(If,n),f=u.value===r,[m,y]=E.useState(o??""),[g,v]=E.useState(!1),x=Nt(t,T=>{var R;return(R=d.itemRefCallback)==null?void 0:R.call(d,T,r,a)}),S=ur(),A=E.useRef("touch"),w=()=>{a||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return b.jsx(R4,{scope:n,value:r,disabled:a,textId:S,isSelected:f,onItemTextChange:E.useCallback(T=>{y(R=>R||((T==null?void 0:T.textContent)??"").trim())},[]),children:b.jsx(Th.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:b.jsx(Qe.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:x,onFocus:st(l.onFocus,()=>v(!0)),onBlur:st(l.onBlur,()=>v(!1)),onClick:st(l.onClick,()=>{A.current!=="mouse"&&w()}),onPointerUp:st(l.onPointerUp,()=>{A.current==="mouse"&&w()}),onPointerDown:st(l.onPointerDown,T=>{A.current=T.pointerType}),onPointerMove:st(l.onPointerMove,T=>{var R;A.current=T.pointerType,a?(R=d.onItemLeave)==null||R.call(d):A.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:st(l.onPointerLeave,T=>{var R;T.currentTarget===document.activeElement&&((R=d.onItemLeave)==null||R.call(d))}),onKeyDown:st(l.onKeyDown,T=>{var D;((D=d.searchRef)==null?void 0:D.current)!==""&&T.key===" "||(m4.includes(T.key)&&w(),T.key===" "&&T.preventDefault())})})})})});iN.displayName=If;var uc="SelectItemText",aN=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,l=Sa(uc,n),u=Aa(uc,n),d=rN(uc,n),f=v4(uc,n),[m,y]=E.useState(null),g=Nt(t,w=>y(w),d.onItemTextChange,w=>{var T;return(T=u.itemTextRefCallback)==null?void 0:T.call(u,w,d.value,d.disabled)}),v=m==null?void 0:m.textContent,x=E.useMemo(()=>b.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:S,onNativeOptionRemove:A}=f;return dn(()=>(S(x),()=>A(x)),[S,A,x]),b.jsxs(b.Fragment,{children:[b.jsx(Qe.span,{id:d.textId,...o,ref:g}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?bs.createPortal(o.children,l.valueNode):null]})});aN.displayName=uc;var sN="SelectItemIndicator",oN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return rN(sN,n).isSelected?b.jsx(Qe.span,{"aria-hidden":!0,...r,ref:t}):null});oN.displayName=sN;var Ry="SelectScrollUpButton",lN=E.forwardRef((e,t)=>{const n=Aa(Ry,e.__scopeSelect),r=fb(Ry,e.__scopeSelect),[a,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return dn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;o(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?b.jsx(uN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});lN.displayName=Ry;var Ny="SelectScrollDownButton",cN=E.forwardRef((e,t)=>{const n=Aa(Ny,e.__scopeSelect),r=fb(Ny,e.__scopeSelect),[a,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return dn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;o(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?b.jsx(uN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});cN.displayName=Ny;var uN=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=Aa("SelectScrollButton",n),l=E.useRef(null),u=Ch(n),d=E.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return E.useEffect(()=>()=>d(),[d]),dn(()=>{var m;const f=u().find(y=>y.ref.current===document.activeElement);(m=f==null?void 0:f.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),b.jsx(Qe.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:st(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:st(a.onPointerMove,()=>{var f;(f=o.onItemLeave)==null||f.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:st(a.onPointerLeave,()=>{d()})})}),N4="SelectSeparator",dN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(Qe.div,{"aria-hidden":!0,...r,ref:t})});dN.displayName=N4;var ky="SelectArrow",k4=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Rh(n),o=Sa(ky,n),l=Aa(ky,n);return o.open&&l.position==="popper"?b.jsx(d4,{...a,...r,ref:t}):null});k4.displayName=ky;var O4="SelectBubbleInput",fN=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=E.useRef(null),o=Nt(r,a),l=f4(t);return E.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&m){const y=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(y)}},[l,t]),b.jsx(Qe.select,{...n,style:{...nC,...n.style},ref:o,defaultValue:t})});fN.displayName=O4;function hN(e){return e===""||e===void 0}function mN(e){const t=Tr(e),n=E.useRef(""),r=E.useRef(0),a=E.useCallback(l=>{const u=n.current+l;t(u),function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(u)},[t]),o=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function pN(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=D4(e,Math.max(o,0));a.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function D4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var I4=UR,L4=FR,M4=$R,j4=qR,P4=KR,V4=WR,B4=QR,z4=eN,U4=nN,H4=iN,F4=aN,G4=oN,$4=lN,q4=cN,K4=dN;const W4=I4,Y4=z4,Z4=M4,X4=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>b.jsxs(L4,{className:Ae("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap rounded-md border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",e&&"valid:border-success invalid:border-error",t),...r,children:[n,b.jsx(j4,{asChild:!0,children:b.jsx(SV,{className:"size-4 opacity-50"})})]}),gN=({className:e,...t})=>b.jsx($4,{className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(xV,{})}),yN=({className:e,...t})=>b.jsx(q4,{className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(O1,{})}),Q4=({className:e,children:t,position:n="popper",...r})=>b.jsx(P4,{children:b.jsxs(V4,{className:Ae("bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 p-1 text-sm shadow-none outline-0 transition-all","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[b.jsx(gN,{}),b.jsx(B4,{className:Ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(yN,{})]})}),J4=({className:e,...t})=>b.jsx(U4,{className:Ae("px-1 py-0.5 text-sm font-semibold",e),...t}),e3=({className:e,children:t,...n})=>b.jsxs(H4,{className:Ae("focus:bg-neutral/10 outline-hidden relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:b.jsx(G4,{children:b.jsx(Ho,{className:"size-4"})})}),b.jsx(F4,{children:t})]}),t3=({className:e,...t})=>b.jsx(K4,{className:Ae("-mx-1 my-1 h-px bg-red-300",e),...t}),je=W4;je.Group=Y4;je.Value=Z4;je.Trigger=X4;je.ScrollUpButton=gN;je.ScrollDownButton=yN;je.Content=Q4;je.Label=J4;je.Item=e3;je.Separator=t3;const n3=e=>(e==null?void 0:e.getAttribute("aria-selected"))==="true",r3=(e,t=n3,n=!1)=>{const[r,a]=E.useState(null),[o,l]=E.useState(null),u=e.current.length;return E.useEffect(()=>{const d=()=>{let S=null;if(o?S=o:S=e.current.find(t)??null,!S){a(T=>({left:0,width:0,...T,opacity:0}));return}const A=S.offsetLeft,w=S.offsetWidth;a({left:A,width:w,opacity:1})};d(),window.addEventListener("resize",d),window.addEventListener("DOMContentLoaded",d);const f=[];e.current.forEach(S=>{if(S){const A=new MutationObserver(w=>{for(const T of w)if(T.type==="attributes"&&T.attributeName==="aria-selected"){d();break}});A.observe(S,{attributes:!0,attributeFilter:["aria-selected"]}),f.push(A)}});const m=[],y=S=>{if(!S)return;const A=new ResizeObserver(()=>{d()});A.observe(S),m.push(A)},g=e.current.find(t)??null;g&&y(g),o&&y(o);const v=S=>{l(S.currentTarget)},x=()=>{l(null)};return n&&e.current.forEach(S=>{S==null||S.addEventListener("mouseenter",v,{passive:!0}),S==null||S.addEventListener("mouseleave",x,{passive:!0})}),()=>{window.removeEventListener("resize",d),window.removeEventListener("DOMContentLoaded",d),f.forEach(S=>S.disconnect()),m.forEach(S=>S.disconnect()),e.current.forEach(S=>{S==null||S.removeEventListener("mouseenter",v),S==null||S.removeEventListener("mouseleave",x)})}},[e,t,o,u]),{choiceIndicatorPosition:r}},i3=[{content:"Off",value:!1},{content:"On",value:!0}],a3=hr("flex flex-row gap-2 rounded-full w-fit border-[1.5px] p-[1.5px]",{variants:{color:{primary:"border-primary text-primary",secondary:"border-secondary text-secondary",destructive:"border-destructive bg-destructive text-destructive",neutral:"border-neutral text-neutral ",light:"border-white text-white",dark:"border-neutral-800 text-neutral-800",text:"border-text text-text"}},defaultVariants:{color:"primary"}}),s3=hr("z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out cursor-pointer aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none",{variants:{size:{sm:"py-1 px-2 text-xs",md:"p-2 text-sm",lg:"p-4 text-base"}},defaultVariants:{size:"md"}}),o3=hr("absolute top-0 z-[-1] h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none",{variants:{color:{primary:"bg-primary aria-selected:text-text",secondary:"bg-secondary aria-selected:text-text",destructive:"bg-destructive aria-selected:text-text",neutral:"bg-neutral aria-selected:text-white ",light:"bg-white aria-selected:text-black",dark:"bg-neutral-800 aria-selected:text-white",text:"bg-text aria-selected:text-text-opposite"}}}),cu=({choices:e=i3,value:t,defaultValue:n,onChange:r,color:a="primary",size:o="md",className:l})=>{const[u,d]=E.useState(t??n??e[0].value),f=E.useRef([]),m=E.useRef(null),{choiceIndicatorPosition:y}=r3(f),g=v=>{d(v),r==null||r(v)};return E.useEffect(()=>{t!==void 0&&d(t)},[t]),b.jsx("div",{className:a3({color:a,className:l}),role:"tablist",children:b.jsxs("div",{className:"relative flex size-full flex-row items-center justify-center",children:[e.map((v,x)=>{const{content:S,value:A,...w}=v,T=typeof A=="string"||typeof A=="number",R=A===u;return E.createElement("button",{...w,className:Ae(s3({size:o})),key:T?A:x,role:"tab",onClick:()=>g(A),"aria-selected":R,disabled:R,ref:D=>{f.current[x]=D}},S)}),y&&b.jsx("div",{className:Ae(o3({color:a})),style:y,ref:m})]})})},l3=e=>{const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=Ea();return b.jsx(sz,{id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})},c3=e=>{const{formDescriptionId:t}=Ea();return b.jsx("p",{className:"text-neutral text-sm",id:t,...e})},u3=({children:e,...t})=>{const{error:n,formMessageId:r}=Ea(),a=n?String((n==null?void 0:n.message)??""):e;return a?b.jsx("p",{className:"text-error text-xs font-medium",role:"alert",id:r,...t,children:a}):null},Nh=({label:e,description:t,isRequired:n,info:r,children:a,showErrorMessage:o=!0,htmlFor:l})=>b.jsxs(Xe.Item,{className:"flex w-full flex-col gap-2 p-2",children:[(t||e)&&b.jsxs("div",{className:"flex flex-col gap-1 p-1 leading-none",children:[e&&b.jsx(bR,{isRequired:n,info:r,htmlFor:l,children:e}),t&&b.jsx(Xe.Description,{children:t})]}),b.jsx(Xe.Control,{children:a}),o&&b.jsx(Xe.Message,{"data-testid":"error-message"})]}),d3=({field:e,name:t,label:n,Element:r,isRequired:a=!1,info:o,description:l,showErrorMessage:u=!0,...d})=>{const{error:f}=Ea();return b.jsx(Nh,{htmlFor:t,label:n,description:l,isRequired:a,info:o,showErrorMessage:u,"aria-invalid":!!f,children:b.jsx(r,{"data-testid":"element",id:t,...e,...d,children:d.children})})},wa=e=>{const{control:t}=xa();return b.jsx(Xe.Field,{control:t,name:e.name,render:({field:n})=>b.jsx(d3,{...e,field:n})})},f3=e=>b.jsx(wa,{id:e.name,"data-testid":e.name,Element:$o,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),h3=({autoComplete:e,...t})=>b.jsx(wa,{Element:rU,id:t.name,"data-testid":t.name,"aria-labelledby":t.label?`${t.name}-label`:void 0,"aria-label":t.label?void 0:t.name,autoComplete:e,minLength:6,maxLength:255,...t}),m3=e=>b.jsx(wa,{Element:jC,id:e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,"data-testid":e.name,...e}),p3=e=>b.jsx(wa,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:VC,...e}),g3=e=>b.jsx(wa,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:BC,...e}),y3=e=>b.jsx(wa,{Element:Zv,id:e.name,"data-testid":e.name,...e}),v3=({inputLabel:e,...t})=>b.jsx(nU,{...t,label:e}),b3=({autoComplete:e,...t})=>b.jsx(wa,{Element:v3,id:t.name,"data-testid":t.name,autoComplete:e,minLength:6,maxLength:255,...t}),_3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=xa();return b.jsx(Xe.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ea();return b.jsx(Nh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:b.jsx(gn,{onValueChange:f.onChange,values:f.value,...u,children:l})})}})},x3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=xa();return b.jsx(Xe.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ea();return b.jsx(Nh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:b.jsx(je,{onValueChange:f.onChange,defaultValue:f.value,...u,children:l})})}})},E3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=xa();return b.jsx(Xe.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ea();return b.jsx(Nh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:b.jsx(cu,{...f,...u,children:l})})}})},Xe=X2;Xe.Description=c3;Xe.Control=l3;Xe.Field=eU;Xe.Item=J2;Xe.Label=bR;Xe.Message=u3;Xe.Element=wa;Xe.Input=f3;Xe.InputPassword=h3;Xe.Checkbox=b3;Xe.TextArea=m3;Xe.AutoSizedTextArea=y3;Xe.Button=yt;Xe.Select=x3;Xe.MultiSelect=_3;Xe.EditableFieldInput=p3;Xe.EditableFieldTextArea=g3;Xe.SwitchSelector=E3;var ft;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const o={};for(const l of a)o[l]=l;return o},e.getValidEnumValues=a=>{const o=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),l={};for(const u of o)l[u]=a[u];return e.objectValues(l)},e.objectValues=a=>e.objectKeys(a).map(function(o){return a[o]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const o=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&o.push(l);return o},e.find=(a,o)=>{for(const l of a)if(o(l))return l},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,o=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(a,o)=>typeof o=="bigint"?o.toString():o})(ft||(ft={}));var EA;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(EA||(EA={}));const Ie=ft.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oa=e=>{switch(typeof e){case"undefined":return Ie.undefined;case"string":return Ie.string;case"number":return Number.isNaN(e)?Ie.nan:Ie.number;case"boolean":return Ie.boolean;case"function":return Ie.function;case"bigint":return Ie.bigint;case"symbol":return Ie.symbol;case"object":return Array.isArray(e)?Ie.array:e===null?Ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ie.promise:typeof Map<"u"&&e instanceof Map?Ie.map:typeof Set<"u"&&e instanceof Set?Ie.set:typeof Date<"u"&&e instanceof Date?Ie.date:Ie.object;default:return Ie.unknown}},ve=ft.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ri extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},a=o=>{for(const l of o.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(l))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof Ri))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ft.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ri.create=e=>new Ri(e);const Oy=(e,t)=>{let n;switch(e.code){case ve.invalid_type:e.received===Ie.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ft.jsonStringifyReplacer)}`;break;case ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${ft.joinValues(e.keys,", ")}`;break;case ve.invalid_union:n="Invalid input";break;case ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ft.joinValues(e.options)}`;break;case ve.invalid_enum_value:n=`Invalid enum value. Expected ${ft.joinValues(e.options)}, received '${e.received}'`;break;case ve.invalid_arguments:n="Invalid function arguments";break;case ve.invalid_return_type:n="Invalid function return type";break;case ve.invalid_date:n="Invalid date";break;case ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ft.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ve.custom:n="Invalid input";break;case ve.invalid_intersection_types:n="Intersection results could not be merged";break;case ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,ft.assertNever(e)}return{message:n}};let S3=Oy;function A3(){return S3}const w3=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,o=[...n,...a.path||[]],l={...a,path:o};if(a.message!==void 0)return{...a,path:o,message:a.message};let u="";const d=r.filter(f=>!!f).slice().reverse();for(const f of d)u=f(l,{data:t,defaultError:u}).message;return{...a,path:o,message:u}};function Te(e,t){const n=A3(),r=w3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Oy?void 0:Oy].filter(a=>!!a)});e.common.issues.push(r)}class qn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return We;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const o=await a.key,l=await a.value;r.push({key:o,value:l})}return qn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:o,value:l}=a;if(o.status==="aborted"||l.status==="aborted")return We;o.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(r[o.value]=l.value)}return{status:t.value,value:r}}}const We=Object.freeze({status:"aborted"}),dc=e=>({status:"dirty",value:e}),mr=e=>({status:"valid",value:e}),SA=e=>e.status==="aborted",AA=e=>e.status==="dirty",ko=e=>e.status==="valid",Lf=e=>typeof Promise<"u"&&e instanceof Promise;var Le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Le||(Le={}));var Mf=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},vN=function(e,t,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(e,n):a?a.value=n:t.set(e,n),n},fc,hc;class pa{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const wA=(e,t)=>{if(ko(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ri(e.common.issues);return this._error=n,this._error}}};function rt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(l,u)=>{const{message:d}=e;return l.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class lt{get description(){return this._def.description}_getType(t){return oa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:oa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qn,ctx:{common:t.parent.common,data:t.data,parsedType:oa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Lf(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oa(t)},a=this._parseSync({data:t,path:r.path,parent:r});return wA(r,a)}"~validate"(t){var r,a;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oa(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:n});return ko(o)?{value:o.value}:{issues:n.common.issues}}catch(o){(a=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(o=>ko(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oa(t)},a=this._parse({data:t,path:r.path,parent:r}),o=await(Lf(a)?a:Promise.resolve(a));return wA(r,o)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,o)=>{const l=t(a),u=()=>o.addIssue({code:ve.custom,...r(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new Do({schema:this,typeName:qe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ua.create(this,this._def)}nullable(){return Io.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Gr.create(this)}promise(){return Bf.create(this,this._def)}or(t){return Pf.create([this,t],this._def)}and(t){return Vf.create(this,t,this._def)}transform(t){return new Do({...rt(this._def),schema:this,typeName:qe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Iy({...rt(this._def),innerType:this,defaultValue:n,typeName:qe.ZodDefault})}brand(){return new W3({typeName:qe.ZodBranded,type:this,...rt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ly({...rt(this._def),innerType:this,catchValue:n,typeName:qe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return hb.create(this,t)}readonly(){return My.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const T3=/^c[^\s-]{8,}$/i,C3=/^[0-9a-z]+$/,R3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,N3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,k3=/^[a-z0-9_-]{21}$/i,O3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,D3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,I3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,L3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let kg;const M3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,j3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,P3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,V3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,B3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,z3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bN="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",U3=new RegExp(`^${bN}$`);function _N(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function H3(e){return new RegExp(`^${_N(e)}$`)}function F3(e){let t=`${bN}T${_N(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function G3(e,t){return!!((t==="v4"||!t)&&M3.test(e)||(t==="v6"||!t)&&P3.test(e))}function $3(e,t){if(!O3.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function q3(e,t){return!!((t==="v4"||!t)&&j3.test(e)||(t==="v6"||!t)&&V3.test(e))}class ca extends lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ie.string){const o=this._getOrReturnCtx(t);return Te(o,{code:ve.invalid_type,expected:Ie.string,received:o.parsedType}),We}const r=new qn;let a;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const l=t.data.length>o.value,u=t.data.length<o.value;(l||u)&&(a=this._getOrReturnCtx(t,a),l?Te(a,{code:ve.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&Te(a,{code:ve.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")I3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"email",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")kg||(kg=new RegExp(L3,"u")),kg.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"emoji",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")N3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"uuid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")k3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"nanoid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")T3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"cuid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")C3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"cuid2",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")R3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"ulid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Te(a,{validation:"url",code:ve.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"regex",code:ve.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?F3(o).test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?U3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?H3(o).test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?D3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"duration",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?G3(t.data,o.version)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"ip",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?$3(t.data,o.alg)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"jwt",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?q3(t.data,o.version)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"cidr",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?B3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"base64",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?z3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"base64url",code:ve.invalid_string,message:o.message}),r.dirty()):ft.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:ve.invalid_string,...Le.errToObj(r)})}_addCheck(t){return new ca({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Le.errToObj(n)})}nonempty(t){return this.min(1,Le.errToObj(t))}trim(){return new ca({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ca({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ca({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ca.create=e=>new ca({checks:[],typeName:qe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...rt(e)});function K3(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,o=Number.parseInt(e.toFixed(a).replace(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return o%l/10**a}class Dc extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ie.number){const o=this._getOrReturnCtx(t);return Te(o,{code:ve.invalid_type,expected:Ie.number,received:o.parsedType}),We}let r;const a=new qn;for(const o of this._def.checks)o.kind==="int"?ft.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Te(r,{code:ve.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:ve.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:ve.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?K3(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Te(r,{code:ve.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Te(r,{code:ve.not_finite,message:o.message}),a.dirty()):ft.assertNever(o);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,r,a){return new Dc({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Le.toString(a)}]})}_addCheck(t){return new Dc({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ft.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Dc.create=e=>new Dc({checks:[],typeName:qe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...rt(e)});class Ic extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ie.bigint)return this._getInvalidInput(t);let r;const a=new qn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:ve.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:ve.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:ve.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):ft.assertNever(o);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Te(n,{code:ve.invalid_type,expected:Ie.bigint,received:n.parsedType}),We}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,r,a){return new Ic({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Le.toString(a)}]})}_addCheck(t){return new Ic({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ic.create=e=>new Ic({checks:[],typeName:qe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...rt(e)});class TA extends lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ie.boolean){const r=this._getOrReturnCtx(t);return Te(r,{code:ve.invalid_type,expected:Ie.boolean,received:r.parsedType}),We}return mr(t.data)}}TA.create=e=>new TA({typeName:qe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...rt(e)});class jf extends lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ie.date){const o=this._getOrReturnCtx(t);return Te(o,{code:ve.invalid_type,expected:Ie.date,received:o.parsedType}),We}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Te(o,{code:ve.invalid_date}),We}const r=new qn;let a;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:ve.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):ft.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new jf({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}jf.create=e=>new jf({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:qe.ZodDate,...rt(e)});class CA extends lt{_parse(t){if(this._getType(t)!==Ie.symbol){const r=this._getOrReturnCtx(t);return Te(r,{code:ve.invalid_type,expected:Ie.symbol,received:r.parsedType}),We}return mr(t.data)}}CA.create=e=>new CA({typeName:qe.ZodSymbol,...rt(e)});class RA extends lt{_parse(t){if(this._getType(t)!==Ie.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:ve.invalid_type,expected:Ie.undefined,received:r.parsedType}),We}return mr(t.data)}}RA.create=e=>new RA({typeName:qe.ZodUndefined,...rt(e)});class NA extends lt{_parse(t){if(this._getType(t)!==Ie.null){const r=this._getOrReturnCtx(t);return Te(r,{code:ve.invalid_type,expected:Ie.null,received:r.parsedType}),We}return mr(t.data)}}NA.create=e=>new NA({typeName:qe.ZodNull,...rt(e)});class kA extends lt{constructor(){super(...arguments),this._any=!0}_parse(t){return mr(t.data)}}kA.create=e=>new kA({typeName:qe.ZodAny,...rt(e)});class OA extends lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mr(t.data)}}OA.create=e=>new OA({typeName:qe.ZodUnknown,...rt(e)});class ga extends lt{_parse(t){const n=this._getOrReturnCtx(t);return Te(n,{code:ve.invalid_type,expected:Ie.never,received:n.parsedType}),We}}ga.create=e=>new ga({typeName:qe.ZodNever,...rt(e)});class DA extends lt{_parse(t){if(this._getType(t)!==Ie.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:ve.invalid_type,expected:Ie.void,received:r.parsedType}),We}return mr(t.data)}}DA.create=e=>new DA({typeName:qe.ZodVoid,...rt(e)});class Gr extends lt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Ie.array)return Te(n,{code:ve.invalid_type,expected:Ie.array,received:n.parsedType}),We;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(l||u)&&(Te(n,{code:l?ve.too_big:ve.too_small,minimum:u?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(Te(n,{code:ve.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(Te(n,{code:ve.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,u)=>a.type._parseAsync(new pa(n,l,n.path,u)))).then(l=>qn.mergeArray(r,l));const o=[...n.data].map((l,u)=>a.type._parseSync(new pa(n,l,n.path,u)));return qn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Gr({...this._def,minLength:{value:t,message:Le.toString(n)}})}max(t,n){return new Gr({...this._def,maxLength:{value:t,message:Le.toString(n)}})}length(t,n){return new Gr({...this._def,exactLength:{value:t,message:Le.toString(n)}})}nonempty(t){return this.min(1,t)}}Gr.create=(e,t)=>new Gr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qe.ZodArray,...rt(t)});function ho(e){if(e instanceof Ht){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ua.create(ho(r))}return new Ht({...e._def,shape:()=>t})}else return e instanceof Gr?new Gr({...e._def,type:ho(e.element)}):e instanceof ua?ua.create(ho(e.unwrap())):e instanceof Io?Io.create(ho(e.unwrap())):e instanceof ys?ys.create(e.items.map(t=>ho(t))):e}class Ht extends lt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ft.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ie.object){const f=this._getOrReturnCtx(t);return Te(f,{code:ve.invalid_type,expected:Ie.object,received:f.parsedType}),We}const{status:r,ctx:a}=this._processInputParams(t),{shape:o,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof ga&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||u.push(f);const d=[];for(const f of l){const m=o[f],y=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new pa(a,y,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof ga){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")u.length>0&&(Te(a,{code:ve.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const y=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new pa(a,y,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const y=await m.key,g=await m.value;f.push({key:y,value:g,alwaysSet:m.alwaysSet})}return f}).then(f=>qn.mergeObjectSync(r,f)):qn.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Le.errToObj,new Ht({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,l;const a=((l=(o=this._def).errorMap)==null?void 0:l.call(o,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Le.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new Ht({...this._def,unknownKeys:"strip"})}passthrough(){return new Ht({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ht({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ht({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:qe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ht({...this._def,catchall:t})}pick(t){const n={};for(const r of ft.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Ht({...this._def,shape:()=>n})}omit(t){const n={};for(const r of ft.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Ht({...this._def,shape:()=>n})}deepPartial(){return ho(this)}partial(t){const n={};for(const r of ft.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new Ht({...this._def,shape:()=>n})}required(t){const n={};for(const r of ft.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ua;)o=o._def.innerType;n[r]=o}return new Ht({...this._def,shape:()=>n})}keyof(){return xN(ft.objectKeys(this.shape))}}Ht.create=(e,t)=>new Ht({shape:()=>e,unknownKeys:"strip",catchall:ga.create(),typeName:qe.ZodObject,...rt(t)});Ht.strictCreate=(e,t)=>new Ht({shape:()=>e,unknownKeys:"strict",catchall:ga.create(),typeName:qe.ZodObject,...rt(t)});Ht.lazycreate=(e,t)=>new Ht({shape:e,unknownKeys:"strip",catchall:ga.create(),typeName:qe.ZodObject,...rt(t)});class Pf extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const l=o.map(u=>new Ri(u.ctx.common.issues));return Te(n,{code:ve.invalid_union,unionErrors:l}),We}if(n.common.async)return Promise.all(r.map(async o=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(a);{let o;const l=[];for(const d of r){const f={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!o&&(o={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=l.map(d=>new Ri(d));return Te(n,{code:ve.invalid_union,unionErrors:u}),We}}get options(){return this._def.options}}Pf.create=(e,t)=>new Pf({options:e,typeName:qe.ZodUnion,...rt(t)});function Dy(e,t){const n=oa(e),r=oa(t);if(e===t)return{valid:!0,data:e};if(n===Ie.object&&r===Ie.object){const a=ft.objectKeys(t),o=ft.objectKeys(e).filter(u=>a.indexOf(u)!==-1),l={...e,...t};for(const u of o){const d=Dy(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===Ie.array&&r===Ie.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let o=0;o<e.length;o++){const l=e[o],u=t[o],d=Dy(l,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Ie.date&&r===Ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Vf extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(o,l)=>{if(SA(o)||SA(l))return We;const u=Dy(o.value,l.value);return u.valid?((AA(o)||AA(l))&&n.dirty(),{status:n.value,value:u.data}):(Te(r,{code:ve.invalid_intersection_types}),We)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,l])=>a(o,l)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Vf.create=(e,t,n)=>new Vf({left:e,right:t,typeName:qe.ZodIntersection,...rt(n)});class ys extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ie.array)return Te(r,{code:ve.invalid_type,expected:Ie.array,received:r.parsedType}),We;if(r.data.length<this._def.items.length)return Te(r,{code:ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),We;!this._def.rest&&r.data.length>this._def.items.length&&(Te(r,{code:ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new pa(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(o).then(l=>qn.mergeArray(n,l)):qn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new ys({...this._def,rest:t})}}ys.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ys({items:e,typeName:qe.ZodTuple,rest:null,...rt(t)})};class IA extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ie.map)return Te(r,{code:ve.invalid_type,expected:Ie.map,received:r.parsedType}),We;const a=this._def.keyType,o=this._def.valueType,l=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new pa(r,u,r.path,[f,"key"])),value:o._parse(new pa(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return We;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return We;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}IA.create=(e,t,n)=>new IA({valueType:t,keyType:e,typeName:qe.ZodMap,...rt(n)});class Lc extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ie.set)return Te(r,{code:ve.invalid_type,expected:Ie.set,received:r.parsedType}),We;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Te(r,{code:ve.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(Te(r,{code:ve.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const o=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return We;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((d,f)=>o._parse(new pa(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new Lc({...this._def,minSize:{value:t,message:Le.toString(n)}})}max(t,n){return new Lc({...this._def,maxSize:{value:t,message:Le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Lc.create=(e,t)=>new Lc({valueType:e,minSize:null,maxSize:null,typeName:qe.ZodSet,...rt(t)});class LA extends lt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}LA.create=(e,t)=>new LA({getter:e,typeName:qe.ZodLazy,...rt(t)});class MA extends lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Te(n,{received:n.data,code:ve.invalid_literal,expected:this._def.value}),We}return{status:"valid",value:t.data}}get value(){return this._def.value}}MA.create=(e,t)=>new MA({value:e,typeName:qe.ZodLiteral,...rt(t)});function xN(e,t){return new Oo({values:e,typeName:qe.ZodEnum,...rt(t)})}class Oo extends lt{constructor(){super(...arguments),fc.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Te(n,{expected:ft.joinValues(r),received:n.parsedType,code:ve.invalid_type}),We}if(Mf(this,fc,"f")||vN(this,fc,new Set(this._def.values),"f"),!Mf(this,fc,"f").has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Te(n,{received:n.data,code:ve.invalid_enum_value,options:r}),We}return mr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Oo.create(t,{...this._def,...n})}exclude(t,n=this._def){return Oo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}fc=new WeakMap;Oo.create=xN;class jA extends lt{constructor(){super(...arguments),hc.set(this,void 0)}_parse(t){const n=ft.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ie.string&&r.parsedType!==Ie.number){const a=ft.objectValues(n);return Te(r,{expected:ft.joinValues(a),received:r.parsedType,code:ve.invalid_type}),We}if(Mf(this,hc,"f")||vN(this,hc,new Set(ft.getValidEnumValues(this._def.values)),"f"),!Mf(this,hc,"f").has(t.data)){const a=ft.objectValues(n);return Te(r,{received:r.data,code:ve.invalid_enum_value,options:a}),We}return mr(t.data)}get enum(){return this._def.values}}hc=new WeakMap;jA.create=(e,t)=>new jA({values:e,typeName:qe.ZodNativeEnum,...rt(t)});class Bf extends lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ie.promise&&n.common.async===!1)return Te(n,{code:ve.invalid_type,expected:Ie.promise,received:n.parsedType}),We;const r=n.parsedType===Ie.promise?n.data:Promise.resolve(n.data);return mr(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Bf.create=(e,t)=>new Bf({type:e,typeName:qe.ZodPromise,...rt(t)});class Do extends lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,o={addIssue:l=>{Te(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),a.type==="preprocess"){const l=a.transform(r.data,o);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return We;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?We:d.status==="dirty"||n.value==="dirty"?dc(d.value):d});{if(n.value==="aborted")return We;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?We:u.status==="dirty"||n.value==="dirty"?dc(u.value):u}}if(a.type==="refinement"){const l=u=>{const d=a.refinement(u,o);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?We:(u.status==="dirty"&&n.dirty(),l(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?We:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ko(l))return l;const u=a.transform(l.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>ko(l)?Promise.resolve(a.transform(l.value,o)).then(u=>({status:n.value,value:u})):l);ft.assertNever(a)}}Do.create=(e,t,n)=>new Do({schema:e,typeName:qe.ZodEffects,effect:t,...rt(n)});Do.createWithPreprocess=(e,t,n)=>new Do({schema:t,effect:{type:"preprocess",transform:e},typeName:qe.ZodEffects,...rt(n)});class ua extends lt{_parse(t){return this._getType(t)===Ie.undefined?mr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ua.create=(e,t)=>new ua({innerType:e,typeName:qe.ZodOptional,...rt(t)});class Io extends lt{_parse(t){return this._getType(t)===Ie.null?mr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Io.create=(e,t)=>new Io({innerType:e,typeName:qe.ZodNullable,...rt(t)});class Iy extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ie.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Iy.create=(e,t)=>new Iy({innerType:e,typeName:qe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...rt(t)});class Ly extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Lf(a)?a.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ri(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ri(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ly.create=(e,t)=>new Ly({innerType:e,typeName:qe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...rt(t)});class PA extends lt{_parse(t){if(this._getType(t)!==Ie.nan){const r=this._getOrReturnCtx(t);return Te(r,{code:ve.invalid_type,expected:Ie.nan,received:r.parsedType}),We}return{status:"valid",value:t.data}}}PA.create=e=>new PA({typeName:qe.ZodNaN,...rt(e)});class W3 extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class hb extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?We:o.status==="dirty"?(n.dirty(),dc(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?We:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new hb({in:t,out:n,typeName:qe.ZodPipeline})}}class My extends lt{_parse(t){const n=this._def.innerType._parse(t),r=a=>(ko(a)&&(a.value=Object.freeze(a.value)),a);return Lf(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}My.create=(e,t)=>new My({innerType:e,typeName:qe.ZodReadonly,...rt(t)});var qe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(qe||(qe={}));const ac=ca.create;ga.create;const VA=Gr.create,Y3=Ht.create;Pf.create;Vf.create;ys.create;Oo.create;Bf.create;ua.create;Io.create;const EN=E.createContext({});function Z3(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const mb=typeof window<"u",X3=mb?E.useLayoutEffect:E.useEffect,pb=E.createContext(null);function gb(e,t){e.indexOf(t)===-1&&e.push(t)}function yb(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ni=(e,t,n)=>n>t?t:n<e?e:n;let vb=()=>{};const ki={},SN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function AN(e){return typeof e=="object"&&e!==null}const wN=e=>/^0[^.\s]+$/u.test(e);function bb(e){let t;return()=>(t===void 0&&(t=e()),t)}const dr=e=>e,Q3=(e,t)=>n=>t(e(n)),uu=(...e)=>e.reduce(Q3),Mc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class _b{constructor(){this.subscriptions=[]}add(t){return gb(this.subscriptions,t),()=>yb(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let o=0;o<a;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $r=e=>e*1e3,qr=e=>e/1e3;function TN(e,t){return t?e*(1e3/t):0}const CN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,J3=1e-7,e5=12;function t5(e,t,n,r,a){let o,l,u=0;do l=t+(n-t)/2,o=CN(l,r,a)-e,o>0?n=l:t=l;while(Math.abs(o)>J3&&++u<e5);return l}function du(e,t,n,r){if(e===t&&n===r)return dr;const a=o=>t5(o,0,1,e,n);return o=>o===0||o===1?o:CN(a(o),t,r)}const RN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,NN=e=>t=>1-e(1-t),kN=du(.33,1.53,.69,.99),xb=NN(kN),ON=RN(xb),DN=e=>(e*=2)<1?.5*xb(e):.5*(2-Math.pow(2,-10*(e-1))),Eb=e=>1-Math.sin(Math.acos(e)),IN=NN(Eb),LN=RN(Eb),n5=du(.42,0,1,1),r5=du(0,0,.58,1),MN=du(.42,0,.58,1),i5=e=>Array.isArray(e)&&typeof e[0]!="number",jN=e=>Array.isArray(e)&&typeof e[0]=="number",a5={linear:dr,easeIn:n5,easeInOut:MN,easeOut:r5,circIn:Eb,circInOut:LN,circOut:IN,backIn:xb,backInOut:ON,backOut:kN,anticipate:DN},s5=e=>typeof e=="string",BA=e=>{if(jN(e)){vb(e.length===4);const[t,n,r,a]=e;return du(t,n,r,a)}else if(s5(e))return a5[e];return e},Ud=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function o5(e,t){let n=new Set,r=new Set,a=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(f.schedule(m),e()),m(u)}const f={schedule:(m,y=!1,g=!1)=>{const x=g&&a?n:r;return y&&l.add(m),x.has(m)||x.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(u=m,a){o=!0;return}a=!0,[n,r]=[r,n],n.forEach(d),n.clear(),a=!1,o&&(o=!1,f.process(m))}};return f}const l5=40;function PN(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=Ud.reduce((R,D)=>(R[D]=o5(o),R),{}),{setup:u,read:d,resolveKeyframes:f,preUpdate:m,update:y,preRender:g,render:v,postRender:x}=l,S=()=>{const R=ki.useManualTiming?a.timestamp:performance.now();n=!1,ki.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(R-a.timestamp,l5),1)),a.timestamp=R,a.isProcessing=!0,u.process(a),d.process(a),f.process(a),m.process(a),y.process(a),g.process(a),v.process(a),x.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(S))},A=()=>{n=!0,r=!0,a.isProcessing||e(S)};return{schedule:Ud.reduce((R,D)=>{const N=l[D];return R[D]=(L,O=!1,M=!1)=>(n||A(),N.schedule(L,O,M)),R},{}),cancel:R=>{for(let D=0;D<Ud.length;D++)l[Ud[D]].cancel(R)},state:a,steps:l}}const{schedule:Rt,cancel:ya,state:un,steps:Og}=PN(typeof requestAnimationFrame<"u"?requestAnimationFrame:dr,!0);let uf;function c5(){uf=void 0}const Dn={now:()=>(uf===void 0&&Dn.set(un.isProcessing||ki.useManualTiming?un.timestamp:performance.now()),uf),set:e=>{uf=e,queueMicrotask(c5)}},VN=e=>t=>typeof t=="string"&&t.startsWith(e),Sb=VN("--"),u5=VN("var(--"),Ab=e=>u5(e)?d5.test(e.split("/*")[0].trim()):!1,d5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jc={...Yo,transform:e=>Ni(0,1,e)},Hd={...Yo,default:1},_c=e=>Math.round(e*1e5)/1e5,wb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function f5(e){return e==null}const h5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Tb=(e,t)=>n=>!!(typeof n=="string"&&h5.test(n)&&n.startsWith(e)||t&&!f5(n)&&Object.prototype.hasOwnProperty.call(n,t)),BN=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,o,l,u]=r.match(wb);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},m5=e=>Ni(0,255,e),Dg={...Yo,transform:e=>Math.round(m5(e))},as={test:Tb("rgb","red"),parse:BN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Dg.transform(e)+", "+Dg.transform(t)+", "+Dg.transform(n)+", "+_c(jc.transform(r))+")"};function p5(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const jy={test:Tb("#"),parse:p5,transform:as.transform},fu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),sa=fu("deg"),Kr=fu("%"),Ue=fu("px"),g5=fu("vh"),y5=fu("vw"),zA={...Kr,parse:e=>Kr.parse(e)/100,transform:e=>Kr.transform(e*100)},po={test:Tb("hsl","hue"),parse:BN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kr.transform(_c(t))+", "+Kr.transform(_c(n))+", "+_c(jc.transform(r))+")"},yn={test:e=>as.test(e)||jy.test(e)||po.test(e),parse:e=>as.test(e)?as.parse(e):po.test(e)?po.parse(e):jy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?as.transform(e):po.transform(e)},v5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function b5(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(wb))==null?void 0:t.length)||0)+(((n=e.match(v5))==null?void 0:n.length)||0)>0}const zN="number",UN="color",_5="var",x5="var(",UA="${}",E5=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Pc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;const u=t.replace(E5,d=>(yn.test(d)?(r.color.push(o),a.push(UN),n.push(yn.parse(d))):d.startsWith(x5)?(r.var.push(o),a.push(_5),n.push(d)):(r.number.push(o),a.push(zN),n.push(parseFloat(d))),++o,UA)).split(UA);return{values:n,split:u,indexes:r,types:a}}function HN(e){return Pc(e).values}function FN(e){const{split:t,types:n}=Pc(e),r=t.length;return a=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],a[l]!==void 0){const u=n[l];u===zN?o+=_c(a[l]):u===UN?o+=yn.transform(a[l]):o+=a[l]}return o}}const S5=e=>typeof e=="number"?0:e;function A5(e){const t=HN(e);return FN(e)(t.map(S5))}const va={test:b5,parse:HN,createTransformer:FN,getAnimatableNone:A5};function Ig(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function w5({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,o=0,l=0;if(!t)a=o=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;a=Ig(d,u,e+1/3),o=Ig(d,u,e),l=Ig(d,u,e-1/3)}return{red:Math.round(a*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function zf(e,t){return n=>n>0?t:e}const Tt=(e,t,n)=>e+(t-e)*n,Lg=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},T5=[jy,as,po],C5=e=>T5.find(t=>t.test(e));function HA(e){const t=C5(e);if(!t)return!1;let n=t.parse(e);return t===po&&(n=w5(n)),n}const FA=(e,t)=>{const n=HA(e),r=HA(t);if(!n||!r)return zf(e,t);const a={...n};return o=>(a.red=Lg(n.red,r.red,o),a.green=Lg(n.green,r.green,o),a.blue=Lg(n.blue,r.blue,o),a.alpha=Tt(n.alpha,r.alpha,o),as.transform(a))},Py=new Set(["none","hidden"]);function R5(e,t){return Py.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function N5(e,t){return n=>Tt(e,t,n)}function Cb(e){return typeof e=="number"?N5:typeof e=="string"?Ab(e)?zf:yn.test(e)?FA:D5:Array.isArray(e)?GN:typeof e=="object"?yn.test(e)?FA:k5:zf}function GN(e,t){const n=[...e],r=n.length,a=e.map((o,l)=>Cb(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=a[l](o);return n}}function k5(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=Cb(e[a])(e[a],t[a]));return a=>{for(const o in r)n[o]=r[o](a);return n}}function O5(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],l=e.indexes[o][r[o]],u=e.values[l]??0;n[a]=u,r[o]++}return n}const D5=(e,t)=>{const n=va.createTransformer(t),r=Pc(e),a=Pc(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?Py.has(e)&&!a.values.length||Py.has(t)&&!r.values.length?R5(e,t):uu(GN(O5(r,a),a.values),n):zf(e,t)};function $N(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Tt(e,t,n):Cb(e)(e,t)}const I5=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Rt.update(t,n),stop:()=>ya(t),now:()=>un.isProcessing?un.timestamp:Dn.now()}},qN=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let o=0;o<a;o++)r+=e(o/(a-1))+", ";return`linear(${r.substring(0,r.length-2)})`},Uf=2e4;function Rb(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Uf;)t+=n,r=e.next(t);return t>=Uf?1/0:t}function L5(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(Rb(r),Uf);return{type:"keyframes",ease:o=>r.next(a*o).value/t,duration:qr(a)}}const M5=5;function KN(e,t,n){const r=Math.max(t-M5,0);return TN(n-e(r),t-r)}const It={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},GA=.001;function j5({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:r=It.mass}){let a,o,l=1-t;l=Ni(It.minDamping,It.maxDamping,l),e=Ni(It.minDuration,It.maxDuration,qr(e)),l<1?(a=f=>{const m=f*l,y=m*e,g=m-n,v=Vy(f,l),x=Math.exp(-y);return GA-g/v*x},o=f=>{const y=f*l*e,g=y*n+n,v=Math.pow(l,2)*Math.pow(f,2)*e,x=Math.exp(-y),S=Vy(Math.pow(f,2),l);return(-a(f)+GA>0?-1:1)*((g-v)*x)/S}):(a=f=>{const m=Math.exp(-f*e),y=(f-n)*e+1;return-.001+m*y},o=f=>{const m=Math.exp(-f*e),y=(n-f)*(e*e);return m*y});const u=5/e,d=V5(a,o,u);if(e=$r(e),isNaN(d))return{stiffness:It.stiffness,damping:It.damping,duration:e};{const f=Math.pow(d,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const P5=12;function V5(e,t,n){let r=n;for(let a=1;a<P5;a++)r=r-e(r)/t(r);return r}function Vy(e,t){return e*Math.sqrt(1-t*t)}const B5=["duration","bounce"],z5=["stiffness","damping","mass"];function $A(e,t){return t.some(n=>e[n]!==void 0)}function U5(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!$A(e,z5)&&$A(e,B5))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,o=2*Ni(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:It.mass,stiffness:a,damping:o}}else{const n=j5(e);t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function Hf(e=It.visualDuration,t=It.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:d,damping:f,mass:m,duration:y,velocity:g,isResolvedFromDuration:v}=U5({...n,velocity:-qr(n.velocity||0)}),x=g||0,S=f/(2*Math.sqrt(d*m)),A=l-o,w=qr(Math.sqrt(d/m)),T=Math.abs(A)<5;r||(r=T?It.restSpeed.granular:It.restSpeed.default),a||(a=T?It.restDelta.granular:It.restDelta.default);let R;if(S<1){const N=Vy(w,S);R=L=>{const O=Math.exp(-S*w*L);return l-O*((x+S*w*A)/N*Math.sin(N*L)+A*Math.cos(N*L))}}else if(S===1)R=N=>l-Math.exp(-w*N)*(A+(x+w*A)*N);else{const N=w*Math.sqrt(S*S-1);R=L=>{const O=Math.exp(-S*w*L),M=Math.min(N*L,300);return l-O*((x+S*w*A)*Math.sinh(M)+N*A*Math.cosh(M))/N}}const D={calculatedDuration:v&&y||null,next:N=>{const L=R(N);if(v)u.done=N>=y;else{let O=N===0?x:0;S<1&&(O=N===0?$r(x):KN(R,N,L));const M=Math.abs(O)<=r,B=Math.abs(l-L)<=a;u.done=M&&B}return u.value=u.done?l:L,u},toString:()=>{const N=Math.min(Rb(D),Uf),L=qN(O=>D.next(N*O).value,N,30);return N+"ms "+L},toTransition:()=>{}};return D}Hf.applyToOptions=e=>{const t=L5(e,100,Hf);return e.ease=t.ease,e.duration=$r(t.duration),e.type="keyframes",e};function By({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:d,restDelta:f=.5,restSpeed:m}){const y=e[0],g={done:!1,value:y},v=M=>u!==void 0&&M<u||d!==void 0&&M>d,x=M=>u===void 0?d:d===void 0||Math.abs(u-M)<Math.abs(d-M)?u:d;let S=n*t;const A=y+S,w=l===void 0?A:l(A);w!==A&&(S=w-y);const T=M=>-S*Math.exp(-M/r),R=M=>w+T(M),D=M=>{const B=T(M),U=R(M);g.done=Math.abs(B)<=f,g.value=g.done?w:U};let N,L;const O=M=>{v(g.value)&&(N=M,L=Hf({keyframes:[g.value,x(g.value)],velocity:KN(R,M,g.value),damping:a,stiffness:o,restDelta:f,restSpeed:m}))};return O(0),{calculatedDuration:null,next:M=>{let B=!1;return!L&&N===void 0&&(B=!0,D(M),O(M)),N!==void 0&&M>=N?L.next(M-N):(!B&&D(M),g)}}}function H5(e,t,n){const r=[],a=n||ki.mix||$N,o=e.length-1;for(let l=0;l<o;l++){let u=a(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||dr:t;u=uu(d,u)}r.push(u)}return r}function F5(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(vb(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=H5(t,r,a),d=u.length,f=m=>{if(l&&m<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const g=Mc(e[y],e[y+1],m);return u[y](g)};return n?m=>f(Ni(e[0],e[o-1],m)):f}function G5(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Mc(0,t,r);e.push(Tt(n,1,a))}}function $5(e){const t=[0];return G5(t,e.length-1),t}function q5(e,t){return e.map(n=>n*t)}function K5(e,t){return e.map(()=>t||MN).splice(0,e.length-1)}function xc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=i5(r)?r.map(BA):BA(r),o={done:!1,value:t[0]},l=q5(n&&n.length===t.length?n:$5(t),e),u=F5(l,t,{ease:Array.isArray(a)?a:K5(t,a)});return{calculatedDuration:e,next:d=>(o.value=u(d),o.done=d>=e,o)}}const W5=e=>e!==null;function Nb(e,{repeat:t,repeatType:n="loop"},r,a=1){const o=e.filter(W5),u=a<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const Y5={decay:By,inertia:By,tween:xc,keyframes:xc,spring:Hf};function WN(e){typeof e.type=="string"&&(e.type=Y5[e.type])}class kb{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Z5=e=>e/100;class Ob extends kb{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(n=!0)=>{var r,a;if(n){const{motionValue:o}=this.options;o&&o.updatedAt!==Dn.now()&&this.tick(Dn.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(r=this.options).onStop)==null||a.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;WN(t);const{type:n=xc,repeat:r=0,repeatDelay:a=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const d=n||xc;d!==xc&&typeof u[0]!="number"&&(this.mixKeyframes=uu(Z5,$N(u[0],u[1])),u=[0,100]);const f=d({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...u].reverse(),velocity:-l})),f.calculatedDuration===null&&(f.calculatedDuration=Rb(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:a,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:m,repeat:y,repeatType:g,repeatDelay:v,type:x,onUpdate:S,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-f*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?w<0:w>a;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let R=this.currentTime,D=r;if(y){const M=Math.min(this.currentTime,a)/u;let B=Math.floor(M),U=M%1;!U&&M>=1&&(U=1),U===1&&B--,B=Math.min(B,y+1),!!(B%2)&&(g==="reverse"?(U=1-U,v&&(U-=v/u)):g==="mirror"&&(D=l)),R=Ni(0,1,U)*u}const N=T?{done:!1,value:m[0]}:D.next(R);o&&(N.value=o(N.value));let{done:L}=N;!T&&d!==null&&(L=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return O&&x!==By&&(N.value=Nb(m,this.options,A,this.speed)),S&&S(N.value),O&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return qr(this.calculatedDuration)}get time(){return qr(this.currentTime)}set time(t){var n;t=$r(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Dn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=qr(this.currentTime))}play(){var a,o;if(this.isStopped)return;const{driver:t=I5,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(o=(a=this.options).onPlay)==null||o.call(a);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Dn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function X5(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ss=e=>e*180/Math.PI,zy=e=>{const t=ss(Math.atan2(e[1],e[0]));return Uy(t)},Q5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zy,rotateZ:zy,skewX:e=>ss(Math.atan(e[1])),skewY:e=>ss(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Uy=e=>(e=e%360,e<0&&(e+=360),e),qA=zy,KA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),WA=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),J5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:KA,scaleY:WA,scale:e=>(KA(e)+WA(e))/2,rotateX:e=>Uy(ss(Math.atan2(e[6],e[5]))),rotateY:e=>Uy(ss(Math.atan2(-e[2],e[0]))),rotateZ:qA,rotate:qA,skewX:e=>ss(Math.atan(e[4])),skewY:e=>ss(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Hy(e){return e.includes("scale")?1:0}function Fy(e,t){if(!e||e==="none")return Hy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=J5,a=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Q5,a=u}if(!a)return Hy(t);const o=r[t],l=a[1].split(",").map(tG);return typeof o=="function"?o(l):l[o]}const eG=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Fy(n,t)};function tG(e){return parseFloat(e.trim())}const Zo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xo=new Set(Zo),YA=e=>e===Yo||e===Ue,nG=new Set(["x","y","z"]),rG=Zo.filter(e=>!nG.has(e));function iG(e){const t=[];return rG.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const cs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Fy(t,"x"),y:(e,{transform:t})=>Fy(t,"y")};cs.translateX=cs.x;cs.translateY=cs.y;const us=new Set;let Gy=!1,$y=!1,qy=!1;function YN(){if($y){const e=Array.from(us).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=iG(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([o,l])=>{var u;(u=r.getValue(o))==null||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}$y=!1,Gy=!1,us.forEach(e=>e.complete(qy)),us.clear()}function ZN(){us.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($y=!0)})}function aG(){qy=!0,ZN(),YN(),qy=!1}class Db{constructor(t,n,r,a,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(us.add(this),Gy||(Gy=!0,Rt.read(ZN),Rt.resolveKeyframes(YN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;if(t[0]===null){const o=a==null?void 0:a.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),a&&o===void 0&&a.set(t[0])}X5(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),us.delete(this)}cancel(){this.state==="scheduled"&&(us.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const sG=e=>e.startsWith("--");function oG(e,t,n){sG(t)?e.style.setProperty(t,n):e.style[t]=n}const lG=bb(()=>window.ScrollTimeline!==void 0),cG={};function uG(e,t){const n=bb(e);return()=>cG[t]??n()}const XN=uG(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),mc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ZA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mc([0,.65,.55,1]),circOut:mc([.55,0,1,.45]),backIn:mc([.31,.01,.66,-.59]),backOut:mc([.33,1.53,.69,.99])};function QN(e,t){if(e)return typeof e=="function"?XN()?qN(e,t):"ease-out":jN(e)?mc(e):Array.isArray(e)?e.map(n=>QN(n,t)||ZA.easeOut):ZA[e]}function dG(e,t,n,{delay:r=0,duration:a=300,repeat:o=0,repeatType:l="loop",ease:u="easeOut",times:d}={},f=void 0){const m={[t]:n};d&&(m.offset=d);const y=QN(u,a);Array.isArray(y)&&(m.easing=y);const g={delay:r,duration:a,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return f&&(g.pseudoElement=f),e.animate(m,g)}function JN(e){return typeof e=="function"&&"applyToOptions"in e}function fG({type:e,...t}){return JN(e)&&XN()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class hG extends kb{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:a,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:d}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,vb(typeof t.type!="string");const f=fG(t);this.animation=dG(n,r,a,f,o),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=Nb(a,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(m):oG(n,r,m),this.animation.cancel()}d==null||d(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return qr(Number(t))}get time(){return qr(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=$r(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&lG()?(this.animation.timeline=t,dr):n(this)}}const ek={anticipate:DN,backInOut:ON,circInOut:LN};function mG(e){return e in ek}function pG(e){typeof e.ease=="string"&&mG(e.ease)&&(e.ease=ek[e.ease])}const XA=10;class gG extends hG{constructor(t){pG(t),WN(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:a,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new Ob({...l,autoplay:!1}),d=$r(this.finishedTime??this.time);n.setWithVelocity(u.sample(d-XA).value,u.sample(d).value,XA),u.stop()}}const QA=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(va.test(e)||e==="0")&&!e.startsWith("url("));function yG(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function vG(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=QA(a,t),u=QA(o,t);return!l||!u?!1:yG(e)||(n==="spring"||JN(n))&&r}function tk(e){return AN(e)&&"offsetHeight"in e}const bG=new Set(["opacity","clipPath","filter","transform"]),_G=bb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function xG(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:o,type:l}=e;if(!tk((f=t==null?void 0:t.owner)==null?void 0:f.current))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return _G()&&n&&bG.has(n)&&(n!=="transform"||!d)&&!u&&!r&&a!=="mirror"&&o!==0&&l!=="inertia"}const EG=40;class SG extends kb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:l="loop",keyframes:u,name:d,motionValue:f,element:m,...y}){var x;super(),this.stop=()=>{var S,A;this._animation&&(this._animation.stop(),(S=this.stopTimeline)==null||S.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=Dn.now();const g={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:o,repeatType:l,name:d,motionValue:f,element:m,...y},v=(m==null?void 0:m.KeyframeResolver)||Db;this.keyframeResolver=new v(u,(S,A,w)=>this.onKeyframesResolved(S,A,g,!w),d,f,m),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,r,a){this.keyframeResolver=void 0;const{name:o,type:l,velocity:u,delay:d,isHandoff:f,onUpdate:m}=r;this.resolvedAt=Dn.now(),vG(t,o,l,u)||((ki.instantAnimations||!d)&&(m==null||m(Nb(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const g={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>EG?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=!f&&xG(g)?new gG({...g,element:g.motionValue.owner.current}):new Ob(g);v.finished.then(()=>this.notifyFinished()).catch(dr),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),aG()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const AG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wG(e){const t=AG.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function nk(e,t,n=1){const[r,a]=wG(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return SN(l)?parseFloat(l):l}return Ab(a)?nk(a,t,n+1):a}function Ib(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const rk=new Set(["width","height","top","left","right","bottom",...Zo]),TG={test:e=>e==="auto",parse:e=>e},ik=e=>t=>t.test(e),ak=[Yo,Ue,Kr,sa,y5,g5,TG],JA=e=>ak.find(ik(e));function CG(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wN(e):!0}const RG=new Set(["brightness","contrast","saturate","opacity"]);function NG(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(wb)||[];if(!r)return e;const a=n.replace(r,"");let o=RG.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}const kG=/\b([a-z-]*)\(.*?\)/gu,Ky={...va,getAnimatableNone:e=>{const t=e.match(kG);return t?t.map(NG).join(" "):e}},ew={...Yo,transform:Math.round},OG={rotate:sa,rotateX:sa,rotateY:sa,rotateZ:sa,scale:Hd,scaleX:Hd,scaleY:Hd,scaleZ:Hd,skew:sa,skewX:sa,skewY:sa,distance:Ue,translateX:Ue,translateY:Ue,translateZ:Ue,x:Ue,y:Ue,z:Ue,perspective:Ue,transformPerspective:Ue,opacity:jc,originX:zA,originY:zA,originZ:Ue},Lb={borderWidth:Ue,borderTopWidth:Ue,borderRightWidth:Ue,borderBottomWidth:Ue,borderLeftWidth:Ue,borderRadius:Ue,radius:Ue,borderTopLeftRadius:Ue,borderTopRightRadius:Ue,borderBottomRightRadius:Ue,borderBottomLeftRadius:Ue,width:Ue,maxWidth:Ue,height:Ue,maxHeight:Ue,top:Ue,right:Ue,bottom:Ue,left:Ue,padding:Ue,paddingTop:Ue,paddingRight:Ue,paddingBottom:Ue,paddingLeft:Ue,margin:Ue,marginTop:Ue,marginRight:Ue,marginBottom:Ue,marginLeft:Ue,backgroundPositionX:Ue,backgroundPositionY:Ue,...OG,zIndex:ew,fillOpacity:jc,strokeOpacity:jc,numOctaves:ew},DG={...Lb,color:yn,backgroundColor:yn,outlineColor:yn,fill:yn,stroke:yn,borderColor:yn,borderTopColor:yn,borderRightColor:yn,borderBottomColor:yn,borderLeftColor:yn,filter:Ky,WebkitFilter:Ky},sk=e=>DG[e];function ok(e,t){let n=sk(e);return n!==Ky&&(n=va),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const IG=new Set(["auto","none","0"]);function LG(e,t,n){let r=0,a;for(;r<e.length&&!a;){const o=e[r];typeof o=="string"&&!IG.has(o)&&Pc(o).values.length&&(a=e[r]),r++}if(a&&n)for(const o of t)e[o]=ok(n,a)}class MG extends Db{constructor(t,n,r,a,o){super(t,n,r,a,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),Ab(f))){const m=nk(f,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!rk.has(r)||t.length!==2)return;const[a,o]=t,l=JA(a),u=JA(o);if(l!==u)if(YA(l)&&YA(u))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else cs[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||CG(t[a]))&&r.push(a);r.length&&LG(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=cs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=cs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([d,f])=>{t.getValue(d).set(f)}),this.resolveNoneKeyframes()}}function jG(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const a=(n==null?void 0:n[e])??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}const tw=30,PG=e=>!isNaN(parseFloat(e));class VG{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{var l,u;const o=Dn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty();a&&((u=this.events.renderRequest)==null||u.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Dn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=PG(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new _b);const r=this.events[t].add(n);return t==="change"?()=>{r(),Rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>tw)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,tw);return TN(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Lo(e,t){return new VG(e,t)}const lk=(e,t)=>t&&typeof e=="number"?t.transform(e):e,{schedule:Mb}=PN(queueMicrotask,!1),Sr={x:!1,y:!1};function ck(){return Sr.x||Sr.y}function BG(e){return e==="x"||e==="y"?Sr[e]?null:(Sr[e]=!0,()=>{Sr[e]=!1}):Sr.x||Sr.y?null:(Sr.x=Sr.y=!0,()=>{Sr.x=Sr.y=!1})}function uk(e,t){const n=jG(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function nw(e){return!(e.pointerType==="touch"||ck())}function zG(e,t,n={}){const[r,a,o]=uk(e,n),l=u=>{if(!nw(u))return;const{target:d}=u,f=t(d,u);if(typeof f!="function"||!d)return;const m=y=>{nw(y)&&(f(y),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,a)};return r.forEach(u=>{u.addEventListener("pointerenter",l,a)}),o}const dk=(e,t)=>t?e===t?!0:dk(e,t.parentElement):!1,jb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,UG=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function HG(e){return UG.has(e.tagName)||e.tabIndex!==-1}const df=new WeakSet;function rw(e){return t=>{t.key==="Enter"&&e(t)}}function Mg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const FG=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=rw(()=>{if(df.has(n))return;Mg(n,"down");const a=rw(()=>{Mg(n,"up")}),o=()=>Mg(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function iw(e){return jb(e)&&!ck()}function GG(e,t,n={}){const[r,a,o]=uk(e,n),l=u=>{const d=u.currentTarget;if(!iw(u))return;df.add(d);const f=t(d,u),m=(v,x)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",g),df.has(d)&&df.delete(d),iw(v)&&typeof f=="function"&&f(v,{success:x})},y=v=>{m(v,d===window||d===document||n.useGlobalTarget||dk(d,v.target))},g=v=>{m(v,!1)};window.addEventListener("pointerup",y,a),window.addEventListener("pointercancel",g,a)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,a),tk(u)&&(u.addEventListener("focus",f=>FG(f,a)),!HG(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function fk(e){return AN(e)&&"ownerSVGElement"in e}function $G(e){return fk(e)&&e.tagName==="svg"}const bn=e=>!!(e&&e.getVelocity),qG=[...ak,yn,va],KG=e=>qG.find(ik(e)),hk=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function WG(e=!0){const t=E.useContext(pb);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,o=E.useId();E.useEffect(()=>{if(e)return a(o)},[e]);const l=E.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const Pb=E.createContext({strict:!1}),aw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Mo={};for(const e in aw)Mo[e]={isEnabled:t=>aw[e].some(n=>!!t[n])};function Wy(e){for(const t in e)Mo[t]={...Mo[t],...e[t]}}function YG({children:e,features:t,strict:n=!1}){const[,r]=E.useState(!jg(t)),a=E.useRef(void 0);if(!jg(t)){const{renderer:o,...l}=t;a.current=o,Wy(l)}return E.useEffect(()=>{jg(t)&&t().then(({renderer:o,...l})=>{Wy(l),a.current=o,r(!0)})},[]),b.jsx(Pb.Provider,{value:{renderer:a.current,strict:n},children:e})}function jg(e){return typeof e=="function"}const ZG=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ff(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ZG.has(e)}let mk=e=>!Ff(e);function XG(e){e&&(mk=t=>t.startsWith("on")?!Ff(t):e(t))}try{XG(require("@emotion/is-prop-valid").default)}catch{}function QG(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(mk(a)||n===!0&&Ff(a)||!t&&!Ff(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function JG(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const kh=E.createContext({});function Oh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Vc(e){return typeof e=="string"||Array.isArray(e)}const Vb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bb=["initial",...Vb];function Dh(e){return Oh(e.animate)||Bb.some(t=>Vc(e[t]))}function pk(e){return!!(Dh(e)||e.variants)}function e$(e,t){if(Dh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vc(n)?n:void 0,animate:Vc(r)?r:void 0}}return e.inherit!==!1?t:{}}function t$(e){const{initial:t,animate:n}=e$(e,E.useContext(kh));return E.useMemo(()=>({initial:t,animate:n}),[sw(t),sw(n)])}function sw(e){return Array.isArray(e)?e.join(" "):e}const n$=Symbol.for("motionComponentSymbol");function go(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function r$(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):go(n)&&(n.current=r))},[t])}const zb=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),i$="framerAppearId",gk="data-"+zb(i$),yk=E.createContext({});function a$(e,t,n,r,a){var S,A;const{visualElement:o}=E.useContext(kh),l=E.useContext(Pb),u=E.useContext(pb),d=E.useContext(hk).reducedMotion,f=E.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const m=f.current,y=E.useContext(yk);m&&!m.projection&&a&&(m.type==="html"||m.type==="svg")&&s$(f.current,n,a,y);const g=E.useRef(!1);E.useInsertionEffect(()=>{m&&g.current&&m.update(n,u)});const v=n[gk],x=E.useRef(!!v&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,v))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,v)));return X3(()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),Mb.render(m.render),x.current&&m.animationState&&m.animationState.animateChanges())}),E.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,v)}),x.current=!1))}),m}function s$(e,t,n,r){const{layoutId:a,layout:o,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:f,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:vk(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:!!l||u&&go(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:f})}function vk(e){if(e)return e.options.allowProjection!==!1?e.projection:vk(e.parent)}function o$({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){e&&Wy(e);function o(u,d){let f;const m={...E.useContext(hk),...u,layoutId:l$(u)},{isStatic:y}=m,g=t$(u),v=r(u,y);if(!y&&mb){c$();const x=u$(m);f=x.MeasureLayout,g.visualElement=a$(a,v,m,t,x.ProjectionNode)}return b.jsxs(kh.Provider,{value:g,children:[f&&g.visualElement?b.jsx(f,{visualElement:g.visualElement,...m}):null,n(a,u,r$(v,g.visualElement,d),v,y,g.visualElement)]})}o.displayName=`motion.${typeof a=="string"?a:`create(${a.displayName??a.name??""})`}`;const l=E.forwardRef(o);return l[n$]=a,l}function l$({layoutId:e}){const t=E.useContext(EN).id;return t&&e!==void 0?t+"-"+e:e}function c$(e,t){E.useContext(Pb).strict}function u$(e){const{drag:t,layout:n}=Mo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Bc={};function d$(e){for(const t in e)Bc[t]=e[t],Sb(t)&&(Bc[t].isCSSVariable=!0)}function bk(e,{layout:t,layoutId:n}){return Xo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Bc[e]||e==="opacity")}const f$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},h$=Zo.length;function m$(e,t,n){let r="",a=!0;for(let o=0;o<h$;o++){const l=Zo[o],u=e[l];if(u===void 0)continue;let d=!0;if(typeof u=="number"?d=u===(l.startsWith("scale")?1:0):d=parseFloat(u)===0,!d||n){const f=lk(u,Lb[l]);if(!d){a=!1;const m=f$[l]||l;r+=`${m}(${f}) `}n&&(t[l]=f)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function Ub(e,t,n){const{style:r,vars:a,transformOrigin:o}=e;let l=!1,u=!1;for(const d in t){const f=t[d];if(Xo.has(d)){l=!0;continue}else if(Sb(d)){a[d]=f;continue}else{const m=lk(f,Lb[d]);d.startsWith("origin")?(u=!0,o[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=m$(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:m=0}=o;r.transformOrigin=`${d} ${f} ${m}`}}const Hb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _k(e,t,n){for(const r in t)!bn(t[r])&&!bk(r,n)&&(e[r]=t[r])}function p$({transformTemplate:e},t){return E.useMemo(()=>{const n=Hb();return Ub(n,t,e),Object.assign({},n.vars,n.style)},[t])}function g$(e,t){const n=e.style||{},r={};return _k(r,n,e),Object.assign(r,p$(e,t)),r}function y$(e,t){const n={},r=g$(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const v$={offset:"stroke-dashoffset",array:"stroke-dasharray"},b$={offset:"strokeDashoffset",array:"strokeDasharray"};function _$(e,t,n=1,r=0,a=!0){e.pathLength=1;const o=a?v$:b$;e[o.offset]=Ue.transform(-r);const l=Ue.transform(t),u=Ue.transform(n);e[o.array]=`${l} ${u}`}function xk(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:o=1,pathOffset:l=0,...u},d,f,m){if(Ub(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:g}=e;y.transform&&(g.transform=y.transform,delete y.transform),(g.transform||y.transformOrigin)&&(g.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),g.transform&&(g.transformBox=(m==null?void 0:m.transformBox)??"fill-box",delete y.transformBox),t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),r!==void 0&&(y.scale=r),a!==void 0&&_$(y,a,o,l,!1)}const Ek=()=>({...Hb(),attrs:{}}),Sk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function x$(e,t,n,r){const a=E.useMemo(()=>{const o=Ek();return xk(o,t,Sk(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};_k(o,e.style,e),a.style={...o,...a.style}}return a}const E$=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Fb(e){return typeof e!="string"||e.includes("-")?!1:!!(E$.indexOf(e)>-1||/[A-Z]/u.test(e))}function S$(e=!1){return(n,r,a,{latestValues:o},l)=>{const d=(Fb(n)?x$:y$)(r,o,l,n),f=QG(r,typeof n=="string",e),m=n!==E.Fragment?{...f,...d,ref:a}:{},{children:y}=r,g=E.useMemo(()=>bn(y)?y.get():y,[y]);return E.createElement(n,{...m,children:g})}}function ow(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Gb(e,t,n,r){if(typeof t=="function"){const[a,o]=ow(r);t=t(n!==void 0?n:e.custom,a,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,o]=ow(r);t=t(n!==void 0?n:e.custom,a,o)}return t}function ff(e){return bn(e)?e.get():e}function A$({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:w$(n,r,a,e),renderState:t()}}const Ak=e=>(t,n)=>{const r=E.useContext(kh),a=E.useContext(pb),o=()=>A$(e,t,r,a);return n?o():Z3(o)};function w$(e,t,n,r){const a={},o=r(e,{});for(const g in o)a[g]=ff(o[g]);let{initial:l,animate:u}=e;const d=Dh(e),f=pk(e);t&&f&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const y=m?u:l;if(y&&typeof y!="boolean"&&!Oh(y)){const g=Array.isArray(y)?y:[y];for(let v=0;v<g.length;v++){const x=Gb(e,g[v]);if(x){const{transitionEnd:S,transition:A,...w}=x;for(const T in w){let R=w[T];if(Array.isArray(R)){const D=m?R.length-1:0;R=R[D]}R!==null&&(a[T]=R)}for(const T in S)a[T]=S[T]}}}return a}function $b(e,t,n){var o;const{style:r}=e,a={};for(const l in r)(bn(r[l])||t.style&&bn(t.style[l])||bk(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(a[l]=r[l]);return a}const T$={useVisualState:Ak({scrapeMotionValuesFromProps:$b,createRenderState:Hb})};function wk(e,t,n){const r=$b(e,t,n);for(const a in e)if(bn(e[a])||bn(t[a])){const o=Zo.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[o]=e[a]}return r}const C$={useVisualState:Ak({scrapeMotionValuesFromProps:wk,createRenderState:Ek})};function R$(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const l={...Fb(r)?C$:T$,preloadedFeatures:e,useRender:S$(a),createVisualElement:t,Component:r};return o$(l)}}function zc(e,t,n){const r=e.getProps();return Gb(r,t,n!==void 0?n:r.custom,e)}const Yy=e=>Array.isArray(e);function N$(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lo(n))}function k$(e){return Yy(e)?e[e.length-1]||0:e}function O$(e,t){const n=zc(e,t);let{transitionEnd:r={},transition:a={},...o}=n||{};o={...o,...r};for(const l in o){const u=k$(o[l]);N$(e,l,u)}}function D$(e){return!!(bn(e)&&e.add)}function Zy(e,t){const n=e.getValue("willChange");if(D$(n))return n.add(t);if(!n&&ki.WillChange){const r=new ki.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Tk(e){return e.props[gk]}const I$=e=>e!==null;function L$(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(I$),o=t&&n!=="loop"&&t%2===1?0:a.length-1;return a[o]}const M$={type:"spring",stiffness:500,damping:25,restSpeed:10},j$=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),P$={type:"keyframes",duration:.8},V$={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},B$=(e,{keyframes:t})=>t.length>2?P$:Xo.has(e)?e.startsWith("scale")?j$(t[1]):M$:V$;function z$({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:o,repeatType:l,repeatDelay:u,from:d,elapsed:f,...m}){return!!Object.keys(m).length}const qb=(e,t,n,r={},a,o)=>l=>{const u=Ib(r,e)||{},d=u.delay||r.delay||0;let{elapsed:f=0}=r;f=f-$r(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-f,onUpdate:g=>{t.set(g),u.onUpdate&&u.onUpdate(g)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:a};z$(u)||Object.assign(m,B$(e,m)),m.duration&&(m.duration=$r(m.duration)),m.repeatDelay&&(m.repeatDelay=$r(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(y=!0)),(ki.instantAnimations||ki.skipAnimations)&&(y=!0,m.duration=0,m.delay=0),m.allowFlatten=!u.type&&!u.ease,y&&!o&&t.get()!==void 0){const g=L$(m.keyframes,u);if(g!==void 0){Rt.update(()=>{m.onUpdate(g),m.onComplete()});return}}return u.isSync?new Ob(m):new SG(m)};function U$({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ck(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:l,...u}=t;r&&(o=r);const d=[],f=a&&e.animationState&&e.animationState.getState()[a];for(const m in u){const y=e.getValue(m,e.latestValues[m]??null),g=u[m];if(g===void 0||f&&U$(f,m))continue;const v={delay:n,...Ib(o||{},m)},x=y.get();if(x!==void 0&&!y.isAnimating&&!Array.isArray(g)&&g===x&&!v.velocity)continue;let S=!1;if(window.MotionHandoffAnimation){const w=Tk(e);if(w){const T=window.MotionHandoffAnimation(w,m,Rt);T!==null&&(v.startTime=T,S=!0)}}Zy(e,m),y.start(qb(m,y,g,e.shouldReduceMotion&&rk.has(m)?{type:!1}:v,e,S));const A=y.animation;A&&d.push(A)}return l&&Promise.all(d).then(()=>{Rt.update(()=>{l&&O$(e,l)})}),d}function Xy(e,t,n={}){var d;const r=zc(e,t,n.type==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const o=r?()=>Promise.all(Ck(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:m=0,staggerChildren:y,staggerDirection:g}=a;return H$(e,t,m+f,y,g,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[f,m]=u==="beforeChildren"?[o,l]:[l,o];return f().then(()=>m())}else return Promise.all([o(),l(n.delay)])}function H$(e,t,n=0,r=0,a=1,o){const l=[],u=(e.variantChildren.size-1)*r,d=a===1?(f=0)=>f*r:(f=0)=>u-f*r;return Array.from(e.variantChildren).sort(F$).forEach((f,m)=>{f.notify("AnimationStart",t),l.push(Xy(f,t,{...o,delay:n+d(m)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(l)}function F$(e,t){return e.sortNodePosition(t)}function G$(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(o=>Xy(e,o,n));r=Promise.all(a)}else if(typeof t=="string")r=Xy(e,t,n);else{const a=typeof t=="function"?zc(e,t,n.custom):t;r=Promise.all(Ck(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Rk(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const $$=Bb.length;function Nk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Nk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<$$;n++){const r=Bb[n],a=e.props[r];(Vc(a)||a===!1)&&(t[r]=a)}return t}const q$=[...Vb].reverse(),K$=Vb.length;function W$(e){return t=>Promise.all(t.map(({animation:n,options:r})=>G$(e,n,r)))}function Y$(e){let t=W$(e),n=lw(),r=!0;const a=d=>(f,m)=>{var g;const y=zc(e,m,d==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(y){const{transition:v,transitionEnd:x,...S}=y;f={...f,...S,...x}}return f};function o(d){t=d(e)}function l(d){const{props:f}=e,m=Nk(e.parent)||{},y=[],g=new Set;let v={},x=1/0;for(let A=0;A<K$;A++){const w=q$[A],T=n[w],R=f[w]!==void 0?f[w]:m[w],D=Vc(R),N=w===d?T.isActive:null;N===!1&&(x=A);let L=R===m[w]&&R!==f[w]&&D;if(L&&r&&e.manuallyAnimateOnMount&&(L=!1),T.protectedKeys={...v},!T.isActive&&N===null||!R&&!T.prevProp||Oh(R)||typeof R=="boolean")continue;const O=Z$(T.prevProp,R);let M=O||w===d&&T.isActive&&!L&&D||A>x&&D,B=!1;const U=Array.isArray(R)?R:[R];let ue=U.reduce(a(w),{});N===!1&&(ue={});const{prevResolvedValues:ie={}}=T,fe={...ie,...ue},Z=ne=>{M=!0,g.has(ne)&&(B=!0,g.delete(ne)),T.needsAnimating[ne]=!0;const q=e.getValue(ne);q&&(q.liveStyle=!1)};for(const ne in fe){const q=ue[ne],ge=ie[ne];if(v.hasOwnProperty(ne))continue;let P=!1;Yy(q)&&Yy(ge)?P=!Rk(q,ge):P=q!==ge,P?q!=null?Z(ne):g.add(ne):q!==void 0&&g.has(ne)?Z(ne):T.protectedKeys[ne]=!0}T.prevProp=R,T.prevResolvedValues=ue,T.isActive&&(v={...v,...ue}),r&&e.blockInitialAnimation&&(M=!1),M&&(!(L&&O)||B)&&y.push(...U.map(ne=>({animation:ne,options:{type:w}})))}if(g.size){const A={};if(typeof f.initial!="boolean"){const w=zc(e,Array.isArray(f.initial)?f.initial[0]:f.initial);w&&w.transition&&(A.transition=w.transition)}g.forEach(w=>{const T=e.getBaseTarget(w),R=e.getValue(w);R&&(R.liveStyle=!0),A[w]=T??null}),y.push({animation:A})}let S=!!y.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(y):Promise.resolve()}function u(d,f){var y;if(n[d].isActive===f)return Promise.resolve();(y=e.variantChildren)==null||y.forEach(g=>{var v;return(v=g.animationState)==null?void 0:v.setActive(d,f)}),n[d].isActive=f;const m=l(d);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=lw(),r=!0}}}function Z$(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Rk(t,e):!1}function es(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function lw(){return{animate:es(!0),whileInView:es(),whileHover:es(),whileTap:es(),whileDrag:es(),whileFocus:es(),exit:es()}}class Ta{constructor(t){this.isMounted=!1,this.node=t}update(){}}class X$ extends Ta{constructor(t){super(t),t.animationState||(t.animationState=Y$(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Oh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Q$=0;class J$ extends Ta{constructor(){super(...arguments),this.id=Q$++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const kk={animation:{Feature:X$},exit:{Feature:J$}};function Uc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function hu(e){return{point:{x:e.pageX,y:e.pageY}}}const e6=e=>t=>jb(t)&&e(t,hu(t));function Ec(e,t,n,r){return Uc(e,t,e6(n),r)}function Ok({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function t6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function n6(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Dk=1e-4,r6=1-Dk,i6=1+Dk,Ik=.01,a6=0-Ik,s6=0+Ik;function wn(e){return e.max-e.min}function o6(e,t,n){return Math.abs(e-t)<=n}function cw(e,t,n,r=.5){e.origin=r,e.originPoint=Tt(t.min,t.max,e.origin),e.scale=wn(n)/wn(t),e.translate=Tt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=r6&&e.scale<=i6||isNaN(e.scale))&&(e.scale=1),(e.translate>=a6&&e.translate<=s6||isNaN(e.translate))&&(e.translate=0)}function Sc(e,t,n,r){cw(e.x,t.x,n.x,r?r.originX:void 0),cw(e.y,t.y,n.y,r?r.originY:void 0)}function uw(e,t,n){e.min=n.min+t.min,e.max=e.min+wn(t)}function l6(e,t,n){uw(e.x,t.x,n.x),uw(e.y,t.y,n.y)}function dw(e,t,n){e.min=t.min-n.min,e.max=e.min+wn(t)}function Ac(e,t,n){dw(e.x,t.x,n.x),dw(e.y,t.y,n.y)}const fw=()=>({translate:0,scale:1,origin:0,originPoint:0}),yo=()=>({x:fw(),y:fw()}),hw=()=>({min:0,max:0}),Mt=()=>({x:hw(),y:hw()});function or(e){return[e("x"),e("y")]}function Pg(e){return e===void 0||e===1}function Qy({scale:e,scaleX:t,scaleY:n}){return!Pg(e)||!Pg(t)||!Pg(n)}function ts(e){return Qy(e)||Lk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Lk(e){return mw(e.x)||mw(e.y)}function mw(e){return e&&e!=="0%"}function Gf(e,t,n){const r=e-n,a=t*r;return n+a}function pw(e,t,n,r,a){return a!==void 0&&(e=Gf(e,a,r)),Gf(e,n,r)+t}function Jy(e,t=0,n=1,r,a){e.min=pw(e.min,t,n,r,a),e.max=pw(e.max,t,n,r,a)}function Mk(e,{x:t,y:n}){Jy(e.x,t.translate,t.scale,t.originPoint),Jy(e.y,n.translate,n.scale,n.originPoint)}const gw=.999999999999,yw=1.0000000000001;function c6(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let o,l;for(let u=0;u<a;u++){o=n[u],l=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&bo(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,Mk(e,l)),r&&ts(o.latestValues)&&bo(e,o.latestValues))}t.x<yw&&t.x>gw&&(t.x=1),t.y<yw&&t.y>gw&&(t.y=1)}function vo(e,t){e.min=e.min+t,e.max=e.max+t}function vw(e,t,n,r,a=.5){const o=Tt(e.min,e.max,a);Jy(e,t,n,o,r)}function bo(e,t){vw(e.x,t.x,t.scaleX,t.scale,t.originX),vw(e.y,t.y,t.scaleY,t.scale,t.originY)}function jk(e,t){return Ok(n6(e.getBoundingClientRect(),t))}function u6(e,t,n){const r=jk(e,n),{scroll:a}=t;return a&&(vo(r.x,a.offset.x),vo(r.y,a.offset.y)),r}const Pk=({current:e})=>e?e.ownerDocument.defaultView:null,bw=(e,t)=>Math.abs(e-t);function d6(e,t){const n=bw(e.x,t.x),r=bw(e.y,t.y);return Math.sqrt(n**2+r**2)}class Vk{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Bg(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=d6(y.offset,{x:0,y:0})>=3;if(!g&&!v)return;const{point:x}=y,{timestamp:S}=un;this.history.push({...x,timestamp:S});const{onStart:A,onMove:w}=this.handlers;g||(A&&A(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,y)},this.handlePointerMove=(y,g)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Vg(g,this.transformPagePoint),Rt.update(this.updatePoint,!0)},this.handlePointerUp=(y,g)=>{this.end();const{onEnd:v,onSessionEnd:x,resumeAnimation:S}=this.handlers;if(this.dragSnapToOrigin&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=Bg(y.type==="pointercancel"?this.lastMoveEventInfo:Vg(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(y,A),x&&x(y,A)},!jb(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const l=hu(t),u=Vg(l,this.transformPagePoint),{point:d}=u,{timestamp:f}=un;this.history=[{...d,timestamp:f}];const{onSessionStart:m}=n;m&&m(t,Bg(u,this.history)),this.removeListeners=uu(Ec(this.contextWindow,"pointermove",this.handlePointerMove),Ec(this.contextWindow,"pointerup",this.handlePointerUp),Ec(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ya(this.updatePoint)}}function Vg(e,t){return t?{point:t(e.point)}:e}function _w(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bg({point:e},t){return{point:e,delta:_w(e,Bk(t)),offset:_w(e,f6(t)),velocity:h6(t,.1)}}function f6(e){return e[0]}function Bk(e){return e[e.length-1]}function h6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=Bk(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>$r(t)));)n--;if(!r)return{x:0,y:0};const o=qr(a.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(a.x-r.x)/o,y:(a.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function m6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Tt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Tt(n,e,r.max):Math.min(e,n)),e}function xw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function p6(e,{top:t,left:n,bottom:r,right:a}){return{x:xw(e.x,n,a),y:xw(e.y,t,r)}}function Ew(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function g6(e,t){return{x:Ew(e.x,t.x),y:Ew(e.y,t.y)}}function y6(e,t){let n=.5;const r=wn(e),a=wn(t);return a>r?n=Mc(t.min,t.max-r,e.min):r>a&&(n=Mc(e.min,e.max-a,t.min)),Ni(0,1,n)}function v6(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ev=.35;function b6(e=ev){return e===!1?e=0:e===!0&&(e=ev),{x:Sw(e,"left","right"),y:Sw(e,"top","bottom")}}function Sw(e,t,n){return{min:Aw(e,t),max:Aw(e,n)}}function Aw(e,t){return typeof e=="number"?e:e[t]||0}const _6=new WeakMap;class x6{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=m=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(hu(m).point)},o=(m,y)=>{const{drag:g,dragPropagation:v,onDragStart:x}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=BG(g),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),or(A=>{let w=this.getAxisMotionValue(A).get()||0;if(Kr.test(w)){const{projection:T}=this.visualElement;if(T&&T.layout){const R=T.layout.layoutBox[A];R&&(w=wn(R)*(parseFloat(w)/100))}}this.originPoint[A]=w}),x&&Rt.postRender(()=>x(m,y)),Zy(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},l=(m,y)=>{const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:x,onDrag:S}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:A}=y;if(v&&this.currentDirection===null){this.currentDirection=E6(A),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",y.point,A),this.updateAxis("y",y.point,A),this.visualElement.render(),S&&S(m,y)},u=(m,y)=>this.stop(m,y),d=()=>or(m=>{var y;return this.getAnimationState(m)==="paused"&&((y=this.getAxisMotionValue(m).animation)==null?void 0:y.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new Vk(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:Pk(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&Rt.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Fd(t,a,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=m6(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,a=this.constraints;t&&go(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=p6(r.layoutBox,t):this.constraints=!1,this.elastic=b6(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&or(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=v6(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!go(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const o=u6(r,a.root,this.visualElement.getTransformPagePoint());let l=g6(a.layout.layoutBox,o);if(n){const u=n(t6(l));this.hasMutatedConstraints=!!u,u&&(l=Ok(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},f=or(m=>{if(!Fd(m,n,this.currentDirection))return;let y=d&&d[m]||{};l&&(y={min:0,max:0});const g=a?200:1e6,v=a?40:1e7,x={type:"inertia",velocity:r?t[m]:0,bounceStiffness:g,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...o,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Zy(this.visualElement,t),r.start(qb(t,r,0,n,this.visualElement,!1))}stopAnimation(){or(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){or(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){or(n=>{const{drag:r}=this.getProps();if(!Fd(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,o=this.getAxisMotionValue(n);if(a&&a.layout){const{min:l,max:u}=a.layout.layoutBox[n];o.set(t[n]-Tt(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!go(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};or(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();a[l]=y6({min:d,max:d},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),or(l=>{if(!Fd(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:f}=this.constraints[l];u.set(Tt(d,f,a[l]))})}addListeners(){if(!this.visualElement.current)return;_6.set(this.visualElement,this);const t=this.visualElement.current,n=Ec(t,"pointerdown",d=>{const{drag:f,dragListener:m=!0}=this.getProps();f&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();go(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,o=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Rt.read(r);const l=Uc(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f})=>{this.isDragging&&f&&(or(m=>{const y=this.getAxisMotionValue(m);y&&(this.originPoint[m]+=d[m].translate,y.set(y.get()+d[m].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:o=!1,dragElastic:l=ev,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function Fd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function E6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class S6 extends Ta{constructor(t){super(t),this.removeGroupControls=dr,this.removeListeners=dr,this.controls=new x6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dr}unmount(){this.removeGroupControls(),this.removeListeners()}}const ww=e=>(t,n)=>{e&&Rt.postRender(()=>e(t,n))};class A6 extends Ta{constructor(){super(...arguments),this.removePointerDownListener=dr}onPointerDown(t){this.session=new Vk(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Pk(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:ww(t),onStart:ww(n),onMove:r,onEnd:(o,l)=>{delete this.session,a&&Rt.postRender(()=>a(o,l))}}}mount(){this.removePointerDownListener=Ec(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const hf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const sc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ue.test(e))e=parseFloat(e);else return e;const n=Tw(e,t.target.x),r=Tw(e,t.target.y);return`${n}% ${r}%`}},w6={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=va.parse(e);if(a.length>5)return r;const o=va.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=d;const f=Tt(u,d,.5);return typeof a[2+l]=="number"&&(a[2+l]/=f),typeof a[3+l]=="number"&&(a[3+l]/=f),o(a)}};class T6 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:o}=t;d$(C6),o&&(n.group&&n.group.add(o),r&&r.register&&a&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),hf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,a||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||Rt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Mb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function zk(e){const[t,n]=WG(),r=E.useContext(EN);return b.jsx(T6,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(yk),isPresent:t,safeToRemove:n})}const C6={borderRadius:{...sc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sc,borderTopRightRadius:sc,borderBottomLeftRadius:sc,borderBottomRightRadius:sc,boxShadow:w6};function R6(e,t,n){const r=bn(e)?e:Lo(e);return r.start(qb("",r,t,n)),r.animation}const N6=(e,t)=>e.depth-t.depth;class k6{constructor(){this.children=[],this.isDirty=!1}add(t){gb(this.children,t),this.isDirty=!0}remove(t){yb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(N6),this.isDirty=!1,this.children.forEach(t)}}function O6(e,t){const n=Dn.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(ya(r),e(o-t))};return Rt.setup(r,!0),()=>ya(r)}const Uk=["TopLeft","TopRight","BottomLeft","BottomRight"],D6=Uk.length,Cw=e=>typeof e=="string"?parseFloat(e):e,Rw=e=>typeof e=="number"||Ue.test(e);function I6(e,t,n,r,a,o){a?(e.opacity=Tt(0,n.opacity??1,L6(r)),e.opacityExit=Tt(t.opacity??1,0,M6(r))):o&&(e.opacity=Tt(t.opacity??1,n.opacity??1,r));for(let l=0;l<D6;l++){const u=`border${Uk[l]}Radius`;let d=Nw(t,u),f=Nw(n,u);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||Rw(d)===Rw(f)?(e[u]=Math.max(Tt(Cw(d),Cw(f),r),0),(Kr.test(f)||Kr.test(d))&&(e[u]+="%")):e[u]=f}(t.rotate||n.rotate)&&(e.rotate=Tt(t.rotate||0,n.rotate||0,r))}function Nw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const L6=Hk(0,.5,IN),M6=Hk(.5,.95,dr);function Hk(e,t,n){return r=>r<e?0:r>t?1:n(Mc(e,t,r))}function kw(e,t){e.min=t.min,e.max=t.max}function ar(e,t){kw(e.x,t.x),kw(e.y,t.y)}function Ow(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Dw(e,t,n,r,a){return e-=t,e=Gf(e,1/n,r),a!==void 0&&(e=Gf(e,1/a,r)),e}function j6(e,t=0,n=1,r=.5,a,o=e,l=e){if(Kr.test(t)&&(t=parseFloat(t),t=Tt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=Tt(o.min,o.max,r);e===o&&(u-=t),e.min=Dw(e.min,t,n,u,a),e.max=Dw(e.max,t,n,u,a)}function Iw(e,t,[n,r,a],o,l){j6(e,t[n],t[r],t[a],t.scale,o,l)}const P6=["x","scaleX","originX"],V6=["y","scaleY","originY"];function Lw(e,t,n,r){Iw(e.x,t,P6,n?n.x:void 0,r?r.x:void 0),Iw(e.y,t,V6,n?n.y:void 0,r?r.y:void 0)}function Mw(e){return e.translate===0&&e.scale===1}function Fk(e){return Mw(e.x)&&Mw(e.y)}function jw(e,t){return e.min===t.min&&e.max===t.max}function B6(e,t){return jw(e.x,t.x)&&jw(e.y,t.y)}function Pw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Gk(e,t){return Pw(e.x,t.x)&&Pw(e.y,t.y)}function Vw(e){return wn(e.x)/wn(e.y)}function Bw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class z6{constructor(){this.members=[]}add(t){gb(this.members,t),t.scheduleRender()}remove(t){if(yb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const o=this.members[a];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function U6(e,t,n){let r="";const a=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((a||o||l)&&(r=`translate3d(${a}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:m,rotateX:y,rotateY:g,skewX:v,skewY:x}=n;f&&(r=`perspective(${f}px) ${r}`),m&&(r+=`rotate(${m}deg) `),y&&(r+=`rotateX(${y}deg) `),g&&(r+=`rotateY(${g}deg) `),v&&(r+=`skewX(${v}deg) `),x&&(r+=`skewY(${x}deg) `)}const u=e.x.scale*t.x,d=e.y.scale*t.y;return(u!==1||d!==1)&&(r+=`scale(${u}, ${d})`),r||"none"}const zg=["","X","Y","Z"],H6={visibility:"hidden"},F6=1e3;let G6=0;function Ug(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function $k(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Tk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Rt,!(a||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&$k(r)}function qk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(l={},u=t==null?void 0:t()){this.id=G6++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(K6),this.nodes.forEach(Q6),this.nodes.forEach(J6),this.nodes.forEach(W6)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new k6)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new _b),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const d=this.eventHandlers.get(l);d&&d.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=fk(l)&&!$G(l),this.instance=l;const{layoutId:u,layout:d,visualElement:f}=this.options;if(f&&!f.current&&f.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||u)&&(this.isLayoutDirty=!0),e){let m;const y=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=O6(y,250),hf.hasAnimatedSinceResize&&(hf.hasAnimatedSinceResize=!1,this.nodes.forEach(Uw))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&f&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||i8,{onLayoutAnimationStart:S,onLayoutAnimationComplete:A}=f.getProps(),w=!this.targetLayout||!Gk(this.targetLayout,v),T=!y&&g;if(this.options.layoutRoot||this.resumeFrom||T||y&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,T);const R={...Ib(x,"layout"),onPlay:S,onComplete:A};(f.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R)}else y||Uw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ya(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(e8),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&$k(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(zw);return}this.isUpdating||this.nodes.forEach(Z6),this.isUpdating=!1,this.nodes.forEach(X6),this.nodes.forEach($6),this.nodes.forEach(q6),this.clearAllSnapshots();const u=Dn.now();un.delta=Ni(0,1e3/60,u-un.timestamp),un.timestamp=u,un.isProcessing=!0,Og.update.process(un),Og.preRender.process(un),Og.render.process(un),un.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Y6),this.sharedNodes.forEach(t8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!wn(this.snapshot.measuredBox.x)&&!wn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Mt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!a)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!Fk(this.projectionDelta),d=this.getTransformTemplate(),f=d?d(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;l&&this.instance&&(u||ts(this.latestValues)||m)&&(a(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),a8(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:l}=this.options;if(!l)return Mt();const u=l.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(s8))){const{scroll:m}=this.root;m&&(vo(u.x,m.offset.x),vo(u.y,m.offset.y))}return u}removeElementScroll(l){var d;const u=Mt();if(ar(u,l),(d=this.scroll)!=null&&d.wasRoot)return u;for(let f=0;f<this.path.length;f++){const m=this.path[f],{scroll:y,options:g}=m;m!==this.root&&y&&g.layoutScroll&&(y.wasRoot&&ar(u,l),vo(u.x,y.offset.x),vo(u.y,y.offset.y))}return u}applyTransform(l,u=!1){const d=Mt();ar(d,l);for(let f=0;f<this.path.length;f++){const m=this.path[f];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&bo(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),ts(m.latestValues)&&bo(d,m.latestValues)}return ts(this.latestValues)&&bo(d,this.latestValues),d}removeTransform(l){const u=Mt();ar(u,l);for(let d=0;d<this.path.length;d++){const f=this.path[d];if(!f.instance||!ts(f.latestValues))continue;Qy(f.latestValues)&&f.updateSnapshot();const m=Mt(),y=f.measurePageBox();ar(m,y),Lw(u,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,m)}return ts(this.latestValues)&&Lw(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==un.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var g;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(l||d&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!(!this.layout||!(m||y))){if(this.resolvedRelativeTargetAt=un.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Mt(),this.relativeTargetOrigin=Mt(),Ac(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),ar(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Mt(),this.targetWithTransforms=Mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),l6(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ar(this.target,this.layout.layoutBox),Mk(this.target,this.targetDelta)):ar(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const v=this.getClosestProjectingParent();v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Mt(),this.relativeTargetOrigin=Mt(),Ac(this.relativeTargetOrigin,this.target,v.target),ar(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Qy(this.parent.latestValues)||Lk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var x;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===un.timestamp&&(d=!1),d)return;const{layout:f,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||m))return;ar(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,g=this.treeScale.y;c6(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Mt());const{target:v}=l;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ow(this.prevProjectionDelta.x,this.projectionDelta.x),Ow(this.prevProjectionDelta.y,this.projectionDelta.y)),Sc(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==g||!Bw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yo(),this.projectionDelta=yo(),this.projectionDeltaWithTransform=yo()}setAnimationOrigin(l,u=!1){const d=this.snapshot,f=d?d.latestValues:{},m={...this.latestValues},y=yo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const g=Mt(),v=d?d.source:void 0,x=this.layout?this.layout.source:void 0,S=v!==x,A=this.getStack(),w=!A||A.members.length<=1,T=!!(S&&!w&&this.options.crossfade===!0&&!this.path.some(r8));this.animationProgress=0;let R;this.mixTargetDelta=D=>{const N=D/1e3;Hw(y.x,l.x,N),Hw(y.y,l.y,N),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ac(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),n8(this.relativeTarget,this.relativeTargetOrigin,g,N),R&&B6(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Mt()),ar(R,this.relativeTarget)),S&&(this.animationValues=m,I6(m,f,this.latestValues,N,T,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var u,d,f;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(!1),(f=(d=this.resumingFrom)==null?void 0:d.currentAnimation)==null||f.stop(!1),this.pendingAnimation&&(ya(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Rt.update(()=>{hf.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Lo(0)),this.currentAnimation=R6(this.motionValue,[0,1e3],{...l,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),l.onUpdate&&l.onUpdate(m)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(F6),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:f,latestValues:m}=l;if(!(!u||!d||!f)){if(this!==l&&this.layout&&f&&Kk(this.options.animationType,this.layout.layoutBox,f.layoutBox)){d=this.target||Mt();const y=wn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+y;const g=wn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+g}ar(u,d),bo(u,m),Sc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new z6),this.sharedNodes.get(l).add(u);const f=u.options.initialPromotionConfig;u.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var u;const{layoutId:l}=this.options;return l?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:l}=this.options;return l?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:d}={}){const f=this.getStack();f&&f.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(u=!0),!u)return;const f={};d.z&&Ug("z",l,f,this.animationValues);for(let m=0;m<zg.length;m++)Ug(`rotate${zg[m]}`,l,f,this.animationValues),Ug(`skew${zg[m]}`,l,f,this.animationValues);l.render();for(const m in f)l.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);l.scheduleRender()}getProjectionStyles(l){if(!this.instance||this.isSVG)return;if(!this.isVisible)return H6;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ff(l==null?void 0:l.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=ff(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!ts(this.latestValues)&&(v.transform=d?d({},""):"none",this.hasProjected=!1),v}const m=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=U6(this.projectionDeltaWithTransform,this.treeScale,m),d&&(u.transform=d(m,u.transform));const{x:y,y:g}=this.projectionDelta;u.transformOrigin=`${y.origin*100}% ${g.origin*100}% 0`,f.animationValues?u.opacity=f===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:u.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const v in Bc){if(m[v]===void 0)continue;const{correct:x,applyTo:S,isCSSVariable:A}=Bc[v],w=u.transform==="none"?m[v]:x(m[v],f);if(S){const T=S.length;for(let R=0;R<T;R++)u[S[R]]=w}else A?this.options.visualElement.renderState.vars[v]=w:u[v]=w}return this.options.layoutId&&(u.pointerEvents=f===this?ff(l==null?void 0:l.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)==null?void 0:u.stop(!1)}),this.root.nodes.forEach(zw),this.root.sharedNodes.clear()}}}function $6(e){e.updateLayout()}function q6(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?or(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=wn(g);g.min=r[y].min,g.max=g.min+v}):Kk(o,t.layoutBox,r)&&or(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=wn(r[y]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+v)});const u=yo();Sc(u,r,t.layoutBox);const d=yo();l?Sc(d,e.applyTransform(a,!0),t.measuredBox):Sc(d,r,t.layoutBox);const f=!Fk(u);let m=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:v}=y;if(g&&v){const x=Mt();Ac(x,t.layoutBox,g.layoutBox);const S=Mt();Ac(S,r,v.layoutBox),Gk(x,S)||(m=!0),y.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=x,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:d,layoutDelta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function K6(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function W6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Y6(e){e.clearSnapshot()}function zw(e){e.clearMeasurements()}function Z6(e){e.isLayoutDirty=!1}function X6(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Uw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Q6(e){e.resolveTargetDelta()}function J6(e){e.calcProjection()}function e8(e){e.resetSkewAndRotation()}function t8(e){e.removeLeadSnapshot()}function Hw(e,t,n){e.translate=Tt(t.translate,0,n),e.scale=Tt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fw(e,t,n,r){e.min=Tt(t.min,n.min,r),e.max=Tt(t.max,n.max,r)}function n8(e,t,n,r){Fw(e.x,t.x,n.x,r),Fw(e.y,t.y,n.y,r)}function r8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const i8={duration:.45,ease:[.4,0,.1,1]},Gw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$w=Gw("applewebkit/")&&!Gw("chrome/")?Math.round:dr;function qw(e){e.min=$w(e.min),e.max=$w(e.max)}function a8(e){qw(e.x),qw(e.y)}function Kk(e,t,n){return e==="position"||e==="preserve-aspect"&&!o6(Vw(t),Vw(n),.2)}function s8(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const o8=qk({attachResizeListener:(e,t)=>Uc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hg={current:void 0},Wk=qk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hg.current){const e=new o8({});e.mount(window),e.setOptions({layoutScroll:!0}),Hg.current=e}return Hg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),l8={pan:{Feature:A6},drag:{Feature:S6,ProjectionNode:Wk,MeasureLayout:zk}};function Kw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,o=r[a];o&&Rt.postRender(()=>o(t,hu(t)))}class c8 extends Ta{mount(){const{current:t}=this.node;t&&(this.unmount=zG(t,(n,r)=>(Kw(this.node,r,"Start"),a=>Kw(this.node,a,"End"))))}unmount(){}}class u8 extends Ta{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=uu(Uc(this.node.current,"focus",()=>this.onFocus()),Uc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ww(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),o=r[a];o&&Rt.postRender(()=>o(t,hu(t)))}class d8 extends Ta{mount(){const{current:t}=this.node;t&&(this.unmount=GG(t,(n,r)=>(Ww(this.node,r,"Start"),(a,{success:o})=>Ww(this.node,a,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const tv=new WeakMap,Fg=new WeakMap,f8=e=>{const t=tv.get(e.target);t&&t(e)},h8=e=>{e.forEach(f8)};function m8({root:e,...t}){const n=e||document;Fg.has(n)||Fg.set(n,{});const r=Fg.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(h8,{root:e,...t})),r[a]}function p8(e,t,n){const r=m8(t);return tv.set(e,n),r.observe(e),()=>{tv.delete(e),r.unobserve(e)}}const g8={some:0,all:1};class y8 extends Ta{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:g8[a]},u=d=>{const{isIntersecting:f}=d;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),g=f?m:y;g&&g(d)};return p8(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(v8(t,n))&&this.startObserver()}unmount(){}}function v8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Yk={inView:{Feature:y8},tap:{Feature:d8},focus:{Feature:u8},hover:{Feature:c8}},b8={layout:{ProjectionNode:Wk,MeasureLayout:zk}},nv={current:null},Zk={current:!1};function _8(){if(Zk.current=!0,!!mb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nv.current=e.matches;e.addListener(t),t()}else nv.current=!1}const x8=new WeakMap;function E8(e,t,n){for(const r in t){const a=t[r],o=n[r];if(bn(a))e.addValue(r,a);else if(bn(o))e.addValue(r,Lo(a,{owner:e}));else if(o!==a)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(a):l.hasAnimated||l.set(a)}else{const l=e.getStaticValue(r);e.addValue(r,Lo(l!==void 0?l:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Yw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class S8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:o,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Db,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=Dn.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Rt.render(this.render,!1,!0))};const{latestValues:d,renderState:f}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Dh(n),this.isVariantNode=pk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in y){const v=y[g];d[g]!==void 0&&bn(v)&&v.set(d[g],!1)}}mount(t){this.current=t,x8.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Zk.current||_8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:nv.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ya(this.notifyUpdate),ya(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Xo.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Rt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),o(),l&&l(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Mo){const n=Mo[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Mt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Yw.length;r++){const a=Yw[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const o="on"+a,l=t[o];l&&(this.propEventSubscriptions[a]=this.on(a,l))}this.prevMotionValues=E8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Lo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(SN(r)||wN(r))?r=parseFloat(r):!KG(r)&&va.test(n)&&(r=ok(t,n)),this.setBaseTarget(t,bn(r)?r.get():r)),bn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=Gb(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!bn(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new _b),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Xk extends S8{constructor(){super(...arguments),this.KeyframeResolver=MG}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;bn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Qk(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}function A8(e){return window.getComputedStyle(e)}class w8 extends Xk{constructor(){super(...arguments),this.type="html",this.renderInstance=Qk}readValueFromInstance(t,n){var r;if(Xo.has(n))return(r=this.projection)!=null&&r.isProjecting?Hy(n):eG(t,n);{const a=A8(t),o=(Sb(n)?a.getPropertyValue(n):a[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return jk(t,n)}build(t,n,r){Ub(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return $b(t,n,r)}}const Jk=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function T8(e,t,n,r){Qk(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(Jk.has(a)?a:zb(a),t.attrs[a])}class C8 extends Xk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Mt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xo.has(n)){const r=sk(n);return r&&r.default||0}return n=Jk.has(n)?n:zb(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return wk(t,n,r)}build(t,n,r){xk(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){T8(t,n,r,a)}mount(t){this.isSVGTag=Sk(t.tagName),super.mount(t)}}const eO=(e,t)=>Fb(e)?new C8(t):new w8(t,{allowProjection:e!==E.Fragment}),R8=R$({...kk,...Yk,...l8,...b8},eO),tO=JG(R8),N8={renderer:eO,...kk,...Yk},nO=e=>{const[t,n]=E.useState(e);return E.useEffect(()=>{n(e??window.document.body)},[e]),t};function k8(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const{useRef:O8}=Ge;function rO(e){const t=O8();return n=>{const r=e(n);return k8(t.current,r)?t.current:t.current=r}}const iO=e=>{const{disableScroll:t=!1,element:n,key:r="unnamed_blocker"}=e??{},{isElementScrollBlocked:a,addBlockage:o,removeBlockage:l}=FB(rO(f=>({isElementScrollBlocked:f.isElementScrollBlocked,addBlockage:f.addBlockage,removeBlockage:f.removeBlockage}))),u=nO(n);return E.useEffect(()=>{const f=n??window.document.body;t?o(r,f):l(r,f)},[o,t,n,r,l]),{isScrollBlocked:u?a(u):!1}},D8=hr("flex text-text flex-col backdrop-blur",{variants:{roundedSize:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},transparency:{none:"bg-card",sm:"bg-card/90",md:"bg-card/70",lg:"bg-card/40",xl:"bg-card/20",full:""},padding:{none:"p-0",sm:"p-1",md:"p-2",lg:"p-3",xl:"p-4"},separator:{without:"",x:"divide-x divide-dashed divide-text/20",y:"divide-y divide-dashed divide-text/20",both:"divide-x divide-y divide-dashed divide-text/20"},border:{none:"",with:"border-[1.5px]"},borderColor:{primary:"border-primary",secondary:"border-secondary",neutral:"border-neutral",text:"border-text ",error:"border-error",warning:"border-warning",success:"border-success"},background:{none:"bg-inherit",hoverable:"!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur",with:""},gap:{none:"gap-0",sm:"gap-1",md:"gap-3",lg:"gap-5",xl:"gap-8","2xl":"gap-10"}},defaultVariants:{roundedSize:"md",border:"none",borderColor:"text",transparency:"md",padding:"none",separator:"without",gap:"none"}}),Jr=({children:e,roundedSize:t,padding:n,transparency:r,separator:a,className:o,border:l,borderColor:u,background:d,...f})=>b.jsx("div",{className:Ae(D8({roundedSize:t,transparency:r,padding:n,separator:a,border:typeof l=="boolean"?l?"with":"none":void 0,background:d,borderColor:u,className:o})),...f,children:e}),Kb="relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8",I8="after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:hover:cursor-pointer after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100",L8=({className:e,...t})=>b.jsx("h1",{className:Ae("mt-5 text-2xl font-bold",e),...t}),M8=({className:e,...t})=>b.jsx("h2",{className:Ae("mt-16 mb-2 text-2xl font-bold",Kb,e),...t}),j8=({className:e,...t})=>b.jsx("h3",{className:Ae("mt-5 mb-2 text-xl font-bold",Kb,e),...t}),P8=({className:e,...t})=>b.jsx("h4",{className:Ae("mt-3 text-lg font-bold",Kb,e),...t}),V8=e=>String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase(),B8=e=>{var a;const t=document.getElementById(e),r=(((a=t==null?void 0:t.getBoundingClientRect())==null?void 0:a.top)??0)+window.scrollY-150;window.scrollTo({top:r,behavior:"smooth"})},z8=(e,t)=>{const n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,a=window.getComputedStyle(e,":after"),o=n+parseInt(a.getPropertyValue("left"),10),l=o+parseInt(a.width,10),u=r+parseInt(a.getPropertyValue("top"),10),d=u+parseInt(a.height,10),f=t.clientX,m=t.clientY;return f>=o&&f<=l&&m>=u&&m<=d},Wb=({H:e,children:t,className:n,isClickable:r,...a})=>{const o=typeof t=="string"?V8(t):void 0,l=u=>{const{id:d}=u.currentTarget;if(z8(u.currentTarget,u)&&typeof d=="string"){const y=`${window.location.href.split("#")[0]}#${d}`;navigator.clipboard.writeText(y),B8(d)}};return b.jsx(e,{id:o,onClick:r?l:void 0,"aria-label":r?`Click to scroll to section ${o} and copy the link to the clipboard`:void 0,className:Ae(r&&I8,n),...a,children:t})},U8=({isClickable:e,...t})=>b.jsx(L8,{...t}),H8=({isClickable:e=!1,...t})=>b.jsx(Wb,{H:M8,isClickable:e,...t}),Yb=({isClickable:e=!1,...t})=>b.jsx(Wb,{H:j8,isClickable:e,...t}),F8=({isClickable:e=!1,...t})=>b.jsx(Wb,{H:P8,isClickable:e,...t}),G8=hr("cursor-default overflow-auto py-3 shadow-sm justify-center",{variants:{size:{sm:"h-auto max-h-[30vh] w-[95vw] max-w-xl",md:"h-auto max-h-[50vh] w-[95vw] max-w-xl",lg:"h-auto max-h-[70vh] w-[95vw] max-w-2xl",xl:"h-auto max-h-[95vh] w-[95vw] max-w-6xl",unset:"h-auto max-h-[95vh] w-[95vw]"}},defaultVariants:{size:"unset"}}),$8=tO.create(Jr),aO=({children:e,isOpen:t,container:n,disableScroll:r=!1,onClose:a,hasCloseButton:o=!1,title:l,size:u="md",className:d,...f})=>{const m=nO(n);if(iO({key:"modal",disableScroll:t&&r}),!m)return b.jsx(b.Fragment,{});const y=typeof l=="string";return bs.createPortal(b.jsx(tO.div,{className:"bg-background/40 /40 invisible fixed left-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto backdrop-blur",animate:t?"visible":"invisible",variants:{visible:{opacity:1,visibility:"visible",transition:{duration:.1,when:"beforeChildren"}},invisible:{opacity:0,visibility:"hidden",transition:{duration:.1,when:"afterChildren"}}},onClick:g=>{g.stopPropagation(),a==null||a()},"aria-hidden":!t,children:b.jsx("div",{className:"flex justify-center p-4",children:b.jsxs($8,{onClick:g=>g.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:G8({size:u,className:d}),role:"dialog","aria-modal":!0,roundedSize:"2xl",...f,children:[b.jsxs("div",{className:Ae("cursor-default px-4",o&&y?"flex items-center justify-center":o?"flex items-center justify-end":y?"items-center":"hidden"),children:[y&&b.jsx(Yb,{className:"ml-4 flex items-center justify-center text-lg font-bold",children:l}),o&&b.jsx(yt,{variant:"hoverable",color:"text",label:"Close modal",className:"ml-auto",onClick:g=>{g.stopPropagation(),a==null||a()},Icon:_s,size:"icon-md"})]}),b.jsx("div",{className:"flex flex-1 flex-col items-center overflow-auto",children:e})]})})}),m)},q8=hr("gap-3 transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline","invisible-link":"h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0",button:"rounded-lg bg-current *:text-text-opposite min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50","button-outlined":"rounded-lg border-[1.5px] hover:bg-current/30 min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",hoverable:"block rounded-lg border-none bg-current/0 transition hover:bg-current/20 aria-[current]:bg-current/5"},color:{primary:"text-primary",secondary:"text-secondary",destructive:"text-destructive",neutral:"text-neutral",light:"text-white",dark:"text-neutral-800",text:"text-text","text-inverse":"text-text-opposite",error:"text-error",success:"text-success",custom:""},underlined:{default:"",true:"underline",false:"no-underline"}},defaultVariants:{variant:"default",color:"primary",underlined:"default"}}),K8=({href:e,isExternalLink:t})=>{const n=typeof e=="string"&&e.trim()!=="";return t===!0||typeof t>"u"&&n&&/^https?:\/\//.test(e)},Zb=e=>{const{variant:t="default",color:n="primary",children:r,label:a,className:o,isActive:l,underlined:u,locale:d,isExternalLink:f,href:m,...y}=e,{internationalization:g}=tt,v=K8(e),x=typeof r=="string",S=v?"noopener noreferrer nofollow":void 0,A=v?"_blank":"_self",w=d?d===g.defaultLocale?"x-default":d:void 0,T=d&&m&&!v?$M(m,d):m;return b.jsxs("a",{href:T,hrefLang:w,"aria-label":a,rel:S,target:A,"aria-current":l?"page":void 0,className:Ae(q8({variant:t,color:n,underlined:u,className:o})),...y,children:[t==="button"?b.jsx("span",{children:r}):r,v&&x&&b.jsx(OV,{className:"ml-2 inline-block size-4"})]})},sO={key:"breadcrumb",content:{linkLabel:pe({en:"Go to",fr:"Aller à",es:"Ir a","en-GB":"Go to",de:"Gehe zu",ja:"に移動",ko:"로 이동",zh:"转到",it:"Vai a",pt:"Ir para",hi:"कर जाएं",ar:"اذهب إلى",ru:"Перейти на"})}},W8=({href:e,lang:t,children:n,onClick:r,color:a,position:o,locale:l,...u})=>{const{linkLabel:d}=nn(sO);return b.jsxs(b.Fragment,{children:[b.jsx(Zb,{href:e,locale:l,color:a,onClick:r,itemProp:"item",itemScope:!0,itemType:"https://schema.org/WebPage",...u,label:`${d} ${n}`,itemID:e,children:b.jsx("span",{itemProp:"name",children:n})}),b.jsx("meta",{itemProp:"position",content:o.toString()})]})},Y8=({children:e,onClick:t,color:n,position:r,...a})=>{const{linkLabel:o}=nn(sO);return b.jsxs(b.Fragment,{children:[b.jsx(yt,{onClick:t,variant:"link",label:`${o} ${e}`,color:n,itemProp:"item",...a,children:b.jsx("span",{itemProp:"name",children:e})}),b.jsx("meta",{itemProp:"position",content:r.toString()})]})},Z8=({children:e,position:t,...n})=>b.jsxs("span",{itemProp:"item",children:[b.jsx("span",{itemProp:"name",...n,children:e}),b.jsx("meta",{itemProp:"position",content:t.toString()})]}),X8=({links:e,className:t,color:n="text",locale:r,elementType:a="page",...o})=>b.jsx("nav",{"aria-label":"breadcrumb",children:b.jsx("ol",{className:Ae("flex flex-row flex-wrap items-center gap-2 text-sm",t),itemScope:!0,itemType:"http://schema.org/BreadcrumbList",...o,children:e.map((l,u)=>{const d=u===e.length-1,f=typeof l=="object"&&typeof l.href=="string",m=typeof l=="object"&&typeof l.onClick=="function",g=u===e.length-1?a:void 0,v=l.text??l;let x=b.jsx(Z8,{position:u+1,"aria-current":g,children:v},v);f?x=b.jsx(W8,{href:l.href,color:n,position:u+1,locale:r,"aria-current":g,children:v},v):m&&(x=b.jsx(Y8,{onClick:l.onClick,color:n,position:u+1,"aria-current":g,children:v},v));const S=b.jsx("li",{itemProp:"itemListElement",itemScope:!0,itemType:"https://schema.org/ListItem",children:x},v);return d?S:b.jsxs(E.Fragment,{children:[S,b.jsx(xf,{size:10})]},v)})})}),Q8={key:"save-dictionary-details",content:{deleteButton:{text:pe({en:"Delete dictionary","en-GB":"Delete dictionary",fr:"Supprimer le dictionnaire",es:"Eliminar diccionario",de:"Wörterbuch löschen",ja:"辞書を削除",ko:"사전 삭제",zh:"删除字典",it:"Elimina dizionario",pt:"Excluir dicionário",hi:"शब्दकोश हटाएं",ar:"حذف القاموس",ru:"Удалить словарь"}),label:pe({en:"Click to delete dictionary","en-GB":"Click to delete dictionary",fr:"Cliquez pour supprimer le dictionnaire",es:"Haga clic para eliminar el diccionario",de:"Klicken Sie, um das Wörterbuch zu löschen",ja:"辞書を削除するにはクリックしてください",ko:"사전을 삭제하려면 클릭하세요",zh:"单击以删除字典",it:"Fai clic per eliminare il dizionario",pt:"Clique para excluir o dicionário",hi:"शब्दकोश हटाने के लिए क्लिक करें",ar:"انقر لحذف القاموس",ru:"Нажмите, чтобы удалить словарь"})},resetButton:{text:pe({en:"Reset all changes","en-GB":"Reset all changes",fr:"Réinitialiser toutes les modifications",es:"Restablecer todas las modificaciones",de:"Alle Änderungen zurücksetzen",ja:"すべての変更をリセット",ko:"모든 변경 사항 초기화",zh:"重置所有更改",it:"Reimposta tutte le modifiche",pt:"Redefinir todas as alterações",hi:"सभी परिवर्तनों को रीसेट करें",ar:"إعادة تعيين جميع التغييرات",ru:"Сбросить все изменения"}),label:pe({en:"Click to reset all the changes","en-GB":"Click to reset all the changes",fr:"Cliquez pour réinitialiser toutes les modifications",es:"Haga clic para restablecer todas las modificaciones",de:"Klicken Sie, um alle Änderungen zurückzusetzen",ja:"すべての変更をリセットするにはクリックしてください",ko:"모든 변경 사항을 초기화하려면 클릭하세요",zh:"单击以重置所有更改",it:"Fai clic per ripristinare tutte le modifiche",pt:"Clique para redefinir todas as alterações",hi:"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें",ar:"انقر لإعادة تعيين جميع التغييرات",ru:"Нажмите, чтобы сбросить все изменения"})},saveButton:{text:pe({en:"Save changes","en-GB":"Save changes",fr:"Enregistrer les modifications",es:"Guardar cambios",de:"Änderungen speichern",ja:"変更を保存",ko:"변경 사항 저장",zh:"保存更改",it:"Salva le modifiche",pt:"Salvar alterações",hi:"परिवर्तनों को सहेजें",ar:"احفظ التغييرات",ru:"Сохранить изменения"}),label:pe({en:"Click to save changes","en-GB":"Click to save changes",fr:"Cliquez pour enregistrer les modifications",es:"Haga clic para guardar cambios",de:"Klicken Sie, um Änderungen zu speichern",ja:"変更を保存するにはクリックしてください",ko:"변경 사항을 저장하려면 클릭하세요",zh:"单击保存更改",it:"Fai clic per salvare le modifiche",pt:"Clique para salvar alterações",hi:"परिवर्तनों को सहेजने के लिए क्लिक करें",ar:"انقر لحفظ التغييرات",ru:"Нажмите, чтобы сохранить изменения"})},publishButton:{text:pe({en:"Publish dictionary","en-GB":"Publish dictionary",fr:"Publier dictionnaire",es:"Publicar diccionario",de:"Wörterbuch veröffentlichen",ja:"辞書を公開",ko:"사전을 게시합니다",zh:"发布字典",it:"Pubblica dizionario",pt:"Publicar dicionário",hi:"शब्दकोश प्रकाशित करें",ar:"نشر القاموس",ru:"Опубликовать словарь"}),label:pe({en:"Click to publish dictionary","en-GB":"Click to publish dictionary",fr:"Cliquez pour publier dictionnaire",es:"Haga clic para publicar diccionario",de:"Klicken Sie, um das Wörterbuch zu veröffentlichen",ja:"辞書を公開するにはクリックしてください",ko:"사전을 게시하려면 클릭하세요",zh:"单击以发布字典",it:"Fai clic per pubblicare il dizionario",pt:"Clique para publicar dicionário",hi:"शब्दकोश प्रकाशित करने के लिए क्लिक करें",ar:"انقر لنشر القاموس",ru:"Нажмите, чтобы опубликовать словарь"})},downloadButton:{text:pe({en:"Download","en-GB":"Download",fr:"Télécharger",es:"Descargar",de:"Herunterladen",ja:"ダウンロード",ko:"다운로드",zh:"下载",it:"Scarica",pt:"Baixar",hi:"डाउनलोड",ar:"تنزيل",ru:"Скачать"}),label:pe({en:"Click to download","en-GB":"Click to download",fr:"Cliquez pour télécharger",es:"Haga clic para descargar",de:"Klicken Sie, um herunterzuladen",ja:"ダウンロードするにはクリックしてください",ko:"다운로드를 클릭하세요",zh:"单击下载",it:"Fai clic per scaricare",pt:"Clique para baixar",hi:"डाउनलोड करने के लिए क्लिक करें",ar:"انقر لتنزيل",ru:"Нажмите, чтобы скачать"})},confirmation:{title:pe({en:"Confirmation","en-GB":"Confirmation",fr:"Confirmation",es:"Confirmation",de:"Confirmation",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmação",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтверждение"}),message:pe({en:"This will overwrite the existing dictionary. Are you sure you want to continue?","en-GB":"This will overwrite the existing dictionary. Are you sure you want to continue?",fr:"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?",es:"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?",de:"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?",ja:"既存の辞書を上書きします。続行しますか?",ko:"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?",zh:"这将覆盖现有的字典。你确定要继续吗?",it:"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?",pt:"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?",hi:"यह मौजूदा शब्दकोश को ओवरराइट करने जारी है। आप क्या आप जारी रखना चाहते हैं?",ar:"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟",ru:"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?"}),differentFormatMessage:pe({en:"The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.","en-GB":"The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.",fr:"Le dictionnaire est dans un format différent, il sera transformé en un fichier JSON. Êtes-vous sûr de vouloir continuer ? Cela remplacera le dictionnaire existant.",es:"El diccionario está en un formato diferente, se transformará en un archivo JSON. ¿Estás seguro de que quieres continuar? Esto sobrescribirá el diccionario existente.",de:"Das Wörterbuch ist in einem anderen Format, es wird in eine JSON-Datei umgewandelt. Sind Sie sicher, dass Sie fortfahren möchten? Dies wird das existierende Wörterbuch überschreiben.",ja:"辞書は異なる形式です。JSONファイルに変換されます。続行しますか?既存の辞書を上書きします。",ko:"사전은 다른 형식입니다. JSON 파일로 변환됩니다. 계속하시겠습니까? 이는 기존 사전을 덮어 쓸 것입니다.",zh:"字典是在不同格式中,它将转换为JSON文件。你确定要继续吗?这将覆盖现有的字典。",it:"Il dizionario è in un formato diverso, verrà trasformato in un file JSON. Sei sicuro di voler continuare? Questo sovrascriverà il dizionario esistente.",pt:"O dicionário está em um formato diferente, ele será transformado em um arquivo JSON. Você tem certeza de que deseja continuar? Isso sobrescreverá o dicionário existente."}),confirmButton:{text:pe({en:"Confirm","en-GB":"Confirm",fr:"Confirmer",es:"Confirmar",de:"Bestätigen",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmar",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтвердить"}),label:pe({en:"Click to confirm","en-GB":"Click to confirm",fr:"Cliquez pour confirmer",es:"Haga clic para confirmar",de:"Klicken Sie, um zu bestätigen",ja:"確認するにはクリックしてください",ko:"확인을 클릭하세요",zh:"单击确认",it:"Fai clic per confermare",pt:"Clique para confirmar",hi:"पुष्टि करने के लिए क्लिक करें",ar:"انقر لتأكيد",ru:"Нажмите, чтобы подтвердить"})},cancelButton:{text:pe({en:"Cancel","en-GB":"Cancel",fr:"Annuler",es:"Cancelar",de:"Abbrechen",ja:"キャンセル",ko:"취소",zh:"取消",it:"Annulla",pt:"Cancelar",hi:"रद्द करें",ar:"إلغاء",ru:"Отмена"}),label:pe({en:"Click to cancel","en-GB":"Click to cancel",fr:"Cliquez pour annuler",es:"Haga clic para cancelar",de:"Klicken Sie, um abzubrechen",ja:"キャンセルするにはクリックしてください",ko:"취소를 클릭하세요",zh:"单击取消",it:"Fai clic per annullare",pt:"Clique para cancelar",hi:"रद्द करने के लिए क्लिक करें",ar:"انقر لإلغاء",ru:"Нажмите, чтобы отменить"})}}}},oO=({dictionary:e,mode:t,className:n,onDelete:r,...a})=>{var ee;const[o,l]=E.useState(!1),{setLocaleDictionary:u}=oh(),{deleteDictionary:d,isLoading:f}=p2(),{writeDictionary:m,isLoading:y}=_2(),{pushDictionaries:g,isLoading:v}=m2(),x=y||v,S=t.includes("local")&&((ee=e.filePath)==null?void 0:ee.endsWith(".json")),{editedContent:A,restoreEditedContent:w}=Tn(),{deleteButton:T,resetButton:R,saveButton:D,publishButton:N,downloadButton:L,confirmation:O}=nn(Q8),{isAuthenticated:M}=tu(),B=A==null?void 0:A[e.key],U=B&&JSON.stringify(B)!==JSON.stringify(e),ue=typeof(e==null?void 0:e._id)<"u",ie=async()=>{if(!(A!=null&&A[e.key]))return;const F={...e,...A==null?void 0:A[e.key]};await m(F).then(()=>{u(A==null?void 0:A[e.key]),w(e.key)})},fe=async()=>{if(!(A!=null&&A[e.key]))return;const F={...e,...A==null?void 0:A[e.key]};await g([F]).then(ne=>{ne&&(u(A==null?void 0:A[e.key]),w(e.key))})},Z=async()=>{e._id&&await d(e._id.toString()).then(F=>{F&&(r==null||r())})};return b.jsxs(b.Fragment,{children:[b.jsx(aO,{isOpen:o,title:O.title.value,size:"md",children:b.jsxs("form",{className:"size-full px-3",children:[S?b.jsx("p",{className:"text-neutral py-4 text-sm",children:O.message}):b.jsx("p",{className:"text-neutral py-4 text-sm",children:O.differentFormatMessage}),b.jsxs("div",{className:"mt-12 flex justify-end gap-2 max-md:flex-col",children:[b.jsx(Xe.Button,{label:O.cancelButton.label.value,disabled:!U||x,color:"text",className:"max-md:w-full",variant:"outline",onClick:()=>l(!1),children:O.cancelButton.text}),b.jsx(Xe.Button,{label:O.confirmButton.label.value,disabled:!U||x,Icon:bS,color:"text",className:"max-md:w-full",isLoading:v,onClick:ie,children:O.confirmButton.text})]})]})}),b.jsxs("form",{className:Ae("flex justify-end gap-2 max-md:flex-col",n),...a,children:[t.includes("remote")&&ue&&r&&M&&b.jsx(Xe.Button,{label:T.label.value,Icon:fh,color:"error",variant:"outline",className:"max-md:w-full",isLoading:f,onClick:Z,children:T.text}),U&&b.jsx(Xe.Button,{label:R.label.value,disabled:!U,Icon:FV,variant:"outline",color:"text",className:"max-md:w-full",onClick:()=>w(e.key),children:R.text}),t.includes("local")&&b.jsx(Xe.Button,{label:L.label.value,disabled:!U||x,Icon:NV,color:"text",variant:M?"outline":"default",className:"max-md:w-full",isLoading:y,onClick:()=>l(!0),children:L.text}),t.includes("remote")&&M&&!ue&&b.jsx(Xe.Button,{label:N.label.value,disabled:x,Icon:mV,color:"text",className:"max-md:w-full",isLoading:v,onClick:fe,children:N.text}),t.includes("remote")&&M&&ue&&U&&b.jsx(Xe.Button,{label:D.label.value,disabled:!U||x,Icon:bS,color:"text",className:"max-md:w-full",isLoading:v,onClick:fe,children:D.text})]})]})},lO=({level:e,title:t,description:n,children:r,rightParam:a,isSelected:o,...l})=>b.jsx("div",{className:Ae("rounded-md p-2 transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",e===2&&"hover:bg-card/30",e>=3&&"",o===!0&&"bg-card/40"),...l,children:b.jsx(K1,{isOpen:o,label:t,header:b.jsxs("div",{className:"flex w-full",children:[b.jsxs("div",{className:"flex w-full items-center justify-between",children:[b.jsx("span",{className:Ae(e===0&&"text-2xl",e===1&&"text-xl",e===2&&"text-lg",e>=3&&"text-base"),children:t}),a&&b.jsx("div",{className:"flex w-auto items-center justify-between p-3",children:a})]}),n&&b.jsx("p",{className:"text-card pl-3 text-sm",children:n})]}),children:r})}),cO=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:a,onFocusKeyPath:o,renderSection:l})=>{const u=r??Hr(n,e);if(u&&typeof u!="string")return b.jsx(b.Fragment,{children:"Error loading section - Edited content Incoherence with the original content format"});const d=e.length,f=String(u??t);return b.jsx("span",{role:"button",tabIndex:0,className:Ae("w-full rounded-md p-2 text-left transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",d===2&&"hover:bg-card/30",d>=3&&""),onClick:m=>{m.stopPropagation(),o(e)},children:typeof l=="function"?l(f):b.jsx(BC,{"aria-label":"Editable field",defaultValue:f,onSave:m=>a({keyPath:e,newValue:m}),onCancel:()=>null})})},J8=e=>{const{keyPath:t,section:n}=e,{addEditedContent:r}=Tn(),a=Hr(e.editedContent,t),o=n[K.File],{content:l}=n,u=[...t,{type:K.File}];return b.jsxs("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:[b.jsxs("span",{className:"text-neutral text-sm",children:[o," "]}),b.jsx(cO,{...e,keyPath:u,section:l,editedContentValue:a==null?void 0:a.content,onContentChange:d=>{console.log("lll",{subSection:o,file:{...n,content:d.newValue},keyPath:t,newKeyPath:u}),r(e.dictionary.key,{...n,content:d.newValue},t)}})]})},e9=e=>{const{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:a=[]}=e;return n.map((o,l)=>{const u={key:l,type:K.Array},d=[...t,u];return b.jsx(lO,{level:t.length,title:`${l}`,description:"",isSelected:Zc(d,a),onClick:f=>{f.stopPropagation(),r(d)},children:b.jsx(Ca,{...e,keyPath:d,section:o})},JSON.stringify(o))})},t9=e=>{const{keyPath:t,section:n}=e;return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!Xb.includes(r)).map(r=>{const a={type:K.Condition,key:r},o=[...t,a],l=n[K.Condition][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(Ca,{...e,key:r,keyPath:o,section:l})]})})})},n9=e=>{const{keyPath:t,section:n}=e;return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!Xb.includes(r)).map(r=>{const a={type:K.Enumeration,key:r},o=[...t,a],l=n[K.Enumeration][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(Ca,{...e,key:r,keyPath:o,section:l})]})})})},r9=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:K.Insertion}],a=n[K.Insertion];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(Ca,{...e,keyPath:r,section:a})})},i9=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:K.Markdown}],a=n[K.Markdown];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(Ca,{...e,keyPath:r,section:a})})},a9=e=>{const{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:a}=e;return Object.keys(n).filter(o=>!Xb.includes(o)).map(o=>{const l={key:o,type:K.Object},u=[...t,l];return b.jsx(lO,{level:t.length,title:o,description:"",isSelected:Zc(u,r),onClick:d=>{d.stopPropagation(),a(u)},children:b.jsx(Ca,{...e,keyPath:u,section:n[o]})},o)})},s9=e=>{const{keyPath:t,section:n,locale:r}=e,a={type:K.Translation,key:r},o=[...t,a],l=n.translation[r];return b.jsx(Ca,{...e,keyPath:o,section:l})},Xb=["filePath","id","nodeType"],Ca=e=>{const n=Hr(e.editedContent,e.keyPath)??e.section,r=Vo(n);if(typeof n=="object")return r===K.ReactNode?b.jsx("span",{className:"text-neutral text-xs",children:"React node not editable"}):r===K.Nested?b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:"[Nested] Dictionary"}):r===K.Markdown?b.jsx(i9,{...e,section:n}):r===K.Translation?b.jsx(s9,{...e,section:n}):r===K.Enumeration?b.jsx(n9,{...e,section:n}):r===K.Condition?b.jsx(t9,{...e,section:n}):r===K.Insertion?b.jsx(r9,{...e,section:n}):r===K.Array?b.jsx(e9,{...e,section:n}):r===K.File?b.jsx(J8,{...e,section:n}):b.jsx(a9,{...e,section:n});if(typeof n=="string")return b.jsx(cO,{...e,section:n})},o9=({dictionary:e,mode:t,onDelete:n,...r})=>{var m;const{editedContent:a,addEditedContent:o}=Tn(),{focusedContent:l,setFocusedContentKeyPath:u,setFocusedContent:d}=ba(),f=l==null?void 0:l.keyPath;return b.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2",children:[b.jsx("div",{children:E.createElement(Ca,{...r,keyPath:[],dictionary:e,key:JSON.stringify(((a==null?void 0:a[e.key])??e).content),editedContent:(m=a==null?void 0:a[e.key])==null?void 0:m.content,focusedKeyPath:f,section:e.content,onContentChange:y=>{o(e.key,y.newValue,y.keyPath)},onFocusKeyPath:u})}),b.jsx(oO,{dictionary:e,mode:t,className:"mb-4 flex-col",onDelete:()=>{d(null),n==null||n()}})]})};function Oi(e){return Array.isArray?Array.isArray(e):fO(e)==="[object Array]"}function l9(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function c9(e){return e==null?"":l9(e)}function Ur(e){return typeof e=="string"}function uO(e){return typeof e=="number"}function u9(e){return e===!0||e===!1||d9(e)&&fO(e)=="[object Boolean]"}function dO(e){return typeof e=="object"}function d9(e){return dO(e)&&e!==null}function Gn(e){return e!=null}function Gg(e){return!e.trim().length}function fO(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const f9="Incorrect 'index' type",h9=e=>`Invalid value for key ${e}`,m9=e=>`Pattern length exceeds max of ${e}.`,p9=e=>`Missing ${e} property in key`,g9=e=>`Property 'weight' in key '${e}' must be a positive integer`,Zw=Object.prototype.hasOwnProperty;class y9{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let a=hO(r);this._keys.push(a),this._keyMap[a.id]=a,n+=a.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function hO(e){let t=null,n=null,r=null,a=1,o=null;if(Ur(e)||Oi(e))r=e,t=Xw(e),n=rv(e);else{if(!Zw.call(e,"name"))throw new Error(p9("name"));const l=e.name;if(r=l,Zw.call(e,"weight")&&(a=e.weight,a<=0))throw new Error(g9(l));t=Xw(l),n=rv(l),o=e.getFn}return{path:t,id:n,weight:a,src:r,getFn:o}}function Xw(e){return Oi(e)?e:e.split(".")}function rv(e){return Oi(e)?e.join("."):e}function v9(e,t){let n=[],r=!1;const a=(o,l,u)=>{if(Gn(o))if(!l[u])n.push(o);else{let d=l[u];const f=o[d];if(!Gn(f))return;if(u===l.length-1&&(Ur(f)||uO(f)||u9(f)))n.push(c9(f));else if(Oi(f)){r=!0;for(let m=0,y=f.length;m<y;m+=1)a(f[m],l,u+1)}else l.length&&a(f,l,u+1)}};return a(e,Ur(t)?t.split("."):t,0),r?n:n[0]}const b9={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},_9={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},x9={location:0,threshold:.6,distance:100},E9={useExtendedSearch:!1,getFn:v9,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var He={..._9,...b9,...x9,...E9};const S9=/[^ ]+/g;function A9(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(a){const o=a.match(S9).length;if(n.has(o))return n.get(o);const l=1/Math.pow(o,.5*e),u=parseFloat(Math.round(l*r)/r);return n.set(o,u),u},clear(){n.clear()}}}class Qb{constructor({getFn:t=He.getFn,fieldNormWeight:n=He.fieldNormWeight}={}){this.norm=A9(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ur(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();Ur(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Gn(t)||Gg(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((a,o)=>{let l=a.getFn?a.getFn(t):this.getFn(t,a.path);if(Gn(l)){if(Oi(l)){let u=[];const d=[{nestedArrIndex:-1,value:l}];for(;d.length;){const{nestedArrIndex:f,value:m}=d.pop();if(Gn(m))if(Ur(m)&&!Gg(m)){let y={v:m,i:f,n:this.norm.get(m)};u.push(y)}else Oi(m)&&m.forEach((y,g)=>{d.push({nestedArrIndex:g,value:y})})}r.$[o]=u}else if(Ur(l)&&!Gg(l)){let u={v:l,n:this.norm.get(l)};r.$[o]=u}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function mO(e,t,{getFn:n=He.getFn,fieldNormWeight:r=He.fieldNormWeight}={}){const a=new Qb({getFn:n,fieldNormWeight:r});return a.setKeys(e.map(hO)),a.setSources(t),a.create(),a}function w9(e,{getFn:t=He.getFn,fieldNormWeight:n=He.fieldNormWeight}={}){const{keys:r,records:a}=e,o=new Qb({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(a),o}function Gd(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:a=He.distance,ignoreLocation:o=He.ignoreLocation}={}){const l=t/e.length;if(o)return l;const u=Math.abs(r-n);return a?l+u/a:u?1:l}function T9(e=[],t=He.minMatchCharLength){let n=[],r=-1,a=-1,o=0;for(let l=e.length;o<l;o+=1){let u=e[o];u&&r===-1?r=o:!u&&r!==-1&&(a=o-1,a-r+1>=t&&n.push([r,a]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}const ns=32;function C9(e,t,n,{location:r=He.location,distance:a=He.distance,threshold:o=He.threshold,findAllMatches:l=He.findAllMatches,minMatchCharLength:u=He.minMatchCharLength,includeMatches:d=He.includeMatches,ignoreLocation:f=He.ignoreLocation}={}){if(t.length>ns)throw new Error(m9(ns));const m=t.length,y=e.length,g=Math.max(0,Math.min(r,y));let v=o,x=g;const S=u>1||d,A=S?Array(y):[];let w;for(;(w=e.indexOf(t,x))>-1;){let O=Gd(t,{currentLocation:w,expectedLocation:g,distance:a,ignoreLocation:f});if(v=Math.min(O,v),x=w+m,S){let M=0;for(;M<m;)A[w+M]=1,M+=1}}x=-1;let T=[],R=1,D=m+y;const N=1<<m-1;for(let O=0;O<m;O+=1){let M=0,B=D;for(;M<B;)Gd(t,{errors:O,currentLocation:g+B,expectedLocation:g,distance:a,ignoreLocation:f})<=v?M=B:D=B,B=Math.floor((D-M)/2+M);D=B;let U=Math.max(1,g-B+1),ue=l?y:Math.min(g+B,y)+m,ie=Array(ue+2);ie[ue+1]=(1<<O)-1;for(let Z=ue;Z>=U;Z-=1){let ee=Z-1,F=n[e.charAt(ee)];if(S&&(A[ee]=+!!F),ie[Z]=(ie[Z+1]<<1|1)&F,O&&(ie[Z]|=(T[Z+1]|T[Z])<<1|1|T[Z+1]),ie[Z]&N&&(R=Gd(t,{errors:O,currentLocation:ee,expectedLocation:g,distance:a,ignoreLocation:f}),R<=v)){if(v=R,x=ee,x<=g)break;U=Math.max(1,2*g-x)}}if(Gd(t,{errors:O+1,currentLocation:g,expectedLocation:g,distance:a,ignoreLocation:f})>v)break;T=ie}const L={isMatch:x>=0,score:Math.max(.001,R)};if(S){const O=T9(A,u);O.length?d&&(L.indices=O):L.isMatch=!1}return L}function R9(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const a=e.charAt(n);t[a]=(t[a]||0)|1<<r-n-1}return t}const $f=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class pO{constructor(t,{location:n=He.location,threshold:r=He.threshold,distance:a=He.distance,includeMatches:o=He.includeMatches,findAllMatches:l=He.findAllMatches,minMatchCharLength:u=He.minMatchCharLength,isCaseSensitive:d=He.isCaseSensitive,ignoreDiacritics:f=He.ignoreDiacritics,ignoreLocation:m=He.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:a,includeMatches:o,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:f,ignoreLocation:m},t=d?t:t.toLowerCase(),t=f?$f(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const y=(v,x)=>{this.chunks.push({pattern:v,alphabet:R9(v),startIndex:x})},g=this.pattern.length;if(g>ns){let v=0;const x=g%ns,S=g-x;for(;v<S;)y(this.pattern.substr(v,ns),v),v+=ns;if(x){const A=g-ns;y(this.pattern.substr(A),A)}}else y(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a}=this.options;if(t=n?t:t.toLowerCase(),t=r?$f(t):t,this.pattern===t){let S={isMatch:!0,score:0};return a&&(S.indices=[[0,t.length-1]]),S}const{location:o,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:f,ignoreLocation:m}=this.options;let y=[],g=0,v=!1;this.chunks.forEach(({pattern:S,alphabet:A,startIndex:w})=>{const{isMatch:T,score:R,indices:D}=C9(t,S,A,{location:o+w,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:f,includeMatches:a,ignoreLocation:m});T&&(v=!0),g+=R,T&&D&&(y=[...y,...D])});let x={isMatch:v,score:v?g/this.chunks.length:1};return v&&a&&(x.indices=y),x}}class Ra{constructor(t){this.pattern=t}static isMultiMatch(t){return Qw(t,this.multiRegex)}static isSingleMatch(t){return Qw(t,this.singleRegex)}search(){}}function Qw(e,t){const n=e.match(t);return n?n[1]:null}class N9 extends Ra{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class k9 extends Ra{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class O9 extends Ra{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class D9 extends Ra{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class I9 extends Ra{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class L9 extends Ra{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class gO extends Ra{constructor(t,{location:n=He.location,threshold:r=He.threshold,distance:a=He.distance,includeMatches:o=He.includeMatches,findAllMatches:l=He.findAllMatches,minMatchCharLength:u=He.minMatchCharLength,isCaseSensitive:d=He.isCaseSensitive,ignoreDiacritics:f=He.ignoreDiacritics,ignoreLocation:m=He.ignoreLocation}={}){super(t),this._bitapSearch=new pO(t,{location:n,threshold:r,distance:a,includeMatches:o,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:f,ignoreLocation:m})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class yO extends Ra{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const a=[],o=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+o,a.push([r,n-1]);const l=!!a.length;return{isMatch:l,score:l?0:1,indices:a}}}const iv=[N9,yO,O9,D9,L9,I9,k9,gO],Jw=iv.length,M9=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,j9="|";function P9(e,t={}){return e.split(j9).map(n=>{let r=n.trim().split(M9).filter(o=>o&&!!o.trim()),a=[];for(let o=0,l=r.length;o<l;o+=1){const u=r[o];let d=!1,f=-1;for(;!d&&++f<Jw;){const m=iv[f];let y=m.isMultiMatch(u);y&&(a.push(new m(y,t)),d=!0)}if(!d)for(f=-1;++f<Jw;){const m=iv[f];let y=m.isSingleMatch(u);if(y){a.push(new m(y,t));break}}}return a})}const V9=new Set([gO.type,yO.type]);class B9{constructor(t,{isCaseSensitive:n=He.isCaseSensitive,ignoreDiacritics:r=He.ignoreDiacritics,includeMatches:a=He.includeMatches,minMatchCharLength:o=He.minMatchCharLength,ignoreLocation:l=He.ignoreLocation,findAllMatches:u=He.findAllMatches,location:d=He.location,threshold:f=He.threshold,distance:m=He.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a,minMatchCharLength:o,findAllMatches:u,ignoreLocation:l,location:d,threshold:f,distance:m},t=n?t:t.toLowerCase(),t=r?$f(t):t,this.pattern=t,this.query=P9(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:a,ignoreDiacritics:o}=this.options;t=a?t:t.toLowerCase(),t=o?$f(t):t;let l=0,u=[],d=0;for(let f=0,m=n.length;f<m;f+=1){const y=n[f];u.length=0,l=0;for(let g=0,v=y.length;g<v;g+=1){const x=y[g],{isMatch:S,indices:A,score:w}=x.search(t);if(S){if(l+=1,d+=w,r){const T=x.constructor.type;V9.has(T)?u=[...u,...A]:u.push(A)}}else{d=0,l=0,u.length=0;break}}if(l){let g={isMatch:!0,score:d/l};return r&&(g.indices=u),g}}return{isMatch:!1,score:1}}}const av=[];function z9(...e){av.push(...e)}function sv(e,t){for(let n=0,r=av.length;n<r;n+=1){let a=av[n];if(a.condition(e,t))return new a(e,t)}return new pO(e,t)}const qf={AND:"$and",OR:"$or"},ov={PATH:"$path",PATTERN:"$val"},lv=e=>!!(e[qf.AND]||e[qf.OR]),U9=e=>!!e[ov.PATH],H9=e=>!Oi(e)&&dO(e)&&!lv(e),eT=e=>({[qf.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function vO(e,t,{auto:n=!0}={}){const r=a=>{let o=Object.keys(a);const l=U9(a);if(!l&&o.length>1&&!lv(a))return r(eT(a));if(H9(a)){const d=l?a[ov.PATH]:o[0],f=l?a[ov.PATTERN]:a[d];if(!Ur(f))throw new Error(h9(d));const m={keyId:rv(d),pattern:f};return n&&(m.searcher=sv(f,t)),m}let u={children:[],operator:o[0]};return o.forEach(d=>{const f=a[d];Oi(f)&&f.forEach(m=>{u.children.push(r(m))})}),u};return lv(e)||(e=eT(e)),r(e)}function F9(e,{ignoreFieldNorm:t=He.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:a,norm:o,score:l})=>{const u=a?a.weight:null;r*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(t?1:o))}),n.score=r})}function G9(e,t){const n=e.matches;t.matches=[],Gn(n)&&n.forEach(r=>{if(!Gn(r.indices)||!r.indices.length)return;const{indices:a,value:o}=r;let l={indices:a,value:o};r.key&&(l.key=r.key.src),r.idx>-1&&(l.refIndex=r.idx),t.matches.push(l)})}function $9(e,t){t.score=e.score}function q9(e,t,{includeMatches:n=He.includeMatches,includeScore:r=He.includeScore}={}){const a=[];return n&&a.push(G9),r&&a.push($9),e.map(o=>{const{idx:l}=o,u={item:t[l],refIndex:l};return a.length&&a.forEach(d=>{d(o,u)}),u})}class Qo{constructor(t,n={},r){this.options={...He,...n},this.options.useExtendedSearch,this._keyStore=new y9(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Qb))throw new Error(f9);this._myIndex=n||mO(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Gn(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,a=this._docs.length;r<a;r+=1){const o=this._docs[r];t(o,r)&&(this.removeAt(r),r-=1,a-=1,n.push(o))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:r,includeScore:a,shouldSort:o,sortFn:l,ignoreFieldNorm:u}=this.options;let d=Ur(t)?Ur(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return F9(d,{ignoreFieldNorm:u}),o&&d.sort(l),uO(n)&&n>-1&&(d=d.slice(0,n)),q9(d,this._docs,{includeMatches:r,includeScore:a})}_searchStringList(t){const n=sv(t,this.options),{records:r}=this._myIndex,a=[];return r.forEach(({v:o,i:l,n:u})=>{if(!Gn(o))return;const{isMatch:d,score:f,indices:m}=n.searchIn(o);d&&a.push({item:o,idx:l,matches:[{score:f,value:o,norm:u,indices:m}]})}),a}_searchLogical(t){const n=vO(t,this.options),r=(u,d,f)=>{if(!u.children){const{keyId:y,searcher:g}=u,v=this._findMatches({key:this._keyStore.get(y),value:this._myIndex.getValueForItemAtKeyId(d,y),searcher:g});return v&&v.length?[{idx:f,item:d,matches:v}]:[]}const m=[];for(let y=0,g=u.children.length;y<g;y+=1){const v=u.children[y],x=r(v,d,f);if(x.length)m.push(...x);else if(u.operator===qf.AND)return[]}return m},a=this._myIndex.records,o={},l=[];return a.forEach(({$:u,i:d})=>{if(Gn(u)){let f=r(n,u,d);f.length&&(o[d]||(o[d]={idx:d,item:u,matches:[]},l.push(o[d])),f.forEach(({matches:m})=>{o[d].matches.push(...m)}))}}),l}_searchObjectList(t){const n=sv(t,this.options),{keys:r,records:a}=this._myIndex,o=[];return a.forEach(({$:l,i:u})=>{if(!Gn(l))return;let d=[];r.forEach((f,m)=>{d.push(...this._findMatches({key:f,value:l[m],searcher:n}))}),d.length&&o.push({idx:u,item:l,matches:d})}),o}_findMatches({key:t,value:n,searcher:r}){if(!Gn(n))return[];let a=[];if(Oi(n))n.forEach(({v:o,i:l,n:u})=>{if(!Gn(o))return;const{isMatch:d,score:f,indices:m}=r.searchIn(o);d&&a.push({score:f,key:t,value:o,idx:l,norm:u,indices:m})});else{const{v:o,n:l}=n,{isMatch:u,score:d,indices:f}=r.searchIn(o);u&&a.push({score:d,key:t,value:o,norm:l,indices:f})}return a}}Qo.version="7.1.0";Qo.createIndex=mO;Qo.parseIndex=w9;Qo.config=He;Qo.parseQuery=vO;z9(B9);const K9=e=>{switch(e){case"sm":return 640;case"md":return 768;case"lg":return 1024;case"xl":return 1280;case"2xl":return 1536;default:return e}},W9=()=>{var t;if(typeof window>"u")return;const e=(t=window.navigator)==null?void 0:t.userAgent;if(!(typeof e>"u"))return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},Y9=()=>{var r;if(typeof window>"u")return;const e=(r=window.navigator)==null?void 0:r.userAgent,t=/Safari\/\d/i.test(e)&&!/Chrome|CriOS|FxiOS|Edg|OPR/i.test(e),n=/Macintosh|iP(?:hone|ad|od)/.test(e);return t&&n},Z9=e=>{if(!(typeof window>"u"))return((window==null?void 0:window.innerWidth)??0)<=e},tT=(e="md")=>{const t=K9(e),n=W9(),r=Z9(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n}},X9=(e="md")=>{const[t,n]=E.useState(tT(e));return E.useEffect(()=>{const r=()=>{n(tT(e))};return window.addEventListener("resize",r,{passive:!0}),()=>window.removeEventListener("resize",r)},[e]),t},wc=({children:e,className:t,identifier:n,...r})=>b.jsx("div",{className:Ae("group/dropdown relative flex",t),"aria-label":`DropDown ${n}`,id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),Q9=({children:e,identifier:t,className:n,...r})=>b.jsx("button",{className:Ae("w-full cursor-pointer",n),"aria-label":`Open panel ${t}`,onClick:a=>{Y9()&&a.currentTarget.focus({preventScroll:!0})},onBlur:a=>a.currentTarget.blur(),...r,children:e}),J9=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:a="start",identifier:o,className:l,...u})=>b.jsx("div",{className:Ae("absolute top-[calc(100%+0.5rem)] z-[1000] min-w-full",a==="start"&&"left-0",a==="end"&&"right-0",l),"aria-hidden":t,role:"region","aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,children:b.jsx(q1,{isHidden:t,className:Ae("overflow-x-visible",t!==!1?"invisible":"visible",n&&"group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]",r&&"group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]"),...u,children:e})});wc.Trigger=Q9;wc.Panel=J9;const e7={key:"locale-switcher-content",content:{localeSwitcherLabel:pe({en:"Language switcher","en-GB":"Language switcher",fr:"Changer de langue",es:"Cambiar idioma",de:"Sprachwechsler",ja:"言語スイッチャー",ko:"언어 스위치",zh:"语言切换器",it:"Cambia lingua",pt:"Mudar idioma",hi:"भाषा स्विचर",ar:"مبدل اللغة",ru:"Переключатель языка"}),languageListLabel:pe({en:"Language list","en-GB":"Language list",fr:"Liste des langues",es:"Lista de idiomas",de:"Sprachliste",ja:"言語リスト",ko:"언어 목록",zh:"语言列表",it:"Elenco lingue",pt:"Lista de idiomas",hi:"भाषा सूची",ar:"قائمة اللغات",ru:"Список языков"}),switchTo:pe({en:"Switch to",fr:"Passer à",es:"Cambiar a","en-GB":"Switch to",de:"Wechseln Sie zu",ja:"に切り替える",ko:"전환",zh:"切换到",it:"Passa a",pt:"Mudar para",hi:"स्विच करें",ar:"التبديل إلى",ru:"Переключиться на"}),searchInput:{text:pe({en:"Search Locale","en-GB":"Search Locale",fr:"Rechercher la locale",es:"Buscar idioma",de:"Sprache durchsuchen",ja:"ロケールを検索",ko:"언어 검색",zh:"搜索语言",it:"Cerca lingua",pt:"Pesquisar idioma",hi:"भाषा खोजें",ar:"بحث اللغة",ru:"Поиск языка"}),placeholder:pe({en:"Search a locale","en-GB":"Search a locale",fr:"Rechercher une locale",es:"Buscar un idioma",de:"Sprache suchen",ja:"ロケールを検索",ko:"언어 검색",zh:"搜索语言",it:"Cerca una lingua",pt:"Pesquisar um idioma",hi:"भाषा खोजें",ar:"بحث اللغة",ru:"Поиск языка"}),ariaLabel:pe({en:"Language search","en-GB":"Language search",fr:"Recherche de langue",es:"Búsqueda de idioma",de:"Sprachsuche",ja:"言語検索",ko:"언어 검색",zh:"语言搜索",it:"Ricerca lingua",pt:"Pesquisa de idioma",hi:"भाषा खोजें",ar:"بحث اللغة",ru:"Поиск языка"})},seeAllLocalesSwitch:{true:pe({en:"See all locales","en-GB":"See all locales",fr:"Voir toutes les langues",es:"Ver todos los idiomas",de:"Alle Sprachen anzeigen",ja:"すべての言語を表示",ko:"모든 언어 보기",zh:"查看所有语言",it:"Vedi tutte le lingue",pt:"Ver todos os idiomas",hi:"सभी भाषाओं को देखें",ar:"عرض جميع اللغات",ru:"Показать все языки"}),false:pe({en:"See only selected locales","en-GB":"See only selected locales",fr:"Voir seulement les langues sélectionnées",es:"Ver solo los idiomas seleccionados",de:"Nur ausgewählte Sprachen anzeigen",ja:"選択された言語のみを表示",ko:"선택한 언어만 보기",zh:"仅查看选定的语言",it:"Vedi solo le lingue selezionate",pt:"Ver apenas os idiomas selecionados",hi:"केवल चुने गए भाषाओं को देखें",ar:"عرض اللغات المحددة فقط",ru:"Показать только выбранные языки"})}}},Tc=(e,t)=>{const[n,r]=E.useState(()=>{if(t!==void 0){const l=typeof t=="function"?t():t;if(typeof window>"u")return l;const u=localStorage==null?void 0:localStorage.getItem(e);if(u)try{return JSON.parse(u)}catch(d){console.error(d)}return l}});E.useEffect(()=>{const l=localStorage==null?void 0:localStorage.getItem(e);if(l&&n===void 0)try{r(JSON.parse(l))}catch(u){console.error(u)}else t!==void 0&&n===void 0&&r(t)},[e,n]);const a=E.useCallback(l=>{r(u=>{const d=typeof l=="function"?l(u):l;return localStorage==null||localStorage.setItem(e,JSON.stringify(d)),d})},[e,r]),o=E.useCallback(()=>{const l=localStorage==null?void 0:localStorage.getItem(e);l&&r(JSON.parse(l))},[e,r]);return E.useMemo(()=>[n,a,o],[n,a,o])},bO=E.createContext({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),_O=()=>E.useContext(bO),t7=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{const{locale:r}=Nv(),[a,o]=Tc("locale-content-selector-selected-locales",t??[r]);return b.jsx(bO,{value:{availableLocales:e,selectedLocales:a,setSelectedLocales:o},children:n})},$g="locale-switcher-content",n7=({panelProps:e,isMultilingual:t=!0})=>{const{switchTo:n,searchInput:r,localeSwitcherLabel:a,languageListLabel:o,seeAllLocalesSwitch:l}=nn(e7),u=E.useRef(null),{locale:d}=Nv(),{availableLocales:f,selectedLocales:m,setSelectedLocales:y}=_O(),g=E.useMemo(()=>f.map(N=>{const L=ef(N,V.ENGLISH),O=ef(N,d),M=ef(N);return{locale:N,englishName:L,currentLocaleName:O,ownLocaleName:M}}),[f,d]),[v,x]=E.useState(g),[S,A]=Tc("locale-content-selector-see-all-locales",!1),w=E.useMemo(()=>{const N={keys:[{name:"ownLocaleName",weight:.4},{name:"englishName",weight:.2},{name:"currentLocaleName",weight:.2},{name:"locale",weight:.2}],threshold:.02};return new Qo(g,N)},[g]),T=E.useCallback(N=>{if(N){const L=w.search(N).map(O=>O.item);x(L)}else x(g)},[w,g]),R=N=>{t?m.includes(N)?m.length>1&&y(L=>L.filter(O=>O!==N)):y(L=>[...L,N]):y([N])},D=N=>{A(N),y(N?f:[d])};return b.jsx("div",{className:"border-text text-text rounded-xl border transition-colors","aria-label":a.value,children:b.jsxs(wc,{identifier:$g,children:[b.jsx(wc.Trigger,{identifier:$g,children:b.jsxs("div",{className:"flex w-full items-center justify-between",children:[b.jsx("div",{className:"px-2 py-1",children:b.jsx(PV,{size:18})}),b.jsx(BV,{className:"self-center",size:18})]})}),b.jsx(wc.Panel,{identifier:$g,isOverable:!0,isFocusable:!0,className:"left-auto right-0",...e,children:b.jsxs(Jr,{className:"max-h-[80vh] min-w-28",separator:"y",role:"listbox",transparency:"sm",border:!0,roundedSize:"2xl",borderColor:"text","aria-label":o.value,children:[t&&b.jsx("div",{className:"m-auto p-2",children:b.jsx(cu,{defaultValue:!1,onChange:D,color:"text",size:"sm",className:"!w-60",choices:[{content:l.true.value,value:!0},{content:l.false.value,value:!1}]})}),!(t&&S)&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"p-3",children:b.jsx($o,{type:"search","aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:N=>T(N.target.value),ref:u})}),b.jsx("ol",{className:"divide-text/20 divide-y divide-dashed overflow-y-auto p-1",children:v.map(({locale:N,currentLocaleName:L,ownLocaleName:O})=>b.jsx("li",{className:"px-1.5 py-1",children:b.jsx(yt,{onClick:()=>R(N),label:`${n} ${L}`,disabled:!(f??f).includes(N),isActive:m.includes(N),variant:"hoverable",color:"text",isFullWidth:!0,textAlign:"left",size:"sm",children:b.jsxs("div",{className:"flex flex-row items-center justify-between gap-3 px-2 py-1",children:[t&&b.jsx("div",{className:"w-4",children:m.includes(N)&&b.jsx(Ho,{className:"size-full"})}),b.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1",children:[b.jsxs("div",{className:"flex flex-col text-nowrap",children:[b.jsx("span",{dir:HM(N),lang:N,children:O}),b.jsx("span",{className:"text-neutral text-xs",children:L})]}),b.jsx("span",{className:"text-neutral text-sm",children:N.toUpperCase()})]})]})})},N))})]})]})})]})})},r7=(e,t,n)=>{const r={...e};for(const a of Object.keys(e))a===t?(r[n]=e[t],delete r[t]):r[a]=e[a];return r},cv=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...o})=>{const[l,u]=E.useState(e),[d,f]=E.useState(0),m=l!==e,y=()=>{u(e),f(S=>S+1)},g=()=>{t(l)},v=S=>{u(S.currentTarget.value)};E.useEffect(()=>{u(e)},[e]);const x=(r==null?void 0:r(l))??!0;return b.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[b.jsx($o,{onChange:v,"aria-label":"value",variant:"invisible",className:"size-full",defaultValue:e,...o},d),(m||a)&&b.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[m&&b.jsxs(b.Fragment,{children:[b.jsx(yt,{Icon:Ho,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!x,onClick:g}),b.jsx(yt,{Icon:_s,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:y})]}),a]})]},String(e))},i7=(e,t)=>{const[n,r]=E.useState(e);return E.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>clearTimeout(a)},[e,t]),n},a7=({isActive:e=!0,suggestion:t,...n})=>{const r=String(n.value??n.defaultValue??""),{autocomplete:a}=b2(),o=Zr(),[l,u]=E.useState(!1),[d,f]=E.useState(r),[m,y]=E.useState(""),g=i7(d,200);E.useEffect(()=>{typeof n.value>"u"||f(r)},[n.value,n.defaultValue]),E.useEffect(()=>{if(!e||!l)return;const x=async()=>{var S;try{const A=await a({text:g,openAiApiKey:o.editor.openAiApiKey,model:o.editor.openAiApiModel,temperature:o.editor.openAiApiTemperature}),w=((S=A==null?void 0:A.data)==null?void 0:S.autocompletion)??"";if(w.startsWith(g)){const T=w.slice(g.length);return y(T)}return y(w)}catch(A){console.error("Autocomplete error:",A)}};g.length>3?(y(""),x()):y("")},[g,e]);const v=()=>{f(x=>x+m),y("")};return b.jsxs("div",{className:"relative w-full",children:[b.jsxs("div",{className:"pointer-events-none absolute inset-0 whitespace-pre-wrap break-words px-1 py-3 text-base leading-[1.45rem] md:py-1 md:text-sm md:leading-[1.23rem]","aria-hidden":"true",children:[b.jsx("span",{className:"align-text-top text-transparent",children:d}),(m||t)&&b.jsx("span",{className:"text-neutral ml-3 align-text-top",children:t??m})]}),b.jsx(Zv,{...n,value:d,onChange:x=>{var S;u(!0),f(x.target.value),(S=n.onChange)==null||S.call(n,x)},onKeyDown:x=>{var S;x.key==="Tab"&&m&&(x.preventDefault(),v()),(S=n.onKeyDown)==null||S.call(n,x)}})]})},s7=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...o})=>{const{isAuthenticated:l}=w2(),[u,d]=E.useState(e),[f,m]=E.useState(0),y=u!==e,g=()=>{d(e),m(A=>A+1)},v=()=>{t(u)},x=A=>d(A.currentTarget.value??"");E.useEffect(()=>{d(e)},[e]);const S=(r==null?void 0:r(u))??!0;return b.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[b.jsx(a7,{onChange:x,variant:"invisible",className:"size-full",defaultValue:e,isActive:l,...o},f),(y||a)&&b.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[y&&b.jsxs(b.Fragment,{children:[b.jsx(yt,{Icon:Ho,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!S,onClick:v}),b.jsx(yt,{Icon:_s,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:g})]}),a]})]},e)};function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rs.apply(this,arguments)}const o7=["children","options"],ze={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};var nT;(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(nT||(nT={}));const rT=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),iT={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},l7=["style","script"],c7=["src","href","data","formAction","srcDoc","action"],u7=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,d7=/mailto:/i,f7=/\n{2,}$/,xO=/^(\s*>[\s\S]*?)(?=\n\n|$)/,h7=/^ *> ?/gm,m7=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,p7=/^ {2,}\n/,g7=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,EO=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,SO=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,y7=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,v7=/^(?:\n *)*\n/,b7=/\r\n?/g,_7=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,x7=/^\[\^([^\]]+)]/,E7=/\f/g,S7=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,A7=/^\s*?\[(x|\s)\]/,AO=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,wO=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,TO=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,uv=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,w7=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,CO=/^<!--[\s\S]*?(?:-->)/,T7=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,dv=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,C7=/^\{.*\}$/,R7=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,N7=/^<([^ >]+@[^ >]+)>/,k7=/^<([^ >]+:\/[^ >]+)>/,O7=/-([a-z])?/gi,RO=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,D7=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,I7=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,L7=/^\[([^\]]*)\] ?\[([^\]]*)\]/,M7=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,j7=/\t/g,P7=/(^ *\||\| *$)/g,V7=/^ *:-+: *$/,B7=/^ *:-+ *$/,z7=/^ *-+: *$/,Ih="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",U7=new RegExp(`^([*_])\\1${Ih}\\1\\1(?!\\1)`),H7=new RegExp(`^([*_])${Ih}\\1(?!\\1)`),F7=new RegExp(`^(==)${Ih}\\1`),G7=new RegExp(`^(~~)${Ih}\\1`),$7=/^\\([^0-9A-Za-z\s])/,aT=/\\([^0-9A-Za-z\s])/g,q7=/^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/,K7=/^\n+/,W7=/^([ \t]*)/,Y7=/\\([^\\])/g,Z7=/(?:^|\n)( *)$/,Jb="(?:\\d+\\.)",e_="(?:[*+-])";function NO(e){return"( *)("+(e===1?Jb:e_)+") +"}const kO=NO(1),OO=NO(2);function DO(e){return new RegExp("^"+(e===1?kO:OO))}const X7=DO(1),Q7=DO(2);function IO(e){return new RegExp("^"+(e===1?kO:OO)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Jb:e_)+" )[^\\n]*)*(\\n|$)","gm")}const J7=IO(1),eq=IO(2);function LO(e){const t=e===1?Jb:e_;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const MO=LO(1),jO=LO(2);function sT(e,t){const n=t===1,r=n?MO:jO,a=n?J7:eq,o=n?X7:Q7;return{match:jo(function(l,u){const d=Z7.exec(u.prevCapture);return d&&(u.list||!u.inline&&!u.simple)?r.exec(l=d[1]+l):null}),order:1,parse(l,u,d){const f=n?+l[2]:void 0,m=l[0].replace(f7,`
254
+ `).match(a);let y=!1;return{items:m.map(function(g,v){const x=o.exec(g)[0].length,S=new RegExp("^ {1,"+x+"}","gm"),A=g.replace(S,"").replace(o,""),w=v===m.length-1,T=A.indexOf(`
255
+
256
+ `)!==-1||w&&y;y=T;const R=d.inline,D=d.list;let N;d.list=!0,T?(d.inline=!1,N=Hc(A)+`
257
+
258
+ `):(d.inline=!0,N=Hc(A));const L=u(N,d);return d.inline=R,d.list=D,L}),ordered:n,start:f}},render:(l,u,d)=>e(l.ordered?"ol":"ul",{key:d.key,start:l.type===ze.orderedList?l.start:void 0},l.items.map(function(f,m){return e("li",{key:m},u(f,d))}))}}const tq=new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),nq=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,PO=[xO,EO,SO,AO,TO,wO,RO,MO,jO],rq=[...PO,/^[^\n]+(?: \n|\n{2,})/,uv,CO,dv];function Hc(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function oc(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function iq(e){return z7.test(e)?"right":V7.test(e)?"center":B7.test(e)?"left":null}function oT(e,t,n,r){const a=n.inTable;n.inTable=!0;let o=[[]],l="";function u(){if(!l)return;const d=o[o.length-1];d.push.apply(d,t(l,n)),l=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,f,m)=>{d.trim()==="|"&&(u(),r)?f!==0&&f!==m.length-1&&o.push([]):l+=d}),u(),n.inTable=a,o}function aq(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(P7,"").split("|").map(iq):[],a=e[3]?function(l,u,d){return l.trim().split(`
259
+ `).map(function(f){return oT(f,u,d,!0)})}(e[3],t,n):[],o=oT(e[1],t,n,!!a.length);return n.inline=!1,a.length?{align:r,cells:a,header:o,type:ze.table}:{children:o,type:ze.paragraph}}function lT(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function jo(e){return e.inline=1,e}function ra(e){return jo(function(t,n){return n.inline?e.exec(t):null})}function ia(e){return jo(function(t,n){return n.inline||n.simple?e.exec(t):null})}function xi(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function lc(e){return jo(function(t){return e.exec(t)})}function sq(e,t){if(t.inline||t.simple)return null;let n="";e.split(`
260
+ `).every(a=>(a+=`
261
+ `,!PO.some(o=>o.test(a))&&(n+=a,!!a.trim())));const r=Hc(n);return r==""?null:[n,,r]}const oq=/(javascript|vbscript|data(?!:image)):/i;function lq(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(oq.test(t))return null}catch{return null}return e}function cT(e){return e.replace(Y7,"$1")}function mf(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!0,n.simple=!0;const o=e(t,n);return n.inline=r,n.simple=a,o}function cq(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!1,n.simple=!0;const o=e(t,n);return n.inline=r,n.simple=a,o}function uq(e,t,n){const r=n.inline||!1;n.inline=!1;const a=e(t,n);return n.inline=r,a}const qg=(e,t,n)=>({children:mf(t,e[2],n)});function Kg(){return{}}function Wg(){return null}function dq(...e){return e.filter(Boolean).join(" ")}function Yg(e,t,n){let r=e;const a=t.split(".");for(;a.length&&(r=r[a[0]],r!==void 0);)a.shift();return r||n}function fq(e="",t={}){function n(g,v,...x){const S=Yg(t.overrides,`${g}.props`,{});return t.createElement(function(A,w){const T=Yg(w,A);return T?typeof T=="function"||typeof T=="object"&&"render"in T?T:Yg(w,`${A}.component`,A):A}(g,t.overrides),rs({},v,S,{className:dq(v==null?void 0:v.className,S.className)||void 0}),...x)}function r(g){g=g.replace(S7,"");let v=!1;t.forceInline?v=!0:t.forceBlock||(v=M7.test(g)===!1);const x=f(d(v?g:`${Hc(g).replace(K7,"")}
262
+
263
+ `,{inline:v}));for(;typeof x[x.length-1]=="string"&&!x[x.length-1].trim();)x.pop();if(t.wrapper===null)return x;const S=t.wrapper||(v?"span":"div");let A;if(x.length>1||t.forceWrapper)A=x;else{if(x.length===1)return A=x[0],typeof A=="string"?n("span",{key:"outer"},A):A;A=null}return t.createElement(S,{key:"outer"},A)}function a(g,v){const x=v.match(u7);return x?x.reduce(function(S,A){const w=A.indexOf("=");if(w!==-1){const T=function(L){return L.indexOf("-")!==-1&&L.match(T7)===null&&(L=L.replace(O7,function(O,M){return M.toUpperCase()})),L}(A.slice(0,w)).trim(),R=function(L){const O=L[0];return(O==='"'||O==="'")&&L.length>=2&&L[L.length-1]===O?L.slice(1,-1):L}(A.slice(w+1).trim()),D=rT[T]||T;if(D==="ref")return S;const N=S[D]=function(L,O,M,B){return O==="style"?function(U){const ue=[];let ie="",fe=!1,Z=!1,ee="";if(!U)return ue;for(let ne=0;ne<U.length;ne++){const q=U[ne];if(q!=='"'&&q!=="'"||fe||(Z?q===ee&&(Z=!1,ee=""):(Z=!0,ee=q)),q==="("&&ie.endsWith("url")?fe=!0:q===")"&&fe&&(fe=!1),q!==";"||Z||fe)ie+=q;else{const ge=ie.trim();if(ge){const P=ge.indexOf(":");if(P>0){const X=ge.slice(0,P).trim(),H=ge.slice(P+1).trim();ue.push([X,H])}}ie=""}}const F=ie.trim();if(F){const ne=F.indexOf(":");if(ne>0){const q=F.slice(0,ne).trim(),ge=F.slice(ne+1).trim();ue.push([q,ge])}}return ue}(M).reduce(function(U,[ue,ie]){return U[ue.replace(/(-[a-z])/g,fe=>fe[1].toUpperCase())]=B(ie,L,ue),U},{}):c7.indexOf(O)!==-1?B(M,L,O):(M.match(C7)&&(M=M.slice(1,M.length-1)),M==="true"||M!=="false"&&M)}(g,T,R,t.sanitizer);typeof N=="string"&&(uv.test(N)||dv.test(N))&&(S[D]=r(N.trim()))}else A!=="style"&&(S[rT[A]||A]=!0);return S},{}):null}t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||lq,t.slugify=t.slugify||oc,t.namedCodesToUnicode=t.namedCodesToUnicode?rs({},iT,t.namedCodesToUnicode):iT,t.createElement=t.createElement||E.createElement;const o=[],l={},u={[ze.blockQuote]:{match:xi(xO),order:1,parse(g,v,x){const[,S,A]=g[0].replace(h7,"").match(m7);return{alert:S,children:v(A,x)}},render(g,v,x){const S={key:x.key};return g.alert&&(S.className="markdown-alert-"+t.slugify(g.alert.toLowerCase(),oc),g.children.unshift({attrs:{},children:[{type:ze.text,text:g.alert}],noInnerParse:!0,type:ze.htmlBlock,tag:"header"})),n("blockquote",S,v(g.children,x))}},[ze.breakLine]:{match:lc(p7),order:1,parse:Kg,render:(g,v,x)=>n("br",{key:x.key})},[ze.breakThematic]:{match:xi(g7),order:1,parse:Kg,render:(g,v,x)=>n("hr",{key:x.key})},[ze.codeBlock]:{match:xi(SO),order:0,parse:g=>({lang:void 0,text:Hc(g[0].replace(/^ {4}/gm,"")).replace(aT,"$1")}),render:(g,v,x)=>n("pre",{key:x.key},n("code",rs({},g.attrs,{className:g.lang?`lang-${g.lang}`:""}),g.text))},[ze.codeFenced]:{match:xi(EO),order:0,parse:g=>({attrs:a("code",g[3]||""),lang:g[2]||void 0,text:g[4],type:ze.codeBlock})},[ze.codeInline]:{match:ia(y7),order:3,parse:g=>({text:g[2].replace(aT,"$1")}),render:(g,v,x)=>n("code",{key:x.key},g.text)},[ze.footnote]:{match:xi(_7),order:0,parse:g=>(o.push({footnote:g[2],identifier:g[1]}),{}),render:Wg},[ze.footnoteReference]:{match:ra(x7),order:1,parse:g=>({target:`#${t.slugify(g[1],oc)}`,text:g[1]}),render:(g,v,x)=>n("a",{key:x.key,href:t.sanitizer(g.target,"a","href")},n("sup",{key:x.key},g.text))},[ze.gfmTask]:{match:ra(A7),order:1,parse:g=>({completed:g[1].toLowerCase()==="x"}),render:(g,v,x)=>n("input",{checked:g.completed,key:x.key,readOnly:!0,type:"checkbox"})},[ze.heading]:{match:xi(t.enforceAtxHeadings?wO:AO),order:1,parse:(g,v,x)=>({children:mf(v,g[2],x),id:t.slugify(g[2],oc),level:g[1].length}),render:(g,v,x)=>n(`h${g.level}`,{id:g.id,key:x.key},v(g.children,x))},[ze.headingSetext]:{match:xi(TO),order:0,parse:(g,v,x)=>({children:mf(v,g[1],x),level:g[2]==="="?1:2,type:ze.heading})},[ze.htmlBlock]:{match:lc(uv),order:1,parse(g,v,x){const[,S]=g[3].match(W7),A=new RegExp(`^${S}`,"gm"),w=g[3].replace(A,""),T=(R=w,rq.some(M=>M.test(R))?uq:mf);var R;const D=g[1].toLowerCase(),N=l7.indexOf(D)!==-1,L=(N?D:g[1]).trim(),O={attrs:a(L,g[2]),noInnerParse:N,tag:L};return x.inAnchor=x.inAnchor||D==="a",N?O.text=g[3]:O.children=T(v,w,x),x.inAnchor=!1,O},render:(g,v,x)=>n(g.tag,rs({key:x.key},g.attrs),g.text||(g.children?v(g.children,x):""))},[ze.htmlSelfClosing]:{match:lc(dv),order:1,parse(g){const v=g[1].trim();return{attrs:a(v,g[2]||""),tag:v}},render:(g,v,x)=>n(g.tag,rs({},g.attrs,{key:x.key}))},[ze.htmlComment]:{match:lc(CO),order:1,parse:()=>({}),render:Wg},[ze.image]:{match:ia(nq),order:1,parse:g=>({alt:g[1],target:cT(g[2]),title:g[3]}),render:(g,v,x)=>n("img",{key:x.key,alt:g.alt||void 0,title:g.title||void 0,src:t.sanitizer(g.target,"img","src")})},[ze.link]:{match:ra(tq),order:3,parse:(g,v,x)=>({children:cq(v,g[1],x),target:cT(g[2]),title:g[3]}),render:(g,v,x)=>n("a",{key:x.key,href:t.sanitizer(g.target,"a","href"),title:g.title},v(g.children,x))},[ze.linkAngleBraceStyleDetector]:{match:ra(k7),order:0,parse:g=>({children:[{text:g[1],type:ze.text}],target:g[1],type:ze.link})},[ze.linkBareUrlDetector]:{match:jo((g,v)=>v.inAnchor||t.disableAutoLink?null:ra(R7)(g,v)),order:0,parse:g=>({children:[{text:g[1],type:ze.text}],target:g[1],title:void 0,type:ze.link})},[ze.linkMailtoDetector]:{match:ra(N7),order:0,parse(g){let v=g[1],x=g[1];return d7.test(x)||(x="mailto:"+x),{children:[{text:v.replace("mailto:",""),type:ze.text}],target:x,type:ze.link}}},[ze.orderedList]:sT(n,1),[ze.unorderedList]:sT(n,2),[ze.newlineCoalescer]:{match:xi(v7),order:3,parse:Kg,render:()=>`
264
+ `},[ze.paragraph]:{match:jo(sq),order:3,parse:qg,render:(g,v,x)=>n("p",{key:x.key},v(g.children,x))},[ze.ref]:{match:ra(D7),order:0,parse:g=>(l[g[1]]={target:g[2],title:g[4]},{}),render:Wg},[ze.refImage]:{match:ia(I7),order:0,parse:g=>({alt:g[1]||void 0,ref:g[2]}),render:(g,v,x)=>l[g.ref]?n("img",{key:x.key,alt:g.alt,src:t.sanitizer(l[g.ref].target,"img","src"),title:l[g.ref].title}):null},[ze.refLink]:{match:ra(L7),order:0,parse:(g,v,x)=>({children:v(g[1],x),fallbackChildren:g[0],ref:g[2]}),render:(g,v,x)=>l[g.ref]?n("a",{key:x.key,href:t.sanitizer(l[g.ref].target,"a","href"),title:l[g.ref].title},v(g.children,x)):n("span",{key:x.key},g.fallbackChildren)},[ze.table]:{match:xi(RO),order:1,parse:aq,render(g,v,x){const S=g;return n("table",{key:x.key},n("thead",null,n("tr",null,S.header.map(function(A,w){return n("th",{key:w,style:lT(S,w)},v(A,x))}))),n("tbody",null,S.cells.map(function(A,w){return n("tr",{key:w},A.map(function(T,R){return n("td",{key:R,style:lT(S,R)},v(T,x))}))})))}},[ze.text]:{match:lc(q7),order:4,parse:g=>({text:g[0].replace(w7,(v,x)=>t.namedCodesToUnicode[x]?t.namedCodesToUnicode[x]:v)}),render:g=>g.text},[ze.textBolded]:{match:ia(U7),order:2,parse:(g,v,x)=>({children:v(g[2],x)}),render:(g,v,x)=>n("strong",{key:x.key},v(g.children,x))},[ze.textEmphasized]:{match:ia(H7),order:3,parse:(g,v,x)=>({children:v(g[2],x)}),render:(g,v,x)=>n("em",{key:x.key},v(g.children,x))},[ze.textEscaped]:{match:ia($7),order:1,parse:g=>({text:g[1],type:ze.text})},[ze.textMarked]:{match:ia(F7),order:3,parse:qg,render:(g,v,x)=>n("mark",{key:x.key},v(g.children,x))},[ze.textStrikethroughed]:{match:ia(G7),order:3,parse:qg,render:(g,v,x)=>n("del",{key:x.key},v(g.children,x))}};t.disableParsingRawHTML===!0&&(delete u[ze.htmlBlock],delete u[ze.htmlSelfClosing]);const d=function(g){let v=Object.keys(g);function x(S,A){let w,T,R=[],D="",N="";for(A.prevCapture=A.prevCapture||"";S;){let L=0;for(;L<v.length;){if(D=v[L],w=g[D],A.inline&&!w.match.inline){L++;continue}const O=w.match(S,A);if(O){N=O[0],A.prevCapture+=N,S=S.substring(N.length),T=w.parse(O,x,A),T.type==null&&(T.type=D),R.push(T);break}L++}}return A.prevCapture="",R}return v.sort(function(S,A){let w=g[S].order,T=g[A].order;return w!==T?w-T:S<A?-1:1}),function(S,A){return x(function(w){return w.replace(b7,`
265
+ `).replace(E7,"").replace(j7," ")}(S),A)}}(u),f=(m=function(g,v){return function(x,S,A){const w=g[x.type].render;return v?v(()=>w(x,S,A),x,S,A):w(x,S,A)}}(u,t.renderRule),function g(v,x={}){if(Array.isArray(v)){const S=x.key,A=[];let w=!1;for(let T=0;T<v.length;T++){x.key=T;const R=g(v[T],x),D=typeof R=="string";D&&w?A[A.length-1]+=R:R!==null&&A.push(R),w=D}return x.key=S,A}return m(v,g,x)});var m;const y=r(e);return o.length?n("div",null,y,n("footer",{key:"footer"},o.map(function(g){return n("div",{id:t.slugify(g.identifier,oc),key:g.identifier},g.identifier,f(d(g.footnote,{inline:!0})))}))):y}const hq=e=>{let{children:t="",options:n}=e,r=function(a,o){if(a==null)return{};var l,u,d={},f=Object.keys(a);for(u=0;u<f.length;u++)o.indexOf(l=f[u])>=0||(d[l]=a[l]);return d}(e,o7);return E.cloneElement(fq(t,n),r)},mq=e=>{var a;const t=document.getElementById(e),r=(((a=t==null?void 0:t.getBoundingClientRect())==null?void 0:a.top)??0)+window.scrollY-150;window.scrollTo({top:r,behavior:"smooth"})},pq=()=>{const[e,t]=E.useState(),n=()=>{t(window.location.hash.slice(1))};return E.useEffect(()=>(t(window.location.hash.slice(1)),window.addEventListener("hashchange",n,{passive:!0}),()=>window.removeEventListener("hashchange",n)),[]),E.useEffect(()=>{e&&mq(e)},[e]),null},gq=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function yq(e,t,n){const r=[];for(const a of e){if(n==="v3"){const u=a.children.flatMap((d,f)=>{if(d.type!=="element")return d;const m=d.children[0];if(m.type!=="text")return d;const y=f===a.children.length-1;if(!dT(m.value,y))return d;const v=m.value.split(/(\s+\/\/)/);if(v.length<=1)return d;let x=[v[0]];for(let S=1;S<v.length;S+=2)x.push(v[S]+(v[S+1]||""));return x=x.filter(Boolean),x.length<=1?d:x.map(S=>({...d,children:[{type:"text",value:S}]}))});u.length!==a.children.length&&(a.children=u)}const o=a.children;let l=o.length-1;n==="v1"?l=0:t&&(l=o.length-2);for(let u=Math.max(l,0);u<o.length;u++){const d=o[u];if(d.type!=="element")continue;const f=d.children.at(0);if((f==null?void 0:f.type)!=="text")continue;const m=u===o.length-1,y=dT(f.value,m);if(y)if(t&&!m&&u!==0){const g=uT(o[u-1],"{")&&uT(o[u+1],"}");r.push({info:y,line:a,token:d,isLineCommentOnly:o.length===3&&d.children.length===1,isJsxStyle:g})}else r.push({info:y,line:a,token:d,isLineCommentOnly:o.length===1&&d.children.length===1,isJsxStyle:!1})}}return r}function uT(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function dT(e,t){let n=e.trimStart();const r=e.length-n.length;n=n.trimEnd();const a=e.length-n.length-r;for(const[o,l]of gq){if(l&&!t)continue;const u=o.exec(n);if(u)return[" ".repeat(r)+u[1],u[2],u[3]?u[3]+" ".repeat(a):void 0]}}function vq(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function VO(e,t,n,r){return r==null&&(r="v3"),{name:e,code(a){const o=a.children.filter(f=>f.type==="element"),l=[];a.data??(a.data={});const u=a.data;u._shiki_notation??(u._shiki_notation=yq(o,["jsx","tsx"].includes(this.options.lang),r));const d=u._shiki_notation;for(const f of d){if(f.info[1].length===0)continue;let m=o.indexOf(f.line);f.isLineCommentOnly&&r!=="v1"&&m++;let y=!1;if(f.info[1]=f.info[1].replace(t,(...v)=>n.call(this,v,f.line,f.token,o,m)?(y=!0,""):v[0]),!y)continue;r==="v1"&&(f.info[1]=vq(f.info[1]));const g=f.info[1].trim().length===0;if(g&&(f.info[1]=""),g&&f.isLineCommentOnly)l.push(f.line);else if(g&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(g)f.line.children.splice(f.line.children.indexOf(f.token),1);else{const v=f.token.children[0];v.type==="text"&&(v.value=f.info.join(""))}}for(const f of l){const m=a.children.indexOf(f),y=a.children[m+1];let g=1;(y==null?void 0:y.type)==="text"&&(y==null?void 0:y.value)===`
266
+ `&&(g=2),a.children.splice(m,g)}}}}function bq(e){if(!e)return null;const t=e.match(/\{([\d,-]+)\}/);return t?t[1].split(",").flatMap(r=>{const a=r.split("-").map(o=>Number.parseInt(o,10));return a.length===1?[a[0]]:Array.from({length:a[1]-a[0]+1},(o,l)=>l+a[0])}):null}const $d=Symbol("highlighted-lines");function _q(e={}){const{className:t="highlighted"}=e;return{name:"@shikijs/transformers:meta-highlight",line(n,r){var l;if(!((l=this.options.meta)!=null&&l.__raw))return;const a=this.meta;return a[$d]??(a[$d]=bq(this.options.meta.__raw)),(a[$d]??[]).includes(r)&&this.addClassToHast(n,t),n}}}function xq(e){return e?Array.from(e.matchAll(/\/((?:\\.|[^/])+)\//g)).map(n=>n[1].replace(/\\(.)/g,"$1")):[]}function Eq(e={}){const{className:t="highlighted-word"}=e;return{name:"@shikijs/transformers:meta-word-highlight",preprocess(n,r){var o;if(!((o=this.options.meta)!=null&&o.__raw))return;const a=xq(this.options.meta.__raw);r.decorations||(r.decorations=[]);for(const l of a){const u=Sq(n,l);for(const d of u)r.decorations.push({start:d,end:d+l.length,properties:{class:t}})}}}}function Sq(e,t){const n=[];let r=0;for(;;){const a=e.indexOf(t,r);if(a===-1||a>=e.length||a<r)break;n.push(a),r=a+t.length}return n}function Aq(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function t_(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0}=e;return VO(t,new RegExp(`\\s*\\[!code (${Object.keys(n).map(Aq).join("|")})(:\\d+)?\\]`),function([a,o,l=":1"],u,d,f,m){const y=Number.parseInt(l.slice(1),10);for(let g=m;g<Math.min(m+y,f.length);g++)this.addClassToHast(f[g],n[o]);return r&&this.addClassToHast(this.pre,r),!0},e.matchAlgorithm)}function wq(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff"}=e;return t_({classMap:{"++":t,"--":n},classActivePre:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function Tq(e={}){const{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:n="has-highlighted"}=e;return t_({classMap:t,classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function Cq(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted"}=e;return t_({classMap:{highlight:t,hl:t},classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}function Rq(e,t,n,r){const a=BO(e);let o=a.indexOf(n);for(;o!==-1;)Nq.call(this,e.children,t,o,n.length,r),o=a.indexOf(n,o+1)}function BO(e){return e.type==="text"?e.value:e.type==="element"&&e.tagName==="span"?e.children.map(BO).join(""):""}function Nq(e,t,n,r,a){let o=0;for(let l=0;l<e.length;l++){const u=e[l];if(u.type!=="element"||u.tagName!=="span"||u===t)continue;const d=u.children[0];if(d.type==="text"){if(kq([o,o+d.value.length-1],[n,n+r])){const f=Math.max(0,n-o),m=r-Math.max(0,o-n);if(m===0)continue;const y=Oq(u,d,f,m);this.addClassToHast(y[1],a);const g=y.filter(Boolean);e.splice(l,1,...g),l+=g.length-1}o+=d.value.length}}}function kq(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function Oq(e,t,n,r){const a=t.value,o=l=>Dq(e,{children:[{type:"text",value:l}]});return[n>0?o(a.slice(0,n)):void 0,o(a.slice(n,n+r)),n+r<a.length?o(a.slice(n+r)):void 0]}function Dq(e,t){return{...e,properties:{...e.properties},...t}}function Iq(e={}){const{classActiveWord:t="highlighted-word",classActivePre:n=void 0}=e;return VO("@shikijs/transformers:notation-highlight-word",/\s*\[!code word:((?:\\.|[^:\]])+)(:\d+)?\]/,function([r,a,o],l,u,d,f){const m=o?Number.parseInt(o.slice(1),10):d.length;a=a.replace(/\\(.)/g,"$1");for(let y=f;y<Math.min(f+m,d.length);y++)Rq.call(this,d[y],u,a,t);return n&&this.addClassToHast(this.pre,n),!0},e.matchAlgorithm)}const Lq="modulepreload",Mq=function(e){return"/"+e},fT={},I=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));a=l(n.map(f=>{if(f=Mq(f),f in fT)return;fT[f]=!0;const m=f.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${y}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":Lq,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,x)=>{g.addEventListener("load",v),g.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return a.then(l=>{for(const u of l||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};let tn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function jq(e){return n_(e)}function n_(e){return Array.isArray(e)?Pq(e):e instanceof RegExp?e:typeof e=="object"?Vq(e):e}function Pq(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=n_(e[n]);return t}function Vq(e){let t={};for(let n in e)t[n]=n_(e[n]);return t}function zO(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function UO(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?UO(e.substring(0,e.length-1)):e.substr(~t+1)}var Zg=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,qd=class{static hasCaptures(e){return e===null?!1:(Zg.lastIndex=0,Zg.test(e))}static replaceCaptures(e,t,n){return e.replace(Zg,(r,a,o,l)=>{let u=n[parseInt(a||o,10)];if(u){let d=t.substring(u.start,u.end);for(;d[0]===".";)d=d.substring(1);switch(l){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return r})}};function HO(e,t){return e<t?-1:e>t?1:0}function FO(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let o=HO(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function hT(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function GO(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $O=class{constructor(e){ce(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Kf=class{constructor(e,t,n){ce(this,"_cachedMatchRoot",new $O(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Uq(e),t)}static createFromParsedTheme(e,t){return Fq(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>Bq(e.parent,a.parentScopes));return r?new qO(r.fontStyle,r.foreground,r.background):null}},Xg=class pf{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new pf(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new pf(n,t[r]);return n}push(t){return new pf(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function Bq(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!zq(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function zq(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var qO=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Uq(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,o=t.length;a<o;a++){let l=t[a];if(!l.settings)continue;let u;if(typeof l.scope=="string"){let y=l.scope;y=y.replace(/^[,]+/,""),y=y.replace(/[,]+$/,""),u=y.split(",")}else Array.isArray(l.scope)?u=l.scope:u=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let y=l.settings.fontStyle.split(" ");for(let g=0,v=y.length;g<v;g++)switch(y[g]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let f=null;typeof l.settings.foreground=="string"&&hT(l.settings.foreground)&&(f=l.settings.foreground);let m=null;typeof l.settings.background=="string"&&hT(l.settings.background)&&(m=l.settings.background);for(let y=0,g=u.length;y<g;y++){let x=u[y].trim().split(" "),S=x[x.length-1],A=null;x.length>1&&(A=x.slice(0,x.length-1),A.reverse()),n[r++]=new Hq(S,A,a,d,f,m)}}return n}var Hq=class{constructor(e,t,n,r,a,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=o}},vn=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(vn||{});function Fq(e,t){e.sort((d,f)=>{let m=HO(d.scope,f.scope);return m!==0||(m=FO(d.parentScopes,f.parentScopes),m!==0)?m:d.index-f.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(n=d.fontStyle),d.foreground!==null&&(r=d.foreground),d.background!==null&&(a=d.background)}let o=new Gq(t),l=new qO(n,o.getId(r),o.getId(a)),u=new qq(new fv(0,null,-1,0,0),[]);for(let d=0,f=e.length;d<f;d++){let m=e[d];u.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new Kf(o,l,u)}var Gq=class{constructor(e){ce(this,"_isFrozen");ce(this,"_lastColorId");ce(this,"_id2color");ce(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},$q=Object.freeze([]),fv=class KO{constructor(t,n,r,a,o){ce(this,"scopeDepth");ce(this,"parentScopes");ce(this,"fontStyle");ce(this,"foreground");ce(this,"background");this.scopeDepth=t,this.parentScopes=n||$q,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new KO(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},qq=class hv{constructor(t,n=[],r={}){ce(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){const o=n.parentScopes[a].length-t.parentScopes[r].length;if(o!==0)return o;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,o;if(r===-1?(a=t,o=""):(a=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(hv._cmpBySpecificity),n}insert(t,n,r,a,o,l){if(n===""){this._doInsertHere(t,r,a,o,l);return}let u=n.indexOf("."),d,f;u===-1?(d=n,f=""):(d=n.substring(0,u),f=n.substring(u+1));let m;this._children.hasOwnProperty(d)?m=this._children[d]:(m=new hv(this._mainRule.clone(),fv.cloneArr(this._rulesWithParentScopes)),this._children[d]=m),m.insert(t+1,f,r,a,o,l)}_doInsertHere(t,n,r,a,o){if(n===null){this._mainRule.acceptOverwrite(t,r,a,o);return}for(let l=0,u=this._rulesWithParentScopes.length;l<u;l++){let d=this._rulesWithParentScopes[l];if(FO(d.parentScopes,n)===0){d.acceptOverwrite(t,r,a,o);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new fv(t,n,r,a,o))}},Po=class sr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=sr.getLanguageId(t),r=sr.getTokenType(t),a=sr.getFontStyle(t),o=sr.getForeground(t),l=sr.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:o,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,o,l,u){let d=sr.getLanguageId(t),f=sr.getTokenType(t),m=sr.containsBalancedBrackets(t)?1:0,y=sr.getFontStyle(t),g=sr.getForeground(t),v=sr.getBackground(t);return n!==0&&(d=n),r!==8&&(f=r),a!==null&&(m=a?1:0),o!==-1&&(y=o),l!==0&&(g=l),u!==0&&(v=u),(d<<0|f<<8|m<<10|y<<11|g<<15|v<<24)>>>0}};function Wf(e,t){const n=[],r=Kq(e);let a=r.next();for(;a!==null;){let d=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let f=l();if(n.push({matcher:f,priority:d}),a!==",")break;a=r.next()}return n;function o(){if(a==="-"){a=r.next();const d=o();return f=>!!d&&!d(f)}if(a==="("){a=r.next();const d=u();return a===")"&&(a=r.next()),d}if(mT(a)){const d=[];do d.push(a),a=r.next();while(mT(a));return f=>t(d,f)}return null}function l(){const d=[];let f=o();for(;f;)d.push(f),f=o();return m=>d.every(y=>y(m))}function u(){const d=[];let f=l();for(;f&&(d.push(f),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");f=l()}return m=>d.some(y=>y(m))}}function mT(e){return!!e&&!!e.match(/[\w\.:]+/)}function Kq(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function WO(e){typeof e.dispose=="function"&&e.dispose()}var Fc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Wq=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Yq=class{constructor(){ce(this,"_references",[]);ce(this,"_seenReferenceKeys",new Set);ce(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Zq=class{constructor(e,t){ce(this,"seenFullScopeRequests",new Set);ce(this,"seenPartialScopeRequests",new Set);ce(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Fc(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Yq;for(const n of e)Xq(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Fc){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Xq(e,t,n,r){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Fc?gf({baseGrammar:o,selfGrammar:a},r):mv(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);const l=n.injections(e.scopeName);if(l)for(const u of l)r.add(new Fc(u))}function mv(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Yf([r],t,n)}}function gf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Yf(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Yf(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Yf(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const a=r.repository?zO({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Yf(r.patterns,{...t,repository:a},n);const o=r.include;if(!o)continue;const l=YO(o);switch(l.kind){case 0:gf({...t,selfGrammar:t.baseGrammar},n);break;case 1:gf(t,n);break;case 2:mv(l.ruleName,{...t,repository:a},n);break;case 3:case 4:const u=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(u){const d={baseGrammar:t.baseGrammar,selfGrammar:u,repository:a};l.kind===4?mv(l.ruleName,d,n):gf(d,n)}else l.kind===4?n.add(new Wq(l.scopeName,l.ruleName)):n.add(new Fc(l.scopeName));break}}}var Qq=class{constructor(){ce(this,"kind",0)}},Jq=class{constructor(){ce(this,"kind",1)}},eK=class{constructor(e){ce(this,"kind",2);this.ruleName=e}},tK=class{constructor(e){ce(this,"kind",3);this.scopeName=e}},nK=class{constructor(e,t){ce(this,"kind",4);this.scopeName=e,this.ruleName=t}};function YO(e){if(e==="$base")return new Qq;if(e==="$self")return new Jq;const t=e.indexOf("#");if(t===-1)return new tK(e);if(t===0)return new eK(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new nK(n,r)}}var rK=/\\(\d+)/,pT=/\\(\d+)/g,iK=-1,ZO=-2;var mu=class{constructor(e,t,n,r){ce(this,"$location");ce(this,"id");ce(this,"_nameIsCapturing");ce(this,"_name");ce(this,"_contentNameIsCapturing");ce(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=qd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=qd.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${UO(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:qd.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:qd.replaceCaptures(this._contentName,e,t)}},aK=class extends mu{constructor(t,n,r,a,o){super(t,n,r,a);ce(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,a){throw new Error("Not supported!")}},sK=class extends mu{constructor(t,n,r,a,o){super(t,n,r,null);ce(this,"_match");ce(this,"captures");ce(this,"_cachedCompiledPatterns");this._match=new Gc(a,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new $c,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gT=class extends mu{constructor(t,n,r,a,o){super(t,n,r,a);ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new $c,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},pv=class extends mu{constructor(t,n,r,a,o,l,u,d,f,m){super(t,n,r,a);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"_end");ce(this,"endHasBackReferences");ce(this,"endCaptures");ce(this,"applyEndPatternLast");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");this._begin=new Gc(o,this.id),this.beginCaptures=l,this._end=new Gc(u||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=d,this.applyEndPatternLast=f||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,a)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new $c;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Zf=class extends mu{constructor(t,n,r,a,o,l,u,d,f){super(t,n,r,a);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"whileCaptures");ce(this,"_while");ce(this,"whileHasBackReferences");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");ce(this,"_cachedCompiledWhilePatterns");this._begin=new Gc(o,this.id),this.beginCaptures=l,this.whileCaptures=d,this._while=new Gc(u,ZO),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new $c;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,a){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,a)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new $c,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},XO=class pn{static createCaptureRule(t,n,r,a,o){return t.registerRule(l=>new aK(n,l,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new sK(t.$vscodeTextmateLocation,t.id,t.name,t.match,pn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=zO({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new gT(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,pn._compilePatterns(o,n,r))}return t.while?new Zf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,pn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,pn._compileCaptures(t.whileCaptures||t.captures,n,r),pn._compilePatterns(t.patterns,n,r)):new pv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,pn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,pn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,pn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let o=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);u>o&&(o=u)}for(let l=0;l<=o;l++)a[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);let d=0;t[l].patterns&&(d=pn.getCompiledRuleId(t[l],n,r)),a[u]=pn.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,d)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let o=0,l=t.length;o<l;o++){const u=t[o];let d=-1;if(u.include){const f=YO(u.include);switch(f.kind){case 0:case 1:d=pn.getCompiledRuleId(r[u.include],n,r);break;case 2:let m=r[f.ruleName];m&&(d=pn.getCompiledRuleId(m,n,r));break;case 3:case 4:const y=f.scopeName,g=f.kind===4?f.ruleName:null,v=n.getExternalGrammar(y,r);if(v)if(g){let x=v.repository[g];x&&(d=pn.getCompiledRuleId(x,n,v.repository))}else d=pn.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else d=pn.getCompiledRuleId(u,n,r);if(d!==-1){const f=n.getRule(d);let m=!1;if((f instanceof gT||f instanceof pv||f instanceof Zf)&&f.hasMissingPatterns&&f.patterns.length===0&&(m=!0),m)continue;a.push(d)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Gc=class QO{constructor(t,n){ce(this,"source");ce(this,"ruleId");ce(this,"hasAnchor");ce(this,"hasBackReferences");ce(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let a=0,o=[],l=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const f=t.charAt(u+1);f==="z"?(o.push(t.substring(a,u)),o.push("$(?!\\n)(?<!\\n)"),a=u+2):(f==="A"||f==="G")&&(l=!0),u++}this.hasAnchor=l,a===0?this.source=t:(o.push(t.substring(a,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=rK.test(this.source):this.hasBackReferences=!1}clone(){return new QO(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return pT.lastIndex=0,this.source.replace(pT,(a,o)=>GO(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],o,l,u,d;for(o=0,l=this.source.length;o<l;o++)u=this.source.charAt(o),t[o]=u,n[o]=u,r[o]=u,a[o]=u,u==="\\"&&o+1<l&&(d=this.source.charAt(o+1),d==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",a[o+1]="A"):d==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",a[o+1]="G"):(t[o+1]=d,n[o+1]=d,r[o+1]=d,a[o+1]=d),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},$c=class{constructor(){ce(this,"_items");ce(this,"_hasAnchors");ce(this,"_cached");ce(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new yT(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new yT(e,r,this._items.map(a=>a.ruleId))}},yT=class{constructor(e,t,n){ce(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
267
+ `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Qg=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Ei,oK=(Ei=class{constructor(t,n){ce(this,"_defaultAttributes");ce(this,"_embeddedLanguagesMatcher");ce(this,"_getBasicScopeAttributes",new $O(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Qg(n,r)}));this._defaultAttributes=new Qg(t,8),this._embeddedLanguagesMatcher=new lK(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Ei._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Ei.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},ce(Ei,"_NULL_SCOPE_METADATA",new Qg(0,0)),ce(Ei,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Ei),lK=class{constructor(e){ce(this,"values");ce(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>GO(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},vT=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function JO(e,t,n,r,a,o,l,u){const d=t.content.length;let f=!1,m=-1;if(l){const v=cK(e,t,n,r,a,o);a=v.stack,r=v.linePos,n=v.isFirstLine,m=v.anchorPosition}const y=Date.now();for(;!f;){if(u!==0&&Date.now()-y>u)return new vT(a,!0);g()}return new vT(a,!1);function g(){const v=uK(e,t,n,r,a,m);if(!v){o.produce(a,d),f=!0;return}const x=v.captureIndices,S=v.matchedRuleId,A=x&&x.length>0?x[0].end>r:!1;if(S===iK){const w=a.getRule(e);o.produce(a,x[0].start),a=a.withContentNameScopesList(a.nameScopesList),pc(e,t,n,a,o,w.endCaptures,x),o.produce(a,x[0].end);const T=a;if(a=a.parent,m=T.getAnchorPos(),!A&&T.getEnterPos()===r){a=T,o.produce(a,d),f=!0;return}}else{const w=e.getRule(S);o.produce(a,x[0].start);const T=a,R=w.getName(t.content,x),D=a.contentNameScopesList.pushAttributed(R,e);if(a=a.push(S,r,m,x[0].end===d,null,D,D),w instanceof pv){const N=w;pc(e,t,n,a,o,N.beginCaptures,x),o.produce(a,x[0].end),m=x[0].end;const L=N.getContentName(t.content,x),O=D.pushAttributed(L,e);if(a=a.withContentNameScopesList(O),N.endHasBackReferences&&(a=a.withEndRule(N.getEndWithResolvedBackReferences(t.content,x))),!A&&T.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(w instanceof Zf){const N=w;pc(e,t,n,a,o,N.beginCaptures,x),o.produce(a,x[0].end),m=x[0].end;const L=N.getContentName(t.content,x),O=D.pushAttributed(L,e);if(a=a.withContentNameScopesList(O),N.whileHasBackReferences&&(a=a.withEndRule(N.getWhileWithResolvedBackReferences(t.content,x))),!A&&T.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(pc(e,t,n,a,o,w.captures,x),o.produce(a,x[0].end),a=a.pop(),!A){a=a.safePop(),o.produce(a,d),f=!0;return}}x[0].end>r&&(r=x[0].end,n=!1)}}function cK(e,t,n,r,a,o){let l=a.beginRuleCapturedEOL?0:-1;const u=[];for(let d=a;d;d=d.pop()){const f=d.getRule(e);f instanceof Zf&&u.push({rule:f,stack:d})}for(let d=u.pop();d;d=u.pop()){const{ruleScanner:f,findOptions:m}=hK(d.rule,e,d.stack.endRule,n,r===l),y=f.findNextMatchSync(t,r,m);if(y){if(y.ruleId!==ZO){a=d.stack.pop();break}y.captureIndices&&y.captureIndices.length&&(o.produce(d.stack,y.captureIndices[0].start),pc(e,t,n,d.stack,o,d.rule.whileCaptures,y.captureIndices),o.produce(d.stack,y.captureIndices[0].end),l=y.captureIndices[0].end,y.captureIndices[0].end>r&&(r=y.captureIndices[0].end,n=!1))}else{a=d.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:l,isFirstLine:n}}function uK(e,t,n,r,a,o){const l=dK(e,t,n,r,a,o),u=e.getInjections();if(u.length===0)return l;const d=fK(u,e,t,n,r,a,o);if(!d)return l;if(!l)return d;const f=l.captureIndices[0].start,m=d.captureIndices[0].start;return m<f||d.priorityMatch&&m===f?d:l}function dK(e,t,n,r,a,o){const l=a.getRule(e),{ruleScanner:u,findOptions:d}=eD(l,e,a.endRule,n,r===o),f=u.findNextMatchSync(t,r,d);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function fK(e,t,n,r,a,o,l){let u=Number.MAX_VALUE,d=null,f,m=0;const y=o.contentNameScopesList.getScopeNames();for(let g=0,v=e.length;g<v;g++){const x=e[g];if(!x.matcher(y))continue;const S=t.getRule(x.ruleId),{ruleScanner:A,findOptions:w}=eD(S,t,null,r,a===l),T=A.findNextMatchSync(n,a,w);if(!T)continue;const R=T.captureIndices[0].start;if(!(R>=u)&&(u=R,d=T.captureIndices,f=T.ruleId,m=x.priority,u===a))break}return d?{priorityMatch:m===-1,captureIndices:d,matchedRuleId:f}:null}function eD(e,t,n,r,a){return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function hK(e,t,n,r,a){return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function pc(e,t,n,r,a,o,l){if(o.length===0)return;const u=t.content,d=Math.min(o.length,l.length),f=[],m=l[0].end;for(let y=0;y<d;y++){const g=o[y];if(g===null)continue;const v=l[y];if(v.length===0)continue;if(v.start>m)break;for(;f.length>0&&f[f.length-1].endPos<=v.start;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?a.produceFromScopes(f[f.length-1].scopes,v.start):a.produce(r,v.start),g.retokenizeCapturedWithRuleId){const S=g.getName(u,l),A=r.contentNameScopesList.pushAttributed(S,e),w=g.getContentName(u,l),T=A.pushAttributed(w,e),R=r.push(g.retokenizeCapturedWithRuleId,v.start,-1,!1,null,A,T),D=e.createOnigString(u.substring(0,v.end));JO(e,D,n&&v.start===0,v.start,R,a,!1,0),WO(D);continue}const x=g.getName(u,l);if(x!==null){const A=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(x,e);f.push(new mK(A,v.end))}}for(;f.length>0;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var mK=class{constructor(e,t){ce(this,"scopes");ce(this,"endPos");this.scopes=e,this.endPos=t}};function pK(e,t,n,r,a,o,l,u){return new yK(e,t,n,r,a,o,l,u)}function bT(e,t,n,r,a){const o=Wf(t,Xf),l=XO.getCompiledRuleId(n,r,a.repository);for(const u of o)e.push({debugSelector:t,matcher:u.matcher,ruleId:l,grammar:a,priority:u.priority})}function Xf(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let a=n;a<t.length;a++)if(gK(t[a],r))return n=a+1,!0;return!1})}function gK(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var yK=class{constructor(e,t,n,r,a,o,l,u){ce(this,"_rootId");ce(this,"_lastRuleId");ce(this,"_ruleId2desc");ce(this,"_includedGrammars");ce(this,"_grammarRepository");ce(this,"_grammar");ce(this,"_injections");ce(this,"_basicScopeAttributesProvider");ce(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new oK(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=_T(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const d of Object.keys(a)){const f=Wf(d,Xf);for(const m of f)this._tokenTypeMatchers.push({matcher:m.matcher,type:a[d]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const a=r.injections;if(a)for(let l in a)bT(t,l,a[l],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(l=>{const u=this.getExternalGrammar(l);if(u){const d=u.injectionSelector;d&&bT(t,d,u,this,u)}})}return t.sort((a,o)=>a.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=_T(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=XO.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===gv.NULL){a=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),y=Po.set(0,f.languageId,f.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),g=this.getRule(this._rootId).getName(null,null);let v;g?v=Cc.createRootAndLookUpScopeName(g,y,this):v=Cc.createRoot("unknown",y),t=new gv(null,this._rootId,-1,-1,!1,null,v,v)}else a=!1,t.reset();e=e+`
268
+ `;const o=this.createOnigString(e),l=o.content.length,u=new bK(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=JO(this,o,a,0,t,u,!0,r);return WO(o),{lineLength:l,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function _T(e,t){return e=jq(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Cc=class Pr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,a=(t==null?void 0:t.scopePath)??null;for(const o of n)a=Xg.push(a,o.scopeNames),r=new Pr(r,a,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Pr(null,new Xg(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const a=r.getMetadataForScope(t),o=new Xg(null,t),l=r.themeProvider.themeMatch(o),u=Pr.mergeAttributes(n,a,l);return new Pr(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Pr.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let a=-1,o=0,l=0;return r!==null&&(a=r.fontStyle,o=r.foregroundId,l=r.backgroundId),Po.set(t,n.languageId,n.tokenType,null,a,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Pr._pushAttributed(this,t,n);const r=t.split(/ /g);let a=this;for(const o of r)a=Pr._pushAttributed(a,o,n);return a}static _pushAttributed(t,n,r){const a=r.getMetadataForScope(n),o=t.scopePath.push(n),l=r.themeProvider.themeMatch(o),u=Pr.mergeAttributes(t.tokenAttributes,a,l);return new Pr(t,o,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var a;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((a=r.parent)==null?void 0:a.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},lr,gv=(lr=class{constructor(t,n,r,a,o,l,u,d){ce(this,"_stackElementBrand");ce(this,"_enterPos");ce(this,"_anchorPos");ce(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=u,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=a}equals(t){return t===null?!1:lr._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Cc.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){lr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,o,l,u){return new lr(this,t,n,r,a,o,l,u)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var r,a;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(a=this.contentNameScopesList)==null?void 0:a.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new lr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=Cc.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new lr(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Cc.fromExtension(r,n.contentNameScopesList))}},ce(lr,"NULL",new lr(null,0,0,0,!1,null,null,null)),lr),vK=class{constructor(e,t){ce(this,"balancedBracketScopes");ce(this,"unbalancedBracketScopes");ce(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Wf(n,Xf).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Wf(n,Xf).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},bK=class{constructor(e,t,n,r){ce(this,"_emitBinaryTokens");ce(this,"_lineText");ce(this,"_tokens");ce(this,"_binaryTokens");ce(this,"_lastTokenEndIndex");ce(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let a=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=(e==null?void 0:e.getScopeNames())??[];for(const u of this._tokenTypeOverrides)u.matcher(l)&&(a=Po.set(a,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(a=Po.set(a,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n}},_K=class{constructor(e,t){ce(this,"_grammars",new Map);ce(this,"_rawGrammars",new Map);ce(this,"_injectionGrammars",new Map);ce(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,pK(e,o,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},xK=class{constructor(t){ce(this,"_options");ce(this,"_syncRegistry");ce(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new _K(Kf.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Kf.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new vK(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,a,o){const l=new Zq(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(u=>this._loadSingleGrammar(u.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,a,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,a=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,a)}_grammarForScopeName(t,n=0,r=null,a=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,a,o)}},yv=gv.NULL;const EK=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class pu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}pu.prototype.normal={};pu.prototype.property={};pu.prototype.space=void 0;function tD(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new pu(n,r,t)}function vv(e){return e.toLowerCase()}class In{constructor(t,n){this.attribute=n,this.property=t}}In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;let SK=0;const Ze=xs(),Ut=xs(),bv=xs(),ye=xs(),xt=xs(),Ao=xs(),zn=xs();function xs(){return 2**++SK}const _v=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ze,booleanish:Ut,commaOrSpaceSeparated:zn,commaSeparated:Ao,number:ye,overloadedBoolean:bv,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),Jg=Object.keys(_v);class r_ extends In{constructor(t,n,r,a){let o=-1;if(super(t,n),xT(this,"space",a),typeof r=="number")for(;++o<Jg.length;){const l=Jg[o];xT(this,Jg[o],(r&_v[l])===_v[l])}}}r_.prototype.defined=!0;function xT(e,t,n){n&&(e[t]=n)}function Jo(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new r_(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[vv(r)]=r,n[vv(o.attribute)]=r}return new pu(t,n,e.space)}const nD=Jo({properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:xt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:ye,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:xt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Ut,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rD(e,t){return t in e?e[t]:t}function iD(e,t){return rD(e,t.toLowerCase())}const AK=Jo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ao,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:xt,autoFocus:Ze,autoPlay:Ze,blocking:xt,capture:null,charSet:null,checked:Ze,cite:null,className:xt,cols:ye,colSpan:null,content:null,contentEditable:Ut,controls:Ze,controlsList:xt,coords:ye|Ao,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:bv,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:xt,height:ye,hidden:bv,high:ye,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Ze,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:xt,itemRef:xt,itemScope:Ze,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,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:Ze,optimum:ye,pattern:null,ping:xt,placeholder:null,playsInline:Ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:xt,required:Ze,reversed:Ze,rows:ye,rowSpan:ye,sandbox:xt,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shadowRootClonable:Ze,shadowRootDelegatesFocus:Ze,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Ze,useMap:null,value:Ut,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ze,disableRemotePlayback:Ze,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:iD}),wK=Jo({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:zn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:xt,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:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:Ao,g2:Ao,glyphName:Ao,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,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:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zn,rev:zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zn,requiredFeatures:zn,requiredFonts:zn,requiredFormats:zn,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rD}),aD=Jo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),sD=Jo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:iD}),oD=Jo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),TK=/[A-Z]/g,ET=/-[a-z]/g,CK=/^data[-\w.:]+$/i;function RK(e,t){const n=vv(t);let r=t,a=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&CK.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ET,kK);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ET.test(o)){let l=o.replace(TK,NK);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=r_}return new a(r,t)}function NK(e){return"-"+e.toLowerCase()}function kK(e){return e.charAt(1).toUpperCase()}const OK=tD([nD,AK,aD,sD,oD],"html"),lD=tD([nD,wK,aD,sD,oD],"svg"),ST={}.hasOwnProperty;function DK(e,t){const n=t||{};function r(a,...o){let l=r.invalid;const u=r.handlers;if(a&&ST.call(a,e)){const d=String(a[e]);l=ST.call(u,d)?u[d]:r.unknown}if(l)return l.call(this,a,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const IK=/["&'<>`]/g,LK=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,MK=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,jK=/[|\\{}()[\]^$+*?.]/g,AT=new WeakMap;function PK(e,t){if(e=e.replace(t.subset?VK(t.subset):IK,r),t.subset||t.escapeOnly)return e;return e.replace(LK,n).replace(MK,r);function n(a,o,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(a,o,l){return t.format(a.charCodeAt(0),l.charCodeAt(o+1),t)}}function VK(e){let t=AT.get(e);return t||(t=BK(e),AT.set(e,t)),t}function BK(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(jK,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const zK=/[\dA-Fa-f]/;function UK(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!zK.test(String.fromCharCode(t))?r:r+";"}const HK=/\d/;function FK(e,t,n){const r="&#"+String(e);return n&&t&&!HK.test(String.fromCharCode(t))?r:r+";"}const GK=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],ey={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},$K=["cent","copy","divide","gt","lt","not","para","times"],cD={}.hasOwnProperty,xv={};let Kd;for(Kd in ey)cD.call(ey,Kd)&&(xv[ey[Kd]]=Kd);const qK=/[^\dA-Za-z]/;function KK(e,t,n,r){const a=String.fromCharCode(e);if(cD.call(xv,a)){const o=xv[a],l="&"+o;return n&&GK.includes(o)&&!$K.includes(o)&&(!r||t&&t!==61&&qK.test(String.fromCharCode(t)))?l:l+";"}return""}function WK(e,t,n){let r=UK(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=KK(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const o=FK(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function wo(e,t){return PK(e,Object.assign({format:WK},t))}const YK=/^>|^->|<!--|-->|--!>|<!-$/g,ZK=[">"],XK=["<",">"];function QK(e,t,n,r){return r.settings.bogusComments?"<?"+wo(e.value,Object.assign({},r.settings.characterReferences,{subset:ZK}))+">":"<!--"+e.value.replace(YK,a)+"-->";function a(o){return wo(o,Object.assign({},r.settings.characterReferences,{subset:XK}))}}function JK(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function wT(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function eW(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function tW(e){return e.join(" ").trim()}const nW=/[ \t\n\f\r]/g;function i_(e){return typeof e=="object"?e.type==="text"?TT(e.value):!1:TT(e)}function TT(e){return e.replace(nW,"")===""}const Wt=dD(1),uD=dD(-1),rW=[];function dD(e){return t;function t(n,r,a){const o=n?n.children:rW;let l=(r||0)+e,u=o[l];if(!a)for(;u&&i_(u);)l+=e,u=o[l];return u}}const iW={}.hasOwnProperty;function fD(e){return t;function t(n,r,a){return iW.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const a_=fD({body:sW,caption:ty,colgroup:ty,dd:uW,dt:cW,head:ty,html:aW,li:lW,optgroup:dW,option:fW,p:oW,rp:CT,rt:CT,tbody:mW,td:RT,tfoot:pW,th:RT,thead:hW,tr:gW});function ty(e,t,n){const r=Wt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&i_(r.value.charAt(0)))}function aW(e,t,n){const r=Wt(n,t);return!r||r.type!=="comment"}function sW(e,t,n){const r=Wt(n,t);return!r||r.type!=="comment"}function oW(e,t,n){const r=Wt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function lW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function cW(e,t,n){const r=Wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function uW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function CT(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function dW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function fW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function hW(e,t,n){const r=Wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function mW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function pW(e,t,n){return!Wt(n,t)}function gW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function RT(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const yW=fD({body:_W,colgroup:xW,head:bW,html:vW,tbody:EW});function vW(e){const t=Wt(e,-1);return!t||t.type!=="comment"}function bW(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function _W(e){const t=Wt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&i_(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function xW(e,t,n){const r=uD(n,t),a=Wt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&a_(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function EW(e,t,n){const r=uD(n,t),a=Wt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&a_(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const Wd={name:[[`
269
+ \f\r &/=>`.split(""),`
270
+ \f\r "&'/=>\``.split("")],[`\0
271
+ \f\r "&'/<=>`.split(""),`\0
272
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
273
+ \f\r &>`.split(""),`\0
274
+ \f\r "&'<=>\``.split("")],[`\0
275
+ \f\r "&'<=>\``.split(""),`\0
276
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function SW(e,t,n,r){const a=r.schema,o=a.space==="svg"?!1:r.settings.omitOptionalTags;let l=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const u=[];let d;a.space==="html"&&e.tagName==="svg"&&(r.schema=lD);const f=AW(r,e.properties),m=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,m&&(l=!1),(f||!o||!yW(e,t,n))&&(u.push("<",e.tagName,f?" "+f:""),l&&(a.space==="svg"||r.settings.closeSelfClosing)&&(d=f.charAt(f.length-1),(!r.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(m),!l&&(!o||!a_(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function AW(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const o=wW(e,a,t[a]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function wW(e,t,n){const r=RK(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let l=e.quote,u;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const d=wo(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Wd.name[a][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?eW:tW)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(u=wo(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Wd.unquoted[a][o]}))),u!==n&&(e.settings.quoteSmart&&wT(n,l)>wT(n,e.alternative)&&(l=e.alternative),u=l+wo(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?Wd.single:Wd.double)[a][o],attribute:!0}))+l),d+(u&&"="+u))}const TW=["<","&"];function hD(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:wo(e.value,Object.assign({},r.settings.characterReferences,{subset:TW}))}function CW(e,t,n,r){return r.settings.allowDangerousHtml?e.value:hD(e,t,n,r)}function RW(e,t,n,r){return r.all(e)}const NW=DK("type",{invalid:kW,unknown:OW,handlers:{comment:QK,doctype:JK,element:SW,raw:CW,root:RW,text:hD}});function kW(e){throw new Error("Expected node, not `"+e+"`")}function OW(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const DW={},IW={},LW=[];function MW(e,t){const n=t||DW,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:jW,all:PW,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||EK,characterReferences:n.characterReferences||IW,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?lD:OK,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function jW(e,t,n){return NW(e,t,n,this)}function PW(e){const t=[],n=e&&e.children||LW;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Qf(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[a,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[a]=o:a===r&&Object.assign(n,o);return n}function os(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function VW(e){return Array.isArray(e)?e:[e]}async function mD(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function s_(e){return!e||["plaintext","txt","text","plain"].includes(e)}function pD(e){return e==="ansi"||s_(e)}function o_(e){return e==="none"}function gD(e){return o_(e)}function yD(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const a of n)a&&!e.properties.class.includes(a)&&e.properties.class.push(a);return e}function Lh(e,t=!1){var o;const n=e.split(/(\r?\n)/g);let r=0;const a=[];for(let l=0;l<n.length;l+=2){const u=t?n[l]+(n[l+1]||""):n[l];a.push([u,r]),r+=n[l].length,r+=((o=n[l+1])==null?void 0:o.length)||0}return a}function BW(e){const t=Lh(e,!0).map(([a])=>a);function n(a){if(a===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=a,l=0;for(const u of t){if(o<u.length)break;o-=u.length,l++}return{line:l,character:o}}function r(a,o){let l=0;for(let u=0;u<a;u++)l+=t[u].length;return l+=o,l}return{lines:t,indexToPos:n,posToIndex:r}}function zW(e,t,n){const r=new Set;for(const o of e.matchAll(/lang=["']([\w-]+)["']/g))r.add(o[1]);for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(o[1]);for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g))r.add(o[1]);if(!n)return Array.from(r);const a=n.getBundledLanguages();return Array.from(r).filter(o=>o&&a[o])}function UW(e,t){let n=0;const r=[];for(const a of t)a>n&&r.push({...e,content:e.content.slice(n,a),offset:e.offset+n}),n=a;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function HW(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,a)=>r-a);return n.length?e.map(r=>r.flatMap(a=>{const o=n.filter(l=>a.offset<l&&l<a.offset+a.content.length).map(l=>l-a.offset).sort((l,u)=>l-u);return o.length?UW(a,o):a})):e}function FW(e,t,n,r){const a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(d=>Jf(e.variants[d])),l=new Set(o.flatMap(d=>Object.keys(d))),u={};return o.forEach((d,f)=>{for(const m of l){const y=d[m]||"inherit";if(f===0&&r)u[m]=y;else{const g=m==="color"?"":m==="background-color"?"-bg":`-${m}`,v=n+t[f]+(m==="color"?"":g);u[v]=y}}}),a.htmlStyle=u,a}function Jf(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&vn.Italic&&(t["font-style"]="italic"),e.fontStyle&vn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&vn.Underline&&n.push("underline"),e.fontStyle&vn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Ev(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const vD=new WeakMap;function Mh(e,t){vD.set(e,t)}function qc(e){return vD.get(e)}class el{constructor(...t){ce(this,"_stacks",{});ce(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,a]=t;this.lang=r,this._stacks={[a]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new el(Object.fromEntries(VW(n).map(r=>[r,yv])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return GW(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function GW(e){const t=[],n=new Set;function r(a){var l;if(n.has(a))return;n.add(a);const o=(l=a==null?void 0:a.nameScopesList)==null?void 0:l.scopeName;o&&t.push(o),a.parent&&r(a.parent)}return r(e),t}function $W(e,t){if(!(e instanceof el))throw new tn("Invalid grammar state");return e.getInternalStack(t)}function qW(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new tn(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...a.indexToPos(l),offset:l}}else{const u=a.lines[l.line];if(u===void 0)throw new tn(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${a.lines.length}`);if(l.character<0||l.character>u.length)throw new tn(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${u.length}`);return{...l,offset:a.posToIndex(l.line,l.character)}}};const a=BW(n.source),o=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));KW(o),e.set(n.meta,{decorations:o,converter:a,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var l;if(!((l=this.options.decorations)!=null&&l.length))return;const a=t(this).decorations.flatMap(u=>[u.start.offset,u.end.offset]);return HW(n,a)},code(n){var m;if(!((m=this.options.decorations)!=null&&m.length))return;const r=t(this),a=Array.from(n.children).filter(y=>y.type==="element"&&y.tagName==="span");if(a.length!==r.converter.lines.length)throw new tn(`Number of lines in code element (${a.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(y,g,v,x){const S=a[y];let A="",w=-1,T=-1;if(g===0&&(w=0),v===0&&(T=0),v===Number.POSITIVE_INFINITY&&(T=S.children.length),w===-1||T===-1)for(let D=0;D<S.children.length;D++)A+=bD(S.children[D]),w===-1&&A.length===g&&(w=D+1),T===-1&&A.length===v&&(T=D+1);if(w===-1)throw new tn(`Failed to find start index for decoration ${JSON.stringify(x.start)}`);if(T===-1)throw new tn(`Failed to find end index for decoration ${JSON.stringify(x.end)}`);const R=S.children.slice(w,T);if(!x.alwaysWrap&&R.length===S.children.length)u(S,x,"line");else if(!x.alwaysWrap&&R.length===1&&R[0].type==="element")u(R[0],x,"token");else{const D={type:"element",tagName:"span",properties:{},children:R};u(D,x,"wrapper"),S.children.splice(w,R.length,D)}}function l(y,g){a[y]=u(a[y],g,"line")}function u(y,g,v){var A;const x=g.properties||{},S=g.transform||(w=>w);return y.tagName=g.tagName||"span",y.properties={...y.properties,...x,class:y.properties.class},(A=g.properties)!=null&&A.class&&yD(y,g.properties.class),y=S(y,v)||y,y}const d=[],f=r.decorations.sort((y,g)=>g.start.offset-y.start.offset||y.end.offset-g.end.offset);for(const y of f){const{start:g,end:v}=y;if(g.line===v.line)o(g.line,g.character,v.character,y);else if(g.line<v.line){o(g.line,g.character,Number.POSITIVE_INFINITY,y);for(let x=g.line+1;x<v.line;x++)d.unshift(()=>l(x,y));o(v.line,0,v.character,y)}}d.forEach(y=>y())}}}function KW(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new tn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const a=e[r],o=n.start.offset<=a.start.offset&&a.start.offset<n.end.offset,l=n.start.offset<a.end.offset&&a.end.offset<=n.end.offset,u=a.start.offset<=n.start.offset&&n.start.offset<a.end.offset,d=a.start.offset<n.end.offset&&n.end.offset<=a.end.offset;if(o||l||u||d){if(o&&l||u&&d)continue;throw new tn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function bD(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(bD).join(""):""}const WW=[qW()];function eh(e){return[...e.transformers||[],...WW]}var ls=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ny={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function YW(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function NT(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function ZW(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)ny[r]&&t.push({type:"setDecoration",value:ny[r]});else if(r<=29){const a=ny[r-20];a&&(t.push({type:"resetDecoration",value:a}),a==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:ls[r-30]}});else if(r===38){const a=NT(e);a&&t.push({type:"setForegroundColor",value:a})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:ls[r-40]}});else if(r===48){const a=NT(e);a&&t.push({type:"setBackgroundColor",value:a})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:ls[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ls[r-100+8]}})}return t}function XW(){let e=null,t=null,n=new Set;return{parse(r){const a=[];let o=0;do{const l=YW(r,o),u=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(u.length>0&&a.push({value:u,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=ZW(l.sequence);for(const f of d)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of d)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}o=l.position}while(o<r.length);return a}}}var QW={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function JW(e=QW){function t(u){return e[u]}function n(u){return`#${u.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let r;function a(){if(r)return r;r=[];for(let f=0;f<ls.length;f++)r.push(t(ls[f]));let u=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let m=0;m<6;m++)for(let y=0;y<6;y++)r.push(n([u[f],u[m],u[y]]));let d=8;for(let f=0;f<24;f++,d+=10)r.push(n([d,d,d]));return r}function o(u){return a()[u]}function l(u){switch(u.type){case"named":return t(u.name);case"rgb":return n(u.rgb);case"table":return o(u.index)}}return{value:l}}function eY(e,t,n){const r=Qf(e,n),a=Lh(t),o=JW(Object.fromEntries(ls.map(u=>{var d;return[u,(d=e.colors)==null?void 0:d[`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`]]}))),l=XW();return a.map(u=>l.parse(u[0]).map(d=>{let f,m;d.decorations.has("reverse")?(f=d.background?o.value(d.background):e.bg,m=d.foreground?o.value(d.foreground):e.fg):(f=d.foreground?o.value(d.foreground):e.fg,m=d.background?o.value(d.background):void 0),f=os(f,r),m=os(m,r),d.decorations.has("dim")&&(f=tY(f));let y=vn.None;return d.decorations.has("bold")&&(y|=vn.Bold),d.decorations.has("italic")&&(y|=vn.Italic),d.decorations.has("underline")&&(y|=vn.Underline),d.decorations.has("strikethrough")&&(y|=vn.Strikethrough),{content:d.value,offset:u[1],color:f,bgColor:m,fontStyle:y}}))}function tY(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){const r=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${r}`}else return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(r=>`${r}${r}`).join("")}80`;const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function l_(e,t,n={}){const{lang:r="text",theme:a=e.getLoadedThemes()[0]}=n;if(s_(r)||o_(a))return Lh(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:o,colorMap:l}=e.setTheme(a);if(r==="ansi")return eY(o,t,n);const u=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==u.name)throw new tn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(o.name))throw new tn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return rY(t,u,o,l,n)}function nY(...e){if(e.length===2)return qc(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=r;if(s_(a)||o_(o))throw new tn("Plain language does not have grammar state");if(a==="ansi")throw new tn("ANSI language does not have grammar state");const{theme:l,colorMap:u}=t.setTheme(o),d=t.getLanguage(a);return new el(th(n,d,l,u,r).stateStack,d.name,l.name)}function rY(e,t,n,r,a){const o=th(e,t,n,r,a),l=new el(th(e,t,n,r,a).stateStack,t.name,n.name);return Mh(o.tokens,l),o.tokens}function th(e,t,n,r,a){const o=Qf(n,a),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:u=500}=a,d=Lh(e);let f=a.grammarState?$W(a.grammarState,n.name)??yv:a.grammarContextCode!=null?th(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:yv,m=[];const y=[];for(let g=0,v=d.length;g<v;g++){const[x,S]=d[g];if(x===""){m=[],y.push([]);continue}if(l>0&&x.length>=l){m=[],y.push([{content:x,offset:S,color:"",fontStyle:0}]);continue}let A,w,T;a.includeExplanation&&(A=t.tokenizeLine(x,f,u),w=A.tokens,T=0);const R=t.tokenizeLine2(x,f,u),D=R.tokens.length/2;for(let N=0;N<D;N++){const L=R.tokens[2*N],O=N+1<D?R.tokens[2*N+2]:x.length;if(L===O)continue;const M=R.tokens[2*N+1],B=os(r[Po.getForeground(M)],o),U=Po.getFontStyle(M),ue={content:x.substring(L,O),offset:S+L,color:B,fontStyle:U};if(a.includeExplanation){const ie=[];if(a.includeExplanation!=="scopeName")for(const Z of n.settings){let ee;switch(typeof Z.scope){case"string":ee=Z.scope.split(/,/).map(F=>F.trim());break;case"object":ee=Z.scope;break;default:continue}ie.push({settings:Z,selectors:ee.map(F=>F.split(/ /))})}ue.explanation=[];let fe=0;for(;L+fe<O;){const Z=w[T],ee=x.substring(Z.startIndex,Z.endIndex);fe+=ee.length,ue.explanation.push({content:ee,scopes:a.includeExplanation==="scopeName"?iY(Z.scopes):aY(ie,Z.scopes)}),T+=1}}m.push(ue)}y.push(m),m=[],f=R.ruleStack}return{tokens:y,stateStack:f}}function iY(e){return e.map(t=>({scopeName:t}))}function aY(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const o=t[r];n[r]={scopeName:o,themeMatches:oY(e,o,t.slice(0,r))}}return n}function kT(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function sY(e,t,n){if(!kT(e[e.length-1],t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)kT(e[r],n[a])&&(r-=1),a-=1;return r===-1}function oY(e,t,n){const r=[];for(const{selectors:a,settings:o}of e)for(const l of a)if(sY(l,t,n)){r.push(o);break}return r}function _D(e,t,n){const r=Object.entries(n.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),a=r.map(d=>{const f=l_(e,t,{...n,theme:d.theme}),m=qc(f),y=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:f,state:m,theme:y}}),o=lY(...a.map(d=>d.tokens)),l=o[0].map((d,f)=>d.map((m,y)=>{const g={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=m.explanation),o.forEach((v,x)=>{const{content:S,explanation:A,offset:w,...T}=v[f][y];g.variants[r[x].color]=T}),g})),u=a[0].state?new el(Object.fromEntries(a.map(d=>{var f;return[d.theme,(f=d.state)==null?void 0:f.getInternalStack(d.theme)]})),a[0].state.lang):void 0;return u&&Mh(l,u),l}function lY(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const a=e.map(d=>d[r]),o=t.map(()=>[]);t.forEach((d,f)=>d.push(o[f]));const l=a.map(()=>0),u=a.map(d=>d[0]);for(;u.every(d=>d);){const d=Math.min(...u.map(f=>f.content.length));for(let f=0;f<n;f++){const m=u[f];m.content.length===d?(o[f].push(m),l[f]+=1,u[f]=a[f][l[f]]):(o[f].push({...m,content:m.content.slice(0,d)}),u[f]={...m,content:m.content.slice(d),offset:m.offset+d})}}}return t}function nh(e,t,n){let r,a,o,l,u,d;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:m="--shiki-"}=n,y=Object.entries(n.themes).filter(A=>A[1]).map(A=>({color:A[0],theme:A[1]})).sort((A,w)=>A.color===f?-1:w.color===f?1:0);if(y.length===0)throw new tn("`themes` option must not be empty");const g=_D(e,t,n);if(d=qc(g),f&&!y.find(A=>A.color===f))throw new tn(`\`themes\` option must contain the defaultColor key \`${f}\``);const v=y.map(A=>e.getTheme(A.theme)),x=y.map(A=>A.color);o=g.map(A=>A.map(w=>FW(w,x,m,f))),d&&Mh(o,d);const S=y.map(A=>Qf(A.theme,n));a=y.map((A,w)=>(w===0&&f?"":`${m+A.color}:`)+(os(v[w].fg,S[w])||"inherit")).join(";"),r=y.map((A,w)=>(w===0&&f?"":`${m+A.color}-bg:`)+(os(v[w].bg,S[w])||"inherit")).join(";"),l=`shiki-themes ${v.map(A=>A.name).join(" ")}`,u=f?void 0:[a,r].join(";")}else if("theme"in n){const f=Qf(n.theme,n);o=l_(e,t,n);const m=e.getTheme(n.theme);r=os(m.bg,f),a=os(m.fg,f),l=m.name,d=qc(o)}else throw new tn("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:a,bg:r,themeName:l,rootStyle:u,grammarState:d}}function rh(e,t,n,r={meta:{},options:n,codeToHast:(a,o)=>rh(e,a,o),codeToTokens:(a,o)=>nh(e,a,o)}){var x,S;let a=t;for(const A of eh(n))a=((x=A.preprocess)==null?void 0:x.call(r,a,n))||a;let{tokens:o,fg:l,bg:u,themeName:d,rootStyle:f,grammarState:m}=nh(e,a,n);const{mergeWhitespaces:y=!0,mergeSameStyleTokens:g=!1}=n;y===!0?o=uY(o):y==="never"&&(o=dY(o)),g&&(o=fY(o));const v={...r,get source(){return a}};for(const A of eh(n))o=((S=A.tokens)==null?void 0:S.call(v,o))||o;return cY(o,{...n,fg:l,bg:u,themeName:d,rootStyle:f},v,m)}function cY(e,t,n,r=qc(e)){var x,S,A;const a=eh(t),o=[],l={type:"root",children:[]},{structure:u="classic",tabindex:d="0"}=t;let f={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...d!==!1&&d!=null?{tabindex:d.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([w])=>!w.startsWith("_")))},children:[]},m={type:"element",tagName:"code",properties:{},children:o};const y=[],g={...n,structure:u,addClassToHast:yD,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return f},get code(){return m},get lines(){return y}};if(e.forEach((w,T)=>{var N,L;T&&(u==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
277
+ `}));let R={type:"element",tagName:"span",properties:{class:"line"},children:[]},D=0;for(const O of w){let M={type:"element",tagName:"span",properties:{...O.htmlAttrs},children:[{type:"text",value:O.content}]};const B=Ev(O.htmlStyle||Jf(O));B&&(M.properties.style=B);for(const U of a)M=((N=U==null?void 0:U.span)==null?void 0:N.call(g,M,T+1,D,R,O))||M;u==="inline"?l.children.push(M):u==="classic"&&R.children.push(M),D+=O.content.length}if(u==="classic"){for(const O of a)R=((L=O==null?void 0:O.line)==null?void 0:L.call(g,R,T+1))||R;y.push(R),o.push(R)}}),u==="classic"){for(const w of a)m=((x=w==null?void 0:w.code)==null?void 0:x.call(g,m))||m;f.children.push(m);for(const w of a)f=((S=w==null?void 0:w.pre)==null?void 0:S.call(g,f))||f;l.children.push(f)}let v=l;for(const w of a)v=((A=w==null?void 0:w.root)==null?void 0:A.call(g,v))||v;return r&&Mh(v,r),v}function uY(e){return e.map(t=>{const n=[];let r="",a=0;return t.forEach((o,l)=>{const d=!(o.fontStyle&&(o.fontStyle&vn.Underline||o.fontStyle&vn.Strikethrough));d&&o.content.match(/^\s+$/)&&t[l+1]?(a||(a=o.offset),r+=o.content):r?(d?n.push({...o,offset:a,content:r+o.content}):n.push({content:r,offset:a},o),a=0,r=""):n.push(o)}),n})}function dY(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,a,o,l]=r;if(!a&&!l)return n;const u=[{...n,offset:n.offset+a.length,content:o}];return a&&u.unshift({content:a,offset:n.offset}),l&&u.push({content:l,offset:n.offset+a.length+o.length}),u}))}function fY(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const a=n[n.length-1],o=a.htmlStyle||Ev(Jf(a)),l=r.htmlStyle||Ev(Jf(r)),u=a.fontStyle&&(a.fontStyle&vn.Underline||a.fontStyle&vn.Strikethrough),d=r.fontStyle&&(r.fontStyle&vn.Underline||r.fontStyle&vn.Strikethrough);!u&&!d&&o===l?a.content+=r.content:n.push({...r})}return n})}const hY=MW;function mY(e,t,n){var o;const r={meta:{},options:n,codeToHast:(l,u)=>rh(e,l,u),codeToTokens:(l,u)=>nh(e,l,u)};let a=hY(rh(e,t,n,r));for(const l of eh(n))a=((o=l.postprocess)==null?void 0:o.call(r,a,n))||a;return a}const OT={light:"#333333",dark:"#bbbbbb"},DT={light:"#fffffe",dark:"#1e1e1e"},IT="__shiki_resolved";function c_(e){var u,d,f,m,y;if(e!=null&&e[IT])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const g=t.settings?t.settings.find(v=>!v.name&&!v.scope):void 0;(u=g==null?void 0:g.settings)!=null&&u.foreground&&(r=g.settings.foreground),(d=g==null?void 0:g.settings)!=null&&d.background&&(n=g.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((m=t==null?void 0:t.colors)!=null&&m["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?OT.light:OT.dark),n||(n=t.type==="light"?DT.light:DT.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0;const o=new Map;function l(g){var x;if(o.has(g))return o.get(g);a+=1;const v=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return(x=t.colorReplacements)!=null&&x[`#${v}`]?l(g):(o.set(g,v),v)}t.settings=t.settings.map(g=>{var A,w;const v=((A=g.settings)==null?void 0:A.foreground)&&!g.settings.foreground.startsWith("#"),x=((w=g.settings)==null?void 0:w.background)&&!g.settings.background.startsWith("#");if(!v&&!x)return g;const S={...g,settings:{...g.settings}};if(v){const T=l(g.settings.foreground);t.colorReplacements[T]=g.settings.foreground,S.settings.foreground=T}if(x){const T=l(g.settings.background);t.colorReplacements[T]=g.settings.background,S.settings.background=T}return S});for(const g of Object.keys(t.colors||{}))if((g==="editor.foreground"||g==="editor.background"||g.startsWith("terminal.ansi"))&&!((y=t.colors[g])!=null&&y.startsWith("#"))){const v=l(t.colors[g]);t.colorReplacements[v]=t.colors[g],t.colors[g]=v}return Object.defineProperty(t,IT,{enumerable:!1,writable:!1,value:!0}),t}async function xD(e){return Array.from(new Set((await Promise.all(e.filter(t=>!pD(t)).map(async t=>await mD(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function ED(e){return(await Promise.all(e.map(async n=>gD(n)?null:c_(await mD(n))))).filter(n=>!!n)}let pY=3;function gY(e,t=3){t>pY||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let _o=class extends Error{constructor(t){super(t),this.name="ShikiError"}};class yY extends xK{constructor(n,r,a,o={}){super(n);ce(this,"_resolvedThemes",new Map);ce(this,"_resolvedGrammars",new Map);ce(this,"_langMap",new Map);ce(this,"_langGraph",new Map);ce(this,"_textmateThemeCache",new WeakMap);ce(this,"_loadedThemesCache",null);ce(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=a,this._alias=o,this._themes.map(l=>this.loadTheme(l)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=c_(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=Kf.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){if(this._alias[n]){const r=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],r.has(n))throw new _o(`Circular alias \`${Array.from(r).join(" -> ")} -> ${n}\``);r.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){var l,u,d,f;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(m=>{var y;return(y=m.embeddedLangsLazy)==null?void 0:y.includes(n.name)}));this._resolver.addLanguage(n);const a={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,a);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(m=>{this._alias[m]=n.name}),this._loadedLanguagesCache=null,r.size)for(const m of r)this._resolvedGrammars.delete(m.name),this._loadedLanguagesCache=null,(u=(l=this._syncRegistry)==null?void 0:l._injectionGrammars)==null||u.delete(m.scopeName),(f=(d=this._syncRegistry)==null?void 0:d._grammars)==null||f.delete(m.scopeName),this.loadLanguage(this._langMap.get(m.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const r=Array.from(this._langGraph.entries()),a=r.filter(([o,l])=>!l);if(a.length){const o=r.filter(([l,u])=>{var d;return u&&((d=u.embeddedLangs)==null?void 0:d.some(f=>a.map(([m])=>m).includes(f)))}).filter(l=>!a.includes(l));throw new _o(`Missing languages ${a.map(([l])=>`\`${l}\``).join(", ")}, required by ${o.map(([l])=>`\`${l}\``).join(", ")}`)}for(const[o,l]of r)this._resolver.addLanguage(l);for(const[o,l]of r)this.loadLanguage(l)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){if(this._langMap.set(n.name,n),this._langGraph.set(n.name,n),n.embeddedLangs)for(const r of n.embeddedLangs)this._langGraph.set(r,this._langMap.get(r))}}class vY{constructor(t,n){ce(this,"_langs",new Map);ce(this,"_scopeToLang",new Map);ce(this,"_injections",new Map);ce(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let a=1;a<=n.length;a++){const o=n.slice(0,a).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let cc=0;function bY(e){cc+=1,e.warnings!==!1&&cc>=10&&cc%10===0&&console.warn(`[Shiki] ${cc} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new _o("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(c_),a=new vY(e.engine,n),o=new yY(a,r,n,e.langAlias);let l;function u(T){A();const R=o.getGrammar(typeof T=="string"?T:T.name);if(!R)throw new _o(`Language \`${T}\` not found, you may need to load it first`);return R}function d(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};A();const R=o.getTheme(T);if(!R)throw new _o(`Theme \`${T}\` not found, you may need to load it first`);return R}function f(T){A();const R=d(T);l!==T&&(o.setTheme(R),l=T);const D=o.getColorMap();return{theme:R,colorMap:D}}function m(){return A(),o.getLoadedThemes()}function y(){return A(),o.getLoadedLanguages()}function g(...T){A(),o.loadLanguages(T.flat(1))}async function v(...T){return g(await xD(T))}function x(...T){A();for(const R of T.flat(1))o.loadTheme(R)}async function S(...T){return A(),x(await ED(T))}function A(){if(t)throw new _o("Shiki instance has been disposed")}function w(){t||(t=!0,o.dispose(),cc-=1)}return{setTheme:f,getTheme:d,getLanguage:u,getLoadedThemes:m,getLoadedLanguages:y,loadLanguage:v,loadLanguageSync:g,loadTheme:S,loadThemeSync:x,dispose:w,[Symbol.dispose]:w}}async function _Y(e){e.engine||gY("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([ED(e.themes||[]),xD(e.langs||[]),e.engine]);return bY({...e,themes:t,langs:n,engine:r})}async function xY(e){const t=await _Y(e);return{getLastGrammarState:(...n)=>nY(t,...n),codeToTokensBase:(n,r)=>l_(t,n,r),codeToTokensWithThemes:(n,r)=>_D(t,n,r),codeToTokens:(n,r)=>nh(t,n,r),codeToHast:(n,r)=>rh(t,n,r),codeToHtml:(n,r)=>mY(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function EY(e){const t=e.langs,n=e.themes,r=e.engine;async function a(o){function l(y){if(typeof y=="string"){if(pD(y))return[];const g=t[y];if(!g)throw new tn(`Language \`${y}\` is not included in this bundle. You may want to load it from external source.`);return g}return y}function u(y){if(gD(y))return"none";if(typeof y=="string"){const g=n[y];if(!g)throw new tn(`Theme \`${y}\` is not included in this bundle. You may want to load it from external source.`);return g}return y}const d=(o.themes??[]).map(y=>u(y)),f=(o.langs??[]).map(y=>l(y)),m=await xY({engine:o.engine??r(),...o,themes:d,langs:f});return{...m,loadLanguage(...y){return m.loadLanguage(...y.map(l))},loadTheme(...y){return m.loadTheme(...y.map(u))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return a}function SY(e){let t;async function n(r={}){if(t){const a=await t;return await Promise.all([a.loadTheme(...r.themes||[]),a.loadLanguage(...r.langs||[])]),a}else return t=e({...r,themes:r.themes||[],langs:r.langs||[]}),t}return n}function AY(e,t){const n=SY(e);async function r(a,o){var d;const l=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),u=await((d=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:d.call(t,a,o.lang,l));return u&&await l.loadLanguage(...u),l}return{getSingletonHighlighter(a){return n(a)},async codeToHtml(a,o){return(await r(a,o)).codeToHtml(a,o)},async codeToHast(a,o){return(await r(a,o)).codeToHast(a,o)},async codeToTokens(a,o){return(await r(a,o)).codeToTokens(a,o)},async codeToTokensBase(a,o){return(await r(a,o)).codeToTokensBase(a,o)},async codeToTokensWithThemes(a,o){return(await r(a,o)).codeToTokensWithThemes(a,o)},async getLastGrammarState(a,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(a,o)}}}const SD=[{id:"abap",name:"ABAP",import:()=>I(()=>import("./abap-BdImnpbu.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>I(()=>import("./actionscript-3-CfeIJUat.js"),[])},{id:"ada",name:"Ada",import:()=>I(()=>import("./ada-bCR0ucgS.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>I(()=>import("./angular-html-Bbf3ZyxA.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>I(()=>import("./angular-ts-C26w9mnW.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>I(()=>import("./apache-Pmp26Uib.js"),[])},{id:"apex",name:"Apex",import:()=>I(()=>import("./apex-QX45V2Sx.js"),[])},{id:"apl",name:"APL",import:()=>I(()=>import("./apl-e980N3t4.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>I(()=>import("./applescript-Co6uUVPk.js"),[])},{id:"ara",name:"Ara",import:()=>I(()=>import("./ara-BRHolxvo.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>I(()=>import("./asciidoc-CdggvHu8.js"),[])},{id:"asm",name:"Assembly",import:()=>I(()=>import("./asm-D_Q5rh1f.js"),[])},{id:"astro",name:"Astro",import:()=>I(()=>import("./astro-DAp1zUbp.js"),__vite__mapDeps([10,9,2,11,3,12]))},{id:"awk",name:"AWK",import:()=>I(()=>import("./awk-DMzUqQB5.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>I(()=>import("./ballerina-BFfxhgS-.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>I(()=>import("./bat-BkioyH1T.js"),[])},{id:"beancount",name:"Beancount",import:()=>I(()=>import("./beancount-BoKiGodi.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>I(()=>import("./berry-D08WgyRC.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>I(()=>import("./bibtex-CHM0blh-.js"),[])},{id:"bicep",name:"Bicep",import:()=>I(()=>import("./bicep-6nHXG8SA.js"),[])},{id:"blade",name:"Blade",import:()=>I(()=>import("./blade-DGJDb2eD.js"),__vite__mapDeps([13,14,1,2,3,7,8,15,9]))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>I(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([16,17]))},{id:"c",name:"C",import:()=>I(()=>import("./c-BIGW1oBm.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>I(()=>import("./cadence-D2CYqzqI.js"),[])},{id:"cairo",name:"Cairo",import:()=>I(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([18,19]))},{id:"clarity",name:"Clarity",import:()=>I(()=>import("./clarity-CHh-QcGE.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>I(()=>import("./clojure-P80f7IUj.js"),[])},{id:"cmake",name:"CMake",import:()=>I(()=>import("./cmake-D1j8_8rp.js"),[])},{id:"cobol",name:"COBOL",import:()=>I(()=>import("./cobol-CCPHrsME.js"),__vite__mapDeps([20,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>I(()=>import("./codeowners-Bp6g37R7.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>I(()=>import("./codeql-DsOJ9woJ.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>I(()=>import("./coffee-JUOWOZUj.js"),__vite__mapDeps([21,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>I(()=>import("./common-lisp-Cg-RD9OK.js"),[])},{id:"coq",name:"Coq",import:()=>I(()=>import("./coq-CMdgaOU9.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>I(()=>import("./cpp-ChttZZSa.js"),__vite__mapDeps([22,23,24,25,15]))},{id:"crystal",name:"Crystal",import:()=>I(()=>import("./crystal-CfkhwHAQ.js"),__vite__mapDeps([26,1,2,3,15,25,27]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>I(()=>import("./csharp-CHadp7IV.js"),[])},{id:"css",name:"CSS",import:()=>I(()=>import("./css-DPfMkruS.js"),[])},{id:"csv",name:"CSV",import:()=>I(()=>import("./csv-fuZLfV_i.js"),[])},{id:"cue",name:"CUE",import:()=>I(()=>import("./cue-D82EKSYY.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>I(()=>import("./cypher-COkxafJQ.js"),[])},{id:"d",name:"D",import:()=>I(()=>import("./d-85-TOEBH.js"),[])},{id:"dart",name:"Dart",import:()=>I(()=>import("./dart-CF10PKvl.js"),[])},{id:"dax",name:"DAX",import:()=>I(()=>import("./dax-CEL-wOlO.js"),[])},{id:"desktop",name:"Desktop",import:()=>I(()=>import("./desktop-BmXAJ9_W.js"),[])},{id:"diff",name:"Diff",import:()=>I(()=>import("./diff-D97Zzqfu.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>I(()=>import("./docker-BcOcwvcX.js"),[])},{id:"dotenv",name:"dotEnv",import:()=>I(()=>import("./dotenv-Da5cRb03.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>I(()=>import("./dream-maker-BtqSS_iP.js"),[])},{id:"edge",name:"Edge",import:()=>I(()=>import("./edge-CKszZCnI.js"),__vite__mapDeps([28,11,1,2,3,14]))},{id:"elixir",name:"Elixir",import:()=>I(()=>import("./elixir-Cc7HHYVZ.js"),__vite__mapDeps([29,1,2,3]))},{id:"elm",name:"Elm",import:()=>I(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([30,24,25]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>I(()=>import("./emacs-lisp-C9XAeP06.js"),[])},{id:"erb",name:"ERB",import:()=>I(()=>import("./erb-D3EuUlpm.js"),__vite__mapDeps([31,1,2,3,32,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>I(()=>import("./erlang-DpOm0zC4.js"),[])},{id:"fennel",name:"Fennel",import:()=>I(()=>import("./fennel-BYunw83y.js"),[])},{id:"fish",name:"Fish",import:()=>I(()=>import("./fish-Bl2oy6fF.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>I(()=>import("./fluent-C4IJs8-o.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>I(()=>import("./fortran-fixed-form-BZjJHVRy.js"),__vite__mapDeps([39,40]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>I(()=>import("./fortran-free-form-D22FLkUw.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>I(()=>import("./fsharp-DQy8In2x.js"),__vite__mapDeps([41,42]))},{id:"gdresource",name:"GDResource",import:()=>I(()=>import("./gdresource-BSDf9Pz1.js"),__vite__mapDeps([43,44,45]))},{id:"gdscript",name:"GDScript",import:()=>I(()=>import("./gdscript-Bty6elJm.js"),[])},{id:"gdshader",name:"GDShader",import:()=>I(()=>import("./gdshader-DkwncUOv.js"),[])},{id:"genie",name:"Genie",import:()=>I(()=>import("./genie-D0YGMca9.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>I(()=>import("./gherkin-DyxjwDmM.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>I(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([46,47]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>I(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([48,27]))},{id:"gleam",name:"Gleam",import:()=>I(()=>import("./gleam-BspZqrRM.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>I(()=>import("./glimmer-js-Dz9X99Cm.js"),__vite__mapDeps([49,2,11,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>I(()=>import("./glimmer-ts-aQ3p29eY.js"),__vite__mapDeps([50,11,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>I(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([24,25]))},{id:"gnuplot",name:"Gnuplot",import:()=>I(()=>import("./gnuplot-DdkO51Og.js"),[])},{id:"go",name:"Go",import:()=>I(()=>import("./go-PEFJdsE-.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>I(()=>import("./graphql-Caa12_AY.js"),__vite__mapDeps([34,2,11,35,36]))},{id:"groovy",name:"Groovy",import:()=>I(()=>import("./groovy-gcz8RCvz.js"),[])},{id:"hack",name:"Hack",import:()=>I(()=>import("./hack-C1oSbnf3.js"),__vite__mapDeps([51,1,2,3,15]))},{id:"haml",name:"Ruby Haml",import:()=>I(()=>import("./haml-AZXGPtNI.js"),__vite__mapDeps([33,2,3]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>I(()=>import("./handlebars-YebKLiTq.js"),__vite__mapDeps([52,1,2,3,38]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>I(()=>import("./haskell-Df6bDoY_.js"),[])},{id:"haxe",name:"Haxe",import:()=>I(()=>import("./haxe-BP3HzMA6.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>I(()=>import("./hcl-BWvSN4gD.js"),[])},{id:"hjson",name:"Hjson",import:()=>I(()=>import("./hjson-D5-asLiD.js"),[])},{id:"hlsl",name:"HLSL",import:()=>I(()=>import("./hlsl-D3lLCCz7.js"),[])},{id:"html",name:"HTML",import:()=>I(()=>import("./html-B8pBdPMQ.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>I(()=>import("./html-derivative-ZQ8onl8Z.js"),__vite__mapDeps([14,1,2,3]))},{id:"http",name:"HTTP",import:()=>I(()=>import("./http-C38VWM-o.js"),__vite__mapDeps([53,27,9,7,8,34,2,11,35,36]))},{id:"hxml",name:"HXML",import:()=>I(()=>import("./hxml-B2Z6b3nn.js"),__vite__mapDeps([54,55]))},{id:"hy",name:"Hy",import:()=>I(()=>import("./hy-DFXneXwc.js"),[])},{id:"imba",name:"Imba",import:()=>I(()=>import("./imba-DGztddWO.js"),[])},{id:"ini",name:"INI",aliases:["properties"],import:()=>I(()=>import("./ini-BEwlwnbL.js"),[])},{id:"java",name:"Java",import:()=>I(()=>import("./java-CylS5w8V.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>I(()=>import("./javascript-BMMyXqK5.js"),[])},{id:"jinja",name:"Jinja",import:()=>I(()=>import("./jinja-BJmZiE_F.js"),__vite__mapDeps([56,1,2,3]))},{id:"jison",name:"Jison",import:()=>I(()=>import("./jison-BCRtk9Os.js"),__vite__mapDeps([57,2]))},{id:"json",name:"JSON",import:()=>I(()=>import("./json-Cp-IABpG.js"),[])},{id:"json5",name:"JSON5",import:()=>I(()=>import("./json5-C9tS-k6U.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>I(()=>import("./jsonc-Des-eS-w.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>I(()=>import("./jsonl-DcaNXYhu.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>I(()=>import("./jsonnet-DFQXde-d.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>I(()=>import("./jssm-C2t-YnRu.js"),[])},{id:"jsx",name:"JSX",import:()=>I(()=>import("./jsx-g9-lgVsj.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>I(()=>import("./julia-Db79kMu7.js"),__vite__mapDeps([58,22,23,24,25,15,19,2,59]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>I(()=>import("./kotlin-BdnUsdx6.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>I(()=>import("./kusto-BvAqAH-y.js"),[])},{id:"latex",name:"LaTeX",import:()=>I(()=>import("./latex-okZ41ve_.js"),__vite__mapDeps([60,61,59]))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>I(()=>import("./lean-c1G5yEKj.js"),[])},{id:"less",name:"Less",import:()=>I(()=>import("./less-B1dDrJ26.js"),[])},{id:"liquid",name:"Liquid",import:()=>I(()=>import("./liquid-C1lUkxsO.js"),__vite__mapDeps([62,1,2,3,9]))},{id:"llvm",name:"LLVM IR",import:()=>I(()=>import("./llvm-D32k8WzR.js"),[])},{id:"log",name:"Log file",import:()=>I(()=>import("./log-BFvZA1X9.js"),[])},{id:"logo",name:"Logo",import:()=>I(()=>import("./logo-BtOb2qkB.js"),[])},{id:"lua",name:"Lua",import:()=>I(()=>import("./lua-BbnMAYS6.js"),__vite__mapDeps([37,25]))},{id:"luau",name:"Luau",import:()=>I(()=>import("./luau-irsrSlf-.js"),[])},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>I(()=>import("./make-CHLpvVh8.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>I(()=>import("./markdown-RrBGtqGR.js"),[])},{id:"marko",name:"Marko",import:()=>I(()=>import("./marko-C0z8HR23.js"),__vite__mapDeps([63,3,64,5,2]))},{id:"matlab",name:"MATLAB",import:()=>I(()=>import("./matlab-D7o27uSR.js"),[])},{id:"mdc",name:"MDC",import:()=>I(()=>import("./mdc-02rxpBA4.js"),__vite__mapDeps([65,42,38,14,1,2,3]))},{id:"mdx",name:"MDX",import:()=>I(()=>import("./mdx-Cmh6b_Ma.js"),[])},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>I(()=>import("./mermaid-DfEE3Bzs.js"),[])},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>I(()=>import("./mipsasm-CKIfxQSi.js"),[])},{id:"mojo",name:"Mojo",import:()=>I(()=>import("./mojo-1DNp92w6.js"),[])},{id:"move",name:"Move",import:()=>I(()=>import("./move-BkPM1oy1.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>I(()=>import("./narrat-DRg8JJMk.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>I(()=>import("./nextflow-Bk5OV074.js"),[])},{id:"nginx",name:"Nginx",import:()=>I(()=>import("./nginx-DknmC5AR.js"),__vite__mapDeps([66,37,25]))},{id:"nim",name:"Nim",import:()=>I(()=>import("./nim-ANgMEeb1.js"),__vite__mapDeps([67,25,1,2,3,7,8,24,42]))},{id:"nix",name:"Nix",import:()=>I(()=>import("./nix-BepWV7mh.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>I(()=>import("./nushell-I3RK9BU8.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>I(()=>import("./objective-c-DXmwc3jG.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>I(()=>import("./objective-cpp-CLxacb5B.js"),[])},{id:"ocaml",name:"OCaml",import:()=>I(()=>import("./ocaml-C0hk2d4L.js"),[])},{id:"pascal",name:"Pascal",import:()=>I(()=>import("./pascal-D93ZcfNL.js"),[])},{id:"perl",name:"Perl",import:()=>I(()=>import("./perl-EWVMYlR0.js"),__vite__mapDeps([68,1,2,3,7,8,15]))},{id:"php",name:"PHP",import:()=>I(()=>import("./php-9PMsNEzE.js"),__vite__mapDeps([69,1,2,3,7,8,15,9]))},{id:"plsql",name:"PL/SQL",import:()=>I(()=>import("./plsql-ChMvpjG-.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>I(()=>import("./po-BTJTHyun.js"),[])},{id:"polar",name:"Polar",import:()=>I(()=>import("./polar-C0HS_06l.js"),[])},{id:"postcss",name:"PostCSS",import:()=>I(()=>import("./postcss-CXtECtnM.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>I(()=>import("./powerquery-CEu0bR-o.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>I(()=>import("./powershell-Dpen1YoG.js"),[])},{id:"prisma",name:"Prisma",import:()=>I(()=>import("./prisma-Dd19v3D-.js"),[])},{id:"prolog",name:"Prolog",import:()=>I(()=>import("./prolog-CbFg5uaA.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>I(()=>import("./proto-DyJlTyXw.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>I(()=>import("./pug-Ch9lOoSd.js"),__vite__mapDeps([70,2,3,1]))},{id:"puppet",name:"Puppet",import:()=>I(()=>import("./puppet-BMWR74SV.js"),[])},{id:"purescript",name:"PureScript",import:()=>I(()=>import("./purescript-CtrldY6v.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>I(()=>import("./python-B6aJPvgy.js"),[])},{id:"qml",name:"QML",import:()=>I(()=>import("./qml-CHzV51_b.js"),__vite__mapDeps([71,2]))},{id:"qmldir",name:"QML Directory",import:()=>I(()=>import("./qmldir-C8lEn-DE.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>I(()=>import("./qss-IeuSbFQv.js"),[])},{id:"r",name:"R",import:()=>I(()=>import("./r-C2tOF0e5.js"),[])},{id:"racket",name:"Racket",import:()=>I(()=>import("./racket-BqYA7rlc.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>I(()=>import("./raku-DXvB9xmW.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>I(()=>import("./razor-CNXmhs1n.js"),__vite__mapDeps([72,1,2,3,73]))},{id:"reg",name:"Windows Registry Script",import:()=>I(()=>import("./reg-C-SQnVFl.js"),[])},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>I(()=>import("./regexp-CDVJQ6XC.js"),[])},{id:"rel",name:"Rel",import:()=>I(()=>import("./rel-C3B-1QV4.js"),[])},{id:"riscv",name:"RISC-V",import:()=>I(()=>import("./riscv-BM1_JUlF.js"),[])},{id:"rst",name:"reStructuredText",import:()=>I(()=>import("./rst-DHpKpUMA.js"),__vite__mapDeps([74,14,1,2,3,22,23,24,25,15,19,27,38,75,32,33,7,8,34,11,35,36,37]))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>I(()=>import("./ruby-C5MNRm7z.js"),__vite__mapDeps([32,1,2,3,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>I(()=>import("./rust-B1yitclQ.js"),[])},{id:"sas",name:"SAS",import:()=>I(()=>import("./sas-Dlf3BogE.js"),__vite__mapDeps([76,15]))},{id:"sass",name:"Sass",import:()=>I(()=>import("./sass-Cj5Yp3dK.js"),[])},{id:"scala",name:"Scala",import:()=>I(()=>import("./scala-C151Ov-r.js"),[])},{id:"scheme",name:"Scheme",import:()=>I(()=>import("./scheme-C98Dy4si.js"),[])},{id:"scss",name:"SCSS",import:()=>I(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3]))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>I(()=>import("./sdbl-DVxCFoDh.js"),[])},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>I(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([77,78]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>I(()=>import("./shellscript-Yzrsuije.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>I(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([79,27]))},{id:"smalltalk",name:"Smalltalk",import:()=>I(()=>import("./smalltalk-BERRCDM3.js"),[])},{id:"solidity",name:"Solidity",import:()=>I(()=>import("./solidity-BbcW6ACK.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>I(()=>import("./soy-B_7ge1HE.js"),__vite__mapDeps([80,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>I(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([81,82]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>I(()=>import("./splunk-BtCnVYZw.js"),[])},{id:"sql",name:"SQL",import:()=>I(()=>import("./sql-B9xm8XSJ.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>I(()=>import("./ssh-config-_ykCGR6B.js"),[])},{id:"stata",name:"Stata",import:()=>I(()=>import("./stata-C5TGba-T.js"),__vite__mapDeps([83,15]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>I(()=>import("./stylus-BEDo0Tqx.js"),[])},{id:"svelte",name:"Svelte",import:()=>I(()=>import("./svelte-CXAE1zBs.js"),__vite__mapDeps([84,2,11,3,12]))},{id:"swift",name:"Swift",import:()=>I(()=>import("./swift-fve9TYiY.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>I(()=>import("./system-verilog-CnnmHF94.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>I(()=>import("./systemd-4A_iFExJ.js"),[])},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>I(()=>import("./talonscript-CkByrt1z.js"),[])},{id:"tasl",name:"Tasl",import:()=>I(()=>import("./tasl-QIJgUcNo.js"),[])},{id:"tcl",name:"Tcl",import:()=>I(()=>import("./tcl-dwOrl1Do.js"),[])},{id:"templ",name:"Templ",import:()=>I(()=>import("./templ-kZcegUSt.js"),__vite__mapDeps([85,86,2,3]))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>I(()=>import("./terraform-BETggiCN.js"),[])},{id:"tex",name:"TeX",import:()=>I(()=>import("./tex-mQPFytnq.js"),__vite__mapDeps([61,59]))},{id:"toml",name:"TOML",import:()=>I(()=>import("./toml-vGWfd6FD.js"),[])},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>I(()=>import("./ts-tags-CHnADXob.js"),__vite__mapDeps([87,11,3,2,24,25,1,15,7,8]))},{id:"tsv",name:"TSV",import:()=>I(()=>import("./tsv-B_m7g4N7.js"),[])},{id:"tsx",name:"TSX",import:()=>I(()=>import("./tsx-COt5Ahok.js"),[])},{id:"turtle",name:"Turtle",import:()=>I(()=>import("./turtle-BsS91CYL.js"),[])},{id:"twig",name:"Twig",import:()=>I(()=>import("./twig-febACT8g.js"),__vite__mapDeps([88,3,2,5,69,1,7,8,15,9,19,32,33,34,11,35,36,22,23,24,25,27,37,38]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>I(()=>import("./typescript-DlfHMoPT.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>I(()=>import("./typespec-Df68jz8_.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>I(()=>import("./typst-DHCkPAjA.js"),[])},{id:"v",name:"V",import:()=>I(()=>import("./v-DljmTZ5-.js"),[])},{id:"vala",name:"Vala",import:()=>I(()=>import("./vala-CsfeWuGM.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>I(()=>import("./vb-D17OF-Vu.js"),[])},{id:"verilog",name:"Verilog",import:()=>I(()=>import("./verilog-BQ8w6xss.js"),[])},{id:"vhdl",name:"VHDL",import:()=>I(()=>import("./vhdl-CeAyd5Ju.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>I(()=>import("./viml-CJc9bBzg.js"),[])},{id:"vue",name:"Vue",import:()=>I(()=>import("./vue-xz9K_ZKN.js"),__vite__mapDeps([89,3,2,11,9,14,1]))},{id:"vue-html",name:"Vue HTML",import:()=>I(()=>import("./vue-html-dOMv_FQ0.js"),__vite__mapDeps([90,89,3,2,11,9,14,1]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>I(()=>import("./vyper-CDx5xZoG.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>I(()=>import("./wasm-MzD3tlZU.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>I(()=>import("./wenyan-BV7otONQ.js"),[])},{id:"wgsl",name:"WGSL",import:()=>I(()=>import("./wgsl-Dx-B1_4e.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>I(()=>import("./wikitext-BhOHFoWU.js"),[])},{id:"wit",name:"WebAssembly Interface Types",import:()=>I(()=>import("./wit-5i3qLPDT.js"),[])},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>I(()=>import("./wolfram-lXgVvXCa.js"),[])},{id:"xml",name:"XML",import:()=>I(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>I(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([91,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>I(()=>import("./yaml-Buea-lGh.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>I(()=>import("./zenscript-DVFEvuxE.js"),[])},{id:"zig",name:"Zig",import:()=>I(()=>import("./zig-CK-KhNJq.js"),[])}],wY=Object.fromEntries(SD.map(e=>[e.id,e.import])),TY=Object.fromEntries(SD.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),CY={...wY,...TY},RY=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>I(()=>import("./andromeeda-C3khCPGq.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>I(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>I(()=>import("./ayu-dark-Cv9koXgw.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>I(()=>import("./catppuccin-frappe-Btyk0a-E.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>I(()=>import("./catppuccin-latte-q-j0iyEw.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>I(()=>import("./catppuccin-macchiato-brDaU2vB.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>I(()=>import("./catppuccin-mocha-BR7mELCv.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>I(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>I(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>I(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>I(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>I(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>I(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>I(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>I(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>I(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>I(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>I(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>I(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>I(()=>import("./gruvbox-dark-hard-Hhtzho9R.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>I(()=>import("./gruvbox-dark-medium-DFR6f4Jn.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>I(()=>import("./gruvbox-dark-soft-BFVdkX1U.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>I(()=>import("./gruvbox-light-hard-7i6GEmcB.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>I(()=>import("./gruvbox-light-medium-Dcsh5twl.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>I(()=>import("./gruvbox-light-soft-leinZj1a.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>I(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>I(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>I(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>I(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>I(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>I(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>I(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>I(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>I(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>I(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>I(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>I(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>I(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>I(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>I(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>I(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>I(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>I(()=>import("./one-light-PoHY5YXO.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>I(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>I(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>I(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>I(()=>import("./rose-pine-BHrmToEH.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>I(()=>import("./rose-pine-dawn-CnK8MTSM.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>I(()=>import("./rose-pine-moon-NleAzG8P.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>I(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>I(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>I(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>I(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>I(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>I(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>I(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>I(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>I(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>I(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>I(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],NY=Object.fromEntries(RY.map(e=>[e.id,e.import]));class u_ extends Error{constructor(t){super(t),this.name="ShikiError"}}function kY(){return 2147483648}function OY(){return typeof performance<"u"?performance.now():Date.now()}const DY=(e,t)=>e+(t-e%t)%t;async function IY(e){let t,n;const r={};function a(v){n=v,r.HEAPU8=new Uint8Array(v),r.HEAPU32=new Uint32Array(v)}function o(v,x,S){r.HEAPU8.copyWithin(v,x,x+S)}function l(v){try{return t.grow(v-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function u(v){const x=r.HEAPU8.length;v=v>>>0;const S=kY();if(v>S)return!1;for(let A=1;A<=4;A*=2){let w=x*(1+.2/A);w=Math.min(w,v+100663296);const T=Math.min(S,DY(Math.max(v,w),65536));if(l(T))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(v,x,S=1024){const A=x+S;let w=x;for(;v[w]&&!(w>=A);)++w;if(w-x>16&&v.buffer&&d)return d.decode(v.subarray(x,w));let T="";for(;x<w;){let R=v[x++];if(!(R&128)){T+=String.fromCharCode(R);continue}const D=v[x++]&63;if((R&224)===192){T+=String.fromCharCode((R&31)<<6|D);continue}const N=v[x++]&63;if((R&240)===224?R=(R&15)<<12|D<<6|N:R=(R&7)<<18|D<<12|N<<6|v[x++]&63,R<65536)T+=String.fromCharCode(R);else{const L=R-65536;T+=String.fromCharCode(55296|L>>10,56320|L&1023)}}return T}function m(v,x){return v?f(r.HEAPU8,v,x):""}const y={emscripten_get_now:OY,emscripten_memcpy_big:o,emscripten_resize_heap:u,fd_write:()=>0};async function g(){const x=await e({env:y,wasi_snapshot_preview1:y});t=x.memory,a(t.buffer),Object.assign(r,x),r.UTF8ToString=m}return await g(),r}var LY=Object.defineProperty,MY=(e,t,n)=>t in e?LY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kt=(e,t,n)=>MY(e,typeof t!="symbol"?t+"":t,n);let en=null;function jY(e){throw new u_(e.UTF8ToString(e.getLastOnigError()))}class jh{constructor(t){Kt(this,"utf16Length"),Kt(this,"utf8Length"),Kt(this,"utf16Value"),Kt(this,"utf8Value"),Kt(this,"utf16OffsetToUtf8"),Kt(this,"utf8OffsetToUtf16");const n=t.length,r=jh._utf8ByteLength(t),a=r!==n,o=a?new Uint32Array(n+1):null;a&&(o[n]=r);const l=a?new Uint32Array(r+1):null;a&&(l[r]=n);const u=new Uint8Array(r);let d=0;for(let f=0;f<n;f++){const m=t.charCodeAt(f);let y=m,g=!1;if(m>=55296&&m<=56319&&f+1<n){const v=t.charCodeAt(f+1);v>=56320&&v<=57343&&(y=(m-55296<<10)+65536|v-56320,g=!0)}a&&(o[f]=d,g&&(o[f+1]=d),y<=127?l[d+0]=f:y<=2047?(l[d+0]=f,l[d+1]=f):y<=65535?(l[d+0]=f,l[d+1]=f,l[d+2]=f):(l[d+0]=f,l[d+1]=f,l[d+2]=f,l[d+3]=f)),y<=127?u[d++]=y:y<=2047?(u[d++]=192|(y&1984)>>>6,u[d++]=128|(y&63)>>>0):y<=65535?(u[d++]=224|(y&61440)>>>12,u[d++]=128|(y&4032)>>>6,u[d++]=128|(y&63)>>>0):(u[d++]=240|(y&1835008)>>>18,u[d++]=128|(y&258048)>>>12,u[d++]=128|(y&4032)>>>6,u[d++]=128|(y&63)>>>0),g&&f++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=u,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){const o=t.charCodeAt(r);let l=o,u=!1;if(o>=55296&&o<=56319&&r+1<a){const d=t.charCodeAt(r+1);d>=56320&&d<=57343&&(l=(o-55296<<10)+65536|d-56320,u=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,u&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Ph=class Vr{constructor(t){if(Kt(this,"id",++Vr.LAST_ID),Kt(this,"_onigBinding"),Kt(this,"content"),Kt(this,"utf16Length"),Kt(this,"utf8Length"),Kt(this,"utf16OffsetToUtf8"),Kt(this,"utf8OffsetToUtf16"),Kt(this,"ptr"),!en)throw new u_("Must invoke loadWasm first.");this._onigBinding=en,this.content=t;const n=new jh(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Vr._sharedPtrInUse?(Vr._sharedPtr||(Vr._sharedPtr=en.omalloc(1e4)),Vr._sharedPtrInUse=!0,en.HEAPU8.set(n.utf8Value,Vr._sharedPtr),this.ptr=Vr._sharedPtr):this.ptr=n.createString(en)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Vr._sharedPtr?Vr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Kt(Ph,"LAST_ID",0);Kt(Ph,"_sharedPtr",0);Kt(Ph,"_sharedPtrInUse",!1);let AD=Ph;class PY{constructor(t){if(Kt(this,"_onigBinding"),Kt(this,"_ptr"),!en)throw new u_("Must invoke loadWasm first.");const n=[],r=[];for(let u=0,d=t.length;u<d;u++){const f=new jh(t[u]);n[u]=f.createString(en),r[u]=f.utf8Length}const a=en.omalloc(4*t.length);en.HEAPU32.set(n,a/4);const o=en.omalloc(4*t.length);en.HEAPU32.set(r,o/4);const l=en.createOnigScanner(a,o,t.length);for(let u=0,d=t.length;u<d;u++)en.ofree(n[u]);en.ofree(o),en.ofree(a),l===0&&jY(en),this._onigBinding=en,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new AD(t);const o=this._findNextMatchSync(t,n,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){const o=this._onigBinding,l=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(l===0)return null;const u=o.HEAPU32;let d=l/4;const f=u[d++],m=u[d++],y=[];for(let g=0;g<m;g++){const v=t.convertUtf8OffsetToUtf16(u[d++]),x=t.convertUtf8OffsetToUtf16(u[d++]);y[g]={start:v,end:x,length:x-v}}return{index:f,captureIndices:y}}}function VY(e){return typeof e.instantiator=="function"}function BY(e){return typeof e.default=="function"}function zY(e){return typeof e.data<"u"}function UY(e){return typeof Response<"u"&&e instanceof Response}function HY(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Yd;function FY(e){if(Yd)return Yd;async function t(){en=await IY(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),VY(r)?r=await r.instantiator(n):BY(r)?r=await r.default(n):(zY(r)&&(r=r.data),UY(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await GY(r)(n):r=await $Y(r)(n):HY(r)?r=await ry(r)(n):r instanceof WebAssembly.Module?r=await ry(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await ry(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Yd=t(),Yd}function ry(e){return t=>WebAssembly.instantiate(e,t)}function GY(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $Y(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function qY(e){return e&&await FY(e),{createScanner(t){return new PY(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new AD(t)}}}const KY=EY({langs:CY,themes:NY,engine:()=>qY(I(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:WY}=AY(KY,{guessEmbeddedLanguages:zW}),YY=({children:e})=>b.jsx("div",{children:b.jsx("pre",{children:b.jsx("code",{children:e.split(`
278
+ `).map((t,n)=>b.jsx("span",{className:"line block w-full",children:t},n))})})}),ZY=({children:e,lang:t,isDarkMode:n,onChange:r,...a})=>{const[o,l]=E.useState(null),u=E.useMemo(()=>({lang:t,theme:n?"github-dark":"github-light",transformers:[wq(),Cq(),Iq(),Tq(),_q(),Eq()]}),[t,n]);return E.useEffect(()=>{WY(e,u).then(d=>l(d)).catch(d=>console.error(d))},[u,e]),o?b.jsx("div",{dangerouslySetInnerHTML:{__html:o},...a,style:{backgroundColor:"transparent"}}):b.jsx(YY,{children:e})},XY=({className:e,onChange:t,isEditable:n,...r})=>b.jsx(ZY,{className:Ae("flex w-full",e),contentEditable:n,onInput:a=>t==null?void 0:t(a.currentTarget.textContent??""),...r}),wD=E.createContext({packageManager:"npm",setPackageManager:()=>{},codeFormat:"typescript",setCodeFormat:()=>{},contentDeclarationFormat:"typescript",setContentDeclarationFormat:()=>{}}),Vh=()=>E.useContext(wD),QY=({children:e})=>{const[t,n]=Tc("packageManager","npm"),[r,a]=Tc("codeFormat","typescript"),[o,l]=Tc("contentDeclarationFormat","typescript");return b.jsx(wD,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:a,contentDeclarationFormat:o,setContentDeclarationFormat:l},children:e})},JY=({children:e,...t})=>{const{packageManager:n,codeFormat:r,contentDeclarationFormat:a}=Vh(),o=typeof t.packageManager>"u",l=n===t.packageManager,u=typeof t.codeFormat>"u",d=r===t.codeFormat,f=typeof t.contentDeclarationFormat>"u",m=a===t.contentDeclarationFormat;return(o||l)&&(u||d)&&(f||m)?e:b.jsx(b.Fragment,{})},eZ=()=>{const{codeFormat:e,setCodeFormat:t,setContentDeclarationFormat:n}=Vh();return b.jsxs(je,{value:e,onValueChange:r=>{t(r),n(r)},children:[b.jsx(je.Trigger,{children:b.jsx(je.Value,{placeholder:"Code Format"})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:"typescript",children:"TypeScript"}),b.jsx(je.Item,{value:"esm",children:"ESM"}),b.jsx(je.Item,{value:"commonjs",children:"CommonJS"})]})]})},tZ=()=>{const{contentDeclarationFormat:e,setContentDeclarationFormat:t}=Vh();return b.jsxs(je,{value:e,onValueChange:t,children:[b.jsx(je.Trigger,{children:b.jsx(je.Value,{placeholder:"Dictionary Format"})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:"typescript",children:"TypeScript"}),b.jsx(je.Item,{value:"commonjs",children:"CommonJS"}),b.jsx(je.Item,{value:"esm",children:"ESM"}),b.jsx(je.Item,{value:"json",children:"JSON"})]})]})},nZ={key:"copy-button",content:{label:pe({en:"Copy content",fr:"Copier le contenu",es:"Copiar contenido","en-GB":"Copy content",de:"Inhalt kopieren",ja:"コンテンツをコピー",ko:"콘텐츠 복사",zh:"复制内容",it:"Copia contenuto",pt:"Copiar conteúdo",hi:"सामग्री कॉपी करें",ar:"نسخ المحتوى",ru:"Копировать содержимое"})}},TD=({content:e})=>{const[t,n]=E.useState(!1),{label:r}=nn(nZ),a=async()=>{try{await navigator.clipboard.writeText(e),n(!0)}catch(o){console.error("Failed to copy text: ",o)}};return E.useEffect(()=>{const o=setTimeout(()=>{n(!1)},1e3);return()=>clearTimeout(o)},[t]),b.jsx(yt,{Icon:t?wV:CV,onClick:a,variant:"hoverable",color:"text",label:r.value,size:"icon-sm"})},rZ=()=>{const{packageManager:e,setPackageManager:t}=Vh();return b.jsxs(je,{value:e,onValueChange:t,children:[b.jsx(je.Trigger,{children:b.jsx(je.Value,{placeholder:"Package Manager"})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:"npm",children:"npm"}),b.jsx(je.Item,{value:"pnpm",children:"pnpm"}),b.jsx(je.Item,{value:"yarn",children:"yarn"})]})]})},iZ=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:a=!0,className:o,fileName:l,packageManager:u,codeFormat:d,contentDeclarationFormat:f,...m})=>{const y=e.endsWith(`
279
+ `)?e.slice(0,-1):e,g=u||d||f;return b.jsx(JY,{packageManager:u,codeFormat:d,contentDeclarationFormat:f,children:b.jsxs(Jr,{className:Ae("relative text-sm leading-6",a&&"with-line-number ml-0",o),transparency:"lg",...m,children:[r&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"bg-card/50 text-neutral grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl py-1.5 pl-4 pr-12 text-xs",children:[b.jsx("span",{className:"truncate",children:l??t}),b.jsxs("div",{className:"flex items-center gap-2",children:[u&&b.jsx(rZ,{}),d&&b.jsx(eZ,{}),f&&b.jsx(tZ,{})]})]}),b.jsx("div",{className:"sticky top-28",children:b.jsx("div",{className:Ae("absolute bottom-0 right-2 flex h-7 items-center",g&&"h-11"),children:b.jsx(TD,{content:y})})})]}),b.jsx("div",{className:"grid size-full grid-cols-[0px] overflow-auto p-3",children:b.jsx(XY,{lang:t,isDarkMode:n,children:y})})]})})},aZ=({children:e,isDarkMode:t,locale:n,options:r})=>{const{overrides:a,...o}=r??{};return b.jsx(QY,{children:b.jsx(hq,{options:{overrides:{h1:l=>b.jsx(U8,{isClickable:!0,...l}),h2:l=>b.jsx(H8,{isClickable:!0,...l}),h3:l=>b.jsx(Yb,{isClickable:!0,...l}),h4:l=>b.jsx(F8,{isClickable:!0,...l}),code:l=>{var u;return typeof l.className>"u"?b.jsx("strong",{className:"bg-card/60 rounded p-1 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur",children:l.children}):b.jsx(iZ,{isDarkMode:t,language:(u=l.className)==null?void 0:u.replace("lang-",""),...l})},blockquote:({className:l,...u})=>b.jsx("blockquote",{className:Ae("border-card text-neutral mt-5 flex flex-col gap-3 border-l-4 pl-5",l),...u}),ul:({className:l,...u})=>b.jsx("ul",{className:Ae("mt-5 flex flex-col gap-3 pl-5",l),...u}),ol:({className:l,...u})=>b.jsx("ol",{className:Ae("mt-5 flex flex-col gap-3 pl-5",l),...u}),li:({className:l,...u})=>b.jsx("li",{className:Ae("list-disc",l),...u}),img:({className:l,...u})=>b.jsx("img",{...u,loading:"lazy",className:Ae("max-w-full rounded-md",l),src:`${u.src}?raw=true`}),a:l=>{var u;return b.jsx(Zb,{color:"neutral",isExternalLink:(u=l.href)==null?void 0:u.startsWith("http"),underlined:!0,locale:n,...l})},pre:l=>l.children,table:({className:l,...u})=>b.jsx("div",{className:"grid w-full max-w-full overflow-scroll rounded",children:b.jsx("table",{className:Ae("max-w-full table-auto overflow-hidden text-left",l),...u})}),th:({className:l,...u})=>b.jsx("th",{className:Ae("border-neutral bg-neutral/10 border-b p-4",l),...u}),tr:({className:l,...u})=>b.jsx("tr",{className:Ae("hover:bg-neutral/10 hover:/10",l),...u}),td:({className:l,...u})=>b.jsx("td",{className:Ae("border-b border-neutral-500/50 p-4",l),...u}),...a},wrapper:({className:l,...u})=>b.jsxs(b.Fragment,{children:[b.jsx(pq,{}),b.jsx("div",{className:Ae("flex flex-col gap-8 p-10",l),...u})]}),...o},children:e??""})})},sZ=e=>{let t,n;if(typeof e=="number"||!isNaN(Number(e)))t="=",n=e.toString();else if(typeof e=="string"){const a=["<=",">=","<",">","="].find(o=>e.startsWith(o));a&&(t=a,n=e.slice(a.length))}return{comparator:t,numberValue:n}},oZ=({value:e,onChange:t})=>{const{comparator:n,numberValue:r}=E.useMemo(()=>sZ(e),[e]),[a,o]=E.useState(n??null),[l,u]=E.useState(r??null);return E.useEffect(()=>{if(a&&l&&(a!==n||l!==r)){const d=`${a}${l}`;t(d)}},[a,n,r,l,t]),b.jsxs("div",{className:"flex gap-1",children:[b.jsxs(je,{onValueChange:o,defaultValue:n,children:[b.jsx(je.Trigger,{className:"w-20",children:b.jsx(je.Value,{placeholder:"Select a comparator"})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:"<",children:"<"}),b.jsx(je.Item,{value:"<=",children:"<="}),b.jsx(je.Item,{value:"=",children:"="}),b.jsx(je.Item,{value:">=",children:">="}),b.jsx(je.Item,{value:">",children:">"})]})]}),b.jsx($o,{type:"number","aria-label":"Quantity",defaultValue:l??void 0,onChange:d=>u(d.target.value),className:"min-w-4"})]})},Bh={key:"navigation-view",content:{tsxNotEditable:pe({en:"React node is not editable","en-GB":"React node is not editable",fr:"Node React non éditable",es:"Nodo React no editable",de:"React-Knoten ist nicht bearbeitbar",ja:"編集できないReactノードです",ko:"편집할 수 없는 React 노드입니다",zh:"不可编辑的 React 节点",it:"Node React non modificabile",pt:"Nó React não editável",hi:"सम्पादित न करने योग्य React नोड",ar:"عقدة React غير قابلة للتحرير",ru:"React-узел не редактируемый"}),goToField:{label:pe({en:"Go to field","en-GB":"Go to field",fr:"Aller au champ",es:"Ir al campo",de:"Zum Feld gehen",ja:"フィールドに移動",ko:"필드로 이동",zh:"转到字段",it:"Vai al campo",pt:"Ir para o campo",hi:"फ़ील्ड पर जाएं",ar:"اذهب إلى الحقل",ru:"Перейти к полю"})},addNewElement:{label:pe({en:"Click to add element","en-GB":"Click to add element",fr:"Cliquez pour ajouter un élément",es:"Haga clic para agregar un elemento",de:"Klicken Sie, um ein Element hinzuzufügen",ja:"要素を追加するにはクリック",ko:"요소를 추가하려면 클릭하세요",zh:"点击添加元素",it:"Clicca per aggiungere un elemento",pt:"Clique para adicionar um elemento",hi:"तत्व जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة عنصر",ru:"Нажмите, чтобы добавить элемент"}),text:pe({en:"Add new element","en-GB":"Add new element",fr:"Ajouter un nouvel élément",es:"Agregar nuevo elemento",de:"Neues Element hinzufügen",ja:"新しい要素を追加",ko:"새 요소 추가",zh:"添加新元素",it:"Aggiungi nuovo elemento",pt:"Adicionar novo elemento",hi:"नया तत्व जोड़ें",ar:"أضف عنصرًا جديدًا",ru:"Добавить новый элемент"})},removeElement:{label:pe({en:"Click to remove element","en-GB":"Click to remove element",fr:"Cliquez pour supprimer un élément",es:"Haga clic para eliminar un elemento",de:"Klicken Sie, um ein Element zu entfernen",ja:"要素を削除するにはクリック",ko:"요소를 제거하려면 클릭하세요",zh:"点击删除元素",it:"Clicca per rimuovere un elemento",pt:"Clique para remover um elemento",hi:"तत्व निकालने के लिए क्लिक करें",ar:"انقر لإزالة عنصر",ru:"Нажмите, чтобы удалить элемент"}),text:pe({en:"Remove element","en-GB":"Remove element",fr:"Supprimer l’élément",es:"Eliminar elemento",de:"Element entfernen",ja:"要素を削除",ko:"요소 제거",zh:"删除元素",it:"Rimuovi elemento",pt:"Remover elemento",hi:"तत्व निकालें",ar:"إزالة عنصر",ru:"Удалить элемент"})},addNewEnumeration:{label:pe({en:"Click to add enumeration","en-GB":"Click to add enumeration",fr:"Cliquez pour ajouter une énumération",es:"Haga clic para agregar una enumeración",de:"Klicken Sie, um eine Aufzählung hinzuzufügen",ja:"列挙を追加するにはクリック",ko:"열거를 추가하려면 클릭하세요",zh:"点击添加枚举",it:"Clicca per aggiungere un enumerazione",pt:"Clique para adicionar uma enumeração",hi:"सूची जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة تعداد",ru:"Нажмите, чтобы добавить перечисление"}),text:pe({en:"Add new enumeration","en-GB":"Add new enumeration",fr:"Ajouter une nouvelle énumération",es:"Agregar nueva enumeración",de:"Neue Aufzählung hinzufügen",ja:"新しい列挙を追加",ko:"새 목록 추가",zh:"添加新枚举",it:"Aggiungi nuova enumerazione",pt:"Adicionar nova enumeração",hi:"नया सूची जोड़ें",ar:"أضف تعدادًا جديدًا",ru:"Добавить новое перечисление"})},removeEnumeration:{label:pe({en:"Click to remove enumeration","en-GB":"Click to remove enumeration",fr:"Cliquez pour supprimer une énumération",es:"Haga clic para eliminar una enumeración",de:"Klicken Sie, um eine Aufzählung zu entfernen",ja:"列挙を削除するにはクリック",ko:"목록을 제거하려면 클릭하세요",zh:"点击删除枚举",it:"Clicca per rimuovere un'enumerazione",pt:"Clique para remover uma enumeração",hi:"सूची निकालने के लिए क्लिक करें",ar:"انقر لإزالة تعداد",ru:"Нажмите, чтобы удалить перечисление"}),text:pe({en:"Remove enumeration","en-GB":"Remove enumeration",fr:"Supprimer l’énumération",es:"Eliminar enumeración",de:"Aufzählung entfernen",ja:"列挙を削除",ko:"목록 제거",zh:"删除枚举",it:"Rimuovi enumerazione",pt:"Remover enumeração",hi:"सूची निकालें",ar:"إزالة تعداد",ru:"Удалить перечисление"})},addNewCondition:{label:pe({en:"Click to add condition","en-GB":"Click to add condition",fr:"Cliquez pour ajouter une condition",es:"Haga clic para agregar una condición",de:"Klicken Sie, um eine Bedingung hinzuzufügen",ja:"条件を追加するにはクリック",ko:"조건을 추가하려면 클릭하세요",zh:"点击添加条件",it:"Clicca per aggiungere una condizione",pt:"Clique para adicionar uma condição",hi:"शर्ते जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة شرط",ru:"Нажмите, чтобы добавить условие"}),text:pe({en:"Add new condition","en-GB":"Add new condition",fr:"Ajouter une nouvelle condition",es:"Agregar nueva condición",de:"Neue Bedingung hinzufügen",ja:"新しい条件を追加",ko:"새 조건 추가",zh:"添加新条件",it:"Aggiungi nuova condizione",pt:"Adicionar nova condição",hi:"नया शर्ते जोड़ें",ar:"أضف شرطًا جديدًا",ru:"Добавить новое условие"})}}},lZ=({keyPath:e,dictionary:t,...n})=>{const{editedContent:r,addEditedContent:a}=Tn(),o=Zr(),{auditContentDeclarationField:l,isLoading:u}=v2();return b.jsx(s7,{variant:"default",onContentChange:d=>a(t.key,d,e),additionalButtons:b.jsx(yt,{Icon:I1,label:"Audit",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",isLoading:u,onClick:()=>{l({fileContent:JSON.stringify({...t,...(r==null?void 0:r[t.key])??{}}),keyPath:e,locales:o.internationalization.locales??[],openAiApiKey:o.editor.openAiApiKey,model:o.editor.openAiApiModel,temperature:o.editor.openAiApiTemperature}).then(d=>{if(d!=null&&d.data)try{const f=d.data.fileContent;a(t.key,f,e)}catch(f){console.error(f)}})}}),...n})},cZ=({keyPath:e,dictionary:t,...n})=>{const{addEditedContent:r}=Tn();return b.jsx(cv,{variant:"default",onContentChange:a=>r(t.key,a,e),...n})},uZ=[{content:"False",value:!1},{content:"True",value:!0}],dZ=({dictionary:e,keyPath:t,...n})=>{const{addEditedContent:r}=Tn();return b.jsx(cu,{choices:uZ,value:!0,onChange:a=>r(e.key,a,t),color:"text",size:"sm",...n})},fZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{locale:a,defaultLocale:o}=Nv(),{selectedLocales:l,availableLocales:u}=_O(),d=e[K.Translation],f=Object.keys(d),y=u.length>l.length?l:[...new Set([...u,...f])],g=e[K.Translation];return b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:y.map(v=>b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 w-full p-2 text-xs",children:ef(v,a)}),b.jsx("tr",{children:b.jsx(Es,{section:g[v]??cr(g[o]),keyPath:[...t,{type:K.Translation,key:v}],dictionary:n,renderSection:r})})]},v))})})},hZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=Tn(),{addNewEnumeration:o,removeEnumeration:l}=nn(Bh),u=e[K.Enumeration],d=Object.keys(u)[0];return b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:Object.keys(e[K.Enumeration]).map(f=>{const m=[...t,{type:K.Enumeration}];return b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 w-full",children:b.jsx("div",{className:"flex flex-1",children:b.jsx(yt,{label:l.label.value,variant:"hoverable",color:"text",Icon:fh,className:"ml-auto",onClick:()=>a(n.key,void 0,m),children:l.text})})}),b.jsx("tr",{className:"w-full p-2",children:b.jsx(oZ,{value:f,onChange:y=>{const g=e[K.Enumeration],v=r7(g,f,y),x={...e,[K.Enumeration]:v};a(n.key,x,t)}})}),b.jsx("tr",{className:"block w-full",children:b.jsx(d_,{section:u[f]??cr(u[d]),keyPath:m,dictionary:n,renderSection:r})})]},f)})})}),b.jsx(yt,{label:o.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>a(n.key,cr(u[d])??"",[...t,{type:K.Enumeration,key:"unknown"}]),Icon:dh,className:"m-2",children:o.text})]})},mZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const a=e[K.Condition];return b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:["true","false","fallback"].map(o=>b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 block w-full p-2 text-xs",children:String(o)},o),b.jsx("tr",{className:"block w-full",children:b.jsx(Es,{section:a[o]??cr(a.true),keyPath:[...t,{type:K.Condition,key:o}],dictionary:n,renderSection:r})},o)]},o))})})},pZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=Tn(),{addNewElement:o,removeElement:l}=nn(Bh);return b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:e.map((u,d)=>b.jsxs(E.Fragment,{children:[b.jsxs("tr",{className:"mt-2 flex w-full justify-between gap-2 p-2",children:[b.jsx("span",{className:"text-xs",children:String(d)}),b.jsx(yt,{label:l.label.value,variant:"hoverable",color:"neutral",className:"ml-auto",textAlign:"left",onClick:()=>{const f=[...t,{type:K.Array,key:e.length}];a(n.key,void 0,f)},Icon:fh,children:l.text})]}),b.jsx("tr",{className:"block w-full",children:b.jsx(Es,{section:u??cr(e[0]),keyPath:[...t,{type:K.Array,key:d}],dictionary:n,renderSection:r})})]},JSON.stringify(u)))})}),b.jsx(yt,{label:o.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>{const u=[...t,{type:K.Array,key:e.length}];a(n.key,cr(e[0])??"",u,!1)},Icon:dh,children:o.text})]})},gZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>b.jsx(b.Fragment,{children:b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex flex-col gap-2",children:Object.keys(e).map(a=>{const o=[...t,{type:K.Object,key:a}],l=e,u=Object.keys(l)[0],d=l[a]??cr(l[u]);return b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 p-2 text-xs",children:String(a)},JSON.stringify(d)),b.jsx("tr",{className:"block w-full",children:b.jsx(d_,{section:d,keyPath:o,dictionary:n,renderSection:r})},JSON.stringify(d))]},a)})})})}),yZ=({section:e,keyPath:t,dictionary:n,isDarkMode:r,onContentChange:a})=>{const[o,l]=E.useState(0),u=[{content:"Edit",value:0},{content:"Preview",value:1}],d=[...t,{type:K.Markdown}],f=e[K.Markdown];return b.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[b.jsx(cu,{choices:u,value:o,onChange:l,color:"text",size:"sm",className:"ml-auto"}),b.jsx(Es,{section:f,keyPath:d,dictionary:n,renderSection:o===1?m=>b.jsx(aZ,{isDarkMode:r,children:m}):void 0,onContentChange:a})]})},vZ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:K.Insertion}],a=e[K.Insertion];return b.jsx("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:b.jsx(Es,{section:a,keyPath:r,...n})})},bZ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:K.File}],a=e[K.File],{content:o}=e;return b.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[b.jsxs("span",{className:"text-neutral text-sm",children:[a," "]}),b.jsx(Es,{section:o,keyPath:r,...n})]})},_Z=({keyPath:e,dictionary:t,renderSection:n,section:r,...a})=>{const{addEditedContent:o}=Tn(),l=r[K.Nested],u=[...e,{type:K.Nested}];return b.jsxs("div",{className:"w-full p-2",children:[b.jsx(Ey,{children:"Dictionary key"}),b.jsx(cv,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{o(t.key,{...l,dictionaryKey:String(d)},u)},children:l.dictionaryKey??""}),b.jsx(Ey,{children:"Path (optional)"}),b.jsx(cv,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{o(t.key,{...l,path:d!==""?d:void 0},u)},children:l.path??""})]})},d_=({section:e,keyPath:t,dictionary:n,renderSection:r,isDarkMode:a})=>{const{tsxNotEditable:o}=nn(Bh),l=Vo(e);return l===K.ReactNode?b.jsxs(b.Fragment,{children:[b.jsx("span",{children:"[React Node]"}),b.jsx("span",{className:"text-neutral text-xs",children:o})]}):l===K.Nested?b.jsx(_Z,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Translation?b.jsx(fZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Enumeration?b.jsx(hZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Condition?b.jsx(mZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Insertion?b.jsx(vZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Markdown?b.jsx(yZ,{dictionary:n,keyPath:t,section:e,isDarkMode:a}):l===K.File?b.jsx(bZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Array?b.jsx(pZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Object?b.jsx(gZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Number?b.jsx("div",{className:"w-full p-2",children:b.jsx(cZ,{dictionary:n,keyPath:t,type:"number","aria-label":"Edit field",children:e})}):l===K.Text?b.jsx("div",{className:"w-full p-2",children:typeof r=="function"?r(e):b.jsx(lZ,{variant:"default","aria-label":"Edit field",keyPath:t,dictionary:n,children:e})}):l===K.Boolean?b.jsx("div",{className:"w-full p-2",children:b.jsx(dZ,{dictionary:n,keyPath:t,value:e})}):b.jsxs("div",{className:"w-full p-2",children:["Error. Format not supported.",JSON.stringify(e,null,2),JSON.stringify(t,null,2),"NodeType : ",l]})},Es=e=>b.jsx(Jr,{border:!0,background:"none",className:"top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky",roundedSize:"xl",children:b.jsx(d_,{...e})}),Kc=e=>{const t=FT(e),n=Vo(e);return t&&(n===K.ReactNode||n===K.File)?!0:t&&typeof t.nodeType=="string"?Kc(t[t.nodeType]):typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"},xZ=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r})=>{const a=[{text:t,onClick:()=>n([])},...e.map((o,l)=>{var u;return{onClick:()=>n(e.slice(0,l+1)),text:((u=o.key)==null?void 0:u.toString())??""}})];return b.jsx(X8,{links:a,locale:r,elementType:"location"})},yf=e=>String(e).replace(/([A-Z])/g," $1").toLowerCase().trim(),mo=({section:e,keyPath:t,dictionaryKey:n})=>{const{locales:r}=tt==null?void 0:tt.internationalization,a=Hr(e,t),{addEditedContent:o}=Bo(),{setFocusedContentKeyPath:l,focusedContent:u}=ba(),{addNewElement:d,goToField:f}=nn(Bh),m=Vo(a),y=v=>{var x;return(((x=u==null?void 0:u.keyPath)==null?void 0:x.length)??0)>0&&Zc(v,(u==null?void 0:u.keyPath)??[])},g=Kc(a);if(!a)return b.jsx(b.Fragment,{});if(g)return b.jsx(yt,{label:f.label.value,variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(t),IconRight:xf,children:yf(t[t.length-1].key)});if(typeof a=="object"){if(m===K.ReactNode)return b.jsx(b.Fragment,{children:"React Node"});if(m===K.Translation)return b.jsx("div",{className:"flex flex-col justify-between gap-2",children:r.map(x=>{const S=[...t,{type:K.Translation,key:x}];return b.jsx(mo,{keyPath:S,section:e,dictionaryKey:n},x)})});if(m===K.Enumeration||m===K.Condition)return b.jsx("div",{className:"flex flex-col justify-between gap-2",children:Object.keys(a[m]).map(x=>{const S=[...t,{type:m,key:x}];return b.jsx(mo,{keyPath:S,section:e,dictionaryKey:n},x)})});if(m===K.Array)return b.jsxs("div",{className:"flex flex-col justify-between gap-2",children:[a.map((x,S)=>{const A=[...t,{type:K.Array,key:S}];return b.jsx(mo,{keyPath:A,section:e,dictionaryKey:n},JSON.stringify(A))}),b.jsx(yt,{label:d.label.value,variant:"hoverable",color:"neutral",textAlign:"left",onClick:()=>{const x=[...t,{type:K.Array,key:a.length}],S=a,A=cr(S[S.length-1])??"";o(n,A,x,!1),l(x)},Icon:dh,children:d.text})]});if(typeof a.nodeType=="string"){const x=[...t,{type:a.nodeType}];return b.jsx(mo,{keyPath:x,section:e,dictionaryKey:n})}const v=Object.keys(a);return b.jsx("div",{className:"flex w-full max-w-full flex-col justify-between gap-2",children:v.map(x=>{const S=[...t,{type:K.Object,key:x}],A=Hr(e,S);return Kc(A)?b.jsx(yt,{label:`${f.label.value} ${x}`,isActive:y(S),variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(S),IconRight:xf,children:yf(x)},x):b.jsx(K1,{label:`${f.label.value} ${x}`,isActive:y(S),onClick:()=>l(S),header:yf(x),children:b.jsx("div",{className:"mt-2 flex w-full max-w-full",children:b.jsx("div",{className:"flex-1 pl-10",children:b.jsx(mo,{keyPath:S,section:e,dictionaryKey:n})})})},x)})})}return b.jsxs(b.Fragment,{children:["Error loading section --",m,"--",JSON.stringify(a),"--",JSON.stringify(t)]})},EZ=({dictionary:e,isDarkMode:t})=>{var g,v;const{content:n,key:r}=e,{editedContent:a}=Tn(),{focusedContent:o,setFocusedContentKeyPath:l}=ba(),u=o==null?void 0:o.keyPath,d=typeof((g=a==null?void 0:a[e.key])==null?void 0:g.content)>"u"?n:(v=a==null?void 0:a[r])==null?void 0:v.content,f=Hr(d,u??[]),m=Kc(d),y=Kc(f);return E.useEffect(()=>{var x;typeof f>"u"&&l(((x=o==null?void 0:o.keyPath)==null?void 0:x.slice(0,-1))??[])},[]),b.jsxs("div",{children:[b.jsxs("div",{className:"mb-6 flex items-center justify-between gap-2",children:[b.jsx(xZ,{dictionaryKey:r,keyPath:u??[],onClickKeyPath:l}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsx(n7,{})})]}),b.jsxs("div",{className:"flex gap-2 max-md:flex-col",children:[typeof d=="object"&&d&&!m&&Object.keys(d).length>0&&b.jsx(Jr,{border:!0,background:"none",className:"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]",roundedSize:"xl",transparency:"sm",children:b.jsx(mo,{keyPath:[],section:d,dictionaryKey:r})}),(y||(u??[]).length>0)&&b.jsx(Es,{keyPath:u??[],section:f,dictionary:e,isDarkMode:t})]})]})},SZ={key:"dictionary-details",content:{titleInput:{label:pe({en:"Title","en-GB":"Title",fr:"Titre",es:"Título",de:"Titel",ja:"タイトル",ko:"제목",zh:"标题",it:"Titolo",pt:"Título",hi:"शीर्षक",ar:"العنوان",ru:"Заголовок"}),description:pe({en:"The title of your dictionary allows you to easily identify it","en-GB":"The title of your dictionary allows you to easily identify it",fr:"Le titre de votre dictionnaire permet de l'identifier facilement",es:"El título de su diccionario le permite identificar fácilmente",de:"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren",ja:"辞書のタイトルは、それを簡単に識別することができます",ko:"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다",zh:"字典的标题使您能够轻松识别它",it:"Il titolo del tuo dizionario ti consente di identificarlo facilmente",pt:"O título do seu dicionário permite que você o identifique facilmente",hi:"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है",ar:"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة",ru:"Название вашего словаря позволяет легко его идентифицировать"}),placeholder:pe({en:"Enter the title of your dictionary","en-GB":"Enter the title of your dictionary",fr:"Entrez le titre de votre dictionnaire",es:"Ingrese el título de su diccionario",de:"Geben Sie den Titel Ihres Wörterbuchs ein",ja:"辞書のタイトルを入力してください",ko:"사전의 제목을 입력하세요",zh:"输入字典的标题",it:"Inserisci il titolo del tuo dizionario",pt:"Insira o título do seu dicionário",hi:"आपके शब्दकोश का शीर्षक दर्ज करें",ar:"أدخل عنوان القاموس الخاص بك",ru:"Введите название вашего словаря"})},keyInput:{label:pe({en:"Key","en-GB":"Key",fr:"Clé",es:"Clave",de:"Schlüssel",ja:"キー",ko:"키",zh:"键",it:"Chiave",pt:"Chave",hi:"कुंजी",ar:"مفتاح",ru:"Ключ"}),description:pe({en:"The key of your dictionary is used to identify it in the application","en-GB":"The key of your dictionary is used to identify it in the application",fr:"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application",es:"La clave de su diccionario se utiliza para identificarla en la aplicación",de:"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren",ja:"辞書のキーは、アプリケーション内でそれを識別するために使用されます",ko:"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다",zh:"字典的键用于在应用程序中识别它",it:"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione",pt:"A chave do seu dicionário é usada para identificá-lo no aplicativo",hi:"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है",ar:"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق",ru:"Ключ вашего словаря используется для его идентификации в приложении"}),placeholder:pe({en:"Enter the key of your dictionary","en-GB":"Enter the key of your dictionary",fr:"Entrez la clé de votre dictionnaire",es:"Ingrese la clave de su diccionario",de:"Geben Sie den Schlüssel Ihres Wörterbuchs ein",ja:"辞書のキーを入力してください",ko:"사전의 키를 입력하세요",zh:"输入字典的键",it:"Inserisci la chiave del tuo dizionario",pt:"Insira a chave do seu dicionário",hi:"अपने शब्दकोश की कुंजी दर्ज करें",ar:"أدخل مفتاح القاموس الخاص بك",ru:"Введите ключ вашего словаря"})},descriptionInput:{label:pe({en:"Description","en-GB":"Description",fr:"Description",es:"Descripción",de:"Beschreibung",ja:"説明",ko:"설명",zh:"描述",it:"Descrizione",pt:"Descrição",hi:"विवरण",ar:"الوصف",ru:"Описание"}),placeholder:pe({en:"Enter the description of your dictionary","en-GB":"Enter the description of your dictionary",fr:"Entrez la description de votre dictionnaire",es:"Ingrese la descripción de su diccionario",de:"Geben Sie die Beschreibung Ihres Wörterbuchs ein",ja:"辞書の説明を入力してください",ko:"사전의 설명을 입력하세요",zh:"输入字典的描述",it:"Inserisci la descrizione del tuo dizionario",pt:"Insira a descrição do seu dicionário",hi:"अपने शब्दकोश का विवरण दर्ज करें",ar:"أدخل وصف القاموس الخاص بك",ru:"Введите описание вашего словаря"}),description:pe({en:"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.","en-GB":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.",fr:"La description de votre dictionnaire permet d'identifier facilement l'utilisateur en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire.",es:"La descripción de su diccionario le permite identificar fácilmente el usuario utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario.",de:"Die Beschreibung Ihres Wörterbuchs ermöglicht es Ihnen, es mit Schlüsselwörtern leicht zu identifizieren. Sie wird auch verwendet, um nach Ihrem Wörterbuch zu suchen und der KI zu helfen, Ihr Wörterbuch zu verstehen.",ja:"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。",ko:"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다.",zh:"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。",it:"La descrizione del tuo dizionario ti consente di identificarlo facilmente utilizzando parole chiave. Viene anche utilizzata per cercare il tuo dizionario e per assistere l'IA nella comprensione del tuo dizionario.",pt:"A descrição do seu dicionário permite que você o identifique facilmente usando palavras-chave. Também é usada para pesquisar seu dicionário e para ajudar a IA a entender seu dicionário.",hi:"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।",ar:"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك.",ru:"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."})},projectInput:{label:pe({en:"Projects","en-GB":"Projects",fr:"Projets",es:"Proyectos",de:"Projekte",ja:"プロジェクト",ko:"프로젝트",zh:"项目",it:"Progetti",pt:"Projetos",hi:"परियोजनाएँ",ar:"المشاريع",ru:"Проекты"}),description:pe({en:"A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.","en-GB":"A dictionary can be associated with one or more projects. This allows you to load the dictionary on different applications, and share it across different teams.",fr:"Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.",es:"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.",de:"Ein Wörterbuch kann mit einem oder mehreren Projekten verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.",ja:"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。",ko:"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.",zh:"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。",it:"Un dizionario può essere associato a uno o più progetti. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.",pt:"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes.",hi:"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।",ar:"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.",ru:"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами."}),placeholder:pe({en:"Select one or more projects to associate with your dictionary","en-GB":"Select one or more projects to associate with your dictionary",fr:"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire",es:"Seleccione uno o más proyectos para asociar con su diccionario",de:"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen",ja:"辞書に関連付けるプロジェクトを1つ以上選択してください",ko:"사전과 연결할 하나 이상의 프로젝트를 선택하세요",zh:"选择一个或多个项目以与您的字典关联",it:"Seleziona uno o più progetti da associare al tuo dizionario",pt:"Selecione um ou mais projetos para associar ao seu dicionário",hi:"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें",ar:"حدد مشروعًا أو أكثر لربطه بقاموسك",ru:"Выберите один или несколько проектов, чтобы связать их с вашим словарем"})},tagsSelect:{label:pe({en:"Tags","en-GB":"Tags",fr:"Tags",es:"Etiquetas",de:"Tags",ja:"タグ",ko:"태그",zh:"标签",it:"Tag",pt:"Tags",hi:"टैग",ar:"الوسوم",ru:"Теги"}),description:pe({en:"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","en-GB":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.",fr:"Un dictionnaire peut être associé à un ou plusieurs tags. Cela permet de charger le dictionnaire dans différentes applications et de le partager entre différentes équipes.",es:"Un diccionario puede estar asociado con uno o más tags. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.",de:"Ein Wörterbuch kann mit einem oder mehreren Tags verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.",ja:"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。",ko:"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.",zh:"字典可以与一个或多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。",it:"Un dizionario può essere associato a uno o più tag. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.",pt:"Um dicionário pode ser associado a um ou mais tags. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes."}),placeholder:pe({en:"Select the tags to associate with your dictionary","en-GB":"Select the tags to associate with your dictionary",fr:"Sélectionnez les tags à associer à votre dictionnaire",es:"Seleccione los tags para asociar con su diccionario",de:"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen",ja:"辞書に関連付けるタグを選択してください",ko:"사전과 연결할 태그를 선택하세요",zh:"选择与您的字典相关的标签",it:"Seleziona i tag da associare al tuo dizionario",pt:"Selecione os tags para associar ao seu dicionário",hi:"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें",ar:"حدد الوسوم التي تريد ربطها بقاموسك",ru:"Выберите теги, которые нужно связать с словарем"})},auditButton:{label:pe({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"}),text:pe({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"})}}},AZ={key:"dictionary-detail-schema",content:{titleRequiredError:pe({en:"Please enter a name for your organization.","en-GB":"Please enter a name for your organization.",fr:"Veuillez saisir un nom pour votre organisation.",es:"Por favor, ingrese un nombre para su organización.",de:"Bitte geben Sie einen Namen für Ihre Organisation ein.",ja:"あなたの組織の名前を入力してください。",ko:"조직 이름을 입력하세요.",zh:"请输入您组织的名称。",it:"Si prega di inserire un nome per la propria organizzazione.",pt:"Por favor, insira um nome para sua organização.",hi:"कृपया अपने संगठन का नाम दर्ज करें।",ar:"يرجى إدخال اسم منظمتك.",ru:"Пожалуйста, введите название вашей организации."}),titleInvalidTypeError:pe({en:"The organization name must be a valid string.","en-GB":"The organization name must be a valid string.",fr:"Le nom de votre organisation doit être une chaîne valide.",es:"El nombre de su organización debe ser una cadena válida.",de:"Der Name der Organisation muss eine gültige Zeichenfolge sein.",ja:"組織名は有効な文字列である必要があります。",ko:"조직 이름은 유효한 문자열이어야 합니다.",zh:"组织名称必须是有效的字符串。",it:"Il nome dell'organizzazione deve essere una stringa valida.",pt:"O nome da organização deve ser uma string válida.",hi:"संगठन का नाम एक वैध स्ट्रिंग होना चाहिए।",ar:"يجب أن يكون اسم المنظمة سلسلة صحيحة.",ru:"Имя организации должно быть правильной строкой."}),titleMinLengthError:pe({en:"The organization name must be at least 4 characters long.","en-GB":"The organization name must be at least 4 characters long.",fr:"Le nom de votre organisation doit comporter au moins 4 caractères.",es:"El nombre de su organización debe tener al menos 4 caracteres.",de:"Der Name der Organisation muss mindestens 4 Zeichen lang sein.",ja:"組織名は4文字以上でなければなりません。",ko:"조직 이름은 4자 이상이어야 합니다.",zh:"组织名称必须至少4个字符。",it:"Il nome dell'organizzazione deve essere lungo almeno 4 caratteri.",pt:"O nome da organização deve ter pelo menos 4 caracteres.",hi:"संगठन का नाम कम से कम 4 वर्ण का होना चाहिए।",ar:"يجب أن يكون اسم المنظمة مكونًا من 4 أحرف على الأقل.",ru:"Имя организации должно содержать не менее 4 символов."}),keyRequiredError:pe({en:"Please enter a key for your organization.","en-GB":"Please enter a key for your organization.",fr:"Veuillez saisir une clé pour votre organisation.",es:"Por favor, ingrese una clave para su organización.",de:"Bitte geben Sie einen Schlüssel für Ihre Organisation ein.",ja:"あなたの組織のためにキーを入力してください。",ko:"조직에 대한 키를 입력하세요.",zh:"请输入您组织的键。",it:"Si prega di inserire una chiave per la propria organizzazione.",pt:"Por favor, insira uma chave para sua organização.",hi:"कृपया अपने संगठन के लिए एक कुंजी दर्ज करें।",ar:"يرجى إدخال مفتاح لمنظمتك.",ru:"Пожалуйста, введите ключ для вашей организации."}),keyInvalidTypeError:pe({en:"The key must be a valid string.","en-GB":"The key must be a valid string.",fr:"La clé doit être une chaîne valide.",es:"La clave debe ser una cadena válida.",de:"Der Schlüssel muss eine gültige Zeichenfolge sein.",ja:"キーは有効な文字列である必要があります。",ko:"키는 유효한 문자열이어야 합니다.",zh:"关键字必须是有效的字符串。",it:"La chiave deve essere una stringa valida.",pt:"A chave deve ser uma string válida.",hi:"कुंजी एक वैध स्ट्रिंग होनी चाहिए।",ar:"يجب أن يكون المفتاح سلسلة صحيحة.",ru:"Ключ должен быть правильной строкой."}),keySpaceError:pe({en:"The key cannot contain spaces or special characters.","en-GB":"The key cannot contain spaces or special characters.",fr:"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.",es:"La clave no puede contener espacios o caracteres especiales.",de:"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.",ja:"キーにはスペースや特殊文字を含めることはできません。",ko:"키에는 공백이나 특수 문자가 포함될 수 없습니다.",zh:"关键字不能包含空格或特殊字符。",it:"La chiave non può contenere spazi o caratteri speciali.",pt:"A chave não pode conter espaços ou caracteres especiais.",hi:"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।",ar:"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.",ru:"Ключ не может содержать пробелы или специальные символы."}),keyMinLengthError:pe({en:"The key must be at least 4 characters long.","en-GB":"The key must be at least 4 characters long.",fr:"La clé doit comporter au moins 4 caractères.",es:"La clave debe tener al menos 4 caracteres.",de:"Der Schlüssel muss mindestens 4 Zeichen lang sein.",ja:"キーは4文字以上でなければなりません。",ko:"키는 4자 이상이어야 합니다.",zh:"键必须至少为4个字符。",it:"La chiave deve essere lunga almeno 4 caratteri.",pt:"A chave deve ter pelo menos 4 caracteres.",hi:"कुंजी में कम से कम 4 वर्ण होने चाहिए।",ar:"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.",ru:"Ключ должен содержать не менее 4 символов."}),descriptionRequiredError:pe({en:"Please enter a description for your organization.","en-GB":"Please enter a description for your organization.",fr:"Veuillez saisir une description pour votre organisation.",es:"Por favor, ingrese una descripción para su organización.",de:"Bitte geben Sie eine Beschreibung für Ihre Organisation ein.",ja:"あなたの組織の説明を入力してください。",ko:"조직에 대한 설명을 입력하세요.",zh:"请输入您组织的描述。",it:"Si prega di inserire una descrizione per la propria organizzazione.",pt:"Por favor, insira uma descrição para sua organização.",hi:"कृपया अपने संगठन का विवरण दर्ज करें।",ar:"يرجى إدخال وصف لمنظمتك.",ru:"Пожалуйста, введите описание вашей организации."}),descriptionInvalidTypeError:pe({en:"The description must be a valid string.","en-GB":"The description must be a valid string.",fr:"La description doit être une chaîne valide.",es:"La descripción debe ser una cadena válida.",de:"Die Beschreibung muss eine gültige Zeichenfolge sein.",ja:"説明は有効な文字列である必要があります。",ko:"설명은 유효한 문자열이어야 합니다.",zh:"描述必须是有效的字符串。",it:"La descrizione deve essere una stringa valida.",pt:"A descrição deve ser uma string válida.",hi:"विवरण एक वैध स्ट्रिंग होना चाहिए।",ar:"يجب أن يكون الوصف سلسلة صحيحة.",ru:"Описание должно быть правильной строкой."}),requiredErrorProjectId:pe({en:"Please select a project","en-GB":"Please select a project",fr:"Veuillez sélectionner un projet",es:"Por favor, seleccione un proyecto",de:"Bitte wählen Sie ein Projekt aus",ja:"プロジェクトを選択してください",ko:"프로젝트를 선택하세요",zh:"请选择一个项目",it:"Si prega di selezionare un progetto",pt:"Por favor, selecione um projeto",hi:"कृपया एक प्रोजेक्ट चुनें",ar:"يرجى اختيار مشروع",ru:"Пожалуйста, выберите проект"}),invalidTypeErrorProjectId:pe({en:"Please select a valid project","en-GB":"Please select a valid project",fr:"Veuillez sélectionner un projet valide",es:"Por favor, seleccione un proyecto válido",de:"Bitte wählen Sie ein gültiges Projekt aus",ja:"有効なプロジェクトを選択してください",ko:"유효한 프로젝트를 선택하세요",zh:"请选择有效的项目",it:"Si prega di selezionare un progetto valido",pt:"Por favor, selecione um projeto válido",hi:"कृपया एक वैध परियोजना चुनें",ar:"يرجى اختيار مشروع صالح",ru:"Пожалуйста, выберите действительный проект"}),invalidTypeErrorTags:pe({en:"Please enter a valid tag","en-GB":"Please enter a valid tag",fr:"Veuillez saisir un tag valide",es:"Por favor, ingrese un tag válido",de:"Bitte geben Sie einen gültigen Tag ein",ja:"有効なタグを入力してください",ko:"유효한 태그를 입력하세요",zh:"请输入有效的标签",it:"Si prega di inserire un tag valido",pt:"Por favor, insira um tag válido",hi:"कृपया एक वैध टैग दर्ज करें",ar:"يرجى إدخال وسم صالح",ru:"Пожалуйста, введите действительный тег"})}},wZ=e=>{const{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:l,keyMinLengthError:u,descriptionRequiredError:d,descriptionInvalidTypeError:f,requiredErrorProjectId:m,invalidTypeErrorProjectId:y,invalidTypeErrorTags:g}=nn(AZ);return Y3({title:ac({required_error:t.value,invalid_type_error:n.value}).refine(v=>v.length===0||v.length>=4,{message:r.value}).optional(),key:ac({required_error:a.value,invalid_type_error:o.value}).min(4,{message:u.value}).regex(/^[a-zA-Z0-9-_]+$/,{message:l.value}).default(""),description:ac({required_error:d.value,invalid_type_error:f.value}).optional(),projectIds:VA(ac({required_error:m.value,invalid_type_error:y.value})).default([e]),tags:VA(ac({invalid_type_error:g.value})).default([])})},TZ=({dictionary:e})=>{var N,L;const{session:t}=tu(),{project:n}=t??{},{data:r,isLoading:a}=f2(),{data:o}=g2(),l=wZ(String(n==null?void 0:n._id)),{form:u,isSubmitting:d}=Q2(l,{defaultValues:e}),{editedContent:f,setEditedDictionary:m}=Tn(),{titleInput:y,keyInput:g,descriptionInput:v,projectInput:x,tagsSelect:S,auditButton:A}=nn(SZ),{auditContentDeclaration:w,isLoading:T}=y2(),R=f==null?void 0:f[e.key];E.useEffect(()=>{u.reset(e)},[e,u==null?void 0:u.reset]),E.useEffect(()=>{typeof R>"u"&&u.reset(e)},[R]);const D=async()=>{const O={...e,...R};await w({fileContent:JSON.stringify(O)}).then(M=>{if(M!=null&&M.data)try{const B=JSON.parse(M.data.fileContent);m(U=>({...U,...O,...B})),u.reset({...O,...B})}catch(B){console.error(B)}})};return b.jsx(Jr,{background:"none",border:!0,roundedSize:"2xl",className:"w-full px-5 pb-3 pt-5",children:b.jsxs(Xe,{className:"flex w-full flex-col gap-8",...u,schema:l,onChange:O=>m(M=>({...M,...O})),children:[b.jsxs("div",{className:"flex w-full flex-1 gap-8 max-md:flex-col",children:[b.jsx(Xe.EditableFieldInput,{name:"key",label:g.label,placeholder:g.label.value,description:g.description,disabled:d,isRequired:!0,onSave:O=>{u.setValue("key",O),m(M=>({...e,...M??{},key:O}))}}),b.jsx(Xe.EditableFieldInput,{name:"title",label:y.label,placeholder:y.placeholder.value,description:y.description,disabled:d,onSave:O=>{u.setValue("title",O),m(M=>({...e,...M??{},title:O}))}})]}),b.jsx(Xe.EditableFieldTextArea,{name:"description",label:v.label,placeholder:v.placeholder.value,description:v.description,disabled:d,onSave:O=>{u.setValue("description",O),m(M=>({...e,...M??{},description:O}))}}),b.jsxs("div",{className:"flex size-full flex-1 gap-8 max-md:flex-col",children:[b.jsxs(Xe.MultiSelect,{name:"projectIds",label:x.label.value,description:x.description.value,onValueChange:O=>{const M=[O].flat();u.setValue("projectIds",M),m(B=>({...e,...B??{},projectIds:M}))},children:[b.jsx(gn.Trigger,{getBadgeValue:O=>{var M,B;return((B=(M=r==null?void 0:r.data)==null?void 0:M.find(U=>String(U._id)===O))==null?void 0:B.name)??O},children:b.jsx(gn.Input,{placeholder:x.placeholder.value})}),b.jsx(gn.Content,{children:b.jsx(Co,{isLoading:a,children:b.jsx(gn.List,{children:(N=r==null?void 0:r.data)==null?void 0:N.map(O=>b.jsx(gn.Item,{value:String(O._id),children:O.name},String(O._id)))})})})]}),b.jsxs(Xe.MultiSelect,{name:"tags",label:S.label.value,description:S.description.value,onValueChange:O=>{u.setValue("tags",[O].flat()),m(M=>({...e,...M??{},tags:[O].flat()}))},children:[b.jsx(gn.Trigger,{getBadgeValue:O=>{var M,B;return((B=(M=r==null?void 0:r.data)==null?void 0:M.find(U=>String(U._id)===O))==null?void 0:B.name)??O},children:b.jsx(gn.Input,{placeholder:S.placeholder.value})}),b.jsx(gn.Content,{children:b.jsx(Co,{isLoading:a,children:b.jsx(gn.List,{children:(L=o==null?void 0:o.data)==null?void 0:L.map(O=>b.jsx(gn.Item,{value:String(O.key),children:O.name??O.key},String(O.key)))})})})]})]}),b.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 max-md:flex-col",children:b.jsx(Xe.Button,{type:"button",label:A.label.value,Icon:I1,variant:"outline",color:"text",className:"max-md:w-full",onClick:D,disabled:d||T,isLoading:T,children:A.text})})]})})},CZ={key:"dictionary-field-editor",content:{returnToDictionaryList:{label:pe({en:"Return to dictionary list","en-GB":"Return to dictionary list",fr:"Retourner à la liste des dictionnaires",es:"Volver a la lista de diccionarios",de:"Zurück zur Wörterbuchliste",ja:"辞書リストに戻る",ko:"사전 목록으로 돌아가기",zh:"返回字典列表",it:"Torna all'elenco dei dizionari",pt:"Voltar à lista de dicionários",hi:"शब्दकोश सूची में वापस जाएं",ar:"العودة إلى قائمة المعاجم",ru:"Вернуться к списку словарей"}),text:pe({en:"Dictionary list","en-GB":"Dictionary list",fr:"Liste des dictionnaires",es:"Lista de diccionarios",de:"Wörterbuchliste",ja:"辞書リスト",ko:"사전 목록",zh:"字典列表",it:"Elenco dei dizionari",pt:"Lista de dicionários",hi:"शब्दकोश सूची",ar:"قائمة المعاجم",ru:"Список словарей"})}}};function RZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function MT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LT(Object(n),!0).forEach(function(r){RZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NZ(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function kZ(e,t){if(e==null)return{};var n=NZ(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OZ(e,t){return DZ(e)||IZ(e,t)||LZ(e,t)||MZ()}function DZ(e){if(Array.isArray(e))return e}function IZ(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,o=void 0;try{for(var l=e[Symbol.iterator](),u;!(r=(u=l.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(d){a=!0,o=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw o}}return n}}function LZ(e,t){if(e){if(typeof e=="string")return jT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jT(e,t)}}function jT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
280
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function VT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(r){jZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PZ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(a,o){return o(a)},r)}}function gc(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return a.length>=e.length?e.apply(this,a):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(a,u))}}}function ih(e){return{}.toString.call(e).includes("Object")}function VZ(e){return!Object.keys(e).length}function Wc(e){return typeof e=="function"}function BZ(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function zZ(e,t){return ih(t)||da("changeType"),Object.keys(t).some(function(n){return!BZ(e,n)})&&da("changeField"),t}function UZ(e){Wc(e)||da("selectorType")}function HZ(e){Wc(e)||ih(e)||da("handlerType"),ih(e)&&Object.values(e).some(function(t){return!Wc(t)})&&da("handlersType")}function FZ(e){e||da("initialIsRequired"),ih(e)||da("initialType"),VZ(e)&&da("initialContent")}function GZ(e,t){throw new Error(e[t]||e.default)}var $Z={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},da=gc(GZ)($Z),Zd={changes:zZ,selector:UZ,handler:HZ,initial:FZ};function qZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Zd.initial(e),Zd.handler(t);var n={current:e},r=gc(YZ)(n,t),a=gc(WZ)(n),o=gc(Zd.changes)(e),l=gc(KZ)(n);function u(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return Zd.selector(f),f(n.current)}function d(f){PZ(r,a,o,l)(f)}return[u,d]}function KZ(e,t){return Wc(t)?t(e.current):t}function WZ(e,t){return e.current=VT(VT({},e.current),t),t}function YZ(e,t,n){return Wc(t)?t(e.current):Object.keys(n).forEach(function(r){var a;return(a=t[r])===null||a===void 0?void 0:a.call(t,e.current[r])}),n}var ZZ={create:qZ},XZ={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function QZ(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return a.length>=e.length?e.apply(this,a):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(a,u))}}}function JZ(e){return{}.toString.call(e).includes("Object")}function eX(e){return e||BT("configIsRequired"),JZ(e)||BT("configType"),e.urls?(tX(),{paths:{vs:e.urls.monacoBase}}):e}function tX(){console.warn(CD.deprecation)}function nX(e,t){throw new Error(e[t]||e.default)}var CD={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
281
+ You are using deprecated way of configuration.
282
+
283
+ Instead of using
284
+ monaco.config({ urls: { monacoBase: '...' } })
285
+ use
286
+ monaco.config({ paths: { vs: '...' } })
287
+
288
+ For more please check the link https://github.com/suren-atoyan/monaco-loader#config
289
+ `},BT=QZ(nX)(CD),rX={config:eX},iX=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(a){return n.reduceRight(function(o,l){return l(o)},a)}};function RD(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],RD(e[n],t[n]))}),MT(MT({},e),t)}var aX={type:"cancelation",msg:"operation is manually canceled"};function iy(e){var t=!1,n=new Promise(function(r,a){e.then(function(o){return t?a(aX):r(o)}),e.catch(a)});return n.cancel=function(){return t=!0},n}var sX=ZZ.create({config:XZ,isInitialized:!1,resolve:null,reject:null,monaco:null}),ND=OZ(sX,2),gu=ND[0],zh=ND[1];function oX(e){var t=rX.config(e),n=t.monaco,r=kZ(t,["monaco"]);zh(function(a){return{config:RD(a.config,r),monaco:n}})}function lX(){var e=gu(function(t){var n=t.monaco,r=t.isInitialized,a=t.resolve;return{monaco:n,isInitialized:r,resolve:a}});if(!e.isInitialized){if(zh({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),iy(ay);if(window.monaco&&window.monaco.editor)return kD(window.monaco),e.resolve(window.monaco),iy(ay);iX(cX,dX)(fX)}return iy(ay)}function cX(e){return document.body.appendChild(e)}function uX(e){var t=document.createElement("script");return e&&(t.src=e),t}function dX(e){var t=gu(function(r){var a=r.config,o=r.reject;return{config:a,reject:o}}),n=uX("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function fX(){var e=gu(function(n){var r=n.config,a=n.resolve,o=n.reject;return{config:r,resolve:a,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){kD(n),e.resolve(n)},function(n){e.reject(n)})}function kD(e){gu().monaco||zh({monaco:e})}function hX(){return gu(function(e){var t=e.monaco;return t})}var ay=new Promise(function(e,t){return zh({resolve:e,reject:t})}),OD={config:oX,init:lX,__getMonacoInstance:hX},mX={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},sy=mX,pX={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},gX=pX;function yX({children:e}){return Ge.createElement("div",{style:gX.container},e)}var vX=yX,bX=vX;function _X({width:e,height:t,isEditorReady:n,loading:r,_ref:a,className:o,wrapperProps:l}){return Ge.createElement("section",{style:{...sy.wrapper,width:e,height:t},...l},!n&&Ge.createElement(bX,null,r),Ge.createElement("div",{ref:a,style:{...sy.fullWidth,...!n&&sy.hide},className:o}))}var xX=_X,DD=E.memo(xX);function EX(e){E.useEffect(e,[])}var ID=EX;function SX(e,t,n=!0){let r=E.useRef(!0);E.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Hn=SX;function Rc(){}function xo(e,t,n,r){return AX(e,r)||wX(e,t,n,r)}function AX(e,t){return e.editor.getModel(LD(e,t))}function wX(e,t,n,r){return e.editor.createModel(t,n,r?LD(e,r):void 0)}function LD(e,t){return e.Uri.parse(t)}function TX({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:a,originalModelPath:o,modifiedModelPath:l,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:d=!1,theme:f="light",loading:m="Loading...",options:y={},height:g="100%",width:v="100%",className:x,wrapperProps:S={},beforeMount:A=Rc,onMount:w=Rc}){let[T,R]=E.useState(!1),[D,N]=E.useState(!0),L=E.useRef(null),O=E.useRef(null),M=E.useRef(null),B=E.useRef(w),U=E.useRef(A),ue=E.useRef(!1);ID(()=>{let ee=OD.init();return ee.then(F=>(O.current=F)&&N(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>L.current?Z():ee.cancel()}),Hn(()=>{if(L.current&&O.current){let ee=L.current.getOriginalEditor(),F=xo(O.current,e||"",r||n||"text",o||"");F!==ee.getModel()&&ee.setModel(F)}},[o],T),Hn(()=>{if(L.current&&O.current){let ee=L.current.getModifiedEditor(),F=xo(O.current,t||"",a||n||"text",l||"");F!==ee.getModel()&&ee.setModel(F)}},[l],T),Hn(()=>{let ee=L.current.getModifiedEditor();ee.getOption(O.current.editor.EditorOption.readOnly)?ee.setValue(t||""):t!==ee.getValue()&&(ee.executeEdits("",[{range:ee.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),ee.pushUndoStop())},[t],T),Hn(()=>{var ee,F;(F=(ee=L.current)==null?void 0:ee.getModel())==null||F.original.setValue(e||"")},[e],T),Hn(()=>{let{original:ee,modified:F}=L.current.getModel();O.current.editor.setModelLanguage(ee,r||n||"text"),O.current.editor.setModelLanguage(F,a||n||"text")},[n,r,a],T),Hn(()=>{var ee;(ee=O.current)==null||ee.editor.setTheme(f)},[f],T),Hn(()=>{var ee;(ee=L.current)==null||ee.updateOptions(y)},[y],T);let ie=E.useCallback(()=>{var ne;if(!O.current)return;U.current(O.current);let ee=xo(O.current,e||"",r||n||"text",o||""),F=xo(O.current,t||"",a||n||"text",l||"");(ne=L.current)==null||ne.setModel({original:ee,modified:F})},[n,t,a,e,r,o,l]),fe=E.useCallback(()=>{var ee;!ue.current&&M.current&&(L.current=O.current.editor.createDiffEditor(M.current,{automaticLayout:!0,...y}),ie(),(ee=O.current)==null||ee.editor.setTheme(f),R(!0),ue.current=!0)},[y,f,ie]);E.useEffect(()=>{T&&B.current(L.current,O.current)},[T]),E.useEffect(()=>{!D&&!T&&fe()},[D,T,fe]);function Z(){var F,ne,q,ge;let ee=(F=L.current)==null?void 0:F.getModel();u||((ne=ee==null?void 0:ee.original)==null||ne.dispose()),d||((q=ee==null?void 0:ee.modified)==null||q.dispose()),(ge=L.current)==null||ge.dispose()}return Ge.createElement(DD,{width:v,height:g,isEditorReady:T,loading:m,_ref:M,className:x,wrapperProps:S})}var CX=TX;E.memo(CX);function RX(e){let t=E.useRef();return E.useEffect(()=>{t.current=e},[e]),t.current}var NX=RX,Xd=new Map;function kX({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:a,path:o,theme:l="light",line:u,loading:d="Loading...",options:f={},overrideServices:m={},saveViewState:y=!0,keepCurrentModel:g=!1,width:v="100%",height:x="100%",className:S,wrapperProps:A={},beforeMount:w=Rc,onMount:T=Rc,onChange:R,onValidate:D=Rc}){let[N,L]=E.useState(!1),[O,M]=E.useState(!0),B=E.useRef(null),U=E.useRef(null),ue=E.useRef(null),ie=E.useRef(T),fe=E.useRef(w),Z=E.useRef(),ee=E.useRef(r),F=NX(o),ne=E.useRef(!1),q=E.useRef(!1);ID(()=>{let X=OD.init();return X.then(H=>(B.current=H)&&M(!1)).catch(H=>(H==null?void 0:H.type)!=="cancelation"&&console.error("Monaco initialization: error:",H)),()=>U.current?P():X.cancel()}),Hn(()=>{var H,Q,re,he;let X=xo(B.current,e||r||"",t||a||"",o||n||"");X!==((H=U.current)==null?void 0:H.getModel())&&(y&&Xd.set(F,(Q=U.current)==null?void 0:Q.saveViewState()),(re=U.current)==null||re.setModel(X),y&&((he=U.current)==null||he.restoreViewState(Xd.get(o))))},[o],N),Hn(()=>{var X;(X=U.current)==null||X.updateOptions(f)},[f],N),Hn(()=>{!U.current||r===void 0||(U.current.getOption(B.current.editor.EditorOption.readOnly)?U.current.setValue(r):r!==U.current.getValue()&&(q.current=!0,U.current.executeEdits("",[{range:U.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),U.current.pushUndoStop(),q.current=!1))},[r],N),Hn(()=>{var H,Q;let X=(H=U.current)==null?void 0:H.getModel();X&&a&&((Q=B.current)==null||Q.editor.setModelLanguage(X,a))},[a],N),Hn(()=>{var X;u!==void 0&&((X=U.current)==null||X.revealLine(u))},[u],N),Hn(()=>{var X;(X=B.current)==null||X.editor.setTheme(l)},[l],N);let ge=E.useCallback(()=>{var X;if(!(!ue.current||!B.current)&&!ne.current){fe.current(B.current);let H=o||n,Q=xo(B.current,r||e||"",t||a||"",H||"");U.current=(X=B.current)==null?void 0:X.editor.create(ue.current,{model:Q,automaticLayout:!0,...f},m),y&&U.current.restoreViewState(Xd.get(H)),B.current.editor.setTheme(l),u!==void 0&&U.current.revealLine(u),L(!0),ne.current=!0}},[e,t,n,r,a,o,f,m,y,l,u]);E.useEffect(()=>{N&&ie.current(U.current,B.current)},[N]),E.useEffect(()=>{!O&&!N&&ge()},[O,N,ge]),ee.current=r,E.useEffect(()=>{var X,H;N&&R&&((X=Z.current)==null||X.dispose(),Z.current=(H=U.current)==null?void 0:H.onDidChangeModelContent(Q=>{q.current||R(U.current.getValue(),Q)}))},[N,R]),E.useEffect(()=>{if(N){let X=B.current.editor.onDidChangeMarkers(H=>{var re;let Q=(re=U.current.getModel())==null?void 0:re.uri;if(Q&&H.find(he=>he.path===Q.path)){let he=B.current.editor.getModelMarkers({resource:Q});D==null||D(he)}});return()=>{X==null||X.dispose()}}return()=>{}},[N,D]);function P(){var X,H;(X=Z.current)==null||X.dispose(),g?y&&Xd.set(o,U.current.saveViewState()):(H=U.current.getModel())==null||H.dispose(),U.current.dispose()}return Ge.createElement(DD,{width:v,height:x,isEditorReady:N,loading:d,_ref:ue,className:S,wrapperProps:A})}var OX=kX,DX=E.memo(OX);const IX=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:a=!0,isReadOnly:o=!1,onChange:l})=>{const u=E.useRef(null),d=E.useRef(null),[f,m]=E.useState({height:0,width:0}),y=E.useMemo(()=>n?"vs-dark-transparent":"hc-light-theme",[n]),g=(x,S)=>{var w;d.current=x;const A=(x.getContentHeight()??0)+25;S.editor.defineTheme("vs-dark-transparent",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),S.editor.defineTheme("hc-light-theme",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),S.editor.setTheme(y),S.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),S.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),S.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),S.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),m({height:A,width:((w=u.current)==null?void 0:w.clientWidth)??0})},v=r??e.split(`
290
+ `).length>1;return b.jsxs("div",{className:Ae("relative h-full w-full text-sm",r&&"ml-0"),children:[a&&b.jsx("div",{className:"sticky top-5 z-10",children:b.jsx("div",{className:Ae("absolute bottom-0 right-2 flex h-7 items-center"),children:b.jsx(TD,{content:e})})}),b.jsx("div",{className:"z-0 grid size-full grid-cols-[0px] overflow-auto",ref:u,children:b.jsx(DX,{...f,defaultLanguage:"typescript",language:t,loading:b.jsx(Co,{}),defaultValue:String(e).replace(/\n$/,""),onMount:g,onChange:l,options:{readOnly:o,cursorStyle:"line",minimap:{enabled:!1},scrollbar:{vertical:"hidden",verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:"off",quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:v?"on":"off"},theme:y,className:"my-2 rounded-md"})})]})},LX=({dictionary:e,isDarkMode:t})=>{const{setEditedContent:n,editedContent:r}=Tn(),a=l=>{try{return JSON.parse(l),!0}catch{return!1}},o=E.useMemo(()=>{var l;return((l=r==null?void 0:r[e.key])==null?void 0:l.content)??(e==null?void 0:e.content)??{}},[e]);return b.jsx(Jr,{background:"none",border:!0,roundedSize:"xl",className:"w-full overflow-hidden p-3",children:b.jsx(IX,{language:"json",onChange:l=>{a(l??"{}")&&n(e.key,JSON.parse(l??"{}"))},isDarkMode:t,children:JSON.stringify(o,null,2)})})},MX={key:"node-type-selector",content:{triggerPlaceHolder:pe({en:"Node type","en-GB":"Node type",fr:"Type du Nœud",es:"Tipo del nodo",de:"Knotentyp",ja:"ノードタイプ",ko:"노드 유형",zh:"节点类型",it:"Tipo di nodo",pt:"Tipo de nó",hi:"नोड प्रकार",ar:"نوع العقدة",ru:"Тип узла"}),multilingual:pe({en:"Multilingual content","en-GB":"Multilingual content",fr:"Contenu Multilingue",es:"Contenido multilingüe",de:"Mehrsprachiger Inhalt",ja:"複数言語コンテンツ",ko:"다중 언어 콘텐츠",zh:"多语言内容",it:"Contenuto multilingue",pt:"Conteúdo multilíngue",hi:"बहुभाषी सामग्री",ar:"محتوى متعدد اللغات",ru:"Многоязычный контент"}),text:pe({en:"Text","en-GB":"Text",fr:"Texte",es:"Texto",de:"Text",ja:"テキスト",ko:"텍스트",zh:"文本",it:"Testo",pt:"Texto",hi:"पाठ",ar:"نص",ru:"Текст"}),number:pe({en:"Number","en-GB":"Number",fr:"Nombre",es:"Número",de:"Zahl",ja:"数字",ko:"숫자",zh:"数字",it:"Numero",pt:"Número",hi:"संख्या",ar:"رقم",ru:"Число"}),boolean:pe({en:"Boolean","en-GB":"Boolean",fr:"Booléen",es:"Booleano",de:"Bool",ja:"ブール",ko:"불리언",zh:"布尔",it:"Booleano",pt:"Booleano",hi:"बूलियन",ar:"منطقي",ru:"Булево"}),node:pe({en:"Object","en-GB":"Object",fr:"Objet",es:"Objeto",de:"Objekt",ja:"オブジェクト",ko:"객체",zh:"对象",it:"Oggetto",pt:"Objeto",hi:"ऑब्जेक्ट",ar:"كائن",ru:"Объект"}),array:pe({en:"Array","en-GB":"Array",fr:"Tableau",es:"Arreglo",de:"Array",ja:"配列",ko:"배열",zh:"数组",it:"Array",pt:"Array",hi:"ऐरे",ar:"مصفوفة",ru:"Массив"}),enumeration:pe({en:"Enumeration","en-GB":"Enumeration",fr:"Énumération",es:"Enumeración",de:"Enumeration",ja:"列挙",ko:"열거",zh:"枚举",it:"Enumerazione",pt:"Enumeração",hi:"गणना",ar:"تعداد",ru:"Перечисление"}),nest:pe({en:"Nesting","en-GB":"Nesting",fr:"Imbriquation",es:"Anidación",de:"Vererbung",ja:"ネスト",ko:"중첩",zh:"嵌套",it:"Nidificazione",pt:"Nido",hi:"नेस्टेंस",ar:"مستوى",ru:"Вложенность",nl:"Nest"}),insertion:pe({en:"Insertion","en-GB":"Insertion",fr:"Insertion",es:"Inserción",de:"Einfügung",ja:"挿入",ko:"삽입",zh:"插入",it:"Inserimento",pt:"Inserção",hi:"सम्मिलन",ar:"إدراج",ru:"Вставка"}),condition:pe({en:"Condition","en-GB":"Condition",fr:"Condition",es:"Condición",de:"Bedingung",ja:"条件",ko:"조건",zh:"条件",it:"Condizione",pt:"Condição",hi:"शर्त्ता",ar:"شرط",ru:"Условие"}),file:pe({en:"File","en-GB":"File",fr:"Fichier",es:"Archivo",de:"Datei",ja:"ファイル",ko:"파일",zh:"文件",it:"File",pt:"Arquivo",hi:"फ़ाइल",ar:"ملف",ru:"Файл"}),markdown:pe({en:"Markdown","en-GB":"Markdown",fr:"Markdown",es:"Markdown",de:"Markdown",ja:"マークダウン",ko:"마크다운",zh:"Markdown",it:"Markdown",pt:"Markdown",hi:"मार्कडाउन",ar:"مارك داون",ru:"Markdown"}),reactNode:pe({en:"React Node","en-GB":"React Node",fr:"Node React",es:"Nodo React",de:"React-Knoten",ja:"リアル・ノード",ko:"리액 노드",zh:"React 节点",it:"Nodo React",pt:"Nó React",hi:"रेड नोड",ar:"عقدة رياكت",ru:"Реакт узел"})}},Qd=({section:e,onValueChange:t})=>{const{multilingual:n,text:r,number:a,boolean:o,node:l,array:u,enumeration:d,triggerPlaceHolder:f,nest:m,condition:y,markdown:g,insertion:v,reactNode:x,file:S}=nn(MX),A=Vo(e),[w,T]=E.useState(A),R=D=>{T(D),t(D)};return b.jsxs(je,{value:w,onValueChange:R,children:[b.jsx(je.Trigger,{children:b.jsx(je.Value,{placeholder:f})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:K.Translation,children:n}),b.jsx(je.Item,{value:K.Text,children:r}),b.jsx(je.Item,{value:K.Number,children:a}),b.jsx(je.Item,{value:K.Boolean,children:o}),b.jsx(je.Item,{value:K.Object,children:l}),b.jsx(je.Item,{value:K.Array,children:u}),b.jsx(je.Item,{value:K.Enumeration,children:d}),b.jsx(je.Item,{value:K.Insertion,children:v}),b.jsx(je.Item,{value:K.Markdown,children:g}),b.jsx(je.Item,{value:K.Nested,children:m}),b.jsx(je.Item,{value:K.Condition,children:y}),b.jsx(je.Item,{value:K.ReactNode,disabled:!0,children:x}),b.jsx(je.Item,{value:K.File,children:S})]})]})},MD={key:"editor-view",content:{titleInput:{placeholder:pe({en:"Enter the key of your node","en-GB":"Enter the key of your node",fr:"Entrez la clé de votre nœud",es:"Ingrese la clave de su nodo",de:"Geben Sie den Schlüssel Ihres Knotens ein",ja:"ノードのキーを入力してください",ko:"노드의 키를 입력하세요",zh:"输入您节点的键",it:"Inserisci la chiave del tuo nodo",pt:"Insira a chave do seu nó",hi:"अपनी नोड की कुंजी दर्ज करें",ar:"أدخل مفتاح العقدة الخاص بك",ru:"Введите ключ вашего узла"})},deleteButton:{label:pe({en:"Remove node from section","en-GB":"Remove node from section",fr:"Supprimer le nœud de la section",es:"Eliminar el nodo de la sección",de:"Knoten aus dem Abschnitt entfernen",ja:"セクションからノードを削除",ko:"섹션에서 노드를 제거",zh:"从部分中移除节点",it:"Rimuovi nodo dalla sezione",pt:"Remover nó da seção",hi:"सेक्शन से नोड हटाएं",ar:"إزالة العقدة من القسم",ru:"Удалить узел из секции"})},addNodeButton:{label:pe({en:"Click to add a new node","en-GB":"Click to add a new node",fr:"Cliquez pour ajouter un nouveau nœud",es:"Haga clic para agregar un nuevo nodo",de:"Klicken, um einen neuen Knoten hinzuzufügen",ja:"新しいノードを追加するにはクリックしてください",ko:"새 노드를 추가하려면 클릭하세요",zh:"点击添加新节点",it:"Fai clic per aggiungere un nuovo nodo",pt:"Clique para adicionar um novo nó",hi:"नया नोड जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة عقدة جديدة",ru:"Нажмите, чтобы добавить новый узел"}),text:pe({en:"Add a new node","en-GB":"Add a new node",fr:"Ajouter un nouveau nœud",es:"Agregar un nuevo nodo",de:"Neuen Knoten hinzufügen",ja:"新しいノードを追加",ko:"새 노드 추가",zh:"添加新节点",it:"Aggiungi un nuovo nodo",pt:"Adicionar um novo nó",hi:"नया नोड जोड़ें",ar:"إضافة عقدة جديدة",ru:"Добавить новый узел"})}}},Sv=({section:e,dictionaryKey:t,keyPath:n,onNodeTypeChange:r})=>{var d;const a=((d=Zr())==null?void 0:d.internationalization.locales)??[],o=Vo(e),l=FT(e),u=f=>{const m=Ql(o,a,f);r(m)};if(o===K.Translation||o===K.Condition||o===K.Enumeration){const f=Object.keys(e[o])[0],m=[...n,{type:o,key:f}];return b.jsxs("div",{className:"flex w-full flex-col gap-1",children:[b.jsx(Qd,{section:e,onValueChange:y=>r(Ql(y,a))}),b.jsx(Sv,{section:l,keyPath:m,dictionaryKey:t,onNodeTypeChange:u})]})}if(o===K.Array){const f=[...n,{type:o,key:0}];return b.jsxs("div",{className:"flex w-full flex-col gap-1",children:[b.jsx(Qd,{section:e,onValueChange:m=>r(Ql(m,a))}),b.jsx(Sv,{section:l,keyPath:f,dictionaryKey:t,onNodeTypeChange:u})]})}return o===K.Object?b.jsxs(b.Fragment,{children:[b.jsx(Qd,{section:e,onValueChange:f=>r(Ql(f,a))}),b.jsx("div",{className:"ml-10 mt-6",children:b.jsx(PX,{keyPath:n,section:e,dictionaryKey:t})})]}):b.jsx(Qd,{section:e,onValueChange:f=>r(Ql(f,a))})},f_=({sectionKey:e,section:t,keyPath:n,dictionaryKey:r})=>{const{focusedContent:a,setFocusedContentKeyPath:o}=ba(),{renameEditedContent:l,addEditedContent:u}=Bo(),{titleInput:d,deleteButton:f}=nn(MD),m=y=>{l(r,y,n);const g=n.slice(0,-1),v=n[n.length-1],x=[...g,{...v,key:y}];o(x)};return b.jsx(Jr,{transparency:"xl",roundedSize:"xl",className:"w-full min-w-80 gap-2 overflow-auto px-5 py-2",border:!0,borderColor:"text",background:"none","aria-selected":Zc(n,(a==null?void 0:a.keyPath)??[]),onClick:()=>o(n),children:b.jsxs("div",{className:"flex w-full flex-col items-start justify-between gap-3",children:[typeof e=="string"&&b.jsxs("div",{className:"w-full",children:[b.jsxs("div",{className:"flex w-full items-center justify-between gap-10",children:[b.jsx(VC,{name:"key","aria-label":"Key",placeholder:d.placeholder.value,defaultValue:e,onSave:y=>m(y),variant:"invisible"}),b.jsx(yt,{label:f.label.value,variant:"hoverable",size:"icon-sm",color:"text",className:"translate-x-2",Icon:fh,onClick:()=>{u(r,void 0,n);const y=n.slice(0,-1);o(y)}})]}),b.jsxs("span",{className:"text-neutral ml-3 text-sm",children:["( ",yf(e)," )"]})]}),b.jsx(Sv,{keyPath:n,dictionaryKey:r,section:t,onNodeTypeChange:y=>{u(r,y,n)}})]})})},jX=({section:e,keyPath:t,dictionaryKey:n})=>{const{addNodeButton:r}=nn(MD),{setFocusedContentKeyPath:a}=Tv(),{addEditedContent:o}=Bo();return!e||typeof e!="object"?b.jsx("div",{children:"Not an object"}):b.jsxs("div",{className:"flex flex-col gap-2 overflow-y-scroll",children:[b.jsx("ul",{className:"mr-auto flex flex-col gap-4",children:Object.keys(e).map(l=>b.jsx("li",{className:"flex w-full",children:b.jsx(f_,{sectionKey:l,section:e==null?void 0:e[l],keyPath:[...t,{type:K.Object,key:l}],dictionaryKey:n})},l))}),b.jsx(yt,{label:r.label.value,variant:"hoverable",size:"md",color:"text",Icon:dh,className:"flex-1",onClick:()=>{const u=[...t,{type:K.Object,key:"newKey"}];o(n,"",u),a(u)},children:r.text})]})},PX=({section:e,keyPath:t,dictionaryKey:n})=>!e||typeof e!="object"||typeof e.nodeType=="string"?b.jsx(f_,{sectionKey:"content",section:e,keyPath:t,dictionaryKey:n}):b.jsx(jX,{section:e,keyPath:t,dictionaryKey:n}),VX=({dictionary:e})=>{var o,l;const{content:t,key:n}=e,{editedContent:r}=Tn(),a=typeof((o=r==null?void 0:r[n])==null?void 0:o.content)>"u"?t:(l=r==null?void 0:r[n])==null?void 0:l.content;return b.jsx(f_,{section:a,keyPath:[],dictionaryKey:e.key})},BX=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r,onDelete:a})=>{const o=Zr(),[l,u]=E.useState(1),{returnToDictionaryList:d}=nn(CZ),{setFocusedContent:f}=Tv(),{setLocaleDictionaries:m}=oh();return E.useEffect(()=>{f(y=>({...y??{},dictionaryKey:e.key})),m(y=>({...y,[e.key]:e}))},[]),b.jsx(t7,{availableLocales:(o==null?void 0:o.internationalization.locales)??[],children:b.jsxs("div",{className:"flex size-full flex-col gap-6 px-2",children:[b.jsx(yt,{onClick:t,variant:"hoverable",className:"z-10 ml-5 mr-auto",color:"text",Icon:fV,label:d.label.value,children:d.text}),b.jsx(cu,{defaultValue:l,onChange:y=>u(y),color:"text",size:"sm",className:"m-auto w-full max-w-xl",choices:[{content:"Details",value:0},{content:"Structure",value:2},{content:"Content",value:1},{content:"JSON",value:3}].filter(({value:y})=>!(!r.includes("remote")&&y===0))}),l===0&&b.jsx(TZ,{dictionary:e}),l===2&&b.jsx(VX,{dictionary:e}),l===1&&b.jsx(EZ,{dictionary:e,isDarkMode:n}),l===3&&b.jsx(LX,{dictionary:e,isDarkMode:n}),b.jsx(oO,{dictionary:e,mode:r,onDelete:()=>{f(null),a==null||a()}})]})})},zX=({children:e,isHidden:t,minWidth:n=0,align:r="left",className:a,...o})=>b.jsx("div",{className:Ae("relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out",t?"":"grid-cols-[1fr]",a),"aria-hidden":t,...o,children:b.jsx("div",{style:{minWidth:`${n}px`},tabIndex:t!==!1?void 0:-1,className:Ae(r==="right"&&"ml-auto"),children:e})}),UX=e=>{const t=e.getBoundingClientRect(),n=t.top,r=t.bottom;if(n>=0&&r<=window.innerHeight){const o=t.left+t.width/2,l=t.top+10,u=document.elementFromPoint(o,l);return e===u||e.contains(u)}return!1},Uh=Y1((e,t)=>({drawers:{},open:n=>e(r=>({drawers:{...r.drawers,[n]:!0}})),close:n=>e(r=>({drawers:{...r.drawers,[n]:!1}})),isOpen:n=>t().drawers[n]??!1})),jD=({title:e,identifier:t,children:n,header:r,closeOnOutsideClick:a=!0,backButton:o,isOpen:l,onClose:u})=>{const{isMobile:d}=X9("md"),f=E.useRef(null),m=E.useRef(null),{close:y,open:g,isOpen:v}=Uh(rO(S=>({close:()=>S.close(t),open:()=>S.open(t),isOpen:S.isOpen(t)})));iO({disableScroll:v,key:t?`right_drawer_${t}`:"right_drawer"}),E.useEffect(()=>{const S=A=>{try{if(!f.current)return;const w=v&&a,T=A.target&&!f.current.contains(A.target),R=UX(f.current);(w&&T&&R||!A.target)&&(y(),u==null||u())}catch{y(),u==null||u()}};return window.addEventListener("mousedown",S),()=>window.removeEventListener("mousedown",S)},[v,y,u,a,t]),E.useEffect(()=>{l!==void 0&&(l?g():(y(),u==null||u()))},[y,g,u,l,t]);const x=S=>{S.target===S.currentTarget&&d&&(y(),u==null||u())};return b.jsx("div",{className:"fixed right-0 top-0 z-50 flex h-full justify-end",children:b.jsx(zX,{isHidden:!v,align:"right",children:b.jsxs(Jr,{className:"text-text relative flex h-screen w-screen flex-col md:w-[400px]",ref:f,roundedSize:"none",children:[b.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[b.jsxs("div",{className:"flex justify-between gap-3",children:[b.jsx("div",{children:o&&b.jsx(yt,{variant:"hoverable",color:"text",label:o.text??"Go back",onClick:o.onBack,Icon:vV,children:o==null?void 0:o.text})}),b.jsx("div",{children:b.jsx(yt,{variant:"hoverable",color:"text",label:"Close",className:"ml-auto",onClick:y,Icon:_s,size:"icon-md"})})]}),e&&b.jsx("h2",{className:"flex items-center justify-center text-lg font-bold",children:e}),r]}),b.jsx("div",{className:"flex h-full flex-col overflow-y-auto p-2",children:b.jsx("div",{className:"flex flex-1 flex-col",onClick:x,ref:m,children:n})})]})})})},HX=()=>{const{toasts:e}=pC();return b.jsxs(Xz.Provider,{children:[e.map(({id:t,title:n,description:r,action:a,...o})=>b.jsxs(e2,{...o,children:[b.jsxs("div",{className:"grid gap-1",children:[n&&b.jsx(n2,{children:n}),r&&b.jsx(r2,{children:r})]}),a,b.jsx(t2,{})]},t)),b.jsx(Qz,{})]})},PD=(...e)=>{const{localeDictionaries:t}=e1(),{data:n,isWaitingData:r}=h2(...e),a=E.useMemo(()=>((n==null?void 0:n.data)??[]).reduce((l,u)=>(l[u.key]=u,l),{}),[n]),o=E.useMemo(()=>A2(a??{},t),[a,t]);return{online:a,locale:t,all:o,isLoading:r}},FX=({children:e})=>b.jsx(YG,{features:N8,children:e}),GX=({children:e})=>b.jsx(FX,{children:b.jsxs($B,{children:[b.jsx(HX,{}),e]})}),$X=({children:e})=>b.jsx(ZP,{children:b.jsx(TP,{children:b.jsx(S1,{path:"*",element:e})})}),Av="dictionaryList",VD={key:"dictionary-edition-drawer",content:{openDictionaryEditor:{label:pe({en:"Click to open the dictionary in the editor",fr:"Cliquez pour ouvrir le dictionnaire dans l’éditeur",es:"Haga clic para abrir el diccionario en el editor",de:"Klicken Sie hier, um das Wörterbuch im Editor zu öffnen",ja:"エディターで辞書を開く",ko:"편집기에서 사전 열기",zh:"点击打开词典到编辑器",it:"Fai clic per aprire il dizionario nell’editor",pt:"Clique para abrir o dicionário no editor",hi:"एडिटर में शब्दकोश खोलने के लिए क्लिक करें",ar:"انقر لفتح قاموس في المحرر",ru:"Нажмите, чтобы открыть словарь в редакторе","en-GB":"Click to open the dictionary in the editor"})},backButtonText:pe({en:"Dictionary list",fr:"Liste des dictionnaires",es:"Lista de diccionarios",de:"Wörterbuchliste",ja:"辞書リスト",ko:"사전 목록",zh:"词典列表",it:"Elenco di dizionari",pt:"Lista de dicionários",hi:"शब्दकोश सूची",ar:"قائمة القوامل",ru:"Список словарей","en-GB":"Dictionary list"}),modalTitle:pe({en:"Edit dictionary",fr:"Modifier le dictionnaire",es:"Editar el diccionario",de:"Wörterbuch bearbeiten",ja:"辞書を編集",ko:"사전 편집",zh:"编辑词典",it:"Modifica dizionario",pt:"Editar dicionário",hi:"शब्दकोश संपादित करें",ar:"تحرير قاموس",ru:"Редактировать словарь","en-GB":"Edit dictionary"}),noDictionaryFocused:pe({en:"No dictionary focused",fr:"Aucun dictionnaire sélectionné",es:"No hay diccionario enfocado",de:"Kein Wörterbuch ausgewählt",ja:"フォーカスされた辞書がありません",ko:"포커스가 있는 사전이 없습니다",zh:"没有聚焦的词典",it:"Nessun dizionario selezionato",pt:"Nenhum dicionário focalizado",hi:"कोई फोकस शब्दकोश नहीं है",ar:"لا يوجد قاموس مرتبط",ru:"Нет фокусированного словаря","en-GB":"No dictionary focused"})}},h_=e=>`dictionary_edition_${e}`,BD=e=>{const t=h_(e),{isOpen:n,open:r,close:a}=Uh(),{getEditedContentValue:o}=Bo(),{focusedContent:l,setFocusedContent:u}=ba();return E.useEffect(()=>{var d;l&&(((d=l.keyPath)==null?void 0:d.length)??0)>0&&r(t)},[l,r,t]),{isOpen:n(t),focusedContent:l,getEditedContentValue:o,close:()=>{a(t),u(d=>d!=null&&d.dictionaryKey?{...d,keyPath:[]}:d)}}},qX=({locale:e,identifier:t,handleOnBack:n,isDarkMode:r})=>{const{modalTitle:a,openDictionaryEditor:o}=nn(VD),[l,u]=E.useState(!1),{all:d}=PD(),{focusedContent:f}=BD(t),m=E.useCallback(()=>{u(!1),n()},[n]),y=f==null?void 0:f.dictionaryKey;if(!y)return b.jsx(b.Fragment,{children:"No dictionary focused"});const g=d[y];return g?b.jsxs(b.Fragment,{children:[b.jsx(aO,{isOpen:l,onClose:()=>u(!1),hasCloseButton:!0,title:a.value,size:"xl",transparency:"lg",children:b.jsx("div",{className:"size-full px-3 pt-5",children:b.jsx(BX,{dictionary:g,onClickDictionaryList:m,isDarkMode:r,mode:["local","remote"],onDelete:()=>{u(!1),n()}})})}),b.jsxs("div",{className:"border-text/20 /20 mb-5 flex w-full border-b border-dashed px-3 pb-2",children:[b.jsx("h3",{className:"w-full text-center text-lg",children:g.title?g.title:g.key}),b.jsx(yt,{variant:"hoverable",color:"text",size:"icon-md",IconRight:D1,label:o.label.value,onClick:()=>u(!0)})]}),b.jsx(o9,{dictionary:g,locale:e,mode:["local","remote"]})]}):b.jsx(b.Fragment,{children:"No dictionary focused"})},KX=({locale:e,dictionaryKey:t,isDarkMode:n})=>{const{backButtonText:r}=nn(VD),a=h_(t),{focusedContent:o,close:l}=BD(t),{openDictionaryListDrawer:u}=Uh(f=>({openDictionaryListDrawer:()=>f.open(Av)})),d=()=>{l(),u()};return b.jsx(jD,{identifier:a,backButton:{onBack:d,text:r.value},onClose:l,children:o&&b.jsx(qX,{focusedContent:o,locale:e,identifier:a,handleOnBack:d,isDarkMode:n})})},WX=({locale:e,isDarkMode:t})=>{const{focusedContent:n}=ba(),r=n==null?void 0:n.dictionaryKey;return r?b.jsx(KX,{locale:e,dictionaryKey:r,isDarkMode:t}):b.jsx(b.Fragment,{})},YX=()=>{const{all:e}=PD(),t=Object.keys(e),{close:n,open:r}=Uh(),{editedContent:a}=Tn(),{setFocusedContent:o}=ba(),l=d=>{n(Av);const{filePath:f}=e[d];o({dictionaryKey:d,dictionaryPath:f}),r(h_(d))},u=d=>Object.keys(a??{}).includes(d);return b.jsx(jD,{title:"Dictionary list",identifier:Av,children:t.map(d=>b.jsx("div",{children:b.jsx(yt,{label:`Open dictionary editor ${d}`,onClick:()=>l(d),variant:"hoverable",color:"text",IconRight:xf,size:"md",isFullWidth:!0,children:u(d)?`✎ ${d}`:d})},d))})},ZX=({children:e})=>{const[t]=vs(fr.INTLAYER_CURRENT_LOCALE,void 0,{receive:!0,emit:!1}),{data:n}=x2({autoFetch:!0}),{setLocaleDictionaries:r}=oh();return E.useEffect(()=>{n&&r(n)},[n]),b.jsxs("div",{className:"bg-card relative size-full p-3",children:[e,b.jsx(WX,{locale:t}),b.jsx(YX,{})]})},XX=()=>{const[e,t]=E.useState();return E.useEffect(()=>{fetch("/api/config").then(n=>n.json()).then(n=>t(n.data))},[]),e},QX=({children:e,iframeRef:t})=>{const n=XX(),r=n!=null&&n.editor.applicationURL?n==null?void 0:n.editor.applicationURL:"*",a=(n==null?void 0:n.editor.editorURL)??"*";return n?b.jsx(pj,{postMessage:o=>{var l,u;window==null||window.postMessage(o,a),(u=(l=t.current)==null?void 0:l.contentWindow)==null||u.postMessage(o,r)},allowedOrigins:[r,a],mode:"editor",configuration:n,children:e}):b.jsx(Co,{})},JX=()=>{const{editedContent:e,setEditedContentState:t}=Tn(),n=()=>{const r=localStorage==null?void 0:localStorage.getItem("INTLAYER_EDITED_CONTENT_CHANGED");if(r)try{const a=JSON.parse(r);t(a)}catch(a){console.error(a)}};return E.useEffect(()=>{typeof e>"u"||localStorage==null||localStorage.setItem("INTLAYER_EDITED_CONTENT_CHANGED",JSON.stringify(e))},[e]),E.useEffect(()=>{typeof e<"u"||n()},[]),n},eQ=(...e)=>$1(hh(e)),tQ={key:"no-application-url-view",content:{title:pe({en:"Your project configuration do not includes application URL","en-GB":"Your project configuration do not includes application URL",fr:"Votre configuration de projet ne comprend pas l’URL de l’application",es:"Su configuración de proyecto no incluye la URL de la aplicación",de:"Ihre Projektkonfiguration enthält keine Anwendungs-URL",ja:"あなたのプロジェクト構成にはアプリケーション URL が含まれていません",ko:"당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.",zh:"您的项目配置未包含应用程序 URL",pt:"Sua configuração do projeto não inclui a URL do aplicativo",ru:"Ваша конфигурация проекта не включает URL-адрес приложения",ar:"تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق",hi:"आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है",it:"La configurazione del progetto non include l’URL dell’applicazione"}),description:pe({en:"To use the editor, you need to add the URL of the application to access to the configuration file.","en-GB":"To use the editor, you need to add the URL of the application to access to the configuration file.",fr:"Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.",es:"Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.",de:"Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.",ja:"エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。",ko:"에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.",zh:"要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。",pt:"Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.",ru:"Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.",ar:"لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.",hi:"एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।",it:"Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione."}),documentationLink:{label:pe({en:"Click to go to the editor documentation","en-GB":"Click to go to the editor documentation",fr:"Cliquez ici pour accéder à la documentation de l’éditeur",es:"Haga clic aquí para acceder a la documentación del editor",de:"Klicken Sie hier, um die Editor-Dokumentation zu besuchen",ja:"エディターのドキュメントに移動するには、ここをクリックしてください",ko:"에디터 문서로 이동하려면 여기를 클릭하십시오.",zh:"点击此处访问编辑器文档",pt:"Clique aqui para acessar a documentação do editor",ru:"Нажмите, чтобы перейти к документации редактора",ar:"انقر هنا للوصول إلى وثائق المحرر",hi:"एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?",it:"Fai clic qui per accedere alla documentazione dell’editor"}),text:pe({en:"See how to configure the editor","en-GB":"See how to configure the editor",fr:"Voir comment configurer l’éditeur",de:"Siehe, wie man den Editor konfiguriert",ar:"انظر كيفية تكوين المحرر",hi:"एडिटर को काने के बारे में देखें",it:"Vedi come configurare l’editor",ja:"エディターの設定方法を見る",ru:"Смотрите, как настроить редактор",es:"Vea cómo configurar el editor",pt:"Veja como configurar o editor",ko:"에디터 설정 방법을 보십시오",zh:"查看如何配置编辑器"})}}},nQ=()=>{const{title:e,description:t,documentationLink:n}=nn(tQ);return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsx(Yb,{className:"mb-8",children:e}),b.jsx("strong",{className:"text-neutral block",children:t}),b.jsx(Zb,{label:n.label.value,href:"https://intlayer.org/doc/concept/configuration#editor-configuration",color:"text",children:n.text})]})},rQ=({iframeRef:e,applicationPath:t})=>{const{editor:n}=Zr(),r=()=>a(n.enabled),a=uj();i1(r),JX(),yj();const[o,l]=E.useState(!1),[u]=gj(void 0,{receive:!0,emit:!1});return E.useEffect(()=>{typeof u=="string"&&window.history.replaceState({},"",u)},[u]),n.applicationURL?b.jsxs("div",{className:"size-full overflow-hidden rounded-lg",children:[b.jsx(Co,{isLoading:o}),b.jsx("iframe",{src:`${n.applicationURL}${t}`,title:"Intlayer Application",className:eQ("size-full",o&&"hidden"),ref:e,onLoad:()=>{l(!1),r()}})]}):b.jsx("div",{className:"flex size-full items-center justify-center",children:b.jsx(Jr,{className:"flex max-w-xl flex-col gap-4 p-6",children:b.jsx(nQ,{})})})},iQ=()=>{const e=E.useRef(null),t=_a();return b.jsx(QX,{iframeRef:e,children:b.jsx(Ej,{disableEditor:!0,children:b.jsx(ZX,{children:b.jsx(rQ,{iframeRef:e,applicationPath:t.pathname})})})})},aQ=()=>b.jsx($X,{children:b.jsx(GX,{children:b.jsx(iQ,{})})});dM.createRoot(document.getElementById("root")).render(b.jsx(E.StrictMode,{children:b.jsx(aQ,{})}));